题目
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.
You should preserve the original relative order of the node...
分类:
其他好文 时间:
2014-06-11 06:28:41
阅读次数:
364
Given an unsorted integer array, find the first missing positive integer.
For example,
Given [1,2,0] return 3,
and [3,4,-1,1] return 2.
Your algorithm should run in O(n) time and uses constant...
分类:
其他好文 时间:
2014-06-10 07:42:16
阅读次数:
244
Trigger在目标对象上加入触发器功能,目标对象的方法就会具有方法注入功能,注入的方式有before(前置执行),after(后置执行)和round(环绕),另外还有一个exception模式,因为异常处理的模块还没完成,暂时先空缺。接口方法
st.attachTrigger(target,...
原题地址:https://oj.leetcode.com/problems/first-missing-positive/题意:Given
an unsorted integer array, find the first missing positive integer.For
example,G...
分类:
编程语言 时间:
2014-06-09 17:44:43
阅读次数:
980
上篇介绍了PromiseEvent,本篇介绍Trigger -
基于Promise的aop的体现;(感觉自己的对这些命名一直都很挫,也懒得想了,所以就凑合的用)Trigger在目标对象上加入触发器功能,目标对象的方法就会具有方法注入功能,注入的方式有before(前置执行),after(后置执行)和...
这部分我们讨论结构学习,也就是 graph 的边我们并不清楚。很自然我们可以用 fully
observed 数据来做,但是也可能碰到有 missing data 的情况。一般来说前者是比较常见的。就方法而言,我们有 constraint-based
structure learning 与 sco...
分类:
其他好文 时间:
2014-06-08 22:57:33
阅读次数:
233
关于+ - ~有意思的一段C代码
问题是钟哥几天前在automation的群里面抛出来的。
code:
#include
int main(int argc,char* argv[])
{
int a = 7;
int b = 1;
printf("before process,a = %d,b = %d\n",a,b);...
分类:
其他好文 时间:
2014-06-08 16:29:03
阅读次数:
215
Definition
Let be "0" and
be "01". Now (the concatenation of the previous sequence and the one before that).
The infinite Fibonacci word is the limit
We have:
0
01
010
01...
分类:
其他好文 时间:
2014-06-08 09:19:42
阅读次数:
273
public string CreateWordFile(string CheckedInfo)
{
string message = "";
try
{
Object Nothing = System.Reflection.Missing.Value;
Directory.CreateDirectory("C:/CNSI"); //创建文件所在目录
string name = "CNSI.doc...
分类:
其他好文 时间:
2014-06-08 04:57:55
阅读次数:
291
@Test@Before@After测试方法运行前执行Before动作(比如创建资源),运行后执行After动作(比如销毁资源)@BeforeClass@AfterClass测试类运行前执行Before动作(比如创建资源),运行后执行After动作(比如销毁资源)Assert对方法结果进行判断,是否...
分类:
编程语言 时间:
2014-06-07 23:08:14
阅读次数:
319