码迷,mamicode.com
首页 >  
搜索关键字:length    ( 19575个结果
查找字符串中第一个不重复的字符
import java.util.*;public class GetFirstNoRepeatChar{ static char getChar(String s){ int len=s.length(); in...
分类:其他好文   时间:2014-06-09 21:36:34    阅读次数:226
分割RGB中物体并计算数目
I=imread(im_path); axes(handles.axes1); imshow(I), % title('原始图像'); %计算每个像素点的真实长度 [x,y]=ginput(2); length=str2double(get(handles.edit5,'st...
分类:其他好文   时间:2014-06-08 18:11:31    阅读次数:263
MySql 同一个列中的内容进行批量修改
问题重现: MySql 数据库中,一给列的内容中包括 “.wmv”     需要将 “.” 后的wmv格式 换为“flv” 解决办法 update video_info set file_path=substring(file_path,1,length(file_path)-3); 先执行以上SQL进行删除; update video_info set file_path =...
分类:数据库   时间:2014-06-08 16:38:39    阅读次数:262
leetcode——Longest Substring Without Repeating Characters 求链表中无重复字符的最大字串长度(AC)
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. Fo...
分类:其他好文   时间:2014-06-08 16:27:47    阅读次数:231
Leetcode: Text Justification. java
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified. You should pack your words in a greedy approach; that i...
分类:编程语言   时间:2014-06-08 15:25:00    阅读次数:282
《Javascript权威指南》学习笔记之十四:JavaScript内建类
Arguments类代表函数参数作为数组元素作为存储,可以按访问数组元素的方法访问参数。arguments.length表示参数的数目。但是,不能用for...in循环访问arguments对象,需用for循环。 arguments有两个重要属性: arguments.callee属性用来表示当前正在执行函数的引用,等价于arguments.callee.apply(null)或者arguments.callee.call(null); oFunction.caller属性表示当前...
分类:编程语言   时间:2014-06-08 05:05:11    阅读次数:242
[LeetCode] Remove Element [20]
题目 Given an array and a value, remove all instances of that value in place and return the new length. The order of elements can be changed. It doesn't matter what you leave beyond the new length. 原题链接(点我) 解题思路 给一个数组和一个数字,移除该数字在数组中所有出现的地方。 这是一个非常简单的题目,应...
分类:其他好文   时间:2014-06-08 04:05:50    阅读次数:284
[LeetCode] Remove Duplicates from Sorted Array [19]
题目...For example,Given input array A = [1,1,2],Your function should return length = 2, and A is now [1,2]. 解题思路, 移除数组中的重复元素,并返回新数组的长度。 这个题目应该算是简单的题目。使用两个变量就可以。具体的看代码 代码实现......
分类:其他好文   时间:2014-06-08 03:54:22    阅读次数:279
[LeetCode] Longest Substring Without Repeating Characters [15]
题目:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. For "bbbbb" the longest substring is "b", with the length...
分类:其他好文   时间:2014-06-08 03:06:52    阅读次数:221
排序算法--(二)
选择排序 直接选择排序: 选择排序,每一趟找到一个最小(大)值,每一趟遍历的数据减少一次。 template void SelectSort(T a[],int length){ T temp; for (int i=0;i0;i--) { shift(a,i,n); //n只是起条件判断作用,并不...
分类:其他好文   时间:2014-06-07 21:10:36    阅读次数:210
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!