Timothy Marzullo & Gregory Gage (Founders)
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
{- | |
- Problem 23 | |
- Extract a given number of randomly selected elements from a list. | |
- Example: | |
- Prelude System.Random>rnd_select "abcdefgh" 3 >>= show | |
- "eda" | |
-} | |
pure_rnd_select :: [a] -> Int -> [a] | |
pure_rnd_select x y = unsafePerformIO $ rnd_select x y |
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
public class Deck extends View { | |
// private static final String TAG = "Deck"; | |
private Bitmap mRecordImage; | |
private RotateAnimation anim; | |
public Deck(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
mRecordImage = BitmapFactory.decodeResource(getResources(), |
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
RedrawCheckbox = Backbone.View.extend({ | |
el: '#redrawCheckbox', | |
events: { | |
'click' : 'checkState' | |
}, | |
checkState: function() { | |
this.trigger('redrawOnMove', this.$el.is(':checked')); | |
} | |
}); |
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 time, random | |
from multiprocessing import Process, Pipe, current_process | |
from multiprocessing.connection import wait | |
def foo(w): | |
for i in range(10): | |
w.send((i, current_process().name)) | |
w.close() | |
if __name__ == '__main__': |
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
it("derps when using a space in an event name", function() { | |
var callback = jasmine.createSpy('-Custom Event Callback-'); | |
obj.bind('all', callback); | |
obj.trigger("foo bar"); | |
expect(callback.callCount).toBe(1); | |
expect(callback.mostRecentCall.args[0]).toBe('foo bar'); | |
}); |
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
(ns tootr.core | |
(:use | |
[compojure.core :only (defroutes GET POST)] | |
[hiccup.page-helpers :only (html5)] | |
[hiccup.form-helpers :only (form-to label text-area submit-button)] | |
) | |
(:require [ring.adapter.jetty :as ring] | |
[compojure.handler :as handler] | |
[clojure.contrib.sql :as sql] | |
) |
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
#!/usr/bin/env python | |
# | |
# Parses the U.S. Securities and Exchance Commision website for info on | |
# Form 4/A filings. | |
from urllib import urlopen | |
import re | |
class SECParser: |
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
# | |
# ---------------------------------------------------------------------------- | |
# "THE BEER-WARE LICENSE" (Revision 42): | |
# <[email protected]> wrote this file. As long as you retain this notice you | |
# can do whatever you want with this stuff. If we meet some day, and you think | |
# this stuff is worth it, you can buy me a beer in return - Nathan Dotz | |
# ---------------------------------------------------------------------------- | |
# | |
# This script will use pygame to turn a rockband drum kit plugged in your USB | |
# port into a sampler. |
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
{-- | |
- Save this file as Main.hs and run with % runghc Main.hs | |
-} | |
module Main where | |
import Test.HUnit | |
derp = test [ "a silly test" ~: 'a' ~=? 'a' ] | |
tests = TestList [ derp ] |