代码改变世界

SQL还原数据库后,出现孤立帐户怎么处理

2012-03-28 17:25 by hailibu, 640 阅读, 0 推荐, 收藏, 编辑
正文内容加载中...

记录一次文件迁移

2011-01-05 14:54 by hailibu, 1676 阅读, 1 推荐, 收藏, 编辑
摘要:事情的经过是这样子的!数据库A表添加一条记录,**系统中B目录下就会多出5n个文件。随着系统运行3年多,B目录中的文件数已高达2M多,而这些文件恰恰又是用户高度频繁访问的。于是问题就来了,一方面是用户访问文件速度变慢了;另一方面是文件太多,很难维护。 阅读全文

sql2005 链接 sql2008 的解决方法

2010-12-17 09:45 by hailibu, 260 阅读, 0 推荐, 收藏, 编辑
摘要:Microsoft SQL Server 2005 Service Pack 3 补丁下载 阅读全文

导出文件

2010-12-02 16:34 by hailibu, 164 阅读, 0 推荐, 收藏, 编辑
摘要:protected void Button3_Click(object sender, EventArgs e){ Response.Clear(); Response.Buffer = true; Response.AddHeader("Content-Disposition", "attachment;filename=ExportFile.txt"); Response.ContentTyp... 阅读全文

对数组序列进行洗牌

2010-12-02 15:28 by hailibu, 184 阅读, 0 推荐, 收藏, 编辑
摘要:public static void Shuffle<T>(T[] array){ Random random = new Random(); for (int i = 1; i < array.Length; i++) { int j = random.Next(0, i); T temp = array[i]; array[i] = array[j]; array[j] = ... 阅读全文

读取上传文件内容

2010-12-02 15:23 by hailibu, 212 阅读, 0 推荐, 收藏, 编辑
摘要:protected void Button2_Click(object sender, EventArgs e){ try { List<string> list = new List<string>(); using (StreamReader sr = new StreamReader(FileUpload1.PostedFile.InputStream)) { Str... 阅读全文

分层架构思想

2010-11-22 09:54 by hailibu, 230 阅读, 1 推荐, 收藏, 编辑
摘要:When thinking of a system in terms of layers, you imagine the principal subsystem in the software arranged in some form of layer cake,where each layer rests on lower layer. In this scheme the higher l... 阅读全文

字符串倒置

2010-11-19 16:17 by hailibu, 174 阅读, 0 推荐, 收藏, 编辑
摘要:public static string Reverse(this string str){ char[] arrChar = str.ToCharArray(); Array.Reverse(arrChar); return new string(arrChar);} 阅读全文

分时段统计登录系统人数

2010-11-15 11:30 by hailibu, 316 阅读, 0 推荐, 收藏, 编辑
摘要:select sum(case when DatePart(hh,finputtime)=1 then 1 else 0 end) as '1:00~2:00', sum(case when DatePart(hh,finputtime)=2 then 1 else 0 end) as '2:00~3:00', sum(case when DatePart(hh,finputtime)=3 the... 阅读全文

iframe 自适应高度

2010-11-11 16:35 by hailibu, 205 阅读, 0 推荐, 收藏, 编辑
摘要:<script type="text/javascript"> function iframeFitHeight() { var iframe = document.getElementById("loaderFrame"); try { iframe.height = iframe.contentWindow.document.documentElement.scrollHeight... 阅读全文