http://blog.csdn.net/wogel/article/details/9631781duilib之源码分析《duilib之源码分析》 1 stdAfx.h* lengthof(x) 计算数组长度宏* MAX两值最大* MIN两值最小* CLAMP(x,a,b) x在a,b之间则取x否...
分类:
其他好文 时间:
2014-07-06 22:49:25
阅读次数:
457
栈是一种线性的结构,先进后出(FILO),我们只能在栈的一端对数据进行操作,数据的插入与删除只能在栈的一端进行。 在STL中的栈stack一共只有5中操作。 1.stack::empty() 2.stack::size() 3.stack::push(typename t) 4.sta...
分类:
其他好文 时间:
2014-07-06 14:24:34
阅读次数:
183
DescriptionThe cows have purchased a yogurt factory that makes world-famous Yucky Yogurt. Over the next N (1 #includeint min(int a,int b){ if(a>b) ...
分类:
其他好文 时间:
2014-07-06 14:21:54
阅读次数:
215
1. 使用Random类的nextInt方法:Random rand = new Random();rand.nextInt(max);, 此时输出[0,max),注意右边是开区间,如果需要设定最小值可通过 rand.nextInt(max-min+1)+min方式,此时的范围为[min,max]i...
分类:
编程语言 时间:
2014-07-06 14:14:11
阅读次数:
257
count组函数:(过滤掉空的字段)select count(address),count(*) from b_usermax() avg() min(),sum()select sum(age),max(age),min(age),avg(nvl(age,0)) from b_user1 260 ...
分类:
数据库 时间:
2014-07-06 12:58:24
阅读次数:
364
by:白书
#define M 10000
int pre[M],dfs_clock,iscut[M],low[M],bcc_cnt,bccno[M];
vectorG[M],bcc[M];
struct Edge
{
int u,v;
Edge(int from,int to)
{
u=from;
v=to;
}
};
stack S;
int dfs(int u,int fa...
分类:
其他好文 时间:
2014-07-06 11:29:32
阅读次数:
198
下午在重新整理一份代码,中间遇到这么一个问题:要么出现内存访问冲突,要么出现“Stack around the variable XX was corrupted”错误。很是恼火!先出现的是“Stack around the variable XX was corrupted”错误,网上查到的第一种...
分类:
其他好文 时间:
2014-07-05 17:38:49
阅读次数:
399
ansible的Conditionals和loops和salt-stack比起来真的太强大了。salt-stack使用判断循环,好像,只能使用模板里面的判断和循环。而ansible本身自带了适用于各种场景的判断循环插件。。不但如此,像loops,我们还可以自己编写插件,满足我们的实际需求。先说说Conditionals吧Con..
分类:
其他好文 时间:
2014-07-04 06:30:22
阅读次数:
318
题目要求第n个丑数,所以对于中间结果不需要保存。
def Humble(index):
curHum = 1
M2 = 2; M3 = 3; M5 = 5
while index > 1:
curHum = min(min(M2, M3), M5)
while M2 <= curHum:
M2 *= 2
while M3 <= curHum:
M3 *= 3
w...
分类:
其他好文 时间:
2014-07-03 17:29:40
阅读次数:
214
CD
You have a long drive by car ahead. You have a tape recorder, but unfortunately your best music is on CDs. You need to have it on tapes so the problem to solve is: you have a tape N min...
分类:
其他好文 时间:
2014-07-03 15:34:36
阅读次数:
176