摘要: '4月以降、遺体の捜索活動が続けられてきたが');$sJSON = json_encode($s);var_dump($sJSON); // 会转换成16进制var_dump(json_decode($sJSON));$sJSON = json_encode($s, defined('JSON_UN... 阅读全文
posted @ 2015-07-30 09:52 Adtuu 阅读(363) 评论(0) 推荐(0) 编辑
摘要: 'a','con'=>'b');$b[] = $a;var_dump($b);echo '';$aa[]['son2'] = array('name' =>'a','con'=>'b');var_dump($aa);exit;*/header('Content-type:text/html;char... 阅读全文
posted @ 2015-07-30 09:52 Adtuu 阅读(338) 评论(0) 推荐(0) 编辑
摘要: buffer(); } /** * * The music download data while playing(音乐边下载数据边播放) * @param $data */ public function buffer() { ... 阅读全文
posted @ 2015-07-30 09:51 Adtuu 阅读(371) 评论(0) 推荐(0) 编辑
摘要: $key = 'test';$result_array = array('name' => 'ta', 'age' => 28);$str = encode($result_array);function encode($result_array) { global $key;//... 阅读全文
posted @ 2015-07-30 09:50 Adtuu 阅读(204) 评论(0) 推荐(0) 编辑
摘要: function getDistanceBetweenPointsNew($latitude1, $longitude1, $latitude2, $longitude2) { $theta = $longitude1 - $longitude2; $miles = (sin(deg2r... 阅读全文
posted @ 2015-07-30 09:49 Adtuu 阅读(261) 评论(0) 推荐(0) 编辑
摘要: $headers = array( "TYPE:xxxxooooo", "TOKEN:00000000");$data = array( 'data' => array('name' => 'test','AGE'=>22), 'registration_ids' => ar... 阅读全文
posted @ 2015-07-30 09:48 Adtuu 阅读(962) 评论(0) 推荐(0) 编辑
摘要: var crypto = require('crypto');function decode(cryptkey, iv, secretdata) { var decipher = crypto.createDecipheriv('aes-256-cbc', cryptkey, iv), ... 阅读全文
posted @ 2015-07-30 09:45 Adtuu 阅读(789) 评论(0) 推荐(0) 编辑
摘要: function get_long_time($date){ $curr = time(); $date = strtotime($date); $tmp = $curr - $date; if($tmp < 60){ $re = $tmp.'秒前'; }... 阅读全文
posted @ 2015-07-30 09:44 Adtuu 阅读(253) 评论(0) 推荐(0) 编辑
摘要: mysql的慢日志查询对于sql的优化还是很有意义的,具体说下如何开启这个mysql慢查询日志(默认是开启的)。 关于设置在mysql的官方手册或网上都有很多,但是要注意的是,mysql5.6与之前的版本关于慢日志的设置其变量发生了变化。 对于mysql的慢日志开启设置,在my.ini(或my.c... 阅读全文
posted @ 2015-07-30 09:42 Adtuu 阅读(304) 评论(0) 推荐(0) 编辑
摘要: index.htmlLoginadmincp.php $_GET['auth_username'], 'auth_password' => $_GET['auth_password'] ); $url = 'http://www.adtuu-server.com/login... 阅读全文
posted @ 2015-07-30 09:42 Adtuu 阅读(160) 评论(0) 推荐(0) 编辑
摘要: arA['R'] = ($this->colorA >> 16) & 0xFF; $this->arA['G'] = ($this->colorA >> 8) & 0xFF; $this->arA['B'] = $this->colorA & 0xFF; $... 阅读全文
posted @ 2015-07-30 09:41 Adtuu 阅读(270) 评论(0) 推荐(0) 编辑
摘要: ', $file_type, ' code:', $type_code, ''; } 阅读全文
posted @ 2015-07-30 09:40 Adtuu 阅读(1396) 评论(0) 推荐(0) 编辑
摘要: <?phpini_set('session.use_only_cookies', 0);$session_id = rand(10000, 99999);session_set_cookie_params( 0, '/', NULL, false, true);sess... 阅读全文
posted @ 2015-07-30 09:39 Adtuu 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 库存超卖的问题作描述:一般电子商务网站都会遇到如团购、秒杀、特价之类的活动,而这样的活动有一个共同的特点就是访问量激增、上千甚至上万人抢购一个商品。然而,作为活动商品,库存肯定是很有限的,如何控制库存不让出现超买,以防止造成不必要的损失是众多电子商务网站程序员头疼的问题,这同时也是最基本的问题。从技... 阅读全文
posted @ 2015-07-30 09:37 Adtuu 阅读(6864) 评论(0) 推荐(0) 编辑
摘要: UPDATEt_userINNER JOINt_shake ON t_shake.user_id = t_user.user_idSETt_user.shake_total_num = t_shake.shake_total_num;UPDATE t_user INNER JOIN(select u... 阅读全文
posted @ 2015-07-30 09:37 Adtuu 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Luhn算法会通过校验码对一串数字进行验证,校验码通常会被加到这串数字的末尾处,从而得到一个完整的身份识别码。我们以数字“7992739871”为例,计算其校验位:从校验位开始,从右往左,偶数位乘2(例如,7*2=14),然后将两位数字的个位与十位相加(例如,10:1+0=1,14:1+4=5);把... 阅读全文
posted @ 2015-07-30 09:35 Adtuu 阅读(1407) 评论(0) 推荐(1) 编辑
摘要: header("Content-Type: text/html;charset=utf-8");//输出不乱码,你懂的$total=10;//红包总额$num=8;// 分成8个红包,支持8人随机领取$min=0.01;//每个人最少能收到0.01元for ($i=1;$i';}echo '第'.$... 阅读全文
posted @ 2015-07-30 09:34 Adtuu 阅读(188) 评论(0) 推荐(0) 编辑
摘要: #### DIV当textarea使用,在聚焦的时候将光标移动到内容的末尾 ####HTML代码:aaaa 阅读全文
posted @ 2015-07-30 09:33 Adtuu 阅读(577) 评论(0) 推荐(0) 编辑
摘要: Map 阅读全文
posted @ 2015-07-30 09:32 Adtuu 阅读(656) 评论(0) 推荐(0) 编辑
摘要: Map 阅读全文
posted @ 2015-07-30 09:32 Adtuu 阅读(908) 评论(0) 推荐(0) 编辑