一个简单的迭代器示例
--迭代工厂函数
function value(t)
local i = 0;
return
function()
i = i+1;
return t[i];
end;
end;
t = {10,20,30};
iter = va...
分类:
其他好文 时间:
2014-05-10 08:36:53
阅读次数:
268
A heap is a partially sorted binary tree.
Although a heap is not completely in order, it conforms to a sorting principle:
every node has a value less ...
分类:
其他好文 时间:
2014-05-09 17:34:18
阅读次数:
339
Log4J的配置文件(Configuration
File)就是用来设置记录器的级别、存放器和布局的,它可接key=value格式的设置或xml格式的设置信息。通过配置,可以创建出Log4J的运行环境。1.
配置文件Log4J配置文件的基本格式如下: #配置根Loggerlog4j.rootLogg...
分类:
其他好文 时间:
2014-05-09 17:24:38
阅读次数:
436
///设置cookiefunction setCookie(NameOfCookie, value,
expiredays) { var ExpireDate = new
Date(); ExpireDate.setTime(ExpireDate.getTime() + (expiredays *....
分类:
Web程序 时间:
2014-05-09 16:38:32
阅读次数:
332
微软官方的文档是说,Value这个Objec 来推断是什么SqlDbType。设为0
就给推断出Null了,所以先把它装箱为Object.Convert.ToInt32皆可
分类:
数据库 时间:
2014-05-09 16:37:59
阅读次数:
296
其中name为"movie"的param标签的value和embed标签的src定义了嵌入内容为Flvplayer.swf的movie。
分类:
Web程序 时间:
2014-05-09 11:24:23
阅读次数:
446
var CartListViewModel = function () { var self =
this; self.payment = [ { name: "", value: 1 }, ...
分类:
Web程序 时间:
2014-05-08 21:50:03
阅读次数:
374
public class Tree { TreeNode last = null; TreeNode
root = null; public Tree(int value){ root = createNode(value); } ...
分类:
其他好文 时间:
2014-05-07 18:45:42
阅读次数:
275
XML 文件格式如下: <?xml version="1.0"
encoding="GB2312"?> <RESULT> <VALUE> <NO>A1234</NO>
<ADDR>四川省XX县XX镇XX路X段XX号</ADDR> </VALUE> <VALUE> <NO>B1234</...
分类:
其他好文 时间:
2014-05-07 17:56:42
阅读次数:
291
LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.
get(key) - Get the value
(will always be posi...
分类:
其他好文 时间:
2014-05-07 07:16:21
阅读次数:
316