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 string GetDataFromResults(SearchResult result, string propertyName) | |
{ | |
if (!result.Properties.Contains(propertyName) || result.Properties[propertyName].Count == 0) | |
{ | |
return null; | |
} | |
var prop = result.Properties[propertyName][0]; | |
var data = prop.GetType() == typeof (byte[]) | |
? Encoding.UTF8.GetString((byte[]) prop) |
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
### Keybase proof | |
I hereby claim: | |
* I am slmcmahon on github. | |
* I am slmcmahon (https://keybase.io/slmcmahon) on keybase. | |
* I have a public key whose fingerprint is 5EDF 98DD DF62 2F0A D425 6173 93DA CB79 C1F8 E531 | |
To claim this, I am signing this object: |
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)textFieldShouldReturn:(UITextField *)textField | |
{ | |
[textField resignFirstResponder]; | |
return YES; | |
} | |
// Assign a tag value > 0 for any text field that appears | |
// behind or partially behind the keyboard. | |
// *** The containing view must implement UITextFieldDelegate *** | |
- (void)textFieldDidBeginEditing:(UITextField *)textField |
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
// | |
// UpdateManager.m | |
// ReactiveLearning | |
// | |
// Created by Stephen L. McMahon on 8/4/13. | |
// | |
// interface: https://gist.github.com/slmcmahon/6152156 | |
static NSString *const kPreferenceAskUpdate = @"pref_ask_update"; |
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
// | |
// UpdateManager.h | |
// ReactiveLearning | |
// | |
// Created by Stephen L. McMahon on 8/4/13. | |
// | |
// implmementation: https://gist.github.com/slmcmahon/6152160 | |
#import <Foundation/Foundation.h> |
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
NSDictionary *info = [[NSBundle mainBundle] infoDictionary]; | |
NSString *version = [info objectForKey:@"CFBundleShortVersionString"]; | |
NSString *build = [info objectForKey:@"CFBundleVersion"]; | |
NSString *versionString = [NSString stringWithFormat:@"%@.%@", version, build]; |
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 "MetaSearchService.h" | |
#import "ASIHTTPRequest.h" | |
NSString *const META_SEARCH_URL = @"http://peopleask.ooz.ie/soap.wsdl"; | |
NSString *const META_SEARCH_SOAP = | |
@"<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" " | |
@"xmlns:soap=\"http://peopleask.ooz.ie/soap\">" | |
@"<soapenv:Header/><soapenv:Body><soap:GetQuestionsAbout><soap:query>%@</soap:query>" | |
@"</soap:GetQuestionsAbout></soapenv:Body></soapenv:Envelope>"; | |
NSString *const META_SEARCH_SOAP_ACTION = @"http://peopleask.ooz.ie/soap/GetQuestionsAbout"; |
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 "ASIHTTPRequestDelegate.h" | |
#import "MetaSearchServiceDelegate.h" | |
extern NSString *const META_SEARCH_URL; | |
extern NSString *const META_SEARCH_SOAP; | |
extern NSString *const META_SEARCH_SOAP_ACTION; | |
@interface MetaSearchService : NSObject<ASIHTTPRequestDelegate,NSXMLParserDelegate> { | |
NSMutableString *currentString; |
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> | |
@class MetaSearchService; | |
@protocol MetaSearchServiceDelegate <NSObject> | |
- (void)metaSearchComplete:(MetaSearchService *)service; | |
@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
- (NSDate *)convertXmlDate:(NSString *)xmlDate { | |
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; | |
[dateFormat setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSS"]; | |
NSDate *date = [dateFormat dateFromString:xmlDate]; | |
[dateFormat release]; | |
return date; | |
} |