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
C:\Users\matthew\a4\mpg317\problem2>ghci | |
GHCi, version 7.8.3: http://www.haskell.org/ghc/ :? for help | |
Loading package ghc-prim ... linking ... done. | |
Loading package integer-gmp ... linking ... done. | |
Loading package base ... linking ... done. | |
Prelude> :l problem2.hs | |
[1 of 1] Compiling Main ( problem2.hs, interpreted ) | |
Ok, modules loaded: Main. | |
*Main> safetail_cond [1, 2, 3 |
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
{ | |
"metadata": { | |
"name": "Untitled0" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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
public | t_volunteer | table | cmpt370_group06 | |
public | t_volunteeravailability | table | cmpt370_group06 | |
INSERT into t_volunteer (vol_emailaddress, vol_firstname, vol_surname, vol_phone) | |
VALUES (getemail,getfirstname, getlastname, getphone); | |
------------------+--------------+----------- | |
vol_emailaddress | emailaddress | not null | |
vol_firstname | firstname | not null | |
vol_surname | surname | not null |
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
{ | |
"metadata": { | |
"name": "Untitled0" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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
//Just run this code in eclipse or whatever you have set up | |
/* MOST IMPORTANT THINGS I HAVE TO SAY: | |
* 1: Be careful! There are a lot of SMALL mistakes that can be hard to catch | |
* eg. every { has a } | |
* this may cause the program not even to compile and run | |
* -Every statement has a ; at the end | |
* | |
* Mistakes like forgetting a ; | |
* have caused me to spend hours trying to figure out why seemingly perfect code wasn't working |
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
#rem: int, int -> int | |
#print the remainder of (x/n) | |
def rem(x,n): | |
#prevent division by zero | |
assert(n != 0) | |
return x % n | |
def dec2b (xIn,b): | |
""" Convert n from base 10 (decimal) to base b, printing steps and result. """ | |
assert(b > 1) |