如下代码获取一个String?的结果let s = NSString(data: data, encoding: encoding)return s as? String
分类:
编程语言 时间:
2015-06-03 17:13:09
阅读次数:
146
One of my friends is always drunk. So, sometimes I get a bit confused whether he is drunk or not. So, one day I was talking to him, about his drinks! He began to describe his way of drinking. So, let m...
分类:
编程语言 时间:
2015-06-03 11:59:10
阅读次数:
186
To be honest, this problem is designed to let you use stacks. However, I don't. In fact, you only need to keep a flagand switch it between falseandtru...
分类:
其他好文 时间:
2015-06-03 00:49:58
阅读次数:
232
---恢复内容开始---一直对字符的各种编码方式懵懵懂懂,什么ANSI UNICODE UTF-8 GB2312 GBK DBCS UCS……是不是看的很晕,假如您细细的阅读本文你一定可以清晰的理解他们。Let's go! 很久很久以前,有一群人,他们决定用8个可以开合的晶体管来组合成不同的状态,....
分类:
其他好文 时间:
2015-06-02 12:59:44
阅读次数:
128
设计模式工厂模式的概念Define an interface for creating an object,but let subclasses decide which class to instantiate.Factory Method lets a class defer instantiation to subclasses.(定义一个用于创建对象的接口,让子类决定实例化哪一个类。工厂方法使一个...
分类:
其他好文 时间:
2015-06-01 18:52:10
阅读次数:
106
使用UiDevice获取设备信息:获取设备名称let name = UIDevice.currentDevice().name获取设备系统名称let systemName = UIDevice.currentDevice().systemName获取系统版本let systemVersion = U...
分类:
移动开发 时间:
2015-06-01 16:11:19
阅读次数:
496
Description
Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are ...
分类:
编程语言 时间:
2015-05-30 16:45:11
阅读次数:
146
在使用shell的逻辑运算符”[]”使用时候,必须保证运算符与算数之间有空格。 四则运算也只能借助:let,expr等命令完成。 今天讲的双括号”(())”结构语句,就是对shell中算数及赋值运算的扩展。? 1.语法:? ((...
分类:
系统相关 时间:
2015-05-29 23:24:02
阅读次数:
352
之前听伟哥说用CocoaPods做第三方库的管理很方便,今天看了下自己做了下感觉确实不错。下面开始,Let's go!!1.安装CocoaPods之前,先确保本地有Ruby环境,因为CocoaPods运行于Ruby之上,默认情况下,Mac是自带了Ruby环境的,可以通过命令行ruby -v查看当前R...
分类:
其他好文 时间:
2015-05-29 19:50:38
阅读次数:
199