锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美高清视频一区,黄页视频在线播放,18视频免费网址在线观看http://www.aygfsteel.com/chenxinppoo/zh-cnWed, 18 Jun 2025 18:09:23 GMTWed, 18 Jun 2025 18:09:23 GMT60璁頒簨鏈殑鏌ユ壘鎶鏈?/title><link>http://www.aygfsteel.com/chenxinppoo/archive/2008/07/25/217323.html</link><dc:creator>ppoo</dc:creator><author>ppoo</author><pubDate>Thu, 24 Jul 2008 16:48:00 GMT</pubDate><guid>http://www.aygfsteel.com/chenxinppoo/archive/2008/07/25/217323.html</guid><wfw:comment>http://www.aygfsteel.com/chenxinppoo/comments/217323.html</wfw:comment><comments>http://www.aygfsteel.com/chenxinppoo/archive/2008/07/25/217323.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/chenxinppoo/comments/commentRss/217323.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/chenxinppoo/services/trackbacks/217323.html</trackback:ping><description><![CDATA[   緇堜簬鍋氬嚭瀹屾暣鐨勮浜嬫湰錛屼笌windows鐨勮浜嬫湰鐩稿樊涓嶆槸寰堝ぇ銆傚叧浜庢煡鎵懼姛鑳斤紝褰撴椂蹇冮噷涓鐩存兂鐫鐢ㄦ鍒欒〃杈懼紡鍘誨畬鎴愶紝涔熷氨鏄疨attern涓嶮atcher綾諱腑鐨勬柟娉曘傚彲鏄煡浜嗗崐澶╋紝涔熷氨鏄兘鍖歸厤姝g‘鐨勫瓧絎︽垨瀛楃涓詫紝鍙槸鏂規硶鐨勮繑鍥炵被鍨嬪嵈鏄痓oolean鐨勩傝繖灝辨病鍔炴硶瀹屾垚鏌ユ壘瀛楃騫跺畾浣嶆枃鏈殑浣嶇疆浜嗐傛棤濂堜箣涓嬶紝鍘葷綉涓婃悳绱紝鍙槸娌℃湁鎵懼埌浠諱綍鏈夊叧鐨勬柟娉曘傚綋鏃跺績鍙竴涓噳鍟婏紝鎵浠ユ垜騫茶剢鑷繁鎯崇畻娉曞惂錛屾嬁鍑烘潵鍜屽ぇ瀹朵竴璧風敤銆? <p>  棣栧厛浣犱細灝嗚浜嬫湰鐨勫瑙傞兘鍋氬ソ銆傛枃鏈尯鍩熸帹鑽愪嬌鐢↗TextArea銆傚亣濡傝繖涓枃鏈殑鍙橀噺鍛藉悕涓簀TextArea銆傛帴涓嬫潵鎴戝紑濮嬪啓綆楁硶浜嗐傚緩绔嬩竴涓被FindMethod錛屼笓闂ㄧ敤鏉ヨ綆楁煡鎵劇殑綆楁硶銆?/p> <p>  public class FindMethod {<br />     <br />     private NotePad note;//璁頒簨鏈殑涓葷被<br />     private String text;//瀹氫箟浠庤浜嬫湰鏂囨湰鍖哄煙浼犳潵鐨勬枃鏈?br />     private String mathe;//瀹氫箟鎮ㄦ墍鏌ヨ鐨勫瓧絎︿覆<br />     private int ltext=0;//鏂囨湰鐨勯暱搴?br />     private int lmathe=0;//鏌ヨ瀛楃涓茬殑闀垮害<br />     private char[] textc;//瀛楃鏁扮粍錛屼繚瀛樻枃鏈殑鍗曚釜瀛楃<br />     private char[] mathec;//瀛楃鏁扮粍錛屼繚瀛樻煡璇㈢殑鍗曚釜瀛楃<br /> <br />     private int[] index; //榪斿洖灝嗚鏌ユ壘鍒扮殑瀛楃涓叉垨瀛楃鎵鍦ㄨ浜嬫湰鏂囨湰鍖哄煙鐨勭儲寮?br />     private int buttonsize; <br />     private boolean isBreak = false;//鏄惁闇瑕佸驚鐜?br />     <br />     public FindMethod(String text,String mathe,NotePad note) {<br />         this.text=text;<br />         this.mathe=mathe;<br />         this.note=note;<br />         ltext=text.length();<br />         lmathe=mathe.length();<br />         mathec=new char[lmathe];<br />         textc=new char[ltext];<br />         index=new int[lmathe];<br />         for(int i=0;i<ltext;i++) {<br />             textc[i]=text.charAt(i);<br />         }<br />         for(int i=0;i<lmathe;i++) {<br />             mathec[i]=mathe.charAt(i);<br />         }<br />     }<br />     <br />     public void findText() {<br />         <br />         int z=0;<br />         if(lmathe>ltext) {//濡傛灉瑕佹煡鎵劇殑瀛楃涓茬殑闀垮害澶т簬鏂囨湰鐨勯暱搴﹀垯娌℃湁鍖歸厤鐨勫唴瀹?br />             JOptionPane.showMessageDialog(note, "娌℃湁鍒版壘鍖歸厤鐨勫唴瀹癸紒");<br />         }<br />         else {<br />            for(int i=0;i<ltext-lmathe+1;i++) {<br />                z=i;<br />                for(int j=0;j<lmathe;j++) {<br />                    <br />                    if(mathec[j]==textc[z]) {                       <br />                        isBreak=true;<br />                        index[j]=z;<br />                        z++;<br />                    }<br />                    else{<br />                        isBreak=false;<br />                        index=new int[lmathe];<br />                        break;<br />                    }<br />                }<br />               if(isBreak==true)<br />                break;<br />            }<br />            <br />         }<br />     }<br />     <br />     public int[] getIndex() {<br />         return index;<br />     }    <br /> }</p> <p>鍏充簬findText()鏂規硶錛屽叾瀹炲氨鏄煡鎵劇畻娉曠殑鏍稿績銆傛瘮濡傛枃鏈負“12345”錛屼綘瑕佹煡鎵劇殑鏄?#8220;45”銆傞偅涔堣偗瀹氭槸闇瑕佹煡鎵?嬈★紝騫朵笖瑕佽繘琛屼袱嬈℃瘮杈冿紙姣旇緝鐨勫唴瀹規槸鏂囨湰鐨?4'涓庢煡鎵劇殑'4'錛屾枃鏈殑'5' 涓庢煡鎵劇殑'5'錛夈傚ソ浜嗚繖浜涗綘鐭ラ亾浜嗭紝閭d箞浣犱細鍙戠幇鍏朵腑鏈変釜瑙勫緥銆傚鏋滄枃鏈殑闀垮害鏄疦錛屾煡鎵劇殑鏂囨湰鐨勯暱搴︽槸M錛圢>=M錛夛紝鍒欐湁闇瑕佽繘琛?N-M)+1嬈℃煡璇紝騫朵笖榪涜M嬈℃瘮杈冦傚鏋滄瘮杈冩垚鍔熺殑璇濋偅涔坕sBreak灝變負true錛屽茍涓旇index榪欎釜鏁扮粍渚濇璧嬩笂姣旇緝鐨凪鐨勯暱搴︾殑绱㈠紩錛屽茍涓旀暟緇勭殑鑼冨洿鍦?lt;M錛屽鏋滃叾涓殑涓嬈℃瘮杈冨け璐ワ紝閭d箞isBreak灝變負false錛岃澶т綋寰幆鍦ㄦ墽琛岋紝澶т綋寰幆涔熷氨鏄湁澶氬皯嬈℃煡璇€傚ソ浜嗗ぇ浣撲篃灝卞畬浜嬩簡錛岀劧鍚庡埄鐢ㄨ繑鍥炵殑index鏁扮粍錛宨ndex[0]鍜宨ndex[index.length()-1]鍒嗗埆浠h〃瑕佸畾浣嶇殑璁頒簨鏈枃鏈尯鍩熺殑寮濮嬪拰緇撴潫鐨勭儲寮曞箋傜劧鍚庡埄鐢╦TextArea.select(index[0],index[index.length()-1]+1)鏂規硶鏉ュ畾浣嶆煡鎵懼埌鐨勫瓧絎︿覆銆?/p> <p>  浠ヤ笂鐨勬柟娉曞彲鑳芥湁浜涢夯鐑︼紝浣嗘槸鎴戞劅瑙夋暣浣撶殑鎬濊礬榪樻槸鍙互鐨勶紝閫傚悎涓庢垜浠繖浜涜彍楦熴傚鏋滅湅涓嶆噦錛屽氨澶氱湅鍑犻亶錛岀悊瑙i偅涓寰嬨傚啀鐞嗚В涓嶄簡鍙互涓庢垜鑱旂郴錛岃阿璋€傚疄渚嬮檮浠跺湪<a >http://www.itkay.com/?action=show&id=29</a>鍙互涓嬭澆鍒?/p><img src ="http://www.aygfsteel.com/chenxinppoo/aggbug/217323.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/chenxinppoo/" target="_blank">ppoo</a> 2008-07-25 00:48 <a href="http://www.aygfsteel.com/chenxinppoo/archive/2008/07/25/217323.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> 主站蜘蛛池模板: <a href="http://" target="_blank">邯郸市</a>| <a href="http://" target="_blank">林州市</a>| <a href="http://" target="_blank">仪陇县</a>| <a href="http://" target="_blank">辉县市</a>| <a href="http://" target="_blank">辽中县</a>| <a href="http://" target="_blank">武邑县</a>| <a href="http://" target="_blank">博湖县</a>| <a href="http://" target="_blank">绥棱县</a>| <a href="http://" target="_blank">台湾省</a>| <a href="http://" target="_blank">天长市</a>| <a href="http://" target="_blank">铜梁县</a>| <a href="http://" target="_blank">广安市</a>| <a href="http://" target="_blank">澎湖县</a>| <a href="http://" target="_blank">枣强县</a>| <a href="http://" target="_blank">报价</a>| <a href="http://" target="_blank">望谟县</a>| <a href="http://" target="_blank">萨迦县</a>| <a href="http://" target="_blank">石渠县</a>| <a href="http://" target="_blank">安龙县</a>| <a href="http://" target="_blank">东安县</a>| <a href="http://" target="_blank">夏邑县</a>| <a href="http://" target="_blank">蚌埠市</a>| <a href="http://" target="_blank">米泉市</a>| <a href="http://" target="_blank">成都市</a>| <a href="http://" target="_blank">巴林右旗</a>| <a href="http://" target="_blank">东辽县</a>| <a href="http://" target="_blank">兰州市</a>| <a href="http://" target="_blank">松阳县</a>| <a href="http://" target="_blank">丹寨县</a>| <a href="http://" target="_blank">宣城市</a>| <a href="http://" target="_blank">石嘴山市</a>| <a href="http://" target="_blank">林州市</a>| <a href="http://" target="_blank">牟定县</a>| <a href="http://" target="_blank">鄂伦春自治旗</a>| <a href="http://" target="_blank">东港市</a>| <a href="http://" target="_blank">京山县</a>| <a href="http://" target="_blank">祁连县</a>| <a href="http://" target="_blank">天气</a>| <a href="http://" target="_blank">沧州市</a>| <a href="http://" target="_blank">衡东县</a>| <a href="http://" 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>