码迷,mamicode.com
首页 >  
搜索关键字:scala for if match while    ( 37974个结果
将后面的m个数移到前面
#include#include#include#includeusing namespace std;int bigswap(char* a,int start,int end){ while(start<end) { swap(a[start],a[end]); ...
分类:其他好文   时间:2014-05-24 04:53:54    阅读次数:208
PHP分页
$pagesize){if($pagevel上一页"."下一页";}$sql="select*frommessagelimit$page,$pagesize";$query=mysql_query($sql);while($row=mysql_fetch_array($query)){echo""....
分类:Web程序   时间:2014-05-24 02:34:28    阅读次数:393
linux:shell脚本的一些语法
读取文件的第一行并赋值给变量var=`head -1 filename` #`不是单引号,是Esc下方的一个按键,为命令替换符,将命令行执行结果赋给var读取文件的第N行并赋值给变量var=`sed -n Np filename` #把N替换成数字 逐行读取文件while rea...
分类:系统相关   时间:2014-05-23 22:31:08    阅读次数:389
sniff a mobile browser
function isMobile() { //sniff a mobile browser if (navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS...
分类:其他好文   时间:2014-05-23 22:21:26    阅读次数:246
插入排序
插入排序伪代码:1 for j=2 to a.length2 key=a[j]3 i=j-14 while i>0 and a[i]>key5 a[i+1]=a[i]6 i=i-17 a[i+1]=key使用实例: 1 ...
分类:其他好文   时间:2014-05-23 11:20:43    阅读次数:227
crm2011 使用SOAP 查询单个记录 Retrieve
function getServiceUrl() { var serverUrl = Xrm.Page.context.getServerUrl(); if (serverUrl.match(/\/$/)) { serverUrl = serverUrl.substring(0, server...
分类:其他好文   时间:2014-05-20 07:40:00    阅读次数:250
do...while(0)的妙用
在C++中,有三种类型的循环语句:for, while, 和do...while, 但是在一般应用中作循环时, 我们可能用for和while要多一些,do...while相对不受重视。     但是,最近在读我们项目的代码时,却发现了do...while的一些十分聪明的用法,不是用来做循环,而是用作其他来提高代码的健壮性。 1. do...while(0)消除goto语句。 通常,如果在...
分类:其他好文   时间:2014-05-18 15:01:00    阅读次数:259
JQuery日记_5.14 Sizzle选择器(七)
上篇说道,tokenize方法会把selector分割成一个个selector逻辑单元(如div a是两个逻辑单元)并为之片段赋予对应类型的过滤函数。 for ( type in Expr.filter ) { if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||...
分类:Web程序   时间:2014-05-18 13:42:59    阅读次数:393
Codeforces #246(div2)
A:A. Choosing Teams .题目就不介绍了,直接统计即可。 AC代码: #include #include #include using namespace std; int cnt[6]; int main() { int n,k,i,x; while(cin>>n>>k) { memset(cnt,0,sizeof(cnt));...
分类:其他好文   时间:2014-05-18 08:41:02    阅读次数:233
C经典之9-system,if,do,while---ShinePans
#include #include #include //system(); 这个指令需要用到此头文件 #include //toupper要用到 void main() { char letter; do{ printf("A Display directory listling\n"); printf("B Display disk information\n"); ...
分类:其他好文   时间:2014-05-18 06:46:07    阅读次数:292
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!