2013年9月24日
摘要:
package http.demo;import java.io.IOException;import org.apache.commons.httpclient.*;import org.apache.commons.httpclient.methods.*;/*** 提交参数演示* 该程序连接到一个用于查询手机号码所属地的页面* 以便查询号码段1330227所在 的省份以及城市* @author Liudong*/public class SimpleHttpClient {public static void main(String[] args) throws IOException{
阅读全文
posted @ 2013-09-24 14:09
沽月
阅读(1055)
推荐(0)
2013年9月23日
摘要:
packagecom.utils;importjava.io.BufferedReader;importjava.io.IOException;importjava.io.InputStreamReader;importjava.util.List;importorg.apache.http.HttpEntity;importorg.apache.http.HttpResponse;importorg.apache.http.client.ClientProtocolException;importorg.apache.http.client.methods.HttpPost;importor
阅读全文
posted @ 2013-09-23 19:33
沽月
阅读(776)
推荐(0)
2013年7月26日
摘要:
通过HashSet踢除重复元素public staticListremoveDuplicate(Listlist){ HashSeth = newHashSet(list);list.clear(); list.addAll(h);return list; } 方法一:循环元素删除publics...
阅读全文
posted @ 2013-07-26 10:47
沽月
阅读(539)
推荐(0)
2013年4月15日
摘要:
String eL = "[0-9]{4}-[0-9]{2}-[0-9]{2}"; Pattern p = Pattern.compile(eL); Matcher m = p.matcher(date); boolean dateFlag = m.matches(); if (!dateFlag) { System.out.println("格式错误"); } System.out.println("格式正确");
阅读全文
posted @ 2013-04-15 13:51
沽月
阅读(1466)
推荐(0)
2013年3月19日
摘要:
Stringname="宋";inta=name.getBytes("gb2312").length;System.out.println(a);//a=2a=name.getBytes("utf-8").length;//一个汉字占3个字节System.out.println(a);//a=3a=name.getBytes("gbk").length;System.out.println(a);//a=2a=name.getBytes("ISO8859-1").length;//一个汉字占一个
阅读全文
posted @ 2013-03-19 13:17
沽月
阅读(199)
推荐(0)
2013年2月5日
摘要:
assertThat使用方法一般匹配符1、assertThat( testedNumber, allOf( greaterThan(8), lessThan(16) ) );注释:allOf匹配符表明如果接下来的所有条件必须都成立测试才通过,相当于“与”(&&)2、assertThat( testedNumber, anyOf( greaterThan(16), lessThan(8) ) );注释:anyOf匹配符表明如果接下来的所有条件只要有一个成立则测试通过,相当于“或”(||)3、assertThat( testedNumber, anything() );注释:any
阅读全文
posted @ 2013-02-05 16:22
沽月
阅读(213)
推荐(0)
2013年2月4日
摘要:
"bs"bs.endsWith(s1)和s1.endsWith("bs"),差别很大描述java.lang.String.endsWith()方法返回的测试该字符串是否以指定后缀sffix结束声明以下是声明java.lang.String.endsWith()方法public boolean endsWith(String suffix)参数suffix-- This is the suffix.返回值该方法返回一个true,如果参数表示的字符序列是由该对象表示的字符序列的后缀,否则返回false.异常NA实例下面的示例演示使用的java.lang.St
阅读全文
posted @ 2013-02-04 21:45
沽月
阅读(422)
推荐(0)
2013年1月17日
摘要:
http://www.51testing.com/zhuanti/mobilephone.html
阅读全文
posted @ 2013-01-17 14:00
沽月
阅读(138)
推荐(0)
摘要:
从《测试之美》附录爬虫式找到的一些质量保证领域专家BLOG。欢迎在外企的朋友帮忙补充。微软测试专家BLOG http://msdn.microsoft.com/en-us/testing/bb880947.aspxjennitta andrea twitter:http://twitter.com/jennitta_andrea性能测试scott barber:http://www.perftestplus.com/presentations.htmrex black: http://www.rbcs-us.com/blogadamchristian:http://www.adamchrist
阅读全文
posted @ 2013-01-17 13:54
沽月
阅读(166)
推荐(0)
2012年12月23日
摘要:
maven 仓库地址:共有的仓库http://repo1.maven.org/maven2/http://repository.jboss.com/maven2/http://repository.sonatype.org/content/groups/public/http://mirrors.ibiblio.org/pub/mirrors/maven2/org/acegisecurity/私有的仓库http://repository.codehaus.org/http://snapshots.repository.codehaus.org/http://people.apache.org/
阅读全文
posted @ 2012-12-23 21:38
沽月
阅读(135)
推荐(0)