??Unity3D & C#Design Patterns 23 design patterns. Creational Patterns 1. Abstract Factory抽象工厂 创建几个相似的类的一个实例 2. Builder生成器 分离对象构造与它的表示 3. Factory Method工厂方法 ...
分类:
编程语言 时间:
2014-11-16 14:41:28
阅读次数:
383
这个问题是在加密图片,存入sd卡,在解密出来展示,出现的。我个人研究了非常久没解决。最后经过高人指点,最终攻克了。在此,拿出来分享,希望各位少走弯路。我之前的设计思路是:(能够不看哦)1.把图片从drawable读入成bitmap2.bitmap-->byte3.调用AES的byte加密算法。4.加...
分类:
其他好文 时间:
2014-11-15 23:03:03
阅读次数:
315
抽象类、接口、多态都是面向对象中很基础的东西,我相信看到能本篇博客的人本不会再纠结它的基本定义了,本篇文章将尽量的更加深层次的挖掘其内涵,希望能对大家有帮助。一、抽象类 1、形式 1 abstract class Ceshi 2 { 3 abstract void show(); 4...
分类:
编程语言 时间:
2014-11-15 11:18:15
阅读次数:
234
Packets
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 44505
Accepted: 15032
Description
A factory produces products packed in square packets of the sam...
分类:
其他好文 时间:
2014-11-15 00:13:01
阅读次数:
195
using System.Collections.Generic;namespace DesignPattern.Structural.Composite{ public abstract class Component { public virtual void Show...
分类:
其他好文 时间:
2014-11-14 19:38:44
阅读次数:
155
using System.Collections.Generic;namespace DesignPattern.Structural.Flyweight{ public abstract class Flyweight { public abstract void Sho...
分类:
其他好文 时间:
2014-11-14 19:20:05
阅读次数:
135
原文地址:http://leihuang.net/2014/11/09/Constructors-VS-Factory-Methods/
首先看下面两者在创建对象上的区别
// instantiating a class using constructor
Dog dog = new Dog();
// instantiating the class us...
分类:
其他好文 时间:
2014-11-14 17:52:02
阅读次数:
165
一个包含一个或多个纯虚函数的类叫做抽象类。使用关键字abstract声明。抽象类不能初始化,只提供部分实现。可以被继承,继承抽象类的类必须实现抽象类中的虚方法。抽象类只能通过接口或是作为其他类的基类使用。抽象类能够被用于类,属性,方法,索引和事件。使用abstract声明表示要作为其他类的基类使用,...
策略算法类:using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace StrategyDemo
{
abstract class Strategy
{
public abstract void BillInterface();
...
分类:
其他好文 时间:
2014-11-14 10:48:55
阅读次数:
186
django.db.models.Model 的 Meta参数参数类型说明继承abstractboolean是否建表不继承,子类自动充值为默认值(False)managedboolean是否自动建表proxyboolean是否为代理类不继承,子类自动充值为默认值(False)proxy的继承特性,示...
分类:
其他好文 时间:
2014-11-14 10:44:10
阅读次数:
207