compatibility

How to install both Python 2.x and Python 3.x in Windows 7

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 03:21:10
问题 I do most of my programming in Python 3.x on Windows 7, but now I need to use the Python Imaging Library (PIL), ImageMagick, and wxPython, all of which require Python 2.x. Can I have both Python 2.x and Python 3.x installed in Windows 7? When I run a script, how would I \"choose\" which version of Python should run it? Will the aforementioned programs be able to handle multiple versions of Python installed at once? I have searched for hours and hours for how to do this to no avail. Thanks.

How to make Internet Explorer 8 to support nth child() CSS element?

走远了吗. 提交于 2019-11-26 03:10:55
问题 I want to give a zebra stripe effect to my table rows. In all other browsers it can be done using CSS nth child element. But i want to do it IE 8 also. SO how can i do it? 回答1: You can use http://selectivizr.com/ JS which support css3 selector for IE. 回答2: With polyfill : Selectivizr is good enough. Without polyfill: As IE8 supports first-child you can trick this to support nth-child in iE8 i.e /*li:nth-child(2)*/ li:first-child + li {}/*Works for IE8*/ Although we cannot emulate complex

I want to get Year, Month, Day, etc from Java Date to compare with Gregorian Calendar date in Java. Is this possible?

99封情书 提交于 2019-11-26 02:28:37
问题 I have a Date object in Java stored as Java\'s Date type. I also have a Gregorian Calendar created date. The gregorian calendar date has no parameters and therefore is an instance of today\'s date (and time?). With the java date, I want to be able to get the year, month, day, hour, minute, and seconds from the java date type and compare the the gregoriancalendar date. I saw that at the moment the Java date is stored as a long and the only methods available seem to just write the long as a

IE11 Document mode defaults to IE7. How to reset?

会有一股神秘感。 提交于 2019-11-26 01:59:36
问题 My Internet Explorer 11 on my Windows 8.1 Surface tablet defaults to document mode 7, causing a lot of websites to render wrongly. When I open the Developer tools, it states that it defaults to document mode 7 because of Intranet-compatibility settings. However, I haven\'t changed these settings manually and I\'m browsing Internetpages! I tried to reset the Internet Explorer settings without any luck. Any ideas? 回答1: By default, IE displays webpages in the Intranet zone in compatibility view.

Can Java 8 code be compiled to run on Java 7 JVM?

我的梦境 提交于 2019-11-26 01:37:41
问题 Java 8 introduces important new language features such as lambda expressions. Are these changes in the language accompanied by such significant changes in the compiled bytecode that would prevent it from being run on a Java 7 virtual machine without using some retrotranslator? 回答1: No, using 1.8 features in your source code requires you to target a 1.8 VM. I just tried the new Java 8 release and tried compiling with -target 1.7 -source 1.8 , and the compiler refuses: $ javac Test -source 1.8

Java 32-bit vs 64-bit compatibility

风格不统一 提交于 2019-11-26 00:59:23
问题 Will Java code built and compiled against a 32-bit JDK into 32-bit byte code work in a 64-bit JVM? Or does a 64-bit JVM require 64-bit byte code? To give a little more detail, I have code that was working in a Solaris environment running a 32-bit JVM, but now I\'m getting issues after upgrading the JDK and Weblogic Server to 64-bit. 回答1: Yes, Java bytecode (and source code) is platform independent, assuming you use platform independent libraries. 32 vs. 64 bit shouldn't matter. 回答2: I

Which TensorFlow and CUDA version combinations are compatible?

自古美人都是妖i 提交于 2019-11-26 00:57:49
问题 I have noticed that some newer TensorFlow versions are incompatible with older CUDA and cuDNN versions. Does an overview of the compatible versions or even a list of officially tested combinations exist? I can\'t find it in the TensorFlow documentation. 回答1: Generally: Check the CUDA version: cat /usr/local/cuda/version.txt and cuDNN version: grep CUDNN_MAJOR -A 2 /usr/local/cuda/include/cudnn.h and install a combination as given below in the images or here. The following images and the link

How To Make iPhone App compatible with multiple SDK (firmware) versions

匆匆过客 提交于 2019-11-26 00:51:30
问题 With iOS4 coming out soon, I have already planned to include an iAd in a future update of an app of mine. I assume that this will make my app unusable for anyone on a firmware lower than 4.0. Is there a way to change that variables and the .xib file based on the user\'s firmware? Cheers. 回答1: Yes, you can build with the latest SDK (ie: 5.1) and still run on devices with earlier versions of the firmware (SDK). Set your Deployment Target to the earliest version you want to be able to run with,

How to run multiple Python versions on Windows

六月ゝ 毕业季﹏ 提交于 2019-11-26 00:45:25
问题 I had two versions of Python installed on my machine (versions 2.6 and 2.5). I want to run 2.6 for one project and 2.5 for another. How can I specify which I want to use? I am working on Windows XP SP2. 回答1: Running a different copy of Python is as easy as starting the correct executable. You mention that you've started a python instance, from the command line, by simply typing python . What this does under Windows, is to trawl the %PATH% environment variable, checking for an executable,

Nested arguments not compiling

我的未来我决定 提交于 2019-11-25 23:35:26
问题 I\'m trying to compile my code into a Python 3 module. It runs fine when I choose \"Run module\" in IDLE, but receive the following syntax error when I try to create a distribution: File \"/usr/local/lib/python3.2/dist-packages/simpletriple.py\", line 9 def add(self, (sub, pred, obj)): ^ SyntaxError: invalid syntax Can anyone help point out what is wrong with the syntax? Here is the complete code: import csv class SimpleGraph: def __init__(self): self._spo = {} self._pos = {} self._osp = {}