有时候我们会需要在界面上拖动view;uiview是继承于uiresponder的,所以可以响应触摸相关的事件。
重点是以下一组方法:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent...
分类:
移动开发 时间:
2014-04-29 13:41:20
阅读次数:
485
paip.输入法编程--英文ati化By音标原理与中文atiEn处理流程 python 代码为例
#---目标
1. en vs enPHati
2.en vs enPhAtiSmp
3.cn vs enPHati
4. cn vs enPhAtiSmp
#两个方法,一个获得enPhAtied代码,一个获得哪的smp版本..
def convert2atiEnPnNo...
分类:
编程语言 时间:
2014-04-28 10:47:43
阅读次数:
360
当油量不够时从走过的油站中选最大加油量的
#include
#include
#include
#include
using namespace std;
#define MAX_N 10005
struct node{
int dist,fuel;
}t[MAX_N];
bool cmp(const node &a,const node &b)
{
return a.dist<b.dis...
分类:
其他好文 时间:
2014-04-28 10:44:43
阅读次数:
335
1. If APNs attempts to deliver a notification but the device is offline, the notification is stored for a limited period of time, and delivered to the device when it becomes available.
假如用户手机不在线,可能没有...
分类:
移动开发 时间:
2014-04-28 10:38:40
阅读次数:
582
Git Community Book 中文版书上,摘录如下:
一、基本
git rebase用于把一个分支的修改合并到当前分支。
假设你现在基于远程分支"origin",创建一个叫"mywork"的分支。
$ git checkout -b mywork origin
假设远程分支"origin"已经有了2个提交,如图
现在我们在这个分支做一些修改,然后生...
分类:
其他好文 时间:
2014-04-28 10:37:42
阅读次数:
327
主调函数分配内存块;在被调用函数中使用;
//写一个函数,;写一个主函数,用被调用函数,求出字符串1.在字符串2中间出现过几次!
#define _CRT_SECURE_NO_WARNINGS
#include"stdio.h"
#include"stdlib.h"
#include"string.h"
char mycount(char *myp, char *mysub, int *n)
{
...
分类:
其他好文 时间:
2014-04-27 22:33:20
阅读次数:
325
This articles will show how to avoid the leak of the memory in c++, I just use this articles to summerise something, and show how awesome my English is. If someone need Chinese version, just told me....
分类:
编程语言 时间:
2014-04-27 22:22:19
阅读次数:
430
作为一经常对着电脑的人,姐表示压力好大,不仅皮肤受辐射,而且眼睛也备受煎熬。皮肤抹点隔离霜勉强撑一撑,眼睛就要靠设置保护色来稍微减轻点负担了。 先贡献张喜爱滴桌面,养养眼。...