娱乐新闻

解决Win7下运行php Composer出现SSL报错的问题

混江龙づ霸主 提交于 2019-12-03 01:24:44
以前都在linux环境使用php composer。 今天尝试在win7下运行composer却出现SSL报错: D:\data\www\mmoyu\symapp>php -f %phprc%\composer install Loading composer repositories with package information [Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed Failed to enable crypto failed to open stream: operation failed install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-p lugins] [--no-custom-installers]

ELK出现unassigned_shards解决办法

匿名 (未验证) 提交于 2019-12-03 00:43:02
1)查看健康状态信息 curl - XGET http : //172.20.9.76:9200/_cluster/health\?pretty { "cluster_name" : "elasticsearch_MYBOOKING" , "status" : "green" , "timed_out" : false , "number_of_nodes" : 2 , "number_of_data_nodes" : 2 , "active_primary_shards" : 85 , "active_shards" : 85 , "relocating_shards" : 0 , "initializing_shards" : 0 , "unassigned_shards" : 2 } 2)找到未分片的索引 curl - s "http://172.20.9.76:9200/_cat/shards" | grep UNASSIGNED 3)执行reroute curl - XPOST '172.20.9.76:9200/_cluster/reroute' - d '{ "commands" : [ { "allocate" : { "index" : "logstash-2018.07.20", "shard" : 3, "node" : "

求字符串中出现次数最多的子串及其出现次数

匿名 (未验证) 提交于 2019-12-02 23:57:01
求字符串中出现次数最多的子串的出现次数。 例如字符串abcbcbcabc,连续出现次数最多的子串是bc,出现次数为3 abcbcbcabc 第0个 bcbcbcabc 第1个 cbcbcabc 第2个 bcbcabc 第3个 cbcabc 第4个 bcabc 第5个 cabc 第6个 abc 第7个 bc 第8个 c 第9个 过程:先从第0个数组取出a,然后和第1个数组的b比较,发现不相等,然后取ab,abc,abcb....这一趟取完后,又从第1个后缀数组开始取,取b,bc,bcb,bcbc... #include <iostream> #include <string> #include <vector> using namespace std ; pair < int , string > fun ( const string & str ) { vector <string> substrs ; int len = str . length (); string substring ; int maxcount ( 0 ); //后缀数组 cout << "the string is:" << str << endl ; cout << "the substrings are as follows:" << endl ; for ( int i = 0 ; i < len

eclipse出现An internal error occurred during: \"Repository registry initialization\". Array index out of

情到浓时终转凉″ 提交于 2019-12-02 23:33:40
【解决办法】 windows---preference---maven----取消勾选的Download repository index updates on startup 在Eclipse的workspace下有个.metadata文件夹,Eclipse出现异常的log文件就在这个目录下。 最近出现了这样的错误: An internal error occurred during: "Repository registry initialization". Array index out of 查看日志文件发现: !ENTRY org.eclipse.core.jobs 4 2 2011-08-03 09:33:32.843 !MESSAGE An internal error occurred during: "Updating indexes". !STACK 0 java.lang.OutOfMemoryError: Java heap space 来源: https://www.cnblogs.com/package-java/p/11767341.html

外星人电脑出现the system is running in low graphics mode的解决方法

末鹿安然 提交于 2019-12-01 06:50:31
问题现象: 执行删除GCC5.4.0: sudo apt-get remove gcc gcc-5重启电脑后,就显示the system is running in low graphics mode 解决方法: 1、按Ctrl+Alt+F1 进入命令行: cd /etc/X11 sudo cp xorg.conf.failsafe xorg.conf sudo reboot 就可以进入UBUNTU系统了,但时有点卡顿。原因是因为NVIDIA的驱动没了,需要安装驱动。 2、sudo apt-get remove -purge nvidia* 完全卸载原有驱动     sudo apt-get update sudo apt-get upgrade 3、lsmod |grep nouveau 确认nouveau已经禁用 如果显示,说明没有禁用,需要手动禁用:sudo vi /etc/modprobe.d/blacklist.conf 在末尾加上两句: blacklist nouveau options nouveau modeset=0 4、sudo update-initramfs -u 这里报错了:少了两个文件: bxt_guc_ver8_7.bin kbl_guc_ver9_14.bin 打开链接:https://git.kernel.org/pub/scm/linux

出席请假缺席人员的选择,同一个人不能同时出现在三个框里

馋奶兔 提交于 2019-12-01 01:48:03
三个框里的同一个人不能分别出现在三个框里,如果后面的框选的人,前面出现过,则删除该人,以最后一步选择为主 Html : <div class="EditMeetingRecord none editBox" id="EditMeetingRecord"> <div class="title_add clearfix"> <label>会议类别:</label><select class="form-control"> <option value="">支部党员大会</option> <option value="">支部委员会</option> <option value="">党小组会议</option> <option value="">党课</option> <option value="">组织生活会</option> <option value="">民主评议党员</option> <option value="">党员活动记录</option> </select> </div> <div class="tableWrap"> <table> <tr><th class="w1">会议名称</th><td class="w2"><input class="form-control input-lg" type="text" placeholder="" disabled>

Mybatis Collection查询集合只出现一条数据

柔情痞子 提交于 2019-11-30 15:13:28
1、原因 如果两表联查,主表和明细表的主键都是id的话,明细表的多条只能查询出来第一条。 2、解决办法 级联查询的时候,主表和从表 有一样的字段名 的时候,在mysql上命令查询是没问题的。但在mybatis中主从表需要为相同字段名设置别名。设置了别名就OK了。 例子: 主表Standard, 从表StandEntity,均有名为id的字段 <resultMap id="StandardAndEntityResultMap" type="whu.edu.irlab.model.Standard" extends="BaseResultMap"> <collection property="standEntities" ofType="whu.edu.irlab.model.StandEntity"> (依据下面的select中更名的字段id别名se_id,在此将相同的字段名改为别名) <id column="se_id" property="id" jdbcType="INTEGER" /> <result column="stand_id" property="standId" jdbcType="INTEGER" /> <result column="stand_name" property="standName" jdbcType="VARCHAR" /> <result

如何实现在指定的元素出现的时候可以按键盘事件消失则不可以按

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 23:47:56
备注:我在工作中遇在一个文字出现是可以按键盘事件的但只允许按键一次并记录结果,这个时候再次字体消失,然后直到字体再出现的时候就在开启键盘事件 出现字体开启 this.showResultContTimer = setTimeout(() => { this.keyUpResult(); this.isShowPlus = false; this.isShowTestCont = true; }, this.fixationShowTime); keyUpResult() { $(document).on('keyup', (e => { if (e.keyCode === 37) { this.testResultJson[this.testResultNumber].push( { rightKey: this.attributiveWordArray[this.questionNumber], answer: '1', time: 0} ) console.log('左键'); clearTimeout(this.showTestContTimer); clearTimeout(this.showResultNextTimer); if (this.questionNumber < this.attributiveWordArray.length) { this

数组中出现次数超过一半的数字

左心房为你撑大大i 提交于 2019-11-27 15:24:16
class Solution { public: int MoreThanHalfNum_Solution(vector<int> numbers) { if(numbers.size() == 0) return 0; int num = numbers[0], count = 1; for(int i = 1; i < numbers.size(); i++){ if(numbers[i] != num){ if((i ==( numbers.size() - 1) )&& count == 1){ num = 0; break; } count --; if(count <=0){ num = numbers[i]; count = 1; } }else{ count ++; } } return num; } }; 来源: https://blog.csdn.net/perfects110/article/details/99691695