码迷,mamicode.com
首页 >  
搜索关键字:do while循环    ( 14864个结果
第七章 循环语句
第七章 循环语句1. 循环语句的老祖宗--Goto语句(可用do…while();代替) 1 //①goto语句的使用(一般情况不用,但想在多重循环中一下子跳到外面时可以用)*******************① 2 int i=0; 3 number: i++; 4...
分类:其他好文   时间:2014-05-19 22:45:52    阅读次数:361
js动态加载控件jsp页面
例子1:(具体参照drp中的flow_card_add.jsp) cell0 cell1 cell2 例子2: /news.do?method=add" method="post" enctype="multipart/form-data"> 新闻标题 ...
分类:Web程序   时间:2014-05-16 03:57:52    阅读次数:442
UNIX进程之间传递文件描述符recvmsg与sendmsg
sendfd.c #include #include #include #include #include #include #include #include #include #define ERR_EXIT(m)         do         {                 perror(m); \...
分类:其他好文   时间:2014-05-16 01:27:02    阅读次数:294
【LeetCode】- String to Integer (字符串转成整形)
[ 问题: ] Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases. Notes: It is intended for this...
分类:其他好文   时间:2014-05-15 23:34:05    阅读次数:353
url-pattern配置
/a /ff.do *do这三种写法是对的
分类:其他好文   时间:2014-05-15 21:58:05    阅读次数:250
zoj 3386 Trick or Treat 三分 求最大值的 最小值
题目来源:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3963题意: 给定 N 个不同的点, 求在x轴上的 一点, 使 这点到N个点的 距离 最大 的 最小值。f(x) = max(i){ (xi - x) ^2 + yi ^...
分类:其他好文   时间:2014-05-15 21:39:24    阅读次数:314
脚本批量添加和批量删除用户
批量添加用户#!/bin/bashi=1while [ $i -le 20 ]do useradd stu$i echo "123456" | passwd --stdin stu$i &> /dev/null i=$(($i+1))done# 删除用户#!/bin/bash# 批...
分类:其他好文   时间:2014-05-15 21:11:33    阅读次数:218
测试
#!/bin/bash # Count=0 forUserNamein$@;do ifid$UserName&>/dev/null;then echo"$UserNameexists." else useradd$UserName echo"Add$UserNamesuccessfully." Count=$[$Count+1] fi done echo"Add$Countnewusers."
分类:其他好文   时间:2014-05-15 18:52:21    阅读次数:214
删除大量小文件
FreeBSD删除文件缓存,在负载方面FreeBSD比CentOS好很多很多。#!/bin/sh if[!-s/tmp/dir.dat];then find/home/www/web/cache-typed>/tmp/dir.dat fi mkdir/var/tmpdir DIRS=`cat/tmp/dir.dat` foriin$DIRS do load=$(top-n1|awk-F‘[.]+‘‘/averages/{print$6}‘) #rsync--delet..
分类:其他好文   时间:2014-05-15 18:51:06    阅读次数:314
UNIX域协议
echocli.c #include #include #include #include #include #include #include #include #define ERR_EXIT(m)         do         {                 perror(m);                 exi...
分类:其他好文   时间:2014-05-15 18:10:50    阅读次数:240
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!