自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(29)
  • 收藏
  • 关注

原创 iOS中代码调用系统服务

@IBAction func WIFIClicked(sender: AnyObject) { let url = NSURL(string: "prefs:root=WIFI") if UIApplication.sharedApplication().canOpenURL(url!){ UIApplication.sha

2016-03-02 11:18:24 381

原创 CocoaPods 的常见使用问题

编译依赖设置错误第二个: Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should

2016-01-19 11:11:12 646

转载 Swift ! ? 符号区别

Swift语言使用var定义变量,但和别的语言不同,Swift里不会自动给变量赋初始值,也就是说变量不会有默认值,所以要求使用变量之前必须要对其初始化。如果在使用变量之前不进行初始化就会报错:var stringValue : String //error: variable 'stringValue' used before being initialized//let hashVa

2016-01-17 16:27:26 803

原创 layoutSubViews 布局总结

首先明确两个概念:UIWindow 对象        : 整个程序中视图层次结构中最顶层,充当一个容器类。UIViewController 对象 :viewController 中一个 view属性是 view层次结构中rootView,可以添加 view构建复杂的视图结构,通过生命周期方法loadView、viewDidLoad、viewWillAppear 等控制视图声明周期,因

2015-12-26 19:05:28 2036

转载 深度解析iOS应用程序的生命周期

业界移动开发云计算软件研发程序员极客头条专题AndroidiOS移动游戏HTML5近匠Swift智能硬件订阅移动开发RSSCSDN首页> 移动开发深度解析iOS应用程序的生命周期发表于2015-06-23 11:05| 8494次阅读| 来源CSD

2015-12-26 17:57:25 5859

原创 ARC环境下 assign 和 weak 修饰对象时候的区别

#import "ViewController.h"@interface ViewController ()@property (nonatomic,weak) NSDate *weakDate ;@property (nonatomic,assign) NSDate *assignDate;@property (nonatomic,strong) NSDate *stron

2015-12-26 17:54:27 1287

转载 Objective-C 编译器

objc中国编译器 sunset  31 Mar 2014 分享文章  编译器做些什么?本文主要探讨一下编译器主要做些什么,以及如何有效的利用编译器。简单的说,编译器有两个职责:把 Objective-C 代码转化成低级代码,以及对代码做分

2015-12-07 14:43:43 2426

原创 冷风来袭

冷风来袭Going out, 不知不觉,已经到帝都四个月,不得不感叹下时光真如白驹过隙。每一天在平淡中开始,在不平淡中结束。今年的晚秋,帝都突然来了一场雪,这是我见过最早的一场雪吧,走在匆忙的寂静地大街上,冷风来袭。—— 也许人在冷风中才能保持清醒吧。        首先做个简短的总结吧。7月份来北京,匆匆四个月,虽然没有产生一个质变但是提高收获还是有的,巩固了下 C 语言的基础,加深了

2015-11-07 23:57:57 435

原创 UITableView 中NSIndexPath

在NSTableView中用到NSIndexPath的section和row属性来确定分组和行数,  但是跳到NSIndexPath中发现并没有这两个属性. #import @interface NSIndexPath : NSObject { @private __strong NSUInteger *_indexes;#if !__OBJC2__ NSUInteger _hash

2015-09-13 12:53:33 1520

原创 UI基础-04图片浏览器

//// ViewController.m// UI基础-04图片浏览器//// Created by NorthCity on 15/9/7.// Copyright (c) 2015年 Tcg. All rights reserved.//#import "ViewController.h"@interface ViewController ()@propert

2015-09-07 01:34:33 220

原创 UI基础-03 按钮控制图片移动之transform

//// ViewController.m// UI基础-02按钮控制和禁用//// Created by NorthCity on 15/9/6.// Copyright (c) 2015年 Tcg. All rights reserved.//#import "ViewController.h"@interface ViewController ()@prope

2015-09-06 23:37:20 362

原创 UI基础-02 按钮控制图片移动

//// ViewController.m// UI基础-02按钮控制和禁用//// Created by NorthCity on 15/9/6.// Copyright (c) 2015年 Tcg. All rights reserved.//#import "ViewController.h"@interface ViewController ()@prope

2015-09-06 22:58:57 318

原创 UI基础-01 隐藏键盘

//// ViewController.m// UI-隐藏键盘//// Created by NorthCity on 15/9/6.// Copyright (c) 2015年 Tcg. All rights reserved.//#import "ViewController.h"@interface ViewController ()@property (we

2015-09-06 17:59:42 254

原创 iOS Category 和 Extension的区别

Category 也叫 分类/类别/类目 作用: 1   不改变原有源码的情况下对类功能进行扩展          2   对于一些大类,进行功能划分, 有利于模块化编程使用格式:    interface 类 (分类)

2015-09-06 15:08:21 392

原创 三种方法实现值互换

//// main.c//// Created by Northcity on 15-6-23.// Copyright (c) 2015年 tcg. All rights reserved.//#include //传统方法互换void switch1(int *a,int *b){ int temp; temp=*a; *a=*b;

2015-06-23 14:07:57 436

原创 C语言关于位<<和>>运算符

int类型整数占四个字节,所能表示的范围为  -2147483648~~2147483647。假如当数据溢出的时候,有趣的事情发生了#include int main(int argc, const char * argv[]){ int a=0x80000000;//所能表示最小数 -2147483648 int b=0x7fffffff;//表示的最大数 214

2015-06-23 11:02:26 414

转载 变量名和地址之间的关系

今天忽然意识到一个问题,当我们定义一个变量的时候,如何通过变量名读取变量里内容呢? 变量名是否是一个地址呢? http://blog.csdn.net/ssff1/article/details/4998787C语言里,内存的划分?在c/c++中,内存分成5个区,他们分别是堆、栈、自由存储区、全局/静态存储区和常量存储区。栈:就是那些由编译器在需

2015-06-19 18:48:03 3226

原创 IOS之C语言进制转换

利用位运算实现十进制到二进制转换#includeint main(){ int n=12; int bits=sizeof(n)*8; while(bits-->0){//bite-- 自减运算 printf("%d",n>>bits&1);移位 if(bits%4==0) printf(" "); }

2015-06-07 22:33:40 459

原创 IOS之C语言读取文本最长字符串

题意描述: 连续输入字符串,找出其中最长的字符串思路:        分三个步骤: 读取文本字符串  筛选最长字符串打印输出         考察字符串知识  ‘0’是字符串结束标志,但是不算做字符串长度,  getchar() 读取字符     #include#define MAXLINE 10000int main(){ int len; int max;

2015-06-06 11:11:40 444

原创 IOS之C语言打印直方图

统计文本单词长度出现频率并打印直方图。#include#define MAXHIST 15#define MAXWORD 11 //统计最长单词的长度#define IN 1 //状态标示#define OUT 0int main(){ int c,i,nc,state; int len; int maxvalue; int o

2015-06-04 20:26:28 545

转载 Java多态性 父类引用指向子类对象

首先,我们看看关于重载,和覆盖(重写)的简明定义:方法重载:如果有两个方法的方法名相同,但参数不一致,哪么可以说一个方法是另一个方法的重载。方法覆盖:如果在子类中定义一个方法,其名称、返回类型及参数签名正好与父类中某个方法的名称、返回类型及参数签名相匹配,那么可以说,子类的方法覆盖了父类的方法我们重点说说覆盖问题,以如下代码为例:[java] view

2015-05-30 19:54:59 317

原创 今年暑假不AC

J - 今年暑假不ACTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescription“今年暑假不AC?” “是的。” “那你干什么呢?” “看世界杯呀,笨蛋!” “@#$%^&*%...” 确实如此

2014-12-10 20:19:30 442

原创 Immediate Decodability

DescriptionAn encoding of a set of symbols is said to be immediately decodable if no code for one symbol is the prefix of a code for another symbol. We will assume for this problem that all code

2014-11-25 12:03:34 357

原创 Andy's First Dictionary 依旧截取

DescriptionAndy, 8, has a dream - he wants to produce his very own dictionary. This is not an easy task for him, as the number of words that he knows is, well, not quite enough. Instead of think

2014-11-25 11:44:52 483

原创 Excuses, Excuses! 字符串截取

DescriptionJudge Ito is having a problem with people subpoenaed for jury duty giving rather lame excuses in order to avoid serving. In order to reduce the amount of time required listening to go

2014-11-25 11:23:14 330

原创 A + B 字符串处理

Description读入两个小于10000的正整数A和B,计算A+B.需要注意的是:A和B的每一位数字由对应的英文单词给出.Input测试输入包含若干测试用例,每个测试用例占一行,格式为"A + B =",相邻两字符串有一个空格间隔.当A和B同时为0时输入结束,相应的结果不要输出.Output对每个测试用例输出1行

2014-11-25 11:02:07 691

原创 Artificial Intelligence 字符串截取

DescriptionPhysics teachers in high school often think that problems given as text are more demanding than pure computations. After all, the pupils have to read and understand the problem first!

2014-11-25 10:00:37 425

原创 递归实现数制转换

实现各种进制转换直接通过数组实现

2014-10-18 21:44:48 675

原创 枚举多层循环嵌套

#includeint main(){ int num[6],i[4],sign; float left,right; char ope[5]={' ','+','-','*','/'}; int j; for(j=1;j<=6;j++) scanf("%d",&num[j]); for(i[1]=1;i[1]<=4;i[1]++) { if(i[1]<4||nu

2014-10-18 16:46:38 2272

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除