锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精品视频在线播放,亚洲熟妇av一区,国产成A人亚洲精V品无码性色 http://www.tkk7.com/paulwong/category/11300.htmlzh-cnFri, 20 May 2022 01:15:01 GMTFri, 20 May 2022 01:15:01 GMT60openJDK鏃犳硶榪涜jmaphttp://www.tkk7.com/paulwong/archive/2022/05/19/450751.htmlpaulwongpaulwongThu, 19 May 2022 05:53:00 GMThttp://www.tkk7.com/paulwong/archive/2022/05/19/450751.htmlhttp://www.tkk7.com/paulwong/comments/450751.htmlhttp://www.tkk7.com/paulwong/archive/2022/05/19/450751.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/450751.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/450751.htmlhttps://blog.csdn.net/qq_32447301/article/details/85109014


paulwong 2022-05-19 13:53 鍙戣〃璇勮
]]>
API鎺ュ彛涓殑鏁忔劅鏁版嵁鐨勫姞瀵嗕笌瑙e瘑http://www.tkk7.com/paulwong/archive/2022/05/11/450742.htmlpaulwongpaulwongWed, 11 May 2022 06:37:00 GMThttp://www.tkk7.com/paulwong/archive/2022/05/11/450742.htmlhttp://www.tkk7.com/paulwong/comments/450742.htmlhttp://www.tkk7.com/paulwong/archive/2022/05/11/450742.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/450742.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/450742.html闃呰鍏ㄦ枃

paulwong 2022-05-11 14:37 鍙戣〃璇勮
]]>
鍏嶆敞鍐孞DK涓嬭澆http://www.tkk7.com/paulwong/archive/2021/08/25/435953.htmlpaulwongpaulwongWed, 25 Aug 2021 08:17:00 GMThttp://www.tkk7.com/paulwong/archive/2021/08/25/435953.htmlhttp://www.tkk7.com/paulwong/comments/435953.htmlhttp://www.tkk7.com/paulwong/archive/2021/08/25/435953.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/435953.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/435953.htmlhttps://repo.huaweicloud.com/java/jdk/



paulwong 2021-08-25 16:17 鍙戣〃璇勮
]]>
JSR-303 Bean Validation - @Size鍜孈Max@Min鐨勫尯鍒?/title><link>http://www.tkk7.com/paulwong/archive/2021/04/29/435867.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Thu, 29 Apr 2021 01:55:00 GMT</pubDate><guid>http://www.tkk7.com/paulwong/archive/2021/04/29/435867.html</guid><wfw:comment>http://www.tkk7.com/paulwong/comments/435867.html</wfw:comment><comments>http://www.tkk7.com/paulwong/archive/2021/04/29/435867.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/paulwong/comments/commentRss/435867.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/paulwong/services/trackbacks/435867.html</trackback:ping><description><![CDATA[<p style="margin-top: 0px; margin-right: 0px; margin-bottom: var(--s-prose-spacing); margin-left: 0px; padding: 0px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; vertical-align: baseline; box-sizing: inherit; clear: both; color: #242729; background-color: #ffffff;"><code style="margin: 0px; padding: 2px 4px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; background-color: var(--black-075); white-space: pre-wrap; color: var(--black-800); border-radius: 3px;">@Min</code> and <code style="margin: 0px; padding: 2px 4px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; background-color: var(--black-075); white-space: pre-wrap; color: var(--black-800); border-radius: 3px;">@Max</code> are used for validating numeric fields which could be <code style="margin: 0px; padding: 2px 4px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; background-color: var(--black-075); white-space: pre-wrap; color: var(--black-800); border-radius: 3px;">String</code>(representing number), <code style="margin: 0px; padding: 2px 4px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; background-color: var(--black-075); white-space: pre-wrap; color: var(--black-800); border-radius: 3px;">int</code>, <code style="margin: 0px; padding: 2px 4px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; background-color: var(--black-075); white-space: pre-wrap; color: var(--black-800); border-radius: 3px;">short</code>, <code style="margin: 0px; padding: 2px 4px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; background-color: var(--black-075); white-space: pre-wrap; color: var(--black-800); border-radius: 3px;">byte</code> etc and their respective primitive wrappers.<br /><br /></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: var(--s-prose-spacing); margin-left: 0px; padding: 0px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; vertical-align: baseline; box-sizing: inherit; clear: both; color: #242729; background-color: #ffffff;"><code style="margin: 0px; padding: 2px 4px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; background-color: var(--black-075); white-space: pre-wrap; color: var(--black-800); border-radius: 3px;">@Size</code> is used to check the length constraints on the fields.<br /><br /></p><p style="margin: 0px; padding: 0px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; vertical-align: baseline; box-sizing: inherit; clear: both; color: #242729; background-color: #ffffff;">As per documentation <code style="margin: 0px; padding: 2px 4px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; background-color: var(--black-075); white-space: pre-wrap; color: var(--black-800); border-radius: 3px;">@Size</code> supports <code style="margin: 0px; padding: 2px 4px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; background-color: var(--black-075); white-space: pre-wrap; color: var(--black-800); border-radius: 3px;">String</code>, <code style="margin: 0px; padding: 2px 4px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; background-color: var(--black-075); white-space: pre-wrap; color: var(--black-800); border-radius: 3px;">Collection</code>, <code style="margin: 0px; padding: 2px 4px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; background-color: var(--black-075); white-space: pre-wrap; color: var(--black-800); border-radius: 3px;">Map</code> and <code style="margin: 0px; padding: 2px 4px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; background-color: var(--black-075); white-space: pre-wrap; color: var(--black-800); border-radius: 3px;">arrays</code> while <code style="margin: 0px; padding: 2px 4px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; background-color: var(--black-075); white-space: pre-wrap; color: var(--black-800); border-radius: 3px;">@Min</code> and <code style="margin: 0px; padding: 2px 4px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; background-color: var(--black-075); white-space: pre-wrap; color: var(--black-800); border-radius: 3px;">@Max</code> supports primitives and their wrappers. See the <a rel="noreferrer" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; cursor: pointer; user-select: auto;">documentation</a>.</p><img src ="http://www.tkk7.com/paulwong/aggbug/435867.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/paulwong/" target="_blank">paulwong</a> 2021-04-29 09:55 <a href="http://www.tkk7.com/paulwong/archive/2021/04/29/435867.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>java娉涘瀷 鏂規(guī)硶榪斿洖鍊煎甫鏈夋硾鍨?<T>http://www.tkk7.com/paulwong/archive/2021/03/19/435828.htmlpaulwongpaulwongFri, 19 Mar 2021 07:10:00 GMThttp://www.tkk7.com/paulwong/archive/2021/03/19/435828.htmlhttp://www.tkk7.com/paulwong/comments/435828.htmlhttp://www.tkk7.com/paulwong/archive/2021/03/19/435828.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/435828.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/435828.html

        /**
         * 
         * 
@param <T>澹版槑姝ゆ柟娉曟寔鏈変竴涓被鍨婽錛屼篃鍙互鐞嗚В涓哄0鏄庢鏂規(guī)硶涓烘硾鍨嬫柟娉?br />         * @param clazz 浣滅敤鏄寚鏄庢硾鍨婽鐨勫叿浣撶被鍨?br />         * @return 鎸囨槑璇ユ柟娉曠殑榪斿洖鍊間負(fù)綾誨瀷T
         * 
@throws InstantiationException
         * 
@throws IllegalAccessException
         
*/
        public <T> T getObject(Class<T> clazz) throws InstantiationException, IllegalAccessException {
            T t = clazz.newInstance();//鍒涘緩瀵硅薄
            return t;
        }

鏂規(guī)硶榪斿洖鍊煎墠鐨?lt;T>鐨勫乏鍙蟲槸鍛婅瘔緙栬瘧鍣紝褰撳墠鐨勬柟娉曠殑鍊間紶鍏ョ被鍨嬪彲浠ュ拰綾誨垵濮嬪寲鐨勬硾鍨嬬被涓嶅悓錛屼篃灝辨槸璇ユ柟娉曠殑娉涘瀷綾誨彲浠ヨ嚜瀹氫箟錛屼笉闇瑕佽窡綾誨垵濮嬪寲鐨勬硾鍨嬬被鐩稿悓



paulwong 2021-03-19 15:10 鍙戣〃璇勮
]]>
JSR-303 Bean Validation - Date String Validation http://www.tkk7.com/paulwong/archive/2021/02/25/435810.htmlpaulwongpaulwongThu, 25 Feb 2021 01:44:00 GMThttp://www.tkk7.com/paulwong/archive/2021/02/25/435810.htmlhttp://www.tkk7.com/paulwong/comments/435810.htmlhttp://www.tkk7.com/paulwong/archive/2021/02/25/435810.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/435810.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/435810.html鍏跺疄鍙互鏂板姞涓涓柟娉曡繑鍥濪ate綾誨瀷錛屽啀閰嶅悎@Future@Past 榪涜楠岃瘉銆?br />
@Future(message = "Invalid CN_ID_INFO.EXPIRE_DATE.")
private LocalDate getValidExpireDate() {
    try {
        return LocalDate.parse(this.dateString, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
    } catch (Exception e) {
        return null;
    }
}

姝ゆ柟娉曞dateString榪涜瑙i噴錛岃繑鍥濴ocalDate錛屽鏋渄ateString涓虹┖鎴栨牸寮忛敊璇紝鍒欒繑鍥炵┖錛屽啀閰嶅悎@Future 榪涜鏄惁鏈潵鏃ユ湡鐨勯獙璇併?br />


paulwong 2021-02-25 09:44 鍙戣〃璇勮
]]>
JSR-303 Bean Validation - Conditional Validationhttp://www.tkk7.com/paulwong/archive/2021/02/25/435809.htmlpaulwongpaulwongThu, 25 Feb 2021 01:24:00 GMThttp://www.tkk7.com/paulwong/archive/2021/02/25/435809.htmlhttp://www.tkk7.com/paulwong/comments/435809.htmlhttp://www.tkk7.com/paulwong/archive/2021/02/25/435809.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/435809.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/435809.html榪欑鏂規(guī)硶閬垮厤浜?jiǎn)鑷畾涔夋牎楠屽櫒鑰屽鍔犵被銆?br />https://www.chkui.com/article/java/java_bean_validation

@AssertTrue(message = "Missing BANK_CARD_IMG_INFO.IMG")
private Boolean getValidImg() {
    if(YNEnum.Y.code.equals(super.getNeedChecked())) {
            return StringUtils.hasText(this.img);
        }
        return null;//igore checking.
}

榪欎釜鏄綋needChecked涓篩鐨勬椂鍊欐墠鎵ц媯(gè)鏌mg鍙橀噺鏄惁涓虹┖銆?br />鏈夊嚑鐐規(guī)敞鎰忥細(xì)
  1. 鏂規(guī)硶鍚嶇О瑕佷互get寮澶?br />
  2. 榪斿洖綾誨瀷鐢˙oolean錛岃屼笉鐢╞oolean
  3. 榪斿洖鍊兼湁涓夌錛歵rue,false,null濡傛灉鏄痭ull鍒欏綋鎴愰氳繃錛屼笌true鐨勭粨鏋滀竴鏍?/li>


paulwong 2021-02-25 09:24 鍙戣〃璇勮
]]>
Java8涓枃浠惰漿Base64鍜孊ase64杞枃浠?/title><link>http://www.tkk7.com/paulwong/archive/2021/01/07/435767.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Thu, 07 Jan 2021 01:44:00 GMT</pubDate><guid>http://www.tkk7.com/paulwong/archive/2021/01/07/435767.html</guid><wfw:comment>http://www.tkk7.com/paulwong/comments/435767.html</wfw:comment><comments>http://www.tkk7.com/paulwong/archive/2021/01/07/435767.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/paulwong/comments/commentRss/435767.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/paulwong/services/trackbacks/435767.html</trackback:ping><description><![CDATA[鏈夊嚑涓」鐩腑錛岄兘闇瑕佸皢鍥劇墖鎴栬呮暟瀛楄瘉涔︾殑鏂囦歡杞負(fù)Base64錛屾槰澶╁啓浠g爜鐨勬椂鍊欙紝鍙戠幇鍦╦dk8涓湰灝卞惈鏈夊叧浜嶣ase64鐨凙PI銆?br /><br />浠庢鍚庝笉鍐嶉渶瑕佸叾浠栫殑jar鍖呮潵杞崲Base64浜?!!<br /><br />鎹鏄疛DK8鍔犲叆鐨勩?br /><br /><br />鍏堟槸灝嗘枃浠惰漿涓築ase64錛?br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF; ">public</span> String encryptToBase64(String filePath) {<br />        <span style="color: #0000FF; ">if</span> (filePath == <span style="color: #0000FF; ">null</span>) {<br />            <span style="color: #0000FF; ">return</span> <span style="color: #0000FF; ">null</span>;<br />        }<br />        <span style="color: #0000FF; ">try</span> {<br />            <span style="color: #0000FF; ">byte</span>[] b = Files.readAllBytes(Paths.get(filePath));<br />            <span style="color: #0000FF; ">return</span> Base64.getEncoder().encodeToString(b);<br />        } <span style="color: #0000FF; ">catch</span> (IOException e) {<br />            e.printStackTrace();<br />        }<br /> <br />        <span style="color: #0000FF; ">return</span> <span style="color: #0000FF; ">null</span>;<br />    }</div><br />Files銆丳aths綾繪槸JDK7閲屽姞鍏ョ殑錛岃鍙栨枃浠朵笉鍐嶉渶瑕佽皟鐢↖O鍖呴噷鐨凢ileInputStream錛岀畝鍗曚究鎹楓?br />瀛楃涓插弬鏁癴ilePath鏄枃浠剁殑璺緞銆?br /><br />棣栧厛鏄皢鏂囦歡璇繪垚浜岃繘鍒剁爜錛岀劧鍚庨氳繃Base64.getEncoder().encodeToString()鏂規(guī)硶灝嗕簩榪涘埗鐮佽漿鎹負(fù)Base64鍊箋?br /><br /><br />鐒跺悗鏄皢Base64杞負(fù)鏂囦歡錛?br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF; ">public</span> String decryptByBase64(String base64, String filePath) {<br />        <span style="color: #0000FF; ">if</span> (base64 == <span style="color: #0000FF; ">null</span> && filePath == <span style="color: #0000FF; ">null</span>) {<br />            <span style="color: #0000FF; ">return</span> "鐢熸垚鏂囦歡澶辮觸錛岃緇欏嚭鐩稿簲鐨勬暟鎹?;<br />        }<br />        <span style="color: #0000FF; ">try</span> {<br />            Files.write(Paths.get(filePath), Base64.getDecoder().decode(base64),StandardOpenOption.CREATE);<br />        } <span style="color: #0000FF; ">catch</span> (IOException e) {<br />            e.printStackTrace();<br />        }<br />        <span style="color: #0000FF; ">return</span> "鎸囧畾璺緞涓嬬敓鎴愭枃浠舵垚鍔燂紒";<br />    }</div><br />瀛楃涓插弬鏁癰ase64鎸囩殑鏄枃浠剁殑Base64鍊鹼紝filePath鏄寚鐨勬枃浠跺皢瑕佷繚瀛樼殑浣嶇疆銆?br />閫氳繃Files.write()鏂規(guī)硶杞繪澗灝嗘枃浠跺啓鍏ユ寚瀹氫綅緗紝涓嶅啀璋冪敤FileOutStream鏂規(guī)硶銆?br /><br />絎笁涓弬鏁癝tandardOpenOption.CREATE鏄鐞嗘枃浠剁殑鏂瑰紡錛屾垜璁劇疆鐨勬槸涓嶇璺緞涓嬫湁鎴栨病鏈夛紝閮藉垱寤鴻繖涓枃浠訛紝鏈夊垯瑕嗙洊銆?br /><br />鍦⊿tandardOpenOption綾諱腑鏈夊緢澶氬弬鏁板彲璋冪敤錛屼笉鍐嶇瘡璧樸?img src ="http://www.tkk7.com/paulwong/aggbug/435767.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/paulwong/" target="_blank">paulwong</a> 2021-01-07 09:44 <a href="http://www.tkk7.com/paulwong/archive/2021/01/07/435767.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>寮濮嬫棩鏈熶笌緇撴潫鏃ユ湡鐨勭敤娉?/title><link>http://www.tkk7.com/paulwong/archive/2020/12/29/435759.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Tue, 29 Dec 2020 02:37:00 GMT</pubDate><guid>http://www.tkk7.com/paulwong/archive/2020/12/29/435759.html</guid><wfw:comment>http://www.tkk7.com/paulwong/comments/435759.html</wfw:comment><comments>http://www.tkk7.com/paulwong/archive/2020/12/29/435759.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/paulwong/comments/commentRss/435759.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/paulwong/services/trackbacks/435759.html</trackback:ping><description><![CDATA[閫氬父瑕佺敤鍒板彇鏌愪釜鏃墮棿孌靛唴鐨勬暟鎹紝閭d箞鏃墮棿孌佃濡備綍瀹氫箟錛?br /> 鍙?020-12-01榪欏ぉ鐨勬暟鎹紝"2020-12-01 00:00:00" <= time < "2020-12-02 00:00:00"銆?br /> apache common3涓彁渚涗簡(jiǎn)鐩稿簲鐨勬柟娉曪細(xì)<br /> <br /> <div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->startDate = DateUtils.parseDate(startDateStr, DATE_PATTERN);<br />            <br />String endDateStr = args.getOptionValues(END_DATE).get(0);<br />endDate = DateUtils.parseDate(endDateStr, DATE_PATTERN);<br /><br /><span style="color: #008000; ">//</span><span style="color: #008000; ">娓呴浂寮濮嬫棩鏈燂紝榪斿洖綾諱技2020-12-01 00:00:00            </span><span style="color: #008000; "><br /></span>startDate = DateUtils.truncate(startDate, Calendar.DATE);<br /><span style="color: #008000; ">//</span><span style="color: #008000; ">鍙栫粨鏉熸棩鏈熺殑涓婇檺錛岃繑鍥為殧澶╃殑鏃墮棿錛?020-12-02 00:00:00</span><span style="color: #008000; "><br /></span>endDate = DateUtils.ceiling(endDate, Calendar.DATE);"銆?br />apache common3涓彁渚涗簡(jiǎn)鐩稿簲鐨勬柟娉曪細(xì)</div><img src ="http://www.tkk7.com/paulwong/aggbug/435759.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/paulwong/" target="_blank">paulwong</a> 2020-12-29 10:37 <a href="http://www.tkk7.com/paulwong/archive/2020/12/29/435759.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Java鐨凚IO鍜孨IO寰堥毦鎳傦紵鐢ㄤ唬鐮佸疄璺電粰浣犵湅錛屽啀涓嶆噦鎴戣漿琛岋紒http://www.tkk7.com/paulwong/archive/2020/12/02/435737.htmlpaulwongpaulwongWed, 02 Dec 2020 00:52:00 GMThttp://www.tkk7.com/paulwong/archive/2020/12/02/435737.htmlhttp://www.tkk7.com/paulwong/comments/435737.htmlhttp://www.tkk7.com/paulwong/archive/2020/12/02/435737.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/435737.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/435737.htmlhttp://www.52im.net/thread-2846-1-1.html



paulwong 2020-12-02 08:52 鍙戣〃璇勮
]]>
Pretty print JSON using org.json library in Javahttp://www.tkk7.com/paulwong/archive/2020/10/28/435709.htmlpaulwongpaulwongWed, 28 Oct 2020 09:17:00 GMThttp://www.tkk7.com/paulwong/archive/2020/10/28/435709.htmlhttp://www.tkk7.com/paulwong/comments/435709.htmlhttp://www.tkk7.com/paulwong/archive/2020/10/28/435709.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/435709.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/435709.htmlSyntax
public java.lang.String toString(int indentFactor) throws JSONException

Example

import org.json.*;
public class JSONPrettyPrintTest {
   
public static void main(String args[]) throws JSONException {
      String json 
= "{" +
                    
"Name : Jai," +
                    
"Age : 25, " +
                    
"Salary: 25000.00 " +
                    
"}";
      JSONObject jsonObj 
= new JSONObject(json);
      System.out.println(
"Pretty Print of JSON:");
      System.out.println(jsonObj.toString(
4)); // pretty print json
   }
}

Output

Pretty Print of JSON:
{
   "Salary": 25000,
   "Age": 25,
   "Name": "Jai"
}


paulwong 2020-10-28 17:17 鍙戣〃璇勮
]]>
Scheduling a task in Java within a CompletableFuturehttp://www.tkk7.com/paulwong/archive/2020/08/24/435646.htmlpaulwongpaulwongMon, 24 Aug 2020 01:06:00 GMThttp://www.tkk7.com/paulwong/archive/2020/08/24/435646.htmlhttp://www.tkk7.com/paulwong/comments/435646.htmlhttp://www.tkk7.com/paulwong/archive/2020/08/24/435646.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/435646.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/435646.htmlWhen we want to do something later in our Java code, we often turn to the ScheduledExecutorService. This class has a method called schedule(), and we can pass it some code to be run later like this:

ScheduledExecutorService executor =
    Executors.newScheduledThreadPool(4);
executor.schedule(
    () -> {System.out.println("..later");},
    1,
    TimeUnit.SECONDS
);
System.out.println("do");
// (Don't forget to shut down the executor later)

The above code prints “do…” and then one second later it prints “…later”.

We can even write code that does some work and returns a result in a similar way:

// (Make the executor as above.)
ScheduledFuture future = executor.schedule(
    () -> 10 + 25, 1, TimeUnit.SECONDS);
System.out.println("answer=" + future.get())


The above code prints “answer=35”. When we call get() it blocks waiting for the scheduler to run the task and mark the ScheduledFuture as complete, and then returns the answer to the sum (10 + 25) when it is ready.

This is all very well, but you may note that the Future returned from schedule() is a ScheduledFuture, and a ScheduledFuture is not a CompletableFuture.

Why do you care? Well, you might care if you want to do something after the scheduled task is completed. Of course, you can call get(), and block, and then do something, but if you want to react asynchronously without blocking, this won’t work.

The normal way to run some code after a Future has completed is to call one of the “then*” or “when*” methods on the Future, but these methods are only available on CompletableFuture, not ScheduledFuture.

Never fear, we have figured this out for you. We present a small wrapper for schedule that transforms your ScheduledFuture into a CompletableFuture. Here’s how to use it:

CompletableFuture<Integer> future =
    ScheduledCompletable.schedule(
        executor,
        () -> 10 + 25,
        1,
        TimeUnit.SECONDS
     );
future.thenAccept(
    answer -> {System.out.println(answer);}
);
System.out.println("Answer coming")


The above code prints “Answer coming…” and then “35”, so we can see that we don’t block the main thread waiting for the answer to come back.

So far, we have scheduled a synchronous task to run in the background after a delay, and wrapped its result in a CompletableFuture to allow us to chain more tasks after it.

In fact, what we often want to do is schedule a delayed task that is itself asynchronous, and already returns a CompletableFuture. In this case it feels particularly natural to get the result back as a CompletableFuture, but with the current ScheduledExecutorService interface we can’t easily do it.

It’s OK, we’ve figured that out too:

Supplier<CompletableFuture<Integer>> asyncTask = () ->
    CompletableFuture.completedFuture(10 + 25);
CompletableFuture<Integer> future =
    ScheduledCompletable.scheduleAsync(
        executor, asyncTask, 1, TimeUnit.SECONDS);
future.thenAccept(
    answer -> {System.out.println(answer);}
);
System.out.println("Answer coming")


The above code prints “Answer coming…” and then “35”, so we can see that our existing asynchronous task was scheduled in the background, and we didn’t have to block the main thread waiting for it. Also, under the hood, we are not blocking the ScheduledExecutorService‘s thread (from its pool) while the async task is running – that task just runs in whatever thread it was assigned when it was created. (Note: in our example we don’t really run an async task at all, but just immediately return a completed Future, but this does work for real async tasks.)

I know you’re wondering how we achieved all this. First, here’s how we run a simple blocking task in the background and wrap it in a CompletableFuture:

public static <T> CompletableFuture<T> schedule(
    ScheduledExecutorService executor,
    Supplier<T> command,
    long delay,
    TimeUnit unit
) {
    CompletableFuture<T> completableFuture = new CompletableFuture<>();
    executor.schedule(
        (() -> {
            try {
                return completableFuture.complete(command.get());
            } catch (Throwable t) {
                return completableFuture.completeExceptionally(t);
            }
        }),
        delay,
        unit
    );
    return completableFuture;
}


And here’s how we delay execution of an async task but still return its result in a CompletableFuture:

public static <T> CompletableFuture<T> scheduleAsync(
    ScheduledExecutorService executor,
    Supplier<CompletableFuture<T>> command,
    long delay,
    TimeUnit unit
) {
    CompletableFuture<T> completableFuture = new CompletableFuture<>();
    executor.schedule(
        (() -> {
            command.get().thenAccept(
                t -> {completableFuture.complete(t);}
            )
            .exceptionally(
                t -> {completableFuture.completeExceptionally(t);return null;}
            );
        }),
        delay,
        unit
    );
    return completableFuture;
}


Note that this should all work to run methods like exceptionally()thenAccept()whenComplete() etc.

Feedback and improvements welcome!


https://www.artificialworlds.net/blog/2019/04/05/scheduling-a-task-in-java-within-a-completablefuture/

paulwong 2020-08-24 09:06 鍙戣〃璇勮
]]>
CompletableFuturehttp://www.tkk7.com/paulwong/archive/2020/08/14/435641.htmlpaulwongpaulwongFri, 14 Aug 2020 03:46:00 GMThttp://www.tkk7.com/paulwong/archive/2020/08/14/435641.htmlhttp://www.tkk7.com/paulwong/comments/435641.htmlhttp://www.tkk7.com/paulwong/archive/2020/08/14/435641.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/435641.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/435641.html
Thread t1 = new Thread();
Thread t2 = new Thread();
t1.start(); // 鍚姩鏂扮嚎紼?/span>
t2.start(); // 鍚姩鏂扮嚎紼?/span>

鐢變簬鍒涘緩鍜岄攢姣佺嚎紼嬫槸闈炲父鑰楄祫婧愶紝鍥犳鏀規(guī)垚綰跨▼寤哄ソ鍚庝笉閿姣侊紝鍙互閲嶇敤錛岀敤鎴峰彧闇鎻愪緵run鏂規(guī)硶鐨勫叿浣撳疄鐜幫細(xì)
public static void main(String[] args) throws Exception {
        ExecutorService executor = Executors.newSingleThreadExecutor();
        Future<String> stringFuture = executor.submit(new Callable<String>() {
            @Override
            public String call() throws Exception {
                Thread.sleep(2000);
                return "async thread";
            }
        });
        Thread.sleep(1000);
        System.out.println("main thread");
        System.out.println(stringFuture.get());

    }

浣嗗鏋滃緢澶氱嚎紼嬭鍒涘緩錛屽茍涓旂嚎紼嬮棿鏈変緷璧栵紝鍗蟲寜嫻佺▼鍜屾潯浠舵墽琛岀嚎紼嬶紝瀹炵幇璧鋒潵灝辨湁鐐瑰鏉傦紝浜庢槸CompletableFuture妯┖鍑轟笘銆備竴鍏辨湁50鍚勬柟娉曞彲渚涗嬌鐢ㄣ?br />
CompletableFuture.supplyAsync()錛岀浉褰撲簬鍒涘緩浜?jiǎn)ExecutorService錛屽悓鏃朵篃鍒涘緩浜?jiǎn)Callable錛岀劧鍚庢彁浜ゅ埌綰跨▼姹犱腑鎵ц銆?/div>
CompletableFuture<String> futureA = CompletableFuture.supplyAsync(() -> "浠誨姟A");
CompletableFuture<String> futureB = CompletableFuture.supplyAsync(() -> "浠誨姟B");
CompletableFuture<String> futureC = futureB.thenApply(b -> {
      System.out.println("鎵ц浠誨姟C.");
      System.out.println("鍙傛暟:" + b);//鍙傛暟:浠誨姟B
      return "a";
});


!!How to use CompletableFuture and Callable in Java
https://ducmanhphan.github.io/2020-02-10-How-to-use-CompletableFuture-Callable-in-Java/

浣跨敤CompletableFuture浼樺寲浣犵殑浠g爜鎵ц鏁堢巼
https://www.cnblogs.com/fingerboy/p/9948736.html

CompletableFuture 浣跨敤璇﹁В
https://www.jianshu.com/p/6bac52527ca4

浣跨敤CompletableFuture
https://www.liaoxuefeng.com/wiki/1252599548343744/1306581182447650


https://github.com/eugenp/tutorials/blob/master/core-java-modules/core-java-concurrency-basic/src/test/java/com/baeldung/completablefuture/CompletableFutureLongRunningUnitTest.java

paulwong 2020-08-14 11:46 鍙戣〃璇勮
]]>Springboot+proguard+maven 娣鋒穯http://www.tkk7.com/paulwong/archive/2020/08/13/435639.htmlpaulwongpaulwongThu, 13 Aug 2020 02:53:00 GMThttp://www.tkk7.com/paulwong/archive/2020/08/13/435639.htmlhttp://www.tkk7.com/paulwong/comments/435639.htmlhttp://www.tkk7.com/paulwong/archive/2020/08/13/435639.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/435639.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/435639.htmlhttps://blog.csdn.net/qq_35981283/article/details/78529929



paulwong 2020-08-13 10:53 鍙戣〃璇勮
]]>
Different ways to create objects in Javahttp://www.tkk7.com/paulwong/archive/2020/08/07/435631.htmlpaulwongpaulwongFri, 07 Aug 2020 02:04:00 GMThttp://www.tkk7.com/paulwong/archive/2020/08/07/435631.htmlhttp://www.tkk7.com/paulwong/comments/435631.htmlhttp://www.tkk7.com/paulwong/archive/2020/08/07/435631.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/435631.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/435631.htmlhttps://www.geeksforgeeks.org/different-ways-create-objects-java/




paulwong 2020-08-07 10:04 鍙戣〃璇勮
]]>
涓哄暐鏂囦歡鐨凜HECKSUM涓璖HA512姣擬D5楂樼駭錛?/title><link>http://www.tkk7.com/paulwong/archive/2020/06/16/435513.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Tue, 16 Jun 2020 02:21:00 GMT</pubDate><guid>http://www.tkk7.com/paulwong/archive/2020/06/16/435513.html</guid><wfw:comment>http://www.tkk7.com/paulwong/comments/435513.html</wfw:comment><comments>http://www.tkk7.com/paulwong/archive/2020/06/16/435513.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/paulwong/comments/commentRss/435513.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/paulwong/services/trackbacks/435513.html</trackback:ping><description><![CDATA[<a target="_blank">https://stackoverflow.com/questions/2117732/reasons-why-sha512-is-superior-to-md5</a><br /><img src ="http://www.tkk7.com/paulwong/aggbug/435513.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/paulwong/" target="_blank">paulwong</a> 2020-06-16 10:21 <a href="http://www.tkk7.com/paulwong/archive/2020/06/16/435513.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍚勭鑾峰彇JVM DUMP鐨勬柟娉?/title><link>http://www.tkk7.com/paulwong/archive/2020/02/24/435157.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Mon, 24 Feb 2020 14:03:00 GMT</pubDate><guid>http://www.tkk7.com/paulwong/archive/2020/02/24/435157.html</guid><wfw:comment>http://www.tkk7.com/paulwong/comments/435157.html</wfw:comment><comments>http://www.tkk7.com/paulwong/archive/2020/02/24/435157.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/paulwong/comments/commentRss/435157.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/paulwong/services/trackbacks/435157.html</trackback:ping><description><![CDATA[<p style="font-size: medium; font-family: "Times New Roman";">JVM 鐨勭嚎紼嬪爢鏍?dump 涔熺О core dump錛屽唴瀹逛負(fù)鏂囨湰錛屼富瑕佸寘鍚綋鏃?JVM 鐨勭嚎紼嬪爢鏍堬紝鍫?dump 涔熺О heap dump錛屽唴瀹逛負(fù)浜岃繘鍒舵牸寮忥紝涓昏鍖呭惈褰撴椂 JVM 鍫嗗唴瀛樹腑鐨勫唴瀹廣傜敱浜庡悇涓搷浣滅郴緇熴佸悇涓?JVM 瀹炵幇涓嶅悓錛屽嵆浣垮悓涓 JVM 瀹炵幇錛屽悇涓増鏈篃鏈夊樊寮傦紝鏈枃鎻忚堪鐨勬柟娉曢兘鍩轟簬 64 浣?Linux 鎿嶄綔緋葷粺鐜錛孞ava 8 Oracle HotSpot JVM 瀹炵幇銆?/p><p style="font-size: medium; font-family: "Times New Roman";">鍫嗘爤鍜屽爢鐨勫唴瀹瑰湪瀹氫綅闂鐨勬椂鍊欙紝閮芥槸闈炲父閲嶈鐨勪俊鎭傜嚎紼嬪爢鏍?dump 鍙互浜?jiǎn)瑙e綋鏃?JVM 涓墍鏈夌嚎紼嬬殑榪愯鎯呭喌錛屾瘮濡傜嚎紼嬬殑鐘舵佸拰褰撳墠姝e湪榪愯鐨勪唬鐮佽銆傚爢 dump 鍙互浜?jiǎn)瑙e綋鏃跺爢鐨勪娇鐢ㄦ儏鍐靛Q屽悇涓被瀹炰緥鐨勬暟閲忓強(qiáng)鍚勪釜瀹炰緥鎵鍗犵敤鐨勭┖闂村ぇ灝忋?/p><h1>綰跨▼鍫嗘爤</h1><h2>浣跨敤 jstack</h2><p style="font-size: medium; font-family: "Times New Roman";">jstack 鏄?JDK 鑷甫鐨勫伐鍏鳳紝鐢ㄤ簬 dump 鎸囧畾榪涚▼ ID(PID)鐨?JVM 鐨勭嚎紼嬪爢鏍堜俊鎭?/p><div highlighter-rouge"="" style="font-size: medium; font-family: "Times New Roman";"><pre><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--># 鎵撳嵃鍫嗘爤淇℃伅鍒版爣鍑嗚緭鍑?nbsp;jstack PID  <br /># 鎵撳嵃鍫嗘爤淇℃伅鍒版爣鍑嗚緭鍑猴紝浼?xì)鎵撳嵃鍏充簬閿佺殑淇℃?nbsp;jstack -l PID  <br />寮哄埗鎵撳嵃鍫嗘爤淇℃伅鍒版爣鍑嗚緭鍑猴紝濡傛灉浣跨敤 jstack PID 娌℃湁鍝嶅簲鐨勬儏鍐典笅(姝ゆ椂 JVM 榪涚▼鍙兘鎸傝搗)錛?br />鍔?nbsp;-F 鍙傛暟 jstack -F PID </div></pre></div><h2>浣跨敤 jcmd</h2><p style="font-size: medium; font-family: "Times New Roman";">jcmd 鏄?JDK 鑷甫鐨勫伐鍏鳳紝鐢ㄤ簬鍚?JVM 榪涚▼鍙戦佸懡浠わ紝鏍規(guī)嵁鍛戒護(hù)鐨勪笉鍚岋紝鍙互浠f浛鎴栭儴鍒嗕唬鏇?jstack銆乯map 絳夈傚彲浠ュ彂閫佸懡浠?nbsp;<code>Thread.print</code> 鏉ユ墦鍗板嚭 JVM 鐨勭嚎紼嬪爢鏍堜俊鎭?/p><div highlighter-rouge"="" style="font-size: medium; font-family: "Times New Roman";"><pre><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--># 涓嬮潰鐨勫懡浠ゅ悓絳変簬 jstack PID <br />jcmd PID Thread.print  <br /><br /># 鍚岀瓑浜?nbsp;jstack -l PID <br />jcmd PID Thread.print -l </div></pre></div><h2>浣跨敤 kill -3</h2><p style="font-size: medium; font-family: "Times New Roman";">kill 鍙互鍚戠壒瀹氱殑榪涚▼鍙戦佷俊鍙?SIGNAL)錛岀己鐪佹儏鍐墊槸鍙戦佺粓姝?TERM) 鐨勪俊鍙?錛屽嵆 kill PID 涓?kill -15 PID 鎴?kill -TERM PID 鏄瓑浠風(fēng)殑銆侸VM 榪涚▼浼?xì)鐩戝?QUIT 淇″彿(鍏跺間負(fù) 3)錛屽綋鏀跺埌榪欎釜淇″彿鏃訛紝浼?xì)鎵撳嵃鍑哄綋鏃剁殑绾拷E嬪爢鏍堝拰鍫嗗唴瀛樹嬌鐢ㄦ瑕侊紝鐩告瘮 jstack錛屾鏃跺浜?jiǎn)鍫嗗唴瀛樼殑鋴社敤姒傝鎯呭嘃c(diǎn)備絾 jstack 鍙互鎸囧畾 -l 鍙傛暟錛屾墦鍗伴攣鐨勪俊鎭?/p><div highlighter-rouge"="" style="font-size: medium; font-family: "Times New Roman";"><pre><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->kill -3 PID <br /># 鎴?nbsp;kill -QUIT PID </div></pre></div><h1>鍫?/h1><h2>-XX:+HeapDumpOnOutOfMemoryError</h2><p style="font-size: medium; font-family: "Times New Roman";">娣誨姞 JVM 鍙傛暟 -XX:+HeapDumpOnOutOfMemoryError 鍚庯紝褰撳彂鐢?OOM(OutOfMemory)鏃訛紝鑷姩鍫?dump銆傜己鐪佹儏鍐典笅錛孞VM 浼?xì)鍒涘晦Z竴涓悕縐頒負(fù) java_pidPID.hprof 鐨勫爢 dump 鏂囦歡鍦?JVM 鐨勫伐浣滅洰褰曚笅銆備絾鍙互浣跨敤鍙傛暟 -XX:HeapDumpPath=PATH 鏉ユ寚瀹?dump 鏂囦歡鐨勪繚瀛樹綅緗?/p><div highlighter-rouge"="" style="font-size: medium; font-family: "Times New Roman";"><pre><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--># JVM 鍙戠敓 OOM 鏃訛紝浼?xì)鑷姩鍦?nbsp;/var/log/abc 鐩綍涓嬩駭鐢熷爢 dump 鏂囦歡 java_pidPID.hprof <br />java -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/abc/ </div></pre></div><h2>jmap</h2><p style="font-size: medium; font-family: "Times New Roman";">jmap 涔熸槸 JDK 鑷甫鐨勫伐鍏鳳紝涓昏鐢ㄤ簬鑾峰彇鍫嗙浉鍏崇殑淇℃伅銆?/p><h3>鍫?dump</h3><div highlighter-rouge"="" style="font-size: medium; font-family: "Times New Roman";"><pre><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--># 灝?nbsp;JVM 鐨勫爢 dump 鍒版寚瀹氭枃浠訛紝濡傛灉鍫嗕腑瀵硅薄杈冨錛岄渶瑕佺殑鏃墮棿浼?xì)杈冮暱锛屽瓙鍙傛?nbsp;format 鍙敮鎸?nbsp;b錛?br />鍗充簩榪涘埗鏍煎紡<br />jmap -dump:format=b,file=FILE_WITH_PATH<br /><br /># 濡傛灉 JVM 榪涚▼鏈搷搴斿懡浠わ紝鍙互鍔犱笂鍙傛暟 -F 灝濊瘯<br />jmap -F -dump:format=b,file=FILE_WITH_PATH<br /><br /># 鍙互鍙?nbsp;dump 鍫嗕腑鐨勫瓨?gòu)z誨璞★紝鍔犱笂 live 瀛愬弬鏁幫紝浣嗕嬌鐢?nbsp;-F 鏃朵笉鏀寔 live<br />jmap -dump:live,format=b,file=FILE_WITH_PATH</div></pre></div><h3>鑾峰彇鍫嗘瑕佷俊鎭?/h3><div highlighter-rouge"="" style="font-size: medium; font-family: "Times New Roman";"><pre><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--># -heap 鍙傛暟鐢ㄤ簬鏌ョ湅鎸囧畾 JVM 榪涚▼鐨勫爢鐨勪俊鎭紝鍖呮嫭鍫嗙殑鍚勪釜鍙傛暟鐨勫鹼紝鍫嗕腑鏂扮敓浠c佸勾鑰佷唬鐨勫唴瀛樺ぇ灝忋佷嬌鐢ㄧ巼絳?nbsp;<br />jmap -heap PID  <br /><br /># 鍚屾牱錛屽鏋?nbsp;JVM 榪涚▼鏈搷搴斿懡浠わ紝鍙互鍔犱笂鍙傛暟 -F 灝濊瘯 <br />jmap -F -heap PID </div></pre></div><p style="font-size: medium; font-family: "Times New Roman";">涓涓疄渚嬭緭鍑哄涓嬶細(xì)</p><div style="font-size: medium; font-family: "Times New Roman";"><pre><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->Attaching to process ID 68322, please wait<img src="http://www.tkk7.com/Images/dot.gif" alt="" /><br />Debugger attached successfully.<br />Server compiler detected.<br />JVM version is 25.112-b16<br /><br />using thread-local object allocation.<br />Parallel GC with 4 thread(s)<br /><br />Heap Configuration:<br />   MinHeapFreeRatio         = 0<br />   MaxHeapFreeRatio         = 100<br />   MaxHeapSize              = 268435456 (256.0MB)<br />   NewSize                  = 8388608 (8.0MB)<br />   MaxNewSize               = 89128960 (85.0MB)<br />   OldSize                  = 16777216 (16.0MB)<br />   NewRatio                 = 2<br />   SurvivorRatio            = 8<br />   MetaspaceSize            = 21807104 (20.796875MB)<br />   CompressedClassSpaceSize = 1073741824 (1024.0MB)<br />   MaxMetaspaceSize         = 17592186044415 MB<br />   G1HeapRegionSize         = 0 (0.0MB)<br /><br />Heap Usage:<br />PS Young Generation<br />Eden Space:<br />   capacity = 41943040 (40.0MB)<br />   used     = 1701504 (1.6226806640625MB)<br />   free     = 40241536 (38.3773193359375MB)<br />   4.05670166015625% used<br />From Space:<br />   capacity = 4194304 (4.0MB)<br />   used     = 0 (0.0MB)<br />   free     = 4194304 (4.0MB)<br />   0.0% used<br />To Space:<br />   capacity = 5242880 (5.0MB)<br />   used     = 0 (0.0MB)<br />   free     = 5242880 (5.0MB)<br />   0.0% used<br />PS Old Generation<br />   capacity = 30408704 (29.0MB)<br />   used     = 12129856 (11.56793212890625MB)<br />   free     = 18278848 (17.43206787109375MB)<br />   39.889421134159484% used<br /><br />16658 interned Strings occupying 1428472 bytes.</div><span style="font-family: verdana, "courier new"; font-size: 14px;"><br />鑾峰彇鍫嗕腑鐨勭被瀹炰緥緇熻</span></pre></div><div highlighter-rouge"="" style="font-size: medium; font-family: "Times New Roman";"><pre><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--># 鎵撳嵃 JVM 鍫嗕腑鐨勭被瀹炰緥緇熻淇℃伅錛屼互鍗犵敤鍐呭瓨鐨勫ぇ灝忔帓搴忥紝鍚屾牱錛屽鏋?nbsp;JVM 鏈搷搴斿懡浠わ紝涔熷彲浠ヤ嬌鐢?nbsp;-F 鍙傛暟 <br />jmap -histo PID  <br /><br /># 涔熷彲浠ュ彧緇熻鍫嗕腑鐨勫瓨?gòu)z誨璞★紝鍔犱笂 live 瀛愬弬鏁幫紝浣嗕嬌鐢?nbsp;-F 鏃朵笉鏀寔 live <br />jmap -histo:live PID </div></pre></div><h2>浣跨敤 jcmd</h2><div highlighter-rouge"="" style="font-size: medium; font-family: "Times New Roman";"><pre><div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--># 絳夊悓 jmap -dump:live,format=b,file=FILE_WITH_PATH<br />jcmd PID GC.heap_dump FILE_WITH_PATH<br /><br /># 絳夊悓 jmap -dump:format=b,file=FILE_WITH_PATH<br />jcmd PID GC.heap_dump -all FILE_WITH_PATH<br /><br /># 絳夊悓 jmap -histo:live PID<br />jcmd PID GC.class_histogram<br /><br /># 絳夊悓 jmap -histo PID<br />jcmd PID GC.class_histogram -all</div></pre></div><img src ="http://www.tkk7.com/paulwong/aggbug/435157.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/paulwong/" target="_blank">paulwong</a> 2020-02-24 22:03 <a href="http://www.tkk7.com/paulwong/archive/2020/02/24/435157.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>CountDownLatch銆丆yclicBarrier鍜孲emaphorehttp://www.tkk7.com/paulwong/archive/2019/09/24/434696.htmlpaulwongpaulwongTue, 24 Sep 2019 02:18:00 GMThttp://www.tkk7.com/paulwong/archive/2019/09/24/434696.htmlhttp://www.tkk7.com/paulwong/comments/434696.htmlhttp://www.tkk7.com/paulwong/archive/2019/09/24/434696.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/434696.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/434696.htmlCountDownLatch銆丆yclicBarrier鍜孲emaphore榪欎笁涓茍鍙戣緟鍔╃被錛屽彲浠ュ湪綰跨▼涓懠鍙紝浣垮緱綰跨▼鏆傚仠絳夛紝浣嗗悇鏈変笉鍚屻?br />
  • CountDownLatch
1銆佸垵濮嬪寲錛屽茍浼犲叆璁℃暟鍣?br /> 2銆佸悜涓嶅悓鐨勭嚎紼嬩紶鍏ountDownLatch瀹炰緥
3銆佸鏋滃湪鏌愪竴綰跨▼涓懠鍙玜wait()錛屽垯姝ょ嚎紼嬭鎸傝搗錛岀洿鍒拌鏁板櫒涓?錛屾墠寰涓嬫墽琛?br /> 4銆佸鏋滃湪鏌愪竴綰跨▼涓懠鍙玞ountDown()錛岃鏁板櫒鍑?
5銆佹渶緇堝鏋滆鏁板櫒鍊間負(fù)0鏃訛紝鍒機(jī)ountDownLatch瀹炰緥涓嶅啀璧蜂綔鐢ㄤ簡(jiǎn)錛屽嵆涓轟竴嬈℃х殑

  • CyclicBarrier
1銆佸垵濮嬪寲錛屽茍浼犲叆璁℃暟鍣ㄥ鹼紝涔熷彲浼犲叆涓涓猂unnable綾伙紝浼?xì)鍦ㄨ鏁板櫒湄?fù)0鏃訛紝琚墽琛?br /> 2銆佸悜涓嶅悓鐨勭嚎紼嬩紶鍏yclicBarrier瀹炰緥
3銆佸鏋滃湪鏌愪竴綰跨▼涓懠鍙玜wait()錛屽垯姝ょ嚎紼嬭鎸傝搗錛岀洿鍒拌鏁板櫒涓?錛屾墠寰涓嬫墽琛?br /> 4銆佸叾浠栫嚎紼嬪懠鍙玜wait()錛屽垯姝ょ嚎紼嬭鎸傝搗錛岀洿鍒拌鏁板櫒涓?錛屾墠寰涓嬫墽琛?br /> 5銆佹渶緇堝鏋滆鏁板櫒鍊間負(fù)0鏃訛紝鍒機(jī)yclicBarrier瀹炰緥浼?xì)灏嗚鏁板櫒鍊兼仮澶嶏紝鍙堝彲閲嶇敤

  • Semaphore
1銆佸垵濮嬪寲錛屽茍浼犲叆璁℃暟鍣ㄥ?br /> 2銆佸悜涓嶅悓鐨勭嚎紼嬩紶鍏emaphore瀹炰緥
3銆佸鏋滃湪鏌愪竴綰跨▼涓懠鍙玜cquire()錛屽垯Semaphore瀹炰緥浼?xì)灏嗚鏁板櫒鍊煎噺1錛屽鏋滆鏁板櫒鍊間負(fù)-1錛屽垯灝嗚鏁板櫒鍊肩疆涓?錛屾綰跨▼琚寕璧鳳紝鐩村埌璁℃暟鍣ㄥ煎ぇ浜?鏃訛紝鎵嶅線涓嬫墽琛?br /> 4銆佹綰跨▼闇鍛煎彨release()錛屼嬌寰楄鏁板櫒鍊?1錛屼互渚垮叾浠栫嚎紼嬪湪璁℃暟鍣ㄥ間負(fù)0鏃朵笉鍙楅樆


CountDownLatch 渚嬪瓙錛?br />
public class Test {
     public static void main(String[] args) {   
         final CountDownLatch latch = new CountDownLatch(2);
          
         new Thread(){
             public void run() {
                 try {
                     System.out.println("瀛愮嚎紼?+Thread.currentThread().getName()+"姝e湪鎵ц");
                    Thread.sleep(3000);
                    System.out.println("瀛愮嚎紼?+Thread.currentThread().getName()+"鎵ц瀹屾瘯");
                    latch.countDown();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
             };
         }.start();
          
         new Thread(){
             public void run() {
                 try {
                     System.out.println("瀛愮嚎紼?+Thread.currentThread().getName()+"姝e湪鎵ц");
                     Thread.sleep(3000);
                     System.out.println("瀛愮嚎紼?+Thread.currentThread().getName()+"鎵ц瀹屾瘯");
                     latch.countDown();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
             };
         }.start();
          
         try {
             System.out.println("絳夊緟2涓瓙綰跨▼鎵ц瀹屾瘯");
            latch.await();
            System.out.println("2涓瓙綰跨▼宸茬粡鎵ц瀹屾瘯");
            System.out.println("緇х畫鎵ц涓葷嚎紼?);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
     }
}

緇撴灉錛?br />
綰跨▼Thread-0姝e湪鎵ц
綰跨▼Thread-1姝e湪鎵ц
絳夊緟2涓瓙綰跨▼鎵ц瀹屾瘯
綰跨▼Thread-0鎵ц瀹屾瘯
綰跨▼Thread-1鎵ц瀹屾瘯
2涓瓙綰跨▼宸茬粡鎵ц瀹屾瘯
緇х畫鎵ц涓葷嚎紼?/div>

CyclicBarrier渚嬪瓙錛?br />
public class Test {
    public static void main(String[] args) {
        int N = 4;
        CyclicBarrier barrier  = new CyclicBarrier(N,new Runnable() {
            @Override
            public void run() {
                System.out.println("褰撳墠綰跨▼"+Thread.currentThread().getName());   
            }
        });
         
        for(int i=0;i<N;i++)
            new Writer(barrier).start();
    }
    static class Writer extends Thread{
        private CyclicBarrier cyclicBarrier;
        public Writer(CyclicBarrier cyclicBarrier) {
            this.cyclicBarrier = cyclicBarrier;
        }
 
        @Override
        public void run() {
            System.out.println("綰跨▼"+Thread.currentThread().getName()+"姝e湪鍐欏叆鏁版嵁");
            try {
                Thread.sleep(5000);      //浠ョ潯鐪犳潵妯℃嫙鍐欏叆鏁版嵁鎿嶄綔
                System.out.println("綰跨▼"+Thread.currentThread().getName()+"鍐欏叆鏁版嵁瀹屾瘯錛岀瓑寰呭叾浠栫嚎紼嬪啓鍏ュ畬姣?);
                cyclicBarrier.await();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }catch(BrokenBarrierException e){
                e.printStackTrace();
            }
            System.out.println("鎵鏈夌嚎紼嬪啓鍏ュ畬姣曪紝緇х畫澶勭悊鍏朵粬浠誨姟");
        }
    }
}

鎵ц緇撴灉錛?br />
綰跨▼Thread-0姝e湪鍐欏叆鏁版嵁
綰跨▼Thread-1姝e湪鍐欏叆鏁版嵁
綰跨▼Thread-2姝e湪鍐欏叆鏁版嵁
綰跨▼Thread-3姝e湪鍐欏叆鏁版嵁
綰跨▼Thread-0鍐欏叆鏁版嵁瀹屾瘯錛岀瓑寰呭叾浠栫嚎紼嬪啓鍏ュ畬姣?br /> 綰跨▼Thread-1鍐欏叆鏁版嵁瀹屾瘯錛岀瓑寰呭叾浠栫嚎紼嬪啓鍏ュ畬姣?br /> 綰跨▼Thread-2鍐欏叆鏁版嵁瀹屾瘯錛岀瓑寰呭叾浠栫嚎紼嬪啓鍏ュ畬姣?br /> 綰跨▼Thread-3鍐欏叆鏁版嵁瀹屾瘯錛岀瓑寰呭叾浠栫嚎紼嬪啓鍏ュ畬姣?br /> 褰撳墠綰跨▼Thread-3
鎵鏈夌嚎紼嬪啓鍏ュ畬姣曪紝緇х畫澶勭悊鍏朵粬浠誨姟
鎵鏈夌嚎紼嬪啓鍏ュ畬姣曪紝緇х畫澶勭悊鍏朵粬浠誨姟
鎵鏈夌嚎紼嬪啓鍏ュ畬姣曪紝緇х畫澶勭悊鍏朵粬浠誨姟
鎵鏈夌嚎紼嬪啓鍏ュ畬姣曪紝緇х畫澶勭悊鍏朵粬浠誨姟


Semaphore渚嬪瓙錛?br />
public class Test {
    public static void main(String[] args) {
        int N = 8;            //宸ヤ漢鏁?/span>
        Semaphore semaphore = new Semaphore(5); //鏈哄櫒鏁扮洰
        for(int i=0;i<N;i++)
            new Worker(i,semaphore).start();
    }
     
    static class Worker extends Thread{
        private int num;
        private Semaphore semaphore;
        public Worker(int num,Semaphore semaphore){
            this.num = num;
            this.semaphore = semaphore;
        }
         
        @Override
        public void run() {
            try {
                semaphore.acquire();
                System.out.println("宸ヤ漢"+this.num+"鍗犵敤涓涓満鍣ㄥ湪鐢熶駭");
                Thread.sleep(2000);
                System.out.println("宸ヤ漢"+this.num+"閲婃斁鍑烘満鍣?);
                semaphore.release();           
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}

鎵ц緇撴灉錛?br />
宸ヤ漢0鍗犵敤涓涓満鍣ㄥ湪鐢熶駭
宸ヤ漢1鍗犵敤涓涓満鍣ㄥ湪鐢熶駭
宸ヤ漢2鍗犵敤涓涓満鍣ㄥ湪鐢熶駭
宸ヤ漢4鍗犵敤涓涓満鍣ㄥ湪鐢熶駭
宸ヤ漢5鍗犵敤涓涓満鍣ㄥ湪鐢熶駭
宸ヤ漢0閲婃斁鍑烘満鍣?br /> 宸ヤ漢2閲婃斁鍑烘満鍣?br /> 宸ヤ漢3鍗犵敤涓涓満鍣ㄥ湪鐢熶駭
宸ヤ漢7鍗犵敤涓涓満鍣ㄥ湪鐢熶駭
宸ヤ漢4閲婃斁鍑烘満鍣?br /> 宸ヤ漢5閲婃斁鍑烘満鍣?br /> 宸ヤ漢1閲婃斁鍑烘満鍣?br /> 宸ヤ漢6鍗犵敤涓涓満鍣ㄥ湪鐢熶駭
宸ヤ漢3閲婃斁鍑烘満鍣?br /> 宸ヤ漢7閲婃斁鍑烘満鍣?br /> 宸ヤ漢6閲婃斁鍑烘満鍣?/div>
https://www.cnblogs.com/dolphin0520/p/3920397.html

https://juejin.im/post/5aeec3ebf265da0ba76fa327

paulwong 2019-09-24 10:18 鍙戣〃璇勮
]]>浣跨敤 Awaitility 嫻嬭瘯寮傛浠g爜http://www.tkk7.com/paulwong/archive/2019/08/01/434327.htmlpaulwongpaulwongThu, 01 Aug 2019 02:06:00 GMThttp://www.tkk7.com/paulwong/archive/2019/08/01/434327.htmlhttp://www.tkk7.com/paulwong/comments/434327.htmlhttp://www.tkk7.com/paulwong/archive/2019/08/01/434327.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/434327.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/434327.html鑷姩鍖栧伐鍏?寮傛鏍¢獙宸ュ叿 awaitility 蹇熷叆闂?/div>https://testerhome.com/topics/7408


https://yanbin.blog/test-asyn-call-with-awaitility/

Introduction to Awaitlity
https://www.baeldung.com/awaitlity-testing






paulwong 2019-08-01 10:06 鍙戣〃璇勮
]]>
zip4jhttp://www.tkk7.com/paulwong/archive/2019/06/10/433851.htmlpaulwongpaulwongMon, 10 Jun 2019 08:47:00 GMThttp://www.tkk7.com/paulwong/archive/2019/06/10/433851.htmlhttp://www.tkk7.com/paulwong/comments/433851.htmlhttp://www.tkk7.com/paulwong/archive/2019/06/10/433851.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/433851.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/433851.htmlhttps://rensanning.iteye.com/blog/1836727



paulwong 2019-06-10 16:47 鍙戣〃璇勮
]]>
JAVA 8 TIMEhttp://www.tkk7.com/paulwong/archive/2019/05/09/433761.htmlpaulwongpaulwongThu, 09 May 2019 02:15:00 GMThttp://www.tkk7.com/paulwong/archive/2019/05/09/433761.htmlhttp://www.tkk7.com/paulwong/comments/433761.htmlhttp://www.tkk7.com/paulwong/archive/2019/05/09/433761.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/433761.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/433761.htmlJava 8鏂扮壒鎬э紙鍥涳級(jí)錛氭柊鐨勬椂闂村拰鏃ユ湡API
https://lw900925.github.io/java/java8-newtime-api.html
 

paulwong 2019-05-09 10:15 鍙戣〃璇勮
]]>
SHARDING-JDBChttp://www.tkk7.com/paulwong/archive/2016/03/29/429870.htmlpaulwongpaulwongTue, 29 Mar 2016 13:26:00 GMThttp://www.tkk7.com/paulwong/archive/2016/03/29/429870.htmlhttp://www.tkk7.com/paulwong/comments/429870.htmlhttp://www.tkk7.com/paulwong/archive/2016/03/29/429870.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/429870.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/429870.htmlhttps://github.com/dangdangdotcom/sharding-jdbc/

paulwong 2016-03-29 21:26 鍙戣〃璇勮
]]>
Java 涓紜嬌鐢?hashCode 鍜?equals 鏂規(guī)硶http://www.tkk7.com/paulwong/archive/2015/12/01/428439.htmlpaulwongpaulwongTue, 01 Dec 2015 02:52:00 GMThttp://www.tkk7.com/paulwong/archive/2015/12/01/428439.htmlhttp://www.tkk7.com/paulwong/comments/428439.htmlhttp://www.tkk7.com/paulwong/archive/2015/12/01/428439.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/428439.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/428439.html闃呰鍏ㄦ枃

paulwong 2015-12-01 10:52 鍙戣〃璇勮
]]>
javax.crypto.IllegalBlockSizeException: Data must not be longer than 256 bytes 瑙e喅鍔炴硶http://www.tkk7.com/paulwong/archive/2015/11/18/428264.htmlpaulwongpaulwongWed, 18 Nov 2015 07:27:00 GMThttp://www.tkk7.com/paulwong/archive/2015/11/18/428264.htmlhttp://www.tkk7.com/paulwong/comments/428264.htmlhttp://www.tkk7.com/paulwong/archive/2015/11/18/428264.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/428264.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/428264.html
javax.crypto.IllegalBlockSizeException: Data must not be longer than 256 bytes

鎺ㄨ崘鐨勫仛娉曪細(xì)

  1. 闅忔満鐢熸垚涓涓瘑閽ワ紝鐢ㄤ綔瀵圭О瀵嗛挜UUID
  2. 鐢ㄦ瀵圭О瀵嗛挜錛岀敤瀵圭О鍔犲瘑娉旳ES鍔犲瘑鏁版嵁
  3. 鐢≧SA鐨勫叕閽ュ姞瀵嗘瀵圭О瀵嗛挜
  4. 鍙戦佸姞瀵嗗悗鐨勫縐板瘑閽ュ拰鍔犲瘑鏁版嵁
  5. 鐢≧SA縐侀挜瑙e瘑鍔犲瘑鍚庣殑瀵圭О瀵嗛挜
  6. 鐢ㄨВ瀵嗗瘑鍚庣殑瀵圭О瀵嗛挜錛岃В瀵嗘暟鎹?br />
  7. 瀹屾垚
AESSecurityUtil.java
import java.security.Key;
import java.util.UUID;

import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;

import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;

public class AESSecurityUtil {

    // 鍔犲瘑綆楁硶
    /** 鎸囧畾鍔犲瘑綆楁硶涓篟SA */
    private static final String ALGORITHM = "AES";

    // 鍔犲瘑瀵嗛挜
    
// private static final byte[] keyValue = new byte[] { 'T', 'h', 'e',
    
// 'B','e', 's', 't', 'S', 'e', 'c', 'r', 'e', 't', 'K', 'e', 'y' };
    
// 16浣嶇殑鍔犲瘑瀵嗛挜
//    private byte[] keyValue;

    /**
     * 鐢ㄦ潵榪涜鍔犲瘑鐨勬搷浣?br />      * 
     * 
@param Data
     * 
@return
     * 
@throws Exception
     
*/
    public static String encrypt(String keyString, String data)
            throws Exception {
        Key key = generateKey(keyString);
        Cipher c = Cipher.getInstance(ALGORITHM);
        c.init(Cipher.ENCRYPT_MODE, key);
        byte[] encVal = c.doFinal(data.getBytes());
        String encryptedValue = new BASE64Encoder().encode(encVal);
        return encryptedValue;
    }

    /**
     * 鐢ㄦ潵榪涜瑙e瘑鐨勬搷浣?br />      * 
     * 
@param encryptedData
     * 
@return
     * 
@throws Exception
     
*/
    public static String decrypt(String keyString, String encryptedData) throws Exception {
        Key key = generateKey(keyString);
        Cipher c = Cipher.getInstance(ALGORITHM);
        c.init(Cipher.DECRYPT_MODE, key);
        byte[] decordedValue = new BASE64Decoder().decodeBuffer(encryptedData);
        byte[] decValue = c.doFinal(decordedValue);
        String decryptedValue = new String(decValue);
        return decryptedValue;
    }
    
    public static String generateKeyString()
    {
        //蹇呴』闀垮害涓?6
        return UUID.randomUUID().toString().replaceAll("-", "").substring(0, 16);
    }

    /**
     * 鏍規(guī)嵁瀵嗛挜鍜岀畻娉曠敓鎴怟ey
     * 
     * 
@return
     * 
@throws Exception
     
*/
    private static Key generateKey(String keyString) throws Exception {
        Key key = new SecretKeySpec(keyString.getBytes(), ALGORITHM);
        return key;
    }
    
    public static void main(String [] args) throws Exception
    {
        String keyString = generateKeyString();
//        String keyString = "1234567890123456";
        System.out.println("瀵嗛挜錛? + keyString);
        
        String source = "鎭枩鍙戣儲(chǔ)!";// 瑕佸姞瀵嗙殑瀛楃涓?/span>
        System.out.println("鍑嗗鐢ㄥ瘑閽ュ姞瀵嗙殑瀛楃涓蹭負(fù)錛? + source);
        
        String cryptograph = encrypt(keyString, source);// 鐢熸垚鐨勫瘑鏂?/span>
        System.out.print("鐢ㄥ瘑閽ュ姞瀵嗗悗鐨勭粨鏋滀負(fù):" + cryptograph);
        System.out.println();

        String target = decrypt(keyString, cryptograph);// 瑙e瘑瀵嗘枃
        System.out.println("鐢ㄥ瘑閽ヨВ瀵嗗悗鐨勫瓧絎︿覆涓猴細(xì)" + target);
        System.out.println();
    }

}


CryptoUtil.java
import com.tcl.project7.boss.common.crypto.CryptoData;
import com.tcl.project7.boss.common.util.JsonManager;
import com.tcl.project7.boss.common.util.file.FileUtil;
import com.tcl.project7.boss.gameapplication.yearendactivities.bigwheelgame.player.valueobject.BigWheelGameRequest;

public class CryptoUtil {
    
    public static CryptoData encrypt(String data) throws Exception
    {
        //1銆佷駭鐢烝ES瀵嗛挜
        String keyString = AESSecurityUtil.generateKeyString();
        
        //2銆佺敤AES娉曞姞瀵嗘暟鎹?/span>
        String cryptograph = AESSecurityUtil.encrypt(keyString, data);
        
        //3銆佺敤RSA鍔犲瘑AES瀵嗛挜
        String finalKey = RSASecurityUtil.encrypt(keyString);
//        System.out.print("鐢≧SA鍔犲瘑AES瀵嗛挜涓?" + finalKey);
//        System.out.print("鍔犲瘑鏁版嵁:" + cryptograph);
        
        CryptoData cryptoData = new CryptoData();
        cryptoData.setKey(finalKey);
        cryptoData.setContent(cryptograph);
        
        //4銆佽繑鍥炴暟鎹?/span>
        return cryptoData;
    }
    
    public static String decrypt(String keyString, String data) throws Exception
    {
        //1銆佽В瀵嗗瘑閽?/span>
        String decryptKeyString = RSASecurityUtil.decrypt(keyString);
        
        //2銆佽В瀵嗗唴瀹?/span>
        String decryptData = AESSecurityUtil.decrypt(decryptKeyString, data);
        
        //3銆佽繑鍥?/span>
        return decryptData;
        
    }
    
    public static void main(String [] args) throws Exception
    {
        String aFilePath = "DATA/TESTING-FILE/TOCRYPTO/tocrypto.txt";
        String source = FileUtil.getContents(aFilePath);
        
        CryptoData cryptoData = encrypt(source);
        System.out.print(cryptoData);
        
        String target = decrypt(cryptoData.getKey(), cryptoData.getContent());
        System.out.print(target);
        
        BigWheelGameRequest bigWheelGameRequest = JsonManager.getBean(target, BigWheelGameRequest.class);
        System.out.print(bigWheelGameRequest);
    }

}


CryptoData.java
import java.io.Serializable;

public class CryptoData implements Serializable{

    private static final long serialVersionUID = -4774469372648172844L;
    
    private String key;
    
    private String content;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String toString() {
        return "CryptoData [key=" + key + ", content=" + content + "]";
    }

}



paulwong 2015-11-18 15:27 鍙戣〃璇勮
]]>
JSON杞琂AVA BEANhttp://www.tkk7.com/paulwong/archive/2015/11/18/428258.htmlpaulwongpaulwongWed, 18 Nov 2015 05:30:00 GMThttp://www.tkk7.com/paulwong/archive/2015/11/18/428258.htmlhttp://www.tkk7.com/paulwong/comments/428258.htmlhttp://www.tkk7.com/paulwong/archive/2015/11/18/428258.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/428258.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/428258.html
import java.io.IOException;

import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.DeserializationConfig;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.type.TypeReference;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class ColumnControllerTest {
    
    private Logger logger = LoggerFactory.getLogger(ColumnControllerTest.class);
    
    
    @Test
    public void testTest()
    {
        ObjectMapper mapper = new ObjectMapper();
        /*AnnotationIntrospector introspector = new JaxbAnnotationIntrospector();
        // make deserializer use JAXB annotations (only)
        mapper.getDeserializationConfig().setAnnotationIntrospector(introspector);
        // make serializer use JAXB annotations (only)
        mapper.getSerializationConfig().setAnnotationIntrospector(introspector);
*/
        mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        
        String userStr = "{\"username\":\"paul\",\"email\":\"paul@paul.com\"}";
        try {
            TypeReference<TestUser> temp = new TypeReference<TestUser>(){};
            TestUser testUser = mapper.readValue(userStr, temp);
            System.out.println(testUser.toString());
            
            String result = mapper.writeValueAsString(testUser);
            System.out.println(result);
            
        } catch (JsonParseException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (JsonMappingException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

}


paulwong 2015-11-18 13:30 鍙戣〃璇勮
]]>
Java NIO鏍稿績(jī)姒傚康鍙?qiáng)鍩烘湰璇诲?/title><link>http://www.tkk7.com/paulwong/archive/2015/05/10/424980.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Sun, 10 May 2015 12:55:00 GMT</pubDate><guid>http://www.tkk7.com/paulwong/archive/2015/05/10/424980.html</guid><wfw:comment>http://www.tkk7.com/paulwong/comments/424980.html</wfw:comment><comments>http://www.tkk7.com/paulwong/archive/2015/05/10/424980.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/paulwong/comments/commentRss/424980.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/paulwong/services/trackbacks/424980.html</trackback:ping><description><![CDATA[     鎽樿: 闈㈠悜嫻佺殑I/O緋葷粺涓嬈′竴涓瓧鑺傚湴澶勭悊鏁版嵁銆備竴涓緭鍏ユ祦浜х敓涓涓瓧鑺傜殑鏁版嵁錛屼竴涓緭鍑烘祦娑堣垂涓涓瓧鑺傜殑鏁版嵁銆備負(fù)嫻佸紡鏁版嵁鍒涘緩榪囨護(hù)鍣ㄩ潪甯稿鏄撱傞摼鎺ュ嚑涓繃婊ゅ櫒錛屼互渚挎瘡涓繃婊ゅ櫒鍙礋璐e崟涓鏉傚鐞嗘満鍒剁殑涓閮ㄥ垎錛岃繖鏍蜂篃鏄浉瀵圭畝鍗曠殑銆備笉鍒╃殑涓闈㈡槸錛岄潰鍚戞祦鐨処/O閫氬父鐩稿綋鎱€?nbsp;   NIO涓庡師鏉ョ殑I/O鏈夊悓鏍風(fēng)殑浣滅敤鍜岀洰鐨勶紝浣嗘槸瀹冧嬌鐢ㄥ潡I/O鐨勫鐞嗘柟寮忋傛瘡涓涓搷浣滈兘鍦ㄤ竴姝ヤ腑浜х敓鎴栬呮秷璐逛竴涓暟...  <a href='http://www.tkk7.com/paulwong/archive/2015/05/10/424980.html'>闃呰鍏ㄦ枃</a><img src ="http://www.tkk7.com/paulwong/aggbug/424980.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/paulwong/" target="_blank">paulwong</a> 2015-05-10 20:55 <a href="http://www.tkk7.com/paulwong/archive/2015/05/10/424980.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>寮婧愪腑鍥?2014 鏈鍙楀叧娉ㄥ紑婧愯蔣浠舵帓琛屾 TOP 50http://www.tkk7.com/paulwong/archive/2015/01/07/422097.htmlpaulwongpaulwongTue, 06 Jan 2015 16:08:00 GMThttp://www.tkk7.com/paulwong/archive/2015/01/07/422097.htmlhttp://www.tkk7.com/paulwong/comments/422097.htmlhttp://www.tkk7.com/paulwong/archive/2015/01/07/422097.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/422097.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/422097.html

寮婧愪腑鍥?2014 騫存渶鍙楀叧娉ㄨ蔣浠舵帓琛屾 TOP 50 姝e紡鍑虹倝錛?014 騫寸粨鏉熶簡(jiǎn)錛屾垜浠潵浜?jiǎn)瑙d竴涓嬭繃鍘諱竴騫撮噷寮婧愪腑鍥芥渶鍙楁榪庣殑 50 嬈捐蔣浠躲傛姒滃崟鏄牴鎹繃鍘諱竴騫寸殑鐢ㄦ埛璁塊棶銆佷氦嫻佸垎浜拰欏圭洰鏈韓鐨勬洿鏂伴搴︾瓑璇稿瑙掑害瀵規(guī)敹褰曚簬寮婧愪腑鍥?33000+ 嬈懼紑婧愯蔣浠惰繘琛岀粺璁★紝浠庤屽緱鍑哄墠 50 鍚嶆渶鍙楁榪庣殑寮婧愯蔣浠訛紝浠呬緵鍙傝冦?/p>

鏈帓琛屾涓昏鏄拡瀵瑰紑婧愪腑鍥界ぞ鍖哄湪 2014 騫村害鏈鍙楁榪庣殑 50 嬈劇儹闂ㄥ紑婧愰」鐩牴鎹敤鎴瘋闂噺銆佽璁哄拰鍏蟲敞絳夎搴﹁繘琛岀瓫閫夛紝浠庤屽緱鍑哄墠 50 鍚嶅紑婧愯蔣浠跺垪琛細(xì)

1. JFinal

JFinal 鏄熀浜?Java 璇█鐨勬瀬閫?WEB + ORM 妗嗘灦錛屽叾鏍稿績(jī)璁捐鐩爣鏄紑鍙戣繀閫熴佷唬鐮侀噺灝戙佸涔?fàn)绠鍗曘佸姛鑳藉己澶с佽交閲忕駭銆佹槗鎵╁睍銆丷estful銆傚湪鎷ユ湁Java璇█鎵鏈変紭鍔跨殑鍚屾椂鍐嶆嫢鏈塺uby銆乸ython銆乸hp絳夊姩鎬佽璦鐨勫紑鍙戞晥鐜囷紒

鎺堟潈鍗忚錛欰pache
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://git.oschina.net/jfinal/jfinal

2. AngularJS

Angular JS (Angular.JS) 鏄竴緇勭敤鏉ュ紑鍙慦eb欏甸潰鐨勬鏋躲佹ā鏉夸互鍙?qiáng)鏁版嵁缁戝畾鍜屼赴瀵孶I緇勪歡銆傚畠鏀寔鏁翠釜寮鍙戣繘紼嬶紝鎻愪緵web搴旂敤鐨勬灦鏋勶紝鏃犻渶榪涜鎵嬪伐DOM鎿嶄綔銆?AngularJS寰堝皬錛屽彧鏈?0K錛屽吋瀹逛富嫻佹祻瑙堝櫒錛屼笌 jQuery 閰嶅悎鑹ソ銆?/p>

鎺堟潈鍗忚錛歁IT
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/angular/angular.js

3.  Bootstrap

Bootstrap鏄揩閫熷紑鍙慦eb搴旂敤紼嬪簭鐨勫墠绔伐鍏峰寘銆傚畠鏄竴涓狢SS鍜孒TML鐨勯泦鍚堬紝瀹冧嬌鐢ㄤ簡(jiǎn)鏈鏂扮殑嫻忚鍣ㄦ妧鏈紝緇欎綘鐨刉eb寮鍙戞彁渚涗簡(jiǎn)鏃跺皻鐨勭増寮忥紝琛ㄥ崟錛宐uttons錛岃〃鏍鹼紝緗戞牸緋葷粺絳夌瓑銆?/p>

鎺堟潈鍗忚錛歁IT
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/twbs/bootstrap

4.  Dubbo

Dubbo 鏄樋閲屽反宸村叕鍙稿紑婧愮殑涓涓珮鎬ц兘浼樼鐨勬湇鍔℃鏋訛紝浣垮緱搴旂敤鍙氳繃楂樻ц兘鐨?RPC 瀹炵幇鏈嶅姟鐨勮緭鍑哄拰杈撳叆鍔熻兘錛屽彲浠ュ拰 Spring 妗嗘灦鏃犵紳闆嗘垚銆?/p>

鎺堟潈鍗忚錛欰pache
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/alibaba/dubbo

5.  Hadoop

Hadoop 鏄竴涓垎甯冨紡緋葷粺鍩虹鏋舵瀯錛岀敱Apache鍩洪噾浼?xì)寮鍙戙傜敤鎴峰彲浠ュ湪涓嶄簡(jiǎn)瑙e垎甯冨紡搴曞眰緇嗚妭鐨勬儏鍐典笅錛屽紑鍙戝垎甯冨紡紼嬪簭銆傚厖鍒嗗埄鐢ㄩ泦緹ょ殑濞佸姏楂橀熻繍綆楀拰瀛樺偍銆?/p>

鎺堟潈鍗忚錛欰pache
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://mirror.bit.edu.cn/apache/

6.  jQuery Mobile

jQuery Mobile錛坖QueryMobile錛?鏄?nbsp;jQuery 鍦ㄦ墜鏈轟笂鍜屽鉤鏉胯澶囦笂鐨勭増鏈俲Query Mobile 涓嶄粎浼?xì)缁欎咐L祦縐誨姩騫沖彴甯︽潵jQuery鏍稿績(jī)搴擄紝鑰屼笖浼?xì)鍙戝竷涓涓畬鏁寸粺涓鐨刯Query縐誨姩UI妗嗘灦銆傛敮鎸佸叏鐞冧富嫻佺殑縐誨姩騫沖彴銆?/p>

鎺堟潈鍗忚錛歁IT/GPL
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/jquery/jquery-mobile

7.  Nginx

Nginx錛堝彂闊沖悓 engine x錛夋槸涓嬈捐交閲忕駭鐨刉eb 鏈嶅姟鍣紡鍙嶅悜浠g悊鏈嶅姟鍣ㄥ強(qiáng)鐢?shù)瀛愰偖錃g錛圛MAP/POP3錛変唬鐞嗘湇鍔″櫒銆傚叾鐗圭偣鏄崰鏈夊唴瀛樺皯錛屽茍鍙戣兘鍔涘己錛屼簨瀹炰笂nginx鐨勫茍鍙戣兘鍔涚‘瀹炲湪鍚岀被鍨嬬殑緗戦〉浼烘湇鍣ㄤ腑琛ㄧ幇杈冨ソ銆?/p>

鎺堟潈鍗忚錛欱SD
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://nginx.org/en/download.html

8.  Qt

Qt 鏄竴涓法騫沖彴鐨凜++鍥懼艦鐢ㄦ埛鐣岄潰搴旂敤紼嬪簭妗嗘灦銆傚畠鎻愪緵緇欏簲鐢ㄧ▼搴忓紑鍙戣呭緩绔嬭壓鏈駭鐨勫浘褰㈢敤鎴風(fēng)晫闈㈡墍闇鐨勬墍鐢ㄥ姛鑳姐俀t鏄畬鍏ㄩ潰鍚戝璞$殑錛屽緢瀹規(guī)槗鎵╁睍錛屽茍涓斿厑璁哥湡姝e湴緇勪歡緙栫▼銆?/p>

鎺堟潈鍗忚錛欸PL/LGPL/QPL
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://www.qt.io/download-open-source/

9.  紱呴亾

紱呴亾鏄涓嬈懼浗浜х殑寮婧愰」鐩鐞嗚蔣浠訛紝濂圭殑鏍稿績(jī)綆$悊鎬濇兂鍩轟簬鏁忔嵎鏂規(guī)硶scrum錛屽唴緗簡(jiǎn)浜у搧綆$悊鍜岄」鐩鐞嗭紝鍚屾椂鍙堟牴鎹浗鍐呯爺鍙戠幇鐘惰ˉ鍏呬簡(jiǎn)嫻嬭瘯綆$悊銆佽鍒?綆$悊銆佸彂甯冪鐞嗐佹枃妗g鐞嗐佷簨鍔$鐞嗙瓑鍔熻兘錛屽湪涓涓蔣浠朵腑灝卞彲浠ュ皢杞歡鐮斿彂涓殑闇姹傘佷換鍔°乥ug銆佺敤渚嬨佽鍒掋佸彂甯冪瓑瑕佺礌鏈夊簭鐨勮窡韙鐞嗚搗鏉ワ紝瀹屾暣鍦拌 鐩栦簡(jiǎn)欏圭洰綆$悊鐨勬牳蹇?jī)娴伣E嬨?/p>

鎺堟潈鍗忚錛歀GPL
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://git.oschina.net/wwccss/zentaopms

10.  Redmine

Redmine 鏄竴涓紑婧愮殑銆佸熀浜嶹eb鐨勯」鐩鐞嗗拰緙洪櫡璺熻釜宸ュ叿銆傚畠鐢ㄦ棩鍘嗗拰鐢樼壒鍥捐緟鍔╅」鐩強(qiáng)榪涘害鍙鍖栨樉紺恒傚悓鏃跺畠鍙堟敮鎸佸欏圭洰綆$悊銆俁edmine鏄竴涓嚜鐢卞紑鏀?婧愮爜杞歡瑙e喅鏂規(guī)錛屽畠鎻愪緵闆嗘垚鐨勯」鐩鐞嗗姛鑳斤紝闂璺熻釜錛屽茍涓哄涓増鏈帶鍒墮夐」鐨勬敮鎸併?/p>

鎺堟潈鍗忚錛欸PL
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/redmine/redmine

11.  CKEditor

CKEditor 鏄柊涓浠g殑 FCKeditor錛屾槸涓涓噸鏂板紑鍙戠殑鐗堟湰銆侰KEditor鏄叏鐞冩渶浼樼鐨勭綉欏靛湪綰挎枃瀛楃紪杈戝櫒涔嬩竴錛屽洜鍏舵儕浜虹殑鎬ц兘涓庡彲鎵╁睍鎬ц屽箍娉涚殑琚繍鐢ㄤ簬鍚勫ぇ緗戠珯銆?/p>

鎺堟潈鍗忚錛欸PL/LGPL/MPL
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://ckeditor.com/download

12.  TeamTalk

TeamTalk 鏄敱铇戣弴琛楀紑鍙戠殑寮婧愬嵆鏃墮氳瑙e喅鏂規(guī)錛岄傜敤浜庝腑灝忓瀷浼佷笟錛屾彁渚涘彲闈犵殑娑堟伅浼犻掓満鍒訛紱鏀寔鏂囧瓧銆佸浘鐗囥佽闊崇瓑瀵屾枃鏈俊鎭紱鏂囦歡鏀跺彂絳夈?/p>

鎺堟潈鍗忚錛欰pache
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/mogutt

13.  Afinal

Afinal 鏄竴涓?Android 鐨?Sqlite ORM 鍜?IOC 妗嗘灦銆傚悓鏃跺皝瑁呬簡(jiǎn)Android 涓殑 HTTP 妗嗘灦錛屼嬌鍏舵洿鍔犵畝鍗曟槗鐢ㄣ侫final 鐨勫畻鏃ㄦ槸綆媧侊紝蹇熴傜害瀹氬ぇ浜庨厤緗殑鏂瑰紡銆傚敖閲忎竴琛屼唬鐮佸畬鎴愭墍鏈変簨鎯呫?/p>

鎺堟潈鍗忚錛欰pache
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://git.oschina.net/fuhai/afinal

14.  ECharts

ECharts 寮婧愭潵鑷櫨搴﹀晢涓氬墠绔暟鎹彲瑙嗗寲鍥㈤槦錛屽熀浜巋tml5 Canvas錛屾槸涓涓函Javascript鍥捐〃搴擄紝鎻愪緵鐩磋錛岀敓鍔紝鍙氦浜掞紝鍙釜鎬у寲瀹氬埗鐨勬暟鎹彲瑙嗗寲鍥捐〃銆傚垱鏂扮殑鎷栨嫿閲嶈綆椼佹暟鎹鍥俱佸煎煙婕父絳夌壒 鎬уぇ澶у寮轟簡(jiǎn)鐢ㄦ埛浣撻獙錛岃祴浜堜簡(jiǎn)鐢ㄦ埛瀵規(guī)暟鎹繘琛屾寲鎺樸佹暣鍚堢殑鑳藉姏銆?/p>

鎺堟潈鍗忚錛欱SD
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/ecomfe/echarts

15.  Semantic UI

Semantic UI — 瀹屽叏璇箟鍖栫殑鍓嶇鐣岄潰寮鍙戞鏋訛紝璺?nbsp; Bootstrap 鍜?nbsp; Foundation 姣旇搗鏉ワ紝榪樻槸鏈変簺涓嶅悓鐨勶紝鍦ㄥ姛鑳界壒鎬т笂銆佸竷灞璁捐涓娿佺敤鎴蜂綋楠屼笂鍧囧瓨鍦ㄥ緢澶氬樊寮傘?/p>

鎺堟潈鍗忚錛歁IT
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/Semantic-Org/Semantic-UI

16.  SWFUpload

SWFUpload 鏄竴涓鎴風(fēng)鏂囦歡涓婁紶宸ュ叿錛屾渶鍒濈敱Vinterwebb.se寮鍙戯紝瀹冮氳繃鏁村悎F(tuán)lash涓嶫avaScript鎶鏈負(fù)WEB寮鍙戣呮彁渚涗簡(jiǎn)涓涓叿鏈変赴瀵屽姛鑳界戶鑰岃秴瓚婁紶緇?<input type="file"/> 鏍囩鐨勬枃浠朵笂浼犳ā寮忋?/p>

鎺堟潈鍗忚錛歁IT
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/WordPress/secure-swfupload

17.  GoAgent

GoAgent 鏄竴涓嬌鐢≒ython鍜孏oogle Appengine SDK緙栧啓鐨勪唬鐞嗚蔣浠訛紝goagent鐨勫垵琛鋒槸寮ヨˉgappproxy鐨勪笉瓚熾?/p>

鎺堟潈鍗忚錛欸PL
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://git.oschina.net/goagent/goagent

18.  Android Studio

Android Studio 鏄竴涓叏鏂扮殑 Android 寮鍙戠幆澧冿紝鍩轟簬 IntelliJ IDEA. 綾諱技 Eclipse ADT錛孉ndroid Studio 鎻愪緵浜?jiǎn)闆嗘垚鐨?Android 寮鍙戝伐鍏風(fēng)敤浜庡紑鍙戝拰璋冭瘯銆?/p>

鎺堟潈鍗忚錛欰pache
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://developer.android.com/sdk/index.html

19.  Druid

Druid 鏄竴涓狫DBC緇勪歡錛屽畠鍖呮嫭涓夐儴鍒嗭細(xì)DruidDriver 浠g悊Driver錛岃兘澶熸彁渚涘熀浜嶧ilter錛岰hain妯″紡鐨勬彃浠朵綋緋伙紱DruidDataSource 楂樻晥鍙鐞嗙殑鏁版嵁搴撹繛鎺ユ睜錛汼QLParser銆?br />

鎺堟潈鍗忚錛欰pache
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://git.oschina.net/wenshao/druid

20.  Nagios

Nagios鏄竴涓洃瑙嗙郴緇熻繍琛岀姸鎬佸拰緗戠粶淇℃伅鐨勭洃瑙嗙郴緇熴侼agios鑳界洃瑙嗘墍鎸囧畾鐨勬湰鍦版垨榪滅▼涓繪満浠ュ強(qiáng)鏈嶅姟錛屽悓鏃舵彁渚涘紓甯擱氱煡鍔熻兘絳夈?/p>

鎺堟潈鍗忚錛欸PL
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://www.nagios.org/download/

21.  Amaze UI

Amaze UI 鏄腑鍥介涓紑婧?HTML5 璺ㄥ睆鍓嶇妗嗘灦銆侫maze UI 鏄竴涓交閲忕駭銆丮obile first鐨勫墠绔鏋訛紝 鍩轟簬寮婧愮ぞ鍖烘祦琛屽墠绔鏋剁紪鍐欍?/p>

鎺堟潈鍗忚錛歁IT
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://git.oschina.net/amazeui/amazeui

22.  Docker

Docker 鏄竴涓紑婧愮殑搴旂敤瀹瑰櫒寮曟搸錛岃寮鍙戣呭彲浠ユ墦鍖呬粬浠殑搴旂敤浠ュ強(qiáng)渚濊禆鍖呭埌涓涓彲縐繪鐨勫鍣ㄤ腑錛岀劧鍚庡彂甯冨埌浠諱綍嫻佽鐨?Linux 鏈哄櫒涓婏紝涔熷彲浠ュ疄鐜拌櫄鎷熷寲銆?/p>

鎺堟潈鍗忚錛欰pache
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/docker/docker

23.  fastjson

fastjson 鏄竴涓ц兘寰堝ソ鐨?Java 璇█瀹炵幇鐨?JSON 瑙f瀽鍣ㄥ拰鐢熸垚鍣紝鏉ヨ嚜闃塊噷宸村反鐨勫伐紼嬪笀寮鍙戙?/p>

鎺堟潈鍗忚錛欰pache
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://git.oschina.net/wenshao/fastjson

24. CrossApp

CrossApp鏄竴嬈懼畬鍏ㄥ紑婧愩佸厤璐廣佽法騫沖彴鐨勭Щ鍔ㄥ簲鐢ㄥ紑鍙戝紩鎿?銆侰rossApp 閲囩敤 C++ 寮鍙戯紙鍗沖皢鏀寔 JS 鍜?Lua 緙栧啓錛夛紝鍙洿鎺ュ鍑?iOS 鍜?Android 鍘熺敓搴旂敤錛屾嫢鏈夐珮鎬ц兘錛屽鎺т歡錛屽紑鍙戦熷害蹇殑浼樺娍銆?/p>

鎺堟潈鍗忚錛歁IT
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://git.oschina.net/9miao/CrossApp

25. Sonar

Sonar (SonarQube)鏄竴涓紑婧愬鉤鍙幫紝鐢ㄤ簬綆$悊婧愪唬鐮佺殑璐ㄩ噺銆係onar 涓嶅彧鏄竴涓川閲忔暟鎹姤鍛婂伐鍏鳳紝鏇存槸浠g爜璐ㄩ噺綆$悊騫沖彴銆傛敮鎸佺殑璇█鍖呮嫭錛欽ava銆丳HP銆丆#銆丆銆丆obol銆丳L/SQL銆丗lex 絳夈?/p>

鎺堟潈鍗忚錛歀GPL
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/SonarSource/sonarqube

26. xUtils

xUtils 鏈鍒濇簮浜?nbsp; Afinal 妗嗘灦錛岃繘琛屼簡(jiǎn)澶ч噺閲嶆瀯錛屼嬌寰?xUtils 鏀寔澶ф枃浠朵笂浼狅紝鏇村叏闈㈢殑 http 璇鋒眰鍗忚鏀寔(10 縐嶈皳璇?錛屾嫢鏈夋洿鍔犵伒媧葷殑 ORM錛屾洿澶氱殑浜嬩歡娉ㄨВ鏀寔涓斾笉鍙楁販娣嗗獎(jiǎng)鍝?..

鎺堟潈鍗忚錛欰pache
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/wyouflf/xUtils

27. TeamLab

TeamLab 鏄竴涓厤璐瑰紑婧愮殑鍟嗕笟鍗忎綔鍜岄」鐩鐞嗙殑騫沖彴銆俆eamLab 涓昏鍔熻兘鍖呮嫭錛氶」鐩鐞嗐侀噷紼嬬綆$悊銆佷換鍔°佹姤琛ㄣ佷簨浠躲佸崥瀹€佽鍧涖佷功絳俱乄iki銆佸嵆鏃舵秷鎭瓑絳夈?/p>

鎺堟潈鍗忚錛欰GPL
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://sourceforge.net/projects/teamlab/files/

28. memcached

memcached 鏄?涓濂楀垎甯冨紡鐨勫揩鍙栫郴緇燂紝褰撳垵鏄疍anga Interactive涓轟簡(jiǎn)LiveJournal鎵鍙戝睍鐨勶紝浣嗙洰鍓嶈璁稿杞歡錛堝MediaWiki錛夋墍浣跨敤銆俶emcached鍏鋒湁澶氱璇█鐨勫鎴風(fēng) 寮鍙戝寘錛屽寘鎷細(xì)Perl/PHP/JAVA/C/Python/Ruby/C#/MySQL/銆?/p>

鎺堟潈鍗忚錛欱SD
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://code.google.com/p/memcached/downloads/list

29. Magnolia

Magnolia CMS 鏄竴瀹剁憺澹叕鍙歌嚜 2003 騫磋搗鍙戝竷鐨勪竴涓熀浜?nbsp;Java 鐨勫紑婧愬唴瀹圭鐞嗙郴緇熴傚畠閫傚悎涓斿凡琚嬌鐢ㄥ湪浠ヤ笅棰嗗煙錛?/span>鐢?shù)瀛愬晢鍔?/span>銆侀摱琛?/span>銆佸獟浣撳ū涔?/span>銆?span style="font-size: 10pt; line-height: 1.5;">鏀垮簻銆佹梾娓搞佽埅絀鴻埅澶?/span>銆佸伐涓氬埗閫犮?/span>鏁欒偛鍜屼繚闄?/span>銆?/span>

鎺堟潈鍗忚錛欸PL
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://git.magnolia-cms.com/gitweb/

30. Django

Django 欏圭洰鏄竴涓畾鍒?Python WEB 妗嗘灦錛屽畠婧愯嚜涓涓湪綰挎柊闂?Web 绔欑偣錛屼簬 2005 騫翠互寮婧愮殑褰㈠紡琚噴鏀懼嚭鏉ャ?/p>

鎺堟潈鍗忚錛欱SD
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://www.djangoproject.com/download/

31. zabbix

zabbix鏄竴涓熀浜嶹EB鐣岄潰鐨勬彁渚涘垎甯冨紡緋葷粺鐩戣浠ュ強(qiáng)緗戠粶鐩戣鍔熻兘鐨勪紒涓氱駭鐨勫紑婧愯В鍐蟲柟妗堛倆abbix鑳界洃瑙嗗悇縐嶇綉緇滃弬鏁幫紝淇濊瘉鏈嶅姟鍣ㄧ郴緇熺殑瀹夊叏榪愯惀錛涘茍鎻愪緵鏌旇蔣鐨勯氱煡鏈哄埗浠ヨ緋葷粺綆$悊鍛樺揩閫熷畾浣?瑙e喅瀛樺湪鐨勫悇縐嶉棶棰樸?/p>

鎺堟潈鍗忚錛欸PL
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://www.zabbix.com/download.php

32. Kettle

Kettle鏄竴嬈懼浗澶栧紑婧愮殑etl宸ュ叿錛岀函java緙栧啓錛岀豢鑹叉棤闇瀹夎錛屾暟鎹娊鍙栭珮鏁堢ǔ瀹?鏁版嵁榪佺Щ宸ュ叿)銆侹ettle涓湁涓ょ鑴氭湰鏂囦歡錛宼ransformation鍜宩ob錛宼ransformation瀹屾垚閽堝鏁版嵁鐨勫熀紜杞崲錛宩ob鍒欏畬鎴愭暣涓伐浣滄祦鐨勬帶鍒躲?/p>

鎺堟潈鍗忚錛歀GPL
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://sourceforge.net/projects/pentaho/files/Data%20Integration/

33. Node.js

Node.js 鏄竴濂楃敤鏉ョ紪鍐欓珮鎬ц兘緗戠粶鏈嶅姟鍣ㄧ殑 JavaScript 宸ュ叿鍖咃紝涓緋誨垪鐨勫彉鍖栫敱姝ゅ紑濮嬨傛瘮杈冪嫭鐗圭殑鏄紝Node.js 浼?xì)鍋囪浣犳槸鍦?POSIX 鐜涓嬭繍琛屽畠 Linux 鎴?Mac OS X銆?/p>

鎺堟潈鍗忚錛歁IT
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://nodejs.org/download/

34. MyBatis

MyBatis 鐨勫墠韜氨鏄?nbsp;iBatis 銆傛槸涓涓暟鎹寔涔呭眰(ORM)妗嗘灦銆傚湪綰縅avadoc錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://tool.oschina.net/apidocs/apidoc?api=mybatis-3.1.1

鎺堟潈鍗忚錛欰pache
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/mybatis/mybatis-3

35. TortoiseGit

TortoiseGit (嫻烽緹Git)鏄?a rel="nofollow" target="_blank" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">TortoiseSVN鐨?a rel="nofollow" target="_blank" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">Git鐗堟湰錛宼ortoisegit鐢ㄤ簬榪佺ЩTortoiseSVN鍒癟ortoiseGit錛屼竴鐩翠互鏉it鍦╓indows騫沖彴娌℃湁濂界敤GUI瀹㈡埛绔紝鐜板湪tortoisegit鐨勫嚭鐜扮粰Windows寮鍙戣呭甫鏉ョ闊熾?/p>

鎺堟潈鍗忚錛欸PL
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://code.google.com/p/tortoisegit/

36. Openfire

Openfire 鏄疄鏃剁殑鍩轟簬WEB鐨勫嵆鏃舵秷鎭紶杈撳鉤鍙幫紝鏄師鏉ョ殑Jive Messenger銆?/p>

鎺堟潈鍗忚錛欰pache
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://www.igniterealtime.org/downloads/index.jsp

37. ZUI

zui 鏄閬撻」鐩鐞嗚蔣浠跺洟闃熷湪瀹屽杽鑷繁浜у搧榪囩▼涓艦鎴愮殑涓涓紑婧愬墠绔疄璺墊柟妗堬紝甯姪浣犲揩閫熸瀯鐜頒唬璺ㄥ睆搴旂敤銆傜畝鍗曠編瑙傦紝鏄撲簬浣跨敤錛屽揩閫熸瀯寤虹畝媧佸ぇ鏂圭殑鐜頒唬web搴旂敤銆?/p>

鎺堟潈鍗忚錛歁IT
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://git.oschina.net/wwccss/zui

38. Cocos2d-x

Cocos2D-X 鏄叏鐞冪煡鍚嶇殑寮婧愯法騫沖彴娓告垙寮曟搸錛屾槗瀛︽槗鐢紝鐩墠宸茬粡鏀寔iOS銆丄ndroid銆乄indows妗岄潰銆丮ac OSX銆丩inux銆丅lackBerry銆乄indows Phone絳夊鉤鍙般侰ocos2d-JS緇熶竴浜?jiǎn)鋴社敤JS榪涜寮鍙戠殑寮鍙戜綋楠岋紝灝咹TML5寮曟搸涓嶫SB鐨凙PI楂樺害緇熶竴璧鋒潵銆?/span>

鎺堟潈鍗忚錛歁IT
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://www.cocos2d-x.org/download?project_id=cocos2d-x

39. D3.js

D3 鏄渶嫻佽鐨勫彲瑙嗗寲搴撲箣涓錛屽畠琚緢澶氬叾浠栫殑琛ㄦ牸鎻掍歡鎵浣跨敤銆傚畠鍏佽緇戝畾浠繪剰鏁版嵁鍒癉OM錛岀劧鍚庡皢鏁版嵁椹卞姩杞崲搴旂敤鍒癉ocument涓備綘鍙互浣跨敤瀹冪敤涓涓暟緇勫垱寤哄熀鏈殑HTML琛ㄦ牸錛屾垨鏄埄鐢ㄥ畠鐨勬祦浣撹繃搴﹀拰浜や簰錛岀敤鐩鎬技鐨勬暟鎹垱寤烘儕浜虹殑SVG鏉″艦鍥俱?/p>

鎺堟潈鍗忚錛歁IT
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/mbostock/d3

40. Twitter Storm

Twitter Storm 鏄竴涓垎甯冨紡鐨勩佸閿欑殑瀹炴椂璁$畻緋葷粺銆係torm 涓哄垎甯冨紡瀹炴椂璁$畻鎻愪緵浜?jiǎn)涓緇勯氱敤鍘熻錛屽彲琚敤浜?#8220;嫻佸鐞?#8221;涔嬩腑錛屽疄鏃跺鐞嗘秷鎭茍鏇存柊鏁版嵁搴撱傝繖鏄鐞嗛槦鍒楀強(qiáng)宸ヤ綔鑰呴泦緹ょ殑鍙︿竴縐嶆柟寮忋?/p>

鎺堟潈鍗忚錛欵PL
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/nathanmarz/storm

41. Redis

Redis 鏄竴涓珮鎬ц兘鐨刱ey-value鏁版嵁搴撱?redis鐨勫嚭鐜幫紝寰堝ぇ紼嬪害琛ュ伩浜?a rel="nofollow" target="_blank" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">memcached榪欑被keyvalue瀛樺偍鐨勪笉瓚籌紝鍦ㄩ儴 鍒嗗満鍚堝彲浠ュ鍏崇郴鏁版嵁搴撹搗鍒板緢濂界殑琛ュ厖浣滅敤銆傚畠鎻愪緵浜?jiǎn)Python錛孯uby錛孍rlang錛孭HP瀹㈡埛绔紝浣跨敤寰堟柟渚褲?/p>

鎺堟潈鍗忚錛欱SD
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/antirez/redis

42. Nutch

Nutch 鏄竴涓紑婧怞ava 瀹炵幇鐨勬悳绱㈠紩鎿庛傚畠鎻愪緵浜?jiǎn)鎴戜滑杩愯鑷忿q殑鎼滅儲(chǔ)寮曟搸鎵闇鐨勫叏閮ㄥ伐鍏楓傚寘鎷叏鏂囨悳绱㈠拰W(xué)eb鐖櫕銆?/p>

鎺堟潈鍗忚錛欰pache
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://www.apache.org/dyn/closer.cgi/nutch/

43. PhoneGap

PhoneGap 鏄竴嬈?HTML5 騫沖彴錛岄氳繃瀹冿紝寮鍙戝晢鍙互浣跨敤 HTML銆丆SS 鍙?JavaScript 鏉ュ紑鍙戞湰鍦扮Щ鍔ㄥ簲鐢ㄧ▼搴忋傚洜姝わ紝鐩墠寮鍙戝晢鍙互鍙紪鍐欎竴嬈″簲鐢ㄧ▼搴忥紝鐒跺悗鍦?7 涓富瑕佺殑縐誨姩騫沖彴鍜屽簲鐢ㄧ▼搴忓晢搴?(App Store) 閲岃繘琛屽彂甯冦?/p>

鎺堟潈鍗忚錛欰pache
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/phonegap/phonegap

44. Mono

Mono 鏄竴涓敱 Novell 鍏徃涓繪寔鐨勯」鐩傝欏圭洰鐨勭洰鏍囨槸鍒涘緩涓緋誨垪絎﹀悎ECMA 鏍囧噯錛圗cma-334 鍜孍cma-335錛夌殑.NET 宸ュ叿錛屽寘鎷珻# 緙栬瘧鍣ㄥ拰鍏遍氳璦鎵ц騫沖彴銆備笌寰蔣鐨?NET Framework 涓嶅悓錛孧ono 欏圭洰涓嶄粎鍙互榪愯浜嶹indows 緋葷粺涓婏紝榪樺彲浠ヨ繍琛屼簬Linux錛孎reeBSD錛孶nix錛孧ac OS X 鍜孲olaris銆?/p>

鎺堟潈鍗忚錛欸PL/LGPL/MIT
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://www.mono-project.com/

45. Seafile

Seafile 鏄柊涓浠g殑寮婧愪簯瀛樺偍杞歡銆傚畠鎻愪緵鏇翠赴瀵岀殑鏂囦歡鍚屾鍜岀鐞嗗姛鑳斤紝浠ュ強(qiáng)鏇村ソ鐨勬暟鎹殣縐佷繚鎶ゅ拰緹ょ粍鍗忎綔鍔熻兘銆係eafile 鏀寔 Mac銆丩inux銆乄indows 涓変釜妗岄潰騫沖彴錛屾敮鎸?Android 鍜?iOS 涓や釜縐誨姩騫沖彴銆?/p>

鎺堟潈鍗忚錛欸PL
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://git.oschina.net/lins05/seafile

46. ElasticSearch

Elastic Search 鏄竴涓熀浜?a rel="nofollow" target="_blank" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">Lucene鏋勫緩鐨勫紑婧愶紝鍒嗗竷寮忥紝RESTful鎼滅儲(chǔ)寮曟搸銆傝璁$敤浜庝簯璁$畻涓紝鑳藉杈懼埌瀹炴椂鎼滅儲(chǔ)錛岀ǔ瀹氾紝鍙潬錛屽揩閫燂紝瀹夎浣跨敤鏂逛究銆傛敮鎸侀氳繃HTTP浣跨敤JSON榪涜鏁版嵁绱㈠紩銆?/p>

鎺堟潈鍗忚錛欰pache
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/elasticsearch/elasticsearch

47. Tor

Tor 鏄竴涓府鍔╀綘鎶靛盡嫻侀噺鍒嗘瀽鐨勮蔣浠墮」鐩紝 嫻侀噺鍒嗘瀽鏄竴縐嶅緗戠粶鐨勭洃瑙嗚涓恒俆or 灝嗕綘鐨勯氫俊閫氳繃涓涓敱閬嶅強(qiáng)鍏ㄧ悆鐨勫織鎰胯呰繍琛岀殑涓戶錛坮elay錛夋墍緇勬垚鐨勫垎甯冨紡緗戠粶杞彂錛?浠ユ鏉ヤ繚鎶や綘鐨勫畨鍏細(xì)瀹冧護(hù)鐩戣浣犵殑 Internet 榪炴帴鐨勯偅浜涗漢鏃犳硶鐭ラ亾浣犳墍璁塊棶鐨勭珯鐐癸紝 瀹冭繕浠や綘鎵璁塊棶鐨勭珯鐐規(guī)棤娉曠煡閬撲綘鐨勭墿鐞嗕綅緗?/p>

鎺堟潈鍗忚錛欱SD
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://www.torproject.org/

48. Cacti

Cacti 鏄竴濂楀熀浜嶱HP,MySQL,SNMP鍙?qiáng)RRDTool寮鍙戠殑緗戠粶嫻侀噺鐩戞祴鍥懼艦鍒嗘瀽宸ュ叿銆傚畠閫氳繃snmpget鏉ヨ幏鍙栨暟鎹紝浣跨敤 RRDtool緇樼敾鍥懼艦錛岃屼笖浣犲畬鍏ㄥ彲浠ヤ笉闇瑕佷簡(jiǎn)瑙RDtool澶嶆潅鐨勫弬鏁般?/p>

鎺堟潈鍗忚錛欸PL
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://www.cacti.net/

49. GitLab

GitLab鏄竴涓埄鐢?nbsp;Ruby on Rails 寮鍙戠殑寮婧愬簲鐢ㄧ▼搴忥紝瀹炵幇涓涓嚜鎵樼鐨?a rel="nofollow" target="_blank" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">Git欏圭洰浠撳簱錛屽彲閫氳繃Web鐣岄潰榪涜璁塊棶鍏紑鐨勬垨鑰呯浜洪」鐩傚畠鎷ユ湁涓?a rel="nofollow" target="_blank" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">Github綾諱技鐨勫姛鑳斤紝鑳藉嫻忚婧愪唬鐮侊紝綆$悊緙洪櫡鍜屾敞閲娿?/p>

鎺堟潈鍗忚錛歁IT
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">https://github.com/gitlabhq/gitlabhq

50. Notepad++

Notepad++ 鏄竴嬈鵑潪甯告湁鐗硅壊鐨勭紪杈戝櫒錛屾槸寮婧愯蔣浠訛紝鍙互鍏嶈垂浣跨敤銆傛敮鎸佺殑璇█: C, C++ , Java , C#, XML, HTML, PHP, Javascript錛?/p>

鎺堟潈鍗忚錛欸PL
婧愮爜涓嬭澆錛?a target="_blank" rel="nofollow" bluelink"="" tabindex="-1" style="border: 0px none; outline: none; color: #296bcc;">http://notepad-plus-plus.org/



paulwong 2015-01-07 00:08 鍙戣〃璇勮
]]>
瑙e帇ZIP鏂囦歡http://www.tkk7.com/paulwong/archive/2014/10/29/419179.htmlpaulwongpaulwongWed, 29 Oct 2014 09:34:00 GMThttp://www.tkk7.com/paulwong/archive/2014/10/29/419179.htmlhttp://www.tkk7.com/paulwong/comments/419179.htmlhttp://www.tkk7.com/paulwong/archive/2014/10/29/419179.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/419179.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/419179.html
<dependency>
    <groupId>commons-io</groupId>
    <artifactId>commons-io</artifactId>
</dependency>

ZipUtil.java
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.charset.Charset;
import java.util.UUID;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;

import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ZipUtil {
    
    private static Logger logger = LoggerFactory.getLogger(ZipUtil.class);
    
    public static void extractFolder(InputStream inputStream, String outputFolder) throws IOException 
    {
        ZipInputStream zis = null;
        try {

            Charset GBK = Charset.forName("GBK");
            zis = new ZipInputStream(inputStream, GBK);
            ZipEntry entry;

            while ((entry = zis.getNextEntry()) != null) {

                // Create a file on HDD in the destinationPath directory
                
// destinationPath is a "root" folder, where you want to extract your ZIP file
                String encoding = System.getProperty("file.encoding");
                logger.info("encoding:"+encoding); 
                
                String fileName = new String(entry.getName().getBytes("GBK"), encoding);
                File entryFile = new File(outputFolder, fileName);
//                File entryFile = new File(outputFolder, entry.getName());
                if (entry.isDirectory()) {

                    if (entryFile.exists()) {
                        logger.warn("Directory {0} already exists!", entryFile);
                    } else {
                        entryFile.mkdirs();
                    }

                } else {

                    // Make sure all folders exists (they should, but the safer, the better ;-))
                    if (entryFile.getParentFile() != null && !entryFile.getParentFile().exists()) {
                        entryFile.getParentFile().mkdirs();
                    }

                    // Create file on disk
                    if (!entryFile.exists()) {
                        entryFile.createNewFile();
                    }

                    // and rewrite data from stream
                    OutputStream os = null;
                    try {
                        os = new FileOutputStream(entryFile);
                        IOUtils.copy(zis, os);
                    } finally {
//                        os.close();
                        IOUtils.closeQuietly(os);
                        zis.closeEntry();
                    }
                }
            }
        } finally {
            IOUtils.closeQuietly(zis);
        }
    }
    
    public static void main(String [] args) throws IOException
    {
        final String INPUT_ZIP_FILE = "D:TESTING-FILE/ZIP/INPUT/搴旂敤.zip";
        String OUTPUT_FOLDER = "D:/TESTING-FILE/ZIP/OUTPUT";
        
        OUTPUT_FOLDER += File.separator + UUID.randomUUID().toString();
        
        InputStream inputStream = new FileInputStream(new File(INPUT_ZIP_FILE));
        
        extractFolder(inputStream, OUTPUT_FOLDER);
        
        /*File file = new File(OUTPUT_FOLDER);
        FileUtil.deleteFolder(file);
*/
    }

}



paulwong 2014-10-29 17:34 鍙戣〃璇勮
]]>
EXCEL杞琂AVA BEANhttp://www.tkk7.com/paulwong/archive/2014/10/29/419178.htmlpaulwongpaulwongWed, 29 Oct 2014 09:25:00 GMThttp://www.tkk7.com/paulwong/archive/2014/10/29/419178.htmlhttp://www.tkk7.com/paulwong/comments/419178.htmlhttp://www.tkk7.com/paulwong/archive/2014/10/29/419178.html#Feedback0http://www.tkk7.com/paulwong/comments/commentRss/419178.htmlhttp://www.tkk7.com/paulwong/services/trackbacks/419178.html
        <dependency>
            <groupId>net.sf.jxls</groupId>
            <artifactId>jxls-core</artifactId>
        </dependency>
        <dependency>
            <groupId>net.sf.jxls</groupId>
            <artifactId>jxls-reader</artifactId>
        </dependency>
        <dependency>
            <groupId>net.sf.jxls</groupId>
            <artifactId>jxls-examples</artifactId>
        </dependency>


杞崲鐨勯厤緗枃浠訛細(xì)
<workbook>
  <worksheet name="Sheet1">
    <section startRow="0" endRow="0" />
    <loop startRow="1" endRow="1" items="result" var="app" varType="n.app.valueobject.App">
      <section startRow="1" endRow="1">
        <mapping row="1" col="0">app.title</mapping>
        <mapping row="1" col="1">app.categoryId</mapping>
        <mapping row="1" col="2">app.updateContent</mapping>
        <mapping row="1" col="3">app.rank</mapping>
        <mapping row="1" col="4">app.installedQty</mapping>
        <mapping row="1" col="5">app.installedType</mapping>
        <mapping row="1" col="6">app.discuss</mapping>
        <mapping row="1" col="7">app.summary</mapping>
        <mapping row="1" col="8">app.deviceTypes</mapping>
        <mapping row="1" col="9">app.description</mapping>
        <mapping row="1" col="10">app.newFeatures</mapping>
        <mapping row="1" col="11">app.shortRecommend</mapping>
        <mapping row="1" col="12">app.appUrl</mapping>
      </section>
      <loopbreakcondition>
        <rowcheck offset="0">
          <cellcheck offset="0" />
        </rowcheck>
      </loopbreakcondition>
    </loop>
  </worksheet>
</workbook>



JAVA浠g爜錛?br />
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import net.sf.jxls.reader.ReaderBuilder;
import net.sf.jxls.reader.XLSReader;

import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xml.sax.SAXException;

import application.app.valueobject.App;

public class ExcelUtil<T> {
    
    private static Logger logger = LoggerFactory.getLogger(ExcelUtil.class);
    
    public List<T> parseExcelFileToBeans(InputStream xlsFileInputStream, InputStream jxlsConfigInputStream) throws IOException, SAXException, InvalidFormatException  {
        
        
        List<T> result = new ArrayList<T>();
        Map<String, Object> beans = new HashMap<String, Object>();
        beans.put("result", result);
        InputStream inputStream = null;
        try {
            XLSReader xlsReader = ReaderBuilder.buildFromXML(jxlsConfigInputStream);
            inputStream = new BufferedInputStream(xlsFileInputStream);
            xlsReader.read(inputStream, beans);
        } catch (IOException e) {
            logger.error(e.getMessage(), e);
            throw e;
        } catch (SAXException e) {
            logger.error(e.getMessage(), e);
            throw e;
        } catch (InvalidFormatException e) {
            logger.error(e.getMessage(), e);
            throw e;
        } finally {
            if (inputStream != null) {
                try {
                    inputStream.close();
                } catch (Exception e) {
                }
            }
        }
        return result;
    }
    
    public static void main(String[] args) throws Exception {
        
        String path = "D:/DATA/TESTING-FILE/EXCEL";
        
        path = System.getProperty("user.home");
        
        ExcelUtil<App> util = new ExcelUtil<App>();
        String excelFilePath = path + File.separator + "appData.xls";
        
        InputStream configInputStream = 
                ExcelUtil.class.getResourceAsStream("/excel/template/config/app_config.xml");
        InputStream xlsFileInputStream = new FileInputStream(excelFilePath);
        
        List<App> appList = util.parseExcelFileToBeans(xlsFileInputStream, configInputStream);

        for (App app : appList) {
            System.out.println(app.toString());
        }
        
        /*String [] args2 = {""};
        GroupingSample.main(args2);
*/

    }

}


http://www.yihaomen.com/article/java/530.htm

paulwong 2014-10-29 17:25 鍙戣〃璇勮
]]>
JAVA綰跨▼姹犱緥瀛?/title><link>http://www.tkk7.com/paulwong/archive/2014/09/09/417757.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Mon, 08 Sep 2014 23:31:00 GMT</pubDate><guid>http://www.tkk7.com/paulwong/archive/2014/09/09/417757.html</guid><wfw:comment>http://www.tkk7.com/paulwong/comments/417757.html</wfw:comment><comments>http://www.tkk7.com/paulwong/archive/2014/09/09/417757.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/paulwong/comments/commentRss/417757.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/paulwong/services/trackbacks/417757.html</trackback:ping><description><![CDATA[     鎽樿: 鐢ㄩ斿強(qiáng)鐢ㄦ硶       緗戠粶璇鋒眰閫氬父鏈変袱縐嶅艦寮忥細(xì)絎竴縐嶏紝璇鋒眰涓嶆槸寰堥綣侊紝鑰屼笖姣忔榪炴帴鍚庝細(xì)淇濇寔鐩稿綋涓孌墊椂闂存潵璇繪暟鎹垨鑰呭啓鏁版嵁錛屾渶鍚庢柇寮錛屽鏂囦歡涓嬭澆錛岀綉緇滄祦濯掍綋絳夈傚彟涓縐嶅艦寮忔槸璇鋒眰棰戠箒錛屼絾鏄繛鎺ヤ笂浠ュ悗璇?鍐欏緢灝戦噺鐨勬暟鎹氨鏂紑榪炴帴銆傝冭檻鍒版湇鍔$殑騫跺彂闂錛屽鏋滄瘡涓姹傛潵鍒頒互鍚庢湇鍔¢兘涓哄畠鍚姩涓涓嚎紼嬶紝閭d箞榪欏鏈嶅姟鐨勮祫婧愬彲鑳戒細(xì)閫犳垚寰堝ぇ鐨勬氮璐癸紝鐗瑰埆鏄浜岀鎯呭喌銆傚洜涓洪氬父鎯?..  <a href='http://www.tkk7.com/paulwong/archive/2014/09/09/417757.html'>闃呰鍏ㄦ枃</a><img src ="http://www.tkk7.com/paulwong/aggbug/417757.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/paulwong/" target="_blank">paulwong</a> 2014-09-09 07:31 <a href="http://www.tkk7.com/paulwong/archive/2014/09/09/417757.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://sztsa.com" target="_blank">久操视频免费观看</a>| <a href="http://youkabaitiao.com" target="_blank">久久精品国产亚洲av麻</a>| <a href="http://chch12.com" target="_blank">精品成人一区二区三区免费视频</a>| <a href="http://blcvs.com" target="_blank">成年女人免费视频播放77777</a>| <a href="http://mm9d.com" target="_blank">亚洲伦理中文字幕</a>| <a href="http://gw311.com" target="_blank">美女被免费喷白浆视频</a>| <a href="http://zhaoav7.com" target="_blank">亚洲13又紧又嫩又水多</a>| <a href="http://goeqq.com" target="_blank">24小时日本在线www免费的</a>| <a href="http://1444000.com" target="_blank">在线aⅴ亚洲中文字幕</a>| <a href="http://jte-sh.com" target="_blank">日韩高清免费在线观看</a>| <a href="http://chuadang.com" target="_blank">国产精品亚洲专区无码唯爱网</a>| <a href="http://1314a.com" target="_blank">国产国产人免费视频成69大陆 </a>| <a href="http://fennenll.com" target="_blank">亚洲人成网国产最新在线</a>| <a href="http://bjhuicui.com" target="_blank">免费看韩国黄a片在线观看</a>| <a href="http://xuanboart.com" target="_blank">亚洲天然素人无码专区</a>| <a href="http://chaoxung.com" target="_blank">免费看香港一级毛片</a>| <a href="http://wushicn.com" target="_blank">色偷偷亚洲男人天堂</a>| <a href="http://mychjp.com" target="_blank">亚洲成a人在线看天堂无码</a>| <a href="http://www-741.com" target="_blank">一个人免费观看www视频</a>| <a href="http://kelingdq.com" target="_blank">亚洲色精品88色婷婷七月丁香</a>| <a href="http://0453wcbyy.com" target="_blank">好久久免费视频高清</a>| <a href="http://apguangyu.com" target="_blank">2022年亚洲午夜一区二区福利 </a>| <a href="http://simupiao.com" target="_blank">亚洲黄色三级网站</a>| <a href="http://ajguild.com" target="_blank">无码国产精品一区二区免费式直播 </a>| <a href="http://jj5c.com" target="_blank">成人性生交大片免费看无遮挡 </a>| <a href="http://www132126.com" target="_blank">亚洲中文无码mv</a>| <a href="http://6668889.com" target="_blank">国产又大又长又粗又硬的免费视频</a>| <a href="http://wenfaka.com" target="_blank">无码一区二区三区亚洲人妻 </a>| <a href="http://dehaichem.com" target="_blank">亚洲国产精品久久网午夜</a>| <a href="http://www789789.com" target="_blank">国产精品免费观看久久</a>| <a href="http://25gh.com" target="_blank">国产精品亚洲а∨无码播放麻豆 </a>| <a href="http://cn-zggx.com" target="_blank">国产精品高清视亚洲一区二区</a>| <a href="http://hysw100.com" target="_blank">国产精品公开免费视频</a>| <a href="http://shmtweld.com" target="_blank">一个人看的在线免费视频</a>| <a href="http://haigoumama.com" target="_blank">国产成人精品日本亚洲</a>| <a href="http://wulegu.com" target="_blank">亚洲黄色免费网站</a>| <a href="http://linanhotel.com" target="_blank">亚洲国产精品无码久久九九大片</a>| <a href="http://zhaosifuwang.com" target="_blank">四虎精品亚洲一区二区三区</a>| <a href="http://xx2015.com" target="_blank">中文字幕的电影免费网站</a>| <a href="http://haiholr.com" target="_blank">亚洲视频在线观看不卡</a>| <a href="http://cn-taoqigui.com" target="_blank">毛片基地免费观看</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>