This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct MyStruct { | |
var n: Int | |
func sayHello() { | |
print("hello") | |
} | |
} | |
var s: MyStruct = MyStruct(n: 1) | |
var a: [UInt8] = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UITableView { | |
func isCellVisible(section: Int, row: Int) -> Bool { | |
guard let indexes = self.indexPathsForVisibleRows else { | |
return false | |
} | |
return indexes.contains{ $0.section == section && $0.row == row } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
@propertyWrapper | |
public struct Validate<Value> { | |
fileprivate let _isValid: (Value) -> Bool | |
public let asserts: Bool | |
public let useLastValid: Bool | |
public let message: (Value) -> String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mac Port 基本用法总结 | |
1. Mac Port的下载地址 | |
http://www.macports.org/install.php | |
2. Mac Port的说明文档 | |
http://guide.macports.org/ | |
3. Mac Port中第三方软件下载包存放的默认路径是:/opt/local/var/macports/distfiles/ | |
为了提高安装速度,可以在安装新port时直接将此目录下的文件拷贝到新的Mac Port相同的目录中就可以避免Port去网上下载。 |