package f5;
import tool.*;
public class ftable {
int s,datanumber;
String[] data=new String[5000];
String[] v=new String[500];
String[] code=new String[5000];
int number;
int[] point=new int[600];
void makedata(String codex){
String str1="%20";
String id="1A5QolQncypfPERmNon9fp_ZtJ_ro5lhyi4yZHtaU";
String urlx="https://www.googleapis.com/fusiontables/v1/query?sql=SELECT";
urlx=urlx+str1+"*"+str1+"FROM"+str1+id+str1+"where"+str1+"name='"+codex+"'";
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("]");
String[] y=x[1].split(",");
for(s=1;s<140;s++){
v[s]=rev(y[s+1]);
point[s]=numx(v[s]);
}
}
int numx(String str){
int nx;
nx=0;
try{
nx=Integer.parseInt(str);
}catch (Exception e) {}
return nx;
}
String rev(String str){
int p1=str.indexOf("\"");
int p2=str.indexOf("\"",p1+1);
String strx="";
if(p1>-1)strx=str.substring(p1+1,p2);
return strx;
}
}
最終更新:2015年10月20日 08:38