摘要: http://git-scm.com/book/zh/v1 阅读全文
posted @ 2015-07-30 11:18 Adtuu 阅读(139) 评论(0) 推荐(0)
摘要: getSessionFromRedirect();} catch(FacebookRequestException $ex) { // When Facebook returns an error echo '1:'; var_dump($ex->getMessage());} ... 阅读全文
posted @ 2015-07-30 09:53 Adtuu 阅读(456) 评论(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 阅读(352) 评论(0) 推荐(0)
摘要: '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 阅读(371) 评论(0) 推荐(0)
摘要: buffer(); } /** * * The music download data while playing(音乐边下载数据边播放) * @param $data */ public function buffer() { ... 阅读全文
posted @ 2015-07-30 09:51 Adtuu 阅读(396) 评论(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 阅读(210) 评论(0) 推荐(0)
摘要: function getDistanceBetweenPointsNew($latitude1, $longitude1, $latitude2, $longitude2) { $theta = $longitude1 - $longitude2; $miles = (sin(deg2r... 阅读全文
posted @ 2015-07-30 09:49 Adtuu 阅读(272) 评论(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 阅读(984) 评论(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 阅读(806) 评论(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 阅读(259) 评论(0) 推荐(0)
摘要: mysql的慢日志查询对于sql的优化还是很有意义的,具体说下如何开启这个mysql慢查询日志(默认是开启的)。 关于设置在mysql的官方手册或网上都有很多,但是要注意的是,mysql5.6与之前的版本关于慢日志的设置其变量发生了变化。 对于mysql的慢日志开启设置,在my.ini(或my.c... 阅读全文
posted @ 2015-07-30 09:42 Adtuu 阅读(313) 评论(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 阅读(187) 评论(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 阅读(283) 评论(0) 推荐(0)
摘要: ', $file_type, ' code:', $type_code, ''; } 阅读全文
posted @ 2015-07-30 09:40 Adtuu 阅读(1408) 评论(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 阅读(271) 评论(0) 推荐(0)
摘要: 库存超卖的问题作描述:一般电子商务网站都会遇到如团购、秒杀、特价之类的活动,而这样的活动有一个共同的特点就是访问量激增、上千甚至上万人抢购一个商品。然而,作为活动商品,库存肯定是很有限的,如何控制库存不让出现超买,以防止造成不必要的损失是众多电子商务网站程序员头疼的问题,这同时也是最基本的问题。从技... 阅读全文
posted @ 2015-07-30 09:37 Adtuu 阅读(6900) 评论(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 阅读(245) 评论(0) 推荐(0)
摘要: Luhn算法会通过校验码对一串数字进行验证,校验码通常会被加到这串数字的末尾处,从而得到一个完整的身份识别码。我们以数字“7992739871”为例,计算其校验位:从校验位开始,从右往左,偶数位乘2(例如,7*2=14),然后将两位数字的个位与十位相加(例如,10:1+0=1,14:1+4=5);把... 阅读全文
posted @ 2015-07-30 09:35 Adtuu 阅读(1429) 评论(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 阅读(190) 评论(0) 推荐(0)
摘要: #### DIV当textarea使用,在聚焦的时候将光标移动到内容的末尾 ####HTML代码:aaaa 阅读全文
posted @ 2015-07-30 09:33 Adtuu 阅读(604) 评论(0) 推荐(0)
摘要: Map 阅读全文
posted @ 2015-07-30 09:32 Adtuu 阅读(662) 评论(0) 推荐(0)
摘要: Map 阅读全文
posted @ 2015-07-30 09:32 Adtuu 阅读(925) 评论(0) 推荐(0)
摘要: Layzr Demo 阅读全文
posted @ 2015-07-30 09:29 Adtuu 阅读(215) 评论(0) 推荐(0)
摘要: 一:使用jsonp格式,如jquery中ajax请求参数 dataType:'JSONP'。 title 测试Ajax跨域问题 二,server端加上header设为Access-Control-Allow-Origin:*header("Access-Control-Allo... 阅读全文
posted @ 2015-07-30 09:28 Adtuu 阅读(429) 评论(0) 推荐(0)
摘要: live cam 录像页面 阅读全文
posted @ 2015-07-30 09:26 Adtuu 阅读(1691) 评论(0) 推荐(0)
摘要: 在eclipse.app右键,单击“显示包内容”,如下图: 2、找到"info.plist"文件并打开,在文件最后插入配置“NSHighResolutionCapable”,如下图:3、 保存后关闭"info.plist"文件4、 复制eclipse.app文件后删除旧的eclipse.app文件(... 阅读全文
posted @ 2015-07-30 09:25 Adtuu 阅读(2471) 评论(0) 推荐(0)
摘要: {"font_face": "Courier New","font_options":["subpixel_antialias"],"font_size": 16.5} 阅读全文
posted @ 2015-07-30 09:22 Adtuu 阅读(227) 评论(0) 推荐(0)
摘要: vhost设定http.conf AllowOverride none #Require all deniedvhost.conf #ServerAdmin webmaster@dummy-host2.example.com DocumentRoot "/Users/zhoutingze/proje... 阅读全文
posted @ 2015-07-30 09:21 Adtuu 阅读(180) 评论(0) 推荐(0)
摘要: Now you need to find out what version of PHP is installed on OSX$ php -vPHP 5.3.10 with Suhosin-Patch (cli) (built: Feb 20 2012 22:55:53) Copyright (c... 阅读全文
posted @ 2015-07-30 09:19 Adtuu 阅读(3281) 评论(0) 推荐(0)
摘要: libevent扩展安装libevent-2.0.16-stable.tarhttp://libevent.org/[plain]view plaincopycdlibevent-2.0.16-stable./configuremakemakeinstall下载php-libeventc 扩展ht... 阅读全文
posted @ 2015-07-30 09:18 Adtuu 阅读(117) 评论(0) 推荐(0)
摘要: The manual way1. Clone the repository:git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh2.Optionally, backup your existing~/.zshrcfile... 阅读全文
posted @ 2015-07-30 09:17 Adtuu 阅读(660) 评论(0) 推荐(0)
摘要: MySQL的安装一、下载MySQL http://dev.mysql.com/downloads/mysql/二、安装 $tar -xzvf mysql-5.1.45-osx10.6-x86_64.tar.gz $sudomvmysql-5.1.45-osx10.6-x86_64/u... 阅读全文
posted @ 2015-07-30 09:15 Adtuu 阅读(176) 评论(0) 推荐(0)
摘要: 我们设置网站权限的时候,有些目录不得不设置让http服务器有写入权限,这样安全隐患就来了。比如discuz x2的 data目录,这个必须要有写入限,论坛才能正常运行,但有的黑客可能就会利用这个目录上传php文件(你会说附件上传已经限制这种格式的文件,但谁知道黑客会利用什么手段上传呢,只有他们清楚了... 阅读全文
posted @ 2015-07-30 09:13 Adtuu 阅读(566) 评论(0) 推荐(0)
摘要: #重启nginxsudo /etc/init.d/nginx restartsudo /etc/init.d/nginx Usage:/etc/init.d/nginx {start|stop|status|restart|condrestart|try-restart|reload|force-r... 阅读全文
posted @ 2015-07-30 09:12 Adtuu 阅读(1176) 评论(0) 推荐(0)
摘要: nginx: 在配置文件nginx.conf的http段里加入 server_tokens off; HTTPD.CONFTraceEnable Off <Directory ~ "\.svn">Order allow,denyDeny from all</Directory> HTTPD_DEFA 阅读全文
posted @ 2015-07-30 09:06 Adtuu 阅读(145) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2015-07-30 09:04 Adtuu 阅读(75) 评论(0) 推荐(0)
摘要: RewriteEngine On#如果文件存在就直接访问目录不进行RewriteRuleRewriteCond %{REQUEST_FILENAME} !-f#如果目录存在就直接访问目录不进行RewriteRuleRewriteCond %{REQUEST_FILENAME} !-d#将所有其他UR... 阅读全文
posted @ 2015-07-30 09:03 Adtuu 阅读(123) 评论(0) 推荐(0)