码迷,mamicode.com
首页 >  
搜索关键字:desing pattern    ( 7671个结果
C++字符串分割
//字符串分割函数std::vector split(std::string str,std::string pattern){ std::string::size_type pos; std::vector result; str+=pattern;//扩展字符串以方便操作 ...
分类:编程语言   时间:2014-10-09 02:33:37    阅读次数:220
^_^getElementsByClassName
if (!document.getElementsByClassName) { document.getElementsByClassNameForMobile = function(search) { var d = document, elements, pattern, i...
分类:其他好文   时间:2014-10-08 16:55:05    阅读次数:134
PHP常用正则表达式函数浅析
1. preg_match()函数 preg_match()函数在字符串中搜索模式,如果存在则返回true,否则返回false $pattern='/php/'; $str='php100.com'; echo preg_match($pattern,$str); 输出结果:12. preg_g.....
分类:Web程序   时间:2014-10-08 14:36:45    阅读次数:214
【原创】字符串工具类--找出单元字符串
package week01;import java.util.regex.Matcher;import java.util.regex.Pattern;/**** * * 字符串帮助类 * @author csharper * @since 2014.10.08 * */public class....
分类:其他好文   时间:2014-10-08 13:24:35    阅读次数:152
Leetcode: Wildcard Matching
Implement wildcard pattern matching with support for '?' and '*'.'?' Matches any single character.'*' Matches any sequence of characters (including th...
分类:其他好文   时间:2014-10-08 11:12:55    阅读次数:249
linux 下Eclipse for C/C++的不常见设置
设置1:build project的时候,让编译器支持  三字母词。 项目文件右击--> Properties-->C/C++ Build--> Settings 如图设置: 再 Command line pattern 如图的位置加上 -ansi 或者 -trigraphs 即可。 现在可以尝试下 加 和 不加 这个参数下面代码的执行效果: printf("delete files? ...
分类:编程语言   时间:2014-10-07 19:34:23    阅读次数:222
【Leetcode】ZigZag Conversion
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 fo...
分类:其他好文   时间:2014-10-07 15:21:03    阅读次数:236
spark示例——WordCount修改版
java代码:注:打包的时候一个依赖jar都不要。import java.util.Arrays;import java.util.List;import java.util.regex.Pattern;import org.apache.hadoop.io.IntWritable;import o...
分类:其他好文   时间:2014-10-07 14:59:43    阅读次数:200
简单工厂模式
??????简单工厂模式解释: 简单工厂模式(Simple Factory Pattern)属于类的创新型模式,又叫静态工厂方法模式(Static FactoryMethod Pattern),是通过专门定义一个类来负责创建其它类的实例,被创建的实例通常都具有共同的父类。简单工厂模式的UML图: 简...
分类:其他好文   时间:2014-10-06 23:48:51    阅读次数:243
java中用正則表達式推断中文字符串中是否含有英文或者数字
public static boolean includingNUM(String str)throws Exception{Pattern p = Pattern.compile("[\u4e00-\u9fa5]*[\\d|\\w]+[\u4e00-\u9fa5]*");//或者 Pattern ...
分类:编程语言   时间:2014-10-06 23:11:51    阅读次数:262
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!