(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // | |
| // UIFont+DahDit.m | |
| // DahDit | |
| // | |
| // Created by Erik Andersson on 2011-07-28. | |
| // Copyright 2011 Åva gymnasium. All rights reserved. | |
| // | |
| #import "UIFont+DahDit.h" |
| #import <UIKit/UIKit.h> | |
| @interface DateFlowLayout : UICollectionViewFlowLayout | |
| @end |
| // Please comment in case of typos or bugs | |
| import scala.slick.driver.H2Driver._ | |
| val db = Database.for...(...) | |
| case class Record( ... ) | |
| class Records(tag: Tag) extends Table[Record](tag,"RECORDS"){ | |
| ... | |
| def * = ... <> (Record.tupled,Record.unapply) | |
| // place additional methods here which return values of type Column |
| package android.support.v4.widget; | |
| import android.content.Context; | |
| import android.graphics.Point; | |
| import android.os.Build; | |
| import android.support.v4.view.GravityCompat; | |
| import android.support.v4.view.ViewCompat; | |
| import android.util.AttributeSet; | |
| import android.view.Display; | |
| import android.view.Gravity; |
| package slicks.docs.dao | |
| import scala.slick.driver.PostgresDriver.simple._ | |
| import scala.slick.driver._ | |
| trait Profile { | |
| val profile: JdbcProfile | |
| } |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| import Foundation | |
| /** | |
| Determine whether Optional collection is nil or an empty collection | |
| :param: collection Optional collection | |
| :returns: true if collection is nil or if it is an empty collection, false otherwise | |
| */ | |
| public func isNilOrEmpty<C: CollectionType>(collection: C?) -> Bool { | |
| switch collection { |
| #! /bin/bash | |
| # DHC - Hacked to always return a 0 code when successful. | |
| SIM_DEVICES_FOLDER=~/Library/Developer/CoreSimulator/Devices | |
| SIM_RUNTIME_PRFIX=com.apple.CoreSimulator.SimRuntime | |
| function usage () { | |
| echo "simulatorAppFolders (-s <name> | -d <device-type>) [-?] [-i <iOS version>] [-a <app-name>]" | |
| echo "-? show help, and prints simulators currently installed" |
| func groupBy<T>(equivalent:(a:T,b:T)->Bool, items:[T]) -> [[T]] { | |
| var lastItem:T? = nil | |
| var groups:[[T]] = [] | |
| var currentGroup:[T] = [] | |
| for item in items { | |
| if lastItem == nil { | |
| // first item | |
| currentGroup.append(item) | |
| } | |
| else { |
| // NSScanner+Swift.swift | |
| // A set of Swift-idiomatic methods for NSScanner | |
| // | |
| // (c) 2015 Nate Cook, licensed under the MIT license | |
| import Foundation | |
| extension NSScanner { | |
| // MARK: Strings |