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 <Foundation/Foundation.h> | |
#import "MFFraction.h" | |
@interface MFUtilities : NSObject | |
{ | |
int count; | |
} | |
//main intro | |
-(double)getValueOfFraction:(MFFraction *)fraction; | |
-(BOOL)isEqual:(MFFraction *)fractionOne and:(MFFraction *)object; |
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 necessary frameworks | |
#import <Foundation/Foundation.h> | |
//public interface | |
@interface MyClass : SuperclassOfMyclass | |
{ | |
//public members declarations | |
int member1; | |
} |
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
1. Copy ajax.cfc to your folder | |
2. Add the following code to the file's header. | |
<cfajaxproxy cfc="atcdev.applications.captcha.ajax" jsclassname="proxy" /> | |
<cfinvoke component="ajax" returnvariable="captcha" method="makeRandomString"> | |
<cfset captchaHash = hash(captcha)> | |
<script type="text/javascript"> | |
<!-- | |
<cfoutput> |
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
/*! | |
@class WebServicesHelper | |
@abstract | |
Contains methods that are making networking calls and parse the response | |
@discussion | |
*/ |
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
/*! | |
@class WebServicesHelper | |
@abstract | |
Contains methods that are making networking calls and parse the response | |
@discussion | |
respond to, e.g., authentication challenges | |
*/ |
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 "AppDelegate.h" | |
#import "WebServicesHelper.h" | |
@interface AppDelegate() | |
@property (nonatomic,strong)WebServicesHelper * helper; | |
@end | |
@implementation AppDelegate | |
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
NSFetchRequest *request = [[NSFetchRequest alloc] init]; | |
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Slide" inManagedObjectContext:[[manager getAppDelegate]managedObjectContext]]; | |
[request setEntity:entity]; | |
// Specify that the request should return dictionaries. | |
[request setResultType:NSDictionaryResultType]; | |
NSExpression *keyPathExpression = [NSExpression expressionForKeyPath:@"order"]; | |
// Create an expression to represent the minimum value at the key path 'creationDate' | |
NSExpression *minExpression = [NSExpression expressionForFunction:@"min:" arguments:[NSArray arrayWithObject:keyPathExpression]]; |
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
@interface KVOOperationQueue() | |
@property(nonatomic, strong) NSOperationQueue *queue; | |
@end | |
@implementation KVOOperationQueue | |
-(id)init{ | |
self = [super init]; | |
if(self){ | |
filePath = filename; |
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
-(BOOL)checkIfOnline{ | |
NSURL *scriptUrl = [NSURL URLWithString:@"http://google.com/m"]; | |
NSData *data = [NSData dataWithContentsOfURL:scriptUrl]; | |
if (data){ | |
NSLog(@"Device is connected to the internet"); | |
return YES;} | |
else | |
NSLog(@"Device is not connected to the internet"); | |
return NO; |
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
// XMLParser.m | |
// CDT | |
// Created by Janusz Chudzynski on 1/13/14. | |
#import "XMLParser.h" | |
#import "Deck.h" | |
#import "Question.h" | |
typedef void (^SuccessBlock)(NSData *); |
OlderNewer