/**
* compute the the md5 of input file
* @param input file
* @return
* md5 string, or null
*/
public static String md5(File file){
try{
MessageDigest md = MessageDigest.getIns...
分类:
其他好文 时间:
2014-09-12 19:13:54
阅读次数:
212
为了方便了解每个javascript对象包含的方法,我写一个函数。 1 function GetCollection(obj){ 2 try{ 3 if(obj){ 4 var sType=""; 5 var sMessage=...
分类:
编程语言 时间:
2014-09-12 14:53:43
阅读次数:
127
需要完成的功能是点击指定按钮后修改系统语言,并让应用跟随系统切换语言 privatevoidswitchLanguage(){
IActivityManageram=ActivityManagerNative.getDefault();
Configurationconfig=null;
try{
config=am.getConfiguration();
//更改系统语言
if(conf..
分类:
移动开发 时间:
2014-09-12 02:31:43
阅读次数:
260
压缩部分: try { string Rarexe = @"C:\Program Files\WinRAR\WinRAR.exe"; //WinRAR.exe 的完整路径 string mulu = @"F:\仓存数据\"; // 子文件所在目录 string fileList =null; fil...
分类:
其他好文 时间:
2014-09-11 22:18:32
阅读次数:
291
$(function() { // show try product title $(".tb7_try_box").find("a").each(function(d) {//这里是控制标签 if ($(this).attr('mytitl...
分类:
Web程序 时间:
2014-09-11 18:56:02
阅读次数:
1183
// 创建文件上传路径 public static void mkdir(String path) { File fd = null; try { fd = new File(path); if (!fd.exists()...
分类:
编程语言 时间:
2014-09-11 07:39:51
阅读次数:
195
.NET的异常处理机制用来发现、处理运行时错误。如果开发人员没有提供异常的处理机制,就默认采用.NET的机制。 通常使用try...catch...finally捕获异常。try
{ //有可能发生异常
}
catch(Exception ex)
{ //处理异常
}
finally
{ //清理
...
分类:
其他好文 时间:
2014-09-10 23:47:11
阅读次数:
234
今天写程序遇到一个问题,就是需要在while循环抛异常的时候把数据return出去。发现try块放在while循环外面是正确的。
privatestaticvoidtest5(){
intcount=1;
while(count<100){
count++;
try{
}catch(Exceptione){
}finally{
System.out.println("final:"+c..
分类:
编程语言 时间:
2014-09-10 19:47:31
阅读次数:
241
Just follow this:http://www.haiyun.me/archives/centos-freeradius-daloradius-ros.html, and I will list something different in CentOS7#1:CentOS7 replace...
分类:
其他好文 时间:
2014-09-10 17:14:00
阅读次数:
231
8.1 函数定义: 变量声明提前,但是变量赋值并不会提前 函数声明语句不能出现在循环,条件判断或者try/catch/finally以及with语句中:8.2 函数调用(函数调用,方法调用,构造函数调用,间接调用(call,apply)) 1、var isStrict = (function(...
分类:
编程语言 时间:
2014-09-10 12:20:10
阅读次数:
277