deprecated

java uses or overrides a deprecated API error

依然范特西╮ 提交于 2020-03-21 19:52:05
问题 Hello so this is my code, somehow I still get error down there I described error, any help would be appreciated. I am not really expert with import of this and especially API itself import java.io.BufferedInputStream; import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; public class MyClass { public static void main(String[] args) throws IOException { File file = new File("Sinatra.txt"); FileInputStream fis = new FileInputStream(file

How to suppress the deprecation warning “dispatch_get_current_queue() is deprecated…in iOS 6.0”?

霸气de小男生 提交于 2020-02-26 08:14:10
问题 So the question is the subject question - I want to get rid of this warning which is pretty annoying. Is there a way to make it silent? Note: I use dispatch_get_current_queue() for debugging purposes only. 回答1: You could use the following code to suppress the warnings. #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" dispatch_get_current_queue() // your deprecated calling code #pragma clang diagnostic pop 来源: https://stackoverflow.com/questions

mcrypt 7.1 deprecated / 7.2+ removal

送分小仙女□ 提交于 2020-01-30 06:16:08
问题 I have been following information on SO about generating random strings using mcrypt_create_iv() and have some example code over at 3v4l.org. After reading the PHPWiki all mycrypt_* functions will show a depreceated warning but it does not specify what will be used in 7.2/8.0 that replaces these functions. Since it states it will be removed in 7.2/8.0, what will be used to replace IV's? I do not use this function in my software for encryption and decryption. I only use it for safe/retrievel

Deprecated: org.apache.http.conn.scheme.scheme is deprecated

空扰寡人 提交于 2020-01-25 06:17:19
问题 I have this Codesnippet: schemeRegistry.register(new Scheme("https", factory, 443)); It says that the constructor for Scheme is deprecated, but I honestly didn't really understand which new method to use instead. Can someone show me a brief example on how to use it properly? the complete Code in which it is used looks like this: org.apache.http.conn.ssl.SSLSocketFactory factory = new org.apache.http.conn.ssl.SSLSocketFactory(clientStore, p12Password, trustStore); SchemeRegistry schemeRegistry

startManagingCursor(cursor) deprecated method

断了今生、忘了曾经 提交于 2020-01-24 02:20:08
问题 I used this code: Cursor c = cr.query(message, null, null, null, null); startManagingCursor(c); But startManagingCursor(c) is a deprecated method. How can i replace it? 回答1: This method was deprecated in API level 11. Use the new CursorLoader class with LoaderManager instead; this is also available on older platforms through the Android compatibility package. Check out this tutorial series. 来源: https://stackoverflow.com/questions/27207989/startmanagingcursorcursor-deprecated-method

MySQL 8 Warning: SQL_NO_CACHE is deprecated

邮差的信 提交于 2020-01-16 14:04:07
问题 When issuing a statement to MySQL8 server: SELECT SQL_NO_CACHE * FROM <table-name>; I get this warning: Warning, 1681, 'SQL_NO_CACHE' is deprecated and will be removed in a future release. I would like to ask if there is any successor of the SQL_NO_CACHE that works or is planned to work with MySQL 8.x? Does SQL_NO_CACHE actually work with MySQL 8.x or it is omitted by the server? 来源: https://stackoverflow.com/questions/58584596/mysql-8-warning-sql-no-cache-is-deprecated

Replacing deprecated ereg_replace() with preg_replace() did not work

谁都会走 提交于 2020-01-16 04:05:06
问题 The following PHP program replaces the symbols !£$%^& with nulls <?php $string = "This is some text and numbers 12345 and symbols !£$%^&"; $new_string = ereg_replace("[^A-Za-z0-9 (),.]", "", $string); echo "Old string is: ".$string."<br />New string is: ".$new_string; ?> Output: Old string is: This is some text and numbers 12345 and symbols !£$%^& New string is: This is some text and numbers 12345 and symbols But, I have learned that the function ereg_replace() has been deprecated and that I

How to eliminate a python3 deprecation warning for the equality operator?

时光总嘲笑我的痴心妄想 提交于 2020-01-14 09:52:20
问题 Although the title can be interpreted as three questions, the actual problem is simple to describe. On a Linux system I have python 2.7.3 installed, and want to be warned about python 3 incompatibilities. Therefore, my code snippet ( tester.py ) looks like: #!/usr/bin/python -3 class MyClass(object): def __eq__(self, other): return False When I execute this code snippet (thought to be only to show the problem, not an actual piece of code I am using in my project) as ./tester.py I get the

The method managedQuery(Uri, String[], String, String[], String) from the type Activity is deprecated

感情迁移 提交于 2020-01-10 18:10:20
问题 When I compile the following code cursor = activity.managedQuery( imageUri, proj, null, null, null ); I get following warning The method managedQuery(Uri, String[], String, String[], String) from the type Activity is deprecated The code is working fine. What should I do to avoid this? 回答1: The managedQuery method is deprecated, meaning it should no longer be used and there is an updated method available. The replacement for this is getContentResolver().query() : cursor = activity

Are Java Properties effectively deprecated?

 ̄綄美尐妖づ 提交于 2020-01-10 02:27:09
问题 Java's Properties object hasn't changed much since pre-Java 5, and it hasn't got Generics support, or very useful helper methods (defined pattern to plug in classes to process properties or help to load all properties files in a directory, for example). Has development of Properties stopped? If so, what's the current best practice for this kind of properties saving/loading? Or have I completely missed something? 回答1: A lot of the concepts around Properties are definitely ancient and