obsolete

Ignore obsolete field when deserializing

耗尽温柔 提交于 2019-12-12 14:34:09
问题 I have been searching all day for a way to achieve this without result... I am trying to deserialize an object. When I serialized it, I had a bool called (let's say) obsoleteBool. In the new version of the class I removed this bool, and I now have an error when deserializing (Field "obsoleteBool" not found). It is very easy to add new fields between an old and a new version of a class. Even without using the [OptionalField] attribute... but how can I manage the removal of a field between an

Vector is an obsolete Collection

泪湿孤枕 提交于 2019-12-12 12:25:02
问题 The Inspection reports any uses of java.util.Vector or java.util.hashtable. While still supported, these classes were made obsolete by the JDK 1.2 Collection classes and should probably not be used in new Development.... I have a project in Java which uses vector Everywhere, and I'm using JDK 8 which is the latest one. I want to know if I can run that application on latest java. And tell if i can use some other keyword for ArrayList like Vector for new java. 回答1: First of all, although Vector

Why does silverstripe set my page tables as obsolete one

依然范特西╮ 提交于 2019-12-11 19:52:02
问题 Hello , I have a big problem with silverstripe. Everything was okay until i flushed my site and suddenly i got some errors with this on the dev/build : Table Page: renamed to _obsolete_Page Table Page_versions: renamed to _obsolete_Page_versions Table Page_Live: renamed to _obsolete_Page_Live So silverstripe set all my page tables as obsolete ones and my site does not work anymore! Does anybody already had this issue? I tried to find some explanations in the code but did not find anything...

How can you mark code as “not for future use”

落花浮王杯 提交于 2019-12-10 02:22:43
问题 I often end up in a situation where I want to discourage other developers from continuing to use a method or class. For example, let's say I have two library methods "A" and "B" where "A" is the "old" way of doing some task and "B" is the "new" way of doing that task. In many cases, A and B are sufficiently different to make refactoring code using A to start using B non-trivial (e. g. requires flowing through of additional state). Since A works in the cases where it's used, I don't want to

Why are drand48() and friends obsolete?

走远了吗. 提交于 2019-12-09 02:59:20
问题 After all, they seem superior to the standard libc rand(). Have I missed something? (I have spent some time searching for this online, and the only other instance of this question I could find was in the context of distribution bias and left unanswered.) The manual pages for rand() and drand48() also seem at odds. The first recommends the second, and the second states that it is obsolete and the first should be used. (Though, to be fair, a lot of people who understand the math behind PRNGs

Does ASP.NET Core still use OWIN?

≡放荡痞女 提交于 2019-12-08 23:27:44
问题 I noticed when using C# to build an older MVC project, that there is a lot of references to an OWIN library. But when creating a .NET Core web application in VS2015 SP3, seems there's no reference to it. Is this library obsoleted? 回答1: OWIN is not a library, it's a specification. From the docs, OWIN defines a standard interface between .NET web servers and web applications. The "big idea" of OWIN is that you can decouple applications from the servers they run on, if everyone can agree on a

Using .htaccess to redirect obsolete browsers

*爱你&永不变心* 提交于 2019-12-08 13:09:23
问题 Im trying to redirect few browsers using htaccess to a page that would suggest to update their browser and I cant figure it out with the .htaccess file: Currently I am using: RewriteCond %{HTTP_USER_AGENT} "MSIE 6" RewriteCond %{REQUEST_URI} !^/ie/ but that transfers only internet explorer 6. How can I add more browsers and where can I find their user_agent names? I found this article online: http://evansims.com/6032/using-htaccess-to-redirect-obsolete-browsers/ which suggests this:

IOS6 Deprecated Methods in Monotouch

一笑奈何 提交于 2019-12-08 06:49:44
问题 Our app is targeting ios5.1 right now. And after installing MT 6.0.2 the deprecated warnings filled the build logs. Should the deprecated methods be still kept in the source or should they be replaced? For instance, should I replace the following with: public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation) { switch(toInterfaceOrientation) { case UIInterfaceOrientation.LandscapeLeft: case UIInterfaceOrientation.LandscapeRight: return true;

The meaning of obsolete

只谈情不闲聊 提交于 2019-12-07 10:10:26
问题 I've taken over a project with a lot of legacy code, both C++ and C#, currently compiling under VS 2010 (on windows 7). When I built my solution, amazingly, 143 projects built successfully. However, there were a boat load of warnings. A surprising number of them were warning about obsolete functions. warning CS0618: 'System.Runtime.InteropServices.UCOMIMoniker' is obsolete warning CS0618: 'System.Runtime.InteropServices.UCOMIEnumMoniker' is obsolete warning CS0618: 'System.Runtime

How can I replace Marshal.SizeOf(Object) with Marshal.SizeOf<T>()?

泄露秘密 提交于 2019-12-07 04:40:50
问题 I am building a Universal class library from existing code, and I get some compiler warnings that I for the life of it cannot figure out what to do with. I have code like this: void SomeMethod(Object data) { var size = Marshal.SizeOf(data); ... } The code builds, but in the Universal project (and, I guess, .NET 4.5.1 and higher projects) I get the following compiler warning: warning CS0618: 'System.Runtime.InteropServices.Marshal.SizeOf(object)' is obsolete: 'SizeOf(Object) may be unavailable