npm WARN package.json: No repository field

It’s just a check as of NPM v1.2.20, they report this as a warning. However, don’t worry, there are sooooooo many packages which still don’t have the repository field in their package.json. The field is used for informational purposes. In the case you’re a package author, put the repository in your package.json, like this: Read more about the repository field, and see the logged bug for further … Read more

casting int to char using C++ style casting

You should use static_cast<char>(i) to cast the integer i to char. reinterpret_cast should almost never be used, unless you want to cast one type into a fundamentally different type. Also reinterpret_cast is machine dependent so safely using it requires complete understanding of the types as well as how the compiler implements the cast. For more information about C++ casting see: When should static_cast, … Read more

Play audio with Python

You can find information about Python audio here: http://wiki.python.org/moin/Audio/ It doesn’t look like it can play .mp3 files without external libraries. You could either convert your .mp3 file to a .wav or other format, or use a library like PyMedia.

Android SDK location should not contain whitespace, as this cause problems with NDK tools

As the warning message states, the SDK location should not contain whitespace. Your SDK is at C:\Users\Giacomo B\AppData\Local\Android\sdk. There is a whitespace character in Giacomo B. The easiest solution is to move the SDK somewhere else, where there is no space or other whitespace character in the path, such as C:\Android\sdk. You can point both Android Studio installations … Read more

How do I change tab size in Vim?

Expanding on zoul’s answer: If you want to setup Vim to use specific settings when editing a particular filetype, you’ll want to use autocommands: This will make it so that tabs are displayed as 4 spaces. Setting expandtab will cause Vim to actually insert spaces (the number of them being controlled by tabstop) when you press tab; you … Read more

Java: How To Call Non Static Method From Main Method?

You simply need to create an instance of ReportHandler: The important point of instance methods is that they’re meant to be specific to a particular instance of the class… so you’ll need to create an instance first. That way the instance will have access to the right connection and prepared statement in your case. Just calling ReportHandler.executeBatchInsert, there … Read more