异常分类: Exception RuntimeException 非运行时期异常 运行时期异常自定义异常IO流: Java中的io流是用来处理不同设备间的输入输出问题的 io流操作的类都在io包中; io流分类: 流向分: 输入流 读取数据 输出流 写入数据 按操作数据不同: 字节流 字符流Fi.....
分类:
编程语言 时间:
2015-04-09 00:37:12
阅读次数:
218
#! /bin/bash
clear
function verify
{
if [ $1 -eq "Bob" ] && [ $2 -eq "555" ]
then
echo "Verified"
else
echo "Rejected"
fi
}
verify Bob 555
运行时出现 (此处需要整数表达式) 错误
原因在于一个小错误:
"-...
分类:
系统相关 时间:
2015-04-08 21:38:29
阅读次数:
1139
for((i=91;i>=1;i--));
do
dt=`date +‘%Y%m%d‘ -d"-${i} days"`;
if [ "$dt" = "20150309" ]; then
break;
fi
SQL=‘SELECT `id` FROM `l_pro_index_‘${dt}‘` ORDER BY `id` ASC LIMIT 1;‘
...
分类:
数据库 时间:
2015-04-08 20:04:04
阅读次数:
169
shelllinuxperformancefunctionfile if-fi [cpp] view plaincopyprint? #!?/bin/bash?? #?删除文件?和?新建文件?? file=readme?? function?delFile(){?? ????if?[?-e?./$file?];then?? ?...
分类:
系统相关 时间:
2015-04-08 18:20:15
阅读次数:
182
#!/usr/bin/python#_*_coding:utf-8_*_importsysretry_limit=3retry_count=0account_file=‘account.txt‘lock_file=‘account_lock.txt‘whileretry_count<retry_limit:#只要重试不超过三次就不断循环username=raw_input(‘\033[31;1mUsername:\033[0m‘)lock_check=file(lock_fi..
分类:
其他好文 时间:
2015-04-08 16:46:03
阅读次数:
168
http://www.crummy.com/software/BeautifulSoup/bs3/documentation.zh.html#contents简单的用法:find(name,attrs,recursive,text,**kwargs)好了,我们现在看看其他的搜索方法。他们都是有和fi...
分类:
编程语言 时间:
2015-04-08 13:04:48
阅读次数:
307
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class MyEclipseKeyGen { private static fi...
分类:
系统相关 时间:
2015-04-08 10:45:30
阅读次数:
135
题目链接:http://poj.org/problem?id=3070In the Fibonacci integer sequence,F0= 0,F1= 1, andFn=Fn? 1+Fn? 2forn≥ 2. For example, the first ten terms of the Fi...
分类:
其他好文 时间:
2015-04-08 00:40:52
阅读次数:
167
#!/bin/bash
echo-e"PID\t\tSwap\t\tProc_Name"
forpidin`ls-l/proc|grep^d|awk‘{print$9}‘|egrep-v[a-z]+`
do
#进程id是1为祖进程
if[$pid-eq1];thencontinue;fi#Donotcheckinitprocess
#判断改进程是否占用了swap
grep-q"Swap"/proc/$pid/smaps2>/dev/null
if[$?-eq0];t..
分类:
系统相关 时间:
2015-04-07 20:09:27
阅读次数:
346
项目实战HttpServer--源码下载地址
myhttp脚本文件
#!/bin/sh
WHOAMI=`whoami`
PID=`ps -u $WHOAMI | grep myhttpd | awk '{print $1}'`
if (test "$#" = 0) then
echo "Usage: $0 [stop] [start] [status]"
exit 0
fi
i...
分类:
编程语言 时间:
2015-04-06 14:18:37
阅读次数:
238