#!/bin/bashcounter=0#变量files遍历一遍当前文件夹for files in *do#判断files是否为文件,如果是,counter变量值加1,再赋值给自己。 if [-f"$files"] then counter=`expr $counter + 1` fido...
分类:
其他好文 时间:
2014-07-16 23:04:28
阅读次数:
167
#!/bin/bash#提示用户输入echo -n "Please enter number"read n #读入输入的值放到变量n中sd=0rev=""on=$n #将变量n的值保存到变量on中,方便以后用到echo "You put number is $n"while [$n -gt 0]do...
分类:
其他好文 时间:
2014-07-16 23:03:53
阅读次数:
261
关于VFS的通用读,我们不做考虑,本文以如下函数为根,往下分析:do_generic_mapping_read(*ppos,*mapping,*desc)本函数的目的是,从磁盘读数据到用户态,先是从*ppos开始的页,一直读到*ppos+desc->count 为止的,这么多个页,然后拷贝desc-...
分类:
其他好文 时间:
2014-07-16 21:53:13
阅读次数:
326
/*while循环语句,为了简化代码,让代码执行很多次 定义初始化表达式 while(条件表达式) { 循环体(执行语句) } System.out.println(x++);//该句既可以打印出x的值又可以...
分类:
其他好文 时间:
2014-07-16 21:00:58
阅读次数:
246
原题: ZOJ 3769http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3769一个带有一些限制的背包问题。假设在没有限制的情况下,那么定义:dp[i][j]表示在前 i 类物品中,总的Toughness为 j 的时候最大的伤...
分类:
其他好文 时间:
2014-07-16 20:45:58
阅读次数:
132
原题:ZOJ 3774 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3774-------------------------------------------------------------------------...
分类:
其他好文 时间:
2014-07-16 20:45:49
阅读次数:
137
用于打印杨辉三角的程序,有多种算法仅提供一种PRogram yh (input,ouput);var m,n,c:integer;BeginFor m:=0 TO 10 Do Begin c:=1; write(c:40-3*m); For n:=1 To m Do begin c:=c+(m-n+...
分类:
其他好文 时间:
2014-07-16 19:38:04
阅读次数:
148
All good so far. We next want to delete the branch on github. However, if we do this the naive way:git push origin :masterwe just get an error like th...
分类:
其他好文 时间:
2014-07-16 19:33:09
阅读次数:
231
BT5与Ubuntu下安装最新版Metasploit4.5方法:(先把老版本的MSF uninstall,BT5自带的老版本Metasploit没有办法升级!)1、下载Metasploit下的Linux安装包,拷贝至Ubunto的/opt目录。http://www.metasploit.com/do...
分类:
Web程序 时间:
2014-07-13 12:25:55
阅读次数:
312
原题:ZOJ 3681http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3681题意:给一个m,n,m表示m个人,可以把m个人分成k组,每组m/k个人,人数要一样,如果超过一半的组支持Italy的话,说明这n个人都支持Italy...
分类:
其他好文 时间:
2014-07-12 15:18:56
阅读次数:
166