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
handleSubmit(e) { | |
e.preventDefault(); | |
const token = localStorage.getItem(Constants.key_api_auth_token); | |
if(this.state.name && this.state.cost) { | |
const formData = new FormData(); | |
if(this.state.file) { | |
formData.append('file',this.state.file); | |
} | |
formData.append('name', this.state.name); | |
formData.append('cost', this.state.cost); |
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
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
// Override point for customization after application launch. | |
self.window.rootViewController = self.viewController; | |
[self.window makeKeyAndVisible]; | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidTimeout:) name:kApplicationDidTimeoutNotification object:nil]; | |
return 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
#import <UIKit/UIKit.h> | |
int main(int argc, char *argv[]) | |
{ | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
int retVal = UIApplicationMain(argc, argv, @"ELCUIApplication", nil); | |
[pool release]; | |
return retVal; | |
} |
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
// | |
// ELCUIApplication.m | |
// | |
// Created by Brandon Trebitowski on 9/19/11. | |
// Copyright 2011 ELC Technologies. All rights reserved. | |
// | |
#import "ELCUIApplication.h" | |
@implementation ELCUIApplication |
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
// | |
// ELCUIApplication.h | |
// | |
// Created by Brandon Trebitowski on 9/19/11. | |
// Copyright 2011 ELC Technologies. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
// # of minutes before application times out |
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
Vector2D = {} | |
function Vector2D:new(x, y) | |
local object = { x = x, y = y } | |
setmetatable(object, { __index = Vector2D }) | |
return object | |
end | |
function Vector2D:copy() | |
return Vector2D:new(self.x, self.y) |