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
[UIView beginAnimations:nil context:NULL]; | |
[UIView setAnimationDuration:1]; | |
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft fromView:self.view cache:YES]; | |
[secondViewController viewWillAppear:YES]; | |
[firstViewController viewWillDisappear:YES]; | |
[firstViewController removeFromSuperview]; | |
[self.view addSubview:tableView]; | |
[firstViewController viewDidDisappear:YES]; | |
[secondViewController viewDidAppear:YES]; |
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
#pragma clang diagnostic push | |
#pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation" | |
// do your override | |
#pragma clang diagnostic pop |
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 "NSObject+PWObject.h" | |
@implementation NSObject (PWObject) | |
- (void)performBlock:(void (^)(void))block afterDelay:(NSTimeInterval)delay { | |
int64_t delta = (int64_t)(1.0e9 * delay); | |
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, delta), dispatch_get_main_queue(), block); | |
} | |
@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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
namespace SuffixTreeAlgorithm | |
{ | |
public class SuffixTree | |
{ |
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
RESTful routes | |
GET /emergencies | |
POST /emergencies | |
GET /emergencies/:id | |
POST /emergencies/:id/offers | |
GET /emergencies | |
{ | |
"emergencies": [ |
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
# File: apns.rb | |
# | |
# Abstract: Pass Server reference implementation | |
# | |
# Version: <1.0> | |
# | |
# Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. ("Apple") | |
# in consideration of your agreement to the following terms, and your use, | |
# installation, modification or redistribution of this Apple software | |
# constitutes acceptance of these terms. If you do not agree with these |
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
- (NSString *)JSONSerialization | |
{ | |
RKObjectMappingProvider * provider = [RKObjectManager sharedManager].mappingProvider; | |
RKObjectMapping* mapping = [provider objectMappingForClass:[self class]]; | |
RKObjectSerializer * serializer = [RKObjectSerializer serializerWithObject:self mapping:mapping]; | |
NSError *error = nil; | |
NSString *retVal = [serializer serializedObjectForMIMEType:RKMIMETypeJSON error:&error]; |
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
# Note that a variable may require special treatment | |
#+ if it will be exported. | |
DARKGRAY='\e[1;30m' | |
INDACO='\e[1;36m' | |
WHITE='\e[1;37m' | |
PURPLE='\e[1;35m' | |
LIGHTRED='\e[1;31m' | |
GREEN='\e[32m' | |
YELLOW='\e[1;33m' |
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 AppDelegate : NSObject | |
- (void)causeUnrecognizedSelector; | |
@end | |
@implementation AppDelegate | |
- (void)startXOCL | |
{ |
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
#!/usr/bin/env perl | |
# cloc -- Count Lines of Code {{{1 | |
# Copyright (C) 2006-2011 Northrop Grumman Corporation | |
# Author: Al Danial <[email protected]> | |
# First release August 2006 | |
# | |
# Includes code from: | |
# - SLOCCount v2.26 | |
# http://www.dwheeler.com/sloccount/ | |
# by David Wheeler. |