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
sudo apt-get install php5-pgsql | |
sudo apt-get install python-software-properties python g++ make | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get install nodejs | |
sudo npm install -g karma | |
sudo apt-get install git | |
sudo npm install -g coffee-script |
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
// e.g. check for iOS 6: | |
//#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 | |
#ifdef __IPHONE_7_0 | |
- (BOOL)supportedInterfaceOrientations | |
{ | |
return UIInterfaceOrientationMaskPortrait; | |
} | |
#endif |
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
//Set the separator line on left=0 | |
+ (void) setCellInsetsForVersion7:(UITableViewCell *)cell | |
{ | |
if([cell respondsToSelector:@selector(setSeparatorInset:)]) | |
{ | |
[cell setSeparatorInset:UIEdgeInsetsZero]; | |
} | |
} |
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
if([self respondsToSelector:@selector(edgesForExtendedLayout)]){ | |
[self setEdgesForExtendedLayout:UIRectEdgeNone]; | |
} |
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
- (BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string | |
{ | |
if([string isEqualToString:@"\n"]) { | |
[textField resignFirstResponder]; | |
return NO; | |
} | |
return YES; | |
} |
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
#import <Foundation/Foundation.h> | |
@interface NSDate (ISO8601) | |
+(NSDateFormatter*)ISO8601Formatter; | |
-(NSString*)ISO8601; | |
@end |
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
NSString *s = (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(NULL, (__bridge CFStringRef)[[self.app.externalURL absoluteString] mutableCopy], NULL, CFSTR("=,!$&'()*+;@?\n\"<>#\t :/"),kCFStringEncodingUTF8)); | |
url =[NSURL URLWithString:s]; |
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
#import <Foundation/Foundation.h> | |
#import "DDXMLNode.h" | |
@interface DDXMLNode (CDATA) | |
/** | |
Creates a new XML element with an inner CDATA block | |
<name><![CDATA[string]]></name> | |
*/ | |
+ (id)cdataElementWithName:(NSString *)name stringValue:(NSString *)string; |
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
//create predicate and filter the results | |
NSPredicate *distancePredicate = [NSPredicate predicateWithBlock:^BOOL(Establishment *a, NSDictionary *binding) | |
{ | |
CLLocation *myLocation = [[CLLocation alloc] initWithLatitude:[a.latitude doubleValue] | |
longitude:[a.longitude doubleValue]]; | |
return [location distanceFromLocation:myLocation] <= __distance; | |
}]; | |
NSArray *resultado = [shops filteredArrayUsingPredicate:distancePredicate]; |
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
if([self conformsToProtocol:@protocol(APIBicingNotificationCarriles)]) | |
{ | |
} |