码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
java中把字符串“20110101”转换为字符串"2011-01-01"的技巧
java中把字符串“20110101”转换为字符串"2011-01-01"的技巧         import java.text.ParseException; import java.text.SimpleDateFormat; public static void main(String[] args) { String str = "20110101"; SimpleDa...
分类:编程语言   时间:2015-01-22 21:59:10    阅读次数:191
LeetCode[String]: Valid Palindrome
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.  For example,  "A man, a plan, a canal: Panama" is a palindrome.  "race a car" is not a...
分类:其他好文   时间:2015-01-22 21:57:56    阅读次数:361
引入模板模式重构FtpClientUtil
在《ftp上传与下载》文章中,封装一个Ftp上传下载的工具类,主要代码如下: 上传: /**上传文件 * @param remoteFileName 远程文件名称 * @param locaFileName 本地文件名称 */ public void upload(String remoteFileName,String locaFileName){ FTPCli...
分类:其他好文   时间:2015-01-22 21:56:13    阅读次数:250
[LeetCode]17.Letter Combinations of a Phone Number
【题目】 Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone buttons) is given below. Inpu...
分类:其他好文   时间:2015-01-22 21:53:23    阅读次数:259
利用管道获取控制台程序的标准输出
1.该程序调用控制台程序hello.exe,通过管道获取到hello.exe的标准输出数据,并打印到当前程序的标准输出。 #include #include #include using namespace std; void invoke(string exe); int main(int argc, char* argv[]) { string exe = "hello.exe...
分类:其他好文   时间:2015-01-22 21:53:02    阅读次数:231
text多条件过滤gf_condition
/** Retrun Type : string Argument Name as_tj[]*/long count,istring ls_filtercount=upperbound(as_tj)if count'' and not isnull(as_tj[1]) th...
分类:其他好文   时间:2015-01-22 21:47:32    阅读次数:146
黑名单过滤绕过有感
今天发现一个绕过正则过滤的问题,很多应用使用正则表达式对输入数据做安全验证,比如,在修改设备名称时的过滤过则为:String regex = "^.*[\\\\/:\\*\\?\"\\|'%&]+.*$"; //出现1个或多个”\/:*?"|'%&”字符表示不合法Pattern pattern = ...
分类:其他好文   时间:2015-01-22 21:42:13    阅读次数:223
JavaScript数据类型
原始数据类型:Undefined、Null、Boolean、Number 和 String。复杂数据类型:Object1.Undefined 类型 Undefined 类型只有一个值,即特殊的 undefined。 在使用 var 声明变量,但没有对其初始化时,这个变量的值就是 undefine.....
分类:编程语言   时间:2015-01-22 21:38:16    阅读次数:173
在Python中正确使用Unicode
正确处理文本,特别是正确处理Unicode。是个老生常谈的问题,有时甚至会难倒经验丰富的开发者。并不是因为这个问题很难,而是因为对软件中的文本,开发者没有正确理解一些关键概念及其表示方法。在StackOverflow上搜索关于UnicodeDecodeError相关的问题,可以看到很多人都有这样的误解。这些错误的概念可以追溯到Unicode出现之前。那时许多现今的开发者还没入职,也包括我自己。如果...
分类:编程语言   时间:2015-01-22 20:19:28    阅读次数:217
【JAVA正则表达式】
一、String类。java.lang.Object |--java.lang.String常用方法:StringreplaceAll(Stringregex, Stringreplacement) 使用给定的 replacement 替换此字符串所有匹配给定的正则表达式的子字符串。 St...
分类:编程语言   时间:2015-01-22 20:15:14    阅读次数:223
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!