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
--[[-- | |
Use this file to specify User preferences. | |
Review [examples](+C:\Users\Sky\Desktop\ZeroBrane-0.39\cfg\user-sample.lua) or check [online documentation](http://studio.zerobrane.com/documentation.html) for details. | |
--]]-- | |
editor.tabwidth = 4 | |
editor.usetabs = true | |
editor.nomousezoom = true | |
-- allow auto-complete of user words |
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
Script.Load( "lua/Class.lua" ) | |
function DPrint( string ) | |
//Shared.Message( string ) | |
end | |
function Class_AddMethod( className, methodName, method ) | |
if _G[className][methodName] and _G[className][methodName] ~= method then | |
return | |
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
function LockConstants() | |
local ks = {} | |
for k,v in pairs( _G ) do | |
if k:sub( 1, 1 ) == 'k' then | |
ks[k] = v | |
_G[k] = nil | |
end | |
end | |
setmetatable( _G, { |
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
-- test.lua | |
-- using the class lib and the introspective base helper method | |
class 'A' | |
function A:test() | |
print "Hi" | |
end | |
class 'B' (A) | |
function B:test() |
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
/* | |
Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
Licensed under the Apache License, Version 2.0 (the "License"). | |
You may not use this file except in compliance with the License. | |
A copy of the License is located at | |
http://aws.amazon.com/apache2.0 | |
or in the "license" file accompanying this file. This file is distributed |
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
class Utility | |
{ | |
public class func _________( ___ ____: String ) -> Decimal? | |
{ | |
let formatter = NumberFormatter() | |
formatter.numberStyle = .currency | |
formatter.locale = Locale(identifier: "en_US") | |
if let number = formatter.number(from:____) | |
{ |
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
/* | |
Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
Licensed under the Apache License, Version 2.0 (the "License"). | |
You may not use this file except in compliance with the License. | |
A copy of the License is located at | |
http://aws.amazon.com/apache2.0 | |
or in the "license" file accompanying this file. This file is distributed |
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
/* | |
Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
Licensed under the Apache License, Version 2.0 (the "License"). | |
You may not use this file except in compliance with the License. | |
A copy of the License is located at | |
http://aws.amazon.com/apache2.0 | |
or in the "license" file accompanying this file. This file is distributed |
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
private func makeRequest( | |
method : String, url : String, | |
query : [String:Any]! = nil, | |
body : [String:Any]! = nil, | |
complete: @escaping DatabaseAsyncCallback | |
) | |
{ | |
let client = WOMAPIGatewayClient.default() |
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
// Define the routes, which we will procedurally load | |
const routes = | |
{ | |
get: // body data not allowed in GET | |
[ | |
{ path: '/', action: 'HelloWorld' }, | |
{ path: '/http', action: 'TestHTTP' }, | |
{ path: '/echo', action: 'EchoRequest' }, | |
] | |
} |
OlderNewer