Skip to content

Instantly share code, notes, and snippets.

View paytonrules's full-sized avatar

Eric Smith paytonrules

View GitHub Profile
class DecimalStringComparer
def self.compare_decimal(a, b)
new(a, b).execute
end
def initialize(a, b)
@a = a
@b = b
end
class ExternalRouter
{
private:
static ExternalRouter *_instance;
protected:
ExternalRouter();
public:
static ExternalRouter *instance();
language: objective-c
rvm: 1.9.3
script: xctool -workspace [Your Workspace] -scheme [Your Specs Scheme] -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
public class LoginDialogDriver
{
private String userName;
private String password;
private String message;
private int loginAttempts;
public LoginDialogDriver(String userName, String password)
{
this.userName = userName;
(defn- uniqueness [map key whatev]
(let [duplicate-projects (find-by-kind (:kind map) :filters [:= key (get map key)])]
(when-not (empty? duplicate-projects)
"must be unique")))
// greatest variance between the opening and closing price.
//
// The following functions may be of use:
//
// abs - takes the absolute value of an argument
//
// System.Double.Parse - converts a string argument into a
// numerical value.
//
// The following function will convert a comma separated string
@paytonrules
paytonrules / diffs.clj
Created January 21, 2016 00:40
What we worked on Wednesday
(ns ssiMaps.arrays)
; yuck – a for loop
'(1 2 3 4 5)
'((1 2) (2 3) (3 4) (4 5))
'(1 1 1 1)
(defn diffs-map [values]
(let [sorted-values (sort values)]
(loop [values sorted-values
differences []]
(defn- minimax-square
[{:keys [board current-player opposing-player player-turn square] :as params}]
(let [new-board (board/take-square board player-turn square)]
(cond
(board/winner? new-board current-player) 10
(board/winner? new-board opposing-player) -10
(board/tie? new-board current-player opposing-player) 0
:else (let [next-player (next-player current-player opposing-player player-turn)
next-board-states (board/open-squares new-board)]
(minimax-for-open-postions
public class MainTest {
@Test
public void ItAssignsTheTitle() throws Exception {
Main main = new TestableMain();
TestStageAdapter stageAdapter = new TestStageAdapter();
main.startPrimaryStage(stageAdapter);
assertEquals("Testing a Form", stageAdapter.getTtle());
}

Sunday - 23rd, Magic Kingdom (8AM to 7PM)

  • Busses start at 7:15
  • Go straight to Tomorrowland. Head to Space Mountain then Buzz Lightyear.
  • From there you can head to Haunted Mansion/Pirates/Jungle Cruise before Pan, or the Monsters Inc. show in Tomorrowland. Either one.
  • Once you get to Pan you’ll want to stick around FantasyLand FastPass: Pan’s Flight 11:05 Meet Rapunzel 12:20 Seven Dwarves 2:30 Lunch Options: