码迷,mamicode.com
首页 >  
搜索关键字:list    ( 54897个结果
python函数式编程
1 把函数赋值给变量 >>> f = abs >>> f(-10) 102 高阶函数 def add(x, y, f): return f(x) + f(y)3 map 函数接收两个参数,一个是函数,一个是序列,传入的函数依次作用到序列的每个元素,并把结果作为新的list返回。 4 reduce。r ...
分类:编程语言   时间:2016-07-22 13:02:28    阅读次数:179
java使用while或for遍历Collection对象
深入for,while,foreach遍历 +Iterator publicclass Test3 { publicstaticvoid main(String[] args) { List l = new ArrayList(); l.add("世界你好!"); l.add("上海"); for  ...
分类:编程语言   时间:2016-07-22 12:46:36    阅读次数:154
redis - java 基本操作
import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import junit.framework.TestCas ...
分类:编程语言   时间:2016-07-22 11:30:46    阅读次数:177
【Leetcode解题报告】快慢指针
Linked List Cycle、 Linked List Cycle II、 Remove Nth Node from End of List、 Intersection of Two Linked Lists ...
分类:其他好文   时间:2016-07-22 08:48:10    阅读次数:1332
JAVA集合复习
Collection ├List │├LinkedList │├ArrayList │└Vector │ └Stack └Set Map ├Hashtable ├HashMap └WeakHashMap Collection接口   Collection是最基本的集合接口,一个Collection代表一组Object,即Collection的元素(E...
分类:编程语言   时间:2016-07-22 06:36:08    阅读次数:210
[Angular 2] ROUTING IN ANGULAR 2 REVISITED
Let's say we have a list of contacts, click each contact, we can render a new route to get the detail. Define the routers: path: '', --> here empty pa ...
分类:其他好文   时间:2016-07-22 06:30:36    阅读次数:498
Flatten Nested List Iterator
Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list -- whose elements may also be integ ...
分类:其他好文   时间:2016-07-22 01:09:03    阅读次数:168
MUI(3)
本篇博文是继续上篇博文MUI(2)。上面这幅图是博文MUI(1)中实现的效果,在博文MUI(1)中提到了2个页面,一个页面是index.html,另一个页面是index_list.html页面。上面这幅图中红色框子是index.html页面,蓝色框子是index_list.html页面。两个页面本来 ...
分类:其他好文   时间:2016-07-21 23:52:34    阅读次数:564
IEnumerable.Select和SelectMany的区别
例子(一个人可以有多个手机) 总结 1、SELECT是把操作源的指定元素放到一个新的集合中 2、SELECTMANY的操作可以看做是两步,第一步与SELECT差不多(生成多个List<Phone>),第二步IEnumerable的元素合并成一个(将List<List<Phone>>合并成新的、大的L ...
分类:编程语言   时间:2016-07-21 21:37:04    阅读次数:148
Java中对List集合内的元素进行顺序、倒序、随机排序的示例代码
使用Collections类的sort(),reverse(),shuffle()方法对集合中的元素进行顺序、倒序、随机排序操作 ...
分类:编程语言   时间:2016-07-21 21:34:24    阅读次数:309
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!