曾南华

摘要: 在我们刚学设计模式的时候,单例模式可能是设计模式中最简单最容理解的吧。今天我们就来探究他不一样的风格,不一样的单例模式 首先,我们来看一下通俗的单例模式的设计 这种单例模式虽然正确的,但是要注意几个问题, 第一 构造函数必须是私有构造函数 第二 必须加上锁,才能保证唯一实例 如果说到这里就完了,那我 阅读全文
posted @ 2016-05-25 16:42 啄木鸟¥ 阅读(637) 评论(0) 推荐(0) 编辑
摘要: "框架" 这两个字从通俗的意义来讲就是提高复用性,解耦类之间的关系和方便开发人员开发。 使用的技术也是大家基本现在都用过的,而这个系类我所要讲的内容是什么呢? 框架的基本搭建 ,框架搭建的基本思想,Ioc 应用(unity),公共组件类的分装,基本的菜单权限判断,T4模板,Bootstarp,Esa 阅读全文
posted @ 2016-05-24 10:26 啄木鸟¥ 阅读(1323) 评论(7) 推荐(1) 编辑
摘要: 在 Asp.net Mvc 自定义Session (一) 中我们把数据缓存工具类写好了,今天在我们在这篇把 剩下的自定义Session写完 首先还请大家跟着我的思路一步步的来实现,既然我们要自定义Session肯定要继承和重写什么东东(因为在框架设计中肯定考虑这些东西,asp.net mvc 架构师 阅读全文
posted @ 2016-05-23 11:28 啄木鸟¥ 阅读(2019) 评论(1) 推荐(6) 编辑
摘要: 大家都知道用系统默认的session 会存在这样的问题 如果用户过多的话 session 会自动消亡,而且不能支持分布式和集群。 这系列博客主要讲解 怎样 解决用户过多的session自动消亡,和分布式集群 使用例子 在这里我们主要用的 HttpRuntime.cache 和 memcache。 希 阅读全文
posted @ 2016-05-21 09:23 啄木鸟¥ 阅读(1875) 评论(5) 推荐(5) 编辑
摘要: 经过这两天的研究,我想有些东西有必要写一下,同时也帮助需要的人 这是一个查找附近的人的一个算法,在网上找了这篇文章 http://blog.csdn.net/dyllove98/article/details/9795815,他的算最小正方形的四个顶点有点问题。 第一步 ,我们试想一下,如果我们要查 阅读全文
posted @ 2016-05-20 12:54 啄木鸟¥ 阅读(2041) 评论(6) 推荐(6) 编辑
摘要: //第一个exe 应用 域using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Collections;namespace console{ class Program { static void Main(string[] args) { try { for (int i = ; i < 10; i++) { ... 阅读全文
posted @ 2014-03-05 22:38 啄木鸟¥ 阅读(191) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.IO;using System.Threading;using System.Reflection;namespace AsncyHandle{ [AttributeUsage(AttributeTargets.All,AllowMultiple=true,Inherited=false)] class ClassMsgAttribute : Attribute { pub 阅读全文
posted @ 2014-02-27 21:30 啄木鸟¥ 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 在处理该请求时将由 HttpApplication 类执行以下事件。 希望扩展 HttpApplication 类的开发人员尤其需要注意这些事件。1. 对请求进行验证,将检查浏览器发送的信息,并确定其是否包含潜在恶意标记。 有关更多信息,请参见 ValidateRequest 和脚本侵入概述。2. 如果已在 Web.config 文件的 UrlMappingsSection 节中配置了任何 URL,则执行 URL 映射。3. 引发 BeginRequest 事件。4. 引发 AuthenticateRequest 事件。5. 引发 PostAuthenticateRequest 事件。6. 引 阅读全文
posted @ 2014-02-27 10:40 啄木鸟¥ 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 常用Http缓存页asp.net 页面上加上 <%@ OutputCache Duration="10" VaryByParam="None" %> 用代码动态控制 Response.Cache.SetCacheability(HttpCacheability.Public); Response.C 阅读全文
posted @ 2014-02-26 20:05 啄木鸟¥ 阅读(206) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.IO;using System.Threading;namespace AsncyHandle{ public class RequestState { const int BUFFER_SIZE = 1024; public StringBuilder RequestData; public byte[] Buffer... 阅读全文
posted @ 2014-02-25 14:47 啄木鸟¥ 阅读(242) 评论(0) 推荐(0) 编辑

曾南华