import java.util.prefs.Preferences;
public class UsingReg {
public static final String REALKEY = "com.rgagnon.foo";
public static void main(String[] args) {
new UsingReg().doit();
}
public void doit() {
// write into HKCU\Software\Javasoft\Prefs\com.r ...
dwr+spring+hibernate 集成使用
web.xml配置
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/applicationContext.xml</param-value>
</context-param>
<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>org ...
<!--Ssh 加载applicationContext.xml 的几种方式
1. 在web.xml 里面配置一个监听器-->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<listener> <listener-class>org.springframework.web.cont ...
String.prototype.Trim = function(){return this.replace(/^\s+|\s+$/g,"");}
String.prototype.Ltrim = function(){return this.replace(/^\s+/g, "");}
String.prototype.Rtrim = function(){return this.replace(/\s+$/g, "");}
var str=" helloworld ";
alert("----"+str.Ltrim()+"-----"); //去左边空格
...
1、怎样格式化日期
如果你想格式化一个的时候,需要注意一下JDK中自带的SimpleDatFormat类不是线程安全的。你可以用FastDateFormat或DateFormatUtils来实现你想要的功能。如果在你的系统中有多个线程共享一个SimpleDatFormat实例,建议你马上改为SimpleDatFormat类.
Date now = new Date( );
String isoDT = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format( now );
System.out.println( "It ...
package com.vo;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Test {
/**
* @param args
*/
public static void main(String[] args) {
/*创建 ApplicationContext 实例的时候就加载了配制文件.并初始化好了所有 ...
分页的核心代码
package com.crm.dao;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Example;
import org.hibernate.criterion.MatchMode;
//hibernate 自动创建的一个工厂类
import com.crm.util.HibernateSessionFactory;
public class Split ...







评论排行榜