Skip to content

Instantly share code, notes, and snippets.

View MarkJRigdon's full-sized avatar

Mark MarkJRigdon

  • Cape Girardeau, MO
View GitHub Profile
// Mark J. Rigdon
// CS50 2019
// pset 3
// Copies and alters a BMP file
#include <stdio.h>
#include <stdlib.h>
#include "bmp.h"
// Mark J. Rigdon
// CS50
// pset3 - resize (less)
// 2019-01-25
// resizes a 24-bit uncompressed BMP by a factor of n using a "recopy" method.
#include <stdio.h>
#include <stdlib.h>
#include "bmp.h"
// Mark J. Rigdon
// CS50
// 2019-01-30
// pset3 recover.c
// Inputs a raw data file, finds the JPEG's in the file, writes the JPEG's out to individual files.
/****** Mark's Pseudocode Outline ******
x Ensure proper syntax of command is input by user
x Ensure recover command fails over nicely if the file input cannot be accessed/read
x open memory card file
def reverse_string(string)
split_string = string.split("")
reversed = []
string.size.times { reversed << split_string.pop }
reversed.join
end
puts reverse_string("codelabslone")
// Mark J Rigdon
// 2018-12-11
// Problem set 1
// Program calculates the minimum number of coins required to give a user change.
// Greedy algorithm example...
#include <cs50.h>
#include <math.h>
#include <stdio.h>
// Mark J Rigdon
// 2018-12-11
// Problem set 1
// Creates a half right-aligned pyramid and a left-aligned pyramid for Mario
#include <cs50.h>
#include <stdio.h>
int main(void)
{
// Mark J Rigdon
// 2018-12-11
// Problem set 1
// Creates a half right-aligned pyramid for Mario
#include <cs50.h>
#include <stdio.h>
int main(void)
{
// caesar.c by Mark J. Rigdon
// CS50
// 2018-12-16
// Program encrypts messages using Caesar's cipher.
// Includes
#include <cs50.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
// vigenere.c by Mark J. Rigdon
// CS50
// 2018-12-16
// Program encrypts messages using Vigenere's cipher.
// Includes
#include <cs50.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
array.each_with_object({odd:[], even:[]}) do |elem, memo|
memo[elem.odd? ? :odd : :even] << elem
end