码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
[leetcode 58]Length of Last Word
1题目Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word ...
分类:其他好文   时间:2015-03-02 22:08:09    阅读次数:115
Java8读文件仅需一行代码
Java8读文件仅需一行代码JDK7中引入了新的文件操作类java.nio.file.File,它包含了很多有用的方法来操作文件,比如检查文件是否为隐藏文件,或者是检查文件是否为只读文件。开发者还可以使用Files.readAllBytes(Path)方法把整个文件读入内存,此方法返回一个字节数组,还可以把结果传递给String的构造器,以便创建字符串输出。此方法确保了当读入文件的所有字节内容时,...
分类:编程语言   时间:2015-03-02 20:58:32    阅读次数:186
[leetcode 151]Reverse Words in a String
1 题目Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C ...
分类:其他好文   时间:2015-03-02 20:53:41    阅读次数:162
C#的可空类型与不可空类型
null:为空,表示产量没有指向任何对象,如:string =null; int a =null;//是错的但可以这样,在类型后面加一个问号。int? a =null;//这就是正确的,是一种特殊的int类型int b = 12;加了问号后不能直接与int转换int b = a;//这是错误的...
分类:Windows程序   时间:2015-03-02 20:53:13    阅读次数:155
C# 1作业 2广场砖面积 护栏长度
作业1输入圆柱体的底面半径和高求体积 staticvoid Main(string[] args) { //输入圆柱体的底面半径,高。求体积? int r, h; double v; //输入 Console.W...
分类:Windows程序   时间:2015-03-02 20:51:54    阅读次数:204
c# 结婚例子
Console.Title = "结婚例子"; bool a, b, c; string y; Console.WriteLine("有房?(Y/N)"); y = Console...
分类:Windows程序   时间:2015-03-02 20:44:04    阅读次数:184
cocos2dx解决中文乱码方法
使用plist文件,优点方便做多国语言支持~也不用去做编码转换1.Resource目录下新建text.plist文件,内容格式如下 clickHurt 点击伤害 2.调用如下代码std::string chineseStr;Value...
分类:其他好文   时间:2015-03-02 20:39:07    阅读次数:123
cocos2dx开发之util类&方法——字符串替换
/*将originStr字符串中的searchStr替换成replaceStr*/std::string str_replace(std::string originStr,std::string searchStr,std::string replaceStr){ std::string::...
分类:其他好文   时间:2015-03-02 20:38:45    阅读次数:115
Android成长日记-数据存储之SQLite[2]
Part one:首先看这样一段代码 1 SQLiteDatabase db=openOrCreateDatabase("SQLDemo.db", MODE_PRIVATE,null); 2 //创建表 3 String create_sql="create tabl...
分类:移动开发   时间:2015-03-02 20:33:01    阅读次数:210
c# 两个数的加减乘除
Console.Title = "加减乘除"; double x, y,z=0; string m; int n=0; Console.WriteLine("第一个数:"); x ...
分类:Windows程序   时间:2015-03-02 20:30:37    阅读次数:286
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!