在java中的异常处理和c#中的异常处理是一样的都是用try-catch语句。基本语法如下 try { //此处是可能出现异常的代码 } catch(Exception e) { //此处是如果发生异常的处理代码 }finally语句 ...
分类:
编程语言 时间:
2014-06-19 09:31:42
阅读次数:
242
方案1: /// /// 传入URL返回网页的html代码 /// /// URL /// public static string getUrltoHtml(string Url) { errorMsg = ""; try { System.Net.WebRequ...
分类:
Web程序 时间:
2014-06-18 23:26:21
阅读次数:
350
@Test public void test() throws Exception{ //创建输入数据流对象 InputStream In=new FileInputStream("HellWord.txt"); try { //System.out.print((ch...
分类:
编程语言 时间:
2014-06-18 21:39:04
阅读次数:
226
推倒重来俗话说no zuo no die why you try,这时候我又忍不住zuo了,吭哧吭哧的把解决过程发上博客,向全世界宣布,哥又搞定个难题。剧情的发展往往是看起来主角完全掌握了局势的情况下,会突然跳出来一个很牛的反面人物,然后搞得主角很惨,搞的过程中主角开始小宇宙爆发,然后逆袭。这次也不...
分类:
数据库 时间:
2014-06-18 20:34:23
阅读次数:
383
期间遇到了无法转value的值为int型,我採用try catch解决str2 2str1 1str3 3str1 4str4 7str2 5str3 9用的\t隔开,得到结果str1 1,4str2 2,5str3 3,9str4 7我这里map,reduce都是单独出来的类,用了自己定义的key...
分类:
其他好文 时间:
2014-06-18 18:35:21
阅读次数:
184
public static void downFile(final String url){
new Thread(){
public void run(){
FileOutputStream os=null;
try{
InputStream input=null;
...
分类:
移动开发 时间:
2014-06-16 20:47:47
阅读次数:
286
#!/bin/bash
echo "try to set 800x600" xrandr -s 8sleep 10echo "try to set 1680x1050"xrandr -s 2sleep 10echo "try to set 1440x900"xrandr -s 4
sleep 10 echo "try to set 1280x1024"xrandr -s 3sleep 10echo...
分类:
其他好文 时间:
2014-06-16 18:55:46
阅读次数:
174
报错信息:password authentication failed Permission denied, please try again1 开启ubuntu上的ssh功能先安装,安装后就自动开启了.sudo apt-get install openssh-server openssh-clie...
分类:
其他好文 时间:
2014-06-15 14:05:28
阅读次数:
277
原地址:http://www.sudu.cn/info/html/edu/net/20071227/50446.html一、c#的异常处理所用到关键字try 用于检查发生的异常,并帮助发送任何可能的异常。catch 以控制权更大的方式处理错误,可以有多个catch子句。finally 无论是否引发了...
分类:
其他好文 时间:
2014-06-15 11:52:21
阅读次数:
223
1 基于wps直接将页面信息下载成word文档 1 public void test() 2 { 3 4 WPS.Application wps = null; 5 try 6 { 7 ...
分类:
Web程序 时间:
2014-06-14 17:20:30
阅读次数:
212