Skip to content

Instantly share code, notes, and snippets.

@mitrnsplt
mitrnsplt / resize
Created May 6, 2014 21:31
A solution for resizing a bitmap file according to the parameters set by staff instructions in an introductory cs class.
/**
* resize.c
*
* Computer Science 50
* Problem Set 5
* Peter Downs
*
* Resizes a BMP piece by piece, because that's the assignment.
*/
@mitrnsplt
mitrnsplt / breakout
Created May 6, 2014 21:27
A re-creation of an old video game where a player uses a "paddle" to smack balls against a brick wall until all the bricks are knocked out. Staff provided helper files and libraries.
//
// breakout.c
//
// Computer Science 50
// Problem Set 4
/**
* A version of breakout
*
* Some sections by Peter Downs
*
@mitrnsplt
mitrnsplt / changeMars.php
Created May 6, 2014 16:57
For my first javascript project, I built a web page directed at 14-15-year-olds about some of the issues around making Mars habitable.
<!DOCTYPE html>
<html>
<head>
<title>Livable Mars</title>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body>
<h1>What do you want to change?</h1>
@mitrnsplt
mitrnsplt / fifteen
Created April 17, 2014 00:59
This solution to cs50's Game of Fifteen problem uses helper files supplied by the teaching staff
/**
* fifteen.c
*
* Computer Science 50
* Problem Set 3
*
* Implements the Game of Fifteen (generalized to d x d).
*
* Usage: ./fifteen d
*
@mitrnsplt
mitrnsplt / Vigenere
Created April 17, 2014 00:52
A solution for cs50's Vigenere problem, a cipher that is a little more complicated than Caesar
/**
* vigenere.c
*
* Peter Downs
*
* A code for encrypting text with a Vigenere cipher.
*/
#include <cs50.h>
#include <stdio.h>
@mitrnsplt
mitrnsplt / Simple Caesar
Created April 17, 2014 00:50
A solution for cs50's "caesar" problem: using a simple Caesar cipher
/**
* caesar.c
*
* Peter Downs
*
* A code for encrypting text with a simple Caesar cipher.
*/
#include <cs50.h>
#include <stdio.h>
@mitrnsplt
mitrnsplt / credit card check
Created April 17, 2014 00:48
A solution for cs50's credit card validation problem
/**
*
* credit.c
*
* Peter Downs
*
* A program for validating credit card numbers.
*
*/
@mitrnsplt
mitrnsplt / pset 1 greedy
Created April 17, 2014 00:45
A solution for cs50's "greedy" problem: making change with as few coins as possible
/**
*
* greedy.c
*
* Peter Downs
*
* A program for efficiently making change.
*
*/
@mitrnsplt
mitrnsplt / cs50 2-sided mario
Created April 17, 2014 00:41
A solution for the hacker version of cs50 mario with a two-sided pyramid
/**
* mario.c
*
* Peter Downs
*
* Prints a half pyramid of user specified height.
*/
#include <cs50.h>
#include <stdio.h>
@mitrnsplt
mitrnsplt / pset 1 mario
Created April 17, 2014 00:37
A solution for cs50s mario
/**
* mario.c
*
* Peter Downs
*
* Prints a half pyramid of user specified height.
*/
#include <cs50.h>
#include <stdio.h>