public byte[] base64ToByte(String strBase64){ if(strBase64==null)return null; byte[] bytes = null; try { BASE64Decoder dec = ne...
分类:
其他好文 时间:
2014-09-25 14:04:28
阅读次数:
205
连接数据库步骤: a. 用java程序与db建立一个连接(通道) b。根据连接获取一个执行sql语句的对象 c。执行sql语句 d。关闭连接public class Main { public static void main(String[] args) { try { ...
分类:
数据库 时间:
2014-09-25 12:58:29
阅读次数:
172
1 #!/usr/bin/env python2 #coding=utf-83 import traceback 4 5 try:6 1/07 except Exception, e:8 print e9 print traceback.format_exc()
分类:
编程语言 时间:
2014-09-25 12:50:28
阅读次数:
194
public String readTxtFile(String filePath) { StringBuffer appInfolistInput = new StringBuffer(); try { String encoding = "UTF8"; File file = new...
分类:
编程语言 时间:
2014-09-25 11:54:18
阅读次数:
147
package cn.sql.sqlconn;public class Util { public Util(){ try { Class.forName("com.mysql.jdbc.Driver"); } catch (C...
分类:
数据库 时间:
2014-09-24 22:15:07
阅读次数:
203
final int PAGE_SIZE = 4;int pageNo = 1;String strPageNo = request.getParameter("pageNo");if(strPageNo != null && !"".equals(strPageNo.trim())) { try ....
分类:
其他好文 时间:
2014-09-24 21:44:47
阅读次数:
193
public static void createFileToNewPath(InputStream inStream, String newPath) { try { int bytesum = 0; int byteread = 0; ...
分类:
编程语言 时间:
2014-09-24 19:30:27
阅读次数:
167
本文转载:http://www.cnblogs.com/LoveJenny/archive/2013/03/13/2956922.html看到try,finally ,有没有让你想到什么呢?,对了using 可以生成try-finallypublic class WaitCursor : IDisp...
解决思路是:
1、先将word生成pdf,这个采用openoffice或者jacob
2、然后将pdf生成图片
具体代码如下:
private void officeToPdf(){
OpenOfficeConnection connection = new SocketOpenOfficeConnection(8100);
try {
connection.connect();...
分类:
编程语言 时间:
2014-09-24 14:41:27
阅读次数:
1455
执行过程public void method(Action action){ //2.method执行中 try { action(); //3.调用委托 string x = "5"; //如果action执行时出现了error,但是内部有catch机...
分类:
其他好文 时间:
2014-09-24 13:10:46
阅读次数:
155