草庐IT

deprecation

全部标签

objective-c - 使用 respondsToSelector 时抑制 "' …' is deprecated"

我通过在运行时选择最新的API来支持10.4+:if([fileManagerrespondsToSelector:@selector(removeItemAtPath:error:)])[fileManagerremoveItemAtPath:downloadDirerror:NULL];else[fileManagerremoveFileAtPath:downloadDirhandler:nil];在这种情况下,10.5及更高版本将使用removeItemAtPath:error:,而10.4将使用removeFileAtPath:handler:。很好,但我仍然收到旧方法的编译器

iphone - presentModalViewController :Animated is deprecated in ios6

我将以下代码用于图像选择器。但是当我在模拟器中运行它时,我遇到了内存泄漏,并且我收到了关于presentModalViewcontroller:animated在iOS6中被弃用的警告。我也弃用了dismissModalViewController:animated。我正在使用SDK6.1。ImagePicker代码:-(void)showAlbum:(id)sender{imagePicker=[[UIImagePickerControlleralloc]init];imagePicker.delegate=self;imagePicker.allowsEditing=NO;imag

安卓工作室 "Current NDK support is deprecated"

截至2015年1月,对AndroidStudio的NDK支持仍然无法使用。一条神秘的消息说:“将来会提供替代方案。”我想知道gradle/google在这方面的方向是什么,因为目前无法制定适当的开发计划。版本0.7+:他们建议仍然使用ndk-build/ant0.8+版:他们引入了最小的NDK支持1.0.0版:看起来NDK支持即将正式发布1.0.2版:现在看来NDK支持已被弃用。我的问题是:每个人都在恢复使用ndk-build和手工制作的android.mk文件吗?是否有人在大型项目中使用1.0.0+(支持gradlendk)当前已弃用的方法?“future将提供替代方案”将走向何方?

node.js - 通过将 useNewUrlParser 设置为 true 来避免 "current URL string parser is deprecated"警告

我有一个数据库包装类,它与某个MongoDB实例建立连接:asyncconnect(connectionString:string):Promise{this.client=awaitMongoClient.connect(connectionString)this.db=this.client.db()}这给了我一个警告:(node:4833)DeprecationWarning:currentURLstringparserisdeprecated,andwillberemovedinafutureversion.Tousethenewparser,passoption{useNew

DataMapper "DataObjects::URI.new with arguments is deprecated..."的 Ruby 问题

当我在datamapper1.1.0中初始化一个字符串时DataMapper.setup(:default,"sqlite://#{Dir.pwd}/base.db")我在数据映射器中收到以下错误:DataObjects::URI.newwithargumentsisdeprecated,useaHashofURIcomponents(C:/Ruby192/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.1.0/lib/dm-do-adapter/adapter.rb:231:in`new')这是为什么? 最佳答案

ruby-on-rails - ruby rails : How can I resolve the "Digest::Digest is deprecated; use Digest" warning when uploading to AWS-S3?

我正在尝试制作一个应用程序,用户可以在其中将音乐上传、下载和流式传输到AmazonWebServices、SimpleStorageServices(AWS-S3)。我试图解决的一个问题是,当我尝试上传MP3文件时,我在终端中收到一条警告,该警告在我被重定向并向用户发出消息“无法完成上传”。当我在上传方法中对我的AWS对象使用.store方法时,我收到“Digest::Digestisdeprecated;useDigest”警告。有没有其他人处理过这种情况并且可以帮助我?非常感谢,非常感谢。这是我的Controller:类SongsControllerBUCKET='batana_a

ruby - rhc 安装程序返回 "warning: constant::TimeoutError is deprecated"

环境Ubuntu16.04xenialLinux内核:4.4.0-22-genericruby--versionruby2.3.0p0(2015-12-25)[x86_64-linux-gnu]复制步骤sudoapt-getinstallruby-fullrhcsetup返回:/var/lib/gems/2.3.0/gems/commander-4.2.1/lib/commander/user_interaction.rb:328:warning:constant::TimeoutErrorisdeprecated上传default公钥后,显示:Checkingforgit...fou

ruby - 关闭 Ruby 2.1 Deprecated RUBY_HEAP_MIN_SLOTS 警告

我的.bash_profile中有一些GC设置:exportRUBY_HEAP_MIN_SLOTS=1250000exportRUBY_HEAP_SLOTS_INCREMENT=100000exportRUBY_HEAP_SLOTS_GROWTH_FACTOR=1exportRUBY_GC_MALLOC_LIMIT=30000000exportRUBY_HEAP_FREE_MIN=12500当我使用Ruby2.1时,它提示RUBY_HEAP_MIN_SLOTS:/.rvm/rubies/ruby-2.1.0/bin/ruby:warning:RUBY_HEAP_MIN_SLOTSiso

javascript - 尝试在 moment.js 中转换 RFC2822 日期时出现 “Deprecation warning: moment construction falls back to js Date”

我正在使用以下代码使用moment.js将服务器端日期时间转换为本地时间。moment(moment('Wed,23Apr201409:54:51+0000').format('lll')).fromNow()但我得到了:Deprecationwarning:momentconstructionfallsbacktojsDate.Thisisdiscouragedandwillberemovedinupcomingmajorrelease.Pleaserefertohttps://github.com/moment/moment/issues/1407formoreinfo.看来我无法

javascript - 尝试在 moment.js 中转换 RFC2822 日期时出现 “Deprecation warning: moment construction falls back to js Date”

我正在使用以下代码使用moment.js将服务器端日期时间转换为本地时间。moment(moment('Wed,23Apr201409:54:51+0000').format('lll')).fromNow()但我得到了:Deprecationwarning:momentconstructionfallsbacktojsDate.Thisisdiscouragedandwillberemovedinupcomingmajorrelease.Pleaserefertohttps://github.com/moment/moment/issues/1407formoreinfo.看来我无法