上一页 1 ··· 5 6 7 8 9
摘要: 【转】C#加密算法汇总1234567891011121314151617181920212223242526方法一: //须添加对System.Web的引用 using System.Web.Security; ... /// <summary> /// SHA1加密字符串 /// </summary> /// <param name="source">源字符串</param> /// <returns>加密后的字符串</returns> public string SHA1(string source 阅读全文
posted @ 2012-08-03 10:37 小薇林 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 一、sql server日期时间函数 Sql Server中的日期与时间函数 1. 当前系统日期、时间 selectgetdate() 2. dateadd 在向指定日期加上一段时间的基础上,返回新的 datetime 值 例如:向日期加上2天 selectdateadd(day,2,'2004-10-15') --返回:2004-10-17 00:00:00.000 3. datediff 返回跨两个指定日期的日期和时间边界数。 selectdatediff(day,'2004-09-01','2004-09-18') --返回:17 4. d 阅读全文
posted @ 2012-08-03 10:29 小薇林 阅读(288) 评论(0) 推荐(0) 编辑
摘要: string test = "程$晓$"; //数组长度为2 temp[0]="程" temp[1]="晓"; string[] temp = test.Split(new string[] { "$" }, StringSplitOptions.RemoveEmptyEntries); //数组长度为3 temp[0]="程" temp[1]="晓" temp[2]=""; string[] temp = test.Split(new string[] 阅读全文
posted @ 2012-08-02 15:59 小薇林 阅读(134) 评论(0) 推荐(0) 编辑
摘要: MyKey 1 import java.util.*; 2 public class MyKey 3 { 4 private String name = null; 5 private int age = 0; 6 7 public boolean equals(Object obj) 8 { 9 if(obj instanceof myKey) // 对象与mykey 对象比较10 {11 MyKey objTemp=(MyKey)obj;12 if(name.equals(o... 阅读全文
posted @ 2012-06-02 18:24 小薇林 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 集合类包括;: vector ,eView Code import java.util.*;public class TestCollection { /** * Method main * * * @param args * */ public static void main(String[] args) { Arraylist v=new Arraylist(); System.out.println("please enter number:"); while(true) ... 阅读全文
posted @ 2012-06-02 16:38 小薇林 阅读(144) 评论(0) 推荐(0) 编辑
摘要: public class TestInteger { public static void main(String[] args) { int w=new Integer(args[0]).intValue(); //将一个字符串变为数字的方法 int h=Integer.parseInt(args[1]); int j; // int h=Integer.valueOf(args[1].intValue()); for (int i=0;i<h;i++) { StringBuffer sb=new StringBuffer(); //string... 阅读全文
posted @ 2012-06-02 15:45 小薇林 阅读(359) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9