Skip to content

Instantly share code, notes, and snippets.

/**
* Copies the specified range of the specified array into a new array.
* The initial index of the range ("from") must lie between zero
* and "original.length", inclusive. The value at
* "original[from]" is placed into the initial element of the copy
* (unless "from == original.length" or "from == to").
* Values from subsequent elements in the original array are placed into
* subsequent elements in the copy. The final index of the range
* ("to"), which must be greater than or equal to "from",
* may be greater than "original.length", in which case
@Michael0x2a
Michael0x2a / minimal-template.tex
Last active March 14, 2024 06:32
Minimal LaTeX template
\documentclass{article}
% General document formatting
\usepackage[margin=0.7in]{geometry}
\usepackage[parfill]{parskip}
\usepackage[utf8]{inputenc}
% Related to math
\usepackage{amsmath,amssymb,amsfonts,amsthm}
\begin{document}
/**
* Michael Lee
* Tuesday, April 14, 2015
* Sample program: StackDeck2.java
*
* This class represents a deck of cards, which you can shuffle
* and manipulate.
*/
import java.util.*;
// Michael Lee
// Section AP
// Tuesday, April 14, 2015
// Sample program: Deck.java
import java.util.List;
interface Deck {
public int size();
public boolean isEmpty();
// Michael Lee
// Section AP
// Tuesday, April 14, 2015
// Sample program: ListDeck.java
//
// This class represents a deck of cards, which you can shuffle
// and manipulate.
import java.util.*;
// Michael Lee
// Tuesday, April 14, 2015
// Sample program: StackDeck.java
//
// This class represents a deck of cards, which you can shuffle
// and manipulate.
import java.util.*;
public class StackDeck implements Deck {
username total comment score
------------------- -------------------
exoticmatter 8223
nutrecht 6974
desrtfx 5106
michael0x2a 4971
zifyoip 4849
the_omega99 4175
negative_epsilon 3020
cyrusol 2970
@Michael0x2a
Michael0x2a / Dog-feedback.html
Created September 13, 2015 15:48
Dog.java Feedback
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Feedback: Dog.java</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/0.0.1/prism.min.css" rel="stylesheet" />
<style type="text/css">
* {
box-sizing: border-box;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Feedback: Game13.java</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/0.0.1/prism.min.css" rel="stylesheet" />
<style type="text/css">
* {
box-sizing: border-box;
#!/usr/bin/env python
"""
This is a short script that will analyze grades. It uses
Python 3, and uses only the default built-in libraries to
make it easier to run.
This is essentially a cleaner version of the code I demoed
in class -- it does a better job of organizing code and
showcasing some of the more interesting features of Python.