Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2015-09-07 22:51:12
阅读次数:
227
今天遇到截取字符串的问题,在网上查了IndexOf、LastIndexOf、Substring这三种截取字符串的使用总结如下: String.IndexOfString.IndexOf 方法 (Char, Int32, Int32)报告指定字符在此实例中的第一个匹配项的索引。搜索从指定字符位置开始,...
分类:
其他好文 时间:
2015-09-07 10:50:44
阅读次数:
190
在js字符截取函数有常用的三个slice()、substring()、substr()了,下面我来给大家介绍slice()、substring()、substr()函数在字符截取时的一些用法与区别吧。stringObject.substring(start,stop)用于提取字符串中介于两个指定下标...
分类:
编程语言 时间:
2015-09-07 09:29:00
阅读次数:
135
【题目】LeetCode(5): Longest Palindromic SubstringURL: https://leetcode.com/problems/longest-palindromic-substring/【描述】Given a stringS, find the longest p...
分类:
其他好文 时间:
2015-09-07 07:02:02
阅读次数:
339
split() 方法将字符串分割为字符串数组,并返回此数组。stringObject.split(separator,limit)我们将按照不同的方式来分割字符串:使用指定符号分割字符串,代码如下:var mystr = "www.imooc.com";document.write(mystr.sp...
分类:
其他好文 时间:
2015-09-07 00:26:47
阅读次数:
281
在SQLServer中使用该sql语句可以生成GUID:select cast(NEWID() as varchar(36)) as uuid通过一下语句将GUID中的'-'字符去掉:select SUBSTRING(uuid,1,8)+SUBSTRING(uuid,10,4)+SUBSTRING(...
分类:
数据库 时间:
2015-09-06 20:09:08
阅读次数:
196
Js:$(function(){ var goodNum="90%";//好评的百分比 var mediumNum="10%"//中评的百分比 var badNum="3%"//差评的百分比 var num=goodNum.substring(0,2)// 进度条 $(...
分类:
其他好文 时间:
2015-09-06 19:55:18
阅读次数:
170
字符串截取: SELECT?SUBSTRING(‘abcdefg‘,2,5) 计算字符长度: len(string) --查询2010前入学入学ID
select?user?from?cf_log?where?substr(user,0,4)<2010?order?by?user?ASC?limit?0,10; 统计元组数...
分类:
数据库 时间:
2015-09-06 18:41:53
阅读次数:
297
Longest Substring with At Most Two Distinct CharactersGiven a string, find the length of the longest substring T that contains at most 2 distinct char...
分类:
其他好文 时间:
2015-09-06 12:38:14
阅读次数:
178
1 class Solution { 2 public: 3 4 int lengthOfLongestSubstring(string s) { 5 // for ASCII char sequence, use this as a hashmap 6 vector...
分类:
其他好文 时间:
2015-09-05 12:17:57
阅读次数:
127