上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页
摘要: MD5.js文件/* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet * Distributed under the BSD License * See http://pajh 阅读全文
posted @ 2013-06-18 13:54 忆殇之痕 阅读(682) 评论(0) 推荐(0) 编辑
摘要: ajax.jswindow.AJAX = { callBack : {},index : 1,get : function(url,succCall,errCall,timeout,getid){ //var id = this.index++; var id=getid; //alert(id); this.callBack[id] = [succCall,errCall]; uexXmlHttpMgr.open(id,'get',url,(timeout||0)); this._send(id);},post : function(url,data,succCall,err 阅读全文
posted @ 2013-06-18 11:52 忆殇之痕 阅读(1259) 评论(0) 推荐(0) 编辑
摘要: 可以缓存例如头像等固定图片zy_init();window.uexOnload=function(type){ if(!type){ zy_initcache(function(){ loadWeather(); }); }}function loadWeather(){ var data=zy_imgcache('user_avatar','10', 'http://tp1.sinaimg.cn/27997... 阅读全文
posted @ 2013-06-09 16:51 忆殇之痕 阅读(238) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript">if (localStorage.pagecount) { localStorage.pagecount=Number(localStorage.pagecount) +1; }else { localStorage.pagecount=1; }if (localStorage.pagecount == 1) {window.location.href="home.html"; //引导页页面 }else {window.location.href="home.html& 阅读全文
posted @ 2013-06-09 11:41 忆殇之痕 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 一、首先查看慢查询有没有开启在命令行模式下输入mysql> show variables like '%quer%';+-------------------------------+---------+| Variable_name | Value |+-------------------------------+---------+| ft_query_expansion_limit | 20 || have_query_cache | YES || log_queries_not_using_in... 阅读全文
posted @ 2013-05-29 14:33 忆殇之痕 阅读(410) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-05-28 11:27 忆殇之痕 阅读(179) 评论(0) 推荐(0) 编辑
摘要: php二分查找法<?phpheader("Content-type: text/html; charset=utf-8");$arr=range(0,20);sort($arr);$start=0;$end=count($arr)-1;$i=6;while($start<=$end){ $k=ceil($start+($end-$start)/2); if($arr[$k]==$i){ echo $arr[$k]; return; } if($i>$arr[$k]){ $start=$k+1; }else{ ... 阅读全文
posted @ 2013-05-28 10:07 忆殇之痕 阅读(107) 评论(0) 推荐(0) 编辑
摘要: strstr($str,'m'); //截取制定字符串第一次出现的位置到最后,区分大小写;stristr($str,'m'); //和strstr一样,不区分大小写;strpos($str,'m'); //统计字符串第一次出现的位置;strrchr($str,'m'); //统计字符串最后一次出现的位置 阅读全文
posted @ 2013-05-26 19:39 忆殇之痕 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 冒泡排序法$arr=array(9,2,1,4,3,8,14,24,5);//外部循环每遍历一个数 内部循环遍历剩余的数组for($i=0,$i<count($arr);$i++){ //遍历剩余的数组部分 使用$j>$i作为判断 for($j=count($arr)-1;$j>$i;$j--){ //如果剩余的数组中有小于外层循环遍历的 则替换; if($arr[$j]<$arr[$i]){ //把小的赋值给临时变量 $tmp=$arr[$j]; //把大的... 阅读全文
posted @ 2013-05-26 00:20 忆殇之痕 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 使用函数array_count_values($arr);不使用函数$arr2=array();foreach($arr as $o){ if(!in_array($o,$arr2)){ $arr2[]=$o; $data[$o]=1; }else{ $data[$o]++; }} 阅读全文
posted @ 2013-05-24 21:10 忆殇之痕 阅读(199) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页