backwards-compatibility

Best practices for versioning your services with WCF?

拈花ヽ惹草 提交于 2019-11-27 00:22:41
问题 I'm starting to work with my model almost exclusively in WCF and wanted to get some practical approaches to versioning these services over time. Can anyone point me in the right direction? 回答1: There is a good writeup on Craig McMurtry's WebLog. Its from 2006, but most of it is still relevant. As well as a decision tree to walk through the choices, he shows how to implement those changes using Windows Communication Foundation 回答2: See "Versioning WCF Services: Part I" and "Versioning WCF

Supporting Ruby 1.9's hash syntax in Ruby 1.8

妖精的绣舞 提交于 2019-11-26 23:10:50
问题 I'm writing a Ruby gem using the {key: 'value'} syntax for hashes throughout my code. My tests all pass in 1.9.x, but I (understandably) get syntax error, unexpected ':', expecting ')' in 1.8.7. Is there a best practice for supporting the 1.8.x? Do I need to rewrite the code using our old friend => , or is there a better strategy? 回答1: I think you're out of luck, if you want to support 1.8 then you have to use => . As usual, I will mention that you must use => in certain cases in 1.9: If the

Material Design, AppCompat, and Backwards Compatibility

本小妞迷上赌 提交于 2019-11-26 23:07:26
I'm trying to understand the principles of using Material Design a bit better (I'm new to this area and have been reading documentations and tutorials, but the subject is still a bit vague to me), and I'll be glad for some help. What I've tried so far is having 2 folders (values and values-21) with a styles.xml file per each of them - values/styles.xml: <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"></style> values-v21/styles.xml: <style name="AppTheme" parent="android:Theme.Material.NoActionBar"></style> The problem begins where I try to use activities that inherit from

Alternatives to weak linking in iPhone SDK?

妖精的绣舞 提交于 2019-11-26 22:51:45
问题 I'm looking to make my app compatible with older versions of iPhone OS. I did see weak linking mentioned as an option. Can I use OS version detection code to avoid code blocks that the OS can't handle? (Say iAD?) if(OS >= 4.0){ //set up iADs using "NDA code"... } If yes, what goes in place of if(OS >= 4.0) ? 回答1: You should be weak linking against the new frameworks. Alongside that you should be checking the availability of new APIs using methods like NSClassFromString , respondsToSelector ,

std::vector, default construction, C++11 and breaking changes

落爺英雄遲暮 提交于 2019-11-26 22:09:51
I ran today against a quite subtle issue I'd like to have your opinion on. Consider the following garden-variety shared-body-idiom class: struct S { S() : p_impl(new impl) {} private: struct impl; boost::shared_ptr<impl> p_impl; }; The fun appears when you try to put those into vectors in the following way: std::vector<S> v(42); Now, with MSVC 8 at least, all the elements in v share the same impl member. Actually, what causes this is the vector constructor: template <typename T, typename A = ...> class vector { vector(size_t n, const T& x = T(), const A& a = A()); ... }; Under the scenes, only

Git repository backwards compatibility

為{幸葍}努か 提交于 2019-11-26 21:13:51
问题 I just had a quick question about git - how backwards compatible are git repositories? Eg., I've created a repository using git 1.6.4 and the svn2git ruby script, but I want to put it on a machine that's running Debian Lenny, which has git 1.5.6.5. Would I still be able to interact with the repository properly? 回答1: It's extremely backward compatible in terms of the actual storage of information, which is all you're worried about in this case. I'm not a total expert, but I doubt that's

Backwards and cross-browser compatible audio playing

老子叫甜甜 提交于 2019-11-26 21:01:42
问题 I need to playback audio files in many different web browsers and different versions. The old system produces 4-bit WAV files, which many browsers can't handle. All files contain synthesized or recorded human voices. Anyway I'm gonna need to replace it. So my questions are: 1) what is the best file format to use for audio files, with regards to compatibility, size and quality? 2) what is the best way to use HTML5 and staying backwards-compatible? We need to support Internet Explorer versions

Is Visual Studio 2017 backwards compatible with Visual Studio 2015 solutions?

核能气质少年 提交于 2019-11-26 20:18:42
问题 I'm thinking about installing VS 2017 and using it for work. The free download is here. So is Visual Studio 2017 RC backwards compatible with Visual Studio 2015 solutions? The release notes mention it here. Just wondering if someone did this and if they had any issues. EDIT (UPDATE) I have been working with 2017RC now since 2/1/2017 and I verified it does not change the proj or sln files at all, not even when you add / remove files to the proj / sln (except to reflect the file changes of

How to handle lack of JavaScript Object.bind() method in IE 8

99封情书 提交于 2019-11-26 19:01:03
I am writing a bit of JavaScript that uses the Object.bind method. funcabc = function(x, y, z){ this.myx = x; this.playUB = function(w) { if ( this.myx === null ) { // do blah blah return; } // do other stuff }; this.play = this.playUB.bind(this); }; Since I develop in WinXP with Firefox and sometimes test in Win7 with IE 9 or 10, I did not notice or pay attention to the fact that IE8 and below do not support bind . This particular script does not use the canvas, so I'm a little hesitant to write off all IE 8 users. Is there a standard work-around? I'm getting around sort of okay in JavaScript

Method NdefRecord.createTextRecord(“en” , “string”) not working below API level 21

故事扮演 提交于 2019-11-26 18:36:00
问题 This code works fine when I use it on a device with Android Lollipop (5.x) or Marshmallow (6.0): @TargetApi(Build.VERSION_CODES.LOLLIPOP) public NdefMessage createNdfMessage(String content) { NdefRecord record = NdefRecord.createTextRecord("en", content); NdefMessage msg = new NdefMessage(new NdefRecord[]{record}); return msg; } But when I try this on a device with Android 4.2.2 (API level 17) my app crashes. How can I use this code to create a Text record on API levels below 21 (that's the