backwards-compatibility

Static analysis tool to detect ABI breaks in C++

南楼画角 提交于 2019-11-27 11:42:04
It's not very hard to break binary backwards-compatibility of a DSO/shared library with a C++ interface. That said, is there a static analysis tool, which can help detecting such ABI breaks, if it's given two different sets of header files: those of an earlier state of the DSO and those of the current state (and maybe DSOs as well)? Both free and commercial product suggestions are welcome. If it could also warn about bad practices, e.g. inline functions and defaulted function parameters in DSO interfaces, it would be great. Artyom I assume that you are familiar with this tutorial: Binary

GCC vs MS C++ compiler for maintaining API backwards binary compatibility

自作多情 提交于 2019-11-27 11:40:31
问题 I came from the Linux world and know a lot of articles about maintaining backwards binary compatibility (BC) of a dynamic library API written in C++ language. One of them is "Policies/Binary Compatibility Issues With C++" based on the Itanium C++ ABI, which is used by the GCC compiler. But I can't find anything similar for the Microsoft C++ compiler (from MSVC). I understand that most of the techniques are applicable to the MS C++ compiler and I would like to discover compiler-specific issues

PHP regex for validating a URL

∥☆過路亽.° 提交于 2019-11-27 09:33:27
I'm looking for a decent regex to match a URL (a full URL with scheme, domain, path etc.) I would normally use filter_var but I can't in this case as I have to support PHP<5.2! I've searched the web but can't find anything that I'm confident will be fool-proof, and all I can find on SO is people saying to use filter_var. Does anybody have a regex that they use for this? My code (just so you can see what I'm trying to achieve): function validate_url($url){ if (function_exists('filter_var')){ return filter_var($url, FILTER_VALIDATE_URL); } return preg_match(REGEX_HERE, $url); } You could try

How to create a SerializationBinder for the Binary Formatter that handles the moving of types from one assembly and namespace to another

你说的曾经没有我的故事 提交于 2019-11-27 09:29:09
The context is as follows I want to refactor code by moving it around to different projects Some of this code comprises of serializable DTOs that are used to send and receive data across multiple endpoints If I move the code around, serialization breaks (therefore it is not backward compatible with older versions of my application) A solution to this problem is the SerializationBinder which allows me to "redirect" in a sense from one type to another. I therefore want to create a SerializationBinder to meet this need. However it must do so by meeting the following requirements The inputs to the

Get back default properties after applying a global CSS reset

孤人 提交于 2019-11-27 07:54:13
问题 Some legacy code that I have to build upon, really makes me feel the cons of global CSS reset. I have the old foo.css that starts with * {margin:0; padding:0;} and I used to copy it to a different file bar.css , tweak it too my needs ( out with the CSS reset ), and use it to replace foo.css only in the code I'm writing. I do this not to worry about backwards compatibility with the older sections of the site. Now this is quite cumbersome: for global changes I have to remember to modify both

Can program developed with Java 8 be run on Java 7?

岁酱吖の 提交于 2019-11-27 07:03:46
I am a little confused. Oracle says Java 8 is highly compatible with Java 7 (backward). But, what possibilities exist that Java 8 program can be run on Java 7 successfully (SE/EE)? If point one was true, Java 8 applications will be deployed and executed on a Java 7 server support? for example, Tomcat 8 or WildFly? Karol S In general, no. The backwards compatibility means that you can run Java 7 program on Java 8 runtime, not the other way around. There are several reasons for that: Bytecode is versioned and JVM checks if it supports the version it finds in .class files. Some language

Migration Windows Store App based on 8.1. does it has backward compatibility with 8?

耗尽温柔 提交于 2019-11-27 07:01:50
问题 As you know Microsoft Build conference is running on this week. I hardly find whether 8.1 based store app has backward compatibility with 8 based app or not. If I upgrade my Store App ( what if I make update on preview period ) to 8.1 based template, does it run on Windows 8 without problem? Or, do I need to treat some special cases? I already know that Snapped ViewState was removed. If there's no problem, please link relative article on answer. I could not find it. 回答1: No, once you migrate

Str.format() for Python 2.6 gives error where 2.7 does not

笑着哭i 提交于 2019-11-27 06:38:34
问题 I have some code which works well in Python 2.7. Python 2.7.3 (default, Jan 2 2013, 13:56:14) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from sys import stdout >>> foo = 'Bar' >>> numb = 10 >>> stdout.write('{} {}\n'.format(numb, foo)) 10 Bar >>> But in 2.6 I get a ValueError exception. Python 2.6.8 (unknown, Jan 26 2013, 14:35:25) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from sys

How can I check since which Matlab version a function exists?

♀尐吖头ヾ 提交于 2019-11-27 06:14:05
问题 It was impossible in 2007, but is there now a way to check which Matlab versions a function exists for? For example, in Wolfram Mathematica, the documentation indicates in which version the function was released: e.g. the GapPenalty() documentation mentions " New in 7 ". 回答1: Have a look to the FEX function when. 回答2: I'd go to the release-notes page for some useful information. For example. http://www.mathworks.com/help/releases/R2013b/stats/release-notes.html Then do a search in web page.

VerifyError deploying on API 1.6

时间秒杀一切 提交于 2019-11-27 05:46:18
问题 I've come across a backwards compatibility issue when deploying my application on android 1.6. Im getting a VerifyError on this piece of code: if(android.os.Build.VERSION.SDK_INT >= 11) { getActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.actionbar_bg)); } This is not unexpected since getActionBar() doesn't exist pre API 11, however post-1.6 (API 5 and higher?) builds all semi-gracefully go around this according to the logcat message im getting when deploying for