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
// | |
// CTUIImage+Extensions.h | |
// MineSweeper | |
// | |
// Created by Chad Weider on 3/29/12. | |
// Copyright (c) 2012 Chad Weider. All rights reserved. | |
// | |
#import <UIKit/UIKit.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
- (void) assertionIdeasLikeNUnit | |
{ | |
[Assert that:@"foobar" is:[Equal to:@"other"]]; | |
[Assert that:@"foobar" isNot:[Equal to:@"other"]]; | |
[Assert that:collection isAll:[Less than:@10]]; | |
[Assert that:collection isAll:[Less thanOrEqualTo:@10]]; | |
[Assert that:collection isAll:[Less thanOrEqualTo:@10]]; | |
[Assert that:collection isAll:[Greater than:@10]]; | |
[Assert that:collection isAll:[Greater thanOrEqualTo:@10]]; |
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
// | |
// AsyncSenTestingKitTests.h | |
// AsyncSenTestingKitTests | |
// | |
// Created by 小野 将司 on 12/03/17. | |
// Copyright (c) 2012年 AppBankGames Inc. All rights reserved. | |
// | |
#import <SenTestingKit/SenTestingKit.h> | |
#import "SenAsyncTestCase.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
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
UIView *holderView = [[UIView alloc] initWithFrame:CGRectMake(50.0f, 50.0f, 200.0f, 200.0f)]; | |
CAEmitterLayer *emitterLayer = [CAEmitterLayer layer]; | |
emitterLayer.frame = CGRectMake(0.0f, 0.0f, 200.0f, 200.0f); | |
emitterLayer.emitterSize = CGSizeMake(20.0f, 20.0f); | |
emitterLayer.emitterPosition = CGPointMake(90.0f, 90.0f); | |
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
// life cycle | |
NSMutableString *s1 = [NSMutableString stringWithCapacity:10]; | |
NSMutableString *s2 = [[NSMutableString alloc] initWithCapacity:10]; | |
[s2 release]; | |
// fill string | |
[s1 appendFormat:@"%@ Objective-C!", @"Hello"]; | |
NSLog(@"%@", s1); | |
// append string | |
[s1 appendString:@" Glad to be here."]; | |
NSLog(@"%@", s1); |
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
NSArray *retailerList = ((RetailerDetailsResponseV1*)[RetailerDetailsResponseV1 readFromFile:kBNCloudFileNameRetailers]).retailerList; | |
if (retailerList.count > 0) { | |
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"retailerId != [cd] %@ AND countryId == [cd] %@", @"NOK", countryCode]; | |
NSArray *retailer = [retailerList filteredArrayUsingPredicate:predicate]; | |
if (retailer) { | |
return [[retailer objectAtIndex:0] valueForKey:@"retailerId"]; | |
} | |
} |
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 *someScript = [[NSBundle mainBundle] pathForResource:@"some_script" ofType:@"osascript"]; | |
NSString *contents = [NSString stringWithContentsOfFile:someScript encoding:NSUTF8StringEncoding error:nil]; | |
NSAppleScript *script =[[NSAppleScript alloc] initWithSource:contents]; | |
[script executeAndReturnError:nil]; |
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
AA = Rickard Stark (M) AB = Eddard Stark (M) AC = Catelyn Tully (F) | |
AD = Brandon Stark (M) AE = Benjen Stark (M) AF = Jon Snow (M) | |
AG = Robb Stark (M) AH = Sansa Stark (F) AI = Arya Stark (F) | |
AJ = Bran Stark (M) AK = Rickon Stark (M) AL = Hoster Tully (M) | |
AM = Minisa Whent (F) AN = Edmure Tully (M) AO = Lysa Tully (F) | |
AP = Jon Arryn (M) AQ = Robert Arryn (M) AR = Tytos Lannister (M) | |
AS = Tywin Lannister (M) AT = Joanna Lannister (F) AU = Kevan Lannister (M) | |
AV = Cersei Lannister (F) AW = Jamie Lannister (M) AX = Tyrion Lannister (M) | |
AY = Robert Baratheon (M) AZ = Joffrey Baratheon (M) BA = Myrcella Baratheon (F) | |
BB = Tommen Baratheon (M) BC = Lancel Lannister (M) BD = Steffon Baratheon (M) |
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
/****************************************************** | |
Arduino EEPROM Read-Write Test | |
by Ted Hayes 2012 | |
[email protected] | |
Demonstrates the usage of the EEPROM Library for checking the state of a single value, | |
changing it, and resetting it. To use: | |
1) Put a momentary switch between ground and pin 11 on your Arduino. |
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
/* | |
Fade | |
This example shows how to fade an LED on pin 9 | |
using the analogWrite() function. | |
This example code is in the public domain. | |
*/ | |
int brightness = 0; // how bright the LED is |