事件系统组成元素:
1. 每一个事件被包装为一个MotionEvent
2. 描述一个事件的位置(location)
--ACTION_DOWN
--ACTION_UP
--ACTION_MOVE
--ACTION_POINTER_DOWN
--ACTION_POINTER_UP
--ACTION_CANCEL
3.事件的元数...
分类:
其他好文 时间:
2014-05-18 06:34:46
阅读次数:
264
【题目】
Implement strStr().
Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack.
【题意】
实现库函数strStr(), 功能是在字符串haystack中找出目标串needle第一次出现的索引位
【思路】
字符串的匹配,可以用暴力解法,但不推荐。一般使用KMP算法求解。
简要介绍一下KMP的思想:
...
分类:
其他好文 时间:
2014-05-18 04:10:04
阅读次数:
244
对于一个c/c++程序员来说,内存泄漏是一个常见的也是令人头疼的问题。已经有许多技术被研究出来以应对这个问题,比如 Smart Pointer,Garbage
Collection等。Smart Pointer技术比较成熟,STL中已经包含支持Smart Pointer的class,但是它的使用似乎...
分类:
编程语言 时间:
2014-05-17 04:10:43
阅读次数:
418
A linked list is given such that each node
contains an additional random pointer which could point to any node in the list
or null.Return a deep copy ...
分类:
其他好文 时间:
2014-05-15 21:00:06
阅读次数:
325
面向对象编程--句柄类与继承引言: C++中面向对象编程的一个颇具讽刺意味的地方是:不能使用对象支持面向对象编程,相反,必须使用指针或引用。void get_prices(Item_base object,
Item_base *pointer,
Item_base &reference)
{
//需要根据指针或引用实际所绑定...
分类:
编程语言 时间:
2014-05-15 08:19:33
阅读次数:
359
值
描述
url
需使用的自定义光标的 URL。
注释:请在此列表的末端始终定义一种普通的光标,以防没有由 URL 定义的可用光标。
default
默认光标(通常是一个箭头)
auto
默认。浏览器设置的光标。
crosshair
光标呈现为十字线。
pointer
光标呈现为指示链接的指针(一只手)
move
...
分类:
Web程序 时间:
2014-05-15 05:32:35
阅读次数:
1537
Implement strStr().Returns a pointer to the
first occurrence of needle in haystack, or null if needle is not part of
haystack.此题我觉得并不是真要你写出kmp算法。 指针暴力...
分类:
其他好文 时间:
2014-05-15 01:49:42
阅读次数:
330
在学习Stl的过程中,经常看到->符号的重载,但一直不太明白。
今天做了一个小测试,来看看如果调用它。 以list的迭代器为例,在 pointer operator->() const { return
&(operator*());}中加入 cout str_list; str_list.push...
分类:
其他好文 时间:
2014-05-14 10:32:52
阅读次数:
221
不求全面,先留个爪: TNotifyEvent = procedure(Sender:
TObject) of object; TMethod = record Code, Data: Pointer;
end;判断两个按钮的事件是否相等:procedure TForm1.Button5...
分类:
其他好文 时间:
2014-05-12 20:58:45
阅读次数:
432
In Django parlance, a project is the final product,
and it assembles one or more applications together.Manage.py is a pointer back
to Django-admin.py ...
分类:
其他好文 时间:
2014-05-10 07:56:19
阅读次数:
480