码迷,mamicode.com
首页 >  
搜索关键字:let    ( 14348个结果
swift基本语法
一 可选类型知识点补充1 例一 : 强转并且制定类型let str = "23" //打印结果: "23" let age : Int? = Int(str) //打印结果 :23—-> 1.1 问题 : 该例子转化的结果为什么需要用可选类型来接收?—-> 1.2 解答 : 因为很有可能是转化不成功的,如果此时不用可选类型来接收的话,万一转化失败,那么该值就为空(nil),如果不选择可选类型来接收...
分类:编程语言   时间:2016-04-29 17:27:59    阅读次数:196
验证字符串中是否还有其他字符 swift
let words = ["ss","aa","bb","ddd"] let tweet = "this is an example tweet larking about swift sad" let valid = !words.filter({tweet.containsString($0)} ...
分类:编程语言   时间:2016-04-29 14:19:34    阅读次数:165
UIBezierPath和CAShapeLayer配合肆意画图
一、CAShapeLayer CAShapeLayer 是 CALayer 的子类,但是比 CALayer 更灵活,可以画出各种图形 使用CAShapeLayer 绘制一个矩形 let layer = CAShapeLayer() layer.frame = CGRectMake(110, 100, ...
分类:其他好文   时间:2016-04-29 14:11:25    阅读次数:134
iOS swift运算符详解
运算符是一种特定的符号或表达式,用来检验、修改或合并变量。例如,用求和运算符+可以对两个数字进行求和(如let i = 1 + 2);稍微复杂一点的例子有逻辑与操作符&& (如if enteredDoorCode && passedRetinaScan) ,自增长运算符 ++i (这是i=i+1的简写方式) Swift支持C标准库中的大多数运算符并提升了各自的兼容性,从而可以排除常见...
分类:移动开发   时间:2016-04-28 17:08:42    阅读次数:607
hdu-2685I won't tell you this is about number theory(数论)
题目链接: I won't tell you this is about number theory Problem Description To think of a beautiful problem description is so hard for me that let's just d ...
分类:其他好文   时间:2016-04-27 22:15:01    阅读次数:311
swift string转double
let str = "10.0"let double = (str as NSString).doubleValue ...
分类:编程语言   时间:2016-04-27 22:05:05    阅读次数:136
JavaScript.import
// --file.js--function getJSON(url, callback) { let xhr = new XMLHttpRequest(); xhr.onload = function () { callback(this.responseText) }; xhr.open("GE ...
分类:编程语言   时间:2016-04-27 15:33:29    阅读次数:164
Consul & Registrator & Rails Service all together in separate Docker container
1.Start a container running Consul 2.Start a container running Registrator 3. Start a web service and let Registrator automatically register it on Consul 4. Find the IP address and port of the service from Consul UI, and start using the service...
分类:其他好文   时间:2016-04-26 21:45:09    阅读次数:190
swift基本语法
一 可选类型知识点补充1 例一 : 强转并且制定类型let str = "23" //打印结果: "23" let age : Int? = Int(str) //打印结果 :23—-> 1.1 问题 : 该例子转化的结果为什么需要用可选类型来接收?—-> 1.2 解答 : 因为很有可能是转化不成功的,如果此时不用可选类型来接收的话,万一转化失败,那么该值就为空(nil),如果不选择可选类型来接收...
分类:编程语言   时间:2016-04-26 19:42:07    阅读次数:170
Part 19 AngularJS Services
What is a service in AngularJSBefore we talk about what a service is in Angular. Let's talk about a service in web development. If you have any experi ...
分类:Web程序   时间:2016-04-26 00:38:56    阅读次数:233
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!