アットウィキロゴ

co9998

package tv8;
 
import tool.*;
 
public class pro {
 
 int number;
 String[] name=new String[600];
   String[] dic=new String[6000];
  String[] namey=new String[6000];
   int s;
int delta;
   String[] t=new String[4000];
   String[] year=new String[4000];
     String[] a=new String[4000];
   String[] b=new String[4000];
   int[][] point=new int[500][800];
 
 
   public static void main(String[] args) {
        pro te=new pro();
    }
 
    pro(){
 
 
        String id="1J3_9vjZZ7vUmQT8MORN_tDi100TsDOYCjUQPS-VH";
 
        rate sub2=new rate();
        sub2.makedata(id);
        t=sub2.t;
       year=sub2.year;
      a=sub2.a;
      b=sub2.b;
 
 
 
     int sx;
 
     int delta=0;
 
       for(s=1;s<761;s++){
     int h=0;
 for(sx=1;sx<delta+1;sx++){
 if(a[s].equals(dic[sx]))h=100;
 }    
 if(h<60)delta=delta+1;
 if(h<60)dic[delta]=a[s];
 }
 
 
      for(s=1;s<761;s++){
     int h=0;
 for(sx=1;sx<delta+1;sx++){
 if(b[s].equals(dic[sx]))h=100;
 }    
 if(h<60)delta=delta+1;
 if(h<60)dic[delta]=b[s];
 }  
 
 System.out.println(delta);     
 
       for(s=1;s<761;s++){
     int h=0;
 for(sx=1;sx<delta+1;sx++){
 if(a[s].equals(dic[sx]))point[sx][s]=100;
 }    
 }
 
 
      for(s=1;s<761;s++){
     int h=0;
 for(sx=1;sx<delta+1;sx++){
 if(b[s].equals(dic[sx]))point[sx][s]=100;
 }    
 
 }  
 
 for(s=1;s<delta+1;s++){
 System.out.print(dic[s]);
 for(sx=1;sx<761;sx++){
 String y1=year[sx];
if(point[s][sx]>50)System.out.print(","+y1);
 }
  System.out.println("");
 }    
 
 
 
 
 
 
 
    }
 
 
}
 
 
 
package tv8;
 
 
import tool.*;
 
public class rate{
 
int s,datanumber;
String[] data=new String[4000];
    String[] t=new String[4000];
   String[] year=new String[4000];
     String[] a=new String[4000];
   String[] b=new String[4000];
   int number;
 
 
    void makedata(String id){
 
         String str1="%20";
 
 
       String urlx="https://www.googleapis.com/fusiontables/v1/query?sql=SELECT";
       urlx=urlx+str1+"*"+str1+"FROM"+str1+id+str1;
       urlx=urlx+"&key=AIzaSyAH0WCAXRIdHdbI-6bnMSN4kVDDZZmGyqY";
 
        getdata sub=new getdata();
        sub.makedata(urlx,"UTF-8");
        data=sub.data;
        datanumber=sub.datanumber;
 
        String str="";
        for(s=1;s<datanumber+1;s++){
        str=str+data[s];
 
        }
 
        str=str.replace("\"rows\": ","");
 
        String[] x=str.split("],");
         for(s=1;s<x.length;s++){
           String[] y=x[s].split(",");
           t[s]=y[1];
         year[s]=y[0];
         a[s]=y[2];
         b[s]=y[3];
         }
 
 
         for(s=1;s<x.length;s++){
 
           t[s]=cg(t[s]);  
 year[s]=cg(year[s]);
 
 
           b[s]=cg(b[s]);  
 a[s]=cg(a[s]);
 
 
         }
 
         number=x.length-1;
 
 
 
 
    }
    String cg(String c){
 
        int p1=c.indexOf("\"");
        int p2=c.indexOf("\"",p1+1);
        c=c.substring(p1+1,p2);
        return c;
    }
 
 
}
 
最終更新:2016年09月07日 11:00