Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Update (2014-11-02):The si...
分类:
其他好文 时间:
2014-11-18 23:34:46
阅读次数:
180
在使用message进行handler的数据交互的时候不可避免的会使用到message作为数据的载体,但是在使用message的时候有人会直接new一个message,有人会使用handler.obtainMessage(),那么这两种方式那种更好一些呢,或者说应用场景分别是什么呢。下面是我的拙见:
/**
* Returns a new {@link androi...
分类:
移动开发 时间:
2014-11-18 15:59:20
阅读次数:
185
题目描述:
Implement strStr().
Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
代码:
int Solution::strStr(char *haystack, char *needle)
{
...
分类:
其他好文 时间:
2014-11-18 11:47:35
阅读次数:
161
html中最常使用的控件就是div了,那么如何获取div的坐标呢?
如何方法可以实现.
Js代码
/***
* 获取div的坐标
* @param divObj
* @returns {{width: number, height: number, left: *, top: Window}}
*/
com.whuang.hsj.di...
分类:
Web程序 时间:
2014-11-15 23:16:09
阅读次数:
296
Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.这个题应该就是求子串的问题,改进的方法是kmp算法。...
分类:
其他好文 时间:
2014-11-14 19:36:52
阅读次数:
254
Thread.Start starts a new OS thread to execute the delegate. When the delegate returns, the thread is destroyed. This is quite a heavy-weight operatio...
分类:
其他好文 时间:
2014-11-13 20:33:57
阅读次数:
159
Implement strStr()Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.这里用的BF算法...
分类:
其他好文 时间:
2014-11-13 18:21:30
阅读次数:
112
头文件:#include 定义:Set set1;添加:set1.insert("the");查询/获取元素set1.find(1); // retrns iterator set1.count(1); // returns numberif(set1.find(1) != set1.end())
分类:
其他好文 时间:
2014-11-13 18:17:30
阅读次数:
175
CREATE function [dbo].[f_testFunc]( @v_id nvarchar(4000) ,@v_type nvarchar(4000) ) returns NVARCHAR(4000) asbegin declare @str_res NVARCH...
分类:
数据库 时间:
2014-11-12 17:46:15
阅读次数:
154
jQuery.post()
jQuery.post( url [, data ] [, success ] [, dataType ] )Returns:
jqXHR
Description: Load data from the server using a HTTP POST request.
version added:
1.0jQuery.post( url...
分类:
Web程序 时间:
2014-11-10 13:57:00
阅读次数:
238