アットウィキロゴ

hhh7y

package bs;
 
import java.io.File;
import tool.*;
 
public class pro {
 
   int s,datanumber;
     String[] data=new String[5000];
   int[] month=new int[16000];
   int[] year=new int[16000];
     int[] th=new int[160];
    int[] subx=new int[500];
     int[] point=new int[14600];
        String[] delta=new String[50000];
      String[] subdata=new String[50000];
 
 
    public static void main(String[] args) {
        pro t=new pro();
    }
    pro(){
 
 
        readfile sub=new readfile();
        sub.makedata("data.csv","UTF-8");
        data=sub.data;
        datanumber=sub.datanumber;
 
        for(s=2;s<datanumber+1;s++){
       String[] y=data[s].split(",");
       int m=numx(y[0]);   
      month[s-1]=numx(y[4]);
       year[s-1]=numx(y[3]);
       point[s-1]=m;
       delta[s-1]=data[s]; 
 
        }
 
        int number=datanumber-1;
        int pp;
        int y1=2014;
        int m1=2;
 
        for(pp=1;pp<25;pp++){
 
            m1=m1+1;
            if(m1>12)y1=y1+1;
            if(m1>12)m1=1;
 
        int subnumber=0;
        int sx=0;
      for(s=1;s<number+1;s++){
      int h=0; 
      if(year[s]==y1)h=h+1;
      if(month[s]==m1)h=h+1;
      if(h==2)sx=sx+1;
      if(h==2)subx[sx]=s;
      }
 
        subnumber=sx;
 
        int tr;
        int n=0;
     for(tr=1;tr<subnumber+1;tr++){   
 
         int t2=subx[tr];
 
        readfile sub2=new readfile();
        sub2.makedata("data/"+point[t2]+".txt","UTF-8");
        data=sub2.data;
        datanumber=sub2.datanumber;
 
 
 
           for(s=1;s<datanumber+1;s++){
             n=n+1;
             subdata[n]=delta[t2]+","+data[s];
         }
 
 
 
     }
 
 
    datanumber=n;
 
    String k=""+y1+"0"+m1;
    if(m1>9)k=""+y1+m1;
 
        writefile ww=new writefile();
        ww.data=subdata;
        ww.datanumber=datanumber;
        ww.makedata("gdata/"+k+".txt");
 
        }
 
 
 
 
 
 
 
    }
     int numx(String str){
 
    int nx;
 
    nx=0;
 
 try{
 
    nx=Integer.parseInt(str);
 
 }catch (Exception e) {}
 
 return nx;
 
 
 
}
 
 
 
}
 
最終更新:2016年07月07日 23:52