View limbo.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
# Assignment 2 | |
# Creates and populates a database for Limbo. | |
# Authors: Ethan Turkeltaub and Matt Maffa | |
# Version: 0.1.0 | |
# Create and use the limbo_db database | |
drop database if exists limbo_db; | |
create database limbo_db; | |
use limbo_db; |
View helpers.php
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
<?php | |
# helpers.php | |
# Ethan Turkeltaub, Matt Maffa | |
$debug = true; | |
# Shows the records in prints | |
function show_records($dbc) { | |
# Create a query to get the name and price sorted by price |
View stupid.php
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
<?php | |
function outputHTML ( $content ) | |
{ | |
echo '<P FONT-SIZE="14px">' . $content . '</P>' ; | |
} | |
?> |
View gist:10508982
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
<video width="320" height="240" controls autoplay loop> | |
<source src="movie.mp4" type="video/mp4"> | |
</video> |
View csl_fields.rb
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
# a script to get the fields necessary to build forms for a citation | |
# using citation styles | |
# to-do: name-parts, date-parts, punctuation (delimiters), comments | |
require 'citeproc' | |
require 'csl/styles' | |
TYPES = [ | |
'article', |
View gist:dd2e493404e3187a8492
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
⌘ ~/Workspace/kjaniszewski be siteleaf s | |
[2014-06-11 22:53:28] INFO WEBrick 1.3.1 | |
[2014-06-11 22:53:28] INFO ruby 2.0.0 (2013-11-22) [x86_64-darwin12.5.0] | |
[2014-06-11 22:53:28] INFO WEBrick::HTTPServer#start: pid=9713 port=9292 | |
127.0.0.1 - - [11/Jun/2014 22:53:40] "GET / HTTP/1.1" 200 7 0.3370 | |
[2014-06-11 22:53:40] ERROR Rack::Lint::LintError: Content-Length header was 7, but should be 0 | |
/Users/ethan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/lint.rb:20:in `assert' | |
/Users/ethan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/lint.rb:631:in `verify_content_length' | |
/Users/ethan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/lint.rb:655:in `each' | |
/Users/ethan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/body_proxy.rb:31:in `each' |
View gist:12d9367de4aea2491e41
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
*Sudoku> let firstTwo = zipWith (\x y -> [x, y]) (testPuzzle !! 0) (testPuzzle !! 1) | |
*Sudoku> firstTwo | |
["67","00","38","76","12","94","49","53","81"] | |
*Sudoku> let firstThree = zipWith (\x y -> x ++ y) (firstTwo) (group 1 (testPuzzle !! 2)) | |
*Sudoku> firstThree | |
["674","009","381","768","120","943","492","537","816"] |
View Length.hs
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
length' xs = lengthHelper xs 0 -- We're passing in the full list and 0 as the starting value for rsf | |
where lengthHelper (x:xs) rsf -- Separate xs into x (head) and xs (tail) | |
| xs == [] = rsf -- If the tail is empty, we're at the end. At this point, return rsf — we're done | |
| otherwise = lengthHelper xs (rsf + 1) -- If the tail isn't empty, pass in the tail (the rest of the list) and rsf + 1, since we're counting the head (x) right now |
View harness.rb
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
# Use this class to test an arbitrary module. | |
class Harness | |
def initialize(_module) | |
self.class.include _module | |
end | |
end | |
### | |
# The module being tested |
View registry.xml
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
<?xml version="1.0" ?> | |
<remote> | |
<site id="1"> | |
<name>Example Site</name> | |
<url>http://example.com</url> | |
<ftp> | |
<host>example.com</host> | |
<username>someuser</username> | |
<password>password</password> | |
</ftp> |
OlderNewer