アットウィキロゴ

ins

package blog;
 
 
import tool.*;
 
public class pro {
 
  int s,datanumber;
String[] data=new String[5000];
String[][] subdata=new String[5000][10];
int[] point=new int[5000];
String[] credit=new String[5000];
 
    public static void main(String[] args) {
        pro te=new pro();
 
 
    }
 
pro(){
 
    	 String str1="%20";
 
        String id="1SJ94DEsnvhcSNHQcEP0XrgZkh-LD2PBJgRkGEv4z";
 
       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];
 
   }
   String[] x=str.split("],");
 
   int sx;
 
 for(s=1;s<x.length;s++){  
 x[s]=x[s].replace("[","");
 
 String[] y=x[s].split(",");
 for(sx=0;sx<y.length;sx++){
 y[sx]=y[sx].replace("\"","");
 y[sx]=y[sx].replace(" ","");
 y[sx]=y[sx].replace("]]}","");
 y[sx]=y[sx].replace("rows:","");
subdata[s][sx+1]=y[sx];     
 }
 }
 
 
 datanumber=x.length-1;
 
 
 
 String strx=x[0];
 
 int p1=strx.indexOf("columns");
 p1=strx.indexOf("[",p1);
 strx=strx.substring(p1+1,strx.length());
 
 
 String[] pon=strx.split(",");
 
 int creditnumber=pon.length;
 
 for(s=1;s<creditnumber+1;s++){
 credit[s]=pon[s-1].replace("\"","");    
 System.out.println(credit[s]);
 }
 
 
 
 
 
 
 
 
 
}
 
 int numx(String str){
 
    int nx;
 
    nx=0;
 
 try{
 
    nx=Integer.parseInt(str);
 
 }catch (Exception e) {}
 
 return nx;
 
 
 
}
 
 double randx(){
 
 double pi = Math.PI;
 
 
 
  double x1=Math.random();
  double x2=Math.random();
 
  double f1=Math.log(x1);
  double r=Math.sqrt(-2*f1)*Math.cos(2 * pi * x2);
 
  return r;
}
 
 
}
 
最終更新:2016年03月15日 06:20