What version of the .NET framework is installed on Windows XP, Vista, and 7?

From Wikipedia and MSDN: .NET Framework 1.1: Windows Server 2003 .NET Framework 2.0: Windows Server 2003 R2 .NET Framework 3.0: Windows Vista, Windows Server 2008 .NET Framework 3.5: Windows 7, Windows Server 2008 R2 .NET Framework 4.0: n/a .NET Framework 4.5: Windows 8, Windows Server 2012 .NET Framework 4.5.1: Windows 8.1, Windows Server 2012 R2 … Read more

How can I beautify JavaScript code using Command Line?

First, pick your favorite Javascript based Pretty Print/Beautifier. I prefer the one at http://jsbeautifier.org/, because it’s what I found first. Downloads its file https://github.com/beautify-web/js-beautify/blob/master/js/lib/beautify.js Second, download and install The Mozilla group’s Java based Javascript engine, Rhino. “Install” is a little bit misleading; Download the zip file, extract everything, place js.jar in your Java classpath (or … Read more

Programmatically find the number of cores on a machine

C++11 #include <thread> //may return 0 when not able to detect const auto processor_count = std::thread::hardware_concurrency(); Reference: std::thread::hardware_concurrency In C++ prior to C++11, there’s no portable way. Instead, you’ll need to use one or more of the following methods (guarded by appropriate #ifdef lines): Win32 SYSTEM_INFO sysinfo; GetSystemInfo(&sysinfo); int numCPU = sysinfo.dwNumberOfProcessors; Linux, Solaris, AIX … Read more