有时候我们会需要在界面上拖动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
Object.prototype.toString & typeof
Object.prototype.toString 获取某个对象属于哪种内置类型
typeof 得到某个对象的类型
区别:
举个例子:
var arr = new Array();
typeof(arr); //object
Object.prototype.toString.call(arr); //[Object Array]...
分类:
其他好文 时间:
2014-04-28 10:33:42
阅读次数:
279
主调函数分配内存块;在被调用函数中使用;
//写一个函数,;写一个主函数,用被调用函数,求出字符串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
作为一经常对着电脑的人,姐表示压力好大,不仅皮肤受辐射,而且眼睛也备受煎熬。皮肤抹点隔离霜勉强撑一撑,眼睛就要靠设置保护色来稍微减轻点负担了。 先贡献张喜爱滴桌面,养养眼。...