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

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

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

    cerulean

    2009年9月10日

    從上班開始沒多久,就開始用Evernote,是portable 2.2版本。
    好記性不如爛筆頭。真的是做到了隨手記,尤其是搜索功能簡單易用,用來挖很久以前記下的tips,界面也很簡潔,明了、夠用。
    備份也方便,反正換了電腦,文件夾直接拷貝,數(shù)據(jù)沒丟。

    就這樣,一用多少年過去了。
    如今,“印象筆記”在iphone應(yīng)用推薦榜的筆記類里一直居高位,圖標(biāo)也早就不是我v2.2的老土模樣,如果不是英文名字就叫evernote,我完全對不上號。
    人家其實從v3開始就不是老土的本地應(yīng)用了,都講究“云”了。

    雖然手頭的v2.2完全滿足我隨手記一記的需求,但是,本著與時俱進(jìn)和稍微保證一下數(shù)據(jù)的安全性,我還是下了個最近的v4.x的版本,結(jié)果發(fā)現(xiàn)還是要從v3開始才能導(dǎo)入v2的數(shù)據(jù)。嗯,看來是落后太久了。
    有一點夸獎一下:免費賬戶的每月上傳容量是有限的,但是對于我這種文本筆記,夠傳3w條的。

    ——嗯,其實,本來只是個小軟件的更新而已,竟然跑到blogjava寫上一篇,可能是因為伴隨感吧,再有點兒時過境遷的唏噓。
    posted @ 2012-11-22 11:35 cerulean 閱讀(448) | 評論 (1)編輯 收藏
    春節(jié)過后這幾天干的活兒就沒一件痛痛快快的?
    第一天是發(fā)現(xiàn)編譯環(huán)境有異動,我以為是代碼有問題,折騰了1天多。。。
    第二天是自己機(jī)器上的IE8抽瘋弄得我以為是build有問題。。。
    第三天從TimesTen轉(zhuǎn)到Psql的各種毛病。。。

    好吧。言歸正傳:
    1)找一個跟表無關(guān)的通用的單純的select語句作為測試語句不容易啊,
    Dual是Oracle自帶的表,其他DBS木有的。。不用Dual的話Oracle又不認(rèn)。

    2)Cause: org.postgresql.util.PSQLException: Method org.postgresql.jdbc2.Jdbc2PreparedStatement.setQueryTimeout(int) is not yet implemented.
    這個錯誤,把sqlMapConfig.xml中在settings里配置的defaultStatementTimeout去掉就可以避免了。但是,這個配置對PSQL應(yīng)該OK啊。。。待查

    【續(xù)】——
    defaultStatementTimeout 確實不是所有的driver都支持的。
    但去掉的話,TimesTen又不干了:太囧了。。。
    [TimesTen][TimesTen 7.0.5.9.0 CLIENT]Query Timeout must be numeric; if the Network Timeout
    is non-zero, the Query Timeout must be greater than zero and less than the Network Timeout, else if the Network Timeout is zero, the Query Timeout must be greater than or equal to zero.
    兜兜轉(zhuǎn)轉(zhuǎn)又遇到了這個之前遇到過的問題。這些driver就不能統(tǒng)一統(tǒng)一咩!

    posted @ 2012-02-01 17:32 cerulean 閱讀(1200) | 評論 (0)編輯 收藏
    parseInt(String s, int radix) 
    Parses the string argument as a signed integer in the radix specified by the second argument.

    今兒頭回用,真是……反省ing

    posted @ 2012-01-18 17:28 cerulean 閱讀(360) | 評論 (0)編輯 收藏
    文檔寫到現(xiàn)在,猛然說不上abbreviation 和 acronym 的區(qū)別。。。真是慚愧。。。
    abbreviation:單詞、語句的縮略形式,縮到短一點兒。
    acronym:“首字母”縮寫
    posted @ 2011-12-05 15:21 cerulean 閱讀(501) | 評論 (0)編輯 收藏
    之前都沒注意過有這么個方法,否則判斷日期格式就太不靠譜了。
    又是晦澀的單詞:setLenient(false),嚴(yán)格匹配日期格式
            SimpleDateFormat df = new SimpleDateFormat("MMddyyyy");
            
    /*
             * With lenient parsing, the parser may use heuristics to interpret inputs that 
             * do not precisely match this object's format. 
             * With strict parsing, inputs must match this object's format. 
             
    */
            df.setLenient(
    false);
            
    try {
                Date a 
    = df.parse("23232011");
                System.out.print(
    "date: " + a);
            } 
    catch (java.text.ParseException e) {
                
    // TODO Auto-generated catch block
                e.printStackTrace();
            }

    posted @ 2011-07-18 17:23 cerulean 閱讀(3206) | 評論 (0)編輯 收藏
    i18n,之前在J2EE里,自然用struts來做。但是Web Service里貌似應(yīng)該不需要這部分,但是實際上,有些操作還是避免不了要支持多國語言。
    查了一圈兒,好像WS-i18n還在working draft的階段,而且好像已經(jīng)好幾年了……也沒找到什么開源中間件的實現(xiàn)。
    大意是在SOAP header中加上<i18n:international>相關(guān)的標(biāo)簽。
    因為畢竟是Web Service,利用http header還是不太妥,還是要放在SOAP里面。

    記錄一下查到的鏈接,備用。

    http://www.coderanch.com/t/224875/Web-Services/java/Web-Services-Internationalization-jax-ws
    For a SOAP web service the language/country code should be part of the SOAP request and possibly the SOAP response. You can always base your solution on the above WS-I18N working draft.
    Internationalization isn't as big a priority with SOAP web services as it is with web pages as web services are consumed by other applications - not humans. In most cases normalized "generic data" is exchanged which is displayed on the client using the client's locale. SOAP web services exchanging localized text are pretty much in the minority.

    http://www.w3.org/TR/ws-i18n/


    posted @ 2011-06-15 16:49 cerulean 閱讀(282) | 評論 (0)編輯 收藏
    這回是更加深深地體會到IDE的重要性了!
    想當(dāng)初要不是eclipse,估計上手過程會很痛苦;
    后來myeclipse的官方網(wǎng)站竟然封掉了;
    現(xiàn)在,眼巴巴瞅著NetBeans美麗的GUI Builder,假如當(dāng)年Swing那部分是用NetBeans開發(fā)的,或者NetBeans可以不要那個.form的文件直接解析代碼,就好了啊!!!
    唉……
    posted @ 2010-08-11 16:32 cerulean 閱讀(325) | 評論 (0)編輯 收藏
    繁瑣的登陸過程讓人抓狂,telnet到第一臺機(jī)器輸入用戶名之前,點擊SecureCRT里menu->Script->Start recording script,錄下接下來的步驟,然后點擊Stop recording script,就會提示保存腳本。以后登陸時,選擇Run腳本就可以了。
    posted @ 2010-07-07 08:54 cerulean 閱讀(296) | 評論 (0)編輯 收藏
    遍歷集合,批量刪除時,遇到ConcurrentModificationException
    因為操作的集合會在過程中遇到結(jié)構(gòu)性的改變,例如:
    HashMap<String, String> testMap = new HashMap<String, String>();
            testMap.put(
    "1""a");
            testMap.put(
    "2""b");
            testMap.put(
    "3""c");
            Set
    <Map.Entry<String,String>> enterySet = testMap.entrySet();
            

            
    for(Iterator<Map.Entry<String, String>> i = enterySet.iterator(); i.hasNext();){
                Map.Entry
    <String, String> entry = i.next();
                
    if(entry.getValue().equalsIgnoreCase("a")){
                    testMap.remove(entry.getKey());
                }

            }


    解決方法:不要在集合上刪除,而是在迭代器上刪除:i.remove();

    p.s.還有另外一個可能性是多線程同時操作該集合了,那需要進(jìn)行同步來避免。
    posted @ 2010-06-11 13:57 cerulean 閱讀(375) | 評論 (0)編輯 收藏
    引子只是個小問題,JTextArea多行文本,想設(shè)置文字的對齊方式為居中對齊,卻發(fā)現(xiàn)死活沒有合適有效的方法,又試了JTextField和JLabel,都不理想。搜了一溜夠看到JTextPane的解決方法,其實真是有點兒大材小用了。JTextPane里可以設(shè)置style,對齊方式、字體字號、顏色等等,并且還可以設(shè)置style的作用范圍,挺方便的。另外,想把文字區(qū)域背景設(shè)為透明的也是在API中找了一通,才發(fā)現(xiàn)敢情就是setOpacity,呃,對這個單詞實在是太不敏感了。。。。

    把在coderanch上搜的例子貼在這里吧,以防以后忘了:
    import java.awt.*;  
    import javax.swing.*;  
    import javax.swing.text.*;  
       
    public class Styling  
    {  
        
    public Styling()  
        
    {  
            String text 
    = "To refer to locations within the sequence, the " +  
                          
    "coordinates used are the location between two " +  
                          
    "characters.\nAs the diagram below shows, a location " +  
                          
    "in a text document can be referred to as a position, " +  
                          
    "or an offset. This position is zero-based.";  
       
            SimpleAttributeSet aSet 
    = new SimpleAttributeSet();   
            StyleConstants.setForeground(aSet, Color.blue);  
            StyleConstants.setBackground(aSet, Color.orange);  
            StyleConstants.setFontFamily(aSet, 
    "lucida bright italic");  
            StyleConstants.setFontSize(aSet, 
    18);  
       
            SimpleAttributeSet bSet 
    = new SimpleAttributeSet();  
            StyleConstants.setAlignment(bSet, StyleConstants.ALIGN_CENTER);  
            StyleConstants.setUnderline(bSet, 
    true);  
            StyleConstants.setFontFamily(bSet, 
    "lucida typewriter bold");  
            StyleConstants.setFontSize(bSet, 
    24);  
       
            JTextPane textPane 
    = new JTextPane();  
            textPane.setText(text);  
            StyledDocument doc 
    = textPane.getStyledDocument();  
            doc.setCharacterAttributes(
    105, doc.getLength()-105, aSet, false);  
            doc.setParagraphAttributes(
    0104, bSet, false);  
       
            JFrame f 
    = new JFrame();  
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  
            f.add(
    new JScrollPane(textPane));  
            f.setSize(
    400,400);  
            f.setLocation(
    200,200);  
            f.setVisible(
    true);  
        }
      
       
        
    public static void main(String[] args)  
        
    {  
            
    new Styling();  
        }
      
    }
      
    posted @ 2010-03-10 17:20 cerulean 閱讀(7895) | 評論 (1)編輯 收藏
    之前用axis2生成代碼的時候都沒有在意過,一路用default configuration下來。
    前一陣子發(fā)現(xiàn)以前的代碼在生成時選擇的data binding不是用默認(rèn)的adb方式,而是用xmlbeans。
    google了一番不同數(shù)據(jù)綁定的區(qū)別,好像也沒什么結(jié)果,大意就是adb的最簡單,但是有局限性;xmlbeans支持的比較全面,但是用起來有點兒復(fù)雜。不過,我也沒有體會出來xmlbeans強大在哪里……只是知道生成的代碼更多了,調(diào)用起來更繞彎子而已。。。

    server端用xmlbeans生成,client端用adb生成,互通是沒有問題的。
    client端用xmlbeans生成時,需要把產(chǎn)生于resources里面的所有.class文件打成jar包加到client端的build path里,否則運行client加載類的時候就會報錯了,好詭異,太不友好了。
    類似這種錯誤:

    ClassNotFoundException : Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.s68C41DB812F52C975439BA10FE4FEE54.TypeSystemHolder. Make sure the generated binary files are on the classpath.


    所幸是在官方網(wǎng)站上有說明:http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html
    posted @ 2009-12-30 15:59 cerulean 閱讀(692) | 評論 (0)編輯 收藏
    一個JNLP文件中的資源必須由同一個證書簽名
    當(dāng)需要不同證書時,可以創(chuàng)建多個JNLP文件,并在主JNLP文件中引用之。

    遇到過的問題:找不到子JNLP文件中的資源
    解決方法:竟然把子JNLP文件放到比主JNLP文件所在目錄低一級就可以了?!
    posted @ 2009-11-20 15:13 cerulean 閱讀(481) | 評論 (0)編輯 收藏

     

    JLabel.setText("<html>auto new line</html>");
    JLabel.setText("<html>line<br>force new line</html>");

     

    posted @ 2009-10-29 11:43 cerulean 閱讀(3442) | 評論 (1)編輯 收藏
    費了半天勁,敢情Firefox在3.0版本后又支持彈出modal window啦
    window.showModalDialog


    posted @ 2009-09-22 15:59 cerulean 閱讀(343) | 評論 (0)編輯 收藏
    HttpClient.getHttpConnectionManager().getParams().setSoTimeout()
    HttpClient.getHttpConnectionManager().getParams().setConnectionTimeout()

    第一個針對連接建立后,但是沒有收到response的超時時間,測試時可將server simulator收到request后等一段時間后再回response。
    出錯信息:
    java.net.SocketTimeoutException: Read timed out

    第二個針對連接建立的超時時間,測試時可將目的IP地址設(shè)為不存在的IP地址。
    出錯信息:
    org.apache.commons.httpclient.ConnectTimeoutException: The host did not accept the connection within timeout of 8000 ms
            at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:154)
    默認(rèn)值為0,如果不設(shè)置的話大概2分多鐘才會得到異常


    posted @ 2009-09-10 16:09 cerulean 閱讀(5176) | 評論 (1)編輯 收藏

    導(dǎo)航

    <2009年9月>
    303112345
    6789101112
    13141516171819
    20212223242526
    27282930123
    45678910

    統(tǒng)計

    常用鏈接

    留言簿(3)

    隨筆分類

    隨筆檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲视频在线免费| 亚洲成人黄色在线| 最近中文字幕大全中文字幕免费 | AAAAA级少妇高潮大片免费看| 亚洲人成中文字幕在线观看| 99久在线国内在线播放免费观看| 欧美日韩亚洲精品| 亚洲av永久无码精品网站| 三年片在线观看免费大全 | 亚洲日韩精品无码专区加勒比☆ | 国产精品亚洲不卡一区二区三区| 伊人久久免费视频| 最新亚洲人成网站在线观看| 久久精品国产亚洲AV果冻传媒| 日韩毛片免费在线观看| 国产午夜精品免费一区二区三区| 亚洲影院天堂中文av色| 久久久久久久91精品免费观看| 羞羞漫画登录页面免费| 亚洲精品人成电影网| 毛片免费全部播放无码| 亚洲欧洲国产成人精品| 亚洲国产主播精品极品网红 | 日本高清免费aaaaa大片视频| 国产成人精品免费久久久久| 色窝窝亚洲av网| 亚洲国产日韩在线成人蜜芽| 亚洲色欲一区二区三区在线观看 | 亚洲国产第一站精品蜜芽| 日本免费的一级v一片| 一区二区三区无码视频免费福利| 久久久精品视频免费观看 | 成年女人喷潮毛片免费播放| 久久久免费观成人影院| 亚洲AV香蕉一区区二区三区| 亚洲国产视频网站| 久久久久久亚洲精品| 国产午夜亚洲不卡| 波多野结衣中文一区二区免费| 手机在线看永久av片免费| 最近免费中文字幕高清大全 |