package x65;
import tool.*;
public class pro {
int s,datanumber;
String[] data=new String[5000];
String[] codex=new String[5000];
String[][] namex=new String[50][50];
String[] name=new String[5000];
int[] year=new int[5];
public static void main(String[] args) {
pro te=new pro();
}
pro(){
String str1="%20";
String id="1j2QQ5hkk8hOmBlZpZSd-Ar1CTZos8cs-N_bps6da";
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];
}
int p1=str.indexOf("rows");
p1=str.indexOf(":",p1);
str=str.substring(p1,str.length());
int sx;
int tx=0;
String[] x=str.split("]");
for(s=0;s<x.length;s++){
String[] y=x[s].split(",");
for(sx=0;sx<y.length;sx++){
if(y[sx].indexOf("\"")>-1)tx=tx+1;
if(y[sx].indexOf("\"")>-1)name[tx]=y[sx];
}}
int number=tx;
for(s=1;s<number+1;s++){
p1=name[s].indexOf("\"");
int p2=name[s].indexOf("\"",p1+1);
name[s]=name[s].substring(p1+1,p2);
}
int s1=1;
int s2=0;
year[1]=2015;
year[2]=2014;
year[3]=2013;
year[4]=2012;
for(s=1;s<number+1;s++){
s2=s2+1;
if(s2>4)s1=s1+1;
if(s2>4)s2=1;
namex[s2][s1]=name[s];
System.out.println(year[s2]+","+s1+","+namex[s2][s1]);
}
}
}
最終更新:2016年09月01日 06:48