This file contains 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
# Shift still doesn't work | |
window.keydown = (key, {ctrl, shift, alt, meta}) -> | |
dispatchKeyboardEvent = (target, eventArgs...) -> | |
e = document.createEvent("KeyboardEvent") | |
e.initKeyboardEvent eventArgs... | |
target.dispatchEvent e | |
dispatchTextEvent = (target, eventArgs...) -> | |
e = document.createEvent("TextEvent") | |
e.initTextEvent eventArgs... |
This file contains 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
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<title>PeerJS Issue</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta http-equiv="Content-Language" content="en-us"> | |
<script type="text/javascript" src="http://cdn.peerjs.com/0/peer.js"></script> | |
<script type="text/javascript" src="http://coffeescript.org/extras/coffee-script.js"></script> | |
<script type="text/coffeescript"> | |
window.host = -> |
This file contains 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
def create | |
build_resource! | |
card = ActiveMerchant::Billing::CreditCard.new( | |
:number => params[:expiry_number], | |
:month => params[:expiry_month], | |
:year => params[:date_year], | |
:name => params[:name_on_card], | |
:verification_value => :params[:cvv] | |
) |
This file contains 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
String file contents! |
This file contains 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
local path = NSDocumentDirectory .. "/SomeDirectoryName" | |
local err = nil -- use err (instead of error) as the var name because error is a global lua function | |
if not NSFileManager:defaultManager():fileExistsAtPath(path) then | |
if not NSFileManager:defaultManager():fileManager:createDirectoryAtPath_withIntermediateDirectories_attributes_error(path, false, nil, err) then | |
puts("Create directory error %s", err:localizedDescription()) | |
end | |
end |
This file contains 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
http://app.info.avid.com/e/er.aspx?elq_mid=4196&elq_cid=6541875&s=774&lid=4937&elq=d35c821242274f698fb5d7903e773409 |
This file contains 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 uncaughtExceptionHandler(NSException *e) { | |
NSLog(@"ERROR: Uncaught exception %@", [e description]); | |
lua_State *L = wax_currentLuaState(); | |
if (L) { | |
wax_getStackTrace(L); | |
const char *stackTrace = luaL_checkstring(L, -1); | |
NSLog(@"%s", stackTrace); | |
NSString *message = [NSString stringWithFormat:@"Unexpected Exception:\n---------------------\n%@\n%s", [e description], stackTrace]; |
This file contains 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
@interface Perfect : NSObject { | |
@property UIView *containerView; | |
@property(nonatomic) UILabel *titleText; | |
} |
This file contains 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
local picData = toJPEG(photo):base64EncodedString() | |
local body = wax.http.escapeParams{pic = picData} | |
ImageModel:post{url, body = body, callback = function(body, response) | |
-- Blah Blah Blah | |
end} |
This file contains 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
diff --git a/lib/wax_helpers.m b/lib/wax_helpers.m | |
index dee91a9..f0c351d 100644 | |
--- a/lib/wax_helpers.m | |
+++ b/lib/wax_helpers.m | |
@@ -219,7 +219,7 @@ void wax_fromInstance(lua_State *L, id instance) { | |
if ([instance isKindOfClass:[NSString class]]) { | |
lua_pushstring(L, [(NSString *)instance UTF8String]); | |
} | |
- else if ([instance isKindOfClass:[NSNumber class]]) { | |
+ else if ([instance isKindOfClass:[NSNumber class]] && ![instance isKindOfClass:[NSDecimalNumber class]]) lua_pushnumber(L, [instance doubleValue]); |