//java 字符串大小比较String a="b123"; String b="b124"; String d="b122"; String e="b123"; int c=a.compareTo(b); System.out.println(c);//-1 c=a.compareTo(d); S...
分类:
编程语言 时间:
2015-03-20 10:42:06
阅读次数:
131
转自:http://www.tianzhigang.com/article.asp?id=280PHP的数据类型转换属于强制转换,允许转换的PHP数据类型有:(int)、(integer):转换成整形(float)、(double)、(real):转换成浮点型(string):转换成字符串(bool...
分类:
Web程序 时间:
2015-03-20 10:39:59
阅读次数:
144
-(BOOL)isChineseCharacterAndLettersAndNumbersAndUnderScore:(NSString *)string{ int len=string.length; for(int i=0;i= 0x4e00 && a <= 0x9fa6)) ))...
分类:
其他好文 时间:
2015-03-20 10:37:26
阅读次数:
136
一、描述
1、输入一行字符,分别统计出其中英文字母、空格、数字和其它字符的总个数和每个字符出现的频率。
程序分析:使用String类的matchs()分别统计符合正则表达式的每类字符的总个数,然后分别使用List和Map集合类统计每个字符出现的频率。
2、求s=a+aa+aaa+aaaa+aa...a的值,其中a是一个数字。例如2+22+222+2222+22222(此时共有...
分类:
编程语言 时间:
2015-03-20 09:19:36
阅读次数:
353
Notes:Do not forget to clean the total and rec. 1 class Solution { 2 public: 3 int longestValidParentheses(string s) { 4 int len = s.size(...
分类:
其他好文 时间:
2015-03-20 09:12:56
阅读次数:
119
原文:在ASP.NET中使用SOAP Extensions捕获WebService异常Application_Error不能捕获的异常 [WebMethod] public string HelloWorld() { throw new Exception("this exption can't b...
分类:
Web程序 时间:
2015-03-20 09:12:42
阅读次数:
210
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-03-20 09:12:38
阅读次数:
107
For this problem, we are OK to use hash set, since no numbers are needed. 1 class Solution { 2 public: 3 int lengthOfLongestSubstring(string s) { ...
分类:
其他好文 时间:
2015-03-20 09:09:30
阅读次数:
101
Seach one by one. 1 class Solution { 2 public: 3 string getNext(const string& s1, const string& s2) { 4 int len = min(s1.size(), s2.size()...
分类:
其他好文 时间:
2015-03-20 08:06:00
阅读次数:
121
O(n2): 1 class Solution { 2 public: 3 string getP(string s, int start, int end) { 4 while (start >= 0 && end result.size()) result = s1;1...
分类:
其他好文 时间:
2015-03-20 08:05:24
阅读次数:
123