这里将创建一个自定义的Panel,命名为TestPanel。
如果单机了TestPanel的标题,则有事件headerClick进行响应。
<s:Panel xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe....
分类:
其他好文 时间:
2014-04-29 13:46:20
阅读次数:
435
windows下面可以主线程while loop接受input;但是觉得很丑。
linux没办法这样,可以用注册信号的办法。实现起来也不难:
#include "stdio.h"
#include "unistd.h"
#include "signal.h"
#include "error.h"
volatile bool isStop = false;
static void handl...
分类:
其他好文 时间:
2014-04-29 13:42:21
阅读次数:
418
有时候我们会需要在界面上拖动view;uiview是继承于uiresponder的,所以可以响应触摸相关的事件。
重点是以下一组方法:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent...
分类:
移动开发 时间:
2014-04-29 13:41:20
阅读次数:
485
- (CGFloat)folderSizeAtPath:(NSString *) folderPath
{
NSFileManager * manager = [NSFileManager defaultManager];
if (![manager fileExistsAtPath:folderPath])
{
return 0;
...
分类:
移动开发 时间:
2014-04-29 13:36:20
阅读次数:
379
在监控线上系统时,需要实时监控异常日志信息。...
分类:
其他好文 时间:
2014-04-29 13:27:20
阅读次数:
320
基础篇
objective-c基础教程
iphone 开发秘籍
进阶篇
iOS 6编程实战
Objective-C 高级编程:iOS与OS X多线程和内存管理
Effective Objective-C 2.0:编写高质量iOS与OS X代码的52个有效方法...
分类:
移动开发 时间:
2014-04-29 13:25:21
阅读次数:
402
习惯了用apache后,当第一次用nginx时,把原来的项目(thinkphp框架)部署在新服务器上的时候,惊呆了!
所有的URL模式下都不能正常运行,甚至连css,js文件都不能正常加载。
原因是ngibx不支持pathinfo
主要是需要配置nginx
location / {
root D:/wnmp/www;
index ind...
分类:
Web程序 时间:
2014-04-29 13:11:20
阅读次数:
680
当油量不够时从走过的油站中选最大加油量的
#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