Skip to content

Instantly share code, notes, and snippets.

//
// ELCUIApplication.m
//
// Created by Brandon Trebitowski on 9/19/11.
// Copyright 2011 ELC Technologies. All rights reserved.
//
#import "ELCUIApplication.h"
@implementation ELCUIApplication
//
// 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
#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;
}
- (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;
@brandontreb
brandontreb / Vector2D.lua
Created June 3, 2011 14:26
A simple Vector2D class used in Corona SDK games.
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)
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);