This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% -------------------------------------------------------------- | |
% This is all preamble stuff that you don't have to worry about. | |
% Head down to where it says "Start here" | |
% -------------------------------------------------------------- | |
\documentclass[12pt]{article} | |
\usepackage[margin=1in]{geometry} | |
\usepackage{amsmath,amsthm,amssymb} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create or clear output file | |
> data.csv | |
# Run for multiple tries and compute average | |
TRIES=10 | |
WORKGROUPCOUNTER=1 | |
while [ $WORKGROUPCOUNTER -le 256 ] | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Compiles a program with a particular set of inputs, runs multiple times, and then | |
# outputs the average of each run. The program should submit a single integer to | |
# stdout. In this example, the outer loop passes the values 1, 2, 4, 8, etc. (as | |
# WORKGROUPSIZE) and the inner loop passes the values 1024, 2048, 4096, etc. (as | |
# ARRAYSIZE). The data is averaged TRIES times and saved to data.csv. Note that as | |
# this is a bash script, only integer values are computed. | |
# | |
# Run: $ average-script.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From: https://stackoverflow.com/questions/1274057/how-to-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore | |
1. Commit pending changes | |
2. git rm --cached <file-name> | |
3. Commit again | |
4. Add the file to .gitignore | |
5. Verify git status | |
6. Commit again |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
// prototype | |
bool isMagicSquare(int[][3]); | |
int sumRow(int[], int); | |
int sumColumn(int[][3], int); | |
int sumDiagonal1(int[][3]); | |
int sumDiagonal2(int[][3]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tag used for logging | |
private static final String TAG = "MyActivity"; | |
// Declare a countdown timer | |
private CountDownTimer countDownTimer; | |
// Declare and initialize length for timer to run and set total equal to it | |
private long length = 30000; | |
private long total = length; |