Source code in Microsoft Word

Somebody finally did that! Somebody created Office add-on that allows to import source code with highlights and right format.
Check it out!

Another useful tool for source code copy/paste if you’re using Sublime Text:

There are even more ideas on how to insert source code into Word, Office, Excel or whatever here:

Lifehack: If you can’t compile old XCode project “There is no SDK with the name or path”

If your old project fails to compile with XCode with error like
error: There is no SDK with the name or path ‘/path/to/my/project/macosx10.6’

even if you changed target in the XCode Build Settings, then you stumbled upon silly bug in the XCode. It’s just unable to change SDKROOT in your pbxproject file. Edit it manually and remove all SDKROOT lines.

How to redirect std C++ streams to Visual Studio debug output

Discovered this trick for the first time. You can use AllocConsole() to redirect ANY std stream to debug console.

In most cases people use either TRACE() statement (but you have include MFC or ATL for that) or Win API OutputDebugString().

With AllocConsole() your code may look like this:

   freopen("CONOUT$", "w", stdout);

That’s it!

Learning something new every day. 😀

Home and End keys remap on Mac

Little hack which will make Home and End buttons work as they’re working in most OS’s except for Mac.

Proudly powered by WordPress
Theme: Esquire by Matthew Buchanan.