You need the package manager Homebrew (if not installed), see http://brew.sh/
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Get Spark 'Source Code':
http://spark.apache.org/downloads.html
public struct Event { | |
public internal(set) var timeStamp: Date | |
public internal(set) var eventTag: String | |
public init(timeStamp: Date, tag: String) { | |
self.timeStamp = timeStamp | |
self.eventTag = tag | |
} | |
} |
class City: NSObject, NSCoding | |
{ | |
var name: String? | |
var id: Int? | |
required init?(coder aDecoder: NSCoder) | |
{ | |
self.name = aDecoder.decodeObject(forKey: "name") as? String | |
self.id = aDecoder.decodeObject(forKey: "id") as? Int | |
} |
/* | |
Overview | |
-------- | |
To run a query using anorm you need to do three things: | |
1. Connect to the database (with or without a transaction) | |
2. Create an instance of `anorm.SqlQuery` using the `SQL` string interpolator | |
3. Call one of the methods on `SqlQuery` to actually run the query |
You need the package manager Homebrew (if not installed), see http://brew.sh/
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Get Spark 'Source Code':
http://spark.apache.org/downloads.html
- (void)signInWithUsername:(NSString *)username password:(NSString *)password complete:(RWSignInResponse)completeBlock { | |
double delayInSeconds = 2.0; | |
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); | |
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ | |
BOOL success = [username isEqualToString:@"user"] && [password isEqualToString:@"password"]; | |
completeBlock(success); | |
}); | |
} |
- (void) fetchThingsWithCompletion:(void (^)(NSArray *, NSError *))completion{ | |
[context performBlock:^{ | |
result = [context executeFetch:... | |
if (completion != nil){ | |
completion(result, error); | |
} | |
}]; | |
} |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html
controllers.controller('MainCtrl', function($scope, $location, Facebook, $rootScope, $http, $location, Upload, Auth, User, Question, Category, Serie, Record, Location, Popup, Process, Card, Question) { | |
$scope.$on('authLoaded', function() { | |
$scope.isExpert($scope.main.serieId); | |
$scope.isMember($scope.main.serieId); | |
}); | |
$scope.loadAuth = function() { | |
Auth.load().success(function(data) { | |
$scope.main.user = data.user; | |
$scope.$broadcast("authLoaded"); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>jGrowl</title> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/jquery-jgrowl/1.2.12/jquery.jgrowl.min.css" /> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-jgrowl/1.2.12/jquery.jgrowl.min.js"></script> | |
<script type="text/javascript"> | |
(function($){ | |
$(function(){ |