Below are the results from running this on my 2011 MacBook Pro with an Intel Core i7-2635QM CPU @ 2.00GHz.
$ make compare
time ./by-ref
7.07 real 7.05 user 0.00 sys
@interface Delegate : NSObject <UIActionSheetDelegate> | |
@end | |
@implementation Delegate | |
- (BOOL)respondsToSelector:(SEL)aSelector { | |
NSLog(@"-respondsToSelector: '%@'", NSStringFromSelector(aSelector)); | |
return YES; | |
} | |
@end |
TYPE=png | |
SRC=$(wildcard *.dot) | |
OUT=$(patsubst %.dot, %.$(TYPE), $(SRC)) | |
all: $(OUT) | |
%.$(TYPE): %.dot | |
dot -T$(TYPE) $^ -o $@ |
# Uncrustify 0.60 | |
newlines = auto | |
input_tab_size = 4 | |
output_tab_size = 4 | |
string_escape_char = 92 | |
string_escape_char2 = 0 | |
tok_split_gte = false | |
utf8_bom = ignore | |
utf8_byte = false | |
utf8_force = false |
This has been moved from a gist to its own repo. Check it out at: | |
http://github.com/justbuchanan/cs1332-hw-template | |
import org.junit.After; | |
import org.junit.Before; | |
import org.junit.Test; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.HashMap; | |
import static org.junit.Assert.assertTrue; |
# This netctl profile is for connecting to Georgia Tech's GTwifi network | |
# Usage: | |
# 1. Copy/download it to /etc/netctl/GTwifi | |
# 2. Set the 'identity' and 'password' fields appropriately | |
# 3. Set file permissions and ownership: | |
# chown root:root /etc/netctl/GTwifi | |
# chmod 0600 /etc/netctl/GTwifi | |
Description='GTwifi' | |
Interface=wlan0 |
#deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted | |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted | |
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted | |
## Major bug fix updates produced after the final release of the | |
## distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted |
#include <iostream> | |
#include <string> | |
#include <sstream> | |
using namespace std; | |
class LogHelper : public stringstream { | |
public: | |
LogHelper(string level) { |
#include <string> | |
template<typename TYPE, char BYTE_SEPARATOR = ' '> | |
std::string toBinary(TYPE val) { | |
std::string str("b"); | |
for (int i = sizeof(TYPE)*8-1; i >= 0; i--) { | |
str += ((val & 1 << i) ? "1" : "0"); | |
if (i % 8 == 0 && i !=0 ) str += BYTE_SEPARATOR; | |
} | |
return str; |