deprecated

Java Deprecated APIs and SuppressWarnings “deprecation” - practical approach

℡╲_俬逩灬. 提交于 2019-12-18 16:52:21
问题 I have seen many examples of using the Deprecated annotation on APIs in order to mark them as 'need to be replaced soon'. However, in almost all of these cases the code developers not only kept using the deprecated APIs, but also suppressed the deprecation warning. It seems like the best intentions of the API developers end up creating more code which is irrelevant to the implemented business logic - if an API is deprecated but is continually used with the associated warnings being suppressed

Deprecated: Retrieve service locator in functional system - ZF2

大憨熊 提交于 2019-12-18 15:55:11
问题 I'm developing a ZF2 system and it was working very well, but after I clone the repository in other computer this deprecated error has appeared: You are retrieving the service locator from within the class Module\Controller\Controller. Please be aware that ServiceLocatorAwareInterface is deprecated and will be removed in version 3.0, along with the ServiceLocatorAwareInitializer. You will need to update your class to accept all dependencies at creation, either via constructor arguments or

Environment.getExternalStorageDirectory() deprecated in API level 29 java

假装没事ソ 提交于 2019-12-18 14:56:20
问题 Working on android Java, recently updated SDK to API level 29 now there is a warning shown which states that Environment.getExternalStorageDirectory() is deprecated in API level 29 My code is private void saveImage() { if (requestPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)) { final String folderPath = Environment.getExternalStorageDirectory() + "/PhotoEditors"; File folder = new File(folderPath); if (!folder.exists()) { File wallpaperDirectory = new File(folderPath);

Environment.getExternalStorageDirectory() deprecated in API level 29 java

谁都会走 提交于 2019-12-18 14:56:17
问题 Working on android Java, recently updated SDK to API level 29 now there is a warning shown which states that Environment.getExternalStorageDirectory() is deprecated in API level 29 My code is private void saveImage() { if (requestPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)) { final String folderPath = Environment.getExternalStorageDirectory() + "/PhotoEditors"; File folder = new File(folderPath); if (!folder.exists()) { File wallpaperDirectory = new File(folderPath);

React 16.7 - React.SFC is now deprecated

南笙酒味 提交于 2019-12-18 13:52:42
问题 I use to declare stateless components like this: const example: React.SFC<IExample> = ({propsType}) => (); However the SFC is now deprecated, maybe this twitter post from Dan Abramov explains why. What should we use now that SFC is deprecated? 回答1: You should use React.FunctionComponent : Rename React's SFC to 'FunctionalComponent This PR renames React.SFC and React.StatelessComponent to React.FunctionComponent , while introducing deprecated aliases for the old names. So your example would

Why is it keep showing deprecated error when running hadoop (or dfs command)

南笙酒味 提交于 2019-12-18 12:45:30
问题 I've installed hadoop-2.0.0-alpha , but whenever I execute a command, it gives me deprecation errors (although it seems like to be running without problem) $ hadoop/bin/hadoop dfs -copyFromLocal input input DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it. $ hadoop/bin/hadoop dfs -rmr input DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it. rmr: DEPRECATED: Please use 'rm -r'

PhpStorm find all deprecated usages in the project

戏子无情 提交于 2019-12-18 11:38:37
问题 I'm working now on a pretty big PHP-project and I want to upgrade Symfony framework to the next version. Before I do that, I want to be sure that there are no deprecated method usages left in the project. Is there handy way to find all deprecated method usages in PhpStorm? 回答1: Code | Run Inspection by Name... -- search for "deprecated" and choose correct one. This will work as long as new Symfony is already in the project (so that IDE knows what method/class/constant is now considered

How to mark a class as Deprecated? [duplicate]

徘徊边缘 提交于 2019-12-18 10:02:11
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: How do I mark a method as Obsolete/Deprecated? - C# How do you mark a class as deprecated? I do not want to use a class any more in my project, but do not want to delete it before a period of 2 weeks. 回答1: You need to use the attribute [Obsolete] . This is an example: [Obsolete("Not used any more", true)] public class MyDeprecatedClass { //... } You do not have use parameters, they are optional (overloaded

Synchronous XMLHttpRequest deprecated

故事扮演 提交于 2019-12-18 08:40:57
问题 Today, I had to restart my browser due to some issue with an extension. What I found when I restarted it, was that my browser (Chromium) automatically updated to a new version that doesn't allow synchronous AJAX-requests anymore. Quote: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/. I need synchronous AJAX-requests for my node.js applications to work though, as they

What is the replacement for a blinking text in a web page?

好久不见. 提交于 2019-12-18 05:58:22
问题 I have heard that using blinking text in a page to get user's attention is not a good practice. What is the alternative for that? 回答1: Text that doesn't blink is a good alternative. If you have to rely on blinking text or flashing images to get your users to look where you want, then your website probably has some serious design flaws. Here are some articles with some tips on good web design. 10 principles of effective web design 9 essential principles for good web design 回答2: <marquee