摘要: 1 for var a in 0...1000 2 { 3 var rep = 0 4 var aa = a 5 repeat{ 6 rep = rep * 10 + aa % 10 7 aa = aa / 10 8 }while(aa>0) 9 if(rep == a) 10 { 11 p... 阅读全文
posted @ 2016-07-06 19:44 。低调ヽ继续 阅读(348) 评论(0) 推荐(0) 编辑
摘要: var year = 2016 var month = 7 var day = 6; let daysOfFeb = year % 4 == 0 && year%100 != 0 || year % 400 == 0 ?29:28 var count = 0 // 定义一个变量 代表结果 switch month{ case 12:count += 30; fallthrough case 1... 阅读全文
posted @ 2016-07-06 15:34 。低调ヽ继续 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 1 import Foundation 2 3 /** 4 * 1.常量 变量 5 知识要点:常量的定义用let 变量的定义用var 6 常量一旦定义便不可再更改。 7 变量定义之后可以在定义之后的程序中任意地方进行修改。 8 */ 9 // 常量的定义 10 let constants1:Int = 10 11 12 print("constant... 阅读全文
posted @ 2016-07-06 08:53 。低调ヽ继续 阅读(217) 评论(0) 推荐(0) 编辑
摘要: defaults write com.apple.finder AppleShowAllFiles -bool true 此命令显示隐藏文件defaults write com.apple.finder AppleShowAllFiles -bool false 此命令关闭显示隐藏文件 命令运行之后 阅读全文
posted @ 2016-07-06 08:46 。低调ヽ继续 阅读(1135) 评论(0) 推荐(0) 编辑