码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果
Leetcode: Reverse Words in a String
题目: Given an input string, reverse the string word by word.For example, Given s = “the sky is blue”, return “blue is sky the”. 思路一: 先休整下给定的字符串,去掉其中的多于一个的空格,就是使所有单词之间的空格都变成一个,然后去掉最后面的空格,给最前面加一个空格。这...
分类:其他好文   时间:2015-03-31 16:08:55    阅读次数:178
Android图片处理——压缩、剪裁、圆角、保存
项目中用到的关于图片的处理public class UtilPicture { public static final String IMAGE_UNSPECIFIED = "image/*"; /** * 将图片存储至SD卡,需判断是否装有SD卡、是否可读写、是否有空间,否则提示出错 * @param ctx 上下文 * @param jpeg 要存储...
分类:移动开发   时间:2015-03-31 16:08:06    阅读次数:139
我的string_to_inreger函数
在做leetcode的时候,又遇到这个百提不爽的问题,当时拿过题来,感觉那些情况我都知道的,然后就开始写。结果,还是很多没有注意到的,提交好几次才accept了,在此记录下,也与大家共享。 考虑情况:首先,传入指针是否为空字符串是否为空包含+、-符号【但仅包含+、-为非法的】是否会溢出(超出i...
分类:其他好文   时间:2015-03-31 15:58:53    阅读次数:139
100度烧开水!
static void Main(string[] args) { while (true) { Console.Write("请问是否要烧开水?Y/N:"); string a =...
分类:其他好文   时间:2015-03-31 15:58:28    阅读次数:102
三分钟理解Java继承和多态原理
现上一道面试题 public class MainClass {     public static void main(String[] args) {         Fu f = new Zi();         Zi z = new Zi();         System.out.println("f.num:"+f.num);         System.out.p...
分类:编程语言   时间:2015-03-31 14:51:22    阅读次数:139
ios本地化支持
ios应用本地化     第一步:首先,在xcode左侧选中当前工程,     第二步:接下来注意,以为默认的悬着是Targets,而我们在这里需要的是Project,     第三部:点击进入project下的我们的工程名。选中info     第四部:有选项Localizations,点击下面的加号,选择我们需要提供支持的语言。     第五部:这一步走有两种方法可以实现a:有sto...
分类:移动开发   时间:2015-03-31 14:45:53    阅读次数:137
JAVA用流在指定路径下生成文件
// 待处理的流        ByteArrayOutputStream bao = new ByteArrayOutputStream();       // 定义文件根路径:TOMCAT的temp路径 + 时间戳        String baseDir = System.getProperty("java.io.tmpdir")  + System.curren...
分类:编程语言   时间:2015-03-31 14:43:17    阅读次数:123
[LeetCode] Valid Number
Valid Number Validate if a given string is numeric. Some examples: "0" => true " 0.1 " => true "abc" => false "1 a" => false "2e10" => true Note: It is intended for the pro...
分类:其他好文   时间:2015-03-31 14:42:56    阅读次数:129
Distinct Subsequences
Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence of a string is a new string which is formed from the original string by deleting some (can be none)...
分类:其他好文   时间:2015-03-31 14:42:13    阅读次数:138
DataTable 基本用法 day1
DataTable DtProBaseList = new DataTable("DtProBaseList"); DtProBaseList.Columns.Add("Id", Type.GetType("System.String")); DtProB...
分类:其他好文   时间:2015-03-31 14:38:37    阅读次数:127
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!