<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-46  評論-54  文章-0  trackbacks-0

    我的評論

    共2頁: 上一頁 1 2 
    恩,不錯,謝謝了!
    re: 送Google Wave邀請2枚 rox 2009-10-15 14:20  
    來晚了,排個隊,希望樓主再又邀請的時候,慷慨贈送一個,謝謝了!
    roxsenall@hotmail.com
    恩,還是有些很中肯的,聽過很多遍了。
    就是學不會,郁悶...
    再補充一個包:

    org.apache.commons.lang.time.*
    http://commons.apache.org/lang/

    回貼慢,就只能補充一個了。
    re: Oracle IMP/EXP bat rox 2009-08-09 10:31  
    exp portal/portal file=portal_`date +%Y%m%d`.dmp log=portal_`date +%Y%m%d`_exp.log
    tar --remove-files -cvzf portal_`date +%Y%m%d`.tar.gz portal_`date +%Y%m%d`*.*
    太強大了,不過,做了10多年的公司,基本上也差不多了。
    謝謝了,下次有機會就一定試試。
    org.apache.commons.lang.time.*
    或者
    http://joda-time.sf.net/
    @深泉
    不好意思,c3p0是因為當時對hibernate不是很熟,有頻繁出現錯誤,沒有辦法才轉的。
    后來發現,還是自己代碼的問題。
    現在主要還是使用DBCP。
    確認一下sessionFactory沒有重復配置。
    另外,initialPoolSize=3,只是初始連接池的大小,并不會對每個連接重復復制,即使是代碼或者配置的錯誤,也不應該出現36的現象。
    你可以試試,換成DBCP的試試,這種現象有沒有再次出現。
    @javakaifa
    HibernatePage
    http://www.hibernate.org/248.html

    protected static HibernatePage getScrollPageInstanceWithTotalByScroll(Query query, int pageNumber, int pageSize){
    ...
    sp.scrollableResults.last();
    sp.totalElements = sp.scrollableResults.getRowNumber();
    ...
    }
    追加一個方法,參數中支持把總數作為參數傳進來。
    protected static HibernatePage getScrollPageInstanceWithTotalByScroll(Query query, Integer totalCount, int pageNumber, int pageSize){
    ...
    if (totalCount != null)
    sp.totalElements = totalCount.intValue();
    else {
    sp.scrollableResults.last();
    sp.totalElements = sp.scrollableResults.getRowNumber();
    }
    ...
    }
    這個totalCount,使用相同查詢條件,只是查詢中使用count(*)來計算結果,并賦值給totalCount。
    也就是說同樣一個查詢,要做兩遍,一個是count,先做,再一個才是查詢。
    re: Oracle IMP/EXP bat rox 2008-07-25 15:03  
    [原創]利用SELECT ... OUTFILE來備份MySQL數據庫
    http://blog.chinaunix.net/u/29134/showart_1074828.html

    改良版本mysqldump來備份MYSQL數據庫
    http://blog.csdn.net/yueliangdao0608/archive/2008/07/20/2681263.aspx
    http://bulaoge.com/topic.blg?tuid=2995&tid=599668

    以秒運行Crontab
    在Liux或BSD下,Crontab可以實現以秒運行程序的。
    格式如下:

    1 minute 1
    1,5 minutes 1 and 5
    * any minute
    */5 any minute that is divisible by 5

    1:2 second 2 of minute 1
    1:2,5:10 second 2 of minute 1 and second 10 of minute 5
    *:3 second 3 of any minute
    *:*/5 any second that is divisible by 5

    只是設置分鐘那里跟平時的不大一樣,其他部分一樣。
    Crontab 筆記
    作者: Fenng | 可以轉載, 轉載時務必以超鏈接形式標明文章原始出處和作者信息及版權聲明
    網址: http://www.dbanotes.net/techmemo/crontab_tips.html

    Linux(開源系統似乎都可以)下還有個 "/" 可以用. 在 Minute 字段上,*/15 表示每 15 分鐘執行一次. 而這個特性在商業 Unix ,比如 AIX 上就沒有.
    LINUX啟動服務詳解
    http://hi.baidu.com/sdzsh/blog/item/6b9c7706e3d1e678020881b9.html

    crond 配置文件:/etc/crontab
    預設端口:無
    說明:用來執行例行性命令的守護程序。
    是否需要啟動:必須啟動。

    cron配置
    http://www.cublog.cn/u/12821/showart_102976.html
    另外,服務的狀態:
    service crond status
     1//隱藏下拉框和flash,以解決下拉框優先度太高的問題,  
     2function _displaySelect(){
     3    var selects = document.getElementsByTagName("select");//整個頁面的所有下拉框
     4    for(var i=0; i<selects.length; i++{
     5        if(selects[i].style.visibility) {
     6            selects[i].style.visibility = "";
     7        }
    else{
     8            selects[i].style.visibility = "hidden";
     9        }

    10    }

    11    var objects = document.getElementsByTagName("object");//整個頁面的所有object(flash)
    12    for(var i=0; i<objects.length; i++{
    13        if(objects[i].style.visibility) {
    14            objects[i].style.visibility = "";
    15        }
    else{
    16            objects[i].style.visibility = "hidden";
    17        }

    18    }

    19}
    re: Oracle IMP/EXP bat rox 2006-12-22 10:44  
    mysqldump:

    set dbname=gooweb2
    set username=root
    set password=1234
    set back_path=.
    set date_string=%date:~0,4%_%date:~5,2%_%date:~8,2%
    set time_string=%time:~0,2%_%time:~3,2%_%time:~6,2%
    set file_string=%back_path%\gooweb2_%date_string%_%time_string%

    mysqldump --opt -u %username% --password=%password% %dbname% > %file_string%.sql
    其實可以看看《Spring Live》,有中文翻譯版,
    不同的框架官網都有完整代碼下載。
    講解還是比較詳細的。
    <?xml version="1.0" encoding="gb2312"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=gb2312" />
    <meta http-equiv="Content-Language" content="zh-CN" />
    <title>垂直居中</title>
    <style type="text/css">
    body, html { height:100%; }
    #outer { height:100%; overflow:visible; position:relative; }
    #outer[id] { display:table; position:static; }
    #middle { position:absolute; top:50%; }
    #middle[id] { display:table-cell; vertical-align:middle; position:static; }
    #inner { position:relative; top:-50%; }
    #inner[id] { position:static; }
    </style>
    </head>
    <body>
    <div id="outer">
    <div id="middle">
    <div id="inner">
    <p>111111這個在IE中可以實現居中,在Firefox中也可以實現居中1111111</p>
    </div>
    </div>
    </div>
    </body>
    </html>
    令人振奮。謝謝樓主了。呵呵。
    re: HtmlParser初步研究 rox 2006-07-03 13:12  
    暈倒,我正好用過了,你才寫。
    不過,還是感謝你為大家的勞動。
    呵呵。
    一個很牛的JavaScript網站!
    http://www.activewidgets.com/


    Google 中搜索 "iframe auto height"

    1、Auto Fit IFrame to Content
    http://www.devpapers.com/article/200

    2、iFrame Auto Resize
    About a month ago I was faced with the same need (to conditionally resize an iframe) and discovered that it just wouldn't work reliably due to browser quirks.
    However, I solved the problem by creating a div in the parent page that got replaced with the innerHTML from the body of the document in the iframe. Worked like a charm.
    You can use an onload event in the iframe element in the parent page or an onload event in the body of the document in the iframed page to trigger the exchange.

    Post a stripped down version of the page if you can. One that shows exactly how the iframe fits into the structure of the page.

    The solution I settled on works like this:
    The parent page has a javascript function like this:

    function insertIt() {
    var _y = document.getElementById('framediv');
    var _x = window.frames[0].document.body.innerHTML;
    _y.innerHTML = _x
    }
    Then, the parent page has a div with the id "framediv" which is placed where the contents of the iframe should appear on the page.
    The iframe element is then placed inside the div, like this:

    <div id="framediv">
    <iframe onload="insertIt();" src="/somewhere/content.htm" frameborder="no" width="555px" scrolling="no">
    </div>

    As you can see, there's onload="insertIt()" inside the iframe element. So when the iframe loads, the parent page immediately takes the contents of the body of the document contained in the iframe and actually replaces the iframe element with that content.

    It's a little tricky to comprehend, but it works great.

    You said you're a newbie, does this make any sense to you?

    also, is the iframe document located on the same server and the same domain as the parent page?
    That will play a part.
    他的Blog已經不能訪問了,這些內容都是用Google的網頁快照找來的。

    前一段時間用c3p0作hibernate3的連接池,發現連接數總是很多,并不能釋放,用幾天就會占用100多個數據庫連接,嘗試修改了幾次配置文件問題依舊,無奈換成了proxool,問題居然解決了。

    c3p0配置
    <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
    <property name="hibernate.c3p0.max_size">20</property>
    <property name="hibernate.c3p0.min_size">5</property>
    <property name="hibernate.c3p0.timeout">120</property>
    <property name="hibernate.c3p0.max_statements">100</property>
    <property name="hibernate.c3p0.idle_test_period">120</property>
    <property name="hibernate.c3p0.acquire_increment">2</property>

    proxool配置
    <property name="hibernate.connection.provider_class">org.hibernate.connection.ProxoolConnectionProvider</property>
    <property name="hibernate.proxool.pool_alias">xjgame</property>
    <property name="hibernate.proxool.xml">proxool.xml</property>


    <?xml version="1.0" encoding="ISO-8859-1"?>
    <something-else-entirely>
    <proxool>
    <alias>xjgame</alias>
    <driver-url>jdbc:oracle:thin:@123.123.123.12:1521:game</driver-url>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <driver-properties>
    <property name="user" value="a"/>
    <property name="password" value="a"/>
    </driver-properties>
    <maximum-connection-count>20</maximum-connection-count>
    <house-keeping-test-sql>select CURRENT_DATE from dual</house-keeping-test-sql>
    </proxool>
    </something-else-entirely>
    比較支持你的想法,因為有用過DB4O,很類似。
    很多用過DB4O的,也會問如何才能實現SQL查詢里面的一些特性。
    因為大家已經習慣了關系型數據庫,如何突破,我也很困惑。呵呵。
    在嘗試了修改hibernate c3p0設置,更改為使用Tomcat自己的連接池后仍然沒有改善。
    決定從根源入手,設置mysql的wait_timeout為31536000(一年),再來試試。

    [mysqld]
    set-variable=wait_timeout=31536000
    set-variable=interactive_timeout=31536000

    仍然沒有改善,看來是代碼有問題。
    re: 為微軟的瘋狂而激動 rox 2006-02-28 22:58  
    轉載一個,也比較瘋狂的。

    Google 式生存
    http://www.vingel.com/blog/11
    今天突然感覺到DB4O可以用來作為源代碼保護的一種好方法。
    因為連class文件都沒有,只有對象在內存中被序列化后的二進制流。
    要還原還是有一定的復雜度的。
    @sun
    好兄弟,謝謝捧場,呵呵!
    re: Java高精度打印 rox 2006-02-08 20:47  
    呵呵,非常感謝共享。
    兩年前也因為項目的原因,琢磨過Java的打印,一頭霧水呀,最可氣的就是那個72DPI。
    后來,問題也解決了。
    另外,感覺 Tiffy 也挺牛的,可惜源代碼被混淆編碼了。
    終于找到了,非常感謝鐵手的辛勤勞動。呵呵!
    共2頁: 上一頁 1 2 
    主站蜘蛛池模板: 亚洲黄色片在线观看| 精品免费tv久久久久久久| 曰曰鲁夜夜免费播放视频 | 91福利免费视频| 亚洲av女电影网| 亚洲一区二区三区免费在线观看| 亚洲国产综合91精品麻豆| 嫩草影院在线播放www免费观看| 国产亚洲av片在线观看播放 | 国产亚洲精aa在线看| 最近最新中文字幕完整版免费高清| 亚洲一区动漫卡通在线播放| 成年女性特黄午夜视频免费看| 亚洲中文无码永久免费| 国产美女精品久久久久久久免费| 男男gay做爽爽的视频免费| 亚洲 自拍 另类小说综合图区| 91av免费在线视频| 久久精品国产亚洲夜色AV网站| 曰批全过程免费视频播放网站| 亚洲中文字幕AV每天更新| 亚洲av成人一区二区三区在线观看| 久久99久久成人免费播放| 婷婷精品国产亚洲AV麻豆不片 | 亚洲国产欧美日韩精品一区二区三区 | 在线a级毛片免费视频| 老子影院午夜伦不卡亚洲| 区三区激情福利综合中文字幕在线一区亚洲视频1 | 中文字幕亚洲专区| 8090在线观看免费观看| 亚洲国产精品无码久久| 亚洲真人无码永久在线| 免费看黄视频网站| 亚洲第一视频在线观看免费| 亚洲美女大bbbbbbbbb| 免费看国产一级特黄aa大片| 久久精品免费一区二区三区| 亚洲欧美国产国产一区二区三区| 国产精品亚洲产品一区二区三区| 亚洲精品国产免费| 一区二区三区免费在线视频 |