for变量in列表;do语句1语句2done列表的生成逐个给出如/etc/inittab/etc/使用通配符如forfilein/var/*使用命令如forfilein`ls/var`数字序列{起始数字..结束数字}如{1..100}或者`seq起始步长步长结束步长`使用for循环遍历目录#!/bin/bash
#version:0.1
#author:ml
#pragram:this..
分类:
其他好文 时间:
2014-05-15 12:40:38
阅读次数:
280
JavaScript是区分大小写的:也就是说,关键字、变量、函数名、和所有的标识符都必须采用一致的大小写(一般我们都是写成小写的),这样和当初学C#的多样式写法有很大的区别。比如:关键字:”while”必须小写(写成”while”)而不能写成”While”或者”WHILE”。但要我们应该注意的是:在...
分类:
编程语言 时间:
2014-05-15 10:42:30
阅读次数:
400
1.为什么使用循环结构? 主要解决代码重复使用时的多次书写。2.循环有些?
java循环有while for do...while foreach四种3.while 循环条件和循环体是循环的两个关键。
循环条件都市boolean类型的表达式。循环条件成立,则执行循环体,循环体执行结束,再判断条件,如...
分类:
编程语言 时间:
2014-05-15 09:45:01
阅读次数:
271
由于现网有时候要测试很多端口的连通性,所以就写了个小脚本,实现批量测试将telnet成功的写入到telnet_alive.txt中,失败则写入telnet_die.txt中#!/bin/bash#thisscripttestUPtootherhost.#Iplist=/opt/script_test/iplist.dataPortnumber=7001foripin$(catiplist.data)do(slee..
分类:
Web程序 时间:
2014-05-15 08:46:11
阅读次数:
385
题目链接:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3682
E - Cup 3
Time Limit: 3 Seconds Memory Limit: 65536 KB
The 2012 Europe Cup was over and Spain won the Champio...
分类:
其他好文 时间:
2014-05-15 03:30:08
阅读次数:
370
#include int main(int argc, char *argv[]){ int
c = -1, n = -1; while (true) { scanf("%d%d",&c,&n); int
arr[n],sum[n],b[n]; if (c + n == 0) { ...
分类:
其他好文 时间:
2014-05-14 23:11:50
阅读次数:
391
插入排序是最基本基于比较的排序方法,其时间复杂度为Ο(n2),最好情况为初始有序,最坏为逆序。
伪代码如下: insertionSort(A,n) for i=1 to n do key=A[i] for j=i-1 to 0 if ar...
分类:
其他好文 时间:
2014-05-14 22:35:28
阅读次数:
326
【题目】
Implement atoi to convert a string to an 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 problem to be s...
分类:
其他好文 时间:
2014-05-14 21:00:57
阅读次数:
304
【题目】
Determine whether an integer is a palindrome. Do this without extra space.
【题意】
题意判断一个整数是否是回文数
注意一下几点:
1. 不能用额外的空间
2. 负数不是回文数...
分类:
其他好文 时间:
2014-05-14 20:31:10
阅读次数:
298
出现no write has been done on this connection解决方案...
分类:
数据库 时间:
2014-05-14 19:42:51
阅读次数:
403