自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 收藏
  • 关注

原创 对象等同性的分析与实现 - C#

当我们创建自己的类型时(无论是class还是struct),都应为类型定义“等同性”的含义。C#提供了4种不同的函数来判断两个对象是否“相等”。public static bool ReferenceEquals(object left, object right);public static bool Equals(object left, object right);public virtual bool Equals(object obj);public static bool operat

2020-07-26 14:00:07 1081

原创 设计模式基于C#的实现与扩展——创建型模式(六)

6. 原型模式Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.用原型实例指定创建对象的种类,并且通过拷贝这些原型创建新的对象。《设计模式:可复用面向对象软件的基础》原型模式是创建型模式中一种比较强调...

2019-12-09 18:51:22 166

原创 设计模式基于C#的实现与扩展——创建型模式(五)

5. 生成器模式Separate the construction of a complex object from its representation so that the same construction process can create different representations.将一个复杂对象的构建与它的表示分离,使得同样的构建过程可以创建不同的表示。《设计模式:...

2019-12-02 20:24:16 142

原创 设计模式基于C#的实现与扩展——创建型模式(四)

4. 单件模式Ensure a class only has one instance, and provide a global point of access to.保证一个类仅有一个实例,并提供一个访问它的全局访问点。《设计模式:可复用面向对象软件的基础》单件模式是几个创建型模式中最独立的一个,它的主要特点不是根据用户程序调用生产一个新的实例,而是控制某个类型的实例数量——唯一一...

2019-11-25 19:03:48 175

原创 设计模式基于C#的实现与扩展——创建型模式(三)

3. 抽象工厂Provide an interface for creating familyes of related or dependent objects.提供一个创建一系列相关或相互依赖对象的接口,而无须指定它们的具体类型。——《设计模式:可复用面向对象软件的基础》在介绍抽象工厂模式之前,我们先回顾下其他工厂模式的核心目标:直接由客户程序创建对象的时候,我们通过工厂把这个创建...

2019-11-25 19:02:44 122

原创 设计模式基于C#的实现与扩展——创建型模式(二)

2. 工厂方法Define an interface for creating an object, but let subclassses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.定义一个用于创建对象的接口,让子类决定实例化哪一个类。工厂...

2019-11-25 19:01:31 110

原创 设计模式基于C#的实现与扩展——创建型模式(一)

创建模式使用创建模式的主要动机来自于“变化”,应用的哪些组成会快速变化呢?不一定,多数项目会有一个相对稳定的核心,无论是被叫做Framework,还是更时髦,感觉更底层的Foundation,这个部分相对比较稳定,言外之意其他部分都会“相对”变化比较频繁。创建模式抽象了实例化过程。它们帮组一个系统独立于如何创建、组合和表示对象。一个类创建模式使用继承改变被实例化的类,而一个对象创建模式将实例化...

2019-11-25 18:59:57 151

原创 需求说明分析

需求说明分析1. 甄别需求是谁——分辨出角色是什么 —— 明确一个可以分享的愿景为什么——识别共同目标2. 使用用户故事表达“愿求”通过角色和利益来挖掘愿望用故事版的方式阐明用户故事的需求3. 使用场景确认用户故事用标准形式表达场景使用FIT表格编码场景脚本使用已知——当……时——那么句型编写场景脚本用例与用户故事1. 甄别需求描述“是什么”,即需要解决的问题,组成需求说明的核心内容。需求说明...

2019-11-18 17:29:55 339

翻译 Python学习笔录(六)--- 输入和输出

Input and OutputHow do you convert values to strings? Luckily, Python has ways to convert any value to a string: pass it to the repr() and str() functions. The str() function is meant to return rep...

2018-02-21 13:33:29 235

翻译 Python学习笔录(五)--- 模块

ModulesA module is a file containing Python definitions and statements. The file name is the module name with the suffix .py appended, the module’s name (as string) is available as the value of the...

2018-02-11 21:49:43 209

原创 日期类型在浏览器与协议中的差异

日期类型在浏览器与协议中的差异概述我在本文前半部分主要是Javascript的日期类型的兼容性问题,后半部分主要是分析日期类型表现格式在不同协议中的差异。JavaScript的日期类型的兼容性最近在做一个项目中,使用了JavaScript来处理时间问题。用到的功能有两个:字符串与日期类型的相互转换,求两个日期的时间差。这么简单的功能,居然也因为浏览器对JavaScript实...

2018-02-10 13:46:31 891

原创 REST - 表述性状态转移

表述性状态转移(REST - Representional State Transfer) The Representational State Transfer (REST) style is an abstraction of the architectural elements within a distributed hypermedia system. - Roy T.Field...

2018-02-09 19:50:55 640

翻译 Python学习笔录(四)--- 数据结构

Data StructuresThe list methods make it very easy to user a list as a stack (“last-in, first-out”). To add an item to the top of the stack, user append(). To retrieve an item from the top of the st

2018-02-04 23:21:52 183

翻译 Python学习笔录(三)--- 更多的控制工具

More Control Flow ToolsThe keyword elif is short for else if, and is useful to avoid excessive indentation. An if...elif...elif... sequence is a substitute for the switch and case statements found

2018-02-04 15:03:46 331

原创 Redis的基本指令

Redis的基本指令REmote DIctionary Server(Redis) 是一个由Salvatore Sanfilippo写的key-value存储系统。 它通常被称为数据结构服务器,因为值(value)可以是 字符串(string), 散列(hash), 列表(list), 集合(sets) 和 有序集合(sorted sets)等类型。基本类型基本类型的存取指令S

2018-01-30 23:06:07 610

翻译 Python学习笔录(二)--- Python的非正式介绍

2. An informal introduction to PythonComment in Python start with the hash character, #, and extend to the end of the physical line. A comment may appear at the start of a line or following whitesp

2018-01-21 22:52:54 231

翻译 Python学习笔记(一)--- Python 解释器

Using Python Interpreter1. Perhaps the quickest check to see whether command line editing is supported is typeControl-P to the first Python prompt you get. If it beeps, you have command line editing.

2018-01-18 23:55:53 299

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除