上一页 1 2 3 4 5 6 7 8 ··· 22 下一页
摘要: using System;using System.Collections.Generic;using System.ComponentModel.Composition;using System.ComponentModel.Composition.Hosting;using System.Linq;using System.Text;using System.Threading.Tasks;namespace MEFDemo{ class Program { private CompositionContainer _container; [Import(typ... 阅读全文
posted @ 2013-03-27 19:55 chunchill 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 在计算机世界以及Internet上,单词foo、bar和foobar通常用作通用术语,表示讨论或讲解中遇到了没有名称的东西时,可以称它们为foo或bar或foobar。这些奇怪的单词来自哪里呢?单词“foobar”派生于只取首字母的缩写词FUBAR,该词在第二次世界大战中广为流行。FUBAR的含义是“fouled up beyond all recognition(搞得一团糟而无法识别)”。单词“foo”看上去有一个更加确切的历史。毫无疑问,foo的流行多数起源于foobar。然而,foo单词的使用看上去可能更早。例如:在一部1938年的卡通片中,Daffy Duck举着一个上面写着“Sile 阅读全文
posted @ 2013-02-19 17:07 chunchill 阅读(308) 评论(0) 推荐(0) 编辑
摘要: n this example, we'll be setting up a custom authorization scheme based on a key which will be validated using a very simple algorithm. This isn't secure for any number of reasons, but with some minor modifications (e.g. expiring a key once it is used) it would be sufficient for things like 阅读全文
posted @ 2013-02-07 16:28 chunchill 阅读(238) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq.Expressions;using System.Reflection;namespace ConsoleApplication1{ internal class Program { private static void Main() { var student = new Student { Age = 15 }; var p = new Parent { Role = "", Sex = "Male" ... 阅读全文
posted @ 2013-02-01 13:40 chunchill 阅读(232) 评论(0) 推荐(0) 编辑
摘要: This should work:-Bind(typeof(IRepository<>)).To(typeof(Repository<>));where:-IRepository<>is an interface of the form:-public interface IRepository<T> where T :class { //...}Repository<>is a class of the form:-public class Repository<T>:IRepository<T> where 阅读全文
posted @ 2013-01-31 08:50 chunchill 阅读(480) 评论(0) 推荐(0) 编辑
摘要: These pages are a brief overview of each of the patterns in P of EAA. They aren't intended to stand alone, but merely as a quick aide-memoire for those familiar with them, and a handy link if you want to refer to one online. In the future I may add some post-publication comments into the materia 阅读全文
posted @ 2013-01-18 18:53 chunchill 阅读(284) 评论(0) 推荐(0) 编辑
摘要: http://social.msdn.microsoft.com/Forums/en-US/netfx64bit/thread/674cbd6f-8ac7-4902-a7a2-5cc3d831cd5bhttp://msdn.microsoft.com/en-us/library/tt0cf3sx%28VS.80%29.aspxhttp://technet.microsoft.com/zh-cn/04za0hca.aspxhttp://blog.csdn.net/kimmking/article/details/3445233ActiveX controls or COM components 阅读全文
posted @ 2012-12-04 22:14 chunchill 阅读(618) 评论(0) 推荐(0) 编辑
摘要: 2.3.3 Liskov替换原则 Barbara Liskov于1988年提出了著名的替换原则:"如果对于类型S的每个对象O1存在类型T的对象O2,那么对于所有定义了T的程序P来说,当用O1替换 O2并且S是T的子类型时,P的行为不会改变。"通俗地讲,就是子类型能够完全替换父类型,而不会让调用父类型的客户程序从行为上有任何改变。 Liskov替换原则 基于这样的一个事实,那就是客户程序在调用某一个类时,实际上是对该类的整个继承体系设定了一个契约,继承体系中的所有类必须遵循这一契约,即前置条件和 后置条件必须保持一致 。这就超越了继承中子类与父类之间形成的is-a关系,为对象 阅读全文
posted @ 2012-11-06 19:51 chunchill 阅读(8406) 评论(0) 推荐(1) 编辑
摘要: http://unity.codeplex.com/wikipage?title=Webcast%20demos&referringTitle=Homehttp://unity.codeplex.com/ 阅读全文
posted @ 2012-11-05 16:57 chunchill 阅读(179) 评论(0) 推荐(0) 编辑
摘要: usingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingSystem.Collections;usingSystem.Data.Common;usingMicrosoft.Practices.EnterpriseLibrary.Data;usingSystem.Web;usingSystem.Threading;namespaceCustomized.Framework.Transaction{publicclassCustomizedTransactionScope:IDisposable{///<summar 阅读全文
posted @ 2012-10-25 23:52 chunchill 阅读(653) 评论(0) 推荐(1) 编辑
摘要: 同一个Scope里多个本地连接。先把官网上的代码贴过来://Thisfunctiontakesargumentsfor2connectionstringsandcommandstocreateatransaction//involvingtwoSQLServers.Itreturnsavalue>0ifthetransactioniscommitted,0ifthe//transactionisrolledback.Totestthiscode,youcanconnecttotwodifferentdatabases//onthesameserverbyalteringtheconnec 阅读全文
posted @ 2012-10-25 22:55 chunchill 阅读(1834) 评论(1) 推荐(0) 编辑
摘要: CREATEFUNCTION[dbo].[InitCap](@InputStringvarchar(4000))RETURNSVARCHAR(4000)ASBEGINDECLARE@IndexINTDECLARE@CharCHAR(1)DECLARE@PrevCharCHAR(1)DECLARE@OutputStringVARCHAR(255)SET@OutputString=LOWER(@InputString)SET@Index=1WHILE@Index<=LEN(@InputString)BEGINSET@Char=SUBSTRING(@InputString,@Index,1)S 阅读全文
posted @ 2012-07-24 13:51 chunchill 阅读(307) 评论(0) 推荐(0) 编辑
摘要: http://twitter.github.com/bootstrap/ 阅读全文
posted @ 2012-07-24 13:03 chunchill 阅读(222) 评论(0) 推荐(0) 编辑
摘要: USE DEV50JRYRPACK_JASPER/*1. exec sp_spaceused '表名' (SQL统计数据,大量事务操作后可能不准)2. exec sp_spaceused '表名', true (更新表的空间大小,准确的表空大小,但可能会花些统计时间)3. exec sp_spaceused (数据库大小查询)4. exec sp_MSforeachtable "exec sp_spaceused '?'" (所有用户表空间表小,SQL统计数据,,大量事务操作后可能不准)5. exec sp_MSforeach 阅读全文
posted @ 2012-07-19 14:11 chunchill 阅读(879) 评论(0) 推荐(0) 编辑
摘要: 正则表达式是查找和替换文本模式的一种简洁而灵活的表示法。在“查找和替换”窗口中执行“快速查找”、“在文件中查找”、“快速替换”或“在文件中替换”操作时,可以在该窗口的“查找内容”和“替换为”字段中使用一组专用的正则表达式。若要启用正则表达式,请在“查找和替换”窗口中展开“查找选项”,选择“使用”,然后选择“正则表达式”。“查找内容”和“替换为”字段旁的三角形“表达式生成器”按钮将变为可用。单击此按钮可以列表显示最常用的正则表达式。当单击列表上的某个正则表达式时,它将插入“查找内容”或“替换为”字段中的光标所在位置。单击“表达式生成器”底部的“完整字符列表”时,会显示帮助主题。主题内容涵盖 Vi 阅读全文
posted @ 2012-07-04 00:54 chunchill 阅读(6751) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 22 下一页