//加入收藏夹functionAddFvtgc(){vartitle=document.title;varurl=document.location.href;try{window.external.AddFavorite(url,title);}catch(e){alert("请按下Ctrl+D键将本站加入收藏。");}}//设为首页functionAddHomegc(){varurl=document.location.href;if(document.all){..
分类:
编程语言 时间:
2015-04-21 18:34:46
阅读次数:
144
publicvoidencryptFile(StringfileName){
FileInputStreamfis=null;
Filefile=null;
try{
file=newFile(fileName);
fis=newFileInputStream(file);
System.out.println(file.length());
System.out.println(fis.available());
}catch(FileNotFoundExcepti..
分类:
编程语言 时间:
2015-04-21 18:32:46
阅读次数:
165
java中获得当前文件路径多种方法 public String getClassPath(){ String path=""; try { path=new File(getClass().getClassLoader().getResource("").toURI()).getPath(); }catch (URISyntaxException ex) {} re...
分类:
编程语言 时间:
2015-04-21 11:31:05
阅读次数:
145
1、try,catch的语句块生成:选中要包含的代码,然后按下快捷键:ALT+SHIFT+Z
分类:
系统相关 时间:
2015-04-20 18:41:25
阅读次数:
134
powershelltry{ $resp = $r.GetResponse() $reqstream = $resp.GetResponseStream() $sr = new-object System.IO.StreamReader $reqstream...
分类:
Web程序 时间:
2015-04-20 12:46:38
阅读次数:
143
1. Java异常补充 a.使用try/catch捕获了异常之后,catch之后的代码是会正常运行的,这是很多新手会犯的错误。public class ExceptionTest { public static void main(String [ ] args) { try{...
分类:
编程语言 时间:
2015-04-20 00:30:52
阅读次数:
159
异常处理异常 exception 是程序在执行过程中所产生的问题对异常的处理方法:1.捕获异常,不让它沿着调用闸继续向下抛出2.捕获异常 并让它向下抛出3.不捕获异常try没有异常时不会执行catch()try出现异常之后 其它代码不会执行 跳到对应捕获异常的catch() 语句块执行异常分类:1 ...
分类:
编程语言 时间:
2015-04-19 21:15:38
阅读次数:
166
我在实验中在函数里抛出了异常,然后在主函数里对异常进行了catch,其中从上到下对异常的类型进行判断然后基类exception的catch可以catch子类的exception,而finally无论是否有exception都会执行。 delegate是类似与函数指针的一种方法,他有匿名和非匿名两种方...
分类:
其他好文 时间:
2015-04-19 21:13:41
阅读次数:
124
//是否存在指定函数 function isExitsFunction(funcName) { try { if (typeof(eval(funcName)) == "function") { return true; } } catch(e) {} return false;}//是否存在指定变...
分类:
Web程序 时间:
2015-04-19 21:13:34
阅读次数:
168
Java提供了两类主要的异常:runtime exception和checked exception。checked异常也就是我们经常遇到的IO异常,以及SQL异常都是这种异常。对于这种异常,JAVA编译器强制要求我们必需对出现的这些异常进行catch。所以,面对这种异常不管我们是否愿意,只能自.....
分类:
编程语言 时间:
2015-04-19 15:56:10
阅读次数:
157