A string is a sequence of characters and a list is a sequence of values, but a list of characters is not the same as a string. To convert from a strin...
分类:
其他好文 时间:
2014-07-15 09:00:12
阅读次数:
244
for (a,d) in aa{println("\(a)\(d)") for a in aa.keys{//aa.keys可以转化成array(aa.keys) println("\(a)") } for b in aa.values{ println...
分类:
其他好文 时间:
2014-07-14 08:07:46
阅读次数:
166
创建表create table t_user(username varchar(20),password varchar(20));insert into t_user values('aa','aa');导入jdbc驱动e:\oracle\product\10.1.0\Db_3\jdbc\lib\...
分类:
数据库 时间:
2014-07-13 23:20:15
阅读次数:
460
建立主表:create table a1 (id int ,name char(20));建立附表:create table a2 (tid int ,name char(20));分别插入数据:mysql> insert into a1 values (1,'baidu');Query OK, 1...
分类:
其他好文 时间:
2014-07-13 22:42:45
阅读次数:
223
直接构造insert into t (c1, c2, c3) values (1, 1, 1), (2, 2, 2)使用UNIONinsert into t (c1, c2, c3) (select a1, a2, a3) union all (select b1, b2, b3)利用查询结果ins...
分类:
数据库 时间:
2014-07-13 19:58:40
阅读次数:
232
Given a binary tree, return the preorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,2,3].
/**
* Definition for bi...
分类:
其他好文 时间:
2014-07-13 18:46:25
阅读次数:
249
Given a binary tree, return the postorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [3,2,1].
Note: Recursive solut...
分类:
其他好文 时间:
2014-07-13 17:18:19
阅读次数:
193
Android自定义View实现很简单继承View,重写构造函数、onDraw,(onMeasure)等函数。如果自定义的View需要有自定义的属性,需要在values下建立attrs.xml。在其中定义你的属性。在使用到自定义View的xml布局文件中需要加入xmlns:前缀="http://schemas.android.com/apk/res/你的..
分类:
移动开发 时间:
2014-07-13 14:52:51
阅读次数:
211
1、数据插入2、数据更新3、数据删除4、更新和删除的指导原则1、数据插入-INSERT插入数据可以使用以下几种方式:插入完整的行插入行的一部分插入多行插入某些查询的结果Syntax:
INSERT[LOW_PRIORITY|DELAYED|HIGH_PRIORITY][IGNORE]
[INTO]tbl_name[(col_name,...)]
{VALUES|VAL..
分类:
数据库 时间:
2014-07-13 14:35:05
阅读次数:
328
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree and sum
...
分类:
其他好文 时间:
2014-07-13 13:58:01
阅读次数:
184