version

Play Framework 2: Read the application version defined in Build.scala

送分小仙女□ 提交于 2019-11-26 16:07:46
问题 I use the Play Framework 2.0 (2.0.3). I have a Java project and want to read the application version ( appVersion ) defined in Build.scala. What I already saw is that it's possible to read certain configuration details from the Application object provided to Global.java, but didn't find a key called appVersion or similar. 回答1: You can define the version in application.conf and let Build.scala read the value. I did this with the version number and application name. The following works in Play

Which version of C# am I using

自古美人都是妖i 提交于 2019-11-26 15:50:44
My question is as easy as it seems: I want to find out which version of C# I'm using. If I would be using python I would do something like python -V from command line, or type import sys print sys.version In php I would do something like this: phpinfo(); in java: java -version But I was not able to find how to achieve this in C#. I'm completely new to C#, so please do not beat me too hard. What surprises me that I was not able to find this answer on SO, therefore I think that I'm missing something or bad in finding things. BTW, this question does not answer it, although the name suggests that

How to find SQLITE database file version

喜欢而已 提交于 2019-11-26 15:47:12
问题 I have few sqlite database files. I want to know the database file version i.e if the database was created with sqlite2 or sqlite3 or any other main/sub version (not the sqlite library or driver or user_version or schema_version). 回答1: You can write this command in any sqlite explorer which will give the sqlite version select sqlite_version(); 回答2: You can get version number of a database file by the Magic Header String: sqlite2 ==> first 48 bytes sqlite3 ==> first 16 bytes $ head -c 48 file2

Retrieve version from maven pom.xml in code

。_饼干妹妹 提交于 2019-11-26 15:37:30
What is the simplest way to retrieve version number from maven's pom.xml in code, i.e., programatically? Alex Miller Assuming you're using Java, you can Create a .properties file in (most commonly) your src/main/resources directory (but in step 4 you could tell it to look elsewhere). Set the value of some property in your .properties file using the standard Maven property for project version: foo.bar=${project.version} In your Java code, load the value from the properties file as a resource from the classpath (google for copious examples of how to do this, but here's an example for starters ).

SQL Server file names vs versions [closed]

十年热恋 提交于 2019-11-26 15:32:02
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I am lucky to be an admin of a server, but I have no idea how many versions of sql server on this server. When I opened the file Microsoft SQL Server, there are files called 80, 90, 100, 110. And I have only found SQL Server 2012 setup, so what's the relationship between the files names like 80, 90, 100, 110

How do I find out which JAXP implementation is in use and where it was loaded from?

淺唱寂寞╮ 提交于 2019-11-26 15:25:27
问题 I would like to provide diagnostic information about what JAXP implementation is in use, and which JAR file it was loaded from. One way to achieve this is to create in instance of, for example, a DocumentBuilderFactory , and then inspect the properties of that class: private static String GetJaxpImplementation() { DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); Class<? extends DocumentBuilderFactory> c = documentBuilderFactory.getClass(); Package p = c

How do I programmatically get the version of a DLL or EXE file?

萝らか妹 提交于 2019-11-26 15:18:59
I need to get the product version and file version for a DLL or EXE file using Win32 native APIs in C or C++. I'm not looking for the Windows version, but the version numbers that you see by right-clicking on a DLL file, selecting "Properties", then looking at the "Details" tab. This is usually a four-part dotted version number x.x.x.x. You would use the GetFileVersionInfo API. See Using Version Information on the MSDN site. Sample: DWORD verHandle = 0; UINT size = 0; LPBYTE lpBuffer = NULL; DWORD verSize = GetFileVersionInfoSize( szVersionFile, &verHandle); if (verSize != NULL) { LPSTR

How to check SQL Server version

◇◆丶佛笑我妖孽 提交于 2019-11-26 15:10:11
问题 What are the possible ways to determine the deployed SQL Server version? I’ve tried to do it using the SQL Server software. I want to do it using a command line SQL statement. 回答1: Following are possible ways to see the version: Method 1: Connect to the instance of SQL Server, and then run the following query: Select @@version An example of the output of this query is as follows: Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) Mar 29 2009 10:11:52 Copyright (c) 1988-2008 Microsoft

How do I detect at runtime that .NET version 4.5 is currently running your code?

£可爱£侵袭症+ 提交于 2019-11-26 15:03:33
I installed .NET 4.5 Developer preview from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27541 , which 'replaces' .NET 4.0 version. However, the old way to detect the .NET framework version seems to return 4.0 (more precisely 4.0.30319.17020 on my PC), instead of 4.5 (sure probably for backward compatibility, or?): using System; namespace ConsoleApplication { class Program { static void Main(string[] args) { var version = Environment.Version; Console.WriteLine(version.ToString()); Console.ReadKey(); } } } How do I detect that my code is really executed by .NET 4.5?

How can I get the assembly file version

心已入冬 提交于 2019-11-26 14:48:57
In AssemblyInfo there are two assembly versions: AssemblyVersion : Specify the version of the assembly being attributed. AssemblyFileVersion : Instructs a compiler to use a specific version number for the Win32 file version resource. The Win32 file version is not required to be the same as the assembly's version number. I can get the Assembly Version with the following line of code: Version version = Assembly.GetEntryAssembly().GetName().Version; But how can I get the Assembly File Version ? Xiaofu See my comment above asking for clarification on what you really want. Hopefully this is it: