12 2009 档案
StreamReader读取记事本
摘要:using System.Text;using System.IO;    string path = "UploadFiles/mm.txt"; StringBuilder str = new StringBuilder(); string line; //using (StreamReader sr = File.OpenText(Server.MapPath(path))) using(St... 阅读全文
posted @ 2009-12-31 16:00 cean 阅读(452) 评论(0) 推荐(0)
表中随机查询记录
摘要:从表topic中随机查询topictype为1和2的记录各10条,select * from(select * from(select top 10 topicid,topic,topictype,content,answer,author,addtime,itemid from cean_topic where topictype=1 order by newid()) as a1 union ... 阅读全文
posted @ 2009-12-13 18:01 cean 阅读(464) 评论(0) 推荐(0)
几种基本的数字正则表达式[转]
摘要:只能输入1个数字 表达式 ^\d$ 描述 匹配一个数字 匹配的例子 0,1,2,3 不匹配的例子 只能输入n个数字 表达式 ^\d{n}$ 例如^\d{8}$ 描述 匹配8个数字 匹配的例子 12345678,22223334,12344321 不匹配的例子 只能输入至少n个数字 表达式 ^\d{n 阅读全文
posted @ 2009-12-13 12:57 cean 阅读(204092) 评论(5) 推荐(8)