compatibility

Gradle sourceCompatibility has no effect to subprojects

感情迁移 提交于 2019-11-27 03:42:32
I have Java 6 and 7 installed on my machine. Gradle uses 1.7 (checked using gradle -v ). But I need to compile my code to be compatible with Java 1.6. As far as I understand the documentation I can use the sourceCompatibility property to do so (and indirectly the targetCompatibility which defaults to the sourceCompatibility ). So I added the following line to my build file (on the root level, not in any closure): sourceCompatibility = 1.6 (to be sure I also added the targetCompatibility = 1.6 in some trials, but that should not make a difference) To check whether the result was actually

Preferred way to use favicons?

…衆ロ難τιáo~ 提交于 2019-11-27 03:26:16
问题 I was trying to add a favicon to a website earlier and looked for a better way to implement this than to dump a favicon.ico file in the root of the website. I found this nice little guide: How to Add a Favicon. However, the preferred method did not work in IE (7) and the second method is the old fashioned way (which I resigned myself to use). Is there a third method that works across all the most popular browsers? 回答1: This is what I always use: <link rel="icon" href="favicon.ico" type="image

Logging framework incompatibility

会有一股神秘感。 提交于 2019-11-27 03:05:10
I'm building a small Java app and hoping to use logback for logging. My app has a dependency on an older project that does its logging via org.apache.commons | com.springsource.org.apache.commons.logging | 1.1.1 ...so my plan was to use org.slf4j | jcl-over-slf4j | 1.5.6 ...to redirect the JCL logging to org.slf4j | slf4j-api | 1.6.0 ...and ultimately to ch.qos.logback | logback-classic | 0.9.22 ch.qos.logback | logback-core | 0.9.22 so my app can log through logback via its slf4j API while the old library code can log into the same location via the redirection. Alas, this results in java.lang

Use Selenium with Chromium Browser

∥☆過路亽.° 提交于 2019-11-27 02:09:49
问题 In the Selenium options (on Firefox) I can find Custom browser . Is it possible to use this option to run a Selenium test in Chromium Browser (not Chrome)? 回答1: yes. for chrome use DefaultSelenium selenium = new DefaultSelenium("localhost", 4444, "*custom path/to/chromium" , "www.google.com"); selenium.start(); The other options that you can use are *custom, *chrome(note: this is not Google chrome, its a firefox mode only), *googlechrome, *iexplore. Please check selenium documentation for

Case-insensitive storage and unicode compatibility

强颜欢笑 提交于 2019-11-27 01:58:14
问题 After I heard of someone at my work using String.toLowerCase() to store case-insensitive codes in a database for searchability, I had an epic fail moment thinking about the number of ways that it can go wrong: Turkey test (in particular changing locales on the running computer) Unicode version upgrades - I mean, who knows about this stuff? If I upgrade to Java 7, I have to reindex my data if I'm being case-insensitive? What technologies are affected by Unicode versions? Do I need to worry

How to set IE11 Document mode to edge as default?

∥☆過路亽.° 提交于 2019-11-27 00:36:06
I have Internet Explorer installed on my computer but needed to test compatibility mode of IE 7. After changing the document mode to IE 7, it set it as default and now I can't change it. The default is stuck on IE 7? How do I set Document mode default? Ken Gray You can achieve this using a meta tag as follows: <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> The rendering mode in Internet Explorer 11 can appear stuck if the site is added to your local Compatibility View list. When this happens, the rendering mode inside the developer tools and out will default to the specified

How to deal with deprecated classes in Android to keep compatibility

久未见 提交于 2019-11-27 00:32:47
I am getting back to work on an app I worked on a while ago, when I had everything built around Android 2.2 Froyo. I have updated my SDK for the latest APIs and noticed that the ClipboardManager features I was using are deprecated. I updated the code to use the newer ClipData model and tried it out on my Froyo phone and, of course, I get a NoClassDefFoundError in the new code. I've had a look around SO and haven't found any real discussions of general strategy for maintaining backwards compatibility. I'm not entirely sure how I should handle this and other situations where the API differs,

Call R (programming language) from .net

吃可爱长大的小学妹 提交于 2019-11-27 00:26:48
I'm working on an application that requires a great deal of stastical processing and output as images in a .net desktop application. The problems, including generating the output images, seem like a natural fit for R http://www.r-project.org/ Is there a wrapper, API, SDK, or port that will allow me to call R from .net? R.NET is pretty buggy with the newer version of R. And if it doesn't work right, it works terribly (and will continue to do so unless you know exactly how to fix it). Personally, I'd recommend using R script files and executing them. What you should do is start your R script

Understanding COMPATIBILITY_LEVEL in SQL Server

两盒软妹~` 提交于 2019-11-26 23:28:20
问题 I understood that setting a database to a COMPATIBILITY_LEVEL prior to your native one prevented features from being used. However this doesn't seem to be the case. Witness the following SQL script: CREATE DATABASE Foo GO USE Foo GO ALTER DATABASE Foo SET COMPATIBILITY_LEVEL = 80 GO CREATE TABLE Bar ( Id UNIQUEIDENTIFIER NOT NULL, TestNvcMax NVARCHAR (MAX) NOT NULL, -- Arrived in SQL 2005 TestDateTime2 DATETIME2 (7) NOT NULL -- Arrived in SQL 2008 ) GO But this table creates perfectly - any

Firefox does not show tooltips on disabled input fields

痴心易碎 提交于 2019-11-26 23:27:44
问题 Firefox doesn't display tooltips on disabled fields. The following displays tooltip in IE/Chrome/Safari except Firefox: <input type="text" disabled="disabled" title="tooltip text."/> Why doesn't Firefox display tooltip on disabled fields? Is there a work around this? 回答1: Seems to be a (very old, and very abandoned) bug. See Mozilla Bugs #274626 #436770 I guess this could also be explained as intended behaviour. One horrible Workaround that comes to mind is to overlap the button with an