This file contains 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 *urlString = @"https://api.mongolab.com/api/1/databases/todo/collections/tasks/"; | |
NSURL *url = [NSURL URLWithString:urlString]; | |
AFHTTPClient *client = [[AFHTTPClient alloc] initWithBaseURL:url]; | |
NSDictionary *key = @{@"apiKey": @"MWxF-8RKg5wx4oLLDDDZa5Mdd01to7zV"}; | |
void (^logMessage)(RACTuple *) = ^(RACTuple * x) { | |
AFHTTPRequestOperation *operation = x.first; | |
NSData *data = x.second; |
This file contains 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
#pragma mark - Phone Number Field Formatting | |
// Adopted from: http://stackoverflow.com/questions/6052966/phone-number-formatting | |
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string | |
{ | |
if (textField == self.mobileNumberField || textField == self.homeNumberField || textField == self.workNumberField) { | |
int length = [self getLength:textField.text]; | |
if(length == 10) { | |
if(range.length == 0) |
This file contains 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 *deliveryTime = [NSString stringWithFormat:@"%@", (deliveryHour >= 10 ? [NSString stringWithFormat:@"%d", deliveryHour] : [NSString stringWithFormat:@"0%d", deliveryHour]) ]; |
This file contains 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
stages: | |
- test | |
build_code: | |
stage: test | |
script: | |
- xcodebuild test -workspace MyProject.xcworkspace -scheme MyProjectTests | xcpretty -c && exit ${PIPESTATUS[0]} |
This file contains 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 R from 'ramda'; | |
// [] -> Boolean | |
function notEmpty(xs) { | |
return xs.length > 0; | |
} | |
// (RatePlan -> Boolean) -> [AvailableHotel] -> [AvailableHotel] | |
function filterHotelsByRatePlan(ratePlanIndicator) { | |
const ratePlans = R.filter(ratePlanIndicator); |
This file contains 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
[ | |
{ | |
"id": "da5a0b28.008b", | |
"type": "subflow", | |
"name": "Room light v3 supported command?", | |
"info": "", | |
"category": "", | |
"in": [ | |
{ | |
"x": 73.33333015441895, |