//Situation System prompts"xxx is not in the sudoers file"(xxx equals the user name)while executing command "sudo": sudo-i Password: xxx ...
分类:
其他好文 时间:
2014-07-06 21:39:36
阅读次数:
175
前言 从方向上改变糟糕的代码设计,如果你还是很直白的过程式思维,还在被一大堆的if else,随处可见的for、while所困扰,是时候学习设计模式了。 正文 软件设计中的合成/聚合复用原则:尽量使用合成/聚合,尽量不要使用类继承。 合成和聚合都表示关联的特殊种类。聚合表示一种弱的”拥有“关系,体....
分类:
其他好文 时间:
2014-07-06 19:21:45
阅读次数:
176
Do-While while循环的另一个版本是do-while循环,它在判断条件之前,先执行一遍循环体,然后再次执行循环体,直到条件成为false. do-while循环的通过格式: do { statements } while condition 我们再用蛇和梯子...
分类:
移动开发 时间:
2014-07-06 18:18:24
阅读次数:
252
/*Input输入数据有多组,每组占一行,包括两个整数m和n(100#includeint main(){int m,n,k,ge,shi,bai;int flag=0;while(scanf("%d%d",&m,&n)!=EOF){ flag=0; if(m>n || m999) ...
分类:
其他好文 时间:
2014-07-06 13:41:48
阅读次数:
196
templateint binarySearch(const vector &a, const comparable &x){ int low = 0, high = a.size() - 1; while(low a[center]) low = center ...
分类:
其他好文 时间:
2014-07-06 13:10:01
阅读次数:
188
技术人员关注的问题非常多,但常见的至少有以下6种。特此整理,抓住核心问题,解决它。一个人的精力和时间往往非常有限,能把核心问题都解决到位就是成功。" style="margin-top: 0px; margin-bottom: 1em; word-wrap: break-word; color: rgb(34, 34, 34); font-family: 'Roboto Condensed', T...
分类:
其他好文 时间:
2014-07-06 00:28:52
阅读次数:
312
执行启动nginx:/usr/local/nginx/sbin/nginx
错误:/usr/local/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
查找:[roo...
分类:
其他好文 时间:
2014-07-06 00:11:52
阅读次数:
205
There's a much simpler solution for this. Try running the following command:sudo /usr/sbin/DevToolsSecurity --enable
分类:
数据库 时间:
2014-07-05 22:43:50
阅读次数:
451
f = open("foo.txt") # 返回一个文件对象line = f.readline() # 调用文件的 readline()方法while line: print line, # 后面跟 ',' 将忽略...
分类:
编程语言 时间:
2014-07-05 21:24:54
阅读次数:
287
def IsContinuous(seq, num = 5):
zeros = 0; d = 0
seq = sorted(seq)
for i in range(num - 1):
if seq[i] == 0:
zeros += 1
continue
if seq[i] == seq[i + 1]:
return False
d += seq[i + 1]...
分类:
其他好文 时间:
2014-07-04 07:11:20
阅读次数:
171