摘要: 前两年一直做嵌入式软件的开发,现在又要转到应用软件的开发,近期开始学习、整理以前保存的资料,发现很多资料没有条理性,打算放到博客上,一可以长期保存,二可以条理清晰。  所有资料来源于网络,如果有版权问题,请立刻和我联系,我会及时处理,谢谢! 阅读全文
posted @ 2010-03-21 07:30 Chopper 阅读(191) 评论(0) 推荐(0) 编辑
  2013年10月28日
摘要: 获取或设置一个布尔值,该值确定在对由WebResourceAttribute类引用的嵌入式资源的处理过程中是否分析其他 Web 资源 URL,并用到该资源的完整路径替换。如:一个CSS文件引用其它images的时候,需要用到这个参数。 阅读全文
posted @ 2013-10-28 23:22 Chopper 阅读(164) 评论(0) 推荐(0) 编辑
  2013年7月26日
摘要: Singleton模式是常用的设计模式之一,但是要实现一个真正实用的设计模式却也不是件容易的事情。1. 标准的实现class Singleton{public: static Singleton * Instance() { if( 0== _instance) { _instance = new Singleton; } return _instance; }protected: Sin... 阅读全文
posted @ 2013-07-26 16:32 Chopper 阅读(379) 评论(0) 推荐(0) 编辑
  2013年7月10日
摘要: ------------------------------------------linux中shell变量$#,$@,$0,$1,$2的含义解释: 变量说明: $$ Shell本身的PID(ProcessID) $! Shell最后运行的后台Process的PID $? 最后运行的命令的结束代码(返回值) $- 使用Set命令设定的Flag一览 $* 所有参数列表。如"$*"用「"」括起来的情况、以"$1 $2 … $n"的形式输出所有参数。 $@ 所有参数列表。如"$@"用「"」括起来的情况、以"$ 阅读全文
posted @ 2013-07-10 15:55 Chopper 阅读(182) 评论(0) 推荐(1) 编辑
  2013年7月1日
摘要: @model string @{ ViewBag.Title = "GetPeople"; AjaxOptions ajaxOpts = new AjaxOptions { UpdateTargetId = "tableBody", InsertionMode= InsertionMode.Replace, Url = Url.Action("GetPeopleData") //确保javascript enable和disable时能正常显示 };} GetPeople First Last Role @Html.Action(&q 阅读全文
posted @ 2013-07-01 21:09 Chopper 阅读(341) 评论(0) 推荐(0) 编辑
  2013年6月24日
摘要: 1. Controller[HttpPost] public ActionResult LogOn(LogOnModel model, string returnUrl)2. View@model MvcApplication2.Models.LogOnModel @{ ViewBag.Title = "Log On"; string retUrl = ""; if (ViewContext.HttpContext.Request.UrlReferrer != null) { retUrl = ViewContext.HttpContext.Reques 阅读全文
posted @ 2013-06-24 23:03 Chopper 阅读(257) 评论(0) 推荐(0) 编辑
  2013年5月22日
摘要: 1. StyleCop 代码规范 检查工具 http://stylecop.codeplex.com/2.Sandcastle - Documentation Compilers for Managed Class Library 微软的文档编译器 阅读全文
posted @ 2013-05-22 15:39 Chopper 阅读(159) 评论(0) 推荐(0) 编辑
  2013年5月16日
摘要: The Moles Framework. The need for a stub framework that could be effectively used with Pex initially motivated the creation of the Moles framework for generating stub types and mole types:Stub types make it easy to test code that consumes interfaces, or non-sealed classes with overridable methods.Mo 阅读全文
posted @ 2013-05-16 15:46 Chopper 阅读(255) 评论(0) 推荐(0) 编辑
摘要: http://msdn.microsoft.com/en-us/library/hh549174.aspxhttp://msdn.microsoft.com/en-us/library/hh549176.aspx 阅读全文
posted @ 2013-05-16 10:10 Chopper 阅读(194) 评论(0) 推荐(0) 编辑
  2013年5月13日
摘要: .Net 自定义应用程序配置引言几乎所有的应用程序都离不开配置,有时候我们会将配置信息存在数据库中(例如大家可能常会见到名为Config这样的表);更多时候,我们会将配置写在Web.config或者App.Config中。通过将参数写在配置文件(表)中,我们的程序将变得更加灵活,只要对参数进行修改,再由程序中的某段代码去读取相应的值就可以了。而如果直接将配置值写在程序中,当配置需要改变时,则只能通过修改代码来完成,此时往往需要重新编译程序集。本文不是讲述.Net Framework中诸多的内置结点如何设置,比如httpHandler、httpModule、membership、roleMana 阅读全文
posted @ 2013-05-13 21:19 Chopper 阅读(337) 评论(0) 推荐(1) 编辑
  2013年5月12日
摘要: 全局程序集缓存,存放公共Assembly,避免一个DLL从一个目录拷贝到另一个目录。保存在C:\Windows\assembly目录下。注册:gacutil -i xxxx.dll卸载:gacutil -u xxxx 阅读全文
posted @ 2013-05-12 17:07 Chopper 阅读(136) 评论(0) 推荐(0) 编辑