杯具程序员
为系统而生,为框架而死,为debug奋斗一辈子;
     吃符号的亏,上大小写的当,最后死在需求上。
摘要: 基本概念: 第一层 服务主密钥 备份服务主密钥 backup service master key to file='c:/smk.bak' encryption by password='P@ssw0rd' restore service master key from file='c:/smk.bak' decryption by password='P@ssw0rd' 第二层 数据库主密钥 1)必须先在该数据库上创建数据库主密钥才能使用 create master key encryption by password= 阅读全文
posted @ 2011-08-10 09:05 杯具程序员 阅读(1131) 评论(0) 推荐(0) 编辑
摘要: 查看文章asp.net URL重写有利于SEO、便于记忆、隐藏真实路径使安全性提高、便于更新等等2010年01月06日 星期三 15:05URL重写好处有很多,如有利于SEO、便于记忆、隐藏真实路径使安全性提高、便于更新等等。本文概要描述了各种URL重写的实现。ASP.NET 2.0 中实现URL重写有很多方法,如:Global.asax中捕获用Application_BeginRequest请求,再用HttpContext类的Rewrite方法或Server.Transfer方法实现重写;自己实现IHttpModule实现重写;还有的利用服务器的404错误引导到新的页面实现重写;最后就是用组 阅读全文
posted @ 2011-08-09 10:37 杯具程序员 阅读(3417) 评论(0) 推荐(0) 编辑
摘要: 一、关闭和恢复xp_cmdshell命令 一般的黑客攻击SQL Server时,首先采用的方法是执行master扩展存储过程xp_cmdshell命令来破坏数据库,为了数据库安全起见,最好禁止使用xp_cmdShell,xp_cmdshell可以让系统管理员以操作系统命令行解释器的方式执行给定的命令字符串并以文本行方式返回任何输出,是一个功能非常强大的扩展存贮过程。一般情况下,xp_cmdshell对管理员来说也是不必要的,xp_cmdshell的消除不会对Server造成任何影响。 可以将xp_cmdshell消除:Code highlighting produced by Actipro. 阅读全文
posted @ 2011-08-09 09:54 杯具程序员 阅读(1399) 评论(0) 推荐(0) 编辑
摘要: using System.Runtime.InteropServices;--------------------------[DllImport("user32.dll")]public static extern bool FlashWindow(IntPtr hWnd, // handle to windowbool bInvert // flash status);----------------------------------FlashWindow(handle,true);//闪烁 阅读全文
posted @ 2011-08-05 18:02 杯具程序员 阅读(2699) 评论(0) 推荐(1) 编辑
摘要: 用C#实现生成PDF文档(原码) //write by wenhui.orgusing System;using System.IO;using System.Text;using System.Collections;namespace PDFGenerator{public class PDFGenerator{static float pageWidth = 594.0f;static float pageDepth = 828.0f;static float pageMargin = 30.0f;static float fontSize = 20.0f;static float le 阅读全文
posted @ 2011-08-05 18:00 杯具程序员 阅读(475) 评论(0) 推荐(0) 编辑
摘要: 一、增加一个WinForm为SplashScreen,设置其Formborderstyle:None二、增加引用using System.Threading;三、在Form1的static void Main() 中增加入下代码:SplashScreen splashForm = new SplashScreen(); //飞屏splashForm.Show();Application.DoEvents();//让系统在百忙中抽空刷新飞屏控件显示Thread.Sleep(2000);//暂停splashForm.Close();Application.Run(new Form1()); 阅读全文
posted @ 2011-08-05 17:58 杯具程序员 阅读(409) 评论(0) 推荐(0) 编辑
摘要: http://u.115.com/file/dn6vi4mt# Web项目打包过程.docx 这个是我自己写的 阅读全文
posted @ 2011-08-05 11:25 杯具程序员 阅读(1812) 评论(1) 推荐(2) 编辑
摘要: const 的概念就是一个包含不能修改的值的变量。常数表达式是在编译时可被完全计算的表达式。因此不能从一个变量中提取的值来初始化常量。如果 const int a = b+1;b是一个变量,显然不能再编译时就计算出结果,所以常量是不可以用变量来初始化的。 readonly 允许把一个字段设置成常量,但可以执行一些运算,可以确定它的初始值。因为 readonly 是在计算时执行的,当然它可以用某些变量初始化。readonly 是实例成员,所以不同的实例可以有不同的常量值,这使readonly更灵活。readonly 关键字与 const 关键字不同。1. const 字段只能在该字段的声明中初始 阅读全文
posted @ 2011-08-04 14:58 杯具程序员 阅读(200) 评论(0) 推荐(0) 编辑
摘要: CREATE function [dbo].[uf_GetPY](@str nvarchar(4000))returns nvarchar(4000)asbegin set @str=RTRIM(@str) declare @word nchar(1),@PY nvarchar(4000) set @PY='' while len(@str)>0 begin --处理常用多音字 if len(@str)>=2 beginif left(@str,2)='重庆'begin set @PY=@PY+'CQ' if LEN(@str)> 阅读全文
posted @ 2011-08-02 10:39 杯具程序员 阅读(1723) 评论(0) 推荐(0) 编辑
摘要: string sql = @"SELECT Serial AS 序号 , Type AS 类型 , ItemChanage AS 变更项目 , Name AS 单位名称 , TypeName AS 单位性质 , Place AS 经营场所面积 , PlaceUsed AS 使用面积 , LicenceSerialHealth AS 原许可证号 , Licence AS 许可证号 , LicenceDateStart AS 发证日期 , LicenceDataEnd AS 许可有效期 , LicenceItem AS 许可项目 , BusinePosition AS 地址 , Busi 阅读全文
posted @ 2011-07-29 15:33 杯具程序员 阅读(1449) 评论(0) 推荐(0) 编辑