Given a string s consists of upper/lower-case alphabets and empty space characters
' ', return the length of last word in the string.
If the last word does not exist, return 0.
Note: A word is defi...
分类:
其他好文 时间:
2014-10-27 14:26:12
阅读次数:
249
string s = null; 表示一个空串,没有占用了空间,不在内存中开辟空间 string s = "";在内存中开辟空间,但空间中没有值(""也是一个字符串)表示一个空串,被实列化了,占用了内存空间null表示一个空引用,""表示一个空字符串,string.Empty和“”类似,在内存中分配...
分类:
其他好文 时间:
2014-10-27 12:22:48
阅读次数:
181
使用数据库实现对数据的存储。
下面上一个小例子,写日记。
效果如下:
当LIstView中没有数据显示时,我们需要告诉用户没有数据.
方法有二:
1.
activity继承ListActivity,在布局文件中如下编写:
<TextView
android:id="@id/android:empty"
andro...
分类:
移动开发 时间:
2014-10-27 06:57:26
阅读次数:
341
As in C or Java, you can leave the pre and post statements empty.package main import "fmt"func main() { sum := 1 for ; sum < 1000; { sum...
分类:
其他好文 时间:
2014-10-27 00:10:35
阅读次数:
221
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 doe...
分类:
其他好文 时间:
2014-10-26 14:18:54
阅读次数:
158
Implement wildcard pattern matching with support for '?' and '*'.
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
The matching should cover t...
分类:
其他好文 时间:
2014-10-26 13:08:38
阅读次数:
172
一.字符串1. 字符串的恒定性(1)字符串拘留池的概念(即时窗口的使用);(2)在创建一个字符串对象的时候,会先在字符串拘留池寻找是否有相同字符串内容的对象,如果有有就直接让变量指向这个对象,如果没有就创建新的对象;2. 字符串部分函数用法(1)string.Empty代表空字符串“”,而不是nul...
分类:
Web程序 时间:
2014-10-26 13:06:25
阅读次数:
273
Write a program to solve a Sudoku puzzle by filling the empty cells.
Empty cells are indicated by the character '.'.
You may assume that there will be only one unique solution.
A sudoku...
分类:
其他好文 时间:
2014-10-25 17:27:41
阅读次数:
232
Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.
The Sudoku board could be partially filled, where empty cells are filled with the character '.'.
A partially fille...
分类:
其他好文 时间:
2014-10-25 17:27:30
阅读次数:
172
1.set的基本操作:begin()返回指向第一个元素的迭代器clear()清除所有元素count()返回某个值元素的个数empty()如果集合为空,返回trueend()返回指向最后一个元素的迭代器equal_range()返回集合中与给定值相等的上下限的两个迭代器erase()删除集合中的元素f...
分类:
编程语言 时间:
2014-10-25 15:48:41
阅读次数:
229