周末折腾一下Ubuntu 14.04,稍作记录:1. 切换源,我还是钟情163的(ps,
这里如果用的以前13.04时候163的源会有问题,记得配置最新的)$ sudo cp /etc/apt/sources.list
/etc/apt/sources.list.origin$ sudo gedit...
分类:
其他好文 时间:
2014-05-06 00:13:19
阅读次数:
376
1、扩展BaseExpandableListAdapter实现ExpandableListAdapter2、使用SimpleExpandableListAdapter将两个List集合包装成ExpandableListAdapter3、使用SimpleCursorTreeAdapter将Cursor...
分类:
其他好文 时间:
2014-05-05 23:43:51
阅读次数:
280
C++开发的项目难免会用到STL的string,使用管理都比char数组(指针)方便的多,但在得心应手的使用过程中也要警惕几个小陷阱,避免我们项目出bug却迟迟找不到原因。1.
结构体中的string赋值问题直接通过一个例子说明,下面的例子会输出什么:#include #include #i...
分类:
编程语言 时间:
2014-05-05 23:33:45
阅读次数:
413
1.[root@rusky ]# vi list
#如果testfile不存在,则vi会自动创建一个名为testfile的文件,并在Vi打开该文件等待用户输入内容。2.[root@rusky ]# ls -l
>listfile #利用重定向,将ls -l 的执行结果输出到新文件listfile.....
分类:
其他好文 时间:
2014-05-05 23:21:35
阅读次数:
381
STL的组成标准模板库STL关注的重点是泛型数据结构和算法,其关键组成部分是容器(containers)、算法(algorithms)、迭代器(iterators)、函数对象(Function
Object)、适配(Adaptor)。本文地址:http://www.cnblogs.com/archi...
分类:
其他好文 时间:
2014-05-05 23:00:10
阅读次数:
360
指针与数组指针与其它数据结构呢?比如说链表?存储空间是非连续的。不能通过对指向这种数据结构的指针做累加来遍历。能不能提供一个行为类似指针的类,来对非数组的数据结构进行遍历呢?这样我们就能够以同样的方式来遍历所有数据结构(容器)。迭代器(Iterator)是指针(pointer)的泛化,它允许程序员以...
分类:
其他好文 时间:
2014-05-05 22:54:24
阅读次数:
596
遇到的问题:input{1,1,1}, output{1,1}, expected{1},
原因在于若temp.val==temp.next.val, 则需要temp.next=temp.next.next,
这时候就不要temp=temp.next了注意停止条件不光是temp!=null,还应该有...
分类:
其他好文 时间:
2014-05-05 22:47:08
阅读次数:
454
Link:http://oj.leetcode.com/problems/reverse-nodes-in-k-group/Given a linked
list, reverse the nodes of a linked listkat a time and return its modifie...
分类:
其他好文 时间:
2014-05-05 22:46:42
阅读次数:
456
Link:http://oj.leetcode.com/problems/reverse-linked-list-ii/Reverse a linked
list from positionmton. Do it in-place and in one-pass.For example:Given1...
分类:
其他好文 时间:
2014-05-05 22:46:11
阅读次数:
411
Link:http://oj.leetcode.com/problems/swap-nodes-in-pairs/Given a linked list,
swap every two adjacent nodes and return its head.For example,Given1->2-...
分类:
其他好文 时间:
2014-05-05 22:45:37
阅读次数:
331