Pinned Update #1
Sunday, April 12, 2015
Does this still work?
Maybe.
Anyway, in order to give this post a little purpose, here's a cool mix I've been listening to a lot at work.
Fruit bat out.
Wednesday, April 10, 2013
Wednesday, April 3, 2013
The Blue Ball
Friday, January 25, 2013
Task Manager Magic
today i found out that CTRL + SHIFT + ESC opens the Task Manager. Hallelujah.
OK, that's it.
Tuesday, January 1, 2013
Sunday, December 23, 2012
Friday, August 10, 2012
Wide Characters
Here's how to output wide characters (i.e., wchar_t) to the console in Visual Studio 2010 using a Multi-Byte character set environment. Most likely, this option must be set manually since Microsoft suggest Unicode by default. This setting prevents certain functions from being changed to their <method>W versions but i guess that's a matter of taste. All it takes is a single call to _setmode() with the second parameter indicating the expected character type. In the case of UTF-16 (two bytes) this is _O_U16TEXT. After that, the character type can be switched back to ASCII using the _O_TEXT option.
_setmode(_fileno(stdout), _O_U16TEXT); std::wcout<<L"Hello World"<<L"\n"; _setmode(_fileno(stdout), _O_TEXT);
Of course, the console's font must be set to something that can handle all used characters (e.g., Lucida Sans Unicode). The complete Unicode table can be found ▷here.