首页 文章 精选 留言 我的

精选列表

搜索[Cookie处理],共10000篇文章
优秀的个人博客,低调大师

INSTALL_FAILED_MEDIA_UNAVAILABLE错误处理

问题描写叙述: 在android手机上安装apk的时候,报错例如以下: Installation error: INSTALL_FAILED_MEDIA_UNAVAILABLE Please check logcat output for more details. Launch canceled! 上网搜了搜原因发现是某些应用程序(如360、91手机助手)造成手机无法在SD卡上安装程序 解决方法: 果断卸载这些垃圾软件,然后使用adb shell让手机自己选择安装在哪里,命令例如以下: adb shell pm set-install-location 0 不同的set-install-location说明: pmset-install-location0 由App自行决定软件是否能安装在SD卡 pmset-install-location1 强制所有App安装在ROM内 pmset-install-location2 强制所有App安装在SD卡 本文转自mfrbuaa博客园博客,原文链接:http://www.cnblogs.com/mfrbuaa/p/5091918.html,如需转载请自行联系原作者

优秀的个人博客,低调大师

Objective-C 处理动态类型的方法

方法 问题或行为 -(BOOL) isKindOfClass : class-object 对象是不是class-object或其子类的成员 -(BOOL) isMemberOfClass:class-object 对象是不是class-object的成员 -(BOOL) respondsToSelector:Selector 对象是否能够响应selector所指定的方法 -(BOOL) instancesRespondToSelector 指定的类实例是否能响应selector -(BOOL) isSubclassOfClass:class-object 对象是否是指定类的子类 -(id) performSelector:selector 应用selector指定的方法 -(id) performSelector:selector withObject:object 应用selector指定的方法 -(id) performSelector:selector withObject:object1 withObject : object2 应用selector指定的方法 测试实验设计 继承关系图: Rectangle.h Square.h 在main.h中的测试如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 // //main.m //Square // //CreatedbyAppleon2017/9/9. //Copyright2017年Apple.Allrightsreserved. // #import<Foundation/Foundation.h> #import"Square.h" int main( int argc, const char *argv[]){ @autoreleasepool{ Square*mySquare=[[Squarealloc]init]; //isMemberof if ([mySquareisMemberOfClass:[Square class ]]==YES) { NSLog(@ "mySquareisamemberofSquareclass" ); // } if ([mySquareisMemberOfClass:[Rectangle class ]]==YES) { NSLog(@ "mySquareissmemberofRectamgleclass" ); } if ([mySquareisMemberOfClass:[NSObject class ]]==YES) { NSLog(@ "mySquareisamemberofNSObjectclass" ); } //isKindOf if ([mySquareisKindOfClass:[Square class ]]==YES) { NSLog(@ "mySquareisakindofSquareclass" ); // } if ([mySquareisKindOfClass:[Rectangle class ]]==YES) { NSLog(@ "mySquareisskindofRectamgleclass" ); } if ([mySquareisKindOfClass:[NSObject class ]]==YES) { NSLog(@ "mySquareisakindofNSObjectclass" ); // } //respondsTo: if ([mySquarerespondsToSelector:@selector(setSide:)]==YES) { NSLog(@ "mySquarerespondstosetSide:method" ); } if ([mySquarerespondsToSelector:@selector(setWidth:addHeight:)]==YES) { NSLog(@ "mySquarerespondstosetWidth:addHeight:method" ); } if ([SquarerespondsToSelector:@selector(alloc)]==YES) { NSLog(@ "Squareclassrespondstoallocmethod" ); } //instancesRespondTo: if ([RectangleinstancesRespondToSelector:@selector(setSide:)]==YES) { NSLog(@ "InstancesofrespondtosetSide:method" ); } if ([SquareinstancesRespondToSelector:@selector(setWidth:addHeight:)]==YES) { NSLog(@ "InstancesofSquarerespondtosetWidth:addHeight::method" ); } if ([SquareisSubclassOfClass:[Rectangle class ]]==YES) { NSLog(@ "Squareisasubclassofarectangle" ); } return 0; } } 本文转自Aonaufly51CTO博客,原文链接:http://blog.51cto.com/aonaufly/1963970,如需转载请自行联系原作者

优秀的个人博客,低调大师

Logstash5.4.1解析日志报错处理

下载最新的logstash5.4.1打开把之前的配置文件加入进去,启动logstash提示报错了,未使用geoip插件的配置文件正常启动。按照提示发现是maxmind的数据库解析出错,重新至maxmind(http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz)下载解析即可。说明下之前的配置文件为 geoip { source => ["X_Forward_IP"] database => "/logstash2.2.2/conf/GeoLiteCity.dat" 更改为 geoip { source => ["X_Forward_IP"] database => "/usr/local/logstash-5.4.1/config/GeoLite2-City.mmdb" Logstash多实例问题: 当启动多个/usr/local/logstash-5.4.1/bin/logstash -f/usr/local/logstash-5.4.1/config/nginx.conf之后就会出现you must change the "path.data" setting.这个时候就必须要 mkdir -p /usr/local/logstash-5.4.1/data/{1,2,3,4} /usr/local/logstash-5.4.1/bin/logstash -f/usr/local/logstash-5.4.1/config/nginx.conf --path.data=/usr/local/logstash-5.4.1/data/1 /usr/local/logstash-5.4.1/bin/logstash -f/usr/local/logstash-5.4.1/config/nginx.conf --path.data=/usr/local/logstash-5.4.1/data/2 需要在后面加上--path.data参数才能启动多实例 设置副本数及分片数: elasticsearch在以前的2.x版本,可以在配置文件中指定副本数及分片数。 在elasticsearch的5.x的版本中不能配置文件中配置这2个参数了。需要副本数,可以设置为: 全局设定: curl -XPUT http://192.168.2.228:9200/_settings -d '{ "number_of_replicas" : 0 }' 定义某一个索引: curl -XPUT http://192.168.2.228:9200/.kibana/_settings -d '{ "number_of_replicas" : 0 }' elasticsearch分片不向其他节点分布: 集群由2台es组成,但是分片只分布在一台节点,查看日志发现报错 [2017-08-03T23:59:24,414][WARN ][o.e.c.r.a.DiskThresholdMonitor] [elk228] high disk watermark [90%] exceeded on [nYN4Cc07QIuhg4nu9s0Eig][elk228][/elk/data/nodes/0] free: 5.2gb[8.1%], shards will be relocated away from this node 这个意思就是节点空间快使用完毕,不向节点复制数据,导致的节点出错,清理集群机器磁盘空间。 如想要关闭磁盘检查功能 1 2 3 4 5 curl-XPUThttp: //localhost :9200 /_cluster/settings -d'{ "transient" :{ "cluster.routing.allocation.disk.threshold_enabled" : false } }' ps:刚开始我以为是新版本的logstash不兼容老版本的grok,原来只是IP数据库的问题 本文转自 rong341233 51CTO博客,原文链接:http://blog.51cto.com/fengwan/1933596

优秀的个人博客,低调大师

ES报错Result window is too large问题处理

我在使用Elasticsearch进行search查询的过程中,出现了Result window is too large问题。 这里简单做一个报错复现: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 In[ 1 ]: import requests In[ 2 ]:requests.get( 'http://127.0.0.1:9200/cmdb-now/_search?page=1&size=10000000' ).json() Out[ 2 ]: { u 'error' :{ u 'failed_shards' :[ { u 'index' :u 'cmdb-now' , u 'node' :u 'ldeZMZRAR6uZpAiIr5QxBQ' , u 'reason' :{ u 'reason' :u 'Resultwindowistoolarge,from+sizemustbelessthanorequalto:[10000]butwas[10000000].Seethescrollapiforamoreefficientwaytorequestlargedatasets.Thislimitcanbesetbychangingthe[index.max_result_window]indexlevelparameter.' , u 'type' :u 'query_phase_execution_exception' }, u 'shard' : 0 } ], u 'grouped' : True , u 'phase' :u 'query' , u 'reason' :u 'allshardsfailed' , u 'root_cause' :[ { u 'reason' :u 'Resultwindowistoolarge,from+sizemustbelessthanorequalto:[10000]butwas[10000000].Seethescrollapiforamoreefficientwaytorequestlargedatasets.Thislimitcanbesetbychangingthe[index.max_result_window]indexlevelparameter.' , u 'type' :u 'query_phase_execution_exception' } ], u 'type' :u 'search_phase_execution_exception' }, u 'status' : 500 } 从上面的报错信息,可以看到ES提示我结果窗口太大了,目前最大值为10000,而我却要求给我10000000。并且在后面也提到了要求我修改index.max_result_window参数来增大结果窗口大小。 我google了修改方法,命令如下: 1 curl-XPUThttp: //127 .0.0.1:9200 /cmdb-now/_settings -d '{"index":{"max_result_window":100000000}}' 需要注意的是,cmdb-now这里是我ES索引的名字,因此你需要它替换成你对应的索引名称进行修改。 有关官方针对index的相关配置介绍,可以点击这里进行查看。 本文转自 aaao 51CTO博客,原文链接:http://blog.51cto.com/nolinux/1786656,如需转载请自行联系原作者

优秀的个人博客,低调大师

自然语言处理多任务学习目标

更多深度文章,请关注云计算频道:https://yq.aliyun.com/cloud 在之前的博文中,我讨论了如何利用相关任务提高多任务学习(MTL)模型的性能。在此之前,我们需要了解一下到底什么是多任务学习。 多任务学习是和单任务学习相对的一种机器学习方法。在机器学习领域,标准的算法理论是一次学习一个任务,而多任务学习是一种联合学习,多个任务并行学习,结果相互影响。简单来说,就是同时求解多个问题。例如我们经常探讨的“千人千面”这种个性化问题,就是一种典型的多任务学习问题,它可以同时学习多个用户的兴趣偏好。 多任务学习(MTL)主要是由两个部分组成:a)用于任务学习的架构、b)训练相关的辅助任务。而且这两个方面仍有很大的改进空间。此外,多任务学习有可能成为从有限数据中训练更强大的模型的关键技术:训练得到的模型可以执行更广泛的NLP任

资源下载

更多资源
腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册
修改密码
忘记密码