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

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

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

    lyyb2001

    只是為方便自己找記錄而已
    posts - 57, comments - 27, trackbacks - 0, articles - 5
      BlogJava :: 首頁 :: 新隨筆 :: 聯系 ::  :: 管理

    @import url(http://www.tkk7.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); @import url(http://www.tkk7.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); 在/Library/LaunchDaemons下
    新建svn.sh,內容如下

    /usr/bin/svnserve -d -r /Users/YingBo/svn/repository


    chmod +x svn.sh


    新建com.skycity.svn.plist,內容如下

    <?xml version="1.0" encoding="UTF-8"?>  

    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

    <plist version="1.0">

      <dict>

        <key>KeepAlive</key>

        <true/>

        <key>Label</key>

        <string>com.skycity.svn</string>

        <key>ProgramArguments</key>

        <array>

        <string>/Library/LaunchDaemons/svn.sh</string>

        </array>

      </dict>

    </plist>


    設置開機自動啟動

     sudo launchctl load -w /Library/LaunchDaemons/com.skycity.svn.plist


    設置開機不自動啟動

     sudo launchctl unload -w /Library/LaunchDaemons/com.skycity.svn.plist

    posted @ 2015-03-27 10:36 skycity 閱讀(170) | 評論 (0)編輯 收藏

    查看當前java版本
    $ java -version

    java version "1.8.0_25"

    Java(TM) SE Runtime Environment (build 1.8.0_25-b17)

    Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

    $ which java
    /usr/bin/java

    $ ls -l /usr/bin/java

    lrwxr-xr-x  1 root  wheel  74 12 26 10:24 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java


    ls -l /System/Library/Frameworks/JavaVM.framework/Versions/

    total 64

    lrwxr-xr-x  1 root  wheel   10 12 26 10:24 1.4 -> CurrentJDK

    lrwxr-xr-x  1 root  wheel   10 12 26 10:24 1.4.2 -> CurrentJDK

    lrwxr-xr-x  1 root  wheel   10 12 26 10:24 1.5 -> CurrentJDK

    lrwxr-xr-x  1 root  wheel   10 12 26 10:24 1.5.0 -> CurrentJDK

    lrwxr-xr-x  1 root  wheel   10 12 26 10:24 1.6 -> CurrentJDK

    lrwxr-xr-x  1 root  wheel   10 12 26 10:24 1.6.0 -> CurrentJDK

    drwxr-xr-x  8 root  wheel  272 12 26 14:10 A

    lrwxr-xr-x  1 root  wheel    1 12 26 10:24 Current -> A

    lrwxr-xr-x  1 root  wheel   59 12 26 10:24 CurrentJDK -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents


    由此可知,當前java所對應的文件是/System/Library/Frameworks/JavaVm.Framework/Vesions/A/Commons/java

     /System/Library/Frameworks/JavaVM.framework/Versions/下的jdk 1.4-1.6的版本,全部指向/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents

    posted @ 2015-03-20 10:24 skycity 閱讀(286) | 評論 (0)編輯 收藏

    yum remove ibus* yum remove scim* yum install fcitx fcitx-table fcitx-table-chinese fcitx-pinyin

    posted @ 2015-03-20 09:42 skycity 閱讀(116) | 評論 (0)編輯 收藏

    有這樣一個串
    Read([SQLServer#10.5.219.21#mas_db],[select * from material where machine_seq='!dbo.repair.machine_seq' and b='@@dbo.test.cc' and c='!!dbo.test.dd' and d='@dbo.repair' and e='sd.bf' and f='@aa.bg' and g='#dbo.repair.machine_name' and h=@dbo.repair.owner],[en_US])
    需要解析中間的select * from material where machine_seq='!dbo.repair.machine_seq' and b='@@dbo.test.cc' and c='!!dbo.test.dd' and d='@dbo.repair' and e='sd.bf' and f='@aa.bg' and g='#dbo.repair.machine_name' and h=@dbo.repair.owner
    還需要滿足'@@','@','!'(前后包含單引號),的變量取出來
    @schema.table.fieldName     @dbo.repair.machine_seq要點:獲取界面上某個控件錄入的值;
    #schema.table     #dbo.reapir要點:獲取這個表的記錄行數;
    !schema.table.fieldName   !dbo.repair.qty要點:統計dbo.repair表qty總和. 相當于Sum(qty)性質.
    @@constName   @@User_ID要點:獲取內存變量值;

    實現如下:
    package com.lenovo.nabf.util;

    import java.util.ArrayList;
    import java.util.List;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;

    public class NabfUtilTest {
        public static final Pattern PatternSql = Pattern.compile("\\'(([#!]{1}|[@]{1,2})[\\w\\.]+?)\\'"); // match '@dbo.repair.machine_seq'
        public static final Pattern PatternReadString = Pattern.compile(".+?,\\[([\\w\\.\\s{*!@#=\'}]+?)\\],.+?");  //match Read([db],[sqlstring],[lang])得到sqlstring的值
        public static void main(String args[]){
             String readString="Read([SQLServer#10.5.219.21#mas_db],[select * from material where "
                + "machine_seq='!dbo.repair.machine_seq' and b='@@dbo.test.cc' "
                + "and c='!!dbo.test.dd' and d='@dbo.repair' and e='sd.bf' and f='@aa.bg' "
                + "and g='#dbo.repair.machine_name' and h=@dbo.repair.owner],[en_US])"; 
            System.out.println(readString);
            System.out.println(analysisReadStr(readString));
            List list=NabfUtil.getRegexMatchedList(readString);
            for(String s:list){
                 System.out.println(s);
            }
            String sqlString = NabfUtil.getStringByAnalysisReadString(readString);
            System.out.println(sqlString);
        } 
        public static ArrayList getRegexMatchedList(String readString){
            String sqlString = analysisReadStr(readString);
            ArrayList matchList=new ArrayList();
            Matcher matcher = PatternSql.matcher(sqlString);
            int lastEndIndex = 0;
            while (matcher.find(lastEndIndex)) {
                matchList.add(matcher.group(1));
                lastEndIndex = matcher.end();
            }
            return matchList;
        }
        public static String getStringByAnalysisReadString(String readString){
            String sqlString = analysisReadStr(readString);
            Matcher matcher = PatternSql.matcher(sqlString);
            StringBuilder sb = new StringBuilder();
            int lastEndIndex = 0;
            while (matcher.find(lastEndIndex)) {
                sb.append(sqlString.substring(lastEndIndex, matcher.start()));
                lastEndIndex = matcher.end();
            }
            sb.append(sqlString.substring(lastEndIndex));
            return sb.toString();
        }
        private static String analysisReadStr(String readString){
            Matcher matcher = PatternReadString.matcher(readString);
            int lastEndIndex = 0;
            String sqlString="";
            while (matcher.find(lastEndIndex)) {
                     sqlString=matcher.group(1);
                     lastEndIndex = matcher.end();
            }
            return sqlString;
       }
    }

    posted @ 2015-03-20 09:41 skycity 閱讀(218) | 評論 (0)編輯 收藏

    JDepend 一個開放源代碼的可以用來評價Java程序質量的優秀工具,它遍歷Java class的文件目錄,以Java包(package)為單位,為每一個包/類自動生成 包的依賴程度,穩定性,可靠度等的評價報告,根據這些報告,我們可以得到包或類之間的依賴關系,并分析出包的穩定程度,抽象程度,是否存在循環依賴關系 等。
    我們可以根據JDepend給出的報告數據,分析出我們的包是否是可靠的,穩定的,健壯的包,是否符合面向對象的設計原則。
    JDepend 一個開放源代碼的可以用來評價Java程序質量的優秀工具,它遍歷Java class的文件目錄,以Java包(package)為單位,為每一個包/類自動生成 包的依賴程度,穩定性,可靠度等的評價報告,根據這些報告,我們可以得到包或類之間的依賴關系,并分析出包的穩定程度,抽象程度,是否存在循環依賴關系 等。
    我們可以根據JDepend給出的報告數據,分析出我們的包是否是可靠的,穩定的,健壯的包,是否符合面向對象的設計原則。
    一個具有穩定性,擴展性,可維護性的軟件系統要求系統設計遵循面向對象的設計原則。一般來說,面向對象的設計原則要求滿足高聚合,低耦合,禁止循環依賴等基本原則。
    JDepend生成的Java包的質量評價報告主要包括:
    Number of Classes and Interfaces(TC):實現類與抽象接口的數目
    CC:包內具體的實現類的數目
    AC:包內抽象類和接口類的數目
    Abstractness (A):包的抽象度。指一個包內包含的抽象類或接口占整個包中的類的比重。即A=AC/TC,該值處于0,1之間,若A=0,說明包內不包含任何抽象類或接口;若A=1,說明包內全部是抽象類或接口。
    Efferent Couplings (Ce):離心耦合。被該包依賴的外部包的數目(i.e. outgoing dependencies),該數值越大,說明該包越不獨立(因為依賴了別的包),也越不穩定。
    Afferent Couplings (Ca):向心耦合。依賴該包(包含的類)的外部包(類)的數目(i.e. incoming dependencies),該數值越大,說明該包的擔當的職責越大,也就越穩定。
    Instability (I):衡量一個包的不穩定程度。I=Ce/(Ce+Ca)。它的值處于[0,1]之間。I=0時,沒有依賴外部包,此時包是最穩定的,反之I=1,沒有外部依賴“我”,則說明包極不穩定。
    Distance from the Main Sequence (D): 該指標主要用來評價包的抽象程度與穩定程度的平衡關系,它可以用二維直線圖 A + I = 1 來表示。D=abs((A + I) - 1),也就是說D為 一個包的抽象度 + 包的不穩定程度 - 1 的絕對值。一個理想的包是:完全抽象的(A=1,I=0),非常穩定的(I=0),這時D=0;或者是:完全具體類構成的包(A=0,I=1),非常不穩定的 (I=1),這時同樣也有D=0。D=0說明包的抽象程度與穩定程度是平衡的,反之D=1說明包的平衡程度被嚴重破壞。D值越大,越需要受到關注。                                       
    面向的設計原則之一The Stable Abstractions Principle (SAP):穩定抽象等價原則指出了包的穩定程度與它的抽象程度(接口的數目)成正比,也就是說,一個包內包含的接口所占的比重越大,這個包就越穩定。

    posted @ 2015-03-20 09:40 skycity 閱讀(216) | 評論 (0)編輯 收藏

     J2SE 8 = 52,
     J2SE 7 = 51,
     J2SE 6.0 = 50,
     J2SE 5.0 = 49,
     JDK 1.4 = 48,
     JDK 1.3 = 47,
     JDK 1.2 = 46,
     JDK 1.1 = 45

    posted @ 2015-03-20 09:38 skycity 閱讀(209) | 評論 (0)編輯 收藏

    萬分號,費率的地方用得著,網上不好找,留著先?

    posted @ 2013-02-21 11:41 skycity 閱讀(198) | 評論 (0)編輯 收藏

         摘要:   閱讀全文

    posted @ 2012-09-29 11:36 skycity 閱讀(416) | 評論 (0)編輯 收藏

         摘要:   閱讀全文

    posted @ 2008-12-22 09:24 skycity 閱讀(1080) | 評論 (0)編輯 收藏

         摘要:   閱讀全文

    posted @ 2008-12-18 21:59 skycity 閱讀(287) | 評論 (0)編輯 收藏

    僅列出標題
    共6頁: 上一頁 1 2 3 4 5 6 下一頁 
    主站蜘蛛池模板: 成人免费一级毛片在线播放视频 | 日本人的色道www免费一区| 中文字幕一区二区免费| 亚洲区日韩精品中文字幕| 午夜亚洲www湿好大| 免费女人18毛片a级毛片视频| 无人影院手机版在线观看免费 | 亚洲国产成人精品久久| 国产亚洲精品a在线观看| 亚洲AV无码乱码精品国产| 国产性爱在线观看亚洲黄色一级片 | 国产成人精品免费视频软件| 大学生一级毛片免费看| 亚洲毛片免费观看| 最近免费中文字幕mv在线电影| 中国一级毛片视频免费看| 亚洲国产精品热久久| 亚洲人成网7777777国产| 久九九精品免费视频| 日韩亚洲国产高清免费视频| 国产精品成人免费一区二区| 国产亚洲综合视频| 亚洲精品免费在线| 亚洲爆乳少妇无码激情| 国产区图片区小说区亚洲区| 一级特级女人18毛片免费视频| 亚洲另类图片另类电影| 亚洲制服中文字幕第一区| 亚洲色在线无码国产精品不卡| 亚洲av成人无码网站… | 麻豆国产精品入口免费观看| 亚洲福利视频一区二区| 亚洲黄色网站视频| 美女被免费视频网站| 久久大香香蕉国产免费网站| 日本无吗免费一二区| 亚洲AV永久无码精品一百度影院| 中文日韩亚洲欧美制服| a级毛片在线免费看| 日本一道高清不卡免费| 亚洲视频.com|