This file contains hidden or 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
| int resultsSize = [self.dataController.products count]; //data is the previous array of data | |
| [self.dataController.products addObjectsFromArray:products]; | |
| [self.productsView performBatchUpdates:^{ | |
| NSMutableArray *arrayWithIndexPaths = [NSMutableArray array]; | |
| for (int i = resultsSize; i < resultsSize + products.count; i++) { | |
| [arrayWithIndexPaths addObject:[NSIndexPath indexPathForRow:i inSection:0]]; | |
| } | |
| [self.productsView insertItemsAtIndexPaths:arrayWithIndexPaths]; | |
| } |
This file contains hidden or 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
| AWSS3.defaultS3().listBuckets(nil).continueWithBlock { | |
| (task: BFTask!) -> AnyObject! in | |
| let output : AWSS3ListBucketsOutput = task.result() as AWSS3ListBucketsOutput | |
| println("found \(output.buckets.count) buckets") | |
| for bucket in output.buckets as [AWSS3Bucket] { | |
| println("Found bucket \(bucket.name)") | |
| } | |
| return nil |
This file contains hidden or 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
| for (NSDictionary *data in responseObject[@"discussions"]) { | |
| NFTDiscussionModel *discussion = [MTLJSONAdapter modelOfClass:[NFTDiscussionModel class] | |
| fromJSONDictionary:data error:nil]; | |
| [items addObject:discussion]; | |
| } | |
| success([items firstObject]); |
This file contains hidden or 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
| var AWS = require("aws-sdk"); | |
| var DOC = require("dynamodb-doc"); | |
| var path = require('path'); | |
| var util = require('util'); | |
| var _ = require('lodash'); | |
| var async = require('async'); | |
| var internals = {}; |
This file contains hidden or 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
| func dataSource(dataSource: ASTableViewDataSource, removedSections: NSIndexSet?, insertedSections: NSIndexSet?, movedSections: [MovedIndex]?) { | |
| dispatch_async(dispatch_get_main_queue()) { | |
| self.tableView.ins_endPullToRefresh() | |
| } | |
| tableView.beginUpdates() | |
| var del = NSMutableIndexSet() | |
| var add = NSMutableIndexSet() | |
This file contains hidden or 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
| heightForHeaderInSection 0 | |
| heightForHeaderInSection 0 | |
| heightForHeaderInSection 1 | |
| heightForHeaderInSection 1 | |
| heightForHeaderInSection 2 | |
| heightForHeaderInSection 2 | |
| heightForHeaderInSection 3 | |
| heightForHeaderInSection 3 | |
| heightForHeaderInSection 4 | |
| heightForHeaderInSection 4 |
This file contains hidden or 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
| // | |
| // ASTableViewManager.swift | |
| // cinch | |
| // | |
| // Created by Ryan Fitzgerald on 3/9/15. | |
| // Copyright (c) 2015 cinch. All rights reserved. | |
| // | |
| import Foundation | |
| import RFSectionDelta |
This file contains hidden or 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
| private func unrotateImage(image : UIImage) -> UIImage { | |
| let size = image.size | |
| UIGraphicsBeginImageContext(size) | |
| image.drawInRect(CGRectMake(0, 0, size.width, size.height)) | |
| let newImage = UIGraphicsGetImageFromCurrentImageContext() | |
| UIGraphicsEndImageContext() | |
| return newImage | |
| } |
This file contains hidden or 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
| require 'rubygems' | |
| require 'httparty' | |
| require 'pp' | |
| module NflKnockout | |
| class Client | |
| include HTTParty | |
| format :xml | |
| base_uri 'http://football.myfantasyleague.com' | |
This file contains hidden or 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
| require 'test/unit' | |
| require 'nfl_scores' | |
| require 'rubygems' | |
| require 'fakeweb' | |
| class NflScoresTest < Test::Unit::TestCase | |
| def setup | |
| FakeWeb.allow_net_connect = false | |
| FakeWeb.register_uri(:get, "http://football.myfantasyleague.com/2009/export?TYPE=nflSchedule&W=1", :body => nfl_schedule_xml) | |
| end |
OlderNewer