All Questions

4
answers

How to convert an int to two bytes in C / C ++?

I get the data from a temperature sensor on a microcontroller that has a 10-bit AD converter. I store the data in a variable of type int (of 32 bits), and I need to send this data via serial communication. For this, I need to convert this...
asked on 03.04.2014 / 19:03
2
answers

What is NPM and Node?

The title of the question says it all. There are many articles on this, but in a clear and starter way, what is NPM in fact and what does it do? Like the Node? What do they contribute to website building?     
asked on 06.10.2016 / 11:55
4
answers

How to extract the extension of a file in Javascript?

There are some cases where I need to capture the extension of a file (that is, a string with file address) to be able to validate the extension via Javascript. For example, location : var path = window.location.pathname; // /foo/bar.h...
asked on 28.02.2014 / 22:20
2
answers

What is the purpose of alt in an img / tag?

Studying about HTML5 I came across the alt property being used in the <img /> tag. Example: <img src="https://s-media-cache-ak0.pinimg.com/736x/9e/fd/27/9efd27afef4e8127923fbce92b8c967d--minions-minions-funny-minio...
asked on 11.11.2016 / 11:32
2
answers

In what situations should I allocate a vector dynamically in C ++?

I'm working on a framework code for my work. In one of the functions, it dynamically allocates a std::vector , makes a copy of each node that the object has and returns it to the user: std::vector<Node> *Tree::getAllNodes() {...
asked on 14.12.2013 / 21:31
4
answers

How to create a user interface with the same style that was used in Visual Studio, Office 2013, GitHub for Windows, etc?

I would like to know how to create UI like those used by Visual Studio, Office 2013, GitHub for Windows, etc. I searched the internet and found a theme for WPF called Cosmopolitan Theme, but looking at some details you realize that it is not...
asked on 16.12.2013 / 16:43
3
answers

What is the usefulness and importance of "do ... while"?

The while command is a repeating structure with a condition at the beginning of the declaration. Example:    while (condition) {         sentences to run   } Already do... while has verification at the end, ie, the repea...
asked on 06.08.2015 / 15:22
1
answer

Why does Google Chrome not allow copying a reference to the console.log function?

I have a method that takes a reference to a function and uses that reference to display a data (code below). The problem is that when I use the console.log function with Google Chrome, an exception occurs, which in this case is as follows...
asked on 09.01.2014 / 19:33
1
answer

Is it a bad practice to use empty interfaces?

I've heard comments that would be a good idea when a future implementation can occur. I've also heard that it's a bad practice. I know that in PHP, for example, there is an interface called Traversable who has nothing. It serves onl...
asked on 24.07.2015 / 17:31
2
answers

What is the name of this 'effect' of selecting objects and how to do it in pure JS?

I would like to know what the 'effect' ('-') name is for selecting folders and files in Windows Explorer. And if possible I wanted to know how to do this with pure JavaScript.     
asked on 10.02.2014 / 02:21