deprecated

android webview setDatabasePath deprecated

三世轮回 提交于 2019-12-18 04:52:44
问题 This method was deprecated in API level 19 Database paths are managed by the implementation and calling this method will have no effect. I use setDatabasePath to set the database path of the webview. String databasePath = this.getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath(); settings.setDatabasePath(databasePath); Does this mean in API 19 it cant find my database anymore?? How to solve this? ( What do they mean with: Database paths are managed by the implementation

Deprecated: Function eregi_replace() [duplicate]

ε祈祈猫儿з 提交于 2019-12-17 21:35:12
问题 This question already has answers here : How can I convert ereg expressions to preg in PHP? (4 answers) Closed 7 months ago . I am getting the following error when running on PHP 5.3.8 Deprecated: Function eregi_replace() is deprecated in /home/XXXXXX/public_html/admin/modifypoll.php on line 49 This is the line of code, can anyone help please $question = eregi_replace('</?[a-z][a-z0-9]*[^<>]*>', '', $question ); I am not sure what to change it to. Can anyone help please 回答1: the entire ereg

Recommended replacement for deprecated call_user_method?

亡梦爱人 提交于 2019-12-17 19:08:07
问题 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 assume the reason isn't the non-OOP-stylish usage of them? The other way I can think of is using the Reflection API, which might be the most comfortable

Why are classes inside Scala package objects dispreferred?

与世无争的帅哥 提交于 2019-12-17 17:41:48
问题 Starting with 2.10, -Xlint complains about classes defined inside of package objects. But why? Defining a class inside a package object should be exactly equivalent to defining the classes inside of a separate package with the same name, except a lot more convenient. In my opinion, one of the serious design flaws in Scala is the inability to put anything other than a class-like entity (e.g. variable declarations, function definitions) at top level of a file. Instead, you're forced to put them

Make the java compiler warn when an annotated method is used (like @deprecated)

寵の児 提交于 2019-12-17 16:11:08
问题 Let's say I define a custom annotation called @Unsafe . I'd like to provide an annotation processor which will detect references to methods annotated with @Unsafe and print a warning. For example, given this code ... public class Foo { @Unsafe public void doSomething() { ... } } public class Bar { public static void main(String[] args) { new Foo().doSomething(); } } ... I want the compiler to print something like: WARN > Bar.java, line 3 : Call to Unsafe API - Foo.doSomething() It is very

thumbnailImageAtTime: now deprecated - What's the alternative?

十年热恋 提交于 2019-12-17 15:34:46
问题 Until iOS7 update I was using... UIImage *image = [moviePlayer thumbnailImageAtTime:1.0 timeOption:MPMovieTimeOptionNearestKeyFrame]; ...with great success, so that my app could show a still of the video that the user had just taken. I understand this method, as of iOS7 has now deprecated and I need an alternative. I see there's a method of - (void)requestThumbnailImagesAtTimes:(NSArray *)playbackTimes timeOption:(MPMovieTimeOption)option though how do I return the image from it so I can

A Lot of Functions are deprecated - iOs 6

让人想犯罪 __ 提交于 2019-12-17 15:32:59
问题 I have a few functions that are deprecated since iOs 6. Maybe this'll be helpful for others who also just updated to iOs 6. [self presentModalViewController:pNewController animated:YES]; presentModalViewController:animated is deprecated since iOs 6 Autosynthesized property 'String' will use synthesized instance variable '_String', not existing instance variable 'String' Autosynthesized property 'phonenumber' will use synthesized instance variable '_phonenumber', not existing instance variable

Non Deprecated findPreference() Method? - Android

陌路散爱 提交于 2019-12-17 10:38:23
问题 I want to detect when a Preference contained in a ListView gets clicked, so that I can launch an intent to manage that selection. I would have done like this in my layout XML file: <Preference android:title="About" android:key="myKey"></Preference> And the following in my java code: Preference myPref = (Preference) findPreference("myKey"); myPref.setOnPreferenceClickListener(new OnPreferenceClickListener() { public boolean onPreferenceClick(Preference preference) { //open browser or intent

Gem.source_index is deprecated, use Specification. Should I re-install Gem or Rails?

狂风中的少年 提交于 2019-12-17 10:26:54
问题 I'm learning RoR on Ubuntu 11. Got the following message when I was trying to generate an app. Did I install something incorrectly? $ rails generate controller Pages home contact NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01. Gem.source_index called from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.12/lib/bundler/shared_helpers.rb:3. NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01. Gem.source

How can I fix the “UIPopoverController is deprecated” warning?

泪湿孤枕 提交于 2019-12-17 10:24:56
问题 I am using this code: mediaLibraryPopover = [[UIPopoverController alloc] initWithContentViewController:avc]; [self.mediaLibraryPopover presentPopoverFromRect:[theButton bounds] inView:theButton permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; And I am getting this warning in Xcode 7: UIPopoverController is deprecated, first deprecated in iOS 9.0 - UIPopoverController is deprecated. Popovers are now implemented as UIViewController presentations. Use a modal presentation style