Article View: borland.public.jbuilder.java.api
Article #145I don't find an source of brute force!
From: JPluto
Date: Tue, 25 May 2004 15:56
Date: Tue, 25 May 2004 15:56
44 lines
1982 bytes
1982 bytes
Hi All,
I have a problem:
I don't find an source of brute force!
Can we help me?
I have already seen this source:
import java.util.*;
public class BFMatch {
public static void main(String[] args) {
if(args.length!=2) {
System.err.println("Usage: java -cp . BFMatch <String> <match>");
System.exit(1);
}
List l = bruteForceMatch(args[0],args[1]);
Iterator i = l.iterator();
while(i.hasNext()){
System.out.println(i.next());
}
}
public static List bruteForceMatch(String data, String match) {
// do some valididity checks here
// create results
List list = new LinkedList();
for(int n=0;n<(data.length()-match.length());n++){
for(int
m=0;(m<match.length())&&(data.charAt(m+n)==match.charAt(m));m++)
if(m>=match.length()-1) list.add(new Integer(n));
}
return list;
}
}
For you is ok?
What is possible that this source prove all words?
I will prove di source at the earliest!
Technical Details
Message-ID:
<H0Ksc.72387$Qc.2938886@twister1.libero.it>Path:
arc1-ca.pugleaf.net!controlnews3.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!nntp.infostrada.it!twister1.libero.it.POSTED!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,9b97c1180da608d,start X-Google-Attributes: gid1089d0,public Path: arc1-ca.pugleaf.net!controlnews3.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!nntp.infostrada.it!twister1.libero.it.POSTED!not-for-mail From: "JPluto" <spot85@libero.it> Newsgroups: borland.public.jbuilder.java.api Subject: I don't find an source of brute force! Lines: 47 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: <H0Ksc.72387$Qc.2938886@twister1.libero.it> Date: Tue, 25 May 2004 15:56:23 GMT NNTP-Posting-Host: 151.24.189.160 X-Complaints-To: abuse@libero.it X-Trace: twister1.libero.it 1085500583 151.24.189.160 (Tue, 25 May 2004 17:56:23 MET DST) NNTP-Posting-Date: Tue, 25 May 2004 17:56:23 MET DST Organization: [Infostrada]