码迷,mamicode.com
首页 >  
搜索关键字:else    ( 23991个结果
堆排序 Heapsort
堆排序: 1 #include 2 //#include 3 4 void PrintArray(int data[] ,int length){ 5 int i; 6 for(i=0;iA[i]){21 largest=l;22 }23 else ...
分类:其他好文   时间:2014-09-04 04:11:17    阅读次数:210
java API------Boolean类valueOf()方法
//摘自ocjp public void testIfA() { if (testIfB("True")) { System.out.println("True"); } else { System.out.println("Not true"); } } public Boolean testIfB(String str) { return Boolean.valueOf(s...
分类:编程语言   时间:2014-09-04 00:16:27    阅读次数:246
正則表達式验证邮箱,qq,座机,手机,网址
手机:var reg=/^1[34578]\d{9}$/;if(reg.test("你输入的手机号码") ){alert("手机号码输入正确")}else{alert("手机号码输入有误")}QQ:var reg=/^[1-9]\d{4,11}$/;邮箱:var reg=/^\w+@[0-9a-zA...
分类:移动开发   时间:2014-09-03 22:32:27    阅读次数:258
杭电2046
#includeint sum(int n){ if(n>2) return sum(n-1)+sum(n-2); else return n;}int main(){ int n; while(scanf("%d",&n)!=EOF) { printf("%d\n",sum(n)); } r...
分类:其他好文   时间:2014-09-03 00:14:15    阅读次数:171
每日一句(2014-9-2)
Love is putting someone else's needs before yours爱就是把某个人看得比你自己重要Love is putting someone else's needs before yours爱就是把某个人看得比你自己重要Lovie is putting someo...
分类:其他好文   时间:2014-09-02 22:35:45    阅读次数:178
中点Bresenham算法光栅化画圆(八分法)
代码如下,原理对比上篇画圆方法 void Bresenham_Circle(CDC *pDC, int ox, int oy, int r) { float d = 1.25 - r; int x = 0, y = r, fx = r/1.4; while (x != fx) { if (d < 0) d += 2 * x + 3; else { d += 2 *...
分类:其他好文   时间:2014-09-02 21:25:31    阅读次数:454
upper_bound——自己的实现
int BSearch(){ int ln(1),rn(n+1); while(ln+1>1; if (Check(mid)) { ln=mid; //mid符合标准,区间变为[mid,rn) } else { rn=mid; /...
分类:其他好文   时间:2014-09-02 21:20:15    阅读次数:212
日期包装函数
function producedate(){ var date=new Date(); var str=date.getFullYear()+"-"; if((date.getMonth()+1)<10){str+="0"+(date.getMonth()+1);}else{str+=(date....
分类:其他好文   时间:2014-09-02 19:43:15    阅读次数:201
WinDBG中条件字符串设断点
以我在notepad.exe中设置CreateFileW特定文件名断点为例。bpkernel32!CreateFileW"r$t1=poi(esp+4);as/mu$FileName$t1;.block{.if($sicmp(\"${$FileName}\",\"C:\\abc.txt\")!=0){.echoc:\\abc.txt}.else{.echononono;gc}}"bpkernel32!CreateFileW"r$t1=poi(esp+4);as/mu$FileN..
分类:数据库   时间:2014-09-02 18:09:45    阅读次数:256
UVA - 10828 Back to Kernighan-Ritchie (方程消元)
Youmust have heard the name of Kernighan and Ritchie, the authors ofThe C Programming Language. While coding in C, we use differentcontrol statements and loops, such as, if-then-else, for, do-while,...
分类:其他好文   时间:2014-09-02 15:59:14    阅读次数:206
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!