搜尋此網誌

windows常用命令

[ 群組原則 ]
開始 → 執行 → gpedit.msc

[ 惡意軟體移除工具 ]
開始 → 執行 → mrt

[ 機碼 ]
開始 → 執行 → regedit

[ 系統設定公用程式 ]
開始 → 執行 → msconfig

[ 控制client端所有網路設備 ]
開始 → 執行 → cmd → ipconfig
開始 → 執行 → cmd → ipconfig/all

[ 顯示封包經過的路由器的IP位址 ]
開始 → 執行 → cmd → tracert (網址或IP)

2012年6月21日 星期四

Subclipse 無法update to HEAD


無法登入MS SQL











需要啟動3個服務 (cmd下執行)
服務顯示名稱:SQL Server
sc start MSSQL$SQLSERVER2008

服務顯示名稱:SQL Server Analysis Services (SQLSERVER2008)(SQLSERVER2008)
sc start MSOLAP$SQLSERVER2008

服務顯示名稱:SQL Full-text Filter Daemon Launcher (SQLSERVER2008)
sc start MSSQLFDLauncher$SQLSERVER2008


2012年6月19日 星期二

依IP address來呈現畫面

String subAddr = request.getLocalAddr().substring(request.getLocalAddr().lastIndexOf(".")+1);
String siteNum = "";
if("98".equals(subAddr)) {
siteNum = "(1)";
} else if("99".equals(subAddr)) {
siteNum = "(2)";
}
System.out.println(" >>"+request.getLocalName());
System.out.println("::"+request.getServerName());

2012年6月18日 星期一

itext & jxl實現PDF、CSV、Excel格式的文件下載

參考來源

好文給個讚

J2SE 參考文章

Java 各版本的差異


First (JDK 1.0) edition

    Objects. Inheritance. Interfaces. Graphics. AWT. Applets. Data Structures. Streams. Multithreading. Network programming.

Second (JDK 1.02) edition

    Additional topics: Object streams. JDBC. RMI. Native methods.

Third (JDK 1.1) Edition

    Split into a two volume set. Additional topics in volume 1: Inner classes. Events. Printing. JAR files. In volume 2: Security. Signed applets. Advanced AWT. JavaBeans.

Fourth (Java SE 1.2) Edition

    Moved streams to volume 1. Additional topics in volume 1: Swing. Java Plug-In. All examples have been rewritten to use Swing. Additional topics in volume 2: 2D Graphics. Advanced Swing components. Container classes.

Fifth (Java SE 1.3/1.4) Edition

    Rewrite of first six chapters. Proxies. Additional debugging tips. Moved some Swing components from volume 2. Code with line numbers. Figures more UML compliant. More Unix/Linux coverage. Removed corejava package.

Sixth (Java SE 1.4) Edition

    Added coverage of 1.4 features: Logging, regular expressions, NIO file channels, preferences API, Java Web Start,  formatted text fields,  new focus architecture, more events (mouse wheel etc.), new frame functionality, spinners, spring layouts, assertions. Numerous bug fixes and updates throughout all chapters.

Seventh (Java SE 5.0) Edition

    Added coverage of 5.0 features: Generic classes, autoboxing, varargs, enumerated types, annotations, java.util.concurrent. Numerous bug fixes and updates throughout all chapters.

8th (Java SE 6) Edition

    Coverage of Java SE 6 features. Collections and multithreading moved to volume 1. New material on Swing and AWT enhancements, compiler and scripting APIs. Numerous bug fixes and updates throughout all chapters.

2012年6月16日 星期六

2012年6月14日 星期四

清除按鈕功能

不需要被清除的field
clearDefault="初始值" 或 <script type="text/javascript">form1.fieldName.clearDefault="初始值";</script>
清除按鈕 onclick="clearValue();"

function clearValue(){
 for(var i=0; i<document.forms[0].elements.length; i++){
  obj = document.forms[0].elements[i];
  if("field_Q" == obj.className){
   if( undefined == obj.clearDefault ){
    if("text" == obj.type) {
     obj.value = "";
    } else if("checkbox" == obj.type) {
     obj.checked = false;
    } else if("radio" == obj.type) {
     obj.checked = false;
    } else if("select" == obj.type) {
     obj.selectedIndex = 0;
    }
   } else {
    if("text" == obj.type) {
      obj.value = obj.clearDefault;
    } else if("checkbox" == obj.type) {
     if(obj.value == obj.clearDefault) obj.checked = true;
    } else if("radio" == obj.type) {
     if(obj.value == obj.clearDefault) obj.checked = true;
    } else if("select" == obj.type) {
     obj.options.value = obj.clearDefault;
    }
   }
  }
 }
}

不需要下面list,不需要執行queryAll()

將整個queryone()的JSP展開。
<div id="formContainer"> 改成 <div id="formContainerAll">