方法和代码块在Ruby中,{}或do...end之间的代码是一个代码块。代码块只能出现在一个方法的后边,它紧接在方法最后一个参数的同一行上,一般由yield关键字调用代码块中的代码。方法是一个有名的代码块,是与一个或者多个对象相关联的参数化代码。调用方法时必须要给出方法名、所在对象(接受者),以及零个或者多个参数值,方法中最后一个表达式的值将作为方法调用的返回值。代码块不是ruby可操作的对象,一...
分类:
其他好文 时间:
2014-06-22 21:55:47
阅读次数:
206
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-06-22 20:59:24
阅读次数:
227
spiral grid
时间限制:2000 ms | 内存限制:65535 KB
难度:4
描述Xiaod has recently discovered the grid named "spiral grid".
Construct the grid like the following figure. (The grid is actually infinite...
分类:
其他好文 时间:
2014-06-22 20:54:07
阅读次数:
185
前面我们讲解了的J2EE的技术都是服务端的技术,下面我们来看一下前端的一些开发技术,这一篇我们来看一下jQuery技术
简介:
jQuery由美国人John Resig创建,至今已吸引了来自世界各地的众多
javascript高手加入其team。
jQuery是继prototype之后又一个优秀的Javascript框架。其宗旨是——WRITE LESS,DO MORE,写更少的代...
分类:
Web程序 时间:
2014-06-22 18:23:33
阅读次数:
356
一.概念:
SPI:serial peripheral interface
串行接口设备,spi flash 就是通过串行的接口进行操作的flash存储设备
flash按照内部存储结构不同,分为两种:nor flash和nand flash。这里spi flash 属于 nor flash!
spi flash 读写较慢,次数有限制,一般用于不经常更改的存储。...
分类:
其他好文 时间:
2014-06-22 18:22:39
阅读次数:
200
Well, as a college student,I haven't realized how important the English is .
But as a web programmer,I do realize the importance of learning English.
I am not writing an English composition....
分类:
其他好文 时间:
2014-06-22 17:52:50
阅读次数:
157
Dynamic Rankings
Time Limit: 10 Seconds
Memory Limit: 32768 KB
The Company Dynamic Rankings has developed a new kind of computer that is no longer satisfied with the query like to simply...
分类:
其他好文 时间:
2014-06-22 17:04:16
阅读次数:
182
原文首发在github上 MongoNote01.Start
MongoDB is an open-source document database that provides high performance, high availability, and automatic scaling.
这是mongo官方给出的定义。定义里的几个关键点体现了mongo的几个突出的优点:
do...
分类:
其他好文 时间:
2014-06-22 15:31:57
阅读次数:
280
2014-5-20版本: Phenix.NET for CSLA & WF 开发平台:http://download.csdn.net/download/phenixiii/7390405转载自:http://write.blog.csdn.net/postedit/6853423CSLA & De...
分类:
Web程序 时间:
2014-06-22 13:33:55
阅读次数:
300
1.document.write(""); 输出语句2.JS中的注释为//3.传统的HTML文档顺序是:document->html->(head,body)4.一个浏览器窗口中的DOM顺序是:window->(navigator,screen,history,location,document)5...
分类:
编程语言 时间:
2014-06-22 12:26:07
阅读次数:
214