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

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

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

    West Farm
    吾本布衣,生于川北,躬耕于代碼的田地上。
    posts - 16,  comments - 15,  trackbacks - 0
    天天冒出一堆新的東西!讓人不知所措。

    舉個例子:jquery - angular - react - vue

    這語言真的有毒。

    如今的硬件,恐怕在瀏覽器中實現強類型語言JAVA來作為腳本語言都不比JS弱吧,哎真替applet感到冤枉。

    老夫一直就覺得,瀏覽器一直是一個很奇葩的東西,HTML+CSS+JS本身,難道不能發明一種語言通過HTTP傳輸,然后直接調用OS級別的UI來渲染不就完了嗎?

    網頁能實現的界面,我不信用操作系統的UI組件做不出來。
    posted @ 2018-04-01 00:19 West Farmer 閱讀(176) | 評論 (0)編輯 收藏
    原文地址:https://weblogs.java.net/blog/pat/archive/2004/10/stupid_scanner_1.html

    正則表達式中,\A是指一個字符串的開頭,可能大家用慣了^,而忽略了這個\A, 但是^其實是指一行的開始,而不管一個字符串里面包含多少行,\A都只匹配第一行的開頭。
    那么我們可以用
    \A做點什么呢?,看下面這個例子:
    static String convertStreamToString(java.io.InputStream is) {
        java.util.Scanner s = new java.util.Scanner(is).useDelimiter("\\A");
        return s.hasNext() ? s.next() : "";
    }
    相信大家都看懂了,用\A作為分隔符,那么得到的當然就只有一個token,那就是整個字符串了。再配合Scanner,就輕易的將一個輸入流轉換為一個字符串了。
    注意當需要做編碼轉換時,Scanner是有支持編碼參數的構造方法的。
    posted @ 2013-11-28 09:38 West Farmer 閱讀(1023) | 評論 (0)編輯 收藏
         摘要: Gson is library created by google guys, it is used for java bean to json serialization/deserialization. Gson can serialize any java bean, collection, map to json, and don't need to care about the...  閱讀全文
    posted @ 2013-11-22 19:22 West Farmer 閱讀(5334) | 評論 (3)編輯 收藏
    If we observe a property of SWT controls, and bind it to another observable value, you must take care of those method calls which will change the property indirectly.
    for example, we have a Combo whose "text" property is bound to a bean's "name" property like this:
    IObservableValue nameObservable = BeansObservables.observeDetailValue(obserabedDriverProfile, "name", String.class);

    ISWTObservableValue nameComboObservable = SWTObservables.observeText(driverClassCombo);

    bindingContext.bindValue(nameComboObservable , nameObservable, new UpdateValueStrategy(UpdateValueStrategy.POLICY_UPDATE), null);

    The variable "obserabedDriverProfile" is a observed selection in a ListViewer, it's in a master-detail scenario. If we add some code like this:
    obserabedDriverProfile.addValueChangeListener(new IValueChangeListener(){

                @Override
                public void handleValueChange(ValueChangeEvent event) {
                    DriverProfile dp = (DriverProfile)event.diff.getNewValue();
                    driverClassCombo.removeAll();
                    driverClassCombo.add(dp.getName();
                    driverClassCombo.setText(driverClassCombo.getItem(0));
                }
                
            });
    every time you change the selection in the ListViewer,  the selected bean's "name" property will be set to a empty string. Why?  The removeAll method of Combo will clear it's text, and combo's "text" property is bound to selected bean's "name" property. So, the right way is:
    obserabedDriverProfile.addValueChangeListener(new IValueChangeListener(){

                @Override
                public void handleValueChange(ValueChangeEvent event) {
                    DriverProfile dp = (DriverProfile)event.diff.getNewValue();
                    String name = dp.getName;
                    driverClassCombo.removeAll();
                    driverClassCombo.add(name);
                    driverClassCombo.setText(driverClassCombo.getItem(0));
                }
                
            });
    posted @ 2013-04-14 15:24 West Farmer 閱讀(260) | 評論 (0)編輯 收藏

    <2013年4月>
    31123456
    78910111213
    14151617181920
    21222324252627
    2829301234
    567891011

    常用鏈接

    留言簿

    隨筆分類

    隨筆檔案

    相冊

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 一级毛片完整版免费播放一区| 亚洲毛片在线观看| 亚洲大成色www永久网址| 久久国产精品2020免费m3u8| 亚洲国产精品国自产拍AV| 久久精品九九亚洲精品| 亚洲αⅴ无码乱码在线观看性色 | 亚洲欧美国产日韩av野草社区| 最近2019中文免费字幕| 亚洲精品国产V片在线观看| 免费在线观看亚洲| 日韩精品无码专区免费播放| 亚洲免费在线播放| av无码久久久久不卡免费网站| 亚洲一区二区三区四区视频| 午夜毛片不卡免费观看视频| 亚洲av无一区二区三区| 亚洲国产精品狼友中文久久久| 亚洲福利一区二区精品秒拍| 一级毛片免费一级直接观看| 亚洲日韩精品无码专区网址| 三年片在线观看免费观看大全一 | 国产精品亚洲一区二区在线观看| 免费国产怡红院在线观看| 亚洲精品成人网站在线播放| 国产在线国偷精品产拍免费| 男女超爽视频免费播放| 亚洲日韩精品A∨片无码| 18禁止观看免费私人影院| 亚洲精品9999久久久久无码| 亚洲国产综合无码一区二区二三区| 视频免费在线观看| 亚洲国产V高清在线观看| 青青操视频在线免费观看| 亚洲1234区乱码| 亚洲精品国产高清嫩草影院| 99ee6热久久免费精品6| 99亚洲乱人伦aⅴ精品| 亚洲成在人天堂一区二区| 蜜臀91精品国产免费观看| 亚洲一卡二卡三卡|