アットウィキロゴ

お66LL

package base2;
 
import tool.*;
 
public class pro {
 int s,datanumber;
  String[] data=new String[5000];
  String[] team_h=new String[5000];
   String[] team_v=new String[5000];
   String[] code=new String[5000];
      String[] name=new String[5000];
   String[] team=new String[5000];
 
   String[] code_h=new String[5000];
   String[] code_v=new String[5000];
   int number;
 
      String[] namex=new String[5000];
    String[] teamx=new String[5000];
       String[] codex=new String[5000];
      String[] subdata=new String[5000];
 
    public static void main(String[] args) {
       pro te=new pro();
    }
    pro(){
 
         readfile sub7=new readfile();
        sub7.makedata("p.csv","UTF-8");
        data=sub7.data;
        datanumber=sub7.datanumber; 
 
        int sx=1;
        for(s=2;s<datanumber+1;s++){
 String[] x=data[s].split(",");
 int n=numx(x[0]);
 int z=0;
 if(data[s].indexOf("home")>-1)z=100;
 if(z>50)team_h[n]=x[2];        
 if(z<50)team_v[n]=x[2];  
        }
 
 
        for(s=1;s<484;s++){
      if(team_h[s].indexOf("ヤクルト")>-1)code_h[s]="ヤクルト";
      if(team_h[s].indexOf("中日")>-1)code_h[s]="中日";
      if(team_h[s].indexOf("DeNA")>-1)code_h[s]="横浜";
      if(team_h[s].indexOf("阪神")>-1)code_h[s]="阪神";
       if(team_h[s].indexOf("巨人")>-1)code_h[s]="読売";
      if(team_h[s].indexOf("広島")>-1)code_h[s]="広島";
      if(team_h[s].indexOf("ソフトバンク")>-1)code_h[s]="福岡";
      if(team_h[s].indexOf("日本ハム")>-1)code_h[s]="札幌";
      if(team_h[s].indexOf("ロッテ")>-1)code_h[s]="千葉";
      if(team_h[s].indexOf("阪神")>-1)code_h[s]="阪神";
       if(team_h[s].indexOf("オリックス")>-1)code_h[s]="大阪";
      if(team_h[s].indexOf("楽天")>-1)code_h[s]="仙台";
       if(team_h[s].indexOf("西武")>-1)code_h[s]="西武";
 
        if(team_v[s].indexOf("ヤクルト")>-1)code_v[s]="ヤクルト";
      if(team_v[s].indexOf("中日")>-1)code_v[s]="中日";
      if(team_v[s].indexOf("DeNA")>-1)code_v[s]="横浜";
      if(team_v[s].indexOf("阪神")>-1)code_v[s]="阪神";
       if(team_v[s].indexOf("巨人")>-1)code_v[s]="読売";
      if(team_v[s].indexOf("広島")>-1)code_v[s]="広島";
      if(team_v[s].indexOf("ソフトバンク")>-1)code_v[s]="福岡";
      if(team_v[s].indexOf("日本ハム")>-1)code_v[s]="札幌";
      if(team_v[s].indexOf("ロッテ")>-1)code_v[s]="千葉";
      if(team_v[s].indexOf("阪神")>-1)code_v[s]="阪神";
       if(team_v[s].indexOf("オリックス")>-1)code_v[s]="大阪";
      if(team_v[s].indexOf("楽天")>-1)code_v[s]="仙台";
       if(team_v[s].indexOf("西武")>-1)code_v[s]="西武";
        }
 
 
 
         readfile sub=new readfile();
        sub.makedata("m.csv","UTF-8");
        data=sub.data;
        datanumber=sub.datanumber; 
 
       for(s=2;s<datanumber+1;s++){
 String[] x=data[s].split(",");
     code[s-1]=x[0];
     name[s-1]=x[3];
     team[s-1]=x[1];
     }
 
 
        number=datanumber-1;
 
 
        int tr=1;
        for(tr=1;tr<484;tr++){ 
 
        String tt=code_v[tr];
 
        readfile sub4=new readfile();
        sub.makedata("visit_ppp/"+tr+".txt","UTF-8");
        data=sub.data;
        datanumber=sub.datanumber; 
 
 for(s=1;s<datanumber+1;s++){
 String[] x=data[s].split(",");
namex[s]=x[2];    
int p1=namex[s].indexOf("(");
namex[s]=namex[s].substring(0,p1);
 
 
     }
 
 
 
 
 for(s=1;s<datanumber+1;s++){
String cc="";
for(sx=1;sx<number+1;sx++){
    int h=0;
if(tt.equals(team[sx]))h=h+1;
 if(name[sx].indexOf(namex[s])>-1)h=h+1;   
 if(h==2)cc=code[sx]; 
}
codex[s]=cc;
subdata[s]=data[s]+","+namex[s]+","+codex[s];
}
 
 
    writefile sub77=new writefile();
    sub77.data=subdata;
    sub77.datanumber=datanumber;
    sub77.makedata("visit_pppp/"+tr+".txt");
        }
 
 
 
    }
 
       int numx(String str){
 
    int nx;
 
    nx=0;
 
 try{
 
    nx=Integer.parseInt(str);
 
 }catch (Exception e) {}
 
 return nx;
 
 
 
}
 
}
 
最終更新:2016年10月07日 10:33