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
var s = Array.prototype.slice; | |
s.apply(foo); |
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
if Rack::Utils.respond_to?("key_space_limit=") | |
Rack::Utils.key_space_limit = 262144 | |
end |
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)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { | |
NSLog(@"Me called"); | |
return NO; | |
} | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
// Override point for customization after application launch. | |
self.window.backgroundColor = [UIColor whiteColor]; |
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
// | |
// AppDelegate.m | |
// WebViewBlackPatchTest | |
// | |
// Created by Anurag Misra on 6/28/12. | |
// Copyright (c) 2012 AT&T Interactive. All rights reserved. | |
// | |
#import "AppDelegate.h" |
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
// | |
// AppDelegate.m | |
// WebViewBlackPatchTest | |
// | |
// Created by Anurag Misra on 6/28/12. | |
// Copyright (c) 2012 AT&T Interactive. All rights reserved. | |
// | |
#import "AppDelegate.h" |
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 "sqlite3.h" | |
typedef int64_t timestamp; | |
NSUInteger randomNumberInRange(NSUInteger start, NSUInteger end); | |
// Create a sample date using the ISO-8601 format. | |
// 2013-04-23T16:29:05Z | |
NSString* generateSampleDate(); |
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> | |
#include <time.h> | |
#include <xlocale.h> | |
#import "sqlite3.h" | |
#import "ISO8601DateFormatter.h" | |
#define LOG_DATE 0 | |
static NSUInteger count = 1000000; |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
import PlaygroundSupport | |
class LastRowCenteredLayout: UICollectionViewFlowLayout { | |
override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? { | |
guard let originalAttributes = super.layoutAttributesForElements(in: rect) else { return nil } | |
guard originalAttributes.isEmpty == false else { return originalAttributes } |