Swift 有一个基本的布尔(Boolean)类型,叫做Bool。布尔值指逻辑上的值,因为它们只能是真或者假。Swift 有两个布尔常量,true和false:let orangesAreOrange = truelet turnipsAreDelicious = falseorangesAreOr...
分类:
其他好文 时间:
2015-09-16 17:36:34
阅读次数:
192
常量和变量常量和变量把一个名字(比如Number或者Message)和一个指定类型的值(比如数字10或者字符串"Hello")关联起来。常量的值一旦设定就不能改变,而变量的值可以随意更改。声明常量和变量常量和变量必须在使用前声明,用let来声明常量,用var来声明变量。下面的例子展示了如何用常量和变...
分类:
其他好文 时间:
2015-09-16 15:31:30
阅读次数:
110
Description:Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and perf...
分类:
其他好文 时间:
2015-09-16 12:06:49
阅读次数:
214
SnandyStop, thinking is the essence of progress.ES6块级作用域及新变量声明(let)很多语言中都有块级作用域,但JS没有,它使用var声明变量,以function来划分作用域,大括号“{}” 却限定不了var的作用域。用var声明的变量具有变量提升(...
分类:
其他好文 时间:
2015-09-15 09:20:21
阅读次数:
240
using System;using System.Collections.Generic;using System.Linq;using System.Text;/*from let where子句* 1、from 后面接的是查询主体,可以有任何数量个,指定了额外的数据集合并引入了要在之后运算的迭...
分类:
其他好文 时间:
2015-09-14 20:54:54
阅读次数:
193
Faking success in SSISAn article by DougbertA SQL Server Integration Services package has a set of properties with similar names that let you:force th...
分类:
其他好文 时间:
2015-09-13 21:29:16
阅读次数:
236
今天跑到大学里来看源码,刚开学就有好多同学上自习,好久没来过大学了,还是大学里安静。今天看了一点Alamofire的源码,其中Manager的单例如下: public static let sharedInstance: Manager = {
let configuration = NSURLSessionConfiguration.defaultSessionConfig...
分类:
其他好文 时间:
2015-09-13 12:01:30
阅读次数:
120
Problem DescriptionXiao Ming is a citizen who's good at playing,he has lot's of gold cones which have square undersides,let's call them pyramids.Anyon...
分类:
其他好文 时间:
2015-09-12 22:22:49
阅读次数:
370
swift 2.0学习与总结一一:属性策略(OC中的叫法)strong: 在Swift中是默认的weak: 通过weak关键词申明weak var delegate: UITextFieldDelegate?readonly,readwrie 直接通过声明变量var,声明常量let的方式来指明cop...
分类:
移动开发 时间:
2015-09-11 22:12:56
阅读次数:
318
Problem DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let t...
分类:
编程语言 时间:
2015-09-10 19:31:42
阅读次数:
147