摘要: import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.Date;public class Test01 { public static void main(String args[]){ Date date=new Date(); SimpleDateFormat sdf=new SimpleDateFormat("yyyyMMddHHmmss"); System.out.println("时间戳Date="+date.getTime()); Calend 阅读全文
posted @ 2011-08-24 14:58 Steven John 阅读(515) 评论(0) 推荐(0) 编辑
摘要: 关于DB2存储过程的几个小实例2010-08-27 15:55http://blog.myspace.cn/e/402393233.htm ============================================================================== CREATE PROCEDURE proc_with_variables (IN p_empno VARCHAR(6)) LANGUAGE SQL SPECIFIC proc_with_vars -- applies to LUW and iSeries -- WLM ENVIRONMENT < 阅读全文
posted @ 2011-08-20 21:01 Steven John 阅读(1806) 评论(0) 推荐(0) 编辑
摘要: <!-- 用通配符解决mappingResources的繁琐配置 --> <property name="mappingLocations"> <list> <value>classpath*:com/yb/vo/*.hbm.xml</value> <value>classpath*:org/fireflow/engine/persistence/hibernate/*.hbm.xml</value> </list> </property> 阅读全文
posted @ 2011-08-14 18:19 Steven John 阅读(580) 评论(0) 推荐(0) 编辑
摘要: ibatis基础代码包括: 1. ibatis实例配置 一个典型的配置文件如下(具体配置项目的含义见后): <? xml version="1.0" encoding="UTF-8" ?><! DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0/ "http://www.ibatis.com/dtd/sql-map-config-2.dt<sqlMapConfig > < settings cacheModelsEna 阅读全文
posted @ 2011-08-14 17:42 Steven John 阅读(4481) 评论(0) 推荐(0) 编辑
摘要: struts2 spring2 hibernate3 整合框架,我自己整合的,为了以后自己用到的时候,方便找到,没有任何意图。//web.xml<?xml version="1.0" encoding="UTF-8"?><web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLo 阅读全文
posted @ 2011-08-06 22:46 Steven John 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 最近在用JAVA研究下爬网技术,呵呵,入了个门,把自己的心得和大家分享下以下提供二种方法,一种是用apache提供的包.另一种是用JAVA自带的.代码如下:// 第一种方法//这种方法是用apache提供的包,简单方便//但是要用到以下包:commons-codec-1.4.jar// commons-httpclient-3.1.jar// commons-logging-1.0.4.jar public static String createhttpClient(String url, String param) { HttpClient client = new HttpClient( 阅读全文
posted @ 2011-04-22 13:25 Steven John 阅读(694) 评论(0) 推荐(0) 编辑
摘要: sql判断是否为空的查询语句:select t.term from call t where class is null;select t.term from call t where class is not null;select mobile,visttime from local_vistlog where url like 'http://wap0579.cn/wap/hd/yd/4.jsp%' and visttime between to_date('2011-04-22','YYYY-MM-DD') and to_date( 阅读全文
posted @ 2011-04-22 13:23 Steven John 阅读(243) 评论(0) 推荐(0) 编辑
摘要: Oracle里面的导入导出的命令很简单就是exp/imp,导出命令的格式是:exp system/manager@TEST file=d:daochu.dmp full=y其中system是用户名,manager是密码,TEST是数据库名称,file=后面是导出为哪个文件导入命令的格式是:imp system/manager@TEST file=d:daochu.dmp其中system是用户名,manager是密码,TEST是数据库名称,file=后面是要导入哪个文件 阅读全文
posted @ 2011-04-22 13:22 Steven John 阅读(174) 评论(0) 推荐(0) 编辑