Adapter Pattern http://groovy-lang.org/design-patterns.html#_adapter_pattern 适配器模式,对象存在一个接口, 此接口在此对象中不能被另外一类对象使用, 提供对象的适配接口,将此接口做包装,适配为另外一类接口。 这类模式也叫包 ...
分类:
其他好文 时间:
2018-04-05 21:29:22
阅读次数:
156
Bouncer Pattern http://groovy-lang.org/design-patterns.html#_bouncer_pattern 保镖模式主要负责对函数的输入参数的合法性检查, 如果遇到非法输出,则停止函数后续执行。 groovy提供了 assert 机制, 语言级别内置功能 ...
分类:
其他好文 时间:
2018-04-05 21:27:51
阅读次数:
177
这是一个网站对JVM培训资料,觉得问的问题挺好。https://bloggceasy.files.wordpress.com/2017/11/jvm-training.pdfhttps://blog.fastthread.io/tag/thread-dump-patterns/
分类:
其他好文 时间:
2018-04-04 18:04:57
阅读次数:
143
1设计模式 简介 2.什么是GOF(四人帮 。 Gang of Four) Design Patterns Elementes of ReusableObject Oriented Software (中文译名:设计模式 可复用的面向软件元素) 3.设计模式的类型 创建型模式 工厂模式 代码实现: ...
分类:
其他好文 时间:
2018-04-04 16:20:09
阅读次数:
180
题目传送门 快速的通道I 快速的通道II 题目大意 给定一堆短串,和一个文本串,问哪些短串在文本串中出现的次数最多。 题目传送门 快速的通道I 快速的通道II 题目大意 给定一堆短串,和一个文本串,问哪些短串在文本串中出现的次数最多。 我觉得刘汝佳的做法,时间复杂度有问题。只是似乎这道题短串串长太短 ...
分类:
其他好文 时间:
2018-03-24 20:35:02
阅读次数:
183
如下: 例子: 查找本目录下除了js文件以外的所有文件,找到包含‘Debug’字符串的文本行。 ref: https://unix.stackexchange.com/questions/125360/how-to-specify-matching-patterns-while-excluding- ...
分类:
其他好文 时间:
2018-03-22 19:22:43
阅读次数:
162
#include using namespace std; bool check(char c)//检查是否为字母或数字 { if(c>='A'&&c='a'&&c='0'&&c count; string str; getline(cin,str); int i = 0; while(i='A'&... ...
分类:
其他好文 时间:
2018-03-13 01:12:40
阅读次数:
173
设计模式(Design Patterns) 设计模式(Design pattern)是一套被反复使用、多数人知晓的、经过分类编目的、代码设计经验的总结。 使用设计模式是为了可重用代码、让代码更容易被他人理解、保证代码可靠性。 毫无疑问,设计模式于己于他人于系统都是多赢的,设计模式使代码编制真正工程化 ...
分类:
编程语言 时间:
2018-03-11 19:23:48
阅读次数:
223
Each of Farmer John's N cows (1 ≤ N ≤ 1,000) produces milk at a different positive rate, and FJ would like to order his cows according to these rates ...
分类:
其他好文 时间:
2018-03-10 16:10:30
阅读次数:
192
后缀数组求至少重复k次的最长字符串,二分分组即可 ...
分类:
编程语言 时间:
2018-03-08 17:16:44
阅读次数:
198