练习1.6new-if的三个参数会先被执行,这样就会无限循环下去练习1.7(define (sqrt-iter last-guess guess x) (if (good-enough? last-guess guess) guess (sqrt-iter guess (improve...
分类:
其他好文 时间:
2014-11-11 16:14:11
阅读次数:
255
C# Lock原文:http://www.dotnetperls.com/lockLocking is essential in threaded programs. It restricts code from being executed by more than one thread at t...
分类:
编程语言 时间:
2014-11-11 12:03:57
阅读次数:
375
题意:一个英雄,分到几个城市,每个城市有一个价值,但是要求分到城市后,必须破坏掉道路使得首都1都不能到达,破坏道路有开销,问最大能获得的收益和需要破坏的道路ID思路:最小割,城市1做源点,有向边建图,容量为代价,然后每个可以分的城市连到汇点,容量为价值,跑一下最小割即可代码:[cpp] view p...
分类:
其他好文 时间:
2014-11-11 07:03:33
阅读次数:
233
gs_tmp_tz... is the temporary timezone detection file.
To prevent this file from being created at all, just right-click the site in the site manager, select PROPERTIES, and then under the "TYPE"...
分类:
其他好文 时间:
2014-11-10 09:58:34
阅读次数:
144
This year's Valedictorian, please welcome 。。。.前半部分:for English:Good morning esteemed faculty and families of my fellow graduates:It’s my honor to be ....
分类:
其他好文 时间:
2014-11-08 13:20:31
阅读次数:
227
抽象工厂模式
GOOD:定义了一个创建一系列相关或相互依赖的接口,而无需指定它们的具体类。
用于交换产品系列,如ACCESS->SQLSERVER;产品的具体类名被具体工厂的实现分离
例:
#include
#include
#include
using namespacestd;
//用户抽象接口
class IUser
{
pub...
分类:
其他好文 时间:
2014-11-06 22:07:38
阅读次数:
154
迭代器模式
GOOD:提供一种方法顺序访问一个聚敛对象的各个元素,而又不暴露该对象的内部表示。
为遍历不同的聚集结构提供如开始,下一个,是否结束,当前一项等统一接口。
例:
#include
#include
using namespace std;
template
class Iterator
{
public:
virtual void first...
分类:
其他好文 时间:
2014-11-06 22:05:59
阅读次数:
201
//good.page-main > div { margin: 20px;}//bad.page-main>div { margin: 20px;}---------------------------//good#func-count { color: #666;}//bad#...
分类:
其他好文 时间:
2014-11-06 12:35:52
阅读次数:
121
Here is a quick summary: A strong reference will keep the object it points to from being deallocated. Aweak reference will not. Thus instance variable...
分类:
其他好文 时间:
2014-11-05 18:58:44
阅读次数:
137
ForewordThis explanation of clustering Rabbit-MQ assumes that you’ve had some experience with Rabbit-MQ. At least to the point of being able to get Ra...
分类:
其他好文 时间:
2014-11-04 12:59:35
阅读次数:
308