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
enum FutureError: ErrorType { | |
case Empty | |
} | |
public struct Future<T> { | |
public typealias Completion = T -> () | |
public typealias AsyncOperation = Completion throws -> () | |
private let operation: AsyncOperation |
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
var http = require('http'); | |
var uuid = require('node-uuid'); | |
var sendInterval = 5000; | |
function sendServerSendEvent(req, res) { | |
console.log("Connected") | |
res.writeHead(200, { | |
'Content-Type' : 'text/event-stream', | |
'Cache-Control' : 'no-cache', |
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 "IKCoreDataStore.h" | |
@interface IKCoreDataStore() | |
@property (strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator; | |
@property (strong, nonatomic) NSManagedObjectModel *managedObjectModel; | |
@property (strong, nonatomic) NSManagedObjectContext *mainQueueContext; | |
@property (strong, nonatomic) NSManagedObjectContext *privateWriterContext; | |
@end |
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 Board | |
attr_reader :board | |
def initialize | |
@board = [[" "," "," "], | |
[" "," "," "], | |
[" "," "," "]] | |
end | |
def print |
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 Board | |
attr_reader :board | |
def initialize | |
@board = [[" "," "," "], | |
[" "," "," "], | |
[" "," "," "]] | |
end |