version

Checking a Python module version at runtime

廉价感情. 提交于 2019-11-26 06:59:24
问题 Many third-party Python modules have an attribute which holds the version information for the module (usually something like module.VERSION or module.__version__ ), however some do not. Particular examples of such modules are libxslt and libxml2. I need to check that the correct version of these modules are being used at runtime. Is there a way to do this? A potential solution wold be to read in the source at runtime, hash it, and then compare it to the hash of the known version, but that\'s

Determine framework (CLR) version of assembly

江枫思渺然 提交于 2019-11-26 06:34:33
问题 From the command line (or by any means really), how can I determine which CLR version a .NET assembly requires? I need to determine if an assembly requires 2.0 or 4.0 CLR version. 回答1: ildasm.exe will show it if you double-click on "MANIFEST" and look for "Metadata version". By default, it's the version that the image was compiled against. 回答2: One clarification... The problem with all the mentioned methods is that they will return version 4.0 if assembly was compiled against .NET framework 4

Compare version numbers without using split function

蹲街弑〆低调 提交于 2019-11-26 06:32:27
问题 How do I compare version numbers? For instance: x = 1.23.56.1487.5 y = 1.24.55.487.2 回答1: Can you use the Version class? http://msdn.microsoft.com/en-us/library/system.version.aspx It has an IComparable interface. Be aware this won't work with a 5-part version string like you've shown (is that really your version string?). Assuming your inputs are strings, here's a working sample with the normal .NET 4-part version string: static class Program { static void Main() { string v1 = "1.23.56.1487"

Setting application info in a Qt executable file on Windows

淺唱寂寞╮ 提交于 2019-11-26 06:31:02
问题 Anyone have an tips on setting the application info (ie. right click on .exe->properties) from Qt? I can add arbitrary version strings to Qt resource file (qrc) and display them. But most Windows installers check the version number and I can\'t find a Qt way of setting these fields other than manually maintaining a separate .RC file Some way that lets you update this from an automated build would also be nice! 回答1: Here's how I do it... add a file called resources.rc to your project with the

versionCode vs versionName in Android Manifest

℡╲_俬逩灬. 提交于 2019-11-26 06:12:35
问题 I had my app in the android market with version code = 2 and version name = 1.1 However, while updating it today, I changed the version code = 3 in the manifest but by mistake changed my version name to 1.0.1 and uploaded the apk to the market. Now, will the users of my app get an update notification on their phones or not? Or should I redo the process again? 回答1: Reference Link android:versionCode An internal version number. This number is used only to determine whether one version is more

How can my iphone app detect its own version number?

一个人想着一个人 提交于 2019-11-26 06:12:35
问题 I\'m writing an iPhone app. It\'s already been published, but I would like to add a feature where its version number is displayed. I\'d rather not have to do this manually with each version I release... Is there a way in objective-C to find out what the version is of my app? 回答1: As I describe here, I use a script to rewrite a header file with my current Subversion revision number. That revision number is stored in the kRevisionNumber constant. I can then access the version and revision

PowerShell script to return versions of .NET Framework on a machine?

僤鯓⒐⒋嵵緔 提交于 2019-11-26 06:10:21
问题 What would a PowerShell script be to return versions of the .NET Framework on a machine? My first guess is something involving WMI. Is there something better? It should be a one-liner to return only the latest version for each installation of .NET [on each line]. 回答1: If you're going to use the registry you have to recurse in order to get the full version for the 4.x Framework. The earlier answers both return the root number on my system for .NET 3.0 (where the WCF and WPF numbers, which are

How to find the JVM version from a program?

泄露秘密 提交于 2019-11-26 06:06:50
问题 I want to write a sample Java file in which I want to know the JVM version in which the class is running. Is there a way? 回答1: System.getProperty("java.version") returns what you need. You can also use JMX if you want: ManagementFactory.getRuntimeMXBean().getVmVersion() 回答2: It seems the java.specification.version is the best one for the job. E.G. from an applet at one of my former sites: java.specification.version 1.6 java.version 1.6.0_23 java.vm.version 19.0-b09 java.runtime.version

How to find out which version of the .NET Framework an executable needs to run?

时光怂恿深爱的人放手 提交于 2019-11-26 05:53:55
问题 I\'ve got an executable file, and I would like to know which versions of the .NET framework this file needs to be started. Is there an easy way to find this information somewhere? (So far I tried ILDASM and DUMPBIN without any luck.) 回答1: I think the closest you can reliably get is to determine what version of the CLR is required. You can do this by using ILDASM and looking at the "MANIFEST" node or Reflector and looking at the dissasembly view of the "Application.exe" node as IL. In both

How to retrieve the android sdk version?

时光怂恿深爱的人放手 提交于 2019-11-26 05:52:41
问题 How can I get the current Android SDK version(1.5, 1.6, 2.0, etc.) programmatically? 回答1: The String Build.VERSION.RELEASE will give you the user-visible version string (i.e 1.5, 1.6, 2.0), while Build.VERSION.SDK_INT will give you a value from Build.VERSION_CODES that would be better to use if you want to compare against it programatically. 回答2: StringBuffer buf = new StringBuffer(); buf.append("VERSION.RELEASE {"+Build.VERSION.RELEASE+"}"); buf.append("\\nVERSION.INCREMENTAL {"+Build