#include#includeusing namespace std;int main(){ int cnt;cin>>cnt; string first,last,in("44:44:44"),out("00:00:00"); while(cnt--){ string a,b,c;c...
分类:
其他好文 时间:
2015-03-21 13:56:40
阅读次数:
121
通过在网站上的资料搜集,得到了很多关于string类用法的文档,通过对这些资料的整理和加入一些自己的代码,就得出了一份比较完整的关于string类函数有哪些和怎样用的文档了!下面先罗列出string类的函数有哪一些,然后再罗列出函数的原型,最后到代码的实现标准C++中提供的string类得功能也是非...
分类:
编程语言 时间:
2015-03-21 13:54:54
阅读次数:
155
query()方法实际上是把select语句拆分成了若干个组成部分,然后作为方法的输入参数:
SQLiteDatabase db = databaseHelper.getWritableDatabase();
Cursor cursor = db.query("person", new String[]{"personid,name,age"}, "name like ?", new Stri...
分类:
数据库 时间:
2015-03-21 12:43:47
阅读次数:
170
题目‘?’ Matches any single character.
‘*’ Matches any sequence of characters (including the empty sequence).The matching should cover the entire input string (not partial).The function prototype should...
分类:
编程语言 时间:
2015-03-21 12:43:07
阅读次数:
190
Implement atoi to convert a string to an integer.
具体的网上已经有很多解法
这里主要就是注意一些地方(最重要的就是返回值一开始最好赋值成为long long 因为有可能会越界)
然后就是一些特殊情况的分析了
class Solution {
public:
int atoi(string str) {
i...
分类:
其他好文 时间:
2015-03-21 12:40:46
阅读次数:
153
可变类与不可变类的区别 所谓不可变类: 是指当创建了这个类的实例后,就不允许修改它的属性值。在JDK的基本类库中,所有基本类型的包装类,如Integer和Long类,都是不可变类,java.lang.String也是不可变类。 不可变类: 当你获得这个类的一个实例引用时,你不可以改变这个实例的内容。...
分类:
其他好文 时间:
2015-03-21 12:39:11
阅读次数:
179
包装类在集合中用来定义集合元素的类型。1、Integer.MIN_VALUE:int类型的最小值:-2^312、Integer.MAX_VALUE:int类型的最大值:2^31-13、int Integer.parseInt(String sInteger); 作用:将字符串类型的整数转换为int类...
分类:
编程语言 时间:
2015-03-21 12:35:35
阅读次数:
138
变量的作用域:1、 Java用一对大括号作为语句块的范围,称为作用域。2、作用域中的变量不能重复定义。3、离开作用域,变量所分配的内存空间将被JVM回收。public void name(){ private String name = "rudy"; System.out.print...
分类:
编程语言 时间:
2015-03-21 12:32:55
阅读次数:
109
数组创建数组/*
* 数组
*/
public class Test
{
public static void main(String[] args)
{
int age;//声明
age = 20;//赋值// int[] arrs;//声明了一个数组。array
// int arrs2[];
// float[]...
分类:
编程语言 时间:
2015-03-21 11:23:38
阅读次数:
193
package filestream;import java.io.File;public class FileTester { public static void main(String [] args) { String path = "E:\\java\\dirte...
分类:
编程语言 时间:
2015-03-21 11:09:28
阅读次数:
154