码迷,mamicode.com
首页 >  
搜索关键字:array    ( 29504个结果
Javascript 类数组(Array-like)对象
Javascript中的类数组对象(Array-like object)指的是一些看起来像数组但又不是数组的对象。Javascript中的arguments变量、document.getElementsByTagName()返回值就是典型的类数组对象。 类数组特性 类数组对象具有一个length属性 ...
分类:编程语言   时间:2016-05-17 17:41:38    阅读次数:412
TP框架基础(四)----添加数据
【数据添加】 add() 该方法返回被添加的新记录的主键id值 两种方式实现数据添加 1. 数组方式数据添加 $goods = D(“Goods”); $arr = array(‘goods_name’=>’iphone5s’,’goods_weight’=>’109’); //注意:goods_n ...
分类:其他好文   时间:2016-05-17 17:28:40    阅读次数:177
javascript数组浅谈1
最近心血来潮要开始玩博客了,刚好也在看数组这块内容,第一篇就只好拿数组开刀了,自己总结的,有什么不对的地方还请批评指正,还有什么没写到的方面也可以提出来我进行完善,谢谢~~ 首先,大概说说数组的基本用法。 数组,即Array类型,是开发中最常用的类型之一,javascript中的数组和其他语言最大的 ...
分类:编程语言   时间:2016-05-17 15:59:39    阅读次数:169
POJ 2823 Sliding Window ST RMQ
Description An array of size n ≤ 106 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very ...
分类:Windows程序   时间:2016-05-17 13:21:18    阅读次数:372
Objective-C中NSArray和NSMutableArray是如何使用的?
Objective-C的数组比C++,Java的数组强大在于,NSArray保存的对象可以是不同的对象。但只能保存对象,int ,char,double等基本数据类型不能直接保存,需要通过转换成对象才能加入数组。 1、NSArray 不可变数组 [array count] : 数组的长度。 [arr ...
分类:其他好文   时间:2016-05-17 13:05:15    阅读次数:156
Remove Duplicates from Sorted Array II
Follow up for ”Remove Duplicates”: What if duplicates are allowed at most twice?For example, Given sorted array A = [1,1,1,2,2,3],Your function should ...
分类:其他好文   时间:2016-05-17 11:21:44    阅读次数:121
堆排序的OC实现
/* 建议先看堆调整方法,堆调整了解了,整个排序算法就算掌握了 */ - (void)viewDidLoad { [super viewDidLoad]; /* 测试数据 */ NSArray *array=@[@3,@2,@6,@4,@1,@0,@6,@7,@5]; NSMutableArray ...
分类:编程语言   时间:2016-05-17 11:20:33    阅读次数:281
valueForKeyPath
可能大家对- (id)valueForKeyPath:(NSString *)keyPath方法不是很了解。 其实这个方法非常的强大,举个例子: NSArray *array = @[@"name", @"w", @"aa", @"jimsa"]; NSLog(@"%@", [array value ...
分类:其他好文   时间:2016-05-17 11:12:49    阅读次数:179
2016.5.16——leetcode:Rotate Array,Factorial Trailing Zeroe
Rotate Array 本题目收获: 题目: 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 ...
分类:其他好文   时间:2016-05-17 09:53:52    阅读次数:296
Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear only onceand return the new length.Do not allocate extra space for ...
分类:其他好文   时间:2016-05-17 09:44:53    阅读次数:143
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!