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
public class LoginDialogDriver | |
{ | |
private String userName; | |
private String password; | |
private String message; | |
private int loginAttempts; | |
public LoginDialogDriver(String userName, String password) | |
{ | |
this.userName = userName; |
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
language: objective-c | |
rvm: 1.9.3 | |
script: xctool -workspace [Your Workspace] -scheme [Your Specs Scheme] -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO |
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
class ExternalRouter | |
{ | |
private: | |
static ExternalRouter *_instance; | |
protected: | |
ExternalRouter(); | |
public: | |
static ExternalRouter *instance(); |
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
class DecimalStringComparer | |
def self.compare_decimal(a, b) | |
new(a, b).execute | |
end | |
def initialize(a, b) | |
@a = a | |
@b = b | |
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
So I upgraded XCode | |
Which caused my build to fail | |
Which required upgrading Xamarin | |
Which caused my program to build, but crash | |
Which requires manually building monomac |
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
657 void callback() { | |
658 // Lift = R(0, 1, 0) |K| (sin theta) | |
659 // Drag = -K (sin theta) | |
660 // Where theta is the angle between w (planes direction) and K | |
661 // This should be direction of - not velocity - | |
662 // You've got velocity * R (the rotation) u = R(velocity) | |
663 // K ends up as the actual direction of motion | |
664 // plane->K + plane->R * Vector(0, 0, +1) Add a constant | |
665 if (engineSpeed != 0) { | |
666 // Apply Thrust |
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) initializeDirector | |
{ | |
[[Director sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft]; | |
[[Director sharedDirector] setAnimationInterval:1.0/60]; | |
[[Director sharedDirector] setDisplayFPS:YES]; | |
// create an openGL view inside a window | |
[[Director sharedDirector] attachInView:window]; | |
[[Director sharedDirector] runWithScene: [GameScene scene]]; |
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
# In App Delegate | |
-(void) initializeDirector | |
{ | |
[self.producer initializeDirectorWithWindow:window scene:[GameScene scene]]; | |
} | |
# In my Producer Object | |
-(void) initializeDirectorWithWindow:(UIWindow *) window scene:(Scene *) scene | |
{ | |
[[Director sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft]; |
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) initializeDirector | |
{ | |
[producer initializeDirectorWithWindow:window scene:[GameScene scene]]; | |
// before creating any layer, set the landscape mode | |
// Initialize Director | |
[[Director sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft]; | |
[[Director sharedDirector] setAnimationInterval:1.0/60]; | |
[[Director sharedDirector] setDisplayFPS: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
-(void) testRunsWithGameScene | |
{ | |
MockProducer *producer = [[[MockProducer alloc] init] autorelease]; | |
MadBomberAppDelegate *delegate = [[[MadBomberAppDelegate alloc] init] autorelease]; | |
delegate.producer = producer; | |
[delegate applicationDidFinishLaunching: nil]; | |
STAssertEquals([producer.initialScene class], [[GameScene scene] class], nil); | |
STAssertEqualObjects(producer.initialWindow, delegate.window, nil); |