[leetcode]Given a binary tree, return the preorder traversal of its nodes' values....
分类:
其他好文 时间:
2014-09-22 13:38:03
阅读次数:
215
SimpleJdbcTemplate更新操作
String insertsql="insert into users values(2,'lisi',2)";
//向表中插入一行记录,row表示受影响的行数
int row=stj.update(insertsql);
System.out.println(row);//1...
分类:
数据库 时间:
2014-09-22 11:00:02
阅读次数:
255
前提:
三层中我们已经知道D层主要的作用是针对数据库,进行基本的操作(数据连接和增删该查功能)
1、基本的sql语句
查:SELECT 字段名列表 FROM 数据表名 where"条件"
增 INSERT INTO 表名(字段名1,字段名2..)VALUES("表达式1","表达式2")
该 UPDATE 表名 SET 字段名1 ="表达式1",字段名2 ="表达式2".... W...
分类:
数据库 时间:
2014-09-22 00:27:01
阅读次数:
292
数据库字段:create_date,类型为datetime执行以下SQL语句 insert into XX (create_date) values (?)参数传递为 new java.util.Date()报错如下:Datatruncation:Incorrectdatetimevalue:''f...
分类:
数据库 时间:
2014-09-21 18:14:31
阅读次数:
182
HashMap底层用哈希算法实现,下面看一下哈希算法的整体概括:
当map.put(“key”,”values”);的时候,底层是这样的:
static final Entry[] EMPTY_TABLE = {};
transient Entry[] table = (Entry[]) EMPTY_TABLE;
/**
* The number of key-...
分类:
其他好文 时间:
2014-09-21 16:37:10
阅读次数:
361
一条insert语句批量插入多条记录常见的insert语句,向数据库中,一条语句只能插入一条数据:insertintopersons(id_p,lastname,firstName,city)values(204,'haha','deng','shenzhen');(如上,仅插入了一条记录)怎样一次...
分类:
其他好文 时间:
2014-09-20 18:37:49
阅读次数:
273
1.在res目录下新建目录values-zh-rCN,并在values-zh-rCN目录下新建strings.xml,可以根据安卓系统的操作语言的不同显示相应的语言。2.LogCat(后台日志监控):5个打印级别:verbose详细,debug调试,info通知,warn警告,error错误过滤器增...
分类:
其他好文 时间:
2014-09-20 18:01:59
阅读次数:
296
Strings are constant; their values cannot be changed after they are created String s1 = "Hello";String s2 = "Hello";System.out.println(s1==s2); //true...
分类:
其他好文 时间:
2014-09-20 17:16:59
阅读次数:
185
Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note...
分类:
其他好文 时间:
2014-09-20 14:19:48
阅读次数:
204
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}, reorder it to ...
分类:
其他好文 时间:
2014-09-20 10:07:27
阅读次数:
162