亚洲国产精品成人精品无码区 ,亚洲AV无码乱码麻豆精品国产,狼人大香伊蕉国产WWW亚洲http://www.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://www.tkk7.com/xmp123/archive/2008/07/10/213905.html自己的小屋自己的小屋Thu, 10 Jul 2008 03:38:00 GMThttp://www.tkk7.com/xmp123/archive/2008/07/10/213905.htmlhttp://www.tkk7.com/xmp123/comments/213905.htmlhttp://www.tkk7.com/xmp123/archive/2008/07/10/213905.html#Feedback0http://www.tkk7.com/xmp123/comments/commentRss/213905.htmlhttp://www.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://www.tkk7.com/xmp123/archive/2008/07/10/213904.html自己的小屋自己的小屋Thu, 10 Jul 2008 03:32:00 GMThttp://www.tkk7.com/xmp123/archive/2008/07/10/213904.htmlhttp://www.tkk7.com/xmp123/comments/213904.htmlhttp://www.tkk7.com/xmp123/archive/2008/07/10/213904.html#Feedback0http://www.tkk7.com/xmp123/comments/commentRss/213904.htmlhttp://www.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://www.tkk7.com/xmp123/archive/2007/08/15/136997.html自己的小屋自己的小屋Wed, 15 Aug 2007 09:56:00 GMThttp://www.tkk7.com/xmp123/archive/2007/08/15/136997.htmlhttp://www.tkk7.com/xmp123/comments/136997.htmlhttp://www.tkk7.com/xmp123/archive/2007/08/15/136997.html#Feedback0http://www.tkk7.com/xmp123/comments/commentRss/136997.htmlhttp://www.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://www.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://www.tkk7.com/xmp123/archive/2007/03/12/103332.html自己的小屋自己的小屋Mon, 12 Mar 2007 07:40:00 GMThttp://www.tkk7.com/xmp123/archive/2007/03/12/103332.htmlhttp://www.tkk7.com/xmp123/comments/103332.htmlhttp://www.tkk7.com/xmp123/archive/2007/03/12/103332.html#Feedback9http://www.tkk7.com/xmp123/comments/commentRss/103332.htmlhttp://www.tkk7.com/xmp123/services/trackbacks/103332.html閱讀全文

自己的小屋 2007-03-12 15:40 發(fā)表評(píng)論
]]>
java io對(duì)文件的一些使用的操作http://www.tkk7.com/xmp123/archive/2006/10/24/76919.html自己的小屋自己的小屋Tue, 24 Oct 2006 03:02:00 GMThttp://www.tkk7.com/xmp123/archive/2006/10/24/76919.htmlhttp://www.tkk7.com/xmp123/comments/76919.htmlhttp://www.tkk7.com/xmp123/archive/2006/10/24/76919.html#Feedback0http://www.tkk7.com/xmp123/comments/commentRss/76919.htmlhttp://www.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://www.tkk7.com/xmp123/archive/2006/09/30/73077.html自己的小屋自己的小屋Sat, 30 Sep 2006 09:12:00 GMThttp://www.tkk7.com/xmp123/archive/2006/09/30/73077.htmlhttp://www.tkk7.com/xmp123/comments/73077.htmlhttp://www.tkk7.com/xmp123/archive/2006/09/30/73077.html#Feedback0http://www.tkk7.com/xmp123/comments/commentRss/73077.htmlhttp://www.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://www.tkk7.com/xmp123/archive/2006/09/20/70746.html自己的小屋自己的小屋Wed, 20 Sep 2006 03:58:00 GMThttp://www.tkk7.com/xmp123/archive/2006/09/20/70746.htmlhttp://www.tkk7.com/xmp123/comments/70746.htmlhttp://www.tkk7.com/xmp123/archive/2006/09/20/70746.html#Feedback8http://www.tkk7.com/xmp123/comments/commentRss/70746.htmlhttp://www.tkk7.com/xmp123/services/trackbacks/70746.html

自己的小屋 2006-09-20 11:58 發(fā)表評(píng)論
]]>
主站蜘蛛池模板: 四虎在线最新永久免费| 最近2019中文免费字幕在线观看| 91高清免费国产自产| 亚洲天堂久久精品| 99久在线国内在线播放免费观看| 亚洲va国产va天堂va久久| 永久免费不卡在线观看黄网站| 中文字幕久久亚洲一区| 成人性做爰aaa片免费看| 亚洲av无码无在线观看红杏| 国内少妇偷人精品视频免费| 亚洲av日韩av不卡在线观看| 无码国产精品一区二区免费式芒果| 亚洲av不卡一区二区三区| 亚洲美女免费视频| 亚洲xxxx视频| 免费人妻av无码专区| 久久伊人免费视频| 婷婷亚洲久悠悠色悠在线播放| 无码人妻久久一区二区三区免费 | 免费观看激色视频网站(性色) | 亚洲国产精品网站久久| 国产成人精品免费午夜app| 精品丝袜国产自在线拍亚洲| 国产高清在线免费| 人妻免费久久久久久久了| 亚洲成AV人片一区二区| 4hu四虎最新免费地址| 国产亚洲欧美在线观看| 综合亚洲伊人午夜网 | 免费a级毛片无码av| 精品一区二区三区免费观看| 青青草原精品国产亚洲av| 成人免费网站在线观看| 精品无码一级毛片免费视频观看| 亚洲国产高清人在线| 免费爱爱的视频太爽了| 9久热精品免费观看视频| 亚洲欧洲高清有无| 亚洲AⅤ永久无码精品AA| 91福利免费视频|