tyson記事本

Google & man(Unix) are your best friends!

JAVA 測試 String物件時間

ref: http://www.javaworld.com.tw/jute/post/view?bid=29&id=9557

public class Test{
public static void main(String[] args){
new Test();
}

public Test(){
System.out.println(”normal converting (ms): ” + normal());
System.out.println(”algorithm converting (ms): ” + algo());
}

public long normal(){
int a = 0;
String b = null;
long st = System.currentTimeMillis();
for (int i = 0; i < 2000000; i++){
b = a + “”;
}
long et = System.currentTimeMillis();
return (et – st);
}

public long algo(){
int a = 0;
String b [...]

String與基本資料型態(int byte…等)之間的轉換

ref: http://www.javaworld.com.tw/jute/post/view?bid=29&id=9557
轉錄自java連線版
發信人: TAHO, 看板: java 精華區
標 題: String與基本資料型態(int byte…等)之間的轉換
發信站: 140.126.22.6 竹師風之坊
Origin: Local
String與基本資料型態(int byte…等)之間的轉換
1. 由 基本資料型態轉換成 String
String 類別中已經提供了將基本資料型態轉換成 String 的 static 方法
也就是 String.valueOf() 這個參數多載的方法
有下列幾種
String.valueOf(boolean b) : 將 boolean 變數 b 轉換成字串
String.valueOf(char c) : 將 char 變數 c 轉換成字串
String.valueOf(char[] data) : 將 char 陣列 data 轉換成字串
String.valueOf(char[] data, int offset, int count) :
將 char 陣列 data [...]

Oracle: url

1. http://www.adp-gmbh.ch/
2. http://www.psoug.org/library.html

exp and imp in Oracle

ref: http://www.adp-gmbh.ch/ora/admin/imp_exp.html

exp and imp in Oracle

exp and imp are the executables that allow to make exports and imports of data objects (such as tables). Therefore, logical backups can be made with exp.
exp/imp allow to transfer the data accross databases that reside on different hardware plattforms and/or on different Oracle versions. If the [...]

Oracle: 如何在 SQL 敘述中使用包含 & 字元的字串常數

ref: http://www.cine.idv.tw/Learning/ComputerScience/Database/oracle/AppNotes/appnote-59824f555728-sql-65588ff04e2d4f7f75285305542b-5b57514376845b574e325e386578/

shortie 發現 TOAD 的 SQL Editor ,會把 ‘&’ 字元後的字串,當成變數名稱,造成無法直接將欄位之值,更新為包含 ‘&’ 字元的字串…

問題描述
INSERT INTO DTBDRG (
DRG_CODE, DRG_NHI_CODE, DRG_NAME, DRG_JD_FLAG,
DRG_SPEC, DRG_UNIT, DRG_CHARACTER, DRG_TEST_FLAG, DRG_BRAND)
VALUES (
‘1CL100′, ‘A042448100′, ‘CLOPINE 100mg (Clozapine) ‘, ‘ ‘,
‘100mg ‘, ‘Tab ‘, ‘ ‘, ‘ ‘, ‘瑞士[1.2.2.1&~2]‘);
在 TOAD 中無法執行。
解決方案
這嚴格說起來並不能算是 PL/SQL 問題,而是 TOAD 的 SQL [...]