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
// | |
// main.m | |
// chrono | |
// | |
// Created by Darshan Katrumane on 2/2/15. | |
// Copyright (c) 2015 Darshan Katrumane. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
int main(int argc, const char * argv[]) { |
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
- (void)printSubViews:(UIView *)view withTag:(NSInteger)tag | |
{ | |
if (view == nil) { | |
return; | |
} | |
if ( [view tag] == tag) { | |
NSLog(@"%@", view); | |
return; | |
} | |
for (UIView *subview in [view subviews]) |
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
// interface | |
@interface MaxSubArray : NSObject | |
@end | |
// extension | |
@interface MaxSubArray() | |
@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
@implementation RRUser | |
@synthesize email, name, facebookId, userId, sessionToken, imageUrl; | |
-(void) parseResponse:(NSDictionary*) data { | |
// this is a better way to test, if the class responds to a selector | |
// then go ahead and read from it | |
if([[data objectForKey:@"email"] respondsToSelector:@selector(length)]) { | |
self.email = [data objectForKey:@"email"]; | |
} | |
if([[data objectForKey:@"name"] respondsToSelector:@selector(length)]) { | |
self.name = [data objectForKey:@"name"]; |
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
{ | |
id: "54c58d22e", | |
dateCreated: "2015-01-26T00:41:06.687Z", | |
email: "poon@gmail.com", | |
facebookId: "490325", | |
imageUrl: "https://graph.facebook.com/1015/picture?width=50&height=50", | |
iosDeviceToken: "75b61936b004381d9aab643c5", | |
lastUpdated: "2015-03-08T21:07:00.421Z", | |
name: null, | |
sessionToken: "dba99343-368e-47a8-9198" |
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
// change the color of the navigation bar | |
[[UINavigationBar appearanceWhenContainedIn:[UINavigationController class], nil] setBarTintColor:[RRHelper appBlue]]; | |
// change the tint color of the navigation bar | |
[[UINavigationBar appearanceWhenContainedIn:[UINavigationController class], nil] setTintColor:[UIColor whiteColor]]; | |
// change the title text attributes | |
[[UINavigationBar appearanceWhenContainedIn:[UINavigationController class], nil] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIColor whiteColor], NSForegroundColorAttributeName, [UIFont fontWithName:kFontRegular size:18.0], NSFontAttributeName, @0.5, NSKernAttributeName, nil]]; | |
// change the bar button item properties |
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
// | |
// Tree.h | |
// learnObjectiveC | |
// | |
// Created by kmd on 3/3/15. | |
// Copyright (c) 2015 Happy Days. All rights reserved. | |
// | |
#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
// | |
// RRQueue.h | |
// learnObjectiveC | |
// | |
// Created by darshan on 3/19/15. | |
// Copyright (c) 2015 Happy Days. All rights reserved. | |
// | |
#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
In Mysql, if your using a subquery to update a table, it will give you an error. | |
e.x. In the below query your basically trying to update and query the table at the same time. This would not be possible in Mysql. | |
[code language="text"] | |
UPDATE items ci SET ci.`c_id` = 27 | |
WHERE ci.`ID` IN ( | |
SELECT c.`ID` | |
FROM orders f, items c | |
WHERE c.`orderID` = f.`orderID` LIMIT 100; |
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
@interface RRHomeViewController () | |
{ | |
UIButton *logoutButton; | |
UIView *testAnimateView; | |
} | |
@property (nonatomic, strong) UIDynamicAnimator *animator; | |
@property (nonatomic, strong) UIDynamicItemBehavior *linearVelocity; | |
@end | |
@implementation RRHomeViewController |
OlderNewer