在.NET上的POI:NPOI
POI專案本身的處理Office檔案的函式庫,包含Word、Excel、PowerPoint、OutLook、Visio、Publisher等檔案。
參考網址
在Server端存取Excel檔案的利器:NPOI Library
NPOI簡介
NPOI Downloads
2010年1月20日 星期三
2009年11月25日 星期三
解決ajaxpro.2.dll中this.onTimeout is not a fuction的錯誤
修改core.js
相關程式請參閱
http://groups.google.sc/group/ajaxpro/browse_thread/thread/da617d3dc31d65cb
壓縮檔中是已經編譯好的文件,也可以自行加入core.js重新編譯
http://files.cnblogs.com/momo0789/AjaxPro.2.dll.zip
相關程式請參閱
http://groups.google.sc/group/ajaxpro/browse_thread/thread/da617d3dc31d65cb
壓縮檔中是已經編譯好的文件,也可以自行加入core.js重新編譯
http://files.cnblogs.com/momo0789/AjaxPro.2.dll.zip
2009年11月24日 星期二
IE點選視窗的X時觸發某一事件
=====HTML部分========
加上一個LinkButton
=======JAVASCRIPT========
function onBeforeUnload()
{
__doPostBack('LinkButton1','');
}
=================================
LinkButton1_Click寫進資料庫之類的程式
加上一個LinkButton
=======JAVASCRIPT========
function onBeforeUnload()
{
__doPostBack('LinkButton1','');
}
=================================
LinkButton1_Click寫進資料庫之類的程式
2009年11月11日 星期三
Oracle 的 @@IDENTIFY 抓 INSERT 的 PK
INSERT INTO TABLE01 (SYS_PK, F1, F2) VALUE( SYS_GUID(), 'xxx', 'yyy') RETURNING SYS_PK INTO :UOTPARAM
再用 ParameterDirection.Output
抓出來
再用 ParameterDirection.Output
抓出來
2009年11月8日 星期日
Responses to “Pivoting in SQL using the 10g Model Clause”
here is a performace test i’ve maded on worked_hours.
insert into work_hours select mod(rownum,56),
rownum,mod(rownum,7),1 from dba_objects;
select count(1) from worked_hours;
49647
select weekno
, empno
, mon
, tue
, wed
, thu
, fri
, sat
, sun
from worked_hours
model
return updated rows
partition by (weekno, empno)
dimension by ( day )
measures ( hours, 0 mon, 0 tue, 0 wed, 0 thu, 0 fri, 0 sat, 0 sun)
RULES upsert
(
mon [0] = hours [1]
, tue [0] = hours [2]
, wed [0] = hours [3]
, thu [0] = hours [4]
, fri [0] = hours [5]
, sat [0] = hours [6]
, sun [0] = hours [7]
)
/
Statistics
———————————————————-
10 recursive calls
0 db block gets
184 consistent gets
1260 physical reads
0 redo size
1228664 bytes sent via SQL*Net to client
36900 bytes received via SQL*Net from client
3310 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
49635 rows processed
49635 rows selected.
Elapsed: 00:00:04.21
SQL> select weekno
2 , empno
3 , mon
4 , tue
5 , wed
6 , thu
7 , fri
8 , sat
9 , sun
10 from (
11 select weekno,empno,sum(decode(day,2,hours,0)) mon,
12 sum(decode(day,3,hours,0)) tue
13 ,sum(decode(day,4,hours,0)) wed
14 ,sum(decode(day,5,hours,0)) thu
15 ,sum(decode(day,6,hours,0)) fri
16 ,sum(decode(day,7,hours,0)) sat
17 ,sum(decode(day,7,hours,0)) sun from
18 worked_hours group by weekno,empno)
19 /
49635 rows selected.
Elapsed: 00:00:01.92
Statistics
———————————————————-
4 recursive calls
6 db block gets
184 consistent gets
272 physical reads
0 redo size
943540 bytes sent via SQL*Net to client
36900 bytes received via SQL*Net from client
3310 SQL*Net roundtrips to/from client
0 sorts (memory)
1 sorts (disk)
49635 rows processed
It seems that the old pivot method is better. It seems that the difference connect somehow to phiscal reads.
參考來源
insert into work_hours select mod(rownum,56),
rownum,mod(rownum,7),1 from dba_objects;
select count(1) from worked_hours;
49647
select weekno
, empno
, mon
, tue
, wed
, thu
, fri
, sat
, sun
from worked_hours
model
return updated rows
partition by (weekno, empno)
dimension by ( day )
measures ( hours, 0 mon, 0 tue, 0 wed, 0 thu, 0 fri, 0 sat, 0 sun)
RULES upsert
(
mon [0] = hours [1]
, tue [0] = hours [2]
, wed [0] = hours [3]
, thu [0] = hours [4]
, fri [0] = hours [5]
, sat [0] = hours [6]
, sun [0] = hours [7]
)
/
Statistics
———————————————————-
10 recursive calls
0 db block gets
184 consistent gets
1260 physical reads
0 redo size
1228664 bytes sent via SQL*Net to client
36900 bytes received via SQL*Net from client
3310 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
49635 rows processed
49635 rows selected.
Elapsed: 00:00:04.21
SQL> select weekno
2 , empno
3 , mon
4 , tue
5 , wed
6 , thu
7 , fri
8 , sat
9 , sun
10 from (
11 select weekno,empno,sum(decode(day,2,hours,0)) mon,
12 sum(decode(day,3,hours,0)) tue
13 ,sum(decode(day,4,hours,0)) wed
14 ,sum(decode(day,5,hours,0)) thu
15 ,sum(decode(day,6,hours,0)) fri
16 ,sum(decode(day,7,hours,0)) sat
17 ,sum(decode(day,7,hours,0)) sun from
18 worked_hours group by weekno,empno)
19 /
49635 rows selected.
Elapsed: 00:00:01.92
Statistics
———————————————————-
4 recursive calls
6 db block gets
184 consistent gets
272 physical reads
0 redo size
943540 bytes sent via SQL*Net to client
36900 bytes received via SQL*Net from client
3310 SQL*Net roundtrips to/from client
0 sorts (memory)
1 sorts (disk)
49635 rows processed
It seems that the old pivot method is better. It seems that the difference connect somehow to phiscal reads.
參考來源
2009年9月1日 星期二
指定button為enter的第一個觸發button
經常希望在登入頁的登入button為key完帳號,密碼後的按enter的第一個觸發button,可是如果在這個button之前有其他的button,那麼,預設的第一個button就會是整個頁面上的第一個,為了解決此問題,可將整頁用panel包起來設定DefaultButton="登入button name"即可讓登入的button為第一個觸發的按鈕.
2009年8月31日 星期一
局部設定responseEncoding
通常我們會因為整個系統中要使用的編碼會設定在web.config中,
如
但是有時會因為與其他系統的介接需要做response,而對方的系統只吃big5時可以單支指定
context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("big5");
或
context.Response.HeaderEncoding = System.Text.Encoding.GetEncoding("big5");
context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("big5");
context.Response.AppendHeader("Content-Disposition", "attachment;filename=big5");
來做局部設定
如
但是有時會因為與其他系統的介接需要做response,而對方的系統只吃big5時可以單支指定
context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("big5");
或
context.Response.HeaderEncoding = System.Text.Encoding.GetEncoding("big5");
context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("big5");
context.Response.AppendHeader("Content-Disposition", "attachment;filename=big5");
來做局部設定
訂閱:
文章 (Atom)