常规类型的格式化String类的format()方法用于创建格式化的字符串以及连接多个字符串对象。熟悉C语言的同学应该记得C语言的sprintf()方法,两者有类似之处。format()方法有两种重载形式。format(String
format, Object... args) 新字符串使用本地语...
分类:
编程语言 时间:
2014-07-22 23:17:33
阅读次数:
497
添加引用http://htmlagilitypack.codeplex.com/downloads/get/437941protected
void Export(string content,string file) { HtmlDocument doc = new HtmlD...
分类:
Web程序 时间:
2014-07-22 23:17:32
阅读次数:
426
2014年4.27相关技术问题String str=new String("ss");
生成了几个对象求菲波数据
1,1,2,3,5......,第100项的值张三到某店买巧克力,店主领他看四个箱子,每个箱子上都写—句话。第一个箱子:“所有箱子中都有荔枝。”第二个箱子:“本箱中有苹果。”第三个箱子:...
分类:
其他好文 时间:
2014-07-22 23:17:15
阅读次数:
441
public class CookiesUtils{ public static void
SetCookie(String key, String value) { SetCookie(key, value, null, null, null,
false); } ...
分类:
其他好文 时间:
2014-07-22 23:16:34
阅读次数:
339
1.获取CSV数据内容public static Object[][]
getFromCSV(String filename) { if (!(new File(filename)).exists()){ return null;
} Object[][] content; CSVReader r....
分类:
Web程序 时间:
2014-07-22 23:16:34
阅读次数:
467
关于instanceof
,两边类型要有关系,通常左边必有钱类型范围大,右边集成左边的类型。public class BasicTypeTest { public static void
main(String[] args) { Object test = 12; boolean flag =.....
分类:
其他好文 时间:
2014-07-22 23:16:12
阅读次数:
284
一、简介REmoteDIctionaryServer(Redis),redis是一个基于内存的单机key/value系统,类似memcached,但支持value为多种形式,包括:字符串(string)、链表(list)、集合(set)、有序集合(sortedset)和hashtable二、特点1优...
分类:
其他好文 时间:
2014-07-22 23:14:34
阅读次数:
462
创建一个类Alt+Shift+N,C,输入Demo,回车创建类属性按3次下方向键,回车,输入String
name;,回车创建构造器Alt+Shift+S,O,回车创建getter/setterAlt+Shift+S,R,空格,回车创建toString方法Alt+Shift+S,S,回车创建main...
分类:
系统相关 时间:
2014-07-22 23:13:57
阅读次数:
503
import java.security.MessageDigest;import
java.util.*;public class Hello2{ public static void main(String[] args) throws
Exception{ Random r = new Ran...
分类:
其他好文 时间:
2014-07-22 23:13:33
阅读次数:
354
Problem description:given a string, find the
longest palindrome string in itSolution:1.brute force O(n^3)just enumerate start
and end of the substring...
分类:
其他好文 时间:
2014-04-29 17:22:46
阅读次数:
308