前面【设计模式——总篇】提到了3大类共23种设计模式,还是这个图,但是并没有对其定义进行描述。本文便是对这23种设计模式的定义概述,后续将逐个进行细致的讲解。 一、创建型设计模式 Creational Patterns 要点:创建型模式与对象的创建有关。 1、Factory Method(工厂方法模 ...
分类:
其他好文 时间:
2018-04-15 21:49:29
阅读次数:
183
A website domain like "discuss.leetcode.com" consists of various subdomains. At the top level, we have "com", at the next level, we have "leetcode.com ...
分类:
其他好文 时间:
2018-04-15 12:08:50
阅读次数:
174
求连通分量的题吧,当丢失某个城市时,把它标识为visited(已访问),这样在接下来的dfs就不会用到这个点,求图失去这个节点后剩下几个连通分量,需要建造的path便是连通分量数-1。有一个测试点跑了303ms,牛批==一开始想计算lost的那个城市总共连接了多少条path,再计算包含lost的环路 ...
分类:
其他好文 时间:
2018-04-14 12:29:18
阅读次数:
137
If you don't use jupyter, you may have to edit your source codes on your pc and upload them to your server. 1.install ipython 2.jupyter 3.start a new ...
分类:
其他好文 时间:
2018-04-13 20:34:35
阅读次数:
236
方式三 方式四 1 <style type="text/css"> 2 a:link{ 3 color: red; 4 } 5 a:visited { 6 color: blue; 7 } 8 a:hover { 9 color: green; 10 } 11 a:active { 12 color ...
分类:
编程语言 时间:
2018-04-12 23:25:52
阅读次数:
256
A #include <bits/stdc++.h> #define PI acos(-1.0) #define mem(a,b) memset((a),b,sizeof(a)) #define TS printf("!!!\n") #define pb push_back #define inf ...
分类:
其他好文 时间:
2018-04-12 00:12:04
阅读次数:
192
原文:ServiceStack.Redis 请求次数6000次异常Redis是一个非常NB的内存级的数据库,我们可以把很多”热数据“(即读写非常多的数据)放入其中来操作,这样就减少了和关系型数据库(如SqlServer/My Sql等)之间的交互,程序的响应速度也大大提升。 C#利用ServiceS... ...
分类:
其他好文 时间:
2018-04-09 13:06:20
阅读次数:
614
案例1:使用逻辑回归模型,预测客户的信用评级 数据集中采用defect为因变量,其余变量为自变量 1.加载包和数据集 2.查看数据集, 结论:一共有10000行数据,56个变量,其数据集中没有空值,但是有极大值存在 3,数据清洗 修改前 修改后 结论:visit_cnt不再有不符合业务的极大值出现 ...
分类:
编程语言 时间:
2018-03-30 12:14:30
阅读次数:
379
You are planning to take some rest and to go out on vacation, but you really don’t know which cities you should visit. So, you ask your parents for he ...
分类:
其他好文 时间:
2018-03-28 01:36:50
阅读次数:
190
Description Bessie has moved to a small farm and sometimes enjoys returning to visit one of her best friends. She does not want to get to her old home ...
分类:
其他好文 时间:
2018-03-27 18:38:33
阅读次数:
175