题目:Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't ...
分类:
其他好文 时间:
2015-12-20 20:46:40
阅读次数:
124
#! /bin/sh# chkconfig: 2345 55 25# Description: Startup script for nginx webserver on Debian. Place in /etc/init.d and# run 'update-rc.d -f nginx defa...
分类:
其他好文 时间:
2015-12-20 14:35:24
阅读次数:
240
#! /bin/sh# chkconfig: 2345 55 25# Description: Startup script for nginx webserver on Debian. Place in /etc/init.d and# run 'update-rc.d -f nginx defa...
分类:
其他好文 时间:
2015-12-18 18:35:00
阅读次数:
175
// Playground - noun: a place where people can playimport UIKit//------------------------------------------------------------------------------// 1. f...
分类:
编程语言 时间:
2015-12-18 10:36:40
阅读次数:
171
//: Playground - noun: a place where people can playimport UIKit// swift中默认情况下, 传入的参数是不可以修改的, 也就是let类型, 也就是常量参数// 如果想修改这个参数的值, 需要在参数前加"var", 也就是变量参数fu...
分类:
编程语言 时间:
2015-12-17 16:01:53
阅读次数:
155
//: Playground - noun: a place where people can playimport UIKitfunc add(a:Int, b:Int) -> Int{ return a + b}// 其中, (Int, Int) -> Int 就是显式的声明函数类型let...
分类:
编程语言 时间:
2015-12-17 15:58:38
阅读次数:
154
//: Playground - noun: a place where people can playimport UIKit// 外部参数的作用是为了让程序员调用代码的时候能清晰的看出所传参数代表的意思// 内部参数指的就是定义函数的时候所设定需要传入的参数func sayHello(nickN...
分类:
编程语言 时间:
2015-12-17 12:56:44
阅读次数:
169
//: Playground - noun: a place where people can playimport UIKit// 定义一个数组var userScores:[Int]? = [12, 990, 572, 3258, 9999, 1024, 666]userScores = use...
分类:
编程语言 时间:
2015-12-17 12:27:38
阅读次数:
204
//: Playground - noun: a place where people can playimport UIKit// 无参无返回// -> Void可以省略不写, 或者写成(), 因为返回值为空本质是一个空的元组func run() -> Void // (){ print("...
分类:
编程语言 时间:
2015-12-17 10:28:46
阅读次数:
172
//: Playground - noun: a place where people can playimport UIKit// fallthrough// fallthrough会在当前case执行完之后继续下一个case// 如果在下一个case中声明了变量, 则不能使用fallthroug...
分类:
编程语言 时间:
2015-12-16 19:07:19
阅读次数:
157