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
;;; Calculates all elements of Pascal's Triangle up to a particular width/row. | |
(define (pascal width) | |
(reverse (pascal-helper '((1)) width))) | |
(define (pascal-helper rows width) | |
(if (= (length rows) width) | |
rows | |
(pascal-helper (cons (next-row (car rows)) | |
rows) |
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
; This function returns a closure. That is, the returned anonymous function | |
; saves a reference to the free variable "n". | |
(defn make-adder [n] | |
"Returns a function that sums a given value (m) with n." | |
(fn [m] | |
(+ n m))) | |
(def add-10 (make-adder 10)) | |
; When we invoke the function, rather than creating a new environment, it will |
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
; letfn is a Clojure macro that allows for mutually recursive functions. | |
; In some lisps, letfn (or letrec) will expand to a lambda expression. | |
(letfn [(fact-helper [total n] | |
(if (<= n 1) | |
total | |
(fact-helper (* n total) (- n 1))))] | |
(defn fact [n] | |
(fact-helper 1 n))) | |
(fact 5) ; 120 |
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
(lambda (n) (+ n 1)) |
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
//Selecting Item Colours | |
$(".dress-container .select-colour a").click(function(){ | |
//find the colour range | |
var colourRange = $(this).parent().next(".colours"); | |
//find the links in the colour range | |
var colourRangeLink = $(colourRange).find("a"); | |
//showing colour range | |
$(colourRange).show(); | |
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
- AGMEN - Damnation - LP - Breath of Night - 99 | |
- ALARM - Rock'n'Roll v patách - LP - Monitor - 90 | |
- ALKEHOL - Alkehol - LP - Monitor - 92 | |
- ALKEHOL - S Úsměvem Se Pije Líp - LP - Monitor - 93 | |
- AMON - Call the Master! - LP - Doomentia - 10 | |
- ANACHRONIC - Lame Gart And... - LP - BestIA - 93 | |
- APOLON - TVÁR SEBCA / ČACHTICKÁ PANI - 7” - Zeras - 92 | |
- ARAKAIN - Black Jack - LP - Monitor - 92 | |
- ARAKAIN - Excalibur / Gladiátor - 7" - Panton - 88 | |
- ARAKAIN - Ku-Klux-Klan / Orion - 7" - Supraphon - 89 |
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 TestsController < ApplicationController | |
def index | |
@callback_url = "http://127.0.0.1:3000/tests/callback" | |
@consumer = OAuth::Consumer.new("YOUR_APP_KEY","YOUR_APP_SECRET", :authorize_url => "http://www.discogs.com/oauth/authorize", :site => "http://api.discogs.com") | |
@request_token = @consumer.get_request_token(:oauth_callback => @callback_url) | |
session[:request_token] = @request_token | |
redirect_to @request_token.authorize_url(:oauth_callback => @callback_url) |
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
# Clear existing task so we can replace it rather than "add" to it. | |
Rake::Task["deploy:compile_assets"].clear | |
desc "Precompile assets locally and then rsync to web servers" | |
task :compile_assets do | |
on roles(:web) do | |
rsync_host = host.to_s | |
run_locally do | |
with rails_env: :production do ## Set your env accordingly. |
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
from Tkinter import * | |
import tkFont | |
import subprocess, os, re | |
BASE = "/home/andrew/Downloads/SNES/ROMS/" | |
def play(e): | |
lb = e.widget | |
text = lb.get(ACTIVE) | |
filename = lb.data[text] |
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
--- | |
- aclit | |
- adick | |
- aids | |
- alabama porch monkey | |
- anal intruder | |
- anal invader | |
- analicker | |
- anus | |
- "4r5e" |
OlderNewer