码迷,mamicode.com
首页 >  
搜索关键字:list dict    ( 58606个结果
android 工具类 数据库管理
数据库工具类,优雅的管理android中的sqlite package csdn.shimiso.eim.db; import java.util.ArrayList; import java.util.List; import android.content.ContentValues; import android.database.Cursor; import android.da...
分类:移动开发   时间:2014-06-03 05:11:12    阅读次数:394
java基础之集合List-ArrayList、LinkedList、Vector的区别
请问ArrayList、LinkedList、Vector的区别 ①ArrayList底层实际上是采用数组实现的(并且该数组的类型的Object类型的) ②如果jdk6,采用Array.copyOf()方法来生成一个新的数组,如果是jdk5,采用的是System.arraycopy()方法(当添加的数据量大于数组的长度时候) ③List list = newArrayList()时,底层会生成一个长度为10的数组来存放对象 ④ArrayList、Vector底层都是采用数组实现的 ⑤对于ArrayLis...
分类:编程语言   时间:2014-06-03 04:20:31    阅读次数:304
LeetCode: Remove Duplicates from Sorted List [082]
【题目】 Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1->2->3->3, return 1->2->3. 【题意】 给定一个已排序的链表,删除其中的重复元素 【思路】 维护两个指针prev和cur, cur指针负责扫描链表,prev指向cur的前一...
分类:其他好文   时间:2014-06-03 04:05:39    阅读次数:231
LeetCode:Reorder List
Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…   You must do this in-place without altering the nodes' values.   For example, Given {1,2,3,4}, r...
分类:其他好文   时间:2014-06-03 03:12:46    阅读次数:222
LeetCode: Partition List [086]
【题目】 Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the nodes in each of the two partitions. For example, Given 1->4->3-...
分类:其他好文   时间:2014-06-03 00:02:29    阅读次数:270
HashMap的两种排序方式
Map map = new HashMap(); map.put("d", 2); map.put("c", 1); map.put("b", 1); map.put("a", 3); List> infoIds = new ArrayList>(map.entrySet()); //排序前 for (int i = 0; i < infoIds.size(); i++) { ...
分类:其他好文   时间:2014-06-02 23:05:01    阅读次数:279
抽象工厂
1、消息接口namespace IBLL{ public interface IMsg { List GetMsgList(); }}View Code2、消息A实现namespace BLLA.Abs{ /// /// 抽象工厂调用 /// ...
分类:其他好文   时间:2014-05-31 21:11:19    阅读次数:296
简单工厂
1、消息产品接口namespace IBLL{ public interface IMsg { List GetMsgList(); }}View Code2、消息A实现 public class Msg:IBLL.IMsg { public ...
分类:其他好文   时间:2014-05-31 21:07:59    阅读次数:311
json 生成 json字符串
生成json格式的字符串。需要相关包 1 package cn.itcast.controller; 2 3 import static org.junit.Assert.*; 4 5 import java.util.ArrayList; 6 import java.util.List; 7 .....
分类:Web程序   时间:2014-05-31 19:27:44    阅读次数:348
SplendidCRM中给来自EditView中的listbox控件设置选中值或数据源
DropDownList list = this.findContol("aas") as DropDownList;list.DataSource = new DataTable() ------------------------------- Control ctl = this.FindCo...
分类:其他好文   时间:2014-05-31 19:12:44    阅读次数:171
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!