1,直接调用,结束后不返回自己的应用[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:@"tel://10086"]];2,使用WebView请求调用系统电话,结束后可以返回自身应用,合法UIWebView*webView=[[UIWebViewalloc]initWithFrame:CGRectZero];[self.viewaddSubview:web..
分类:
移动开发 时间:
2014-07-24 23:44:54
阅读次数:
274
图片压缩:
NSData *imageData
= UIImageJPEGRepresentation(self.uploadImage
, 0.55);
NSString
*file_name = [TimeUtil getDateStringWithFormat:@"yyyy-MM-dd"];
NSString
*upload_name =[NSStrin...
分类:
其他好文 时间:
2014-07-24 23:36:03
阅读次数:
248
MRC
防止 block 对self的引用 解决办法
__block typeof(self) weakSelf = self;
ARC
防止 block 对self的引用 解决办法
__weak typeof(self) weakSelf = self;...
分类:
其他好文 时间:
2014-07-24 23:21:43
阅读次数:
290
Database memory threshold 数据库内存阈值 Self tuning memory 自调整内存 Utilities heap size 实用程序堆大小 Number of asynchronous page clea...
分类:
其他好文 时间:
2014-07-24 22:16:42
阅读次数:
243
Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen...
分类:
其他好文 时间:
2014-07-24 21:24:16
阅读次数:
296
内置方法 说明 ?__init__(self,...) 初始化对象,在创建新对象时调用 ?__del__(self) 释放对象,在对象被删除之前调用 ?__new__(cls,*args,**kwd) 实例的生成操作 ?__str__(self) 在使用print语句时被调用 ...
分类:
编程语言 时间:
2014-07-24 12:32:15
阅读次数:
374
#用到了贪心方法。
#这个贪心刚开始想错了方法,后来想到了新的方法,AC
#include
#include
#include
#include
using namespace std;
struct note
{
int x1,x2,y1,y2,x,y;
int num;
} a[5010];
int vis[5010];
bool cmp1(note aa,note...
分类:
其他好文 时间:
2014-07-24 12:26:15
阅读次数:
185
有些时候,不能使用ajax来进行提交数据,必须用表单来提交,但是表单提交后刷新页面不可忍受,如何能进行表单无刷新提交呢。近期在工作中就遇到了这个问题,经过深思熟虑还有和RD的仔细沟通。决定用iframe来解决这个问题。form的target属性不光有_blank,_self, _top, _pare...
分类:
其他好文 时间:
2014-07-23 15:13:26
阅读次数:
194
题目比较简单。注意看测试用例2,给的提示Please note that this is the largest possible return value: whenever there is a solution, there is a solution that uses at most tw...
分类:
其他好文 时间:
2014-07-23 14:46:06
阅读次数:
283
Cocos2d-xWin32中使用VisualLeakDetector(forVC++)检查内存泄漏NOTE:本文引自我于2012-11写于ITPUB上的一篇小文,添加于此主要目前是为方便新开课程《基于CocoStudio开发跨平台拇指空当接龙游戏》学员们参考之用。VisualLeak
Detector(vld,下载地址http://vld.codeplex.com/..
分类:
编程语言 时间:
2014-07-23 13:48:37
阅读次数:
296