/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(...
分类:
其他好文 时间:
2014-06-24 13:40:33
阅读次数:
214
方法一 注:需要.net 3.5框架的支持string s = "101,102,103,104,105,101,102,103,104,105,106,107,101,108";s = string.Join(",", s.Split(',').Distinct().ToArray());方法二c...
分类:
其他好文 时间:
2014-06-23 06:01:57
阅读次数:
256
Minimum Path Sum:Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along...
分类:
其他好文 时间:
2014-06-22 23:06:39
阅读次数:
290
1.classmethods
such
as select/update/insert/delete queries。
# Example:
class User(Model):
username = CharField()
join_date = DateTimeField()
is_admin = BooleanField()
u = User(use...
分类:
编程语言 时间:
2014-06-22 21:27:39
阅读次数:
436
1.基本教程学习
大概三天业余时间看完下面两个教程。
HTML文字教程
CSS文字教程
2.练习
看完教程后,做第一练习时,总结如下:
1)div居中
需要设置属性:margin-left:auto; margin-right:auto;
2) 给图片加链接后,图片有边框,消除边框方法:给图片设置属性 border-width:0px;
3)图片相连时,图片间有距离,消除...
分类:
Web程序 时间:
2014-06-22 17:02:52
阅读次数:
253
关于这个题想说一下,刚开始准备按照有一个含有n个数的非递减序列,每个数最大值为m,数字可以重复,有多少种这样的序列,像是一个蛮复杂的排列组合
其实这道题,从left bottom到right up只能向右或者向上,也就是m+n个格子里面取m个格子写右,n个格子写上,就成了个很2的排列组合问题
值得强调的是,这个题求组合数是用分数相乘来求的,怕double丢精度可以末尾+0.5然后转化为long...
分类:
其他好文 时间:
2014-06-22 16:53:21
阅读次数:
135
OceanBase要求schema强类型约束,也就是要预先定义好schema。这与传统的数据库基本相同,与很多nosql的schema-free大相径庭。
也就是说,OceanBase的数据模式是基于关系模型的。关系模型通过关系分解消除数据结构的复杂性,获得了对数据查询的能力和灵活性。而关系模型的缺点也是因为关系分解,使得在需要“组装”的数据时要进行join操作,而join则是相当耗时的操作。
大部分的NoSQl产品以MongoDb为代表,是基于文档模型的,...
分类:
数据库 时间:
2014-06-22 14:52:00
阅读次数:
333
Description
Let S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways:
q By an integer sequence P = p1 p2...pn where pi is the number of left parentheses...
分类:
其他好文 时间:
2014-06-22 14:06:49
阅读次数:
249
5个核心的SQL语句1.SELECT-查询语句的逻辑处理顺序5 SELECT 1 FROM 1.1 FROM JOIN ON 2 WHERE 3 GROUP BY 4 HAVING 6 ORDER BY -FROM子句: 处理联结语句的顺序1、交叉联结,也称笛卡尔积;2、内联结;3、外联结。-GRO...
分类:
数据库 时间:
2014-06-21 17:40:51
阅读次数:
440
SELECT a.id,b.name FROM tab1 AS a LEFT JOIN tab2 AS b ON(a.id = p.id) WHERE a.id > 10以上sql返回的结果中name列也许会出现 null 的情况,那么在name字段上使用什么函数可以将出现的 null 改为一个默认...
分类:
其他好文 时间:
2014-06-21 14:27:50
阅读次数:
194