昨天写了 The Query on the
Tree 的解题报告,但是遗留下一个问题,不能算是完美解决这道题.因为如果精心构造数据的话,昨天的题解还是会被卡住的.今天中午睡觉的时候突然想起一个不会被卡住的方法.题意 有一棵树,树的每个点有点权,每次有三种操作: 1.
Query x 表示查询以x...
分类:
其他好文 时间:
2014-06-06 16:32:02
阅读次数:
266
--减 就写成-1 --月 update 表 set
fhdate=DateAdd(M,-1,fhdate) where ...select dateadd(M,2,getdate()) --天数select
dateadd(day,2,getdate()) --年select dateadd(.....
分类:
其他好文 时间:
2014-06-06 15:11:58
阅读次数:
196
Given a sorted linked list, delete all
duplicates such that each element appear onlyonce.For
example,Given1->1->2, return1->2.Given1->1->2->3->3,
retu...
分类:
其他好文 时间:
2014-06-06 14:54:28
阅读次数:
221
1.Update Value On: 指明了参数在何时编号1.1 Each Occurrence :
只要发现该参数就重新取值;1.2 Each iteration :每次反复都要取新值(各个并发会共享同一个值,用于多次引用参数且相关的情况);1.3 Once
:在所有的反复中都使用同一个值(仅在场...
分类:
其他好文 时间:
2014-06-06 14:02:47
阅读次数:
198
利用GeneratedKeyHolder获得新建数据主键值Spring利用GeneratedKeyHolder,提供了一个可以返回新增记录对应主键值的方法
:int update(PreparedStatementCreator psc, KeyHolder generatedKeyHolder)/...
分类:
数据库 时间:
2014-06-06 10:47:00
阅读次数:
276
首先从简单的搜索开始——empty
search,这个搜索返回所有的index中所有的document。GET
/_search{}标记1表示的是请求体就像query-string搜索一样,你能对若干index进行搜索,同时能指定若干若干类型:GET
/index_2014*/type1,type2...
分类:
其他好文 时间:
2014-06-06 08:43:17
阅读次数:
228
轻量级的搜索——?query string
search?——对命令行的即席查询来说是十分有用的。然而为了驾驭搜索的强大功能,你应该使用带请求体的search
API,之所以这样,是因为很多的参数是在JSON的请求体中的而不是查询字符串。请求体查询——从现在开始就是”search“——不仅仅自身处理...
分类:
其他好文 时间:
2014-06-06 08:21:47
阅读次数:
239
delete table atruncate table
b用truncate删除表比delete删除表 逻辑读和cost都有明显的减少delete
删除并不能释放空间,虽然将很多块的记录删除,但空间依然会保留,oracle在查询时,依然会查询这些块而truncate是一种释放高水平位的动作,这些空...
分类:
其他好文 时间:
2014-06-06 07:32:46
阅读次数:
337
Given a sorted linked list, delete all
duplicates such that each element appear onlyonce.For
example,Given1->1->2, return1->2.Given1->1->2->3->3,
retu...
分类:
其他好文 时间:
2014-06-06 07:00:36
阅读次数:
269
Given a sorted linked list, delete all nodes
that have duplicate numbers, leaving onlydistinctnumbers from the original
list.For example,Given1->2->3-...
分类:
其他好文 时间:
2014-06-06 06:57:18
阅读次数:
271