I hereby claim:
- I am ronaldmannak on github.
- I am ronaldmannak (https://keybase.io/ronaldmannak) on keybase.
- I have a public key whose fingerprint is 86E0 A3DE 989F DF25 E164 C736 739A DDBB EE88 35BE
To claim this, I am signing this object:
| 0x0a16d2efbeef080a342a941aa99e505bd50df4f7 |
| 0xb81Df5747f39bfD5ce9410F1Be9B02851B0cbd6E |
| import Foundation | |
| final class NetworkManager: NSObject, URLSessionDelegate { | |
| func login() { | |
| var request = URLRequest(url: URL(string: "https://b2vapi.bmwgroup.com/webapi/oauth/token/")!) | |
| request.addValue("Content-Type", forHTTPHeaderField: "application/json") | |
| request.httpMethod = "GET" | |
| let session = URLSession(configuration: URLSessionConfiguration.default, delegate: self, delegateQueue: nil) | |
I hereby claim:
To claim this, I am signing this object:
| import SpriteKit | |
| func position(number: Int)->Int { | |
| return number | |
| } | |
| class node: SKNode { | |
| // Note: SKNode has a property called position (a CGPoint) |
| let anArray = [1, 2, 3] // A constant array | |
| let anotherArray = anArray // make anotherArray point to anArray | |
| anArray === anotherArray // true. anArray points to anotherArray | |
| // Let's try the same with a variable array | |
| var aMutableArray = [4, 5, 6] | |
| var anotherMutableArray = aMutableArray // Should work like constant arrays, but... | |
| anotherMutableArray === aMutableArray // Surprise: this returns false | |
| // Update: According to an Apple engineer, this is a compiler bug. |
| // JLRoutes delay | |
| // In this version, the viewcontroller appears instantaneously | |
| - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
| { | |
| UIStoryboard *rootStoryboard = [UIStoryboard storyboardWithName:@"MainFeed" bundle:nil]; | |
| UIViewController *rootvc = [rootStoryboard instantiateInitialViewController]; | |
| self.window.rootViewController = rootvc; | |
| return YES |
| // | |
| // NSNull+behave.m | |
| // | |
| // Created by Ronald Mannak on 1/2/13. | |
| // Copyright (c) 2013 Ronald Mannak. All rights reserved. | |
| // | |
| @implementation NSNull (catch) | |
| - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector { |
| -(NSString*)dailyLanguage:(NSTimeInterval) overdueTimeInterval{ | |
| if (overdueTimeInterval<0) | |
| overdueTimeInterval*=-1; | |
| NSInteger minutes = round(overdueTimeInterval)/60; | |
| NSInteger hours = minutes/60; | |
| NSInteger days = hours/24; | |
| NSInteger months = days/30; | |
| NSInteger years = months/12; |