Skip to content

Instantly share code, notes, and snippets.

View ejknapp's full-sized avatar

Eric Knapp ejknapp

View GitHub Profile
@ejknapp
ejknapp / analyzer.properties
Last active October 13, 2015 01:57
Project 3 properties file start - Fall 2012
output.dir=output/
output.file.summary=summary_report.txt
output.file.unique=unique_tokens.txt
output.file.bigwords=big_words.txt
output.file.token.count=token_count.txt
output.file.token.size=token_size.txt
output.file.keyword=keyword_locations.txt
# Big Words Minimum Word Length
@ejknapp
ejknapp / gist:3862139
Created October 9, 2012 23:28
Mogenerator command
mogenerator --model CoreDataIssue.xcdatamodeld/CoreDataIssue.xcdatamodel --template-var arc=true
Map<String, String> map = new TreeMap<String, String>();
map.put("WI", "Wisconsin");
map.put("MN", "Wisconsin");
map.put("MI", "Wisconsin");
map.put("IA", "Wisconsin");
for (Map.Entry<String, String> entry : map.entrySet()) {
System.out.println("Key: " + entry.getKey()
@ejknapp
ejknapp / gist:3747093
Created September 19, 2012 01:26
Hit Test sample
DCIDrawView *view = (DCIDrawView *)[self.view hitTest:location withEvent:nil];
if (self.view != view) {
self.highlightedView = view;
self.highlightedView.highlighted = YES;
[self.highlightedView setNeedsDisplay];
} else {
self.highlightedView = nil;
self.highlightedView.highlighted = NO;
}
@ejknapp
ejknapp / gist:3746928
Created September 19, 2012 00:28
Drawing sample
- (void)drawRect:(CGRect)rect
{
// Drawing code
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextMoveToPoint(context, 100, 100);
CGContextAddLineToPoint(context, 200, 200);
CGContextAddRect(context, CGRectMake(200, 200, 100, 100));
CGContextStrokePath(context);
@ejknapp
ejknapp / gist:2322745
Created April 6, 2012 20:34
A list of Books on C for Cocoa and Cocoa Touch programmers
A Book on C: Programming in C (4th Edition)
by Al Kelley & Ira Pohl
http://www.amazon.com/Book-Programming-4th-Edition/dp/0201183994/ref=sr_1_1?ie=UTF8&qid=1333742037&sr=8-1
Objective-C Programming: The Big Nerd Ranch Guide
by Aaron Hillegass
http://www.amazon.com/Objective-C-Programming-Ranch-Guide-Guides/dp/0321706285/ref=sr_1_10?s=books&ie=UTF8&qid=1333742247&sr=1-10
Understanding Pointers in C
Yashavant Kanetkar
@ejknapp
ejknapp / letters.plist
Created April 5, 2012 19:50
Letters Plist for iOS Dev.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<string>&apos;</string>
<string>A</string>
<string>B</string>
<string>C</string>
<string>D</string>
<string>E</string>
@ejknapp
ejknapp / gist:2243634
Created March 29, 2012 20:49
Word Plists for iOS challenge Spring 2012
http://dl.dropbox.com/u/16988659/WordsPlists.zip
@ejknapp
ejknapp / gist:2205643
Created March 26, 2012 14:51
iPad apps I like and use
- Textastic http://www.textasticapp.com/
- Simplenote http://www.simplenoteapp.com/
- Pandora http://www.pandora.com/
- Instapaper http://www.instapaper.com/
- GoodReader http://goodiware.com/goodreader.html
- Tweetbot http://tapbots.com/software/tweetbot/
- Flipboard http://flipboard.com/
- NPR http://www.npr.org/services/mobile/ipad.php
- WeatherBug http://weather.weatherbug.com/mobile/weatherbug-elite-apple-ipad.html
- Deliveries https://junecloud.com/
@ejknapp
ejknapp / gist:2154139
Created March 21, 2012 23:29
Xcode snippet
NSLog(@"\n\tFunction\t=>\t%s\n\tLine\t\t=>\t%d", __func__, __LINE__);