CREATE table t_card(id bigint identity primary key,card_no varchar(50),person_id bigint foreign key references t_user(id) on delete cascade unique) <?xml version="1.0"?><!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN""http://hibernate. Read More
package com.cg.tests;import java.util.regex.Matcher;import java.util.regex.Pattern;import org.junit.Test;public class TestPatternMatcher { @Test public void TestReplaceAll(){ String s="Hello World ..."; String s2=s.replaceAll("\\.", ""); System.out.println(s2); String s Read More
package com.cg.tests;import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.GregorianCalendar;import java.util.TimeZone;import org.junit.Test;public class TestCalendar { @Test public void testCalendar(){ /**按年月日构造日期时间对象**/ GregorianCalendar cal =new GregorianCalendar(1988, 1... Read More
public static <T extends Comparable<? super T>> void sort(List<T> list) { Object[] a = list.toArray(); Arrays.sort(a); ListIterator<T> i = list.listIterator(); for (int j=0; j<a.length; j++) { i.next(); i.set((T)a[j]); } } From: JDK Collections.sort方法 Read More
package com.xx.tests;import java.util.HashMap;import java.util.Map;public enum Season { Spring { @Override public String toString() { return "春天"; } }, Summer{ @Override public String toString() { return "夏天"; } }, Autumn{ @Override public String toString() { return "秋天" Read More
package com.cg.test;import java.nio.charset.Charset;import java.util.Iterator;import java.util.Map;import java.util.Set;import org.apache.commons.codec.binary.Hex;public class HexString { /** * @param args */ public static void main(String[] args) throws Exception { String s="1a国"; Sy... Read More
http://james.newtonking.com/projects/json-net.aspxJson.NETJson.NET is a popular high-performance JSON framework for .NETJson.NET CodePlex ProjectJson.NET DownloadFeaturesFlexible JSON serializer for converting between .NET objects and JSONLINQ to JSON for manually reading and writing JSONHigh perfor Read More
http://www.eclipse.org/nebula/Nebula is a place where different Eclipse-Projects and Independent developers collaborate on building Custom SWT widgets and reuseable UI-Components useable in UI-Applications built using SWT and JFace.All Nebula components are available on the navigation tree on the le Read More
http://sourceforge.net/projects/jalopy/http://jalopy.sourceforge.net/existing/index.htmlOverviewJalopy is a source code formatter for the Sun Java programming language. It layouts any valid Java source code according to some widely configurable rules; to meet a certain coding style without putting a Read More
Workbench User Guide > TasksRunning EclipseD:\devProgram\eclipse-rcp-indigo-SR2-win32-x86_64\eclipse\eclipse.exe -vmargs -Xms512M -Xmx1024M -XX:MaxPermSize=256MD:\devProgram\eclipse-rcp-indigo-SR2-win32-x86_64\eclipse\eclipse.exe -data c:\MyWorkspace -vmargs -Xms512M -Xmx1024M -XX:MaxPermSize=256 Read More