Windows XP SP2 + Oralce 9i
exp++.bat
1 ?set?sid = portal 2 ?set?username = portal 3 ?set?password = portal 4 ?set?connect = %username%/%password%@%sid% 5 ?set?back_path = D:\oracle 6 ?set?date_string = %date:~ 0 , 4 %_%date:~ 5 , 2 %_%date:~ 8 , 2 % 7 ?set?time_string = %time:~ 0 , 2 %_%time:~ 3 , 2 %_%time:~ 6 , 2 % 8 ?set?file_string = %back_path%\portal_%date_string%_%time_string% 9 ?exp?%connect%?buffer = 20000000 ?file = %file_string%.dmp?log = exp_%file_string%.log?owner = portal
imp++.bat
?1 ?set?dmp_source = % 1 ?2 ?set?sid = his ?3 ?set?username = his_dba ?4 ?set?password = his_dba ?5 ?set?connect = %username%/%password%@%sid% ?6 ?set?back_path = D:\oracle ?7 ?set?date_string = %date:~ 0 , 4 %_%date:~ 5 , 2 %_%date:~ 8 , 2 % ?8 ?set?time_string = %time:~ 0 , 2 %_%time:~ 3 , 2 %_%time:~ 6 , 2 % ?9 ?set?output_string = %back_path%\portal_%date_string%_%time_string% 10 ?set?source_string = %back_path%\%dmp_source% 11 ?imp?%connect%?file = imp_%source_string%?log = %output_string%.log?FROMUSER = portal
Change CHARACTER SET
1 ?ALTER?DATABASE?CHARACTER?SET?UTF8 2 ?NLS_CHARACTERSET 3 ?ZHS16CGB231280 4 ?ZHS16GBK 5 ?AL32UTF8 6 ?UTF8
posted @
2006-08-07 14:10 rox 閱讀(1571) |
評論 (3) |
編輯 收藏
Commons 閱讀筆記 之 Logging 篇
Configure commons-logging to use log4j
?1 ?Environment?:?Win2000Server , Tomcat- 3 .3a , AXIS?and?all?the?stuff?for?\ ?2 ?Axis(commons-logging , xerces , log4j , ?etc.) ?3 ??4 ?What?should?I?do?for?enabling?output?axis?activity?into?log?file? ?5 ??6 ?My?log4j.properties?file?looks?like: ?7 ??8 ?/************************************************************************/ ?9 ?10 ?log4j.rootCategory = INFO , ?LOGFILE 11 ?log4j.category.org.apache.axis = INFO 12 ?13 ?14 ?#?LOGFILE?is?set?to?be?a?File?appender?using?a?PatternLayout. 15 ?log4j.appender.LOGFILE = org.apache.log4j.FileAppender 16 ?log4j.appender.LOGFILE.File = axis.log 17 ?log4j.appender.LOGFILE.Append = true 18 ?log4j.appender.LOGFILE.Threshold = INFO 19 ?log4j.appender.LOGFILE.layout = org.apache.log4j.PatternLayout 20 ?log4j.appender.LOGFILE.layout.ConversionPattern = %-4r? [ %t ] ?%-5p?%c?%x?-?%m%n 21 ?22 ?/************************************************************************/ 23 ?24 ?I'd?created?variable? 25 ?26 ?TOMCAT_OPTS = log4j.configuration = file:/D:/jakarta-tomcat- 3 .3a/webapps/axis/WEB-INF/clas?\ 27 ?ses/log4j.properties???????????/*?Here?the?place?for?file?mentioned?above?*/ 28 ?29 ?Then?I?had?simply?started?from?console?window: 30 ?31 ?java?-Dorg.apache.commons.logging.Log = org.apache.commons.logging.impl.Log4jFactoryLog 32 ?33 ?org.apache.axis.client.AdminClient?list 34 ?35 ?I?had?seen?nothing?neither?on?the?console?window?neither?in?file?axis.log 36 ?37 ?What?else?should?I?do?with?commons-logging?or?log4j?for?logging? 38 ?39 ?Any?help?would?be?very?appreciated. 40 ?41 ?Andrew
posted @
2006-08-03 11:41 rox 閱讀(323) |
評論 (0) |
編輯 收藏
一個可以快速實現網頁內窗口的JS:
http://prototype-window.xilinus.com/
以前引用過,轉到這里來,
很牛的網頁效果,非常接近Windows視覺:
http://www.activewidgets.com/
一個國內牛人的系列產品:
http://www.linb.net/linb/index.html
posted @
2006-07-11 09:29 rox 閱讀(371) |
評論 (1) |
編輯 收藏
1、首先制作一個批處理,對集群IP進行DNS設置:
?1 ?@echo?off? ?2 ?if ? not ?exist?hosts? goto ?WNT? ?3 ?echo? 192.168 . 2.5 ?HIS_S0? >> C: \ windows \ hosts? ?4 ?echo? 192.168 . 2.6 ?HIS_S1? >> C: \ windows \ hosts? ?5 ?goto ? END ? ?6 ?:WNT? ?7 ?echo? 192.168 . 2.5 ?HIS_S0? >> %systemroot% \ system32 \ drivers \ etc \ hosts? ?8 ?echo? 192.168 . 2.6 ?HIS_S1? >> %systemroot% \ system32 \ drivers \ etc \ hosts? ?9 ?: END ? 10 ?echo?Finished! 11 ?pause? > ?nul 12 ?cls
2、配置一個URL來連接這個集群,集群的服務名為HIS:
1 ?jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = HIS_S0)(PORT = 1521 ))(ADDRESS = (PROTOCOL = TCP)(HOST = HIS_S1)(PORT = 1521 ))(LOAD_BALANCE = yes))(CONNECT_DATA = (SERVICE_NAME = HIS)))
posted @
2006-06-07 09:04 rox 閱讀(517) |
評論 (1) |
編輯 收藏
Searching "iframe height 100" in 谷歌!
1、
< iframe? height ="100%" > ?
no work 2、
< iframe? stlye ="height:?100%;" > ?
no work 3、CSS
1 ?/***?html?file?***/ 2 ?3 ?< p? class ="forum2" > 4 ?? < iframe? src ="http://mydomain.com/phpbb" ?title ="Forum" ?scrolling ="auto" > 5 ?? </ iframe > 6 ?</ p >
?1 ?/* **?css?file?** */ ?2 ??3 ?..forum2? { ?4 ?????height : ?900px ; ?5 ?????width : ?100% ; ?6 ?} ?7 ??8 ?IFRAME? { ?9 ?????min-height : ?900px ; 10 ?????height : ?100% ; 11 ?????width : ?100% ; 12 ?}
4、JavaScript
?1 ?< script?language = " JavaScript " > ?2 ?<!-- ?3 ?function ?resize_iframe() ?4 ?{ ?5 ??? // resize?the?iframe?according?to?the?size?of?the ?6 ??7 ??? // window?(all?these?should?be?on?the?same?line) ?8 ??9 ???document.getElementById( " glu " ).height = 10 ?????document.body.offsetHeight - 11 ?????document.getElementById( " glu " ).offsetTop - 26 ; 12 ?} 13 ?14 ?// ?this?will?resize?the?iframe?every 15 ?// ?time?you?change?the?size?of?the?window. 16 ?window.onresize = resize_iframe;? 17 ?18 ?// Instead?of?using?this?you?can?use:? 19 ?// ????<BODY?onresize="resize_iframe()"> 20 ?21 ?22 ?// --> 23 ?</ script >
1 ?< iframe?id = 'glu'?width = 100 % ?onload = 'resize_iframe()' > 2 ?</ iframe >
5、
用CSS構建iframe效果的四種方法 6、
W3C關于iframe的描述
posted @
2006-04-18 19:28 rox 閱讀(4962) |
評論 (5) |
編輯 收藏
desired 在digg里寫道,這里是
一篇有趣的文章 ,
詳細的討論了為什么Ruby on
Rails有那么多的優點卻始終難以戰勝Java或者ASP.net成為網絡應用程序設計的主流語言。不過作者自己本身很喜歡Ruby on
Rails,所以他雖然寫了這篇文章,卻絲毫不影響他對于Ruby on Rails最后定能成功地信心。
posted @
2006-04-10 10:48 rox 閱讀(373) |
評論 (0) |
編輯 收藏
轉載
當然是Ruby相關的。
比如我常去:
http://groups.google.com/group/comp.lang.ruby?hl=zh-CN&lr=&newwindow=1 http://eigenclass.org/hiki.rb?WEBlog%3A%3ARuby http://redhanded.hobix.com/ http://jimweirich.umlcoop.net/index.cgi
http://wiki.rubyonrails.org
http://www.railscn.com
http://chinaonrails.com/frontpage
http://ror.uuclubs.com
http://www.ruby-forum.com/
posted @
2006-03-31 20:36 rox 閱讀(396) |
評論 (0) |
編輯 收藏
http://www.ruby-lang.org/
這里有第一版的部分中文翻譯 下載最新版本的Ruby,安裝之后就有一個快捷指向ProgrammingRuby.chm,
很不錯的書,已經有了2005年的2nd版本,可以到
這里下載 。(順便做個廣告
)
按照上面的例子,建立兩個文件,
test.rb
?1 ?class ?Song ?2 ??? def ?initialize(name,?artist,?duration) ?3 ?????@name????? = ?name ?4 ?????@artist??? = ?artist ?5 ?????@duration? = ?duration ?6 ???end ?7 ??? def ?to_s?? ?8 ????? " Song:?#{@name}--#{@artist}?(#{@duration}) " ?? ?9 ???end?? 10 ?end 11 ?12 ?class ?Song 13 ???attr_reader?:name,?:artist,?:duration? 14 ?end 15 ?16 ?class ?KaraokeSong? < ?Song 17 ???attr_reader?:lyrics 18 ??? def ?initialize(name,?artist,?duration,?lyrics) 19 ?????super(name,?artist,?duration) 20 ?????@lyrics? = ?lyrics 21 ???end 22 ??? def ?to_s?? 23 ????? " Karaoke " ? + ?super? + ? " \nlyrics:?#{@lyrics} " ?? 24 ???end 25 ?end
test2.rb
1 ?class ?Song 2 ???attr_writer?:name,?:artist,?:duration? 3 ?end
然后在控制臺下輸入:
?1 ?C:\>ruby ?2 ?load?"d:/ruby/mycode/test.rb" ?3 ?load?"d:/ruby/mycode/test2.rb" ?4 ?song?=?Song.new("Bicylops",?"Fleck",?260) ?5 ?puts?song.inspect ?6 ?puts?song.to_s ?7 ?song.name="Groovy" ?8 ?song.artist="Java" ?9 ?song.duration=15 10 ?puts?song.inspect 11 ?puts?song.to_s 12 ?^D 13 ?#<Song:0x28366e0?@name="Bicylops",?@duration=260,?@artist="Fleck"> 14 ?Song:?Bicylops--Fleck?(260) 15 ?#<Song:0x28366e0?@name="Groovy",?@duration=15,?@artist="Java"> 16 ?Song:?Groovy--Java?(15)
注:這里的^D是Ctrl+D 這段代碼,給我們什么啟發呢?
posted @
2006-03-25 23:51 rox 閱讀(245) |
評論 (0) |
編輯 收藏
好像IE下可以,Firefox不行。
<input type="text" name="test" onclick="test.innerText='hello'">
posted @
2006-02-17 17:39 rox 閱讀(465) |
評論 (0) |
編輯 收藏
最近用 Hibernate 3 連接 Mysql 4 數據庫。
調試時都還好,真正發布的時候毛病來了。
每天早晨都要都會報錯,不能正常操作數據庫。
Mysql 重啟,無效,Tomcat 重啟,有效。
Mysql(MySQL 4.1) 文檔 7.5.2 節
Tuning Server Parameters 里面
在 Mysql控制臺下輸入 SHOW VARIABLES;
最后一個參數
wait_timeout?? ?28800
如果單位是秒,也就是 8 個小時。
程序最后一次建立連接完畢之后 8 個小時,
Mysql 單方面關閉了這個連接。
但 Hibernate 還在記憶著這個連接基本信息。
程序再次連接的時候,已經不存在了。
不過,Hibernate 可以設置它自己的 timeout 。
到了 Hibernate 3 默認第三方的連接池管理,
由 Apache 的 DBCP 項目更換成了
c3p0 項目 。
它的屬性在 Hibernate 配置屬性有對應的寫法,如:
c3p0.maxIdleTime = hibernate.c3p0.timeout
c3p0.maxPoolSize = hibernate.c3p0.max_size
所以,要修改一下 hibernate.cfg.xml 文檔
將 Hibernate 默認連接池參數
<property name="connection.pool_size">5</property>
刪除或注釋掉,Hibernate 默認連接池比較初級。
然后,加入以下屬性
<property name="hibernate.c3p0.timeout">1800</property>
<property name="hibernate.c3p0.max_size">5</property>
就可以使用 c3p0 來管理連接池了。
其實這些屬性的參數名都可以在 Hibernate 文檔 3.3 節
JDBC connections 里面找到。
按照相應的格式更改名字和值就可以了。
posted @
2006-02-14 19:43 rox 閱讀(12510) |
評論 (5) |
編輯 收藏