- To install the cli, you will do
npm install -g realm-cli
- To aim the cli at a host you can do it either of 3 ways
realm-cli -h "localhost:9080" ..args
realm-cli -host "localhost:9080"" ...args
- To set a host for future commands simply call
realm-cli use "localhost:9080"
- To clear a host
realm-cli use ""
orrealm-cli use
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 | |
import RealmSwift | |
class Doctor: Object { | |
dynamic var _id: String = "" | |
dynamic var name: String = "" | |
dynamic var address: String = "" | |
dynamic var updatedOn: NSDate = NSDate() | |
} |
- Ileana Betancourt
- Max Alexander, 415 930 0285
- Adam Butler, 508 320 9898
- Adam Fish
- How would you explicity notify the node run loop to execute some code. For example, we have C++ calling JavaScript. C++ code is not aware of the JavaScript/Node event loop
- Show me your ways of getting rid of callback hell.
- How would you handle uncaught exceptions in node?
- This takes a long time in Chrome but not in Node why?
console.time("cycle")
for(var i = 0; i < 5000000; i++) {
//nothing
}
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
let entry1 = PieChartDataEntry(value: 0.75, label: "Something1") | |
let entry2 = PieChartDataEntry(value: 0.25, label: "Something2") | |
let dataSet = PieChartDataSet(values: [entry1, entry2], label: nil) | |
dataSet.colors = [UIColor.red, UIColor.blue] // in order of the entries by index | |
pieChartView.data = PieChartData(dataSet: dataSet) |
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
class Annotation { | |
interface AnnotationLatLngChange { | |
onChange(LatLng latLng); | |
} | |
AnnotationLatLngChange changeHandler; | |
LatLng getLatLng(); | |
void setLatLng(); | |
} |
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
logInButton.rx_tap | |
.flatMap { [unowned self] () -> Observable<FAuthData> in | |
firebaseRef.rx_authUser(self.emailTextField.text!, password: self.passwordTextField.text!) | |
} | |
.catchError({ (error) -> Observable<String?> in | |
return Observable.just(error.someErrorMessage) // figure out what you want to say. | |
}) | |
.observeOn(MainScheduler.instance) //not needed since Firebase will always by default deliver on the MainThread. | |
.subscribeNext { [unowned self] (errorMessage: String?) in | |
if let errorMessage = errorMessage else { // SHOW ALERT } |
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 | |
import RxSwift | |
import Cartography | |
class HandleDisplayView: UIView { | |
private var disposeBag = DisposeBag() | |
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 {Observable, Subscriber} from 'rxjs/Rx' | |
export enum EventType { | |
CHILD_ADDED, CHILD_REMOVED, CHILD_CHANGED, CHILD_MOVED, VALUE | |
} | |
export interface RxFirebaseResponse { | |
snapshot: FirebaseDataSnapshot | |
siblingKey: string | |
} |