Skip to content

Instantly share code, notes, and snippets.

View mattearly's full-sized avatar

Matthew Early mattearly

View GitHub Profile
; extra all list elements in a list
(define (extract-list lst)
(cond ((null? lst) lst)
((list? (car lst)) (cons (car lst) (extract-lists (cdr lst))))
(else (extract-list (cdr lst))
)
)
; return number of even integers
(defin (count-even lst)
// counts to the number provided with even numbers using a recursive recursive algo
// written by Matthew Early, but hey this is a pretty common practice problem
// default compile:
// compile in terminal with 'g++ recursive-even-counter.cpp'
// run with './a.out' in terminal
#include <iostream>
#include <cstdlib>
using namespace std;
sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-gfx-dev libsdl2-net-dev
<resources>
<string-array name="sport_select">
<item>"American Footbal"</item>
<item>"Archery"</item>
<item>"Badminton"</item>
<item>"Baseball"</item>
<item>"Basketball"</item>
<item>"Beach Volleyball"</item>
<item>"Bowling"</item>
@mattearly
mattearly / mult_choice_question.tex
Created January 28, 2018 17:25
Basic LaTeX Question and Answer Multiple Choice Example
\documentclass[11pt]{article}
\begin{document}
\section{Question}
a. thing \\
b. thing \\
c. thing \\
d. thing
\section{Question}
@mattearly
mattearly / sdl2_opengl.cpp
Last active August 17, 2020 22:22 — forked from jordandee/sdl2_opengl.cpp
Simple SDL2/OpenGL example
// To compile with gcc: (tested on Ubuntu 14.04 64bit):
// g++ sdl2_opengl.cpp -lSDL2main -lSDL2 -lGL
// To compile with msvc: (tested on Windows 7 64bit)
// cl sdl2_opengl.cpp /I C:\sdl2path\include /link C:\path\SDL2.lib C:\path\SDL2main.lib /SUBSYSTEM:CONSOLE /NODEFAULTLIB:libcmtd.lib opengl32.lib
#include <stdio.h>
#include <stdint.h>
#include <assert.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_opengl.h>