Skip to content

Instantly share code, notes, and snippets.

View wilsolutions's full-sized avatar
😀

Wils wilsolutions

😀
View GitHub Profile
(function($) {
window.Insight = Backbone.Model.extend({
view: function(index) {
//return this.get('innovations')[index];
console.log(this.get('innovations')[index]);
}
});
@wilsolutions
wilsolutions / JSON NSLOG output
Created October 22, 2011 16:25
JSON NSLOG output
- (void)viewDidLoad
{
NSError *error = nil;
// Prepare URL request to JSON call...
NSURLRequest *request = [NSURLRequest requestWithURL:
[NSURL URLWithString:
@"http://reviewapp/items.json"]];
NSData *response = [NSURLConnection
@wilsolutions
wilsolutions / gist:1306098
Created October 22, 2011 15:16
warning: unused variable 'jsonFound1' [-Wunused-variable,12]
NSURL *apiURL = [NSURL URLWithString:@"http://api.stackoverflow.com/1.1/questions?tagged=objective-c&pagesize=30"];
NSError *error = nil;
// First option - failed
NSInputStream *inputStream = [NSInputStream inputStreamWithURL:apiURL]; // returning nil
id jsonFound1 = [NSJSONSerialization JSONObjectWithStream:inputStream options:NSJSONReadingMutableContainers error:&error];