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

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

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

    Tao

    Tao obeys its own inherent Nature

    2007年12月5日

    搬到了: http://theantway.com
    posted @ 2011-11-08 13:43 wade 閱讀(208) | 評論 (0)編輯 收藏
    Ubuntu 11.04
    libxml2-2.7.8

    網上找了一些辦法都不能用,最后直接打開configure 文件,找到$RM "$cfgfile", 替換為 $RM -f "$cfgfile", 說白了就是出錯了也不要停,繼續執行。再運行configure, 成功
    posted @ 2011-06-02 10:15 wade 閱讀(1322) | 評論 (0)編輯 收藏

    When I try to use URLConnection to check if a url is accessible using the following code:

    try {
        URL url = new URL("http://169.254.169.254/latest");
    
        URLConnection connection = url.openConnection();
        connection.setConnectTimeout(5000);
        connection.connect();
        System.out.println("Connected successfully using url");
    } catch (IOException e) {
            e.printStackTrace();
    }
    

    I expected the behavior is: connect should be success if the host is reachable, else throw exception. It works fine without the anti-virus application, but always print “connected successfully” even the host is not reachable.

    Then I tried to use Socket to connect:

    Socket socket = new Socket();
    socket.connect(new InetSocketAddress("169.254.169.254", 80));
    if (socket.isConnected()) {
        System.out.println("Connected successfully using socket");
    } else {
        System.out.println("Connected failed using socket");
    }
    
    

    But Still got the same problem.

    The solution for it:

    Disable http check in anti-virus, for example, in ESET NOD32, the settings is Web access protection -> Http, Https -> Http scanner

    ESET_http_connection_always_success

    posted @ 2009-07-15 13:30 wade 閱讀(464) | 評論 (0)編輯 收藏

    Preview support edit images, but the menu item is disabled by default when I open an image file. I thought it was because the Preview does not support this kind of file type. Recently, when I try to find a simple image editor only for add some text, oval or rectangle, I found that the Preview support it perfectly.

    After customized the toolbar, the buttons enabled, and it’s very easy to add comments, but the menu item still disabled.

    The following is what I found about how to customize the toolbar from the Preview Help.

     

    Adding text to an image

    You can add text to an image to describe what’s in it or when the image was created.

    After you save the image, you can’t edit, move, or delete any text you added to it. If you think you’ll need to edit the text, convert the image to a PDF document, and then add notes to the PDF document. Notes added to a PDF document can be edited after they’re saved.

    To add text to an image:

    1. If the Annotate pop-up menu isn’t in the toolbar, choose View > Customize Toolbar and drag the Annotate pop-up menu to the toolbar.
    2. Choose Note from the Annotate pop-up menu in the toolbar.
    3. Drag over the area where you want the text to appear.
    4. Enter your text.

    Before you save the image, you can move, resize, edit, or delete the text. First choose Text Annotation from the Annotation pop-up menu in the toolbar. Then to edit the text, double-click it. To delete the text, click it so resize handles appear, and then press Delete.

    posted @ 2009-07-14 10:49 wade 閱讀(557) | 評論 (0)編輯 收藏
         摘要: 快速生成程序代碼, 比如Struts, Spring, Jdbc/Hibernate所有前后臺的代碼.
    支持Mysql, 以及支持Ado連接的數據庫.
    支持批量生成部分/全部模板, 保存選中的模板到Working Set
    使用Javascript作為模板腳本語言  閱讀全文
    posted @ 2008-03-05 13:28 wade 閱讀(4579) | 評論 (18)編輯 收藏
         摘要: Generate code, e.g. all files for Struts, Spring, Jdbc/Hibernate.
    Support Mysql, and database which support Ado connection
    Support generate file/project files and batch generate, and you can save you selection to a named working set in batch generate mode.
    Using Javascript as the template engine  閱讀全文
    posted @ 2008-03-04 22:48 wade 閱讀(896) | 評論 (0)編輯 收藏
    diff -r -q -X exclude.list . testing
    posted @ 2008-02-29 16:52 wade 閱讀(853) | 評論 (0)編輯 收藏
         摘要: 集成Acegi到自己的項目中, 并且將用戶信息和權限放到數據庫, 提供方法允許權限動態變化,變化后自動加載最新的權限
    增加Junit 測試, 這樣可以在改變權限后, 方便地檢查是否設置正確.
    Acegi 提供的Tag不能判斷當前用戶對某一個URL有沒有權限, 由于很多時候需要根據當前用戶的權限來控制某些功能是否顯示, 所以增加相應的Tag
    如果當前用戶沒有指定url的權限,顯示本部分內容
    如果當前用戶有指定url的權限,顯示本部分內容

      閱讀全文
    posted @ 2008-01-30 17:28 wade 閱讀(4292) | 評論 (7)編輯 收藏

    1. simple join two tables

    purpose:
    generate sql like:   

    select * from photo p
        left join artist a on p.artist_id = a.artist_id
          where a.genre = 'something' and p.genre = 'something'
    

    code:           

    if(!CriteriaUtil::hasJoin($criteria, ArtistPeer::TABLE_NAME)){
        $criteria->addJoin(PhotoPeer::ARTIST_ID, ArtistPeer::ARTIST_ID, Criteria::LEFT_JOIN);
    }
    $criteria->add(ArtistPeer::GENRE, $genre);    
    $criteria->add(PhotoPeer::GENRE, $genre);

    2. join two tables, add AND OR between conditions
    purpose:
    generate sql like:    

    select * from photo p
        left join artist a on p.artist_id = a.artist_id
          where (a.genre = 'some' or p.genre='something')
            and a.name = 'something'

    code:   

    if(!CriteriaUtil::hasJoin($criteria, ArtistPeer::TABLE_NAME)){
       $criteria->addJoin(PhotoPeer::ARTIST_ID, ArtistPeer::ARTIST_ID, Criteria::LEFT_JOIN);
    }
    $criteria->add(ArtistPeer::GENRE, $genre);
    $c = $criteria->getCriterion(ArtistPeer::GENRE);
    if($c != null){
       $c->addOr($criteria->getNewCriterion(PhotoPeer::GENRE, $genre));
    }
    $criteria->add(ArtistPeer::NAME, $name);

     

    Note:
    It's a good habit to check if we have joined the table already. to check this, you can use the following util class, it get all the joined tables, and check if the table exists in them.

    class CriteriaUtil{
        public static function hasJoin($c, $table_name){
            $joins = $c->getJoins();
            if($joins != null){
                foreach($joins as $join){
                    if($join->getRightTableName() == $table_name){
                        return true;
                    }
                    if($join->getLeftTableName() == $table_name){
                        return true;
                    }
                }
            }
            return false;
        }
    }
    
    posted @ 2007-12-05 17:26 wade 閱讀(533) | 評論 (0)編輯 收藏

    It maybe popup an error message to say that "QI for IEnumVARIANT failed on the unmanaged server" when open the Windows Live Writer.

    After search on google, I found the resolution is import some settings into registry.

    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046}]
    @="IEnumVARIANT"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046}\NumMethods]
    @="7"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046}\ProxyStubClsid]
    @="{00020421-0000-0000-C000-000000000046}"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046}\ProxyStubClsid32]
    @="{00020421-0000-0000-C000-000000000046}"

     

    You can also download the file here, unzip and import it to your registry.

    posted @ 2007-12-05 17:08 wade 閱讀(878) | 評論 (0)編輯 收藏

    導航

    <2007年12月>
    2526272829301
    2345678
    9101112131415
    16171819202122
    23242526272829
    303112345

    統計

    常用鏈接

    留言簿(7)

    隨筆分類

    隨筆檔案

    相冊

    Photo

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 色噜噜亚洲男人的天堂| 久久午夜免费视频| 亚洲校园春色小说| 亚洲精品成人在线| 美女视频黄的全免费视频| 国产精品免费在线播放| 亚洲色欲啪啪久久WWW综合网| 亚洲国产精品无码久久久蜜芽 | 成人男女网18免费视频| 性色av极品无码专区亚洲| 亚洲系列中文字幕| 亚洲网红精品大秀在线观看| 天堂亚洲免费视频| 四虎影视精品永久免费网站| 国产a视频精品免费观看| 久久狠狠躁免费观看| 无码精品国产一区二区三区免费 | 一二三四在线播放免费观看中文版视频 | 免费成人高清在线视频| 叮咚影视在线观看免费完整版| 国产在线观看xxxx免费| 免费国产成人午夜在线观看| 99精品一区二区免费视频| 69免费视频大片| 四虎永久免费影院| 亚洲AV无码久久精品蜜桃| 亚洲成色999久久网站| 亚洲中文字幕日本无线码| 国产精品观看在线亚洲人成网| 羞羞网站免费观看| 午夜免费啪视频在线观看| 最新中文字幕电影免费观看| 免费人成无码大片在线观看| 亚洲福利视频导航| 黄色大片免费网站| 久草在视频免费福利| 中文国产成人精品久久亚洲精品AⅤ无码精品| 亚洲熟女少妇一区二区| 色欲aⅴ亚洲情无码AV蜜桃| 无码国产精品一区二区免费3p| 免费国产综合视频在线看|