码迷,mamicode.com
首页 >  
搜索关键字:let    ( 14348个结果
shell——变量自增
LinuxShell中写循环时,常常要用到变量的自增,现在总结一下整型变量自增的方法。我所知道的,bash中,目前有五种方法:1. i=`expr $i + 1`;2. let i+=1;3. ((i++));4. i=$[$i+1];5. i=$(( $i + 1 ))可以实践一下,简单的实例如下...
分类:系统相关   时间:2015-09-29 20:34:30    阅读次数:817
cf581B Luxurious Houses
The capital of Berland hasnmultifloor buildings. The architect who built up the capital was very creative, so all the houses were built in one row.Let...
分类:其他好文   时间:2015-09-28 23:47:33    阅读次数:192
Swift - 单例模式的实现
过去Swift要实现单例,无非是这三种方式:全局变量,内部变量和dispatch_once方式。但都略显繁琐。后来从1.2版本起,Swift中添加了如 static let 和 static var 这样的类变量的支持,这样单例的实现又简化了许多。下面提供两种比较好的单例写法。(要注意:不管哪种写法...
分类:编程语言   时间:2015-09-28 13:01:57    阅读次数:156
Delphi又要换东家了
前几天听到这个消息,搞个FMX出来,64位还没搞清楚,又开始折腾了!http://www.deltics.co.nz/blog/posts/2371No Seriously – Let’s Buy Embarcadero24 Sep 2015inDelphi|20 commentsPeter Dun...
分类:Windows程序   时间:2015-09-28 11:16:30    阅读次数:460
初识HTML
前言:如果你对网站感兴趣,想制作自己的网页,做网页设计,做网站开发,那么首先就学习的就是html,并且能够熟练的编写html文件。或许你的编程语言学的不好或很 差,但不用担心,html是一门新的编程语言,对于初学者很容易上手的。Don't be shy, let's have a try! 1、什....
分类:Web程序   时间:2015-09-27 17:23:46    阅读次数:200
Swift - 使用下划线(_)来分隔数值中的数字
为了增强较大数值的可读性,Swift语言增加了下划线(_)来分隔数值中的数字。不管是整数,还是浮点数,都可以使用下划线来分隔数字。1234//数值可读性let value1 = 10_000_000_000let value2 = 1_000_000.000_000_1var value3:Int ...
分类:编程语言   时间:2015-09-26 19:53:11    阅读次数:175
Swift - 九宫格图片缩放总结样例
1,图片左中右三宫格缩放形式 //左右14像素不变形,中间缩放let imgTrackRight = UIImage(named:"slider_max")let imgRight = imgTrackRight!.stretchableImageWithLeftCapWidth(14, topCa...
分类:编程语言   时间:2015-09-26 14:35:39    阅读次数:320
Swift - AnyObject与Any的区别
1,AnyObject :代表任何class类型的对象实例。1234567891011121314151617class Man{}class Woman{}let man = Man()let woman = Woman()var arr:[AnyObject] = [man,woman]for....
分类:编程语言   时间:2015-09-25 16:32:28    阅读次数:160
iOS开发——项目实战Swift篇&swift 2.0项目开发总结一(开发常用)
swift 2.0项目开发总结一(开发常用)一:新特性(版本判断)的实现 1 let versionStr = "CFBundleShortVersionString" 2 let cureentVersion = NSBundle.mainBundle().infoDictionary![...
分类:移动开发   时间:2015-09-25 00:10:45    阅读次数:198
ZOJ1463:Brackets Sequence(间隙DP)
Let us define a regular brackets sequence in the following way:1. Empty sequence is a regular sequence.2. If S is a regular sequence, then (S) and [S]...
分类:其他好文   时间:2015-09-24 20:58:30    阅读次数:194
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!