compatibility

FragmentActivity causing ClassNotFoundException

大憨熊 提交于 2019-11-26 19:58:08
问题 I just used Android SDK Manager to update Android SDK Tools to revision 17, and Android Compatiblity to revision 7. Now, the program I've been running for ages crashes on startup. Narrowing down the issue, I have created a new blank project, added android-support-v4.jar to the build path, and changed Activity to FragmentActivity and that's all. Now it crashes. The error message is: java.lang.ClassNotFoundException: com.example.test.TestActivity in loader dalvik.system.PathClassLoader[/data

Is it possible to run a .NET 4.5 app on XP?

守給你的承諾、 提交于 2019-11-26 19:39:41
First, I have read the following: Connect case VS case and especially this channel9 post So, from the last bullet, I really think there is no way around this, but I had to see if I could get a definitive answer as my team would like to upgrade from .NET 4.0 to .NET 4.5. However, we have to support XP. Is there no possibility of going to .NET 4.5 if we want to support XP? The only thing I could think of is creating two separate solutions, but then the codebases would have to diverge if we used .NET 4.5 features. So, I am looking for some amazing workaround that I could not find and others maybe

Is cross-origin postMessage broken in IE10?

≯℡__Kan透↙ 提交于 2019-11-26 19:33:26
I'm trying to make a trivial postMessage example work... in IE10 between windows/tabs (vs. iframes) across origins Remove any one of these conditions, and things work fine :-) But as far as I can tell, between-window postMessage only appears to work in IE10 when both windows share an origin. (Well, in fact -- and weirdly -- the behavior is slightly more permissive than that: two different origins that share a host seem to work, too). Is this a documented bug? Any workarounds or other advice? (Note: This question touches on the issues, but its answer is about IE8 and IE9 -- not 10) More details

Writing backwards compatible Android code

心已入冬 提交于 2019-11-26 19:05:32
问题 I'm writing an app that uses some functions and classes only available in the latest API level - 16, but I want it to run with no errors on devices with API level 15. Let's use a couple of examples. A new class: Android.widget.Advanceable , and a new/renamed method: View.setBackground() : I can do something like this: Advanceable myAdvanceable = ...; if (android.os.Build.VERSION.SDK_INT >= 16) { myView.setBackground(...); myAdvanceable.advance(); } else { myView.setBackgroundDrawable(...); //

Differentiate IE7 browser and browser in IE7 compatibility mode

主宰稳场 提交于 2019-11-26 18:59:10
Can I differentiate if client's browser is IE7 or e.g. IE9 in IE7 compatibility mode? I'm trying to figure out if I can do a JS check on my site which would recognize two different things and do different stuff depending on the result that browser is IE7 that browser is in IE7 compatibility mode I have the first condition working correctly as it's pretty much said everywhere how to do it. Not sure about the second one and/or combination of both. tuomassalo For at least IE8 and IE9, you can check whether navigator.userAgent has the substring Trident in it. An IE8+ always has a Trident in its

How to make gradle generate a valid pom.xml file at the root of a project for maven users?

♀尐吖头ヾ 提交于 2019-11-26 18:05:23
问题 While only for two days now, I am definitely sold on using gradle for all of my Java projects, and drop pom.xml from the root of all my projects. However, I would like to remain maven-compatible, in the sense that I would like for a gradle task to be able to generate a suitable pom.xml at the root of the project should the user want it. At this moment, the only reference to a pom.xml I have is in this section of the build.gradle file (this is, with very few modifications, what is found here):

Are windows phone 7 apps compatible on windows phone 8 devices?

跟風遠走 提交于 2019-11-26 16:59:25
问题 very straight forward question. My company has developed a windows phone 7 app and have been testing it on a windows phone 7 device. Can we safely assume that the same app will be backwards compatible and work seamlessly on a windows phone 8 device such as a Nokia Lumia 920? Thanks in advance! 回答1: Yes it will work. But it won't take advantage of all the WP8 features like a real WP8 app would. I'd suggest that you create a copy of the project and update it to WP8 for a better performence.

OnGlobalLayoutListener: deprecation and compatibility

最后都变了- 提交于 2019-11-26 16:24:35
I have to use an OnGlobalLayoutListener object and then to remove the listener, I had a problem with deprecated methods that I resolve with following code. protected void onCreate(Bundle savedInstanceState) { final LinearLayout llTotal = (LinearLayout) findViewById(R.id.mmc_ll); ViewTreeObserver vto = llTotal.getViewTreeObserver(); if(vto.isAlive()){ vto.addOnGlobalLayoutListener(new OnGlobalLayoutListener() { @Override public void onGlobalLayout() { // // mycode // if (Build.VERSION.SDK_INT<16) { removeLayoutListenerPre16(llTotal.getViewTreeObserver(),this); } else {

How to use libraries compiled with MingW in MSVC?

允我心安 提交于 2019-11-26 15:49:47
问题 I have compiled several libraries with MingW/MSYS... the generated static libraries are always .a files. When I try to link the library with a MSVC project, Visual Studio throws 'unresolved external symbols' ... It means that the .a static library is incompatible with MS C++ Linker. I presume it has to be converted to a MSVC compatible .lib file. Either .a and .lib are just AR archives of .o or .obj files, so is there any way how to use MingW compiled libs in a MSVC project? Or do I have to

socket.error: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions

限于喜欢 提交于 2019-11-26 15:24:04
I'm trying to create a custom TCP stack using Python 2.6.5 on Windows 7 to serve valid http page requests on port 80 locally. But, I've run into a snag with what seems like Windows 7 tightened up security. This code worked on Vista. Here's my sample code: import SocketServer import struct class MyTCPHandler(SocketServer.BaseRequestHandler): def handle(self): headerText = """HTTP/1.0 200 OK Date: Fri, 31 Dec 1999 23:59:59 GMT Content-Type: text/html Content-Length: 1354""" bodyText = "<html><body>some page</body></html>" self.request.send(headerText + "\n" + bodyText) if __name__ == "__main__":