第一:来看一下最终的效果第二:来看一下使用方法:第三:Component类代码如下所示:public class Component { public Component() { } private string id; public string Id ...
分类:
Web程序 时间:
2015-02-11 18:20:39
阅读次数:
193
捕获是这样一种机制:可以使用模式串的一部分匹配目标串的一部分。将你想捕获的模式用圆括号括起来,就指定了一个捕获。在string.find使用捕获的时候,函数会返回捕获的值作为额外的结果。这常被用来将一个目标串拆分成多个:pair = "name = Anna"_, _, key, value = s...
分类:
其他好文 时间:
2015-02-11 18:17:49
阅读次数:
209
public enum Color{ //定义枚举并赋值 RED("红色", 1), Blue("蓝色", 2), Yellow("黄色", 3); private String colorName; private int colorCode; ...
分类:
编程语言 时间:
2015-02-11 18:13:42
阅读次数:
194
以下演示了如何导出/导入数据 string file = Server.MapPath("/data.xml"); Code.ProductDataManage.Instance.ExportToFile(file, b => b.Id > 0);//导出到文件 Response....
分类:
其他好文 时间:
2015-02-11 18:01:53
阅读次数:
141
以下演示了导出对象文档编译MODEL所在的DLL时,在项目属性=>生成 选中下面的框,生成XML文档XML文档地址Type[] types = new Type[] { typeof(Code.ProductData) };string[] xmlFiles = new string[] { Ser...
分类:
其他好文 时间:
2015-02-11 17:59:42
阅读次数:
119
/** ? SimpleDateFormat函数语法: ?? ? G 年代标志符 ? y 年 ? M 月 ? d 日 ? h 时 在上午或下午 (1~12) ? H 时 在一天中 (0~23) ? m 分 ? s 秒 ? S 毫秒 ? E 星期 ? D 一年中的第几天 ? F 一月中...
分类:
编程语言 时间:
2015-02-11 16:54:05
阅读次数:
180
JAVA中的IO以前看着太混乱了,现在梳理一下
1.IO流分为两大类,一个是以stream结尾的,叫做字节流,顾名思义,按照byte为单位进行传输;另一种是以reader和writer结尾的叫做字符流,它貌似是封装了stream结尾的
IO流类,而产生的另一种功能类似,但是传输介质不再是byte,而是字符,也就是说,根据传说字符的不同,比如UTF-8,GBK等,它的传输单位也不是固定的...
分类:
编程语言 时间:
2015-02-11 16:48:21
阅读次数:
233
Implement strStr().
Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
Update (2014-11-02):
The signature of the function had been updat...
分类:
其他好文 时间:
2015-02-11 16:43:51
阅读次数:
177
/**
* 求绝对值
*/
import java.util.*;
public class acm2003 {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
while(in.hasNextDouble()){
double a=in.nextDouble();
...
分类:
其他好文 时间:
2015-02-11 16:37:18
阅读次数:
112
/**
* 回文数等于它的每位数字的立方和
* 求所有满足这种条件的三位十进制数
*/
public class 特殊的数字 {
public static void main(String[] args) {
int a,b,c;
for(int i=100;i
a=i/100;
b=i%100/10;
c=i%10;
if(a*a*a+b*b*b+c*c*c...
分类:
其他好文 时间:
2015-02-11 16:36:29
阅读次数:
145