mount()的最后一个参数data是传给文件系统解释的,有兴趣可以跟踪一下系统调用mount的流程(以vfat为例):sys_mount()-->do_mount()-->do_add_mount()-->do_kern_mount()-->do_kern_mount()-->get_sb_bde...
分类:
其他好文 时间:
2014-07-24 10:18:13
阅读次数:
281
题目:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a sin....
分类:
编程语言 时间:
2014-07-24 10:01:23
阅读次数:
223
在我们用ArrayList类调用add或者remove方法后,特别要注意:此时ArrayList的对象的列表的元素个数以及指定索引位置的元素值已经发生了变化。下面我们举代码进行详细说明。调用remove方法后发生的的变化package personal.hushunfeng;/** * @autho...
分类:
其他好文 时间:
2014-07-24 09:49:53
阅读次数:
279
题目:10954 - Add All
题目大意:求n个数的和,但是有点不一样的是题目要求计算最少花费。每次两个数相加,得到的那个数就是每次计算的cost。
解题思路:之前没有想到用multiset,自己写好麻烦。要求cost 最小的话,说明每次都将这些数里面最小的两个做相加,这样每次花费都是最小的。用multiset,就可以将每次计算的结果插入这些已经有序的数据中相应的位置,使...
分类:
其他好文 时间:
2014-07-23 22:35:17
阅读次数:
234
题目链接题意:给出几个基因片段,要求你将它们排列成一个最短的序列,序列中使用了所有的基因片段,而且不能翻转基因。分析:先计算出add数组,再dfs枚举。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7...
分类:
其他好文 时间:
2014-07-23 22:11:17
阅读次数:
281
public static void main(String[] args) { List list = new ArrayList(); for (int i = 0; i < 8000; i++) { list.add(i); } System.out.println(list); int...
分类:
编程语言 时间:
2014-07-23 20:38:35
阅读次数:
1260
public?static?void?tt(){
????List<String>?list?=?new?ArrayList<String>();
????list.add(?"0"?);
????list.add(?"1"?);
????list.add(?"2"?);
????list.add(?"3"?);
...
分类:
编程语言 时间:
2014-07-23 18:13:08
阅读次数:
232
调试中发现同时写的NB代码
test.c
int add(string);
int main()
{
char* p = "11222";
add(p);
return 0;
}
int add(string)
{
return 0;
}
用c编译类型都可以不写,默认类型是整型,太容易出笔误了吧...
分类:
编程语言 时间:
2014-07-23 18:07:46
阅读次数:
262
Add Two NumbersYou are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes co...
分类:
其他好文 时间:
2014-07-23 16:51:51
阅读次数:
251
1.部门和员工的关系:部门员工是一对多的关系,即一个部门有多个员工,所以员工表里有部门id:depart_id在下面这个代码中各添加部门和员工的一个记录即:新增一个部门,同时这个部门下有一个员工static Department add() { Session s = null; Transac.....
分类:
系统相关 时间:
2014-07-23 16:16:51
阅读次数:
266