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
#lang racket/base | |
;; Generate a form email to let someone know their SPF records are misconfigured for their current email provider. | |
;; | |
;; Run (fill-report "domain.com" "1.2.3.4") where the 2nd arg is the sending email server's IP address. | |
;; It will copy the completed report to the clipboard for you. | |
;; Only works on Windows for now. | |
(require net/dns |
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
######################### | |
# .gitignore file for Xcode4 / OS X Source projects | |
# | |
# Version 2.0 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# | |
# 2013 updates: | |
# - fixed the broken "save personal Schemes" | |
# | |
# NB: if you are storing "built" products, this WILL NOT WORK, |
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
#lang racket/base | |
(require test-engine/racket-tests) | |
(require racket/list) | |
;; YIKES! you clearly wrote the function before the tests, because what you have below | |
;; is just nuts. Specifically, you have a table that maps strings to ... tables! | |
;; Let's rewrite those test cases first: | |
(check-expect (add-stat (add-stat (hash) '("a" "b" "c")) '("a" "b" "d")) | |
(hash "a" 2 "b" 2 "c" 1 "d" 1)) |
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
;; TEAM BYTE ME | |
;; int list -> list | |
;; takes a list and a number and returns a list with the length of the number | |
(define (create_list l n) | |
(cond | |
[(= n 0) empty ] | |
[else (cons (first l) (create_list (rest l) (sub1 n))) | |
])) |
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
;; a note is (make-note note-num frames frames) | |
(define-struct note (pitch time duration)) | |
;; number -> number | |
;; converts seconds to frames | |
(define (s f) | |
(* 44100 f)) | |
(check-expect (s 10) 441000) |
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
;; Nancy Truong, Mitchell Salles, Dan Stone | |
;; CPE 123 (3:00 P - 5:00 P) | |
(define (s sec) (* 44100 sec)) | |
;; a note is (make-note midi-num frames frames) | |
(define-struct note (pitch time dur)) | |
;; note -> boolean |
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
(require rsound) | |
;a note is | |
;(make-note number number number) | |
(define-struct note (pitch time duration)) | |
;a list-of-notes is one of: | |
;-empty, or | |
;-(cons note list-nof-notes) |