码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
根据IP定位获取城市代码
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
ibatis 使用 in 查询的几种XML写法
1.传入參数是数组 使用 string[] arrays = new string[] { "1", "2", "3" }; Reader.QueryForList("Ibatisnet.dao.Test", strValue ); 2.使用上面的数组还能够使用对象中数组方式,写法有点差别 3. ....
分类:其他好文   时间:2015-01-31 16:12:12    阅读次数:206
javascript Date format(js日期格式化) (转)
// 对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
C#随机生成连续多少个十六进制数字
1.调用系统函数生成全球唯一标识Guid.NewGuid().ToString();2.生成16组十六进制数 string randmData=Guid.NewGuid().ToString().Substring(24,12)+Guid.NewGuid().ToString(...
分类:Windows程序   时间:2015-01-31 16:04:00    阅读次数:295
C# 网络操作类
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 ...
分类:Windows程序   时间:2015-01-31 14:53:10    阅读次数:234
Substring with Concatenation of All Words
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
【BZOJ】【1923】【Sdoi2010】外星千足虫
高斯消元解Xor方程组 ZYF Orz 这题……不作死就不会死T^T,用bitset确实比较快,而且可以从string直接转成bitset(构造函数)。 但问题是我把转过来以后的顺序搞反了……原本以为是0~n-1是系数,第n位是方程的结果, 事实上bitset和string里的顺序是反过来的...
分类:其他好文   时间:2015-01-31 14:23:46    阅读次数:200
uva 1368 DNA Consensus String 字符串
字符串水题
分类:其他好文   时间:2015-01-31 14:20:42    阅读次数:117
java基础:面试题【不断更新】
1: Q:String s1 = new String("hello");这句话创建了几个对象? A:两个或者一个。字符串是一个常用的类型。JVM中存在常量池,保存了大量的字符串对象,并共享使用。 如果常量池中没有“hello”,则在常量池中创建“hello”,然后在堆中开辟一块空间存储new的对象。如果常量池中已经存在“hello”,则只需要创建new一个对象。 2: Stri...
分类:编程语言   时间:2015-01-31 12:59:44    阅读次数:244
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!