Skip to content

Instantly share code, notes, and snippets.

enum FutureError: ErrorType {
case Empty
}
public struct Future<T> {
public typealias Completion = T -> ()
public typealias AsyncOperation = Completion throws -> ()
private let operation: AsyncOperation
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',
#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
class Board
attr_reader :board
def initialize
@board = [[" "," "," "],
[" "," "," "],
[" "," "," "]]
end
def print
class Board
attr_reader :board
def initialize
@board = [[" "," "," "],
[" "," "," "],
[" "," "," "]]
end