Replacement for deprecated sizeWithFont: in iOS 7?

Use sizeWithAttributes: instead, which now takes an NSDictionary. Pass in the pair with key UITextAttributeFont and your font object like this: CGRect rawRect = {}; rawRect.size = [string sizeWithAttributes: @{ NSFontAttributeName: [UIFont systemFontOfSize:17.0f], }]; // Values are fractional — you should take the ceil to get equivalent values CGSize adjustedSize = CGRectIntegral(rawRect).size;

What are the alternatives now that the Google web search API has been deprecated? [closed]

Yes, Google Custom Search has now replaced the old Search API, but you can still use Google Custom Search to search the entire web, although the steps are not obvious from the Custom Search setup. To create a Google Custom Search engine that searches the entire web: From the Google Custom Search homepage ( http://www.google.com/cse/ … Read more

Html.fromHtml deprecated in Android N

update: as @Andy mentioned below Google has created HtmlCompat which can be used instead of the method below. Add this dependency implementation ‘androidx.core:core:1.0.1 to the build.gradle file of your app. Make sure you use the latest version of androidx.core:core. This allows you to use: HtmlCompat.fromHtml(html, HtmlCompat.FROM_HTML_MODE_LEGACY); You can read more about the different flags on … Read more

Rails I18n validation deprecation warning

Important: Make sure your app is not using I18n 0.6.8, it has a bug that prevents the configuration to be set correctly. Short answer In order to silence the warning edit the application.rb file and include the following line inside the Rails::Application body config.i18n.enforce_available_locales = true The possible values are: false: if you want to … Read more

Why is Java Vector (and Stack) class considered obsolete or deprecated?

Vector synchronizes on each individual operation. That’s almost never what you want to do. Generally you want to synchronize a whole sequence of operations. Synchronizing individual operations is both less safe (if you iterate over a Vector, for instance, you still need to take out a lock to avoid anyone else changing the collection at … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)