Position-dodge warning with ggplot boxplot?

The number of groups is not the problem; I can see the same thing even when there are only 2 groups. The issue is that ggplot2 draws boxplots vertically (continuous along y, categorical along x) and you are trying to draw them horizontally (continuous along x, categorical along y). Also, your example has several syntax errors and … Read more

ConcurrentHashMap and Hashtable in Java

ConcurrentHashMap uses multiple buckets to store data. This avoids read locks and greatly improves performance over a HashTable. Both are thread safe, but there are obvious performance wins with ConcurrentHashMap. When you read from a ConcurrentHashMap using get(), there are no locks, contrary to the HashTable for which all operations are simply synchronized. HashTable was released in old versions of Java whereas ConcurrentHashMap is a java 5+ … Read more

Run C++ in command prompt – Windows

It depends on what compiler you’re using. For example, if you are using Visual C++ .NET 2010 Express, run Visual C++ 2010 Express Command Prompt from the start menu, and you can simply compile and run the code. or from the regular command line, you can run vcvars32.bat first to set up the environment. Alternatively search for setvcvars.cmd (part … Read more

How do you format a Date/Time in TypeScript?

If you want the time out as well as the date you want Date.toLocaleString(). This was direct from my console: You can then input locale strings and format string to get the precise output you want. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString

Android Studio AVD – Emulator: Process finished with exit code 1

These are known errors from libGL and libstdc++ You can quick fix this by change to use Software for Emulated Performance Graphics option, in the AVD settings. Or try to use the libstdc++.so.6 (which is available in your system) instead of the one bundled inside Android SDK. There are 2 ways to replace it: The emulator has a switch -use-system-libs. You can found it here: ~/Android/Sdk/tools/emulator … Read more

class not declared in scope – even though .h was included

The common circular include problem occurs with:a.h b.h If some cpp includes “a.h” you might get away with it (if b.h didn’t really need a.h). But if that cpp instead includes b.h then b.h includes a.h BEFORE declaring things needed by a.h. Then a.h tries to include b.h but the include guard blocks that, so the compiler … Read more