码迷,mamicode.com
首页 >  
搜索关键字:state pattern    ( 15374个结果
JavaScript验证邮箱的正则表达式
用JavaScript验证邮箱的正则表达式时,一般比较常用的是用以下两种:var pattern = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;var pattern = ^\w+[-+.]\w+)*@\w+([-.]\w+)*\.....
分类:编程语言   时间:2014-07-20 10:05:58    阅读次数:194
hdu 1009--greedy
/** \brief hdu 1009--greedy * * \param date 2014/7/18 * \param state AC * \return * */ #include #include #include #include using namespace std; const int MAXN=1001; struct Data { int...
分类:其他好文   时间:2014-07-19 23:41:49    阅读次数:237
[问题]SqlServer创建数据库出错
SqlServer 2008“Msg 1807, Level 16, State 3, Line 1Could not obtain exclusive lock on database ‘model’. Retry the operation later.Msg 1802, Level 16, S...
分类:数据库   时间:2014-07-19 17:28:23    阅读次数:1153
C# 桥模式代码
// Bridge pattern -- Real World exampleusing System;using System.Collections;// "Abstraction"class BusinessObject{ // Fields private DataObject dataOb...
分类:其他好文   时间:2014-07-19 16:33:01    阅读次数:127
认识lua
lua_State *L = lua_open(); //建立一个LUA状态机 luaopen_base(L); // 启动它 const char *buf = "print('hello, world!')"; lua_dostring(buf); //把buf写入到lua中并执行 lu...
分类:其他好文   时间:2014-07-19 16:06:34    阅读次数:252
第 16 章 观察者模式【Observer Pattern】
以下内容出自:> 《孙子兵法》有云:“知彼知己,百战不殆;不知彼而知己,一胜一负;不知彼,不知己,每战必殆”,那怎么才能知己知彼呢?知己是很容易的,自己的军队嘛,很容易知道,那怎么知彼呢?安插间谍是很好的一个办法,我们今天就来讲一个间谍的故事。 韩非子大家都应该记得吧,法家的代表人物,主张建立法.....
分类:其他好文   时间:2014-07-19 12:15:58    阅读次数:250
java的几种验证
package com.cn.wangk.util; import java.util.HashMap;import java.util.regex.Matcher;import java.util.regex.Pattern; import org.apache.commons.lang.Stri...
分类:编程语言   时间:2014-07-19 11:36:20    阅读次数:290
saltstack细节要点
1、pillar的top.sls的路径是由pillar_roots和state_top配置参数决定的。2、_grains和_modules目录必须是file_roots定义的目录3、编写sls文件时经常会出现tab,但yaml只支持空格。其实可以转换的,转换如下::setexpandtab:%ret!4(如果tab是8个空格,则是8)4、在编写策略时,如果..
分类:其他好文   时间:2014-07-19 02:23:45    阅读次数:270
访问指定路径下的目录以及文件
#include "stdafx.h"//vs2010下运行通过#undef UNICODE#include #include #include #include using namespace std;void browseFile(char* path){ char pattern[FILENA...
分类:其他好文   时间:2014-07-18 18:36:12    阅读次数:187
Javascript RegExp对象---获取url中某一个参数的值
RegExp 对象RegExp 对象表示正则表达式,它是对字符串执行模式匹配的强大工具。直接量语法/pattern/attributes实例:window.location.href:http://localhost:8100/aspx/main/ServiceCenter_list.aspx?ca...
分类:编程语言   时间:2014-07-18 15:05:11    阅读次数:212
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!