Regex构造函数Regex(string pattern)Regex(string pattern,RegexOptions options)参数说明pattern:要匹配的正则表达式模式options:指定是否要编译,忽略大小写等等Regex.Replace方法-C#Regex.Replace(...
分类:
其他好文 时间:
2014-08-07 02:56:58
阅读次数:
549
进入vi的命令vi filename :打开或新建文件,并将光标置于第一行首 vi +n filename :打开文件,并将光标置于第n行首 vi + filename :打开文件,并将光标置于最后一行首 vi +/pattern filename:打开文件,并将光标置于第一个与pattern匹配的...
分类:
系统相关 时间:
2014-08-06 18:55:59
阅读次数:
363
设计模式(Design Patterns) ——可复用面向对象软件的基础设计模式(Design pattern)是一套被反复使用、多数人知晓的、经过分类编目的、代码设计经验的总结。使用设计模式是为了可重用代码、让代码更容易被他人理解、保证代码可靠性。 毫无疑问,设计模式于己于他人于系统都是多赢的,设...
分类:
编程语言 时间:
2014-08-06 17:51:31
阅读次数:
253
学习别人的方法。大致是:
无源汇的最大流 : 新建源点,汇点,sum[i]为每个点进来的下界流之和减去出去的下界流之和,如果sum[i] > 0,由源点向该点建一条边,上界为sum[i],下界为0
如果sum[i]
#include
#include
#include
#include
#include
#include
#include
#include
#inc...
分类:
其他好文 时间:
2014-08-06 15:00:51
阅读次数:
219
题目:
The string "PAYPALISHIRING" is written in a zigzag pattern on a given
number of rows like this: (you may want to display this pattern in a fixed font for better legibility)
P A H N
A...
分类:
其他好文 时间:
2014-08-06 14:59:41
阅读次数:
307
题目:Implement wildcard pattern matching with support for '?' and '*'.'?' Matches any single character.'*' Matches any sequence of characters (includin....
分类:
编程语言 时间:
2014-08-06 04:10:50
阅读次数:
325
一、关联规则中的频繁模式 关联规则(Association Rule)是在数据库和数据挖掘领域中被发明并被广泛研究的一种重要模型,关联规则数据挖掘的主要目的是找出:【频繁模式】:Frequent Pattern,即多次重复出现的模式和并发关系(Cooccurrence Relationships)....
分类:
其他好文 时间:
2014-08-06 01:34:20
阅读次数:
261
创建型模式(Creational Pattern)1、 抽象工厂模式(Abstract Factory Pattern)介绍提供一个创建一系列相关或相互依赖对象的接口,而无需指定它们具体的类。2、 建造者模式(Builder Pattern)介绍将一个复杂对象的构建与它的表示分离,使得同样的构建过程...
分类:
其他好文 时间:
2014-08-05 18:41:00
阅读次数:
218
说起模式,被人提起最多的是GoF的23个模式,甚至很多人误解模式就是GoF模式,认为学习设计必须要学习GoF模式,然后拼命往自己的项目上套用。GoF模式不是最有用,也不是最本质的,只是较早归纳写在书中。后续又出了很多模式的书籍,例如POSA系列(1-5)、PLoPD系列(1-5)……,PLoP以及C...
分类:
其他好文 时间:
2014-08-05 15:25:19
阅读次数:
141
转自stackoverflow和wiki In short, CRTP is when a class A has a base class which is a template specialization for the class A itself. E.g.template class ....
分类:
其他好文 时间:
2014-08-05 15:24:49
阅读次数:
214