码迷,mamicode.com
首页 >  
搜索关键字:array    ( 29504个结果
JavaScript NodeList和Array
原文引用脚本之家作者:Jeff Wong,谢谢大神提供资源在Web前端编程中,我们通常会通过document.getElementsByTagName或者document.getElementsByClassName的方法取出一组相同标签的dom元素。如下 var anchors = documen...
分类:编程语言   时间:2014-06-27 00:11:31    阅读次数:344
JavaScript NodeList和Array
原文:JavaScript NodeList和Array原文引用脚本之家作者:Jeff Wong,谢谢大神提供资源在Web前端编程中,我们通常会通过document.getElementsByTagName或者document.getElementsByClassName的方法取出一组相同标签的do...
分类:编程语言   时间:2014-06-26 23:56:38    阅读次数:403
php empty
empty(PHP 4, PHP 5)empty—检查一个变量是否为空说明boolempty(mixed$var)如果var是非空或非零的值,则empty()返回FALSE。换句话说,""、0、"0"、NULL、FALSE、array()、var $var;以及没有任何属性的对象都将被认为是空的,如...
分类:Web程序   时间:2014-06-26 21:40:02    阅读次数:179
PHP中array_chunk的用法
转自:http://cn2.php.net/manual/zh/function.array-chunk.php(PHP 4 >= 4.2.0, PHP 5)array_chunk—将一个数组分割成多个说明arrayarray_chunk(array$input,int$size[,bool$pre...
分类:Web程序   时间:2014-06-26 21:39:22    阅读次数:252
数组与对象基本操作(JQuery)
首先呢,你要理解什么是数组什么是对象。数组(array):是一种有序的值的集合。对象(object):是一种无序的属性集合,每个属性都有自己的名字和值。$符号是JQuery符 1 jQuery.each(object, [callback]) 遍历数组或对象 2 参数: 3 object:需...
分类:Web程序   时间:2014-06-26 19:20:19    阅读次数:255
自己用的javascript 共用函数
/** * 返回數組某個值的下標 * */Array.prototype.position = function(val){ for(var i in this){ if(this[i]==val){ return i; bre...
分类:编程语言   时间:2014-06-25 11:51:27    阅读次数:382
无限级分类
$area = array(array('id'=>1,'name'=>'安徽','parent'=>0),array('id'=>2,'name'=>'海淀','parent'=>7),array('id'=>3,'name'=>'濉溪县','parent'=>5),array('id'=>4,'...
分类:其他好文   时间:2014-06-25 11:05:07    阅读次数:273
FlatBuffers与protobuf性能比较
FlatBuffers发布时,顺便也公布了它的性能数据,具体数据请见Benchmark。     它的测试用例由以下数据构成"a set of about 10 objects containing an array, 4 strings, and a large variety of int/float scalar values of all sizes, meant to be rep...
分类:其他好文   时间:2014-06-25 09:56:50    阅读次数:431
Some useful methods about linkedList.
/** * Method 1: Delete the input element x  * and meanwhile keep the length of array after deleted n * @param a  the array * @param n  the length of array after deleted. * @param x  the element t...
分类:其他好文   时间:2014-06-25 08:27:27    阅读次数:171
LeetCode: Longest Consecutive Sequence [128]
【题目】 Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [100, 4, 200, 1, 3, 2], The longest consecutive elements sequence is [1, 2, 3, 4]. Return its length: 4. Your algorithm should run...
分类:其他好文   时间:2014-06-25 07:55:42    阅读次数:244
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!