原创 EJB3.0、JPA、Hibernate、ORM之間的關係
EJB3.0 JPA Hibernate ORM他們之間的關係是什麼?EJB3.0是J2EE新的行業標準,它是在2005年由Sun公司帶頭定義的,主
原创 Writing and Reading and Deleting a Cookie on the Browser
Creating Cookies with a <META> Tag Listing 1. Creating a Cookie that Is Valid Until a Certain Date <HTML> <HEAD> <T
原创 Hibernate Tools
使用HIBERNATE 工具的幾個情形:1. 已經寫好了JAVA類,還沒設計數據庫,這時可以先編寫好HIBERNATE的MAP,再用hbm2ddl生成數據庫。2 已經寫好了數據庫,沒有JAVA類,In this case, the e
原创 簡單排序及其性能比較
Simple Sorts Efficiency of the Bubble Sort Both swaps and comparisons are proportional to N2. Because constants don't c
原创 希爾排序及代碼實現
The shellSort.java Program // shellSort.java // demonstrates shell sort // to run this program: C>java ShellSortApp //-
原创 用swt/jface進行開發的準備工作
導入swt以及jface的庫文件。這也就意味着:將swt/jface相關的庫文件導入到工程的classpath中去。 需要的庫文件有哪些呢?打開eclipse安裝目錄下的plugins文件夾,我們需要找到以下jar文件: o
原创 合併排序代碼
The mergeSort.java Program // mergeSort.java// demonstrates recursive mergesort// to run this program: C>java MergeSor
原创 ORM介紹-摘自Java Persistence with Hibernate (first chapter)
Object persistence means that individual objects can outlive the application process;they can be saved to a data store
原创 Collections.sort() 方法是模板模式還是策略模式?
在Java.util包中有一個處理集合的工具類Collections,它有一個用來排序的方法sort(),有兩個參數,一個是需要排序的集合,另一個是一個Comparator實例。這個方法用的究竟是二十三中經典設計模式中的哪一種,
原创 javascript 中的數組Array及樹的實現
javascript 中的數組Array 1.聲明:var array = new Array( );可以不用聲明長度,使用時像JAVA中的vector。即使聲明瞭長度,也可以越界使用:var a = new Array(3); a[3
原创 怎樣在Java中啓動其他軟件
怎樣使用 Runtime 對象運行一個外部命令 import java.io.*; public class CmdTest { public static void main(String[] args) throws IOEx
原创 簡單插入排序
public void insertionSort()...{ int in, out; for(out=1; out<nElems; out++)...{ in = out; int temp = a