摘要: 1、安装Service Discovery 默认情况请安装consul(下载地址:https://www.consul.io/downloads.html),下载对应的系统下的文件,将可执行文件放入GOPATH下面的bin目录下2、安装Protobuf 安装protoc (下载地址:https:// 阅读全文
posted @ 2019-08-29 13:30 hhao321 阅读(1756) 评论(0) 推荐(0) 编辑
摘要: 1、swoole安装方式,手动安装,自动安装 手动安装:https://github.com/swoole/swoole-src/releases,http://pecl.php.net/package/swoole,http://git.oschina.net/swoole/swoole,随便从那 阅读全文
posted @ 2018-10-31 10:04 hhao321 阅读(634) 评论(0) 推荐(0) 编辑
摘要: 首先值得说明的是不管是php-memcache扩展,还是php-memcached扩展,这个仅仅是扩展方式不一样,memcache 扩展是PHP写的一个连接memcached服务的扩展,而memcached扩展是memcached服务商推出的官方连接方式。 安装php-memcache 扩展 1、下 阅读全文
posted @ 2018-08-02 16:29 hhao321 阅读(156) 评论(0) 推荐(0) 编辑
摘要: //db.project.find({content:'',es_update:'no',new_import:'1'});//db.project.distinct('wj_source_type');//db.project.find({source:'tpm',new_import:'1',f 阅读全文
posted @ 2018-03-06 08:59 hhao321 阅读(78) 评论(0) 推荐(0) 编辑
摘要: ES在更改分词器或更改已有mapping结构后需要重新重新索引,当然复制也是一样的,相当于重新生成索引信息 //es的head插件地址:http://localhost:9200/_plugin/head/ //新建索引PUT /my_index_new{//此处mapping复制的时候可以复制已有 阅读全文
posted @ 2018-03-06 08:57 hhao321 阅读(319) 评论(0) 推荐(0) 编辑
摘要: $where = TranslatorOnline::queryFormat($request);$rows = TranslatorOnline::searchList($where,'a.*,b.iol_code,b.nickname,b.true_name,b.mother_tongue,b. 阅读全文
posted @ 2018-03-01 20:54 hhao321 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 匹配是否包含中文 1、正则匹配 HEX(phone) REGEXP 'e[4-9][0-9a-f]{4}' 2、长度对比,当字符集为UTF-8,并且字符为中文时,length() 和 char_length() 两个方法返回的结果是不相同的 length(col)!=char_length(col) 阅读全文
posted @ 2018-02-13 15:51 hhao321 阅读(1585) 评论(0) 推荐(0) 编辑
摘要: excel时间格式得到的是一串数字, //转换excel日期,date是数字private function excelTime($date, $time = false) { if(is_numeric($date)){ if(function_exists('GregorianToJD')){ 阅读全文
posted @ 2018-02-11 15:14 hhao321 阅读(889) 评论(0) 推荐(0) 编辑
摘要: /** * 将unicode转换成字符 * @param int $unicode * @return string UTF-8字符 **/ function unicode2Char($unicode){ if($unicode < 128) return chr($unicode); if($u 阅读全文
posted @ 2018-02-11 13:26 hhao321 阅读(428) 评论(0) 推荐(0) 编辑
摘要: 1、修改数据库的字符支持,utf8==>utf8mb4 2、匹配出emoji表情,替换与还原 /** * 表情转换 更新到ios9.2涵盖编码范围 * @param $str * @return mixed */ public static function emoji_to_html($str) 阅读全文
posted @ 2018-02-11 11:05 hhao321 阅读(259) 评论(0) 推荐(0) 编辑