码迷,mamicode.com
首页 >  
搜索关键字:return array    ( 86705个结果
NSNumber包装
//1.创建一个数组对象 int、float、char等等C语言的类型无法直接放到OC的数组里面 NSMutableArray*array = [NSMutableArrayarrayWithObjects:@"1",@"2",nil]; //2.使用NSNumber对NSInte...
分类:其他好文   时间:2014-04-30 00:53:19    阅读次数:519
seajs 使用 jquery插件
define(function(require,exports,moudles){ return function(jquery){ (function($) { $.fn.pri= function() { alert...
分类:Web程序   时间:2014-04-30 00:07:13    阅读次数:634
[LeetCode] 4Sum
Given an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives the sum of ...
分类:其他好文   时间:2014-04-29 22:40:00    阅读次数:438
语法的省略不能造成编译器的歧义
package exp { object Main { def main(args: Array[String]): Unit = { B[String].say("hello"); //B[String]后的括号可以省略,编译器知道这不是要用类型B而是要...
分类:其他好文   时间:2014-04-29 22:15:21    阅读次数:500
【javascript 引用类型(一)】
javascript 的引用类型大致分为:Object 类型、Array 类型、Date 类型、RegExp 类型、Function 类型、基本包装类型和单体内置对象。这里我们着重介绍Object 类型、Array 类型和RegExp 类型。【Object 类型】创建Object 实例的方式有两种,...
分类:编程语言   时间:2014-04-29 20:54:12    阅读次数:606
JavaScript中的匿名函数及函数的闭包以及作用域
1。1、匿名函数函数是JavaScript中最灵活的一种对象,这里只是讲解其匿名函数的用途。匿名函数:就是没有函数名的函数。1.1 函数的定义,首先简单介绍一下函数的定义,大致可分为三种方式第一种:这也是最常规的一种function double(x){ return 2 * x; }第二...
分类:编程语言   时间:2014-04-29 18:34:42    阅读次数:694
Oracle——函数
CREATE FUNCTION annual_income(spNAme VARCHAR2) RETURN NUMBER IS yearSal number(7,2);BEGIN SELECT (sal+NVL(comm,0))*12 INTO yearSal FROM emp WHERE enam...
分类:数据库   时间:2014-04-29 18:08:00    阅读次数:497
《Cracking the Coding Interview》——第17章:普通题——题目8
2014-04-28 23:35题目:最大子数组和问题。解法:O(n)解法。代码: 1 // 17.8 Find the consecutive subarray with maximum sum in an array. 2 // O(n) online algorithm. 3 #include...
分类:其他好文   时间:2014-04-29 16:35:28    阅读次数:429
《Cracking the Coding Interview》——第17章:普通题——题目12
2014-04-29 00:04题目:给定一个整数数组,找出所有加起来为指定和的数对。解法1:可以用哈希表保存数组元素,做到O(n)时间的算法。代码: 1 // 17.12 Given an array of integers and target value, find all pairs in ...
分类:其他好文   时间:2014-04-29 15:08:13    阅读次数:469
《Cracking the Coding Interview》——第18章:难题——题目3
2014-04-29 01:02题目:从m个整数里随机选出n个整数,要求等概率。解法:和洗牌的算法类似,每次随机抽出一个数,抽n次即可。时间复杂度O(m * n),空间复杂度O(m)。代码: 1 // 18.3 pick m integers randomly from an array of n ...
分类:其他好文   时间:2014-04-29 14:42:32    阅读次数:345
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!