- Plain Strings (207):
foo
- Anchors (208):
k$
- Ranges (202):
^[a-f]*$
- Backrefs (201):
(...).*\1
- Abba (169):
^(.(?!(ll|ss|mm|rr|tt|ff|cc|bb)))*$|^n|ef
- A man, a plan (177):
^(.)[^p].*\1$
- Prime (286):
^(?!(..+)\1+$)
- Four (199):
(.)(.\1){3}
- Order (198):
^[^o].....?$
- Triples (507):
(^39|^44)|(^([0369]|([147][0369]*[258])|(([258]|[147][0369]*[147])([0369]*|[258][0369]*[147])([147]|[258][0369]*[258])))*$)
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
- (void)testThatConvertingBackAndForthDoesntAffectResults { | |
double celsius = 50; | |
double farenheitResult = [controller convertCelsiusToFarenheit:celsius]; | |
//convert back | |
double celsiusResult = [controller convertFarenheithToCelsius:farenheitResult]; | |
STAssertEquals(celsius, celsiusResult, @"should be equal"); | |
} |
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
SPEC_BEGIN(TemperatureConverterTests) | |
describe(@"basic converter", ^{ | |
it(@"converts farenheit To celsius", ^{ | |
ViewController *controller = [ViewController alloc]init]; | |
[[theValue([controller convertCelisusToFarenheit:-40]) should]equal:theValue(-40)]; | |
}); | |
it(@"converts celsius to farenheight", ^{ | |
ViewController *controller = [ViewController alloc]init]; | |
[[theValue([controller convertfarenheitToCelsius:-40]) should]equal:theValue(-40)]; |
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
# Fullscreen | |
bind f:alt;cmd;ctrl move 0;0 screenSizeX;screenSizeY | |
# Half Screen | |
bind right:ctrl;cmd push right bar-resize:screenSizeX/2 | |
bind left:ctrl;cmd push left bar-resize:screenSizeX/2 | |
bind up:ctrl;cmd push up bar-resize:screenSizeY/2 | |
bind down:ctrl;cmd push down bar-resize:screenSizeY/2 | |
# Quarter Screen |
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
UIProgressView *v = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleDefault]; | |
v.frame = CGRectMake(40, 100, 240, 2); | |
[self.view addSubview:v]; | |
{ | |
double delayInSeconds = 1.0; | |
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); | |
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ | |
[v setProgress:0.5f animated: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
-[__NSCFCalendar components:fromDate:]: date cannot be nil | |
I mean really, what do you think that operation is supposed to mean with a nil date? | |
An exception has been avoided for now. | |
A few of these errors are going to be reported with this complaint, then further violations will simply silently do whatever random thing results from the nil. |
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
//////////////////////////////////////////////// | |
// | |
// Swift and Objective-C Class Parsing | |
// | |
//////////////////////////////////////////////// | |
import Foundation | |
// Class parsing |
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
// | |
// JAZMusician.h | |
// JazzyApp | |
// | |
#import <Foundation/Foundation.h> | |
/** | |
JAZMusician models, you guessed it... Jazz Musicians! | |
From Ellington to Marsalis, this class has you covered. |
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
sourcekit: [2:sourcekitd_initialize:1299: 0.0003] initializing | |
2014-07-11 11:12:15.618 Xcode[2028:36673] Failed to connect (abPeoplePickerTemplate) outlet from (IBCocoaStoryboardObjectLibraryAssetProvider) to (IBObjectLibraryAsset): missing setter or instance variable | |
2014-07-11 11:12:15.627 Xcode[2028:36673] Failed to connect (ikCameraDeviceViewTemplate) outlet from (IBCocoaStoryboardObjectLibraryAssetProvider) to (IBObjectLibraryAsset): missing setter or instance variable | |
2014-07-11 11:12:15.627 Xcode[2028:36673] Failed to connect (ikDeviceBrowserViewTemplate) outlet from (IBCocoaStoryboardObjectLibraryAssetProvider) to (IBObjectLibraryAsset): missing setter or instance variable | |
2014-07-11 11:12:15.628 Xcode[2028:36673] Failed to connect (ikImageBrowserViewTemplate) outlet from (IBCocoaStoryboardObjectLibraryAssetProvider) to (IBObjectLibraryAsset): missing setter or instance variable | |
2014-07-11 11:12:15.628 Xcode[2028:36673] Failed to connect (ikImageViewTemplate) outlet from (IBCocoaStoryboardObjectLibrar |
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 <Objective-LevelDB/LevelDB.h> | |
#include <mach/mach_time.h> | |
#include <stdint.h> | |
NSString *randomString(NSUInteger length) { | |
NSMutableString *string = [NSMutableString stringWithCapacity:length]; | |
for (int i = 0; i < length; i++) { | |
[string appendFormat:@"%C", (unichar)('a' + arc4random_uniform(25))]; | |
} | |
return string; |