version

System.Version not serialized

我们两清 提交于 2019-11-27 03:04:06
问题 I've got a class with a System.Version property, which looks like this: Version Build: 111 Major: 1 MajorRevision: 0 Minor: 1 MinorRevision: 10 Revision: 10 When I serialize the class, version is always empty: <Version /> The Client class looks like: [Serializable] public class Client { public string Description; public string Directory; public DateTime ReleaseDate; public Version Version; } 回答1: System.Version is not serializable, if you look at it's properties on MSDN, you'll see they have

How to find out which package version is loaded in R?

天涯浪子 提交于 2019-11-27 02:21:25
I am in a process of figuring out how to use my university cluster. It has 2 versions of R installed. System wide R 2.11 (Debian 6.0) and R 2.14.2 in non-standard location. I am trying to use MPI together with snow. The code I am trying to run is the following library(snow) library(Rmpi) cl <- makeMPIcluster(mpi.universe.size()-1) stopCluster(cl) mpi.quit() It works without the problems on R 2.11. (I launch the script with mpirun -H localhost,n1,n2,n3,n4 -n 1 R --slave -f code.R ). Now when I try to do it with R 2.14.2, I get the following message: Error: This is R 2.11.1, package 'snow' needs

Python IDLE: Change Python Version

China☆狼群 提交于 2019-11-27 01:51:24
I have Python 2.x and 3.x on my machine (Mac OS X 10.6). For some things I want to use ver 2, but for others I want ver 3. I like the IDLE software for editing/running, but it always uses version 3. Is there any way to change the version of the interpreter that IDLE uses? Thanks! There are different versions of IDLE installed for each Python version. Depending on how you installed Python on Mac OS X, you may find different folders in /Applications . Look for a Python 3.n (n = 1 or 2) folder with an IDLE in it. Or, from a terminal command line, you may find an idle2.6 and an idle3 or idle3.1 or

Which .NET version is my PowerShell script using?

◇◆丶佛笑我妖孽 提交于 2019-11-27 01:45:29
问题 I'd like to use .NET in some PowerShell scripts I'm about to write -- how do I know/declare which version of .NET I'm dealing with when these scripts run? And is it possible to choose against which version of .NET my script will run? 回答1: On PowerShell 2.0, just take a peek at the $PSVersionTable variable: PS> $psversiontable Name Value ---- ----- CLRVersion 2.0.50727.4927 BuildVersion 6.1.7600.16385 PSVersion 2.0 WSManStackVersion 2.0 PSCompatibleVersions {1.0, 2.0} SerializationVersion 1.1

Install different versions of NodeJS

青春壹個敷衍的年華 提交于 2019-11-27 01:27:00
问题 Is it possible to have different versions of NodeJS installed on the same machine? 回答1: There are several node managers which you can use to achieve this, but the most popular are: NVM n 回答2: I use nave. https://github.com/isaacs/nave > npm install -g nave > nave use 0.4.12 # starts a subshell with 0.4.12 at the head of the path > node --version v0.4.12 > exit # go back to the original shell > nave use 0.6.5 > node --version v0.6.5 > nave usemain Note that the first time you need a version,

Checking the gcc version in a Makefile?

怎甘沉沦 提交于 2019-11-27 01:19:00
问题 I would like to use some gcc warning switchs that aren't available in older gcc versions (eg. -Wtype-limits). Is there an easy way to check the gcc version and only add those extra options if a recent gcc is used ? 回答1: I wouldn't say its easy, but you can use the shell function of GNU make to execute a shell command like gcc --version and then use the ifeq conditional expression to check the version number and set your CFLAGS variable appropriately. Here's a quick example makefile: CC = gcc

Which version of hibernate support jpa 2.1?

妖精的绣舞 提交于 2019-11-27 01:14:13
问题 Currently I am using JPA 2.0 with hibernate 3.6 . I tried to search but couldn't find, can anyone list out JPA 2.1 is supported by which versions of hibernate? 回答1: According to Hibernate's versions list, JPA 2.1 is going to be supported by version 4.3 or by 5.0 回答2: Hibernate 4.3.0.Final (Dec. 16, 2013) is the first production ready release to support jpa 2.1. See: http://in.relation.to/Bloggers/HibernateORM430FinalRelease The main focus of 4.3 was JPA 2.1 support, so much of the work these

Get Android OS version from user-agent

ⅰ亾dé卋堺 提交于 2019-11-27 01:08:08
问题 I've been trying to find a parser or regex that will give me the Android OS version from a user agent string. E.g. Mozilla/5.0 (Linux; U; Android 2.2.1; fr-fr; Desire HD Build/FRG83D) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 Will return: 2.2.1 Can anyone help? 回答1: This regular expression is a bit more "future proof" than mathepic's answer: Android (\d+(?:\.\d+)+); It allows for multiple digits in each place as well as additional periods in the version number.

What are the gcc predefined macros for the compiler's version number?

只谈情不闲聊 提交于 2019-11-27 01:04:39
问题 I have run into a bug with gcc v3.4.4 and which to put an #ifdef in my code to work around the bug for only that version of the compiler. What are the GCC compiler preprocessor predefined macros to detect the version number of the compiler? 回答1: From the gnu cpp manual... __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__ These macros are defined by all GNU compilers that use the C preprocessor: C, C++, Objective-C and Fortran. Their values are the major version, minor version, and patch level of

How to translate MS Windows OS version numbers into product names in .NET?

偶尔善良 提交于 2019-11-27 00:41:13
问题 How to translate MS Windows OS version numbers into product names? For example, in .NET the following two properties could be used to work out that the product is MS Windows Vista Ultimate Edition : Environment.OSVersion.Platform returns Win32NT Environment.OSVersion.Version returns 6.0.6001.65536 回答1: howto net os version VB: Public Function GetOSVersion() As String Select Case Environment.OSVersion.Platform Case PlatformID.Win32S Return "Win 3.1" Case PlatformID.Win32Windows Select Case