上一页 1 2 3 4 5 6 7 8 9 ··· 19 下一页

2018年1月19日

MySQL: 查看一次SQL的执行时间都花在哪些环节上

摘要: select @@profiling -- 看看当前的session的profiling打开没有 set profiling = 1 -- 如果没打开,打开一下 -- 执行一些sql select count(*) ... select * from ... show profiles -- 查看所 阅读全文

posted @ 2018-01-19 16:58 会学习的猪 阅读(314) 评论(0) 推荐(0) 编辑

2018年1月12日

无限极分类实现

摘要: http://www.jb51.net/article/28020.htm 阅读全文

posted @ 2018-01-12 00:24 会学习的猪 阅读(103) 评论(0) 推荐(0) 编辑

根据奖品概率计算获取的奖品想法

摘要: $arr = array( 'a1' => 1, 'a2' => 2, 'a3' => 3, 'a4' => 4 ); $set = array(); for($i = 0 ;$i $weight){ if($rand>$low && $rand<= $low+$weight){ return $key; }... 阅读全文

posted @ 2018-01-12 00:04 会学习的猪 阅读(159) 评论(0) 推荐(0) 编辑

2018年1月11日

将整数转为货币数值

摘要: function my_number_format($number){ if( !is_int($number)) return false; $after_convert_number = ''; do{ $after_convert_number = ','.substr($number,-3)."$after_convert_numb... 阅读全文

posted @ 2018-01-11 23:50 会学习的猪 阅读(136) 评论(0) 推荐(0) 编辑

2018年1月10日

为什么说接口能松耦合?

摘要: 因为多态的特性,父类或者接口的引用是可以接受子类对象的。 比如: interface Test{} class Test1 implements Test{} class Test2 implements Test{} 上面声明一个Test接口,两个类Test1和Test2,分别实现Test接口。 阅读全文

posted @ 2018-01-10 18:18 会学习的猪 阅读(1161) 评论(0) 推荐(0) 编辑

2018年1月9日

interfacer和abstarct class的异同

摘要: 阅读全文

posted @ 2018-01-09 00:27 会学习的猪 阅读(175) 评论(0) 推荐(0) 编辑

2017年12月12日

理解线程和进程

摘要: 作者:zhonyong链接:https://www.zhihu.com/question/25532384/answer/81152571来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 首先来一句概括的总论:进程和线程都是一个时间段的描述,是CPU工作时间段的描述。 阅读全文

posted @ 2017-12-12 15:14 会学习的猪 阅读(127) 评论(0) 推荐(0) 编辑

2017年12月6日

PDO防注入原理分析以及使用PDO的注意事项

摘要: <?php $pdo = new PDO("mysql:host=192.168.0.1;dbname=test;charset=utf8","root"); $st = $pdo->prepare("select * from info where id =? and name = ?"); $i 阅读全文

posted @ 2017-12-06 13:58 会学习的猪 阅读(214) 评论(0) 推荐(0) 编辑

2017年11月7日

ip配置文

摘要: /etc/sysconfig/network-scripts/ifcfg-eh0 阅读全文

posted @ 2017-11-07 16:14 会学习的猪 阅读(108) 评论(0) 推荐(0) 编辑

2017年11月6日

no device found for connection ‘ System eth0′

摘要: 解决办法: 1、删除/etc/udev/rules.d/70-persistent-net.rules文件,重启系统。 2、如果上面的不起作用,那么去看ifcfg-eth0文件中的HWADDR是否正确,改成正确的HWADDR。 阅读全文

posted @ 2017-11-06 17:47 会学习的猪 阅读(190) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 ··· 19 下一页

导航