摘要: [代码]System.Collections.IDictionaryEnumeratorenumerator=objHashTablet.GetEnumerator();while(enumerator.MoveNext()){Console.WriteLine(enumerator.Key);Console.WriteLine(enumerator.Value);} 阅读全文
posted @ 2010-04-23 15:00 闭着眼睛想 阅读(147) 评论(0) 推荐(0)
摘要: 常用号段如下:中国移动134.135.136.137.138.139.150.151.152.157.158.159.187.188 ,147(数据卡)中国联通130.131.132.155.156.185.186 中国电信133.153.180.189 CDMA 133,153正则如下:Code highlighting produced by Actipro CodeHighlighter (... 阅读全文
posted @ 2010-04-23 14:41 闭着眼睛想 阅读(664) 评论(0) 推荐(0)
摘要: 最近在做一个winform的程序,考虑用Sqlite的数据库,小巧而实用,比Access强多了,不过需要加密,不过free版本没有实现加密,有一些c++的实现:比如:http://www.sqlite.com.cn/MySqlite/3/253.Html 和http://www.cppblog.com/niewenlong/archive/2007/06/01/25261.html 。不过,鉴于我... 阅读全文
posted @ 2010-04-12 14:41 闭着眼睛想 阅读(449) 评论(0) 推荐(0)
摘要: String.Split 方法有6个重载函数:程序代码1) public string[] Split(params char[] separator)2) public string[] Split(char[] separator, int count)3) public string[] Split(char[] separator, StringSplitOptions options)4... 阅读全文
posted @ 2010-04-08 17:03 闭着眼睛想 阅读(620) 评论(0) 推荐(0)
摘要: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--createprocp_getlinkinfo@dbnamesysname=null,--要查询的数据库名,默认查询所有数据库的连接信息@includeipbit=0--是否显示IP地址,因为查询IP地址... 阅读全文
posted @ 2010-03-02 16:02 闭着眼睛想 阅读(2313) 评论(0) 推荐(0)
摘要: 代码如下 :创建一个触发器Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--USEmasterGOALTERTRIGGERtr_LoginCheckONALLSERVERFORLOGONASIFEVENTDATA().value('(/EVENT_INS... 阅读全文
posted @ 2010-03-02 15:53 闭着眼睛想 阅读(403) 评论(0) 推荐(0)
摘要: 一、简介xp_cmdshell 扩展存储过程将命令字符串作为操作系统命令 shell 执行,并以文本行的形式返回所有输出。二、SQL Server 2005中的xp_cmdshell由于存在安全隐患,所以在SQL Server 2005中, xp_cmdshell 默认是关闭的。此时,如果执行 xp_cmdshell 将会提示服务未开启:exec xp_cmdshell 'dir c:\'消息 1... 阅读全文
posted @ 2010-03-02 15:50 闭着眼睛想 阅读(728) 评论(1) 推荐(0)
摘要: [代码] 阅读全文
posted @ 2010-02-23 09:40 闭着眼睛想 阅读(309) 评论(0) 推荐(0)
摘要: 大家在做web开发的时候,经常会用到Session,最常用的就是登录功能了。用户登录后,Session["LoginName"]="userName";在其他页面再进行Session["LoginName"]的判断,用户状态是否过期等等。如果很多个页面,我们每个页面都要进行判断,岂不是要累死!我们可以用下面的方法来简化我们的工作:1、添加一个BasePage类,System.Web.UI.Page... 阅读全文
posted @ 2010-02-03 16:36 闭着眼睛想 阅读(248) 评论(0) 推荐(0)
摘要: 有关分页 SQL 的资料很多,有的使用存储过程,有的使用游标。本人不喜欢使用游标,我觉得它耗资、效率低;使用存储过程是个不错的选择,因为存储过程是经过预编译的,执行效率高,也更灵活。先看看单条 SQL 语句的分页 SQL 吧。方法1:适用于 SQL Server 2000/2005[代码]方法2:适用于 SQL Server 2000/2005Code highlighting produced ... 阅读全文
posted @ 2009-12-28 14:30 闭着眼睛想 阅读(272) 评论(0) 推荐(0)