07 2011 档案

Ubuntu下打开RAR和7z压缩文件
摘要:# -- rar -----------sudo apt-get install rar# 使用rar 解 .rar 文件rar e xxxx.rar# --- 7z ----------sudo apt-get install p7zip# 使用7xr 解 .7z 文件7zr -x xxx.7z 7zr -e xxx.7z 阅读全文

posted @ 2011-07-31 23:58 bluefrog 阅读(1492) 评论(0) 推荐(0)

ubuntu下使用apt-get安装LAMP
摘要:# -- mysql -----sudo apt-get install mysql-serversudo apt-get install mysql-client # 检测Mysql是否正常mysql-uusername -ppassword # -- apache -------sudo apt-get install apache2# 检测Apache是否正常# 浏览器上输入http://127.0.0.1 看apache是否启动# phpsudo apt-get install php5sudo apt-get install libapache2-mod-auth-mysqlsud. 阅读全文

posted @ 2011-07-31 23:32 bluefrog 阅读(1725) 评论(0) 推荐(0)

[php]数据结构&算法(PHP描述) 半折插入排序 straight binary sort
摘要:1 <?php 2 /** 3 * 半折插入排序 straight binary sort 4 * 5 * 原理:当直接插入排序进行到某一趟时,对于 r[i] 来讲,前边 i-1 个记录已经按关键字有序。此时不用直接插入排序的方法,而改为折半查找,找出 r[i] 应插的位置,然后插入。 6 */ 7 function sort_binary_insertion($list) 8 { 9 $len=count($list);10 if(empty($len)) return$list;11 12 for($i=1; $i<$len; $i++)13 {14 $temp=$lis... 阅读全文

posted @ 2011-07-26 22:44 bluefrog 阅读(599) 评论(1) 推荐(1)

[php]数据结构&算法(PHP描述) 冒泡排序 bubble sort
摘要:1 <?php 2 /** 3 * 冒泡排序 bubble sort 4 * 5 * 原理:多次循环进行比较,每次比较时将最大数移动到最上面。每次循环时,找出剩余变量里的最大值,然后减小查询范围。这样经过多次循环以后,就完成了对这个数组的排序 6 */ 7 function sort_bubble($list) 8 { 9 $len=count($list);10 if(empty($len)) return$list;11 $is_change=false;12 13 for($i=0;$i<$len; $i++)14 {15 for($j=$i+1; $j<$len; $ 阅读全文

posted @ 2011-07-08 23:50 bluefrog 阅读(719) 评论(3) 推荐(0)

nginx 显示文件目录
摘要:在nginx.conf文件中的http 里加入autoindex on;# 显示目录autoindex_exact_size on;# 显示文件大小autoindex_localtime on;# 显示文件时间 阅读全文

posted @ 2011-07-08 12:01 bluefrog 阅读(4553) 评论(0) 推荐(1)

[php]数据结构&算法(PHP描述) 三元组 Triplet
摘要:1 <?php 2 /** 3 * 三元组 Triplet 4 * 5 */ 6 class Triplet 7 { 8 private$_data=null; 9 10 // 初始化三元组11 publicfunction init($val1,$val2,$val3)12 {13 $this->_data[0] =$val1;14 $this->_data[1] =$val2;15 $this->_data[2] =$val3;16 returntrue;17 }18 19 // 销毁三元组20 publicfunction destroy()21 {22 ... 阅读全文

posted @ 2011-07-02 22:04 bluefrog 阅读(942) 评论(0) 推荐(0)