Skip to content

Instantly share code, notes, and snippets.

View paytonrules's full-sized avatar

Eric Smith paytonrules

View GitHub Profile
public class LoginDialogDriver
{
private String userName;
private String password;
private String message;
private int loginAttempts;
public LoginDialogDriver(String userName, String password)
{
this.userName = userName;
language: objective-c
rvm: 1.9.3
script: xctool -workspace [Your Workspace] -scheme [Your Specs Scheme] -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
class ExternalRouter
{
private:
static ExternalRouter *_instance;
protected:
ExternalRouter();
public:
static ExternalRouter *instance();
class DecimalStringComparer
def self.compare_decimal(a, b)
new(a, b).execute
end
def initialize(a, b)
@a = a
@b = b
end
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
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
-(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]];
# 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];
-(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];
-(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);