摘要: godeclare @tbname varchar(250)declare #tb cursor for select name from sysobjects where objectproperty(id,'IsUserTable')=1open #tbfetch next from #tb into @tbnamewhile @@fetch_status=0begin exec('drop ... 阅读全文
posted @ 2010-01-27 11:23 cean 阅读(527) 评论(0) 推荐(0) 编辑
摘要: 更改存储过程的所有者:declare tb cursor local forselect 'sp_changeobjectowner ''['+replace(user_name(uid),']',']]')+'].['+replace(name,']',']]')+']'',''dbo'''from sysobjectswhere xtype in('U','V','P','TR','FN','... 阅读全文
posted @ 2010-01-26 14:56 cean 阅读(303) 评论(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) pu... 阅读全文
posted @ 2010-01-07 11:34 cean 阅读(1731) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(445) 评论(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 阅读(456) 评论(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 阅读(203847) 评论(5) 推荐(8) 编辑
摘要: 以前写 JavaScript 脚本时,事件都是采用 object.event = handler; 的方式初始化。这种方式对于 Internet Explorer、Mozilla/Firefox 和 Opera 来说很通用。但是有一个问题就是,这种方式只能一个事件对应一个事件处理过程。如果希望一个事件可以依次执行多个处理过程就不好用了。 但是 Internet Explorer 从 5.0 开始提... 阅读全文
posted @ 2009-11-25 10:44 cean 阅读(4437) 评论(0) 推荐(0) 编辑
摘要: 在一般处理程序中使用session时必须继承一下 System.Web.SessionState.IReadOnlySessionState 的接口,否则为会出"未将对象引用设置到对象的实例。 "首先需要引用 using System.Web.SessionState;并实现类的IReadOnlySessionState接口public class CheckMemberLogin : IHt... 阅读全文
posted @ 2009-11-09 10:08 cean 阅读(292) 评论(0) 推荐(0) 编辑
摘要: [1]好好规划自己的路,不要跟着感觉走!根据个人的理想决策安排,绝大部分人并不指望成为什么院士或教授,而是希望活得滋润一些,爽一些。那么,就需要慎重安排自己的轨迹。从哪个行业入手,逐渐对该行业深入了解,不要频繁跳槽,特别是不要为了一点工资而转移阵地,从长远看,这点钱根本不算什么,当你对一个行业有那么几年的体会,以后钱根本不是问题。频繁地动荡不是上策,最后你对哪个行业都没有摸透,永远是新手![2]可... 阅读全文
posted @ 2009-09-20 22:37 cean 阅读(217) 评论(0) 推荐(0) 编辑
摘要: x = +5; $y = +5; break; case 2: $x = ($imagewidth - $logowidth) / 2; $y = +5; break; case 3: $x = $imagewidth - $logowidth - 5; $y = +5; break; case 4: $x = +5; $y = ($imageheight - $logoheight) / 2; ... 阅读全文
posted @ 2009-08-01 22:32 cean 阅读(421) 评论(0) 推荐(0) 编辑