- 博客(11)
- 收藏
- 关注
转载 [转]javascript 中的escape 与C#互相转化
public static string Escape(string s) { StringBuilder sb = new StringBuilder(); byte[] ba = System.Text.Encoding.Unicode.GetBytes(s); for (int i = 0; i { if (ba[i + 1] == 0)
2010-09-28 10:20:00 418
原创 【转】js键盘输入事件
<br />事件名称 说明 <br />onkeypress 这个事件在用户按下并放开任何字母数字键时发生。系统按钮(例如,箭头键和功能键)无法得到识别。 <br /><br />onkeyup 这个事件在用户放开任何先前按下的键盘键时发生。 <br /><br />onkeydown 这个事件在用户按下任何键盘键(包括系统按钮,如箭头键和功能键)时发生。 <br /><br /><br /><mce:script lan
2010-09-15 09:25:00 2248
转载 js编码解码[转]
<br /><mce:script type="text/javascript"><!-- a=62; function encode() { var code = document.getElementById('code').value; code = code.replace(/[/r/n]+/g, ''); code = code.replace(/'/g, "//'"); var tmp = code.match(//b(/w+)/b/g); tmp.so
2010-07-05 18:52:00 473 1
原创 不定参数委托调用定参函数
我现在有一系列函数,比如: public static void A(Bitmap b, int value){...} public static void B(Bitmap b, int value, int valueB){...} public static void C(Bitmap b, float value){...} public static void D(Bitmap b,
2010-03-02 00:21:00 625
原创 平移图像
/// /// 平移图像 /// /// /// /// /// public static Bitmap Translation(Bitmap bmp, int tx, int ty) { if (bmp == null || (tx == 0 && ty == 0)) return bmp; Rect
2010-03-02 00:19:00 367
原创 图像镜像翻转
/// /// 水平镜像 /// /// /// public static Bitmap MirrorH(Bitmap bmp) { if (bmp == null) return bmp; Rectangle bmpRect = new Rectangle(0, 0, bmp.Width, bmp.Height);
2010-03-02 00:18:00 2121 1
原创 图片灰度反转
/// /// 图片灰度反转 /// /// /// public static Bitmap Reverse(Bitmap bmp) { if (bmp == null) return bmp; Rectangle bmpRect = new Rectangle(0, 0, bmp.Width, bmp.Height)
2010-03-02 00:17:00 1031
原创 放大图片(真实放大,不加任何其他处理)
/// /// 放大图片 /// /// /// /// public static Bitmap ZoomInTimesByMomery(Bitmap img, int times) { //初始化大小图片 Bitmap bmp = FormatHelper.FromHighbitTo24bit(img); Bitm
2010-03-02 00:06:00 619
原创 黑白二值化
/// /// 去杂色,转换为黑白图片 /// /// public static void Binarization(Bitmap img, int thresholdValue) { for (int x = 0; x < img.Width; x++) { for (int y = 0; y < img.Height; y++
2010-03-02 00:04:00 656
原创 图像灰度化
/// /// 内存转换法 /// /// public static Bitmap GrayByMemory(Bitmap bmp) { if (bmp == null) return bmp; //位图矩形 Rectangle bmpRect = new Rectangle(0, 0, bmp.Width, b
2010-03-01 23:59:00 731
转载 从客户端检测到有潜在危险的Request.Form值(转)
asp.net开发中,经常遇到“从客户端检测到有潜在危险的Request.Form 值”错误提示,很多人给出的解决方案是:1、web.config文档后面加入这一句: 示例: 2、在*.aspx文档头的page中加入validaterequest="false",示例如下: 其实这样做是不正确的,会给程序安全带来风险。 ASP.Net 1.1后引入了对提交表单自动检查
2009-07-17 11:05:00 270
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人