09 2011 档案
摘要:1、Microsoft.Practices.EnterpriseLibrary.Caching的基本架构在决定我们的缓存数据保存到哪里之前我们有必要先了解一下Caching Application Block定义的两种缓存类型,它们分别是内存驻留型缓存和磁盘驻留型缓存,顾名思义,这两种类型的缓存是以存贮位置来命名的,功能上则以是否能将缓存数据持久化来区别使用。在Caching Application Block中,具体提供以下四种保存缓存数据的途径,分别是:内存存储(默认)、独立存储(Isolated Storage)、数据库存储(DataBase Cache Storage)和自定义存储(C
阅读全文
摘要:微软企业库5.0的下载地址:http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=15104微软企业库5.0文档地址:http://entlib.codeplex.com/releases/view/43135缓存的参考链接:http://msdn.microsoft.com/en-us/library/ff664753%28v=PandP.50%29.aspx1、安装微软企业库5.02、运行EntLibConfig.exe3、增加缓存配置4、查看缓存配置5、另存为App.config6、新建一个winf
阅读全文
摘要:1、代码格式化 ctrl+E+F2、添加命名空间 ctrl+>3、代码注释 ctrl+E+C 取消注释 ctrl+e+u4、新增项目 ctrl+shift+N5、新增项 ctrl+shift+A6、新增类 shift+alt+C7、新增存在的项 shift+alt+A
阅读全文
摘要:详情参考:http://msdn.microsoft.com/zh-cn/library/ms143327.aspx在 searchPattern 中允许使用以下通配说明符。通配符说明*零个或多个字符。?正好一个字符。
阅读全文
摘要:1、web.config配置文件<?xml version="1.0" encoding="utf-8" ?><configuration> <configSections> <section name="log" type="Xys.PetShop.Framework.Configuration.LogConfigurationSetion,Xys.PetShop.Framework"/> </configSections> <log> &l
阅读全文
摘要:1、为什么要要使用Unity参看:http://www.cnblogs.com/leoo2sk/archive/2009/06/17/1504693.html2、怎么使用配置文件配置依赖关系1、安装企业库5.0,下载地址:http://msdn.microsoft.com/en-us/library/ff632023.aspx2、添加项目引用System.configurationMicrosoft.Practices.UnityMicrosoft.Practices.Unity.Configuration public class Container { static Container()
阅读全文
摘要:1. 取交集 (A和B都有)List A : { 1 , 2 , 3 , 5 , 9 }List B : { 4 , 3 , 9 } var intersectedList = list1.Intersect(list2);结果 : { 3 , 9 }判断A和B是否有交集 bool isIntersected = list1.Intersect(list2).Count() > 02. 取差集 (A有,B沒有)List A : { 1 , 2 , 3 , 5 , 9 }List B : { 4 , 3 , 9 }var expectedList = list1.Except(list2)
阅读全文
摘要:Once upon a time, all we needed to worry about was reducing Bytes and Requests and playing around with load order to make things faster. Nowadays, we are increasingly impacting one more major component in performance – CPU utilization. Using jQuery and other frameworks that make selecting nodes and
阅读全文
摘要:private CookieContainer GetCookies() { CookieContainer myCookieContainer = new CookieContainer(); HttpCookie requestCookie; int requestCookiesCount = Request.Cookies.Count; for (int i = 0; i < requestCookiesCount; i++) { requestCookie = Request.Cookies[i]; Cookie clientCookie = new Cookie(request
阅读全文