码迷,mamicode.com
首页 >  
搜索关键字:while break continue    ( 40024个结果
sql server 汉字转拼音首字母
create function fun_getPY ( @str nvarchar(4000) )returns nvarchar(4000)asbegin declare @word nchar(1),@PY nvarchar(4000) set @PY='' while len(@...
分类:数据库   时间:2014-06-28 12:58:14    阅读次数:225
Word Break II
Given a stringsand a dictionary of wordsdict, add spaces insto construct a sentence where each word is a valid dictionary word.Return all such possibl...
分类:其他好文   时间:2014-06-28 12:40:47    阅读次数:219
剑指OFFER之第一个只出现一次的字符(九度OJ1283)
题目描述:在一个字符串(1#include int main(){ int i; char c[10000]; int cnt[24]; while(scanf("%s",&c)!=EOF){ memset(&cnt,0,sizeof(int)*24); ...
分类:其他好文   时间:2014-06-28 12:31:02    阅读次数:231
sleep
function sleep(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); if (now.getTime() >...
分类:其他好文   时间:2014-06-24 10:44:55    阅读次数:267
C语言下的简易计算器
1 #include 2 #include 3 int main() 4 { 5 double data1, data2; 6 char op; 7 while (3 == scanf("%lf%c%lf", &data1, &op, &data2) ) 8 ...
分类:编程语言   时间:2014-06-24 09:05:51    阅读次数:304
7.Swift教程翻译系列——控制流之循环
Swift提供了类C语言类似的控制流结构。包括for循环和while循环来多次执行任务,if和switch语句根据不同的条件执行不同的分支代码,break和continue语句将执行流程跳转到其他语句。除了C里面传统的for-条件-递增循环,Swift还增加了for-in循环使得遍历数组,字典,范围,字符串或者其他序列都很简单。...
分类:其他好文   时间:2014-06-22 22:27:43    阅读次数:391
windows和linux下结束循环的操作
#include #include #include using namespace std; int main() { string word; string line; while (getline(cin,line)) { istringstream istr(line); while(istr>>word) cout<<wo...
分类:Windows程序   时间:2014-06-22 19:36:00    阅读次数:290
COCOS2DX WIN32 版本的CPU占用25%改良策略
猜测它有可能是在主循环里使用了 Sleep(0), 一搜,果然定位到具体代码,它位于 cocos2dx\platform\win32\CCApplication.cpp,大致长像如下: 1 while( 1 ) { 2 if( 有消息 ) { 3 if( 时间...
分类:Windows程序   时间:2014-06-22 18:09:04    阅读次数:340
写的一个split函数
vector strsplit(const string& str) { vector vec; string sstr1=str, sstr2=""; size_t np=0; while (sstr1!="") { size_t dt = sstr1.find(','); if (dt != string::npos) { sstr1 = str.substr(np...
分类:其他好文   时间:2014-06-22 18:06:11    阅读次数:205
JSOI2007建筑抢修
实际上和大多这类题一样(比如wikioi上的地鼠游戏),考察的都是堆的操作这次改完之后就算把堆的模版定下来了悲剧的是:大根堆打成了小根堆,导致一开始一直是10分……按结束时间排序,(经过验证,结束时间相同的建筑不需要在根据t的大小来排序)如果time+t[i]>1; 8 while k>=1 ...
分类:Web程序   时间:2014-06-21 16:02:49    阅读次数:352
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!