摘要: 为了提高网站性能、和网站的负载能力,页面静态化是一种有效的方式,这里对于asp.net mvc3 构架下的网站,提供一种个人认为比较好的静态话方式。 实现原理是通过mvc提供的过滤器扩展点实现页面内容的文本保存,直接上代码: public class StaticFileWriteFilterAtt 阅读全文
posted @ 2016-04-19 16:31 VSIT 阅读(176) 评论(0) 推荐(0)
摘要: //2008年4月24日 System.DateTime.Now.ToString("D"); //2008-4-24 System.DateTime.Now.ToString("d"); //2008年4月24日 16:30:15 System.DateTi... 阅读全文
posted @ 2016-01-13 13:15 VSIT 阅读(327) 评论(0) 推荐(0)
摘要: C#中使用DES和AES加密解密2008-01-12 09:37using System;using System.Text;using System.Security.Cryptography;using System.IO;namespace MyCryptography{ /// /// D... 阅读全文
posted @ 2015-10-06 10:53 VSIT 阅读(698) 评论(0) 推荐(0)
摘要: DES算法描述简介:DES是Data Encryption Standard(数据加密标准)的缩写。它是由IBM公司研制的一种加密算法,美国国家标准局于1977年公布把它作为非机要部门使用的数据加密标准;它是一个分组加密算法,他以64位为分组对数据加密。同时DES也是一个对称算法:加密和解密用的是同... 阅读全文
posted @ 2015-10-06 10:49 VSIT 阅读(550) 评论(0) 推荐(0)
摘要: import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class MyEclipseGen { private static final S... 阅读全文
posted @ 2015-08-15 17:08 VSIT 阅读(433) 评论(0) 推荐(0)
摘要: //导入命名空间部分省略DBClass.DBExecute dbexecute = new DBExecute(); string connectionString = @"Data Source=ServerName;Database=DatabaseName;integrated securit... 阅读全文
posted @ 2015-08-15 17:03 VSIT 阅读(892) 评论(0) 推荐(0)
摘要: 对话框中我们常用了以下几种:1、文件对话框(FileDialog) 它又常用到两个: 打开文件对话框(OpenFileDialog) 保存文件对话(SaveFileDialog)2、字体对话框(FontDialog)3、颜色对话框(ColorDialog)4、打印预浏对话框(PrintPre... 阅读全文
posted @ 2015-08-14 21:05 VSIT 阅读(3156) 评论(0) 推荐(0)
摘要: 手机短信群发作为企业日常通知,公告,天气预报等信息的一个发布平台,在于成本低,操作方便等诸多特点,成为企业通讯之首选。本文介绍短信的编码方式,AT指令以及用C#实现串口通讯的方法。前言目前,发送短信的方式主要有三种:1、网关方式:向当前电信部门申请,不需要另外设备。但是费用相对来说,比较高,以目前上... 阅读全文
posted @ 2015-08-14 20:27 VSIT 阅读(2316) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.... 阅读全文
posted @ 2015-08-14 19:43 VSIT 阅读(1997) 评论(0) 推荐(0)
摘要: 1 介绍log4net(Log For Net)是Apache开源的应用于.Net框架的日志记录工具,详细信息参见Apache网站.它是针对Java的log4j(Log For Java的)姊妹工具.用过log4j的都知道,它功能强大,可配置性灵活,线程安全,对日志的输出管理和级别管理方便。具体的使... 阅读全文
posted @ 2015-08-14 16:27 VSIT 阅读(1018) 评论(0) 推荐(0)
摘要: public class chsHex{/// /// 从汉字转换到16进制/// /// /// public static string GetHexFromChs(string s){if ((s.Length % 2) != 0){s += " ";//空格//throw new Argum... 阅读全文
posted @ 2015-07-23 08:58 VSIT 阅读(665) 评论(0) 推荐(0)
摘要: 方法一//调用API[System.Runtime.InteropServices.DllImport("user32", CharSet = System.Runtime.InteropServices.CharSet.Auto, ExactSpelling = true)]public stat... 阅读全文
posted @ 2015-07-22 18:50 VSIT 阅读(2633) 评论(0) 推荐(0)
摘要: EndPoint 类标识网络地址。这是一个 abstract 类。命名空间:System.Net程序集:System(在 System.dll 中)[SerializableAttribute]public abstract class EndPoint备注EndPoint 类提供了一个表示网络资源... 阅读全文
posted @ 2015-07-20 10:16 VSIT 阅读(2402) 评论(0) 推荐(0)
摘要: 天气预报Web服务,数据来源于中国气象局Endpoint :http://www.webxml.com.cn/WebServices/WeatherWebService.asmxDisco :http://www.webxml.com.cn/WebServices/WeatherWebService... 阅读全文
posted @ 2015-07-20 10:15 VSIT 阅读(508) 评论(0) 推荐(1)
摘要: www.educity.cn 发布者:shenywww 来源:网络转载 发布日期:2014年10月06日 文章评论 发表文章   一.C#多线程概述   1.后台循环任务,少量UI更新:例如批量上传文件,并提供进度。这种情况使用BackgroundWorker组件是非常好的选择。   2.耗时的后台任务:这里的耗时任务是指一个时间较长的任务,并且不能精确获取进度,如:调用一个远程WebService接口。这种情况可以开两个线程,一个工作,一个更新UI(不能提供进度,只能显示动画表示系统在运行中)。   3.耗时的UI任务:当工作压力集中在UI响应上时,可以在工作者线程中增加延时,从而让UI线程获得响应时间。整个工作的总体时间会增加,但用户响应效果会好很多。   二.后台的循环任务,少量UI更新   这种情况使用BackgroundWorker组件是最好的选择。(详见附一)   三.后台耗时任务   在后台执行一个不可分解的耗时任务,需要进行界面更新,以便让客 阅读全文
posted @ 2015-07-13 20:38 VSIT 阅读(608) 评论(0) 推荐(0)