<!--用于判断页面传值控制界面是否只读--><script> function checkType() { var aQuery = window.location.href.split("?"); //取得Get参数 var aGET = new Array(); if (aQuery.leng ...
分类:
其他好文 时间:
2016-08-26 13:32:58
阅读次数:
136
转自:http://www.jb51.net/article/24182.htm 上面的代码表示获取文档中的所有链接元素,然后遍历做一些事情。 也许你会问,通过这种方法获取的这一组dom元素不就是一个数组吗?你看,你都 可以直接获取它的length属性,还可以根据索引取到对应的单独元素,根据大牛的著 ...
分类:
编程语言 时间:
2016-08-26 12:13:36
阅读次数:
177
1、当用到集合in(x,x...)参数可以单个或者多个 ,当为单个时: findbyIds(List<Long> ids),或者findByids(Long [] ids) 当为数组时 collection="array" 2 当查询的参数有多个时,例如 findByIds(String name, ...
分类:
数据库 时间:
2016-08-26 12:02:48
阅读次数:
221
题目: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra spac ...
分类:
其他好文 时间:
2016-08-26 06:40:13
阅读次数:
229
四种标量类型: 1布尔boolean 2integar 整型 3float (浮点型, 也称作 double) 4string (字符串) 两种复合类型:array (数组) object (对象) 最后是两种特殊类型: resource (资源) NULL (NULL) ...
分类:
Web程序 时间:
2016-08-26 06:33:53
阅读次数:
279
支持更改长度/** * 生成唯一订单号 * */ function build_order_no(){ return date('Ymd').substr(implode(NULL, array_map('ord', str_split(substr(uniqid(), 7, 13), 1))), ...
分类:
Web程序 时间:
2016-08-26 01:25:29
阅读次数:
169
提取二维数组相同的键和键对应的值组成一个新的一维数组, tp不支持此函数,所以自己在php中找到,写在了tp的function下//array_column — 返回数组中指定的一列 function arrayColumn(array $array, $column_key, $index_key ...
分类:
编程语言 时间:
2016-08-26 01:11:14
阅读次数:
227
修改后台评论模型 创建search方法 //取出一件商品的评论 public function search($goodsId,$pageSize=5) { //要做ajax翻页 所以要自己写 $where['a.goods_id']=array('eq',$goodsId); //取出总的记录数 ...
分类:
Web程序 时间:
2016-08-25 23:43:15
阅读次数:
284
题目: Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. ...
分类:
其他好文 时间:
2016-08-25 23:41:16
阅读次数:
177
PHP PDO使用fetchAll()方法获取结果集 PHP PDO使用fetchAll()方法获取结果集 fetchAll()方法获取结果集中的所有行数据记录。 fetchAll()方法的语法格式如下: array PDOStatement::fetchAll([int fetch_style[, ...
分类:
其他好文 时间:
2016-08-25 23:35:10
阅读次数:
226