码迷,mamicode.com
首页 >  
搜索关键字:while    ( 28479个结果
Python 统计IIS日志行数
__author__ = 'Administrator' import codecs def blocks(file, size=65536): while True: b = file.read(size) if not b: break yield b with codecs. open('h:...
分类:编程语言   时间:2014-10-30 10:54:09    阅读次数:166
Python yield 使用浅析
如何生成斐波那契數列 斐波那契(Fibonacci)數列是一个非常简单的递归数列,除第一个和第二个数外,任意一个数都可由前两个数相加得到。用计算机程序输出斐波那契數列的前 N 个数是一个非常简单的问题,许多初学者都可以轻易写出如下函数: 清单 1. 简单输出斐波那契數列前 N 个数 def fab(max): n, a, b = 0, 0, 1 while n ...
分类:编程语言   时间:2014-10-30 10:20:44    阅读次数:252
list中删除元素
例子1: 1 1 std::list::iterator i = items.begin(); 2 2 while (i != items.end()) 3 3 { 4 4 bool isActive = (*i)->update(); 5 5 if (!isActive)...
分类:其他好文   时间:2014-10-30 07:06:34    阅读次数:243
c++ split 模板实现
template inline void split(const std::string& s, const char* delims, _Fty op) {    size_t start = 0;    size_t last = s.find_first_of(delims, start);    while (last != std::string::npos)...
分类:编程语言   时间:2014-10-29 21:37:45    阅读次数:139
After Upgrade To Release 12.1.3 Users Receive "Function Not Available To This Responsibility" Error While Selecting Sub Menus Under Diagnostics (Doc ID 1200743.1)
APPLIES TO: Oracle Application Object Library - Version 12.1.3 to 12.1.3 [Release 12.1] Information in this document applies to any platform. Checked ...
分类:其他好文   时间:2014-10-29 21:23:53    阅读次数:456
shell实现死循环
参考自http://codingstandards.iteye.com/blog/7805241.while truedocommand;done2.while :docommand;done3.while [1]docommand;done4.while [0]docommanddone5.whi...
分类:系统相关   时间:2014-10-29 21:08:01    阅读次数:191
UVa 498 - Polly the Polynomial
题目:一直多项式的系数,求不同的x对应多项式的值。 分析:数学题,简单题。直接代入多项式计算即可。 说明:注意输入格式。 #include #include #include #include using namespace std; int temp,c[10000]; int main() { int n; while ((temp = getchar()) != E...
分类:其他好文   时间:2014-10-29 19:26:20    阅读次数:309
Qt判断QString中的字符串是否为纯数字
/****判断一个字符串是否为纯数字*/intCommon::isDigitStr(QStringsrc){QByteArrayba=src.toLatin1();//QString转换为char*constchar*s=ba.data();while(*s&&*s>='0'&&*s<='9')s+...
分类:其他好文   时间:2014-10-29 18:24:56    阅读次数:605
UVa 455 - Periodic Strings
题目:求一个串的最小循环节。 分析:暴力,字符串。数据量较小,直接使用枚举法。             枚举循环节的长度,匹配判断,找到第一组解即为最小。 说明:(⊙_⊙)。 #include #include #include #include using namespace std; char str[104]; int main() { int n; while (...
分类:其他好文   时间:2014-10-29 17:12:47    阅读次数:161
eclipse luna 无法安装veloeclipse问题
问题:     在eclipse 4.4(luna)版本,安装veloeclipse 2.0.8时,在即将完成的时候出现以下错误提示: An error occurred while installing the items session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.int...
分类:系统相关   时间:2014-10-29 17:12:03    阅读次数:204
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!