Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Writing 2D Games in C using SDL
cs50 seminar
Simple DirectMedia Layer
Windows Max Linux iOS Android
input/output- audio, keyboard, mouse, joystick, graphics
Source engine
goals:
install libraries
talked about javascript, functions/passing functions, objects, classes, async/callbacks
audio as a pipeline
source is audio data generater or loaded
oscillator, mp3, mic
destination is output
laptop speakers, ScriptProcessorNode
"Web Apps of the Future with React"
by Neeh Mehta for cs50
React is a framework
Used on facebook, insta, KA
React DOM for web
React Native for Android, iOS
Components: HTML tags on steroids
cs50 R seminar by Connor Harris notes
more info:
https://cran.r-project.org/doc/manuals/R-intro.pdf
http://www.stat.cmu.edu/~cshalizi/ADAfaEPoV/
Types: numeric(float), character(string), logicalbool), coercion(scanf())
Vectors (1d array), matrices, high-dim arrays of above types
Lists: associate array. Vecs of lists bevahve oddle
No real pure atomic types. Single values are arrays of length one
#define LETTERS_HASHED 4
// a word is short if it is <= LETTERS_HASHED letters long
struct ll_node
ll_node* next
char str[LENGTH]
ll_node* tofree;
ll_node hashtable[32 ** LETTERS_HASHED];
// by Raphael Rouvinov
// for stat 110 pset 3
#include <stdio.h>
int main(void)
{
double sum = 0;
for(int j = 1; j <= 48; j++)
Board B:
[11 12 ... 1n]
[21 22 ... 2n]
[.. .. ... ..]
[n1 n2 ... nn]
Board contains unique elements 0,1,...,n-1
We will denote 0 as 'E'
Want board s.t. element at (r,c) = (rn + c + 1) % n*n
@raphaelrk
raphaelrk / frequency sort.java
Last active May 4, 2017 16:41
sorting based on frequency of elements in descending order
/*** java pseudocode ***/
/* a NumTuple holds a number and the frequency of its occurences */
class NumTuple {
int num, freq = 1;
public numTuple(num) { this.num = num; }
}
ArrayList frequencySort(int[] array) {
@raphaelrk
raphaelrk / senior list scraper
Last active August 29, 2015 14:06
scrapes names of seniors off the homecoming voting list and lets you see some stats on them if you check out the vars in the console. It's got some rough edges but it doesn't really matter
var peopleLists = document.getElementsByClassName('ss-choices');
var girlNames = [];
var guyNames = [];
for(var list = 0; list < peopleLists.length; list++) {
var peopleHTML = peopleLists[list].children;
for(var person = 0; person < peopleHTML.length; person++) {
var arr = list === 0 ? girlNames : guyNames;
arr[person] = peopleHTML[person].innerText.slice(1).toLowerCase();
}
@raphaelrk
raphaelrk / keybase.md
Created August 10, 2014 04:50
keybase.io github proof

Keybase proof

I hereby claim:

  • I am raphaelrk on github.
  • I am raphaelrk (https://keybase.io/raphaelrk) on keybase.
  • I have a public key whose fingerprint is 9B7E 2A1F E99B A6DC C51D FA6D 8CEB EA2E 6AFE E990

To claim this, I am signing this object: