码迷,mamicode.com
首页 >  
搜索关键字:try catch    ( 15901个结果
java 异常架构图
cu红色为检查异常,就是eclipse要提示你是try catch 还是throws。非检查异常,就是/0,nullpointexception,数据越界访问indexOfOutBounds 异常错误: 最常见的oom错误,还有classnotFoundeError,StackOverflowErr...
分类:编程语言   时间:2014-09-27 20:58:00    阅读次数:222
word转换成HTML 以及IE不兼容问题
public static bool WordToHtml(string wordFileName, string htmlFileName) { try { Object oMissing = System.R...
分类:Web程序   时间:2014-09-26 22:50:28    阅读次数:399
java 读取xml文件开头多了一个问号
Filefile=newFile("D:/xml/PD20140924154_cunchu.xml"); StringBuildersb=newStringBuilder(); FileInputStreamfis=null; BufferedReaderbf=null; try{ fis=newFileInputStream(file); bf=newBufferedReader(newInputStreamReader(fis,"utf-8")); Stringstr=""; while(..
分类:编程语言   时间:2014-09-26 20:26:09    阅读次数:242
The ‘Microsoft.ACE.OLEDB.12.0′ provider is not registered on the local machine. (System.Data)
When you try to import Excel 2007 or later “.xlsx” files into an SQL Server 2008 database you may get the following error mesage :The ‘Microsoft.ACE.O...
分类:数据库   时间:2014-09-26 18:05:28    阅读次数:507
The first day
this is my first time to try to write the blog about java.i focus on javaSE,javaEE,javaME, recording and sharing my mistakes or idea in no soon is wha...
分类:其他好文   时间:2014-09-26 11:21:18    阅读次数:205
C# 将Datatable作为参数,传入存储过程
//创建一个静态方法 public static DataSet fnInsertSingleUser(DataTable v_dt, params string[] param) { try { SqlConn...
分类:其他好文   时间:2014-09-26 10:28:18    阅读次数:240
Android Socket与服务器通信通用Demo
在Android中通过Socket来来连接服务器,是一种比较简单的网络连接方式,虽然现在使用的不多,但某些场合还是很方便的,这里总结一下基本的写法。客户端:try { Socket socket = new Socket(host, port); socket.setSoTimeout(6 * 1000); PrintWriter printWriter = new Pri...
分类:移动开发   时间:2014-09-25 23:48:48    阅读次数:237
python 得到一个元素的所有下标(网友提供:http://www.oschina.net/code/snippet_212212_38917)
defall_index(l,o):deffind_index(l,o,start=0):try:index=l.index(o,start)except:index=-1returnindexindexs=[]i=0whileTrue:idx=find_index(l,o,i)ifidx==-1:...
分类:编程语言   时间:2014-09-25 21:59:47    阅读次数:212
java 线程sleep方法
public static void main(String[] args) {Runner1 r1 = new Runner1();Thread t = new Thread(r1);t.start();try {Thread.sleep(10000);} catch (InterruptedEx...
分类:编程语言   时间:2014-09-25 20:16:17    阅读次数:168
java判断一个字符串中是否含有中文
package src; public class Main { public static void main(String args[]){ String chinese = "中文 is english"; int clenth = 0; try{ clenth = chinese.getBytes("gbk").length; }catch(Exc...
分类:编程语言   时间:2014-09-25 18:35:57    阅读次数:230
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!