先来看下数据库语句:
ORM:关系对象映射 增加数据: ContentValues values = new ContentValues();
values.put("name", "小丽");
values.put("phone", "110");
mDB.insert("student",//表名
null, //规避插入语句的错误...
分类:
移动开发 时间:
2015-03-18 12:24:18
阅读次数:
168
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 e...
分类:
其他好文 时间:
2015-03-18 06:26:57
阅读次数:
109
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...
分类:
编程语言 时间:
2015-03-18 01:04:11
阅读次数:
209
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},...
分类:
其他好文 时间:
2015-03-17 23:51:32
阅读次数:
344
范围最值问题,O(nlogn)的预处理,O(1)的查询。这个题就是先对这些数列进行游程编码,重复的元素只记录下重复的次数。对于所查询的[L, R]如果它完全覆盖了某些连续的重复片段,那么查询的就是这几种元素重复最多的次数,也就是RMQ。如果[L, R]还覆盖了某一部分边界,也要单独计算取最大值。还有...
分类:
其他好文 时间:
2015-03-17 21:44:59
阅读次数:
189
Binary Tree Postorder Traversal问题:Given a binary tree, return thepostordertraversal of its nodes' values.思路: 栈方法我的代码:public class Solution { publi...
分类:
其他好文 时间:
2015-03-17 21:24:17
阅读次数:
123
有个需求:统计上级部门的销售额,制造数据如下:
drop table dept;
create table dept
(
DEPTNO number,
DEPTNAME varchar2(50),
PARENT_DEPTNO number
);
insert into dept values(1,'市场部',-1);
insert into dept values(2...
分类:
数据库 时间:
2015-03-17 20:18:54
阅读次数:
180
选择:select * from table1 where 范围
插入:insert into table1(field1,field2) values(value1,value2)
删除:delete from table1 where 范围
更新:update table1 set field1=value1 where 范围
查找:select * from table1 whe...
分类:
数据库 时间:
2015-03-17 17:59:05
阅读次数:
180
创建用户
mysql>insert into mysql.user(Host,User,Password) values("localhost","test",password("1234"));
增加了一个用户名为test、密码为1234用户,但该用户只能在本地登陆,若想远程登陆的话可将localhost改为%表示任何一台电脑都可以登陆,或改为特定的ip表示只能在特定的i...
分类:
数据库 时间:
2015-03-17 10:28:11
阅读次数:
126
prepare("insert into `vol_msg`(mid,content) values(?,?)")){ /*第一个参数是绑定类型,"s"是指一个字符串,也可以是"i",指的是int。也可以是"db", * d代表双精度以及浮点类型,而b代表blob类型,第二个参数是变量 */ $.....
分类:
数据库 时间:
2015-03-17 00:33:24
阅读次数:
182