アットウィキロゴ

あいふぉる

package bomb;
 
 
import java.io.*;
import tool.*;
 
public class pro {
 
       int s,datanumber;
    String[] data=new String[36000];
       String[] name=new String[3600];
    int number;
    String[] team=new String[3600];
    int[] point=new int[2000];
     String[] subdata=new String[36000];
      String[] dic=new String[36000];
 
    public static void main(String[] args) {
       pro te=new pro();
    }
    pro(){
 
        readx("memo.csv");
 
      for(s=2;s<datanumber+1;s++){
        String[] x=data[s].split(",");
        name[s]=x[0];
       team[s]="";
      if(x.length>1)team[s]=x[1];
 
        }
 
      number=datanumber;
 
    readx("bomb.csv");
        int sx;
      int tx=0;
      for(s=2;s<datanumber+1;s++){
     String[] y=data[s].split(",");
     for(sx=2;sx<number+1;sx++){ 
     if(data[s].indexOf(name[sx])>-1)tx=tx+1;
      if(data[s].indexOf(name[sx])>-1)subdata[tx]=y[0]+","+y[1]+","+name[sx]+","+team[sx];
      }
      }
 
   number=tx;
 
   int dicnumber=0;
 
  for(s=1;s<number+1;s++){
            int h=0;
for(sx=1;sx<dicnumber+1;sx++){    
if(subdata[s].equals(dic[sx]))h=100;
}
if(h<50)dicnumber=dicnumber+1;
if(h<50)dic[dicnumber]=subdata[s];
 
}
 
  for(s=1;s<dicnumber+1;s++){    
  System.out.println(dic[s]);
    }
 
 
 
    }
 
     void writexml(String file){ 
 
    int s,sx;
 
try{ 
PrintWriter pw = new PrintWriter (new BufferedWriter(new FileWriter(file))); 
 
for(s=1;s<datanumber+1;s++){   
}
 
 
 
System.out.println("ファイルに書きこみました。"); 
pw.close(); 
} catch(IOException ep){ System.out.println("入出力エラーです。"); } 
 
 
} 
 
 
 
 
    String search(String word){
 
 
         String[] name=new String[5000];
      String[] id=new String[5000];
 
     makeutf sub6=new makeutf();
        String d=sub6.makedata(word);
 
 int datanumber;
 
        String urlx="http://movie.walkerplus.com/search/free_search.cgi?comkind=movie&keyword="+d;
 
         getdata sub7=new getdata();
        sub7.makedata(urlx,"UTF-8");
        data=sub7.data;
        datanumber=sub7.datanumber; 
 
        int s;
 
        int sx=0;
        for(s=1;s<datanumber+1;s++){
            int h=0; 
            if(data[s].indexOf("com/mv")>-1)h=h+1;
            if(data[s].indexOf("</h5>")>-1)h=h+1;
            if(h==2)    sx=sx+1;
        if(h==2)name[sx]=data[s];
 
        }
 
   int number=sx;
 
 
         for(s=1;s<number+1;s++){
         int p1=name[s].indexOf("mv");
         int p2=name[s].indexOf("/",p1);
         id[s]=name[s].substring(p1,p2);
         p1=name[s].indexOf(">",p1);
         p2=name[s].indexOf("<",p1+1);
         name[s]=name[s].substring(p1+1,p2);
 
          }
 
         String w1="";
         if(number>0)w1=id[1];
 
    return w1;
 
 
}
        int numx(String str){
 
    int nx;
 
    nx=0;
 
 try{
 
    nx=Integer.parseInt(str);
 
 }catch (Exception e) {}
 
 return nx;
 
 
 
} 
 
  void readx(String file){
 
String str;
BufferedReader br;  
int s;
s=0;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8"));  
while((str = br.readLine()) != null) {  
s=s+1;
data[s]=str;  
}
br.close();
} catch (IOException e) {System.out.println(e);}  
 
datanumber=s;
 
} 
 
 
 
}
 
最終更新:2016年08月15日 01:40