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
<key>NSAppTransportSecurity</key> | |
<dict> | |
<key>NSAllowsArbitraryLoads</key> | |
<true/> | |
</dict> |
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
// by d whyte | |
int[][] result; | |
float t; | |
float ease(float p) { | |
return 3*p*p - 2*p*p*p; | |
} | |
float ease(float p, float g) { |
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
//get velocity from pan gesture | |
CGPoint velocity = [panGestureRecognizer velocityInView:self]; | |
if (self.bounds.size.width >= self.contentSize.width) { | |
//make movement zero along x if no horizontal scrolling | |
velocity.x = 0; | |
} | |
if (self.bounds.size.height >= self.contentSize.height) { | |
//make movement zero along y if no vertical scrolling | |
velocity.y = 0; | |
} |
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
//get velocity from pan gesture | |
CGPoint velocity = [panGestureRecognizer velocityInView:self]; | |
if (self.bounds.size.width >= self.contentSize.width) { | |
//make movement zero along x if no horizontal scrolling | |
velocity.x = 0; | |
} | |
if (self.bounds.size.height >= self.contentSize.height) { | |
//make movement zero along y if no vertical scrolling | |
velocity.y = 0; | |
} |
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
POPSpringAnimation *springAnimation = [POPSpringAnimation animation]; | |
springAnimation.property = [POPAnimatableProperty propertyWithName:kPOPViewCenter]; | |
springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(self.view.bounds.size.width/2, self.view.bounds.size.height/2)]; | |
springAnimation.velocity = [NSValue valueWithCGPoint:CGPointMake(100, 10)]; | |
[imageView pop_addAnimation:springAnimation forKey:@"center"]; |
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
UIImageView *imageView = [[UIImageView alloc] initWithFrame:frame]; | |
imageView.animationImages = [self animationImages]; //method to return an array of UIImage objects | |
imageView.animationDuration = 0.5; //could be whatever you want | |
[imageView startAnimating]; //for starting animation | |
[imageView stopAnimating]; //for ending animation |
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
#redirect stdout to something.csv and open it in Numbers/Excel to do whatever you want | |
require 'csv' | |
#total_tweets = 0 | |
client_hash = {} | |
dir_name = "~/path/to/tweetsfolder/" + "data/csv/" #insert path to tweets folder | |
file_paths_array = Dir.entries(dir_name) | |
file_paths_array.delete_at(0) | |
file_paths_array.delete_at(0) | |
file_paths_array.each do |file_path| | |
arr_of_arrs = CSV.read(dir_name+file_path) |