[ 问题: ]
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.
[...
分类:
其他好文 时间:
2014-07-22 23:01:35
阅读次数:
331
这个是缩进问题,重新将行前面的空格删掉,换位tab
分类:
编程语言 时间:
2014-05-12 16:35:23
阅读次数:
383
D. Match & Catch
可以用各种方法做,字符串hash,后缀数组,dp,拓展kmp,字典树。。。
字符串hash(模板)
http://blog.csdn.net/gdujian0119/article/details/6777239
BKDR Hash Function :
// BKDR Hash Function
unsigned int BKDRHash(c...
分类:
其他好文 时间:
2014-05-03 21:20:47
阅读次数:
282
#include #include float get_cpu_clock_speed(){ FILE
*fp; char buffer[1024]; size_t bytes_read; char *match; float clock_speed;
fp=fo...
分类:
其他好文 时间:
2014-05-02 14:20:39
阅读次数:
392
算法:
#include
using namespace std;
#define MAXSIZE 100
void calNext(const char *T,int *next);//T为模式串,next为预判数组
int kmp_match(const char *S,const char *T);//在主串S中寻找模式串T,如果找到返回其位置,否则返回-1。位置从0开始
void ...
分类:
其他好文 时间:
2014-05-02 02:25:40
阅读次数:
280
The server network address “TCP://myserverAddress:50221″ cannot be reached or does not exist.
Check the network address name and that the ports for the local and remote endpoints are operational.
(Microsoft SQL Server, Error: 1418)...
分类:
Web程序 时间:
2014-05-01 18:35:53
阅读次数:
665
问题描述:
在Eclipse中运行ant批量打包工具出错,日志信息如下:
D:\Android\android-sdk-windows\tools\ant\build.xml:601: The following error occurred
while executing this line:
D:\Android\android-sdk-windows\tools\ant\bui...
分类:
移动开发 时间:
2014-04-30 22:48:39
阅读次数:
359
1、报错The current deployment target does not support automated __weak references
这个错误是说支持的iOS版本比较低不支持weak关键字,要将其换成 unsafe_unretained 问题就解决了。...
分类:
移动开发 时间:
2014-04-29 13:26:20
阅读次数:
344
org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not...
分类:
系统相关 时间:
2014-04-29 13:15:20
阅读次数:
411
首先声明只有在Linearlayout中,该属性才有效。之所以android:layout_weight会引起争议,是因为在设置该属性的同时,设置android:layout_width为wrap_content和match_parent会造成两种截然相反的效果。如下所示: <LinearLayout
android:layout_width="match_parent"
...
分类:
移动开发 时间:
2014-04-29 13:14:20
阅读次数:
391