##Swift library
(1/2)Useful Swift library/Frameworks
(2/2)Useful Swift library/Frameworks
##My Favorite
Swift extension library
Animation library
Material Design Clock/Calendar(objective-c)
for file in each_file: | |
date_stamp = datetime.strptime(file, '%Y%m%d%H%M%S.html') | |
unix_time = time.mktime(date_stamp.timetuple()) | |
full_file_path = each_dir+'/'+file | |
# read file | |
source = open(full_file_path, 'r').read() | |
try: | |
# DONT typecast to float |
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath:NSIndexPath)->UICollectionViewCell | |
{ | |
var cell = collectionView.dequeueReusableCellWithReuseIdentifier("CELL", forIndexPath: indexPath) as CollectionCell | |
//using titleLabel as an example | |
if (_cell.titleLabel != nil) { | |
print("cell being reused") | |
} else { | |
// .... | |
/* | |
* Chainable Url String example | |
* Run in Playground | |
*/ | |
private var baseURL = "www.example.com" | |
struct AppURL { | |
struct User: CustomStringConvertible { | |
typealias nested1Dictionary = [ String : AnyObject ] | |
typealias nested2Dictionary = [ String : nested1Dictionary ] | |
typealias nested3Dictionary = [ String : nested2Dictionary ] | |
typealias nested4Dictionary = [ String : nested3Dictionary ] | |
let parameters2: nested2Dictionary = ["data": ["attributes": jsonData]] | |
let parameters3: nested3Dictionary = [ "data": [ "attributes" : jsonData ]] | |
let parameters4: nested4Dictionary = ["data": ["attributes": ["data": jsonData]]] |
// Router.swift | |
import Alamofire | |
enum Router: URLRequestConvertible { | |
static let baseURLString = "https://private-85a46-routable.apiary-mock.com/" | |
case readUsers | |
case createUser(parameters: Parameters) |
//Router.swift, Fabian's entire file | |
struct Router: URLRouter { | |
static var basePath: String { | |
return "https://private-85a46-routable.apiary-mock.com/" | |
} | |
struct User: Readable, Creatable, Updatable, | |
hasStatuses, hasPictures, hasPosts { | |
var route: String = "users" | |
var urlParams: String! |
// | |
// RoutesProtocol.swift | |
// RoutableApp | |
// | |
// Created by Fabian Buentello on 11/29/16. | |
// Copyright © 2016 ChaiOne. All rights reserved. | |
// | |
import Alamofire |
{title} (#{id}) | |
{sourceBranch} => {targetBranch} | |
{description} | |
{approvedByList} |
Note: In September 2019
mongodb
was removed from homebrew core, so these instructions have been updated to usemongodb-community
instead, installed from the external tap.If your current installation is still the pre-September
mongodb
package then you will need to use that name when you unlink, stop, relink and start, on the lines marked with#*#
below.Another option is to simply upgrade away from the deprecated package now.
I already have the latest version of mongo installed, thanks to.