- Author: Kgen (kgen@catch.la)
- 基于 HTTP
- RESTful
- 采用标准 HTTP Code 返回错误
- 返回格式为 JSON
| //: Convenience functions/extension on top of GCD. | |
| import Dispatch | |
| var MainQueue: dispatch_queue_t { return dispatch_get_main_queue() } | |
| func GlobalQueue(qos: dispatch_qos_class_t = .Default) -> dispatch_queue_t | |
| { | |
| return dispatch_get_global_queue(qos, 0) | |
| } |
| You can use enum and protocol extension to provide GCD convenience API: | |
| ``` | |
| protocol ExcutableQueue { | |
| var queue: dispatch_queue_t { get } | |
| } | |
| extension ExcutableQueue { | |
| func execute(closure: () -> Void) { | |
| dispatch_async(queue, closure) | |
| } |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>DVTConsoleDebuggerInputTextColor</key> | |
| <string>0.87451 0.882353 0.909804 1</string> | |
| <key>DVTConsoleDebuggerInputTextFont</key> | |
| <string>CourierNewPSMT - 12.0</string> | |
| <key>DVTConsoleDebuggerOutputTextColor</key> | |
| <string>0.87451 0.882353 0.909804 1</string> |
| import UIKit | |
| import RxSwift | |
| class MyPresentationController: UIPresentationController { | |
| /** To save keyboard animation duration. */ | |
| private var _animationDuration : TimeInterval = 0.25 | |
| /** To mimic the keyboard animation */ | |
| private var _animationCurve = UIView.AnimationOptions.curveEaseOut |
| // | |
| // NSPersistentContainer+extension.swift | |
| // CDMoveDemo | |
| // | |
| // Created by Tom Harrington on 5/12/20. | |
| // Copyright © 2020 Atomic Bird LLC. All rights reserved. | |
| // | |
| import Foundation | |
| import CoreData |
| // | |
| // Extension.swift | |
| // Hadith | |
| // | |
| // Created by Sadman samee on 2/5/16. | |
| // Copyright © 2016 LoopsLab. All rights reserved. | |
| // | |
| import Foundation | |
| import Foundation |
Fish is a smart and user-friendly command line (like bash or zsh). This is how you can instal Fish on MacOS and make your default shell.
Note that you need the https://brew.sh/ package manager installed on your machine.
brew install fish