1、错误描述
freemarker.core.ParseException: Token manager error: freemarker.core.TokenMgrError: Unknown directive: #list on line: 17, column: 61, in template: map.ftl in map.ftl
at freemarker.template.Te...
分类:
其他好文 时间:
2014-06-20 13:21:25
阅读次数:
251
JDK源码学习系列06----Vector
1.Vector简介
Vector的内部是数组实现的,它和ArrayList非常相似,最大的不同就是 Vector 是线程安全(同步)的。
public class Vector
extends AbstractList
implements List, RandomAccess, Cloneable, java.io.Se...
分类:
其他好文 时间:
2014-06-20 12:49:01
阅读次数:
298
Java集合01----ArrayList的遍历方式及应用
1.ArrayList的遍历方式
a.一般for循环(随机访问)
Integer value = null;
int size = list.size();
for (int i=0; i<size; i++) {
value = (Integer)list.get(i);
}
b.增强型for循环(for...
分类:
编程语言 时间:
2014-06-20 10:22:41
阅读次数:
240
题目
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
方法
和有序数组的思想基本一样,将链表进行二分。
TreeNode getBST(ListNode head, int len) {
i...
分类:
其他好文 时间:
2014-06-20 09:46:33
阅读次数:
267
Swift 是一种兼顾了编译语言的效率和脚本语言的简洁的一种语言。
让我惊讶的是居然支持汉字作为变量的名称,而且还有模板的支持。
其他总的来讲它本身不具有特别与别人不同的东西,很多东西在其他的语言上已经都有了比较成熟的体现,比如JS中的var, python的dict, list, go的多返回值,看起来像是一个大杂烩,很像当年iphone刚刚面世的时候的场景,它所具有的功能,其他的手机基本上...
分类:
移动开发 时间:
2014-06-20 09:15:07
阅读次数:
331
STL标准容器类学习笔记之(Vector/Deque/List)...
分类:
其他好文 时间:
2014-06-07 16:13:24
阅读次数:
262
【题目】
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 like:
1
2
3
4
\...
分类:
其他好文 时间:
2014-06-07 11:37:00
阅读次数:
153
并查集,
删除节点操作,可以用新建节点代替
维护每个点到跟节点的距离
Gears
Time Limit: 2 Seconds Memory Limit: 65536 KB
Bob has N (1 ≤ N ≤ 2*105) gears (numbered from 1 to N). Each gear can rotate clockwise or co...
分类:
其他好文 时间:
2014-06-07 11:33:37
阅读次数:
227
skiplist介绍跳表(skip
List)是一种随机化的数据结构,基于并联的链表,实现简单,插入、删除、查找的复杂度均为O(logN)。跳表的具体定义,跳表是由William
Pugh发明的,这位确实是个大牛,搞出一些很不错的东西。简单说来跳表也是链表的一种,只不过它在链表的基础上增加了跳跃功能...
分类:
其他好文 时间:
2014-06-07 07:18:01
阅读次数:
239
Partition ListGiven a linked list and a valuex,
partition it such that all nodes less thanxcome before nodes greater than or
equal tox.You should pres...
分类:
其他好文 时间:
2014-06-07 06:24:57
阅读次数:
179