deprecated

Can I bring back old __tostring() behaviour in PHP 5.3?

纵然是瞬间 提交于 2019-12-24 01:40:23
问题 I've got to move a web site (custom-written (not by me), so just updating a CMS is not an option) to a PHP 5.3 server. The code complains:: Fatal error: Method cDate::__tostring() cannot take arguments in ...\lib.datetime.php on line 183 I've googled to find out that the problem is because "with PHP 5.3 the magic method __tostring() no more accepts any parameter", "... implements its __tostring() by accepting parameter ... which is now deprecated in favor of the new __tostring() for PHP 5.3".

Why is event handling in native Visual C++ deprecated?

强颜欢笑 提交于 2019-12-24 01:09:42
问题 http://msdn.microsoft.com/en-us/library/ee2k0a7d.aspx Event handling is also supported for native C++ classes (C++ classes that do not implement COM objects), however, that support is deprecated and will be removed in a future release . Anyone knows why? Couldn't find any explanation for this statement. 回答1: It's totally non-standard kludge that probably has very little actual users. And I mean non-stndard kludge even in WinNT and Microsoft-private world. COM has much richer repertoire for

Java Date object constructor for getting string is deprecated

穿精又带淫゛_ 提交于 2019-12-24 00:57:38
问题 I have problem using Date in java, I have a string that represent a date for example String date = "23/10/2012"; and i have a function that get a date as parameter, for example public void foo(Date date){...} my problem is that Date constructor that accept a string is deprecated and i do not want to use a deprecated object. 回答1: So, you look at the Javadoc for the deprecated method which specifies: Deprecated. As of JDK version 1.1, replaced by DateFormat.parse(String s). You then look up

cakephp 1.1 with php 5.3

流过昼夜 提交于 2019-12-24 00:19:22
问题 I have just upgraded from php 5.1 to 5.3 and had previously been using cakephp 1.1 on my server. Since the upgrade (or possibly earlier, I can't be sure), I'm getting the following errors. Can anyone shed some light: Deprecated: Assigning the return value of new by reference is deprecated in /home/vhosts/bbblh.co.uk/httpdocs/cake/dispatcher.php on line 157 Deprecated: Assigning the return value of new by reference is deprecated in /home/vhosts/bbblh.co.uk/httpdocs/cake/dispatcher.php on line

Align Attribute Deprecated

空扰寡人 提交于 2019-12-23 20:58:43
问题 I found out a while back that the center tag was deprecated. Understandable because HTML is meant for structuring content and not so much for formatting. But why is the align attribute deprecated too? Attributes can be used for formatting. I understand that CSS can be used, but not everyone knows CSS. And to make it worse, text-align:center; and margin-left: auto; margin-right: auto; doesn't always center objects, but using pretty much always works. Here's the Post from the W3C on this: http:

How can I set up Lazy Loading with ZF3 (no ServiceLocator pattern from anywhere)

 ̄綄美尐妖づ 提交于 2019-12-23 12:59:54
问题 I am writing a new ZF2 app. I have noticed that ServiceLocator usage pattern of calling services "from anywhere" has been deprecated from ZF3. I want to write code in mind for ZF3. I was able to set up my Controller to call all dependencies at constructor time. But that means loading i.e. Doctrine object upfront before I need it. Question How do I set it up so that it is only loaded when I need it immediately? (lazy-loaded). I understand that ZF3 moves loading to Controller construction,

use deprecated methods in iOS 5

左心房为你撑大大i 提交于 2019-12-23 12:53:56
问题 I recently upgraded my application from iOS3 to iOS5. And at compile time I have several warnings for using deprecated methods. Two questions: 1- Will I have problems when run the application in an iPhone with iOS 5? 2- If I did not update the methods, Will Apple accept the application when uploading it to the AppStore? 回答1: You will probably not have a problem on iOS 5 devices using methods that the compiler is telling you are deprecated. Of course, it would be a good thing to clear up this

String formatting expressions (Python)

谁说胖子不能爱 提交于 2019-12-23 10:43:09
问题 String formatting expressions: 'This is %d %s example!' % (1, 'nice') String formatting method calls: 'This is {0} {1} example!'.format(1, 'nice') I personally prefer the method calls (second example) for readability but since it is new, there is some chance that one or the other of these may become deprecated over time. Which do you think is less likely to be deprecated? 回答1: The original idea was to gradually switch to str.format() approach while allowing both ways: PEP 3101: The new system

Status of Attributes: Deprecated or Obsolete?

最后都变了- 提交于 2019-12-23 09:37:21
问题 I am new to HTML 5 and I have problems to find out in the diverse W3 HTML standardization documents to obtain the status of an attribute. For example, the bgcolor attribute of the <body> element should not be used any longer since HTML 4.01. It was deprecated. (see: http://www.w3.org/TR/html4/present/graphics.html#h-15.1.1). However what is it's status in HTML 5? In the HTML markup specification that attribute is marked as obsolete (see: http://www.w3.org/TR/html-markup/body.html). Does this

Converting an ereg_replace to preg_replace

这一生的挚爱 提交于 2019-12-23 09:24:04
问题 I have to convert an ereg_replace to preg_replace The ereg_replace code is: ereg_replace( '\$([0-9])', '$\1', $value ); As preg is denoted by a start and end backslash I assume the conversion is: preg_replace( '\\$([0-9])\', '$\1', $value ); As I don't have a good knowledge of regex I'm not sure if the above is the correct method to use? 回答1: One of the differences between ereg_replace() and preg_replace() is that the pattern must be enclosed by delimiters: delimiter + pattern + delimiter .