アットウィキロゴ

fccv0

package mov;
 
import java.io.*;
import tool.*;
 
public class pro {
 
    int s,datanumber;
    String[] data=new String[50000];
  int[] day=new int[40000];
    int[] month=new int[40000];
    int[] year=new int[40000];
    String[] th=new String[40000];
     String[] time=new String[40000];
      int[] subx=new int[40000];
 
       String[] subdata=new String[50000];
      int number;
 
    public static void main(String[] args) {
        pro t=new pro();
    }
 
    pro(){
 
    readx("ren.csv");
 
    for(s=2;s<datanumber+1;s++){
    String[] x=data[s].split(",");
    day[s-1]=numx(x[6]);
    month[s-1]=numx(x[5]);
    year[s-1]=numx(x[4]);
    th[s-1]=x[1];
    time[s-1]=x[3];
    }
 
    int delta=datanumber;
 
    int y1=2014;
    int m1=2;
    int n=0;
 
    for(n=1;n<26;n++){
 
        m1=m1+1;
 
        if(m1>12)y1=y1+1;
        if(m1>12)m1=1;
 
 
    int sx=0;    
    for(s=1;s<delta;s++){
    int h=0;
    if(year[s]==y1)h=h+1;
    if(month[s]==m1)h=h+1;
    if(day[s]>0)h=h+1;
    if(h==3)sx=sx+1;    
    if(h==3)subx[sx]=s;    
    }
 
    int subnumber=sx;
 
    System.out.println(subnumber);    
 
    int tr;
    int tx=0;
     for(tr=1;tr<subnumber+1;tr++){
         sx=subx[tr]; 
     readx("data/"+sx+".txt");
 
     th[sx]=th[sx].replace("サイト","");
     for(s=1;s<datanumber+1;s++){
     int z=0;
     if(data[s].indexOf("http")>-1)z=100;
     if(z<50)tx=tx+1;    
     if(z<50)subdata[tx]=year[sx]+","+month[sx]+","+day[sx]+","+time[sx]+","+th[sx]+","+data[s];    
     }
     }
 
     number=tx;
 
     System.out.println(number);
 
     String str=y1+"0"+m1;
     if(m1>9)str=""+y1+m1;
 
 
     writefile sub5=new writefile();
     sub5.data=subdata;
     sub5.datanumber=number;
     sub5.makedata("gdata/"+str+".txt");
 
    }   
 
 
 
    }
 
     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年07月04日 11:27