摘要: 安装erlang的时候折腾了我一天 报这个错/bin/bash: jar: command not found解决办法cd /usr/binsudo ln -s -f /usr/lib/jvm/jdk1.6.0_30/bin/jarjdk的安装地址按自己情况来如果提示javah:commond not found,于是照葫芦画瓢,输入命令cd /usr/binln -s -f /usr/lib/jvm/jdk1.6.0_30/bin/javah 阅读全文
posted @ 2013-05-13 00:06 firesnow 阅读(3983) 评论(0) 推荐(0) 编辑
摘要: # install libraries and tools sudo apt-get install libncurses5-dev m4 fop freeglut3-dev libwxgtk2.8-dev g++ libssl-dev xsltproc build-essentialtk8.5 # download source code wget http://erlang.org/download/otp_src_R14B02.tar.gz tar zxvf otp_src_R14B02.tar.gz cd otp_src_R14B02/ # compile and ins... 阅读全文
posted @ 2013-05-12 21:47 firesnow 阅读(223) 评论(0) 推荐(0) 编辑
摘要: /** * 获取访问者IP * */ public static function get_client_ip() { if (getenv('HTTP_CLIENT_IP') && strcasecmp(getenv('HTTP_CLIENT_IP'), 'unknown')) { $CLIENT_IP = getenv('HTTP_CLIENT_IP'); } elseif (getenv('HTTP_X_FORWARDED_FOR') && strcasecmp(getenv( 阅读全文
posted @ 2013-05-10 15:22 firesnow 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1.冒泡排序 int[] number = { 9, 8, 7, 6, 5, 4, 3, 2, 1 }; int a; for (int i = 0; i < number.length; i++) { for (int s = 0; s < number.length-i-1; s++) { if (number[s] < number[s + 1]) { a = number[s]; number[s] = number[... 阅读全文
posted @ 2013-05-10 00:20 firesnow 阅读(121) 评论(0) 推荐(0) 编辑
摘要: CommandDescriptionExampleget读取键值get mykeyset设置新键值set mykey 0 60 5add新增键值add newkey 0 60 5replace替换现有值replace key 0 60 5append末尾添加值append key 0 60 15prepend头部添加值prepend key 0 60 15incr递增数值incr mykey 2decr递减数值decr mykey 5delete删除键delete mykeyflush_all清除所有数据flush_all清除n秒内的数据flush_all 900stats打印所有状态信息st 阅读全文
posted @ 2013-05-08 17:27 firesnow 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 原函数function test() {alert('test');}test();首先我们先了解 函数调用的一种用法 在一个函数后加括号,括号里面可以加上参数传递原函数可以这么改(function test() {alert('test');})();匿名函数(function() {alert('test');})();匿名函数的链式调用(function() {alert('test');return arguments.callee;})()();return arguments.callee简单地讲就是返回函数本身(fu 阅读全文
posted @ 2013-05-05 15:25 firesnow 阅读(592) 评论(0) 推荐(0) 编辑
摘要: 原函数function test() {alert('test');}test();匿名写法1(function() {alert('test');})();匿名写法2(function(o) {alert(o);})('test');匿名写法3~(function(){ alert('test'); })();//写法有点酷~ 匿名写法4void function(){ alert('test'); }();//据说效率最高~ 匿名写法5+function(){ alert('test'); }( 阅读全文
posted @ 2013-05-05 15:23 firesnow 阅读(350) 评论(0) 推荐(0) 编辑
摘要: <select id="year"> <option value="">年</option> </select> <select id="month"> <option value="">月</option> </select> <select id="day"> <option value="">日</option> </select&g 阅读全文
posted @ 2013-04-26 00:00 firesnow 阅读(249) 评论(0) 推荐(0) 编辑
摘要: Redis入门教程:特性及数据类型的操作 阅读全文
posted @ 2013-04-23 14:39 firesnow 阅读(142) 评论(0) 推荐(0) 编辑
摘要: $file_name = $dir . $name;if (!file_exists($file_name)) { echo "<script>alert('文件不存在')</script>"; exit;} else { $file = fopen($file_name, "r"); Header("Content-type: application/octet-stream"); Header("Accept-Ranges: bytes"); Header("A 阅读全文
posted @ 2013-04-22 10:17 firesnow 阅读(200) 评论(0) 推荐(0) 编辑