转摘自:http://www.chineselinuxuniversity.net/articles/38491.shtmlshell 编程中使用到得if语句内判断参数 –b 当file存在并且是块文件时返回真 -c 当file存在并且是字符文件时返回真 -d 当pathname存在并且是一个目录时返回真 -e 当pathname指定的文件或目录存在时返回真 -f 当file存在并且是正规文件时返回真 -g 当由pathname指定的文件或目录存在并且设置了SGID位时返回为真 -h 当file存在并且是符号链接文件时返回真,该选项在一些老系统上无效 -k 当由pathname... Read More
posted @ 2013-11-17 12:56 奋斗中的毛毛虫 Views(189) Comments(0) Diggs(0) Edit
echo $filen | awk -F. '{print $3}'怎么把上边这行脚本产生的字串赋给一个变量啊,实际上会产生一个数, 这个变量用来存这个数。格式应该是怎么写的?a=`echo $filen | awk -F. '{print $3}' `` 这个符号,是键盘TAB键上面的一个键。还有一种方法是用$符a=$(...) Read More
posted @ 2013-11-17 12:00 奋斗中的毛毛虫 Views(175) Comments(0) Diggs(0) Edit
转摘自:http://hi.baidu.com/suchshow/item/230255b6caab369218469732在 Linux 下,不管你是启动一个桌面程序也好,还是在控制台下运行命令,所有的程序在结束时,都会返回一个数字值,这个值叫做返回值,或者称为错误号 ( Error Number )。在控制台下,有一个特殊的环境变量$?,保存着前一个程序的返回值,我们可以试试:$ ls *.pngDiagram1.png eqn.png peazip.pngeqn4.png Mandelbrot.png x2.png$echo $?0先随便执行个命令,比如像上面的 ls 某些文件... Read More
posted @ 2013-11-17 11:31 奋斗中的毛毛虫 Views(431) Comments(0) Diggs(0) Edit
转摘自:http://blog.csdn.net/zb0567/article/details/7921155spring mvc处理方法支持如下的返回方式:ModelAndView, Model, ModelMap, Map,View, String, void。下面将对具体的一一进行说明:ModelAndViewJava代码@RequestMapping("/show1")publicModelAndView show1(HttpServletRequest request, HttpServletResponse response)throwsException { Read More
posted @ 2013-11-16 14:47 奋斗中的毛毛虫 Views(248) Comments(0) Diggs(0) Edit
转摘自:http://binary.duapp.com/2013/10/1577.html配置下部署路径即可。 Read More
posted @ 2013-11-16 10:18 奋斗中的毛毛虫 Views(141) Comments(0) Diggs(0) Edit
转摘自:http://binary.duapp.com/2013/09/1511.htmlRun->Run Configurations->Common->File Read More
posted @ 2013-11-16 10:14 奋斗中的毛毛虫 Views(279) Comments(0) Diggs(0) Edit
转摘自:http://blog.csdn.net/cqkxzyi/article/details/7606181对于很多人用div来做网站时,总会用到,但在显示效果时前面总是会有一个小黑点,这个令很多人头痛,但又找不到要源,其它我们可以用以下方法来清除。1、在CSS中写入代码。找到相关性的CSS,在。.li和.ul下写入list-sytle:none;当然有的会这样来写list-style-type:none, 这种写法特别是在一些CMS中最常见。2、在相关的页面找到head部分写入下面的代码3、在li,ul内加入list-style。如我的博客 当然这种是很麻烦的了。最简单的就是第一种了,通 Read More
posted @ 2013-11-13 14:02 奋斗中的毛毛虫 Views(880) Comments(0) Diggs(0) Edit
转摘自:http://blog.csdn.net/mxgsgtc/article/details/13005675以前老是被从文本里读取文件,然后逐个的进行字符解析,感觉非常的慢,自从知道了fscanf函数之后,一切变的so easy!fscanf函数用于从文本里读一个字符串到指定的数组里面:[cpp]view plaincopy#include#includestructnode{chara[20];charb[20];charc[20];chard[20];};intmain(){FILE*fp;structnodebuf;memset(&buf,0x00,sizeof(buf)) Read More
posted @ 2013-11-10 23:45 奋斗中的毛毛虫 Views(1663) Comments(1) Diggs(0) Edit
转摘自:http://preceo.blog.51cto.com/6225017/1130931近来写程序时发现了一个问题,用 VC 编译 C语言是 总是提示一个错误:error C2143: syntax error : missing ';' before 'type'。考虑了很久也没有答案,于是上网搜索,终于在一位网友网易博客中找到了解决办法。解决方法如下:把所有变量的声明放在可执行代码之前。出现此问题的原因在于:将文件保存成了 *.c 格式。如果是 cpp 格式就能正常编译。这是因为:在 ANSI C 或者 C++中,在可执行代码中随时定义变量是允许的, Read More
posted @ 2013-11-10 11:42 奋斗中的毛毛虫 Views(1092) Comments(0) Diggs(0) Edit
抓取一个网页内容,然后打印到控制台,发现内容首部都没有了。String content = getResponseText("http://xxx.html");System.out.println(content);这里有相关的讨论http://bbs.sjtu.edu.cn/bbscon,board,Java,file,M.1285432898.A.html如果想查看值,又不想把获取的content内容写入文件,可以在Variables中,对应的变量上,单击鼠标右键,选择“Copy Variables”,然后复制到记事本就可以了。 Read More
posted @ 2013-11-08 10:44 奋斗中的毛毛虫 Views(518) Comments(0) Diggs(1) Edit