关键代码: public static void Bind(this RepositoryItemComboBox combox, ICollection source) { /*说明: *所涉及的列叙设定FieldName,否则会出现无法选中的问题; *eg: *List...
分类:
其他好文 时间:
2014-07-01 23:38:58
阅读次数:
583
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ListSort{ class Program { static void Main(st...
分类:
其他好文 时间:
2014-07-01 23:07:41
阅读次数:
252
题目:Remove Nth Node From End of ListGiven a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1.....
分类:
其他好文 时间:
2014-07-01 20:34:50
阅读次数:
232
1 什么是redis
redis是一个key-value存储系统。和Memcached类似,它支持存储的value类型相对更多,包括string(字符串)、list(链表)、set(集合)和zset(有序集合)。这些数据类型都支持push/pop、add/remove及取交集并集和差集及更丰富的操作,而且这些操作都是原子性的。在此基础上,redis支持各种不同方式的排序。与memcached一...
分类:
其他好文 时间:
2014-06-30 20:25:48
阅读次数:
205
题目
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.
Return a deep copy of the list.
方法
publi...
分类:
其他好文 时间:
2014-06-30 19:36:33
阅读次数:
163
题目
Given a binary tree, flatten it to a linked list in-place.
For example,
Given
1
/ 2 5
/ \ 3 4 6
The flattened tree should look lik...
分类:
其他好文 时间:
2014-06-30 18:13:31
阅读次数:
229
当你在计算机上想启动一个服务,计算机却提示"port already in use",此时,可以使用lsof命令来查看那个进程占用了该端口(lsof -i:port). lsof是LiSt Open Files的缩写,在linux环境下,任何事物都以文件的形式存在,通过文件不仅仅可以访问常规数据,还可以访问网络连接和硬件。
lsof的使用方法如下:
qsun@qsun-VirtualBox:~...
分类:
其他好文 时间:
2014-06-30 17:14:58
阅读次数:
307
ArrayList是基于数组实现的,是一个动态数组,其容量能自动增长,类似于C语言中的动态申请内存,动态增长内存。
ArrayList不是线程安全的,只能用在单线程环境下,多线程环境下可以考虑用Collections.synchronizedList(List l)函数返回一个线程安全的ArrayList类,也可以使用concurrent并发包下的CopyOnWriteArrayList类。
ArrayList实现了Serializable接口,因此它支持序列化,能够通过序列化传输,实现了R...
分类:
编程语言 时间:
2014-06-30 17:01:32
阅读次数:
240
两个月之前准备软考时,简单的从理论上总结了最常用的数据结构和算法,比如:线性表,链表,图。在进行java开发时,jdk为我们提供了一系列相应的类来实现基本的数据结构。jdk所提供的容器API位于java.util包内。本文主要是通过简单的介绍Collection集合,向读者简单阐述各个类的基本定义以及其作用,为后面的学习做一下铺垫。
首先,我们先看一下Collection集合的基本结构:...
分类:
编程语言 时间:
2014-06-30 16:39:03
阅读次数:
271
首先是JiaoyuzixunActivity.java代码部分:packagecom.gaoxiaotong.ctone.jiaoyuzixun;
importjava.util.ArrayList;
importjava.util.HashMap;
importjava.util.Iterator;
importjava.util.List;
importjava.util.Map;
importorg.json.JSONArray;
importorg.json.JSONObject;..
分类:
移动开发 时间:
2014-06-30 15:57:01
阅读次数:
505