锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
濡傛灉浣犵殑緗戠珯涓嶅垢鍦ㄨ繖涓悕鍗曚腑錛屼篃鍒寰楃獫蹇冿紝涓嶈繃鎮ㄦ渶濂借繕鏄冭檻鑰冭檻閲嶆柊璁捐涓涓嬬綉绔欐瘮杈冨ソ銆傘傘?nbsp; 闃呰鍏ㄦ枃
]]>
鍏堟斁榪欓噷錛岀幇鍦ㄦ病鏈夋椂闂達紝絳夋湁絀轟簡鎶婂師鏂囩炕璇戜簡璐磋繃鏉ャ?br />
鍐欏緱榪樻槸铔湁鎰忔濈殑銆?u>http://www.blogstorm.co.uk/blog/top-10-worst-websites/
]]>
浠g爜濡備笅錛?br />
/**
2 * Remove all "<>" tags in the text
3 * @param tagText
4 * @return the clean text without tags
5 */
6 public String removeTags( String tagText )
7 {
8 return tagText.replaceAll("<[^>]*>", "");
9 }
]]>
浠g爜濡備笅錛?/span>
//鑾峰緱涓嶉噸澶嶇殑闅忔満鏁版暟緇勶紝鍙栧艱寖鍥碵min,max)錛屼釜鏁皊ize public static int[] getRandomIntWithoutReduplicate( int min, int max, int size ) { int[] result = new int[size];//鐢ㄤ簬瀛樺偍緇撴灉鐨勬暟緇?/span> int arraySize = max - min;//鐢ㄤ簬鏀?鐗?鐨勬暟緇勫ぇ灝?/span> int[] intArray = new int[arraySize];//鐢ㄤ簬鏀?鐗?鐨勬暟緇? // 鍒濆鍖?鐗岀洅"錛屾瘮濡傚彇鍊艱寖鍥存槸[3,10)鍒?鐗岀洅"閲屾斁鐨?鐗?灝辨槸3錛?錛?錛?錛?錛?錛? for( int i = 0 ; i < intArray.length ; i++ ) { intArray[i] = i + min; } // 鑾峰彇涓嶉噸澶嶇殑闅忔満鏁版暟緇?/span> for( int i = 0 ; i < size ; i++ ) { int c = getRandomInt( min, max - i );//鑾峰彇鍒頒竴涓殢鏈烘暟 int index = c - min;//榪欎釜闅忔満鏁板湪"鐗岀洅"閲岀殑浣嶇疆 swap( intArray, index, arraySize - 1 - i );//灝嗚繖寮?鐗?鏀懼埌"鐗岀洅"鐨勬渶鍚庨潰 result[i] = intArray[ arraySize - 1 - i ];//鎶婅繖寮?鐗?鐨勫兼墧鍒板瓨鍌ㄧ粨鏋滅殑鏁扮粍閲?/span> } return result; } //鑾峰彇闅忔満鏁幫紝闅忔満鏁板彇鍊艱寖鍥翠負[min, max) public static int getRandomInt( int min, int max ) { // include min, exclude max int result = min + new Double( Math.random() * ( max - min ) ).intValue(); return result; } private static void swap( int[] array, int x, int y ) {//浜ゆ崲鏁扮粍arry, 搴忓彿x涓庡簭鍙穣鍊肩殑欏哄簭 int temp = array[x]; array[x] = array[y]; array[y] = temp; }