Skip to main content
0 votes
1 answer
503 views

Is there a pre-processor variable indicating QNX SDP 6/7 difference?

We have some code originally developed for QNX SDP 6.6 that we are porting to QNX SDP 7.0 (7.1 does not yet have the board support packages we need). As part of the porting effort, we are finding ...
paxdiablo's user avatar
  • 888k
5 votes
2 answers
4k views

Can I assert the python version before the interpreter parses the code?

I want to inform the user which python version they should use: import sys assert sys.version_info >= (3, 6), "Use Python 3.6 or newer" print(f"a format string") But instead, ...
Alex Shroyer's user avatar
  • 3,849
2 votes
1 answer
1k views

Makefile: Emit warning gcc version is lower than 4.8.0

The Makefile parameters to gcc A certain Makefile` in an Open-Source project contains the following call: CFLAGS = -I$(RM_INCLUDE_DIR) -Wall -g -fPIC -lc -lm -Og -std=gnu99 The -Og parameter was ...
Adam Matan's user avatar
  • 138k
18 votes
4 answers
90k views

Reliable way to get Windows Version from registry

I'm checking the windows version in an installer (made with NSIS) by checking the following registry key: HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "CurrentVersion" According to this post ...
skuallpa's user avatar
  • 1,297
3 votes
3 answers
467 views

How to set a version dependent Git global config flag

To keep all of my config files in sync I have a Github repository with all of my settings. While this works fairly well in most cases, some apps have different versions on different machines. So now ...
Wolph's user avatar
  • 80.4k
0 votes
1 answer
162 views

How can I detect if my app runs under IE8 vs IE9 in JavaScript?

I have a piece of functionality which needs to differ between IE8 and IE9 (IE9 uses a very nice library that is the main code path, but a slight minority of users of the app are still on IE8 which the ...
DVK's user avatar
  • 130k
6 votes
1 answer
633 views

How to detect current IIS version with PHP?

My approach now is … if ( preg_match( '~IIS/(\d+\.\d+)~', $_SERVER['SERVER_SOFTWARE'], $matches ) ) $version = $matches[1]; … but I have no experience with IIS, and after searching for a while I ...
fuxia's user avatar
  • 63.7k
1 vote
0 answers
99 views

Variant anonymous function definitions based on PHP version?

The following fails with a parse error on PHP 5.2.X: if (version_compare(PHP_VERSION, '5.3.0') >= 0) { $greater = function($left, $right) { return $left > $right; } } else { $greater =...
Hephaestus's user avatar
  • 2,082
5 votes
2 answers
2k views

How do I detect if the specific Delphi IDE is running?

I'm working on a component installer (only for Delphi XE2) and I would like to detect if the Delphi XE2 IDE is running. How would you detect it? P.S. I know about the TAppBuilder window class name, ...
Martin Reiner's user avatar
4 votes
4 answers
833 views

How to determine SQL Server 2008 or above

I need to determine programmatically if the database supports the Geography data type and Spatial indexes. These features were introduced in 2008. I also need to determine if CLR is enabled as these ...
Jack Allan's user avatar
  • 15.1k
49 votes
9 answers
77k views

Detect iOS version less than 5 with JavaScript

This is related to the "fix" for position:fixed in older versions of iOS. However, if iOS5 or greater is installed, the fix breaks the page. I know how to detect iOS 5: navigator.userAgent.match(/OS ...
absynthe minded web smith's user avatar
1 vote
0 answers
7k views

Detecting Java version (runnable in browser) with JavaScript?

I was checking this code provided by Sun that can retrieve a list of the Java Runtime Environments installed on the machine. Here's the code formatted and with some functions removed so it's easier to ...
mgpia's user avatar
  • 25
7 votes
4 answers
5k views

Detecting .NET version without UserAgent string

Most modern browsers (Chrome 10, Firefox 4, IE9) are all shortening their UserAgent identifiers. As a result, the supported .NET versions are no longer sent to the server. In order to allow our ...
Jaspio's user avatar
  • 199
4 votes
2 answers
1k views

Detect .net framework version AND REVISION from Internet Explorer

I know we can detect the major version and SP version from user-agent string. However, I need to distinguish between Revisions as well, i.e. 2.0 RTM (x86) 2.0.50727.42 2.0 RTM (Vista) 2.0.50727....
wizzard0's user avatar
  • 1,938
122 votes
8 answers
239k views

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

I'm just reading this documentation about Javascript 1.2, but I'm wondering which version of Javascript is being used in the most popular browsers. http://www.tutorialspoint.com/javascript/...
Exitos's user avatar
  • 29.9k

15 30 50 per page