This file contains hidden or 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
(ns bowling_kata.core | |
(:use midje.sweet)) | |
(defn strike [x & xs] | |
(when (= x 10) | |
[[10 (first xs) (second xs)] xs])) | |
(defn spare [x y & xs] | |
(when (= 10 (+ x y)) | |
[[x y (first xs)] xs])) |
This file contains hidden or 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
(function(global) { | |
global.Functor = function(conf) { | |
Functor.types[conf.key] = { | |
obj: conf.obj, | |
fmap: conf.fmap | |
}; | |
}; | |
Functor.types = {}; |
This file contains hidden or 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
static NSString *cacheDatabaseName = @"ApplicationCache.db"; | |
static NSString *cacheGroupTable = @"CacheGroups"; | |
static NSString *cacheGroupTableManifestURLColums = @"manifestURL"; | |
static NSString *cacheTable = @"Caches"; | |
static NSString *cacheTableCacheGroupId = @"cacheGroup"; | |
/** | |
Clears the cached resources associated to a cache group. | |
@param manifestURLs An array of `NSString` containing the URLs of the cache manifests for which you want to clear the resources. |
This file contains hidden or 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
// | |
// RKRequest+CacheControl.h | |
// | |
// Created by Angel on 8/10/12. | |
// Copyright (c) 2012 Xaton. All rights reserved. | |
// | |
#import "RKRequest.h" |
This file contains hidden or 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 javafx.application.Application; | |
import javafx.event.ActionEvent; | |
import javafx.event.EventHandler; | |
import javafx.scene.Scene; | |
import javafx.scene.control.Button; | |
import javafx.scene.layout.HBox; | |
import javafx.scene.paint.Color; | |
import javafx.scene.shape.Circle; | |
import javafx.stage.Popup; | |
import javafx.stage.Stage; |
This file contains hidden or 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
/* | |
File: Reachability.h | |
Abstract: Basic demonstration of how to use the SystemConfiguration Reachablity APIs. | |
Version: 2.2 - ARCified | |
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. | |
("Apple") in consideration of your agreement to the following terms, and your | |
use, installation, modification or redistribution of this Apple software |
This file contains hidden or 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
define(function(){ | |
var instance = null; | |
function MySingleton(){ | |
if(instance !== null){ | |
throw new Error("Cannot instantiate more than one MySingleton, use MySingleton.getInstance()"); | |
} | |
this.initialize(); | |
} |
NewerOlder