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

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

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

    posts - 48, comments - 13, trackbacks - 0, articles - 0
      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

    2010年12月2日

    spket - http://www.spket.com/update

    subclipse - http://subclipse.tigris.org/update

    posted @ 2010-12-02 09:39 董銳 閱讀(295) | 評論 (0)編輯 收藏

    2010年11月3日

    Tomcat啟動時classloader加載順序
      Tomcat的class加載的優先順序一覽  
      1.最先是$JAVA_HOME/jre/lib/ext/下的jar文件。  
      2.環境變量CLASSPATH中的jar和class文件。  
      3.$CATALINA_HOME/common/classes下的class文件。  
      4.$CATALINA_HOME/commons/endorsed下的jar文件。  
      5.$CATALINA_HOME/commons/i18n下的jar文件。  
      6.$CATALINA_HOME/common/lib   下的jar文件。  
      (JDBC驅動之類的jar文件可以放在這里,這樣就可以避免在server.xml配置好數據源卻出現找不到JDBC   Driver的情況。)  
      7.$CATALINA_HOME/server/classes下的class文件。  
      8.$CATALINA_HOME/server/lib/下的jar文件。  
      9.$CATALINA_BASE/shared/classes   下的class文件。  
      10.$CATALINA_BASE/shared/lib下的jar文件。  
      11.各自具體的webapp   /WEB-INF/classes下的class文件。  
      12.各自具體的webapp   /WEB-INF/lib下的jar文件。

    posted @ 2010-11-03 11:31 董銳 閱讀(1013) | 評論 (0)編輯 收藏

    2010年8月23日

    What this means is that leadership involves setting direction, communicating that vision passionately to those they work with, and helping the people they lead understand and commit to that vision. Managers, on the other hand, are responsible for ensuring that the vision is implemented efficiently and successfully.

    posted @ 2010-08-23 16:29 董銳 閱讀(449) | 評論 (0)編輯 收藏

    2010年7月14日

    I know how to send by jquery post method $.post("test.php", { name: "John", time: "2pm" } );

    but what if my form field name is array

    <input type=text name="n1[]" id="n1[]" value='12345">   <input type=text name="n1[]" id="n1[]" value="14454">  

    how to send these 2 field value send to url by jquery post method?

     

    You can pass in an array as a value in the object:

    {name: 'John', 'nl[]': ['12345', '14454']}  

    (This is documented at ajax but also works for post.)

     

    var fields = $(":input").serializeArray();      $.post("test.php",fields);

    from:http://stackoverflow.com/questions/1656267/how-to-send-multi-field-value-by-jquery-post

    posted @ 2010-07-14 11:46 董銳 閱讀(739) | 評論 (0)編輯 收藏

    string.replace(new RegExp(oldString,"gm"),newString))

    posted @ 2010-07-14 11:20 董銳 閱讀(208) | 評論 (0)編輯 收藏

    2010年1月14日

    在網上看到解決方案是把注冊表里(因為是windows操作系統)\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE 下的NLS_lang 的NA值修改為SIMPLIFIED CHINESE_CHINA.ZHS16GBK;
     但是我在操作的時候,只把Oracle目錄下所有能找到的NLS_Lang值修改了,偏偏沒有修改Oracle目錄所對應的NLS_Lang值,導致一直測試不通過,始終報錯,最后終于發現原來Oracle目錄本身對應的NLS_lang值沒有修改,修改過后,測試通過,成功!

    posted @ 2010-01-14 14:45 董銳 閱讀(13496) | 評論 (2)編輯 收藏

    2009年12月2日

    If you got this message: "Warning: Cannot modify header information - headers already sent by ...."
    如果在執行php程序時看到這條警告:"Warning: Cannot modify header information - headers already sent by ...."

    Few notes based on the following user posts:
    有以下幾種解決方法:

    1. Blank lines (空白行):
    Make sure no blank line after <?php ... ?> of the calling php script.
    檢查有<?php ... ?> 后面沒有空白行,特別是include或者require的文件。不少問題是這些空白行導致的。

     

     

    2. Use exit statement (用exit來解決):
    Use exit after header statement seems to help some people
    在header后加上exit();
    header ("Location: xxx");
    exit();

     

    3. PHP has this annoying problem, if your HTML goes before any PHP code or any header modification before redirecting to certain page, it'll said "Warning: Cannot modify header information - headers already sent by ...." Basically anytime you output to browser, the header is set and cannot be modified.   So two ways to get around the problem:

    3a. Use Javascript (用Javascript來解決):
    <? echo "<script> self.location(\"file.php\");</script>"; ?>
    Since it's a script, it won't modify the header until execution of Javascript.
    可以用Javascript來代替header。但是上面的這段代碼我沒有執行成功... 另外需要注意,采用這種方法需要瀏覽器支持Javascript.

    3b. Use output buffering (用輸出緩存來解決):
    <?php ob_start(); ?>
    ... HTML codes ...
    <?php
    ... PHP codes ...
    header ("Location: ....");
    ob_end_flush();
    ?>
    This will save the output buffer on server and not output to browser yet, which means you can modify the header all you want until the ob_end_flush() statement.   This method is cleaner than the Javascript since Javascript method assumes the browser has Javascript turn on.   However, there are overhead to store output buffer on server before output, but with modern hardware I would imagine it won't be that big of deal.   Javascript solution would be better if you know for sure your user has Javascript turn on on their browser.

    就像上面的代碼那樣,這種方法在生成頁面的時候緩存,這樣就允許在輸出head之后再輸出header了。


    ————————————————————————————————————————————
    結果最后還是這個問題:
    原來是php.ini里面的配置出了問題,output_buffering參數默認為off的,現在將它設為”on”就OK了。

    posted @ 2009-12-02 10:02 董銳 閱讀(7399) | 評論 (1)編輯 收藏

    2009年10月20日

    1、要安裝java jdk,安裝tomcat
    2、安裝好apache,php
    3、下載php-java-bridge_5.5.4_documentation.zip
    4、解壓縮php-java-bridge_5.5.4_documentation.zip
    5、將解壓縮后根目錄下JavaBridge.war拷貝到tomcat服務器的webapp目錄下
    6、啟動tomcat服務器
    7、在php中使用java只需增加下面一行語句:
    <php? require_once(http://127.0.0.1:8080/JavaBridge/java/Java.inc); ?>

    可以了:
    <php?
        $date=new Java('java.util.Date');
    echo $date->getDate();
    ?>
    運行通過,OK!

    posted @ 2009-10-20 15:03 董銳 閱讀(585) | 評論 (2)編輯 收藏

    2009年9月24日

    80端口被占用的解決方法:

    cmd命令窗口
    輸入netstat -abn ->c:/port80.txt
    然后到c盤port80.txt文件中找到占用80端口的程序pid,記下pid。打開任務管理器,點擊“查看”/選擇列,勾選“PID(進程標識符)”,然后單擊“進程”標簽,找到80端口對應的pid,就可以看到是那個程序占用的了,更改這個程序的port,再重啟這個程序,使更改生效。

    不管是Apache還是IIS都無法使用已被占用的端口。即每個端口只允許使用一次(一般指被一個服務程序所使用)。
    如果系統內已安裝IIS并使用了80端口(Http默認端口),再安裝Apache,只要另選一個端口并不與其他應用沖突即可運行。例如可以將Apache監聽的端口改為81或其他任何一個未被使用的端口。
    Apache修改監聽端口的方法為:
    打開 httpd.conf
    修改 Listen 80 為 Listen 81
    Apache可以同時監聽一個以上的端口實現多個Http服務
    只要添一行 如 Listen 82 即可

    posted @ 2009-09-24 14:18 董銳 閱讀(1220) | 評論 (0)編輯 收藏

    2009年9月23日

    "^\d+$"  //非負整數(正整數 + 0)
    "^[0-9]*[1-9][0-9]*$"  //正整數
    "^((-\d+)|(0+))$"  //非正整數(負整數 + 0)
    "^-[0-9]*[1-9][0-9]*$"  //負整數
    "^-?\d+$"    //整數
    "^\d+(\.\d+)?$"  //非負浮點數(正浮點數 + 0)
    "^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$"  //正浮點數
    "^((-\d+(\.\d+)?)|(0+(\.0+)?))$"  //非正浮點數(負浮點數 + 0)
    "^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$"  //負浮點數
    "^(-?\d+)(\.\d+)?$"  //浮點數
    "^[A-Za-z]+$"  //由26個英文字母組成的字符串
    "^[A-Z]+$"  //由26個英文字母的大寫組成的字符串
    "^[a-z]+$"  //由26個英文字母的小寫組成的字符串
    "^[A-Za-z0-9]+$"  //由數字和26個英文字母組成的字符串
    "^\w+$"  //由數字、26個英文字母或者下劃線組成的字符串 //開源代碼OSPhP.COm.CN
    "^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$"    //email地址
    "^[a-zA-z]+://(\w+(-\w+)*)(\.(\w+(-\w+)*))*(\?\S*)?$"  //url
    /^(d{2}|d{4})-((0([1-9]{1}))|(1[1|2]))-(([0-2]([1-9]{1}))|(3[0|1]))$/   //  年-月-日
    /^((0([1-9]{1}))|(1[1|2]))/(([0-2]([1-9]{1}))|(3[0|1]))/(d{2}|d{4})$/   // 月/日/年
    "^([w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$"   //Emil
    /^((\+?[0-9]{2,4}\-[0-9]{3,4}\-)|([0-9]{3,4}\-))?([0-9]{7,8})(\-[0-9]+)?$/     //電話號碼
    "^(d{1,2}|1dd|2[0-4]d|25[0-5]).(d{1,2}|1dd|2[0-4]d|25[0-5]).(d{1,2}|1dd|2[0-4]d|25[0-5]).(d{1,2}|1dd|2[0-4]d|25[0-5])$"   //IP地址
    //開源OSPhP.COM.CN

    posted @ 2009-09-23 17:58 董銳 閱讀(215) | 評論 (0)編輯 收藏

    主站蜘蛛池模板: 国产成人亚洲精品91专区手机| 亚洲视频2020| 无码人妻一区二区三区免费看 | 免费成人福利视频| 亚洲另类无码一区二区三区| 亚洲JIZZJIZZ中国少妇中文| 久久免费观看国产99精品| 亚洲日韩国产精品乱-久| 久久久久久亚洲精品不卡| 精品国产免费人成电影在线观看| 在线观看亚洲精品专区| 亚洲成人在线电影| 国产成人青青热久免费精品| 久久一区二区三区免费播放| 亚洲男同gay片| 亚洲AV无码欧洲AV无码网站| 精品久久久久久久免费人妻| 在线日本高清免费不卡| 羞羞视频免费网站入口| 亚洲国产日产无码精品| 亚洲中文字幕无码中文字在线| 久久这里只有精品国产免费10| 永久免费av无码网站yy| 成人婷婷网色偷偷亚洲男人的天堂 | 亚洲精品自在线拍| 亚洲国产精品丝袜在线观看| 国产情侣激情在线视频免费看| A国产一区二区免费入口| 亚洲精品人成网线在线播放va| 久久久亚洲欧洲日产国码aⅴ| 亚洲精品A在线观看| 免费看片A级毛片免费看| 2021精品国产品免费观看| 国产免费内射又粗又爽密桃视频| 亚洲欧美成aⅴ人在线观看| 亚洲国产精品日韩在线观看| 亚洲日产韩国一二三四区| 亚洲高清免费视频| 美女被免费视频网站a国产| 2021在线观看视频精品免费| 久久国产乱子精品免费女|