码迷,mamicode.com
首页 >  
搜索关键字:word length    ( 36649个结果
对python生成器特性使用的好例子
1.对序列进行分组的函数(摘自web.py源码utils.py文件中) 1 def group(seq, size): 2 """ 3 Returns an iterator over a series of lists of length size from iterable. ...
分类:编程语言   时间:2014-05-28 04:21:00    阅读次数:365
【LeetCode】Substring with Concatenation of All Words
You are given a string,S, and a list of words,L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenati...
分类:其他好文   时间:2014-05-28 04:03:54    阅读次数:240
冒泡排序
public class BubbleSortLib { public int[] Sort(int[] arr) { for (int outer = arr.Length - 1; outer...
分类:其他好文   时间:2014-05-28 03:12:37    阅读次数:223
C#/asp.net文本长度判断、判断邮件格式、判断下拉菜单、判断是否为数字
/// /// 文本长度判断 /// public static bool TextLength(int min, int max, string s) { if (s.Length max) { return false; } else { return true; } } /// ///...
分类:Web程序   时间:2014-05-25 23:09:29    阅读次数:349
【leetcode】Edit Distance 详解
题目:给定两个字符串word1,word2,将word2变成word1所需的最小步数。规定只能用以下三种操作进行修改,且每种操作的步数都计为1. op1:插入一个字符 op2:删除一个字符 op3:替换一个字符 例: word1 = word, word2 = wore, 则将wore的e替换为d则可。 word1 = word,word2 =  wor,则在wor的后面插入一个d则可...
分类:其他好文   时间:2014-05-25 22:56:24    阅读次数:303
java 中length,length(),size()的区别
java中的length属性是针对数组的java中的length()方法是针对字符串String的java中的size()方法是针对泛型集合的public static void main(String[] args) throws IOException { String []list={"it....
分类:编程语言   时间:2014-05-25 22:46:34    阅读次数:236
在Linux下将HTML文件转换成PDF文件
今天要写一个上交的作业,本来是想用Office Word来写的,但是,我的Office貌似不能用了,但是,Linux下的LibreOffice写出的文档,在打印的时候是经常出现乱码的.所以,后来想到可以利用HTML写出格式比较好的文档,所以,想到能不能先写出一份比较规范的文档出来,然后转换成PDF文...
分类:Web程序   时间:2014-05-25 20:32:54    阅读次数:296
C/C++ Bug&Pitfalls
这篇文章也是长期性的一个积累,对于本人个性化的一些使用C/C++造成的失误进行记录。 1)Printf 中格式化使用造成的失误: int main() { char* str="-1234"; printf("string is %lld\nstr length is %...
分类:编程语言   时间:2014-05-25 20:08:47    阅读次数:266
[leetcode]_Remove Duplicates from Sorted Array II
题目:一个有序数组,要求保证数组中的每个元素不能超过2个。 输入:A =[1,1,1,2,2,3] 输出:length =5, and A is now[1,1,2,2,3]思路:双指针 。有些绕,不过理清了后,思路还是很直接明朗的。1、两个指针:p和help。初始化时同时指向数组头。变量cur.....
分类:其他好文   时间:2014-05-25 16:15:16    阅读次数:285
css3 ------ box-shadow
语法: = inset? && {2,4} && ? 注释:问号表示可选参数;{2,4}表示最少2个参数最多4个;当length = 2时,代表position x 和position y的值;当length = 3时,代表position x, position y, blur;当length ....
分类:Web程序   时间:2014-05-25 14:07:41    阅读次数:355
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!