發表文章

doGet vs doPost

妙阿~Browser的陷阱@@  當在 “網址列”  直接手動輸入 含有「中文」的網址時 path 部分預設會以 UTF-8 編碼送出! Internet Explorer、Firefox、Google Chrome 行為皆如此 query 部分一律會以  系統區域  (System locale) 設定為主 若為 " 繁體中文(台灣) " 就會自動以 Big5 碼送出文字! 若為 " 簡體中文(中國) " 就會自動以 GB2312 碼送出文字! 此規則只有 Google Chrome 為例外,Google Chrome 會一律用 UTF-8 編碼送出文字。 出處: http://blog.miniasp.com/post/2009/09/12/How-browser-handle-web-character-encoding.aspx

Oracle Extract DDL of a Table

對於寫script備份資料庫資訊很有用唷~ select DBMS_METADATA.GET_DDL('TABLE','TABLE_NAME') from DUAL

merge file in dos

D:\08_New Download\Downloads>copy /b Pro.ipa.aa Pro.ipa 複製了         1 個檔案。 D:\08_New Download\Downloads>copy /b Pro.ipa+Pro.ipa.ab Pro.ipa Pro.ipa.ab 複製了         1 個檔案。 D:\08_New Download\Downloads>copy /b Pro.ipa+ Pro.ipa.ac Pro.ipa Pro.ipa.ac 複製了         1 個檔案。

Android 半透明...

半透明<Button android:background="#e0000000" ... /> 透明<Button android:background="#00000000" ... /> 顏色和不透明度(α)值以十六進制表示法表示。任何一種顏色的值範圍都是0到255(00到ff)。對於 alpha ,00表示完全透明,幾段表示完全不透明。表達式 順序是“aabbggrr”,其中的“aa = alpha ”(00到ff);的“BB =藍色”(00到ff),“千噸 =綠色”(00到ff),“RR為紅色”(00到ff)  。例如,如果您希望對某疊加層應用不透明度為 50%的藍色,則應指定以下值:7fff0000

Check Java Binary Version

檢視Java Binary File編譯版本 方法一: >javap -verbose Employee Compiled from "Employee.java" public class test.Employee extends java.lang.Object   SourceFile: "Employee.java"   minor version: 0    major version: 50   Constant pool: ..... 方法二: 使用文字工具開啟class檔案,檢視前面的binary code javac -target 1.1  ==>  CA FE BA BE 00 03 00 2D javac -target 1.2  ==>  CA FE BA BE 00 00 00 2E javac -target 1.3  ==>  CA FE BA BE 00 00 00 2F javac -target 1.4  ==>  CA FE BA BE 00 00 00 30 看起來新版本就往下推最後一碼了... :P

HTML特殊字元替換

Character Entity Decimal Hex Rendering in Your Browser Entity Decimal Hex quotation mark = APL quote &quot; &#34; &#x22; " " " ampersand &amp; &#38; &#x26; & & & less-than sign &lt; &#60; &#x3C; < < < greater-than sign &gt; &#62; &#x3E; > > > Latin capital ligature OE &OElig; &#338; &#x152; Œ Œ Œ Latin small ligature oe &oelig; &#339; &#x153; œ œ œ Latin capital letter S with caron &Scaron; &#352; &#x160; Š Š Š Latin small letter s with caron &scaron; &#353; &#x161; š š š Latin capital letter Y with diaeresis &Yuml; &#376; &#x178; Ÿ Ÿ Ÿ modifier letter circumflex accent &circ; &#710; &#x2C6; ˆ ˆ ˆ small tilde &tilde; &#732; &#x2DC; ˜ ˜ ˜ en space &ensp; &#8194; &#x2002; em space &emsp; &#8195; &#x2003; thin space &thinsp; &#8201; &#x2009; zero width non-...

Struts Action 中調用 Servlet Function

用到的機會不多啦...不過還是有可能會用到... 從Struts Action中呼叫Servlet 且先調用Servlet中的init()做參數的設定使用 MealHitLogServlet servlet = new MealHitLogServlet(); ServletConfig sc=getServlet().getServletConfig(); try { servlet.init(sc); } catch (ServletException e) { e.printStackTrace(); } servlet.addHitLog(String.valueOf(venderNo), String.valueOf(mealId)); PS: Servlet 3.0就有支援Async invoke了,會更方便唷~