Check gcc minor in cmake

Use if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.2) as mentioned by onqtam. This obsolete answer was back from the 2.6 CMake days. You could run gcc -dumpversion and parse the output. Here is one way to do that: if (CMAKE_COMPILER_IS_GNUCC) execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) string(REGEX MATCHALL “[0-9]+” GCC_VERSION_COMPONENTS ${GCC_VERSION}) list(GET GCC_VERSION_COMPONENTS 0 GCC_MAJOR) list(GET GCC_VERSION_COMPONENTS 1 GCC_MINOR) message(STATUS … Read more

Detect iOS version less than 5 with JavaScript

This snippet of code can be used to determine any version of iOS 2.0 and later. function iOSversion() { if (/iP(hone|od|ad)/.test(navigator.platform)) { // supports iOS 2.0 and later: <http://bit.ly/TJjs1V> var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/); return [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)]; } } ver = iOSversion(); if (ver[0] >= 5) { alert(‘This is … Read more

How do I know which version of Javascript I’m using?

Click on this link to see which version your BROWSER is using: http://jsfiddle.net/Ac6CT/ You should be able filter by using script tags to each JS version. <script type=”text/javascript”> var jsver = 1.0; </script> <script language=”Javascript1.1″> jsver = 1.1; </script> <script language=”Javascript1.2″> jsver = 1.2; </script> <script language=”Javascript1.3″> jsver = 1.3; </script> <script language=”Javascript1.4″> jsver = … Read more

How do I detect what .NET Framework versions and service packs are installed?

The registry is the official way to detect if a specific version of the Framework is installed. Which registry keys are needed change depending on the Framework version you are looking for: Framework Version Registry Key —————————————————————————————— 1.0 HKLM\Software\Microsoft\.NETFramework\Policy\v1.0\3705 1.1 HKLM\Software\Microsoft\NET Framework Setup\NDP\v1.1.4322\Install 2.0 HKLM\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727\Install 3.0 HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.0\Setup\InstallSuccess 3.5 HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\Install … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)