锘??xml version="1.0" encoding="utf-8" standalone="yes"?>一区二区三区四区五区精品视频 ,精彩视频一区二区,欧美激情综合亚洲一二区http://www.aygfsteel.com/xuyan5971/zh-cnThu, 19 Jun 2025 16:22:56 GMTThu, 19 Jun 2025 16:22:56 GMT60jquery validationhttp://www.aygfsteel.com/xuyan5971/archive/2009/10/15/298375.htmlR99R99Thu, 15 Oct 2009 05:37:00 GMThttp://www.aygfsteel.com/xuyan5971/archive/2009/10/15/298375.htmlhttp://www.aygfsteel.com/xuyan5971/comments/298375.htmlhttp://www.aygfsteel.com/xuyan5971/archive/2009/10/15/298375.html#Feedback0http://www.aygfsteel.com/xuyan5971/comments/commentRss/298375.htmlhttp://www.aygfsteel.com/xuyan5971/services/trackbacks/298375.html闃呰鍏ㄦ枃

R99 2009-10-15 13:37 鍙戣〃璇勮
]]>
[jQuery]animate(婊戝潡婊戝姩)http://www.aygfsteel.com/xuyan5971/archive/2009/10/13/298095.htmlR99R99Tue, 13 Oct 2009 10:01:00 GMThttp://www.aygfsteel.com/xuyan5971/archive/2009/10/13/298095.htmlhttp://www.aygfsteel.com/xuyan5971/comments/298095.htmlhttp://www.aygfsteel.com/xuyan5971/archive/2009/10/13/298095.html#Feedback0http://www.aygfsteel.com/xuyan5971/comments/commentRss/298095.htmlhttp://www.aygfsteel.com/xuyan5971/services/trackbacks/298095.html
<p><href="#" class="run">Run</a></p>
<div id="box">
</div>
css
<style type="text/css">
body 
{}{
    margin
: 20px auto;
    padding
: 0;
    width
: 580px;
    font
: 80%/120% Arial, Helvetica, sans-serif;
}

{}{
    font-weight
: bold;
    color
: #000000;
}

#box 
{}{
    background
: #6699FF;
    height
: 100px;
    width
: 100px;
    position
: relative;
}

</style>


jquery
 1$(document).ready(function(){
 2    $(".run").click(function(){
 3    
 4        $("#box").animate({opacity: "0.1", left: "+=400"}1200)
 5        .animate({opacity: "0.4", top: "+=160", height: "20", width: "20"}"slow")
 6        .animate({opacity: "1", left: "0", height: "100", width: "100"}"slow")
 7        .animate({top: "0"}"fast")
 8        .slideUp()
 9        .slideDown("slow")
10        return false;
11    
12    }
);
13}
);



R99 2009-10-13 18:01 鍙戣〃璇勮
]]>
jquery瀛︿範絎旇http://www.aygfsteel.com/xuyan5971/archive/2009/10/12/297939.htmlR99R99Mon, 12 Oct 2009 09:43:00 GMThttp://www.aygfsteel.com/xuyan5971/archive/2009/10/12/297939.htmlhttp://www.aygfsteel.com/xuyan5971/comments/297939.htmlhttp://www.aygfsteel.com/xuyan5971/archive/2009/10/12/297939.html#Feedback0http://www.aygfsteel.com/xuyan5971/comments/commentRss/297939.htmlhttp://www.aygfsteel.com/xuyan5971/services/trackbacks/297939.html
1<div style="width:100%;height:100%;border-style:solid;border:2px;">
2    <div style="width:40px;height:30px;border-style:solid;border:2px;">
3        <p>Hello</p>
4    </div>
5    
6    
7    
8</div>
$("div:has(p)")


閫変腑鐨勬槸鏈澶栧眰鐨刣iv



R99 2009-10-12 17:43 鍙戣〃璇勮
]]>
姝e垯琛ㄨ揪寮?棰勬悳绱?/title><link>http://www.aygfsteel.com/xuyan5971/archive/2009/09/28/296806.html</link><dc:creator>R99</dc:creator><author>R99</author><pubDate>Mon, 28 Sep 2009 08:26:00 GMT</pubDate><guid>http://www.aygfsteel.com/xuyan5971/archive/2009/09/28/296806.html</guid><wfw:comment>http://www.aygfsteel.com/xuyan5971/comments/296806.html</wfw:comment><comments>http://www.aygfsteel.com/xuyan5971/archive/2009/09/28/296806.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xuyan5971/comments/commentRss/296806.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xuyan5971/services/trackbacks/296806.html</trackback:ping><description><![CDATA[<table cellspacing="0" cellpadding="6" border="1"> <tbody> <tr> <td> <p align="left"><strong><span style="color: #909099">(?=</span><span style="color: black">xxx</span><span style="color: #909099">)</span></strong></p> </td> <td rowspan="2"> <p>姝e悜棰勬悳绱紙鍚戝彸錛?/p> </td> <td> <p>姝e悜棰勬悳绱紝鍒ゆ柇褰撳墠浣嶇疆鍙充晶鏄惁鑳藉尮閰嶆寚瀹氳〃杈懼紡</p> </td> </tr> <tr> <td> <p style="text-align: left" align="left"><strong><span style="color: #909099">(?!</span><span style="color: black">xxx</span><span style="color: #909099">)</span></strong></p> </td> <td> <p>姝e悜棰勬悳绱㈠惁瀹氾紝鍒ゆ柇褰撳墠浣嶇疆鍙充晶鏄惁涓嶈兘澶熷尮閰嶆寚瀹氳〃杈懼紡</p> </td> </tr> <tr> <td> <p align="left"><strong><span style="color: #909099">(?<=</span><span style="color: black">xxx</span><span style="color: #909099">)</span></strong></p> </td> <td rowspan="2"> <p>鍙嶅悜棰勬悳绱紙鍚戝乏錛?/p> </td> <td> <p>鍙嶅悜棰勬悳绱紝鍒ゆ柇褰撳墠浣嶇疆宸︿晶鏄惁鑳藉鍖歸厤鎸囧畾琛ㄨ揪寮?/p> </td> </tr> <tr> <td> <p align="left"><strong><span style="color: #909099">(?<!</span><span style="color: black">xxx</span><span style="color: #909099">)</span></strong></p> </td> <td> <p>鍙嶅悜棰勬悳绱㈠惁瀹氾紝鍒ゆ柇褰撳墠浣嶇疆宸︿晶鏄惁涓嶈兘澶熷尮閰嶆寚瀹氳〃杈懼紡</p> </td> </tr> </tbody> </table> <img src ="http://www.aygfsteel.com/xuyan5971/aggbug/296806.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xuyan5971/" target="_blank">R99</a> 2009-09-28 16:26 <a href="http://www.aygfsteel.com/xuyan5971/archive/2009/09/28/296806.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>ajax鍥炶皟鍑芥暟璋冪敤澶氫釜鍙傛暟銆?寰幆璋冪敤銆?/title><link>http://www.aygfsteel.com/xuyan5971/archive/2009/09/27/296699.html</link><dc:creator>R99</dc:creator><author>R99</author><pubDate>Sun, 27 Sep 2009 13:35:00 GMT</pubDate><guid>http://www.aygfsteel.com/xuyan5971/archive/2009/09/27/296699.html</guid><wfw:comment>http://www.aygfsteel.com/xuyan5971/comments/296699.html</wfw:comment><comments>http://www.aygfsteel.com/xuyan5971/archive/2009/09/27/296699.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xuyan5971/comments/commentRss/296699.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xuyan5971/services/trackbacks/296699.html</trackback:ping><description><![CDATA[<div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #008080"> 1</span><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000">    function batchProcessData(data,telArr,index){<br /> </span><span style="color: #008080"> 2</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />          if(data==0){    <br /> </span><span style="color: #008080"> 3</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            var option = new Option(telArr[index],telArr[index]);<br /> </span><span style="color: #008080"> 4</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            var counts = $('bindTel').options.length;<br /> </span><span style="color: #008080"> 5</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            $('bindTel').options[counts]=option; <br /> </span><span style="color: #008080"> 6</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            var restrictionObj = $('bindTel');<br /> </span><span style="color: #008080"> 7</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            var allNum =",";<br /> </span><span style="color: #008080"> 8</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            for(i=0;i</span><span style="color: #0000ff"><</span><span style="color: #800000">restrictionObj</span><span style="color: #ff0000">.options.length;i++){<br /> </span><span style="color: #008080"> 9</span><span style="color: #ff0000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />                var value </span><span style="color: #0000ff">= restrictionObj.options[i].value;<br /> </span><span style="color: #008080">10</span><span style="color: #0000ff"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />                </span><span style="color: #ff0000">allNum +</span><span style="color: #0000ff">= value+',';<br /> </span><span style="color: #008080">11</span><span style="color: #0000ff"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            </span><span style="color: #ff0000">}<br /> </span><span style="color: #008080">12</span><span style="color: #ff0000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            $('bindTelNo').value</span><span style="color: #0000ff">=allNum;<br /> </span><span style="color: #008080">13</span><span style="color: #0000ff"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />        </span><span style="color: #ff0000">}    <br /> </span><span style="color: #008080">14</span><span style="color: #ff0000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />        index +</span><span style="color: #0000ff">=1;<br /> </span><span style="color: #008080">15</span><span style="color: #0000ff"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />        </span><span style="color: #ff0000">if(index</span><span style="color: #0000ff">==telArr.length){<br /> </span><span style="color: #008080">16</span><span style="color: #0000ff"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            </span><span style="color: #ff0000">return;<br /> </span><span style="color: #008080">17</span><span style="color: #ff0000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />        }<br /> </span><span style="color: #008080">18</span><span style="color: #ff0000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />        var fieldNameArr </span><span style="color: #0000ff">= [];<br /> </span><span style="color: #008080">19</span><span style="color: #0000ff"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />        </span><span style="color: #ff0000">var fieldValueArr </span><span style="color: #0000ff">= [];<br /> </span><span style="color: #008080">20</span><span style="color: #0000ff"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />        </span><span style="color: #ff0000">fieldNameArr[0]</span><span style="color: #0000ff">='tel_no';<br /> </span><span style="color: #008080">21</span><span style="color: #0000ff"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />        </span><span style="color: #ff0000">fieldValueArr[0]</span><span style="color: #0000ff">=telArr[index];<br /> </span><span style="color: #008080">22</span><span style="color: #0000ff"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />        </span><span style="color: #ff0000">sysManagerService.isExist('t_user_bind',fieldNameArr[0],fieldValueArr[0],{<br /> </span><span style="color: #008080">23</span><span style="color: #ff0000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            callback:<br /> </span><span style="color: #008080">24</span><span style="color: #ff0000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />                function(data){<br /> </span><span style="color: #008080">25</span><span style="color: #ff0000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />                    batchProcessData(data,telArr,index);<br /> </span><span style="color: #008080">26</span><span style="color: #ff0000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />                }<br /> </span><span style="color: #008080">27</span><span style="color: #ff0000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />        });<br /> </span><span style="color: #008080">28</span><span style="color: #ff0000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />    }</span></div> <br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #008080"> 1</span><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #000000">    function batchAddTel(){<br /> </span><span style="color: #008080"> 2</span><span style="color: #000000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />        var telnum = $('telNo');<br /> </span><span style="color: #008080"> 3</span><span style="color: #000000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />        var telArr = telnum.value.split(/[^\d-]/g);<br /> </span><span style="color: #008080"> 4</span><span style="color: #000000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />        var effTelArr = new Array();<br /> </span><span style="color: #008080"> 5</span><span style="color: #000000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />        for(var i=0;i</span><span style="color: #0000ff"><</span><span style="color: #800000">telArr</span><span style="color: #ff0000">.length;i++){<br /> </span><span style="color: #008080"> 6</span><span style="color: #ff0000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />            if(""</span><span style="color: #0000ff">==telArr[i]){<br /> </span><span style="color: #008080"> 7</span><span style="color: #0000ff"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />                </span><span style="color: #ff0000">continue;<br /> </span><span style="color: #008080"> 8</span><span style="color: #ff0000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />            }<br /> </span><span style="color: #008080"> 9</span><span style="color: #ff0000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />            var patrn</span><span style="color: #0000ff">=/(^[0-9]{3,4}\-[0-9]{7,8}$)|(^[0-9]{7,8}$)|(^[0-9]{11}$)/;<br /> </span><span style="color: #008080">10</span><span style="color: #0000ff"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />            </span><span style="color: #ff0000">if (!patrn.test(telArr[i])){<br /> </span><span style="color: #008080">11</span><span style="color: #ff0000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />                continue;                                               <br /> </span><span style="color: #008080">12</span><span style="color: #ff0000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />            }                                  <br /> </span><span style="color: #008080">13</span><span style="color: #ff0000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />            if($('bindTelNo').value.indexOf(','+telArr[i]+',') !</span><span style="color: #0000ff">=-1){<br /> </span><span style="color: #008080">14</span><span style="color: #0000ff"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />                </span><span style="color: #ff0000">continue;                                 <br /> </span><span style="color: #008080">15</span><span style="color: #ff0000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />            }      <br /> </span><span style="color: #008080">16</span><span style="color: #ff0000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />            effTelArr.push(telArr[i]);<br /> </span><span style="color: #008080">17</span><span style="color: #ff0000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />        }<br /> </span><span style="color: #008080">18</span><span style="color: #ff0000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />        effTelArr </span><span style="color: #0000ff">= unique_Array(effTelArr);<br /> </span><span style="color: #008080">19</span><span style="color: #0000ff"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />        </span><span style="color: #ff0000">if(effTelArr.length </span><span style="color: #0000ff">></span><span style="color: #000000"> 0){<br /> </span><span style="color: #008080">20</span><span style="color: #000000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />            var fieldNameArr = [];<br /> </span><span style="color: #008080">21</span><span style="color: #000000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />            var fieldValueArr = [];<br /> </span><span style="color: #008080">22</span><span style="color: #000000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />            fieldNameArr[0]='tel_no';<br /> </span><span style="color: #008080">23</span><span style="color: #000000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />            fieldValueArr[0]=effTelArr[0];<br /> </span><span style="color: #008080">24</span><span style="color: #000000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />            sysManagerService.isExist('t_user_bind',fieldNameArr[0],fieldValueArr[0],{//<font style="background-color: #cce8cf">鍥炶皟鍑芥暟璋冪敤澶氫釜鍙傛暟</font><br /> </span><span style="color: #008080">25</span><span style="color: #000000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />                callback:<br /> </span><span style="color: #008080">26</span><span style="color: #000000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />                    function(data){<br /> </span><span style="color: #008080">27</span><span style="color: #000000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />                        batchProcessData(data,effTelArr,0);<br /> </span><span style="color: #008080">28</span><span style="color: #000000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />                    }<br /> </span><span style="color: #008080">29</span><span style="color: #000000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />            });<br /> </span><span style="color: #008080">30</span><span style="color: #000000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />        }    <br /> </span><span style="color: #008080">31</span><span style="color: #000000"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" />    }     </span></div> <img src ="http://www.aygfsteel.com/xuyan5971/aggbug/296699.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xuyan5971/" target="_blank">R99</a> 2009-09-27 21:35 <a href="http://www.aygfsteel.com/xuyan5971/archive/2009/09/27/296699.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>lucene_鏍規嵁绱㈠紩鎼滅儲鏂囦歡http://www.aygfsteel.com/xuyan5971/archive/2009/08/12/290862.htmlR99R99Wed, 12 Aug 2009 08:59:00 GMThttp://www.aygfsteel.com/xuyan5971/archive/2009/08/12/290862.htmlhttp://www.aygfsteel.com/xuyan5971/comments/290862.htmlhttp://www.aygfsteel.com/xuyan5971/archive/2009/08/12/290862.html#Feedback0http://www.aygfsteel.com/xuyan5971/comments/commentRss/290862.htmlhttp://www.aygfsteel.com/xuyan5971/services/trackbacks/290862.htmlpackage org.apache.lucene.demo;

/**
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Date;

import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.index.FilterIndexReader;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.queryParser.MultiFieldQueryParser;
import org.apache.lucene.queryParser.QueryParser;
import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.search.HitCollector;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.ScoreDoc;
import org.apache.lucene.search.Searcher;
import org.apache.lucene.search.TopDocCollector;

/** Simple command-line based search demo. */
public class SearchFiles {

  /** Use the norms from one field for all fields.  Norms are read into memory,
   * using a byte of memory per document per searched field.  This can cause
   * search of large collections with a large number of fields to run out of
   * memory.  If all of the fields contain only a single token, then the norms
   * are all identical, then single norm vector may be shared. */
  private static class OneNormsReader extends FilterIndexReader {
    private String field;

    public OneNormsReader(IndexReader in, String field) {
      super(in);
      this.field = field;
    }

    public byte[] norms(String field) throws IOException {
      return in.norms(this.field);
    }
  }

  private SearchFiles() {}

  /** Simple command-line based search demo. */
  public static void main(String[] args) throws Exception {
    String index = "index";
    String field = "content";
    boolean multipleFields = true;
    IndexReader reader = IndexReader.open(index);//IndexReader 鏍規嵁 index 鎸囧畾鐨勮礬寰?璁塊棶绱㈠紩錛屾壂鎻忕儲寮曘?br />     Searcher searcher = new IndexSearcher(reader);
    Analyzer analyzer = new StandardAnalyzer();
    BufferedReader in =new BufferedReader(new InputStreamReader(System.in, "UTF-8"));
    while (true) {
   System.out.println("Enter query: ");
   String line = in.readLine();
   if (line == null || line.length() == -1)
    break;
   line = line.trim();
   if (line.length() == 0)
    break;
   if (!multipleFields) {
    QueryParser parser = new QueryParser(field, analyzer);
    Query query = parser.parse(field);// 鏍規嵁鎸囧畾鐨勫崟涓猣ield鏌ヨ
    parser.setDefaultOperator(parser.OR_OPERATOR.OR);
    //澶氫釜瀛楃涓蹭互絀烘牸浠芥牸鏃訛紝OR  : a b  鍚湁a鎴朾鍧囧彲銆?br />     //AND   a b 蹇呴』鍚湁 a鍜宐銆?br />     doPagingSearch(searcher, query);
    
   } else {

    String[] fields = new String[2];
    fields[0] = "contents";
    fields[1] = "name";
    BooleanClause.Occur[] flags = new BooleanClause.Occur[] {
      BooleanClause.Occur.SHOULD, BooleanClause.Occur.SHOULD };
    //鏍規嵁澶氫釜field鏌ヨ鏃躲俿hould,should鏌ヨ瀛楁鍦?name鎴栨槸contents浠諱綍涓涓腑錛屽潎鍋氫負涓鏉¤褰曡繑鍥炪?br />     //must,must .蹇呴』 鍗沖湪 name 涓紝鍙堝湪contents 涓?br />     Query query = MultiFieldQueryParser.parse(line, fields, flags,
      analyzer);
    doPagingSearch(searcher, query);
   }
  }
    reader.close();
  }
 
  /**
   * This method uses a custom HitCollector implementation which simply prints out
   * the docId and score of every matching document.
   *
   *  This simulates the streaming search use case, where all hits are supposed to
   *  be processed, regardless of their relevance.
   */

  public static void doPagingSearch( Searcher searcher, Query query) throws IOException {
 
    // Collect enough docs to show 5 pages
    TopDocCollector collector = new TopDocCollector(20);//鏈澶氱粨鏋滈泦涓暟銆?br />     searcher.search(query, collector);
    ScoreDoc[] hits = collector.topDocs().scoreDocs;
    int numTotalHits = collector.getTotalHits();//鎼滅儲鍒扮殑絎﹀悎鏉′歡鐨勮褰曟繪潯鏁般?br />     System.out.println(numTotalHits + " total matching documents");

    for(int i=0;i<numTotalHits;i++){
        Document doc = searcher.doc(hits[i].doc);
        System.out.println("path.."+doc.get("path"));
        System.out.println("modified.."+doc.get("modified"));
        System.out.println("name.."+doc.get("name"));
        System.out.println("parent"+doc.get("parent"));
        System.out.println("content..."+doc.get("content"));
    }
  }
}



R99 2009-08-12 16:59 鍙戣〃璇勮
]]>
lucence_瀵規枃浠跺緩绔嬬儲寮?/title><link>http://www.aygfsteel.com/xuyan5971/archive/2009/08/12/290837.html</link><dc:creator>R99</dc:creator><author>R99</author><pubDate>Wed, 12 Aug 2009 07:38:00 GMT</pubDate><guid>http://www.aygfsteel.com/xuyan5971/archive/2009/08/12/290837.html</guid><wfw:comment>http://www.aygfsteel.com/xuyan5971/comments/290837.html</wfw:comment><comments>http://www.aygfsteel.com/xuyan5971/archive/2009/08/12/290837.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xuyan5971/comments/commentRss/290837.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xuyan5971/services/trackbacks/290837.html</trackback:ping><description><![CDATA[<p><font style="background-color: #cce8cf">package org.apache.lucene.demo;</font></p> <p><font style="background-color: #cce8cf">/**<br />  * Licensed to the Apache Software Foundation (ASF) under one or more<br />  * contributor license agreements.  See the NOTICE file distributed with<br />  * this work for additional information regarding copyright ownership.<br />  * The ASF licenses this file to You under the Apache License, Version 2.0<br />  * (the "License"); you may not use this file except in compliance with<br />  * the License.  You may obtain a copy of the License at<br />  *<br />  *     http://www.apache.org/licenses/LICENSE-2.0<br />  *<br />  * Unless required by applicable law or agreed to in writing, software<br />  * distributed under the License is distributed on an "AS IS" BASIS,<br />  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br />  * See the License for the specific language governing permissions and<br />  * limitations under the License.<br />  */</font></p> <p><font style="background-color: #cce8cf">import org.apache.lucene.analysis.standard.StandardAnalyzer;<br /> import org.apache.lucene.index.IndexWriter;</font></p> <p><font style="background-color: #cce8cf">import java.io.File;<br /> import java.io.FileNotFoundException;<br /> import java.io.IOException;<br /> import java.util.Date;</font></p> <p><font style="background-color: #cce8cf">/** Index all text files under a directory. */<br /> public class IndexFiles {<br />   <br />   private IndexFiles() {}</font></p> <p><font style="background-color: #cce8cf">  static final File INDEX_DIR = new File("index");//绱㈠紩姝㈠綍銆傚緩鍦ㄥ綋鍓嶇洰褰曠殑/index涓?br />   <br />   /** Index all text files under a directory. */<br />   public static void main(String[] args) {//args[0] 鏂囦歡璺緞.  main 鏂規硶錛氬args[0]鎸囧畾鐨勬枃浠惰礬寰勪笅鐨勬墍鏈夋枃浠跺緩绔嬬儲寮曘?br />   final File docDir = new File(args[0]);<br />   if (!docDir.exists() || !docDir.canRead()) {<br />    System.out .println("Document directory '" + docDir.getAbsolutePath() + "' does not exist or is not readable, please check the path");<br />    System.exit(1);<br />   }<br />     <br />     Date start = new Date();<br />     try {<br />    IndexWriter writer = new IndexWriter(INDEX_DIR, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);<br />    //IndexWriter璐熻矗鍒涘緩鍜岀淮鎶ょ儲寮?br />    //IndexWriter(String path, Analyzer a, boolean create, IndexWriter.MaxFieldLength mfl)<br />    //path:璺緞 Analyzer:鏂囨湰鍒嗘瀽鍣?nbsp; create:鏄惁鍒涘緩鏂扮儲寮?nbsp; mfl 鏈澶ield鏁伴噺<br />    System.out.println("Indexing to directory '" + INDEX_DIR + "'...");<br />    indexDocs(writer, docDir);<br />    System.out.println("Optimizing...");<br />    writer.optimize();//浼樺寲绱㈠紩<br />    writer.close();//鍏抽棴<br />    Date end = new Date();<br />    System.out.println(end.getTime() - start.getTime() + " total milliseconds");<br />   } catch (IOException e) {<br />    System.out.println(" caught a " + e.getClass()<br />      + "\n with message: " + e.getMessage());<br />   }<br />   }</font></p> <p><font style="background-color: #cce8cf">  static void indexDocs(IndexWriter writer, File file) throws IOException {<br />   // do not try to index files that cannot be read<br />   if (file.canRead()) {<br />    if (file.isDirectory()) {<br />     String[] files = file.list();<br />     // an IO error could occur<br />     if (files != null) {<br />      for (int i = 0; i < files.length; i++) {<br />       indexDocs(writer, new File(file, files[i]));<br />      }<br />     }<br />    } else {<br />     System.out.println("adding " + file);<br />     try {<br />      writer.addDocument(FileDocument.Document(file));<br />     }<br />     // at least on windows, some temporary files raise this<br />     // exception with an "access denied" message<br />     // checking if the file can be read doesn't help<br />     catch (FileNotFoundException fnfe) {<br />      ;<br />     }<br />    }<br />   }<br />  }<br /> }<br /> <br /> <br /> <br /> </p> <p><font style="background-color: #cce8cf">package org.apache.lucene.demo;</font></p> <p><font style="background-color: #cce8cf">/**<br />  * Licensed to the Apache Software Foundation (ASF) under one or more<br />  * contributor license agreements.  See the NOTICE file distributed with<br />  * this work for additional information regarding copyright ownership.<br />  * The ASF licenses this file to You under the Apache License, Version 2.0<br />  * (the "License"); you may not use this file except in compliance with<br />  * the License.  You may obtain a copy of the License at<br />  *<br />  *     http://www.apache.org/licenses/LICENSE-2.0<br />  *<br />  * Unless required by applicable law or agreed to in writing, software<br />  * distributed under the License is distributed on an "AS IS" BASIS,<br />  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br />  * See the License for the specific language governing permissions and<br />  * limitations under the License.<br />  */</font></p> <p><font style="background-color: #cce8cf">import java.io.File;<br /> import java.io.FileReader;</font></p> <p><font style="background-color: #cce8cf">import org.apache.lucene.document.DateTools;<br /> import org.apache.lucene.document.Document;<br /> import org.apache.lucene.document.Field;</font></p> <p><font style="background-color: #cce8cf">/** A utility for making Lucene Documents from a File. */</font></p> <p><font style="background-color: #cce8cf">public class FileDocument {</font></p> <p><font style="background-color: #cce8cf">  public static Document Document(File f)<br />        throws java.io.FileNotFoundException {<br />   <br />     // make a new, empty document<br />     Document doc = new Document();<br />     <br />     doc.add(new Field("contents", new FileReader(f)));<br />     doc.add(new Field("path", f.getPath(), Field.Store.YES, Field.Index.NOT_ANALYZED));<br />     doc.add(new Field("modified", DateTools.timeToString(f.lastModified(), DateTools.Resolution.MINUTE),Field.Store.YES, Field.Index.ANALYZED));<br />     doc.add(new Field("name",f.getName(),Field.Store.YES,Field.Index.NOT_ANALYZED));<br />     //Field </font></p> <p><font style="background-color: #cce8cf">    // return the document<br />     return doc;<br />   }</font></p> <p><font style="background-color: #cce8cf">  private FileDocument() {}<br /> }<br />     <br /> </font></p> <p><br /> </font></p> <img src ="http://www.aygfsteel.com/xuyan5971/aggbug/290837.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xuyan5971/" target="_blank">R99</a> 2009-08-12 15:38 <a href="http://www.aygfsteel.com/xuyan5971/archive/2009/08/12/290837.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鏁扮粍_sort firstChild http://www.aygfsteel.com/xuyan5971/archive/2009/08/07/290267.htmlR99R99Fri, 07 Aug 2009 12:51:00 GMThttp://www.aygfsteel.com/xuyan5971/archive/2009/08/07/290267.htmlhttp://www.aygfsteel.com/xuyan5971/comments/290267.htmlhttp://www.aygfsteel.com/xuyan5971/archive/2009/08/07/290267.html#Feedback0http://www.aygfsteel.com/xuyan5971/comments/commentRss/290267.htmlhttp://www.aygfsteel.com/xuyan5971/services/trackbacks/290267.html<html>
<body>

<script type="text/javascript">
function sortkids(e) {
     // This is the element whose children we are going to sort
     if (typeof e == "string") e = document.getElementById(e);

     // Transfer the element (but not text node) children of e to a real array
     var kids = [];
     for(var x = e.firstChild; x != null; x = x.nextSibling)
         if (x.nodeType == 1 /* Node.ELEMENT_NODE */) kids.push(x);

     // Now sort the array based on the text content of each kid.
     // Assume that each kid has only a single child and it is a Text node
     kids.sort(function(n, m) { // This is the comparator function for sorting
                   var s = n.firstChild.data; // text of node n
                   var t = m.firstChild.data; // text of node m
                   if (s < t) return -1;      // n comes before m
                   else if (s > t) return 1;  // n comes after m
                   else return 0;             // n and m are equal
               });

     // Now append the kids back into the parent in their sorted order.
     // When we insert a node that is already part of the document, it is
     // automatically removed from its current position, so reinserting
     // these nodes automatically moves them from their old position
     // Note that any text nodes we skipped get left behind, however.
     for(var i = 0; i < kids.length; i++) e.appendChild(kids[i]);
}
</script>

<ul id="list"> <!-- This is the list we'll sort -->
<li>one<li>two<li>three<li>four <!-- items are not in alphabetical order -->
</ul>
<!-- this is the button that sorts the list -->
<button onclick="sortkids('list')">Sort list</button>

</body>
</html>



R99 2009-08-07 20:51 鍙戣〃璇勮
]]>
js_姝e垯琛ㄨ揪寮?/title><link>http://www.aygfsteel.com/xuyan5971/archive/2009/08/06/290128.html</link><dc:creator>R99</dc:creator><author>R99</author><pubDate>Thu, 06 Aug 2009 09:36:00 GMT</pubDate><guid>http://www.aygfsteel.com/xuyan5971/archive/2009/08/06/290128.html</guid><wfw:comment>http://www.aygfsteel.com/xuyan5971/comments/290128.html</wfw:comment><comments>http://www.aygfsteel.com/xuyan5971/archive/2009/08/06/290128.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xuyan5971/comments/commentRss/290128.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xuyan5971/services/trackbacks/290128.html</trackback:ping><description><![CDATA[<font style="background-color: #cce8cf"> <p><br /> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><br /> <html xmlns="http://www.w3.org/1999/xhtml" lang="GBK" xml:lang="GBK"><br /> <head><br /> <meta http-equiv="Pragma" content="no-cache" /><br /> <meta http-equiv="Cache-Control" content="no-cache" /><br /> <meta http-equiv="Expires" content="0" /><br /> <title></title></p> <p><br /> <script type="text/javascript">  <br /> function search(str,pattern)<br /> {</p> <p>     alert(str.search(pattern));<br /> }<br /> function testAA(){<br />  var s1 = '"abc\'';<br />  var s2 = '\'abc\'';<br />  var pattern1 = /['"][^'"]*['"]/;<br />  var pattern2 = /(['"])[^'"]*\1/;<br /> <!-- alert(s1.search(pattern1));--><br /> <!-- alert(s1.search(pattern2));--><br /> <!-- alert(s2.search(pattern1));--><br /> <!-- alert(s2.search(pattern2));--><br /> <!-- var s3 = 'JavaScriptscript';--><br /> <!-- var s4 = 'JavaScriptScript';--><br /> <!-- var pattern3 = /(Java([sS]cript))\2/;--><br /> <!-- alert(s3.search(pattern3));--><br /> <!-- alert(s4.search(pattern3));--><br />  var s5 = 'ABCC';<br />  var pattern4 = /(A)(B)(C)\2/;<br />  var pattern5 =  /(A)(?:B)(C)\2/;<br />  alert(s5.search(pattern4));<br />  alert(s5.search(pattern5));<br />  <br /> }</p> <p>function testReplace(){<br />  var p1 = /ab/;<br />  var p2 =/ab/g;<br />  var text = 'abcdefgab';<br />  <br /> <!-- alert( text.replace(p1,'11'));--><br /> <!-- alert( text.replace(p2,'11'));--></p> <p> var p3 = /(ab)(cd)/;<br />  var p4 = /(ab)(cd)/g;<br />  var t3 = 'abcdabcd';<br />  alert(t3.replace(p3,'$1'));<br />  alert(t3.replace(p4,'$1'));<br />  alert(t3.replace(p3,'$2'));<br />  alert(t3.replace(p4,'$2'));<br /> }</p> <p>function testMatch(){<br />     var s = 'a1b2c3d4';<br /> <!--    var p  =/(\w\d)/;--><br /> <!--    var a = s.match(p);--><br /> <!--    alert(a.length);--><br /> <!--    for(x in a){--><br /> <!--  alert(a[x]);--><br /> <!--    }--><br /> <!--    var p1 = /(\w\d)/g;--><br /> <!--    var a1 = s.match(p1);--><br /> <!--    alert(a1.length);--><br /> <!--    for(x in a1){--><br /> <!--  alert(a1[x]);--><br /> <!--    }--></p> <p> var s2 =  '(a1)(b2)(c3)(d4)';<br />  var p2 =  /(\w\d)/;<br />     var a2 = s2.match(p2);<br />     alert(a2.length);<br />     for(x in a2){<br />   alert(a2[x]);<br />     }<br /> }<br /> function testSplit(){<br />  var s1 = 'a , b , c';<br /> <!-- var a1 = s1.split(',');--><br /> <!--    alert(a1.length);--><br /> <!--    for(x in a1){--><br /> <!--  alert(a1[x]+a1[x].length);--><br /> <!--    }--><br />     var p1 = /\s,\s/;  <br />  var a2 = s1.split(p1);<br />     alert(a2.length);<br />     for(x in a2){<br />   alert(a2[x]+a2[x].length);<br />     }<br /> }</p> <p>function testNewReg(){<br />  var p = new RegExp('\\d');<br />  var p1 =  new RegExp('\\d','g');<br />  var p2 =  new RegExp('^\\d');<br />  var s = 'a12345';<br />  alert(s.replace(p,'a'));<br />  alert(s.replace(p1,'a'));<br />  alert(s.replace(p2,'a'));<br /> }</p> <p>function testExec(){<br />     var p = /Java/g;<br />     var t = 'JavaScript is more fun than Java!';<br />     var r;<br />     while((r=p.exec(t))!=null){<br />   alert(r.length+'..matched...'+r[0]+'..positon..'+r.index  +'..next..'+p.lastIndex); <br />   }<br />   var p1 = /Java/;<br />     while((r=p1.exec(t))!=null){<br />   alert(r.length+'..matched...'+r[0]+'..positon..'+r.index  +'..next..'+p1.lastIndex); <br />   }<br />  <br /> }</p> <p>function testTest(){<br />  var p = /java/i;<br />  alert(p.test('JavaScript'));<br />  <br /> }<br /> </script><br /> </head>  </p> <p><body><br /> <form action=""><br /> <a href="#"  onclick="search()">search</a><br /> <a href="#" onclick="search()">dddd</a><br /> <input type="button" value="search('124!abc','(abc)')" onclick="search('124!abc','(abc)')"></input><br /> <input type="button" value="search('124!abc','(abc){2,}')" onclick="search('124!abc','(abc){2,}')"></input><br /> <input type="button" value="search('aab','a*b')" onclick="search('aab','a*b')"></input><br /> <input type="button" value="search('aab','a*?b')" onclick="search('aab','a*?b')"></input><br /> <input type="button" value="test" onclick="testAA()"></input><br /> <br/><br /> <input type="button" value="testReplace" onclick="testReplace()"></input></p> <p><input type="button" value="testMatch" onclick="testMatch()"></input></p> <p><input type="button" value="testSplit" onclick="testSplit()"></input></p> <p><br /> <input type="button" value="testNewReg" onclick="testNewReg()"></input></p> <p><input type="button" value="testExec" onclick="testExec()"></input></p> <p><input type="button" value="testTest" onclick="testTest()"></input><br /> </form>  <br /> </body><br /> </html><br /> </font></p> <img src ="http://www.aygfsteel.com/xuyan5971/aggbug/290128.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xuyan5971/" target="_blank">R99</a> 2009-08-06 17:36 <a href="http://www.aygfsteel.com/xuyan5971/archive/2009/08/06/290128.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>js evalhttp://www.aygfsteel.com/xuyan5971/archive/2009/06/19/283244.htmlR99R99Fri, 19 Jun 2009 08:22:00 GMThttp://www.aygfsteel.com/xuyan5971/archive/2009/06/19/283244.htmlhttp://www.aygfsteel.com/xuyan5971/comments/283244.htmlhttp://www.aygfsteel.com/xuyan5971/archive/2009/06/19/283244.html#Feedback0http://www.aygfsteel.com/xuyan5971/comments/commentRss/283244.htmlhttp://www.aygfsteel.com/xuyan5971/services/trackbacks/283244.html
鎰熻鏈夌偣綾諱技浜?c:out 閲岀殑escapeXml 

璁稿鎿嶄綔闇瑕佽煩鍒頒竴涓?message.jsp 鐨勯〉闈紝 榪欎釜欏甸潰寰堢畝鍗曪紝灝辨槸涓涓俊鎭拰涓涓繑鍥炴寜綰姐備絾榪斿洖鐨勬椂渚紝
鏈夌殑鎿嶄綔 鐩存帴 history.back() 灝卞彲浠ヤ簡錛屾湁鐨勮璺沖埌鎸囧畾鐨勯〉闈€?br />

function goBack(backUrl){
    eval(backUrl);


goBack('window.history.back()');
goBack('document.location.href=" "');

R99 2009-06-19 16:22 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 普兰县| 金坛市| 始兴县| 高邑县| 句容市| 满洲里市| 阿拉尔市| 宜黄县| 慈利县| 嵊州市| 弥勒县| 繁峙县| 远安县| 额尔古纳市| 房产| 鄱阳县| 黄梅县| 宝兴县| 阿图什市| 呈贡县| 江华| 祥云县| 德阳市| 江阴市| 家居| 阳朔县| 乐陵市| 凉城县| 巩义市| 昌平区| 望城县| 二连浩特市| 罗江县| 兰西县| 和硕县| 庆元县| 饶平县| 安顺市| 晋城| 无为县| 太康县|