| |
int cint(float stsid){ int cint = 0; try{ int stsid1 = 0; if(stsid > 0){ if((stsid - (int)stsid > 0) && (stsid - (int)stsid != 0.5)) stsid1 = (int)(stsid + 0.5); if(stsid - (int)stsid == 0.5){ if(((int)(stsid-0.5))%2 == 0) stsid1 = (int)(stsid - 0.5); else stsid1 = (int)(stsid + 0.5); } if(stsid - (int)stsid ==0) stsid1 = (int)stsid; }else{ stsid = -stsid; if((stsid - (int)stsid > 0) && (stsid - (int)stsid != 0.5)) stsid1 = - (int)(stsid + 0.5); if(stsid - (int)stsid == 0.5){ if(((int)(stsid-0.5))%2 == 0) stsid1 = - (int)(stsid - 0.5); else stsid1 = - (int)(stsid + 0.5); } if(stsid - (int)stsid ==0) stsid1 = - (int)stsid; } cint = stsid1; }catch(exception e){} return cint; }
long clng(float numb){ int nu = 0; long clng = 0; try{ nu = cint(numb); clng = (long) nu; }catch(exception e){} return clng; }
float dealfloat(string s){ s=dealnull(s); if (s.equals("")) return 0; return float.parsefloat(s); }
string[] split(string source,string div){ int arynum = 0,intidx=0,intidex=0,div_length = div.length(); if(source.compareto("")!=0){ if(source.indexof(div)!=-1){ intidx = source.indexof(div); for(int intcount =1 ; ; intcount++){ if(source.indexof(div,intidx+div_length)!=-1){ intidx= source.indexof(div,intidx+div_length); arynum = intcount; } else {arynum+=2;break;} } }else arynum =1; }else arynum = 0; intidx=0; intidex=0; string[] returnstr = new string[arynum]; if(source.compareto("")!=0){ if(source.indexof(div)!=-1){ intidx = (int)source.indexof(div); returnstr[0]= (string)source.substring(0,intidx); for(int intcount =1 ; ; intcount++){ if(source.indexof(div,intidx+div_length)!=-1){ intidex=(int)source.indexof(div,intidx+div_length); returnstr[intcount] = (string)source.substring(intidx+div_length,intidex); intidx = (int)source.indexof(div,intidx+div_length); } else { returnstr[intcount] = (string)source.substring(intidx+div_length,source.length()); break; } } } else {returnstr[0] = (string)source.substring(0,source.length());return returnstr;} } else {return returnstr;} return returnstr; }
public class stc_rsyb_name { public int pos = -1; public string name = ""; public string host = ""; public string home1 = ""; public string home2 = ""; public string home3 = ""; } public class stc_syb_inf { string reg_name = ""; string g_syb = ""; string r_syb = ""; } file://输出空格 void showblank(int num,jspwriter out){ try{ for(int i=0;i<=num;i++) out.print(" "); } catch(exception e){} }
string g_syb_mk(){ string g_syb_mk = nul
|
|