题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2182题意:给出一个无向图,问最少删掉多少个顶点之后图变得不连通?思路:将原图每个点拆点(i,i+n),连边,对原图的边(u,v),连边,。然后对于每对顶点(i,j)...
分类:
Web程序 时间:
2014-06-23 00:51:26
阅读次数:
291
方法和代码块在Ruby中,{}或do...end之间的代码是一个代码块。代码块只能出现在一个方法的后边,它紧接在方法最后一个参数的同一行上,一般由yield关键字调用代码块中的代码。方法是一个有名的代码块,是与一个或者多个对象相关联的参数化代码。调用方法时必须要给出方法名、所在对象(接受者),以及零个或者多个参数值,方法中最后一个表达式的值将作为方法调用的返回值。代码块不是ruby可操作的对象,一...
分类:
其他好文 时间:
2014-06-22 21:55:47
阅读次数:
206
从语言角度讲, lua 5.1 定义了 # 对数组取长度的约束. 而 lua 5.2 不严格定义了,只说如果有 nil 就不确定
a[4] = 11;
print(a[#a])
---print 11
-----------------------------------
a = {}
for i=1,3 do a[i] = i*3 end...
分类:
其他好文 时间:
2014-06-22 20:56:03
阅读次数:
257
Determine whether an integer is a palindrome. Do this without extra space.
思路:若使用【Leetcode】Reverse
Integer 的方法,判断反转后的整数是否与原整数相同,则可能出现溢出情况;又因为题目要求不适用额外空间,可以之间对比整数第一个与最后一个数的值,再依次类推。
class Solution {...
分类:
其他好文 时间:
2014-06-22 20:43:56
阅读次数:
187
前面我们讲解了的J2EE的技术都是服务端的技术,下面我们来看一下前端的一些开发技术,这一篇我们来看一下jQuery技术
简介:
jQuery由美国人John Resig创建,至今已吸引了来自世界各地的众多
javascript高手加入其team。
jQuery是继prototype之后又一个优秀的Javascript框架。其宗旨是——WRITE LESS,DO MORE,写更少的代...
分类:
Web程序 时间:
2014-06-22 18:23:33
阅读次数:
356
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
原文首发在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
FlatBuffers发布出来一周多,周末便抽时间先研究下它的使用方法。Flatbuffers的idl的语法主要参考[http://google.github.io/flatbuffers/md__schemas.html ]。本文主要介绍几个它的monster.fbs没有给出说明的几个语法点和相关的注意事项。
1 comment
它的注释中介绍了”///",说明是可以生成do...
分类:
其他好文 时间:
2014-06-22 11:32:32
阅读次数:
305
?Methods (as well as lambda expressions or anonymous methods) can be markedwith the async keyword to enable the method to do work in a nonblockingmann...
分类:
其他好文 时间:
2014-06-21 17:58:34
阅读次数:
197
One of the most important use-case in any cloud is provisioning a VM . In this article we shall do a walk through about an instance(VM) being provisio...
分类:
其他好文 时间:
2014-06-21 16:59:43
阅读次数:
376