半角的全部确认,带小初音的确认法则^[?-????-???? -]+$ convert_kana ";// 全角カタカナを半角にする$str = zen2han($str);print $str . "";if(is_half($str) == true) { print "ok";} else.....
分类:
Web程序 时间:
2014-08-27 12:23:27
阅读次数:
283
String to Integer (atoi)
Total Accepted: 15482 Total
Submissions: 106043My Submissions
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases...
分类:
其他好文 时间:
2014-08-27 01:40:07
阅读次数:
293
当需要从外部引入一个包(譬如说读写Excel 的POI jar 包 ), 不需要手动地去官网下载一个包然后粘贴到相应的地方。只需要把Java 工程 转为 Maven 工程 ( 在工程上右键 > Configure > Convert to Maven Project ), 然后在生成的 pom.xm...
分类:
其他好文 时间:
2014-08-26 19:24:06
阅读次数:
163
Spark Standalone集群是Master-Slaves架构的集群模式,和大部分的Master-Slaves结构集群一样,存在着Master单点故障的问题。如何解决这个单点故障的问题,Spark提供了两种方案:基于文件系统的单点恢复(Single-Node Recovery with Loc...
分类:
其他好文 时间:
2014-08-26 19:00:56
阅读次数:
567
1、首先排除数据库中读取加密后的字段是否被强制截断。2、AES加密后的byte[]首先应用base64(Convert.ToBase64String)编码一次,若直接用utf8的话会报上述错误,若用unicode编码的话会解密成乱码,原因是加密后的byte数组用其他编码方式编码的话会丢失字符。3、b...
分类:
其他好文 时间:
2014-08-26 01:48:35
阅读次数:
917
原题戳我Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You ha...
分类:
其他好文 时间:
2014-08-26 00:14:25
阅读次数:
334
原文地址:http://justcoding.iteye.com/blog/545978Wordpress audio player with jQueryHow to useWordpress audio player (standalone version)withjQueryandjQuery...
分类:
Web程序 时间:
2014-08-25 22:41:44
阅读次数:
648
//二分法查询 Console.Write("请输入数据个数:"); int n = Convert.ToInt32(Console.ReadLine()); int[] no = new int[n]; ...
分类:
其他好文 时间:
2014-08-25 13:16:04
阅读次数:
201
//降序排序 Console.Write("请输入数据的个数:"); int n = Convert.ToInt32(Console.ReadLine()); int []sz=new int[n]; ...
分类:
其他好文 时间:
2014-08-25 01:02:03
阅读次数:
267
朋友让帮忙做一个短信验证码工具,对此有了初体验。
1. 编码转换:字符集必须是GB2312格式,字符必须用UrlEncode进行编码。
$sms
= "短信验证码:2312【大象投资】";
// utf8
echo
urlencode(mb_convert_encoding($sms,'gb2312','utf-8'));
2. 通知类短信,如果没有备案,晚上...
分类:
其他好文 时间:
2014-08-24 23:59:04
阅读次数:
430