#pragma mark - 点击选择按钮-(void)selectedButtonClicked:(UIButton * )sender{ if (tempButton == nil){ sender.selected = YES; tempButton = se...
分类:
其他好文 时间:
2015-02-06 18:40:23
阅读次数:
112
函数:substr(string string,num start,num length) 用法: string为字符串; start为起始位置;字符串的第一个字符的位置为1,不是从0开始计算 length为长度。 ? 例子: 假设表table1 mark ? 1000 1000?? ?...
分类:
数据库 时间:
2015-02-06 13:25:06
阅读次数:
551
1. 利用Auto Layout整体排列控件 2. mark
分类:
其他好文 时间:
2015-02-06 13:00:51
阅读次数:
306
http://acm.hdu.edu.cn/showproblem.php?pid=4328
Problem Description
Mark bought a huge cake, because his friend ray_sun’s birthday is coming. Mark is worried about how to divide the cake si...
分类:
其他好文 时间:
2015-02-06 11:19:49
阅读次数:
173
#include
#include
#include
#define ll __int64
#define M 100007
using namespace std;
struct node
{
ll l,r,mid,val,mark;
}tree[M<<2];
ll s[M];
void build(ll left,ll right,ll i)//建树
{
tree[i].l=l...
分类:
其他好文 时间:
2015-02-05 18:19:49
阅读次数:
212
因为自己之前在block中需要递归调用自己本身,而没有用weak。导致在[self removeFromSuperview]方法时,CPU使用率一只高达百分之百。。block一直持有self。。。fix:__weak 当前类 *weakSelf = self;[weakSelf 递归调用的方法];这...
分类:
移动开发 时间:
2015-02-05 18:16:35
阅读次数:
163
BOM(byte order mark)是为 UTF-16 和 UTF-32 准备的,用于标记字节序(byte order)。微软在 UTF-8 中使用 BOM 是因为这样可以把 UTF-8 和 ASCII 等编码明确区分开,但这样的文件在 Windows 之外的操作系统里会带来问题。「UTF-8」...
分类:
其他好文 时间:
2015-02-05 11:03:50
阅读次数:
141
经常用到,自己Mark一下,顺带给需要的人参考。1、配置文件修改$ vi /etc/sysconfig/network-scripts/ifcfg-eth0内容:DEVICE="eth0"HWADDR="08:00:27:7C:D1:95"NM_CONTROLLED="yes"ONBOOT="yes...
分类:
系统相关 时间:
2015-02-04 15:59:37
阅读次数:
228
#pragma mark - 将图片转换成圆形-(UIImage*) circleImage:(UIImage*) image withParam:(CGFloat) inset { UIGraphicsBeginImageContext(image.size); CGContextRef co.....
分类:
移动开发 时间:
2015-02-04 12:34:36
阅读次数:
180
1、导入类库#import #import 2、判断是否允许使用相机#pragma mark - 确认相机是否允许访问//返回 1(YES) 表示相机不可用。返回 0(NO) 表示相机可用+(BOOL )checkCameraCanUse{ BOOL flag = NO; //C...
分类:
移动开发 时间:
2015-02-03 17:02:41
阅读次数:
251