案例分析:重构“策略”模式 经典的“策略”模式 电商领域有个功能明显可以使用“策略”模式,即根据客户的属性或订单中的商品计算折扣。假如一个网店制定了下述折扣规则。 有 1000 或以上积分的顾客,每个订单享 5% 折扣。 同一订单中,单个商品的数量达到 20 个或以上,享 10% 折扣。 订单中的不 ...
分类:
编程语言 时间:
2018-09-26 22:09:55
阅读次数:
206
ASAVersion7.2(4)!hostnamewlgs-outsidedomain-namewlgs-outside.comenablepasswordtsjKg7JHkl3qMaXKencryptedpasswdtsjKg7JHkl3qMaXKencryptednamesdns-guard!interfaceGigabitEthernet0/0nameifoutsidesecurity-le
分类:
其他好文 时间:
2018-09-25 01:29:34
阅读次数:
180
CiscoASAFWreplaceActivesandStandbymustmakesurethecrossconnectionisthere.musthavewrittenconnectionforDCtocheckmustmakesurethelincenseisthereshowverionMusthavearollbackplane.Mustcommunicationeffectively
分类:
系统相关 时间:
2018-09-22 21:30:24
阅读次数:
203
https://github.com/GNS3/gns3-gui/releases https://github.com/GNS3/gns3-gui/releases/download/v2.1.10/GNS3.VM.VirtualBox.2.1.10.zip ...
分类:
其他好文 时间:
2018-09-17 13:34:40
阅读次数:
164
这学期在学计算机网络,实验课要用到gns30.8.6模拟。但是按照老师所给教程在设置idle pc时出现Failed to find a working Idle PC value. Can't set up hypervisor on 127.0.0.1等等问题 好了不要慌 首先我们点击这个tes ...
分类:
其他好文 时间:
2018-09-12 20:12:58
阅读次数:
1263
为了更快的读取数据,我们一般会把常用到的数据加载到Cache中 在.NET中,Cache的存在可以依赖多中方式,主要用到HttpContext.Current.Cache类 在这里,我主要写几种依赖方式 1:不依赖任何条件 HttpContext.Current.Cache.Insert(strin ...
分类:
Web程序 时间:
2018-09-08 11:40:12
阅读次数:
284
反射 (1)反射的定义: 反射就是通过字符串来操作python代码中的对象的属性和方法。 (2)为什么要用反射?三个场景: 1.用户输入input 从用户输入的字符串中,想转换为变量的名字。 2.文件读取 从文件中读出的字符串,想转换为变量的名字。 3.网络 getattr() 先看看getattr ...
分类:
其他好文 时间:
2018-09-05 21:48:29
阅读次数:
201
反射~~~ 反射 使用字符串数据类型的变量名来获取这个变量的值 反射类中的变量: 静态属性 类方法 静态方法 反射对象中的变量 对象属性 普通方法 alexsb30alexsb is eat 普通的给文件名 变更 和getattr方法 本文件反射 import sys getattr(sys.mod ...
分类:
其他好文 时间:
2018-09-03 19:57:36
阅读次数:
168
hcl-cloud用的就是这个putty http://forum.gns3.net/topic5016.html File comment: Compiled PuTTY 0.62 for windows:1 - Normal PuTTY with this patch.2 - Standalon ...
分类:
其他好文 时间:
2018-09-01 21:59:31
阅读次数:
310
跨域问题通用解决方案 设置一个中间件 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 class MiddlewareMixin(object): def __init__(self, ...
分类:
其他好文 时间:
2018-08-31 21:16:49
阅读次数:
129