public String getCityID() throws IOException{ URL url = new URL("http://61.4.185.48:81/g/"); HttpURLConnection urlcon = (HttpURLConnecti...
分类:
其他好文 时间:
2015-01-31 17:36:50
阅读次数:
739
import java.awt.*;
import java.awt.event.*;
public class TFMath {
public static void main(String[] args) {
new TFFrame().launchFrame();
}
}
class TFFrame extends Frame {
TextField num1,num2,nu...
分类:
其他好文 时间:
2015-01-31 16:28:16
阅读次数:
174
1.传入參数是数组 使用 string[] arrays = new string[] { "1", "2", "3" }; Reader.QueryForList("Ibatisnet.dao.Test", strValue ); 2.使用上面的数组还能够使用对象中数组方式,写法有点差别 3. ....
分类:
其他好文 时间:
2015-01-31 16:12:12
阅读次数:
206
// 对Date的扩展,将 Date 转化为指定格式的String // 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符, // 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字) // 例子: // (new Date...
分类:
编程语言 时间:
2015-01-31 16:05:35
阅读次数:
245
1.调用系统函数生成全球唯一标识Guid.NewGuid().ToString();2.生成16组十六进制数 string randmData=Guid.NewGuid().ToString().Substring(24,12)+Guid.NewGuid().ToString(...
class h { public static string getPro(HtmlNode node, string proname) { return node.GetAttributeValue(proname, ""); } public static HtmlNodeCollection Parse(string htm,string xpath) { var doc = new ...
You are given a string,S, and a list of words,L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenati...
分类:
其他好文 时间:
2015-01-31 14:27:15
阅读次数:
145
高斯消元解Xor方程组 ZYF Orz 这题……不作死就不会死T^T,用bitset确实比较快,而且可以从string直接转成bitset(构造函数)。 但问题是我把转过来以后的顺序搞反了……原本以为是0~n-1是系数,第n位是方程的结果, 事实上bitset和string里的顺序是反过来的...
分类:
其他好文 时间:
2015-01-31 14:23:46
阅读次数:
200
1:
Q:String s1 = new String("hello");这句话创建了几个对象?
A:两个或者一个。字符串是一个常用的类型。JVM中存在常量池,保存了大量的字符串对象,并共享使用。
如果常量池中没有“hello”,则在常量池中创建“hello”,然后在堆中开辟一块空间存储new的对象。如果常量池中已经存在“hello”,则只需要创建new一个对象。
2:
Stri...
分类:
编程语言 时间:
2015-01-31 12:59:44
阅读次数:
244