码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
jquery学习笔记-jQuery操纵DOM元素属性 attr()和removeAtrr()方法
jQuery中操纵元素属性的方法:   attr(): 读或者写匹配元素的属性值.   removeAttr(): 从匹配的元素中移除指定的属性.    attr()方法 读操作   attr()读操作. 读取的是匹配元素中第一个元素的指定属性值.   格式: .attr(attributeName),返回值类型:String.读取不存在的属性会返回undefi...
分类:Web程序   时间:2015-01-22 15:38:12    阅读次数:190
HashSet<E>泛型类
HashSet泛型类在数据组织上类似于数学上的集合,可以进行“交”、“并”、“差”等运算。 1、HashSet对象 HashSet泛型类创建的对象称为集合,如: 01.HashSet set = HashSet; 那么set就是一个可以存储 string 类型数据的集合,set 可以调用 add(String s) 方法将 string 类型的数据添加到集合中。添加到集合中的数据称...
分类:其他好文   时间:2015-01-22 15:37:29    阅读次数:247
UITextField限制输入的只能是数字
//限制输入的是数字 - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {     return [self validateNumber:string];      } - (BOOL)v...
分类:其他好文   时间:2015-01-22 15:28:46    阅读次数:80
LeetCode:Restore IP Addresses
Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example:Given "25525511135",return ["25...
分类:其他好文   时间:2015-01-22 15:21:34    阅读次数:108
Web端文件打包.zip下载
直接上代码: 1 String zipfilename = "test.zip"; 2 File zipfile = new File(zipfilename); 3 org.apache.tools.ant.types.Fil...
分类:Web程序   时间:2015-01-22 15:14:46    阅读次数:195
Leetcode#87 Scramble String
原题地址两个字符串满足什么条件才称得上是scramble的呢?如果s1和s2的长度等于1,显然只有s1=s2时才是scramble关系。如果s1和s2的长度大于1,那么就对s1和s2进行分割,划分成两个子问题分别处理。如何分割呢?当然不能任意分割。假设分割后s1变成了s11和s12,s2变成了s21...
分类:其他好文   时间:2015-01-22 15:05:02    阅读次数:132
String.IndexOf String.IndexOf String.Substring
String.IndexOf String.IndexOf 方法 (Char, Int32, Int32)报告指定字符在此实例中的第一个匹配项的索引。搜索从指定字符位置开始,并检查指定数量的字符位置。String.IndexOf(value, startIndex, count)参数value:要查...
分类:其他好文   时间:2015-01-22 15:04:02    阅读次数:99
文件路径遍历
private void DeeperDirectory(string path) { FileSystemInfo[] fsi = new DirectoryInfo(path).GetFileSystemInfos(); foreach ...
分类:其他好文   时间:2015-01-22 14:56:28    阅读次数:98
PHP中读取文件的几个方法
整理了一下PHP中读取文件的几个方法,方便以后查阅。1.fread string fread ( int $handle , int $length ) fread() 从 handle 指向的文件中读取最多 length 个字节。该函数在读取完最多 length 个字节数,或到达 EOF 的时.....
分类:Web程序   时间:2015-01-22 14:55:00    阅读次数:146
Leetcode: Longest Substring with At Most Two Distinct Characters
Given a string, find the length of the longest substring T that contains at most 2 distinct characters.For example, Given s = “eceba”,T is "ece" which...
分类:其他好文   时间:2015-01-22 14:52:17    阅读次数:134
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!