アットウィキロゴ

ひkkp;;

package plus;
 
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[] date=new String[50000];
      int number;
 
 
    public static void main(String[] args) {
        pro tes=new pro();
    }
 
    pro(){
 
   readx("data.csv");
int sx=0;
    for(s=1;s<datanumber+1;s++){
  String[] x=data[s].split(",");
 x[0]=x[0].replace("\"","");
 int h=0;
  if(x[1].indexOf("201606")>-1)h=h+1;
   if(x[0].length()>0)h=h+1;
 
   if(h==2)sx=sx+1;
   if(h==2)subx[sx]=s; 
    if(h==2)th[sx]=x[0];
    if(h==2)time[sx]=x[8];
    if(h==2)date[sx]=x[1];
    }
 
    number=sx;
 
    int tr;
    for(tr=1;tr<number+1;tr++){
 
sx=subx[tr];
 
readx("gdata/"+sx+".txt");
 
for(s=1;s<datanumber+1;s++){
String[] x=data[s].split("△");
String p2="8"+date[tr].substring(6,8);
int m=numx(p2)-800;
System.out.println("2016,6,"+m+","+time[tr]+","+th[tr]+","+x[0]+","+x[4]+","+x[1]+","+x[2]);    
}        
 
 
 
 
 
 
    }
 
 
 
    }
 
    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日 12:49