单例模式:构造函数每次创建对象,只有一个被创建. 单纯写个单例模式并不难,利用闭包,可以私有化变量. 1 var single = (function(){ 2 var demo; 3 return function(name){ 4 if(demo){ 5 return demo; 6 } 7 t ...
分类:
其他好文 时间:
2018-12-15 13:36:53
阅读次数:
212
1. cluser概述 2. ClusterModule模块的作用 3.重点类介绍: 3.1 配置类Decider 各种Decider关系如下 以EnableAllocationDecider.java为例: Decider的使用 3.2 配置类Allocator 使用 3.3 服务类 分别调用 2 ...
分类:
其他好文 时间:
2018-12-11 17:22:04
阅读次数:
259
创建并编译Xcode工程时,有几个常用概念想在这里记一下。 Xcode Target: 定义:A target defines a single product; .... 理解:输出文件,等同于VS的Target。比如你创建一个Xcode Application工程,它的默认输出必然是一个App。 ...
分类:
其他好文 时间:
2018-12-11 00:36:11
阅读次数:
145
java中元注解有四个: @Retention @Target @Document @Inherited; @Retention:注解的保留位置 @Retention(RetentionPolicy.SOURCE) //注解仅存在于源码中,在class字节码文件中不包含 @Retention(Ret ...
分类:
编程语言 时间:
2018-12-10 19:13:00
阅读次数:
188
Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements ...
分类:
其他好文 时间:
2018-12-09 16:36:54
阅读次数:
140
系统设计Design For Failure思想 Complex systems fail in spectacular ways. Failure isn’t a question of if, but when. Resilient systems recover from failure; r... ...
分类:
其他好文 时间:
2018-12-09 12:01:23
阅读次数:
758
一、单点登录的概念 单点登录(Single Sign On),简称为SSO。SSO是定义在多个应用系统中,用户只需要登录一次就可以访问所有的相互信任的应用系统。 当我们创建工程的子系统部署在不同的服务中的时候,使用传统的session是无法解决问题的,这时候我们就需要使用相关的单点登录技术来解决。 ...
分类:
其他好文 时间:
2018-12-07 22:32:40
阅读次数:
257
使用属性升级MyBank 访问修饰符 Java中的访问修饰符 Public 、protected、private C# Public公共的 访问级别最高 Private私有的 访问级别最低 访问修饰可以用来修饰字段(属性)和方法,用来限定类成员的访问级别 Student stu = new Stud ...
分类:
其他好文 时间:
2018-12-07 11:54:46
阅读次数:
201
Real mode VS Protected Mode 1. A single selector value can only reference 64K of memory (the upper limit of the 16-bit offset). What if a program has ...
分类:
其他好文 时间:
2018-12-07 11:47:04
阅读次数:
182
Use custom Cypress command for reusable assertions We’re duplicating quite a few commands between the registration and login of our user for assertion ...
分类:
移动开发 时间:
2018-12-06 22:21:23
阅读次数:
231