deprecation

fopen deprecated warning

On Visual Studio 2005 C++ compiler, I get the following warning when my code uses the fopen and such calls. 1>foo.cpp(5) : warning C4996: 'fopen' was declared deprecated 1> c:\program files\microsoft visual studio 8\vc\include\stdio.h(234) : see declaration of 'fopen' 1> Message: 'This function or variable may be unsafe. C...

Upgrading from .NET 1.1 to .NET 2.0, what to expect?

I'm working on a big .NET 1.1 project, and there exists a wish to upgrade this, majorily to be able to use better tools like Visual Studio 2008, but also because of the new features and smaller amount of bugs in the .NET 2.0 framework. The project consist for the bigger part of VB.NET, but there are also parts in C#. It is a Windows For...

How to deprecate a function in PHP?

At the team with which I work, we have an old codebase using PHP's ibase_* functions all over the code to communicate with database. We created a wrapper to it that would do something else beside just calling the original function and I did a mass search-replace in the entire code to make sure that wrapper is used instead. Now, how do w...

What Linux/Unix commands are outdated and have powerful alternatives?

Today I discovered you can make less act like tail -f. less filename, then press Shift-F to start follow mode. Just like tail, but you have all the added features of less - like scrolling, searching, and the highlighting of search hits. I've been watching log files with tail for years. This just made me ponder: are there other comm...

java.net.URLEncoder.encode(String) is deprecated, what should I use instead?

I get the following warning when using java.net.URLEncoder.encode: warning: [deprecation] encode(java.lang.String) in java.net.URLEncoder has been deprecated What should I be using instead? ...

Best practice to mark deprecated code in Ruby?

I'd like to mark a method as deprecated, so the people using it can easily check their code and catch up. In Java you set @Deprecated and everybody knows what this means. So is there a preferred way (or even tools) to mark and check for deprecations in Ruby? ...

How to mark a class Deprecated?

How to mark a class deprecated? I do not want to use a class anymore in my project, but do not want to delete it beforea period of 2 weeks. ...

Does the ASP.NET MVC AjaxHelper deal with degradation?

Hi, Does anyone know if the AjaxHelper in the ASP.NET MVC framework deals with degradation? For example, if you have an ActionLink that updates the content of a div, if JavaScript unavailable, will the page do a full postback by renderubg the page (via an action on a controller) and call the action specified in the ActionLink? If not,...

How to deal with sstream vs. strstream inconsistency from old compilers

I'm temporarily using gcc 2.95.2, and instead of having a sstream header, it defines a (slightly different, and deprecated) strstream. I'm currently getting around this with #if __GNUC__ < 3 // or whatever version number it changes #include <strstream> #else #include <sstream> #endif and then things like: #if __GNUC__ < 3 s...

Rails 1.2 "service is deprecated"

My app is on rails 1.2.6 and I wish to upgrade it to 2.2 I see this warning in the logs: DEPRECATION WARNING: service is deprecated and will be removed from Rails 2.0 See http://www.rubyonrails.org/deprecation for details. (called from .... application.rb:14) The line is question is service :notification Can somebody tell me what ser...

Delphi 5: Ideas for simulating "Obsolete" or "Deprecated" methods?

i want to mark a method as obsolete, but Delphi 5 doesn't have such a feature. For the sake of an example, here is a made-up method with it's deprecated and new preferred form: procedure TStormPeaksQuest.BlowHodirsHorn; overload; //obsolete procedure TStormPeaksQuest.BlowHodirsHorn(UseProtection: Boolean); overload; Note: For this hy...

Why was "new Date(int year, int month, int day)" deprecated?

My application I've recently inherited is FULL of deprecation warnings about the constructor: Date d = new Date(int year, int month, int day) Does anyone know or can point to a reason why something as simple as this was "replaced" with something like this: Date d = new Date(); Calendar cal = GregorianCalendar.getInstance(); cal.set(1...

BlackBerry - ListFieldCallback deprecated

I am using 4.3.0 of the Blackberry JDE. I have created a ListField object and populated it by overriding ListFieldCallback. It works but I am getting a compile warning that ListFieldCallback is deprecated. What should I be using instead? ...

Team Foundation Server file deprecating...

Our environment uses the ODP.Net oracle database driver. So logically we are using Oracle on the backend. We have files that include scripts of our stored procedures in TFS. My oracle developer would like to deprecate a file to keep other oracle developers from using it in the future but also of course he would like to keep it in sourc...

In VB.NET, can I mark a function as deprecated?

Hi, Is there an ability in VB.NET to deprecate code? I know that in C# there are 'attributes', and tags in java; is there anything similar in VB.NET, other than leaving a 'todo:...? ...

How to get rid of g++ hash_map deprecation warning?

When I compile a c++ application I'm writing that makes use of hash_map, I get this warning on g++ 4.3.2: You are using the deprecated header . To eliminate this warning, use an ANSI-standard header file or use hte -Wno-deprecated compiler flag. 9> #include <ext/hash_map> What include replaces this? I've searched for a while on goog...

PHP: Recommended replacement for deprecated call_user_method?

Since PHP's call_user_method and call_user_method_array are marked deprecated I'm wondering what alternative is recommended? One way would be to use call_user_func, because by giving an array with an object and a method name as the first argument does the same like the deprecated functions. Since this function is not marked deprecated I...

Why can't I use strerror?

I'm porting some code to Windows, and the Microsoft compiler (Visual C++ 8) is telling me that strerror() is unsafe. Putting aside the annoyance factor in all the safe string stuff from Microsoft, I can actually see that some of the deprecated functions are dangerous. But I can't understand what could be wrong with strerror(). It takes ...

Why can't I use fopen?

In the mold of a previous question I asked about the so-called safe library deprecations, I find myself similarly bemused as to why fopen() should be deprecated. The function takes two C strings, and returns a FILE* ptr, or NULL on failure. Where are the thread-safety problems / string overrun problems? Or is it something else? Thanks ...

Should I freak out about Rails deprecation warnings?

When dealing with any framework with which you are not 100% familiar, I've found it advisable to attempt to understand and clean up any extraneous warnings, if only so that you have a better chance of noticing real errors when they occur. The one I've been getting lately has been: DEPRECATION WARNING: @model will not longer be implici...