Author: Michael Coleman
My compiler is complaint with all provisions in PA1-PA4 as I understand them. It passes all of the PA3 and PA4 regression tests. In addition to the basic
// ==UserScript== | |
// @name Gitlab rndjira.sas.com link fix | |
// @version 0.1 | |
// @description Fix jira issue links on gitlab.sas.com to link to rndjira instead of the default on the server. | |
// @author Michael Coleman | |
// @match https://gitlab.sas.com/* | |
// @icon https://www.google.com/s2/favicons?domain=github.com | |
// @grant none | |
// ==/UserScript== |
public boolean intersect(KDTree.AABox aabb) { | |
float tmin = (aabb.corner1.x - this.origin.x) / this.direction.x; | |
float tmax = (aabb.corner2.x - this.origin.x) / this.direction.x; | |
if (tmin > tmax) { | |
float temp = tmin; | |
tmin = tmax; | |
tmax = temp; | |
} |
package io.github.coalman; | |
import java.io.IOException; | |
import java.io.Reader; | |
import java.io.BufferedReader; | |
import java.util.ArrayList; | |
import java.util.regex.Pattern; | |
import java.util.regex.Matcher; | |
public class KDTree { |
package mc.bunny_viewer; // you will probably change this package to reflect your file structure | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
/* README: Some notes on using this code. | |
* Use Mesh.loadObjFile("bunny.obj") to load the bunny mesh. | |
* |
package raytracer_stub; | |
import java.nio.Buffer; | |
import java.nio.FloatBuffer; | |
import com.jogamp.opengl.GL2; | |
import com.jogamp.opengl.GLAutoDrawable; | |
import com.jogamp.opengl.GLCapabilities; | |
import com.jogamp.opengl.GLEventListener; | |
import com.jogamp.opengl.GLProfile; |
#!/usr/bin/env bash | |
# attempt to download the rtsp stream url in every .ram file in the cwd | |
for RAM_FILE in *.ram; do | |
RTSP_STREAM=$(cat $RAM_FILE) | |
# file.ram -> file.mp3 for the mp3 file name to save | |
MP3_FILE=$(echo $RAM_FILE | sed -e "s:\.ram:\.mp3:") | |
echo "[+] downloading $RAM_FILE" | |
# use vlc to transcode the audio as mp3 and save to the mp3 file |
# Enter the following lines into an ssh session on classroom.cs.unc.edu | |
# go to home dir | |
cd ~ | |
# download pyenv | |
curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash | |
nano ~/.bashrc | |
# add the following lines to .bashrc | |
export PATH="$HOME/.pyenv/bin:$PATH" | |
eval "$(pyenv init -)" |
$('#add-row').on('click', function(event) { | |
var $tbody = $('#sheet tbody'); | |
var width = $('thead tr th').length; | |
var $tr = $('<tr>').appendTo($tbody); | |
for (var i = 0; i < width; i++) { | |
$('<td></td>').appendTo($tr); | |
} | |
}); |
from hn import HN | |
import argparse | |
hn = HN() | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser(prog='HNSERVE') | |
parser.add_argument('--new', '-n') | |
parser.add_argument('--front', '-f') | |
vals = parser.parse_args() |