亚洲国产精品成人精品无码区 ,亚洲AV无码乱码麻豆精品国产,狼人大香伊蕉国产WWW亚洲http://m.tkk7.com/xmp123/自己的小屋的blogzh-cnThu, 03 Jul 2025 10:31:33 GMTThu, 03 Jul 2025 10:31:33 GMT60Nutch-Crawl: org.apache.nutch.protocol.ProtocolNotFound: protocol not found for url=httphttp://m.tkk7.com/xmp123/archive/2008/07/10/213905.html自己的小屋自己的小屋Thu, 10 Jul 2008 03:38:00 GMThttp://m.tkk7.com/xmp123/archive/2008/07/10/213905.htmlhttp://m.tkk7.com/xmp123/comments/213905.htmlhttp://m.tkk7.com/xmp123/archive/2008/07/10/213905.html#Feedback0http://m.tkk7.com/xmp123/comments/commentRss/213905.htmlhttp://m.tkk7.com/xmp123/services/trackbacks/213905.html
08/07/07 04:05:41 INFO conf.Configuration: found resource crawl-urlfilter.txt at file:/home/hut/installfiles/nutch-0.9/out/production/nutch-0.9/crawl-urlfilter.txt
08/07/07 04:05:41 INFO conf.Configuration: found resource parse-plugins.xml at file:/home/hut/installfiles/nutch-0.9/out/production/nutch-0.9/parse-plugins.xml
08/07/07 04:05:41 INFO fetcher.Fetcher: fetching http://www.yale.edu/
08/07/07 04:05:41 INFO fetcher.Fetcher: fetching http://www.harvard.edu/
08/07/07 04:05:41 INFO fetcher.Fetcher: fetch of http://www.harvard.edu/ failed with: org.apache.nutch.protocol.ProtocolNotFound: protocol not found for url=http
08/07/07 04:05:41 INFO fetcher.Fetcher: fetch of http://www.yale.edu/ failed with: org.apache.nutch.protocol.ProtocolNotFound: protocol not found for url=http

解決方法:nutch-site.xml
    <property>
        
<name>plugin.includes</name>
        
<value>
            nutch-extensionpoints|
protocol-http|urlfilter-regex|parse-(text|html|js)|index-basic|query-(basic|site|url)|summary-basic|scoring-opic|urlnormalizer-(pass|regex|basic)
        
</value>
        
<description>Regular expression naming plugin directory names to
            include. Any plugin not matching 
this expression is excluded.
            In any 
case you need at least include the nutch-extensionpoints plugin. By
            
default Nutch includes crawling just HTML and plain text via HTTP,
            and basic indexing and search plugins. In order to use HTTPS please enable
            protocol
-httpclient, but be aware of possible intermittent problems with the
            underlying commons
-httpclient library.
        
</description>
    
</property>

nutch-extensionpoints|被我錯(cuò)誤的刪除了,還原以后一切工作正常. 默認(rèn)情況下nutch0.9的目錄結(jié)構(gòu)中并沒有plugin.includes這個(gè)properties, 它會(huì)載入nutch-default.xml里面的plugin.includes所以定義的所有的plugin. 在nutch-site.xml編輯/加入 plugin.includes properties的目的是為了加入我們自己的plugin而覆蓋nutch-default.xml定義的.


自己的小屋 2008-07-10 11:38 發(fā)表評(píng)論
]]>
Nutch-Crawl: ArrayIndexOutOfBoundsException http://m.tkk7.com/xmp123/archive/2008/07/10/213904.html自己的小屋自己的小屋Thu, 10 Jul 2008 03:32:00 GMThttp://m.tkk7.com/xmp123/archive/2008/07/10/213904.htmlhttp://m.tkk7.com/xmp123/comments/213904.htmlhttp://m.tkk7.com/xmp123/archive/2008/07/10/213904.html#Feedback0http://m.tkk7.com/xmp123/comments/commentRss/213904.htmlhttp://m.tkk7.com/xmp123/services/trackbacks/213904.html

java.lang.ArrayIndexOutOfBoundsException: -1

at org.apache.lucene.index.MultiReader.isDeleted(MultiReader.java:
113)

at org.apache.nutch.indexer.DeleteDuplicates$InputFormat$DDRecordReader.next(DeleteDuplicates.java:
176)

at org.apache.hadoop.mapred.MapTask$
1.next(MapTask.java:157)

at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:
46)

at org.apache.hadoop.mapred.MapTask.run(MapTask.java:
175)

at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:
126)

Exception in thread 
"main" java.io.IOException: Job failed!

at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:
604)

at org.apache.nutch.indexer.DeleteDuplicates.dedup(DeleteDuplicates.java:
439)

at org.apache.nutch.crawl.Crawl.main(Crawl.java:
135)

問題的解決方法:

https://issues.apache.org/jira/browse/NUTCH-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12515955





自己的小屋 2008-07-10 11:32 發(fā)表評(píng)論
]]>
定位Java類中的每個(gè)方法在類文件中的位置(終結(jié)篇)http://m.tkk7.com/xmp123/archive/2007/08/15/136997.html自己的小屋自己的小屋Wed, 15 Aug 2007 09:56:00 GMThttp://m.tkk7.com/xmp123/archive/2007/08/15/136997.htmlhttp://m.tkk7.com/xmp123/comments/136997.htmlhttp://m.tkk7.com/xmp123/archive/2007/08/15/136997.html#Feedback0http://m.tkk7.com/xmp123/comments/commentRss/136997.htmlhttp://m.tkk7.com/xmp123/services/trackbacks/136997.html定位Java類中的每個(gè)方法在類文件中的位置>
引起了幾個(gè)大蝦的注意并且給我指點(diǎn),當(dāng)時(shí)看了以后也沒有怎么弄,也不知道怎么弄.

這是cape給我的建議:

最直接的辦法應(yīng)該是分析class的bytecode,找到每個(gè)Method_info->Code Attribute->LineNumberTable Attribute

今天空閑得慌而是我拿這個(gè)method linenumber幾個(gè)keyword在網(wǎng)上狂搜了一把,
http://www.ibm.com/developerworks/cn/java/j-dyn0302/index.html

得到美文一篇,用Javassist來做. Javassist是一個(gè)專門操控java class的bytecode的類,可以動(dòng)態(tài)的改變其狀態(tài),我沒有深究它到底有多大的能耐,有興趣可以去它的官方網(wǎng)站看看,

http://www.csg.is.titech.ac.jp/~chiba/javassist/

但是它確實(shí)可以象cape指點(diǎn)的那樣,讓我實(shí)現(xiàn)對(duì)java類中的每個(gè)方法的定位(得到類中的某個(gè)方法的lineRange)

而是我就隨便翻了幾個(gè)例子以后根據(jù)在線文檔寫了不到100行代碼輕松搞定。:) 我高興啊。

干這個(gè)事情的兩個(gè)java的source code可以從這里得到:

http://m.tkk7.com/Files/xmp123/MethodParser.zip

代碼很簡單,我就不解釋代碼了。

這是示例結(jié)果:
------------------------------------------------------------------------------------------------------------------------------
Analyzing net.blogjava.xmp123.MyMethodInfo ...
net.blogjava.xmp123.MyMethodInfo.getLineList() locate between 56 and 56

net.blogjava.xmp123.MyMethodInfo.updateLineList() locate between 63 and 80

net.blogjava.xmp123.MyMethodInfo.addLineToLineList(int) locate between 87 and 89

net.blogjava.xmp123.MyMethodInfo.setLineList(java.util.List) locate between 95 and 97
...
------------------------------------------------------------------------------------------------------------------------------

希望這東西有用......


自己的小屋 2007-08-15 17:56 發(fā)表評(píng)論
]]>
定位Java類中的每個(gè)方法在類文件中的位置. http://m.tkk7.com/xmp123/archive/2007/03/12/103332.html自己的小屋自己的小屋Mon, 12 Mar 2007 07:40:00 GMThttp://m.tkk7.com/xmp123/archive/2007/03/12/103332.htmlhttp://m.tkk7.com/xmp123/comments/103332.htmlhttp://m.tkk7.com/xmp123/archive/2007/03/12/103332.html#Feedback9http://m.tkk7.com/xmp123/comments/commentRss/103332.htmlhttp://m.tkk7.com/xmp123/services/trackbacks/103332.html閱讀全文

自己的小屋 2007-03-12 15:40 發(fā)表評(píng)論
]]>
java io對(duì)文件的一些使用的操作http://m.tkk7.com/xmp123/archive/2006/10/24/76919.html自己的小屋自己的小屋Tue, 24 Oct 2006 03:02:00 GMThttp://m.tkk7.com/xmp123/archive/2006/10/24/76919.htmlhttp://m.tkk7.com/xmp123/comments/76919.htmlhttp://m.tkk7.com/xmp123/archive/2006/10/24/76919.html#Feedback0http://m.tkk7.com/xmp123/comments/commentRss/76919.htmlhttp://m.tkk7.com/xmp123/services/trackbacks/76919.html這東西比較有用:[轉(zhuǎn)載].出處:http://mike20049.spaces.live.com/mmm2006-09-13_01.00/
我收藏啦.:)
import java.io.*;

public class FileOperate {
? public FileOperate() {
? }

? /**
?? * 新建目錄
?? * @param folderPath String 如 c:/fqf
?? * @return boolean
?? */
? public void newFolder(String folderPath) {
??? try {
????? String filePath = folderPath;
????? filePath = filePath.toString();
????? java.io.File myFilePath = new java.io.File(filePath);
????? if (!myFilePath.exists()) {
??????? myFilePath.mkdir();
????? }
??? }
??? catch (Exception e) {
????? System.out.println("新建目錄操作出錯(cuò)");
????? e.printStackTrace();
??? }
? }

? /**
?? * 新建文件
?? * @param filePathAndName String 文件路徑及名稱 如c:/fqf.txt
?? * @param fileContent String 文件內(nèi)容
?? * @return boolean
?? */
? public void newFile(String filePathAndName, String fileContent) {

??? try {
????? String filePath = filePathAndName;
????? filePath = filePath.toString();
????? File myFilePath = new File(filePath);
????? if (!myFilePath.exists()) {
??????? myFilePath.createNewFile();
????? }
????? FileWriter resultFile = new FileWriter(myFilePath);
????? PrintWriter myFile = new PrintWriter(resultFile);
????? String strContent = fileContent;
????? myFile.println(strContent);
????? resultFile.close();

??? }
??? catch (Exception e) {
????? System.out.println("新建目錄操作出錯(cuò)");
????? e.printStackTrace();

??? }

? }

? /**
?? * 刪除文件
?? * @param filePathAndName String 文件路徑及名稱 如c:/fqf.txt
?? * @param fileContent String
?? * @return boolean
?? */
? public void delFile(String filePathAndName) {
??? try {
????? String filePath = filePathAndName;
????? filePath = filePath.toString();
????? java.io.File myDelFile = new java.io.File(filePath);
????? myDelFile.delete();

??? }
??? catch (Exception e) {
????? System.out.println("刪除文件操作出錯(cuò)");
????? e.printStackTrace();

??? }

? }

? /**
?? * 刪除文件夾
?? * @param filePathAndName String 文件夾路徑及名稱 如c:/fqf
?? * @param fileContent String
?? * @return boolean
?? */
? public void delFolder(String folderPath) {
??? try {
????? delAllFile(folderPath); //刪除完里面所有內(nèi)容
????? String filePath = folderPath;
????? filePath = filePath.toString();
????? java.io.File myFilePath = new java.io.File(filePath);
????? myFilePath.delete(); //刪除空文件夾

??? }
??? catch (Exception e) {
????? System.out.println("刪除文件夾操作出錯(cuò)");
????? e.printStackTrace();

??? }

? }

? /**
?? * 刪除文件夾里面的所有文件
?? * @param path String 文件夾路徑 如 c:/fqf
?? */
? public void delAllFile(String path) {
??? File file = new File(path);
??? if (!file.exists()) {
????? return;
??? }
??? if (!file.isDirectory()) {
????? return;
??? }
??? String[] tempList = file.list();
??? File temp = null;
??? for (int i = 0; i < tempList.length; i++) {
????? if (path.endsWith(File.separator)) {
??????? temp = new File(path + tempList[i]);
????? }
????? else {
??????? temp = new File(path + File.separator + tempList[i]);
????? }
????? if (temp.isFile()) {
??????? temp.delete();
????? }
????? if (temp.isDirectory()) {
??????? delAllFile(path+"/"+ tempList[i]);//先刪除文件夾里面的文件
??????? delFolder(path+"/"+ tempList[i]);//再刪除空文件夾
????? }
??? }
? }

? /**
?? * 復(fù)制單個(gè)文件
?? * @param oldPath String 原文件路徑 如:c:/fqf.txt
?? * @param newPath String 復(fù)制后路徑 如:f:/fqf.txt
?? * @return boolean
?? */
? public void copyFile(String oldPath, String newPath) {
??? try {
????? int bytesum = 0;
????? int byteread = 0;
????? File oldfile = new File(oldPath);
????? if (oldfile.exists()) { //文件存在時(shí)
??????? InputStream inStream = new FileInputStream(oldPath); //讀入原文件
??????? FileOutputStream fs = new FileOutputStream(newPath);
??????? byte[] buffer = new byte[1444];
??????? int length;
??????? while ( (byteread = inStream.read(buffer)) != -1) {
????????? bytesum += byteread; //字節(jié)數(shù) 文件大小
????????? System.out.println(bytesum);
????????? fs.write(buffer, 0, byteread);
??????? }
??????? inStream.close();
????? }
??? }
??? catch (Exception e) {
????? System.out.println("復(fù)制單個(gè)文件操作出錯(cuò)");
????? e.printStackTrace();

??? }

? }

? /**
?? * 復(fù)制整個(gè)文件夾內(nèi)容
?? * @param oldPath String 原文件路徑 如:c:/fqf
?? * @param newPath String 復(fù)制后路徑 如:f:/fqf/ff
?? * @return boolean
?? */
? public void copyFolder(String oldPath, String newPath) {

??? try {
????? (new File(newPath)).mkdirs(); //如果文件夾不存在 則建立新文件夾
????? File a=new File(oldPath);
????? String[] file=a.list();
????? File temp=null;
????? for (int i = 0; i < file.length; i++) {
??????? if(oldPath.endsWith(File.separator)){
????????? temp=new File(oldPath+file[i]);
??????? }
??????? else{
????????? temp=new File(oldPath+File.separator+file[i]);
??????? }

??????? if(temp.isFile()){
????????? FileInputStream input = new FileInputStream(temp);
????????? FileOutputStream output = new FileOutputStream(newPath + "/" +
????????????? (temp.getName()).toString());
????????? byte[] b = new byte[1024 * 5];
????????? int len;
????????? while ( (len = input.read(b)) != -1) {
??????????? output.write(b, 0, len);
????????? }
????????? output.flush();
????????? output.close();
????????? input.close();
??????? }
??????? if(temp.isDirectory()){//如果是子文件夾
????????? copyFolder(oldPath+"/"+file[i],newPath+"/"+file[i]);
??????? }
????? }
??? }
??? catch (Exception e) {
????? System.out.println("復(fù)制整個(gè)文件夾內(nèi)容操作出錯(cuò)");
????? e.printStackTrace();

??? }

? }

? /**
?? * 移動(dòng)文件到指定目錄
?? * @param oldPath String 如:c:/fqf.txt
?? * @param newPath String 如:d:/fqf.txt
?? */
? public void moveFile(String oldPath, String newPath) {
??? copyFile(oldPath, newPath);
??? delFile(oldPath);

? }

? /**
?? * 移動(dòng)文件到指定目錄
?? * @param oldPath String 如:c:/fqf.txt
?? * @param newPath String 如:d:/fqf.txt
?? */
? public void moveFolder(String oldPath, String newPath) {
??? copyFolder(oldPath, newPath);
??? delFolder(oldPath);

? }
}



自己的小屋 2006-10-24 11:02 發(fā)表評(píng)論
]]>
做了一個(gè)解析Java類的小東西.http://m.tkk7.com/xmp123/archive/2006/09/30/73077.html自己的小屋自己的小屋Sat, 30 Sep 2006 09:12:00 GMThttp://m.tkk7.com/xmp123/archive/2006/09/30/73077.htmlhttp://m.tkk7.com/xmp123/comments/73077.htmlhttp://m.tkk7.com/xmp123/archive/2006/09/30/73077.html#Feedback0http://m.tkk7.com/xmp123/comments/commentRss/73077.htmlhttp://m.tkk7.com/xmp123/services/trackbacks/73077.html
Mission: 檢測(cè)出java類中的所有的方法,以及這些方法在文件位于哪兩行之間.

碰到的問題:

1. 對(duì)付重載函數(shù)。
2. 如果一個(gè)方法占多行。

怎么解決:
1.利用反射得到他們所有的參數(shù),但是某一行是不是含有所有的這樣的參數(shù)。
2.根據(jù){來判斷,如果讀到的當(dāng)前行包含方法的聲明,但是不包含{,那么此時(shí)就要保存好當(dāng)前Readline讀取的內(nèi)容,然后可以用StringBuffer append一下,在下一個(gè)Readline再做比較。

不支持:
比如
public static void main(String[] args)和? // 不支持。因?yàn)榕袛嗟臅r(shí)候,前面是作為一個(gè)整體來判斷的。

public static? void main(String[] args),

當(dāng)然這點(diǎn)我們完全可以實(shí)現(xiàn)。:)

敢興趣的朋友可以和我聯(lián)系:hut@hf.webex.com








自己的小屋 2006-09-30 17:12 發(fā)表評(píng)論
]]>
從今天開始,這個(gè)blog記錄這我的java學(xué)習(xí)經(jīng)歷。希望能和大家一起探討。http://m.tkk7.com/xmp123/archive/2006/09/20/70746.html自己的小屋自己的小屋Wed, 20 Sep 2006 03:58:00 GMThttp://m.tkk7.com/xmp123/archive/2006/09/20/70746.htmlhttp://m.tkk7.com/xmp123/comments/70746.htmlhttp://m.tkk7.com/xmp123/archive/2006/09/20/70746.html#Feedback8http://m.tkk7.com/xmp123/comments/commentRss/70746.htmlhttp://m.tkk7.com/xmp123/services/trackbacks/70746.html

自己的小屋 2006-09-20 11:58 發(fā)表評(píng)論
]]>
主站蜘蛛池模板: 妞干网免费视频在线观看| 成全视频在线观看免费| 69成人免费视频| 国产午夜精品免费一区二区三区 | 亚洲AV无码1区2区久久| 亚洲明星合成图综合区在线| 久久99精品视免费看| 亚洲伊人久久大香线蕉苏妲己| 亚洲欧美一区二区三区日产| 性盈盈影院免费视频观看在线一区| 77777亚洲午夜久久多喷| 国产成人免费ā片在线观看老同学 | 在线日韩av永久免费观看| 亚洲精品乱码久久久久久蜜桃图片| 99久久精品毛片免费播放| 四虎成人免费观看在线网址| 亚洲综合国产成人丁香五月激情| 野花香高清视频在线观看免费| 青青草原亚洲视频| 久久国产免费一区二区三区| 亚洲性日韩精品国产一区二区| 亚洲熟妇成人精品一区| 日本xxwwxxww在线视频免费| 青青草97国产精品免费观看| 国产亚洲高清不卡在线观看| 亚洲精品在线免费观看视频| 亚洲日本中文字幕天天更新| 亚洲av成人一区二区三区在线观看 | 国产精品亚洲二区在线观看 | 亚洲中文字幕一二三四区苍井空| 暖暖在线日本免费中文| 特色特黄a毛片高清免费观看| 亚洲AV无码国产精品麻豆天美| 精品女同一区二区三区免费站| 亚洲国产精品无码久久久蜜芽 | 在线观看人成网站深夜免费| 五月天婷婷免费视频| 亚洲国产精品久久| 国产免费久久精品99久久| 亚洲网址在线观看你懂的| 四虎影院在线免费播放|