content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
--These need to be defined here because the global variable doesn't exist when this file is parsed.
local research_size_steps = settings.startup["TS_research_size"].value
local research_speed_steps = settings.startup["TS_research_speed"].value
local baseHP = settings.startup["TS_base_shield"].value
local base_charge = ... | nilq/small-lua-stack | null |
local class = require("heart.class")
local heartMath = require("heart.math")
local heartTable = require("heart.table")
local M = class.newClass()
function M:init(resourceLoaders, config)
self.resourceLoaders = resourceLoaders or {}
config = config or {}
self.emptyConfig = {}
self.domains = {}
self.compone... | nilq/small-lua-stack | null |
require 'apache2'
require 'string'
function handle(r)
r.content_type = "text/plain"
r:info("hello from lua module");
if r.method == 'POST' then
for k, v in pairs( r:parsebody() ) do
r:puts( string.format("%s: %s\n", k, v) )
end
else
return 501
end
return apa... | nilq/small-lua-stack | null |
require 'depparser_rerank'
require 'utils'
require 'dict'
require 'xlua'
require 'dpiornn_gen'
require 'dp_spec'
torch.setnumthreads(1)
if #arg >= 3 then
treebank_path = arg[2]
kbesttreebank_path = arg[3]
output = arg[4]
print('load net')
local net = IORNN:load(arg[1])
-- print(net.Wh:size())
print('create pa... | nilq/small-lua-stack | null |
--[[ Netherstorm -- Sundered Rumbler.lua
This script was written and is protected
by the GPL v2. This script was released
by BlackHer0 of the BLUA Scripting
Project. Please give proper accredidations
when re-releasing or sharing this script
with others in the emulation community.
~~End of License Agreement
-- BlackHe... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Tavnazian Safehold
-- NPC: Resauchamet
-- Standard Info NPC
-----------------------------------
function onTrade(player, npc, trade)
end
function onTrigger(player, npc)
local kill=player:getCharVar("FOMOR_HATE")
local n=0
if (kill< 8) then n=0
elseif (kill... | nilq/small-lua-stack | null |
-- Translation by KiriX
local strings = {
-- LuiExtended.lua
SI_LUIE_ERROR_FONT = "LUI Extended: Возникла проблема с выбором шрифта. Возвращение к настройкам по умолчанию.",
SI_LUIE_ERROR_SOUND = "LUI Extended: Возникла проблема с выбором ... | nilq/small-lua-stack | null |
AddCSLuaFile()
ENT.Type = "anim"
ENT.Base = "zig_printer_base"
ENT.PrintName = "Amethyst Printer"
ENT.Category = "ZigPrint"
ENT.Spawnable = true
ENT.Model = "models/props_c17/consolebox01a.mdl"
ENT.Print = {}
ENT.Print.Max = {}
ENT.Display = {}
ENT.Print.Amount = 120
ENT.Print.Time = 50
ENT.Print.Max.Ink = 10
ENT.Pr... | nilq/small-lua-stack | null |
sptbl["comb"] = {
files = {
module = "comb.c",
header = "comb.h",
example = "ex_comb.c",
},
func = {
create = "ut_comb_create",
destroy = "ut_comb_destroy",
init = "ut_comb_init",
compute = "ut_comb_compute",
},
params = {
mandatory ... | nilq/small-lua-stack | null |
modifier_spectre_special_attack_buff = class({})
function modifier_spectre_special_attack_buff:IsDebuff() return false end
function modifier_spectre_special_attack_buff:IsHidden() return false end
function modifier_spectre_special_attack_buff:IsPurgable() return false end
function modifier_spectre_special_attack_buff... | nilq/small-lua-stack | null |
require("util")
require("process")
json = require("json")
db = {}
util.loadDB("config")
util.loadDB("ignore")
os.execute("mkdir /tmp/lazyvideo >/dev/null 2>&1")
if db["config"]["path"] == nil or db["config"]["path"] == "" then
db["config"]["path"] = "."
util.saveDB("config")
end
--Set variables so we cycle through... | nilq/small-lua-stack | null |
object_mobile_outbreak_undead_civilian_07 = object_mobile_shared_outbreak_undead_civilian_07:new {
}
ObjectTemplates:addTemplate(object_mobile_outbreak_undead_civilian_07, "object/mobile/outbreak_undead_civilian_07.iff")
| nilq/small-lua-stack | null |
local module = {}
module.__index = module
module.New = function(value)
local object = setmetatable({}, module)
object.event = _G.classes["Event"].New()
object.value = value
object.selected = value or ""
object.gui = Instance.new("Frame")
object.gui.Size = UDim2.new(1, 0, 0, 184)
object.gui.BackgroundColor3 ... | nilq/small-lua-stack | null |
local function local_init()
Asset.reset_system(Prefab_Asset.type)
Entity.reset_system()
Asset.add(Lua_Asset.type, "assets/scripts/- scene - physics test anew.lua")
global_init_physics_test_anew()
-- Asset.add(Lua_Asset.type, "assets/scripts/- scene - physics test.lua")
-- global_init_physics_test()
-- Asse... | nilq/small-lua-stack | null |
-- Imports / module wrapper
local Pkg = {}
local std = _G
local error = error
local print = print
local type = type
local tostring = tostring
local getmetatable = getmetatable
local setmetatable = setmetatable
local pairs = pairs
local ipairs = ipairs
local string = string
local table = table
local util = require("util... | nilq/small-lua-stack | null |
slot0 = class("ShinanoframePage", import("...base.BaseActivityPage"))
slot0.OnInit = function (slot0)
slot0.bg = slot0:findTF("AD")
slot0.goBtn = slot0:findTF("GoBtn", slot0.bg)
slot0.getBtn = slot0:findTF("GetBtn", slot0.bg)
slot0.gotBtn = slot0:findTF("GotBtn", slot0.bg)
slot0.switchBtn = slot0:findTF("SwitchBt... | nilq/small-lua-stack | null |
--[[**********************************
*
* Multi Theft Auto - Admin Panel
*
* admin_session.lua
*
* Original File by lil_Toady
*
**************************************]]
local aSessions = {}
addCommandHandler ( "adminpanel", function ( player )
if ( hasObjectPermissionTo ( player, "general.adminpanel" ) ) then
tri... | nilq/small-lua-stack | null |
local is_array = require "api-umbrella.utils.is_array"
-- Determine if the table is hash-like (not an array).
return function(obj)
if type(obj) ~= "table" then return false end
if is_array(obj) then return false end
return true
end
| nilq/small-lua-stack | null |
require("lib.batteries"):export()
Object = require("lib.classic")
Gamestate = require("lib.hump.gamestate")
local bump = require("lib.bump")
local spritely = require("mod.spritely")
local const = require("mod.constants")
local overworldState = require("mod.states.overworld")
local Player = require("mod.player")
local ... | nilq/small-lua-stack | null |
--Hello! My name is "Helpful comment", Im Here to help you to use this source to build your ver own bot!
--Everytime you seeing a "--" and in front a text, thats me helping you!
local discordia = require "discordia"-- We need require the Discordia Lib to use this bot
local client = discordia.Client() -- Also load the ... | nilq/small-lua-stack | null |
fx_version 'adamant'
game 'gta5'
author 'Chef#6502'
description 'Chef Menu F3'
version '1.0'
client_scripts {
"@es_extended/locale.lua",
'dependencies/menu.lua',
'cl_shop.lua'
}
server_scripts {
'@mysql-async/lib/MySQL.lua',
"@es_extended/locale.lua",
'sv_shop.lua'
}
| nilq/small-lua-stack | null |
--- LuaRocks-specific path handling functions.
-- All paths are configured in this module, making it a single
-- point where the layout of the local installation is defined in LuaRocks.
--module("luarocks.path", package.seeall)
local path = {}
local dir = require("luarocks.dir")
local cfg = require("luarocks.cfg")
lo... | nilq/small-lua-stack | null |
require "AudioEngine"
local EFFECT_FILE = "effect1.wav"
local MUSIC_FILE = "background.mp3"
local LINE_SPACE = 40
local function CocosDenshionTest()
local ret = CCLayer:create()
local m_pItmeMenu = nil
local m_tBeginPos = ccp(0, 0)
local m_nSoundId = 0
local testItems = {
"play backgrou... | nilq/small-lua-stack | null |
return {
["entreating"] = "entreat",
["foundering"] = "founder",
["fingers"] = "finger",
["gingers"] = "ginger",
["annihilates"] = "annihilate",
["disports"] = "disport",
["perceiving"] = "perceive",
["destabilized"] = "destabilize",
["indulged"] = "indulge",
["enslave"] = "enslave",
["consoling"] = "console",
["feathe... | nilq/small-lua-stack | null |
function onCreate()
debugPrint('Please disable "Flashing Effects" and "Camera Effects" in options if you are at risk of seizures')
debugPrint('This song contains "Flashing Lights" and "Camera Shake".')
debugPrint('Epilepsy / Photosensitivity Warning:')
precacheImage('white')
end
function goodNoteHit(id, directi... | nilq/small-lua-stack | null |
wRightClick = nil
bAddAsFriend, bFrisk, bRestrain, bCloseMenu, bInformation, bBlindfold, bStabilize = nil
sent = false
ax, ay = nil
player = nil
gotClick = false
closing = false
description = nil
age = nil
weight = nil
height = nil
race = nil
function clickPlayer(button, state, absX, absY, wx, wy, wz, ele... | nilq/small-lua-stack | null |
-- commands for modifying the world
local t = {}
function t:pause()
if ammo.world then ammo.world.active = not ammo.world.active end
end
function t:hide()
if ammo.world then ammo.world.visible = not ammo.world.visible end
end
function t:step(steps)
if not ammo.world then return end
steps = steps and tonumber... | nilq/small-lua-stack | null |
-- 인젝터
local Util = require('modules.util')
local Table_to_str = require('modules.table_to_str')
local Injector = {}
local get_handlers = function(event_list)
local r = {}
for k, v in pairs(event_list) do
r[k] = script.get_event_handler(v)
if not r[k] then r[k] = true end
end
return r
end
local set_... | nilq/small-lua-stack | null |
local radio = {}
function radio.inherit(id, x, y, strength)
local self = {
id = id,
x = x,
y = y,
strength = strength
}
-- im not exactly sure what i want to do with radios, if i use them at all...
function self:update(dt)
end
function self:draw()
end
return self
end
return radio
| nilq/small-lua-stack | null |
local awful = require("awful")
local wibox = require("wibox")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local menubar = require("menubar")
local naughty = require("naughty")
local util = require("widget.util")
local gears = require("gears")
naughty.connect_signal("request::icon",... | nilq/small-lua-stack | null |
object_tangible_container_loot_socket_retrofit_tool = object_tangible_container_loot_shared_socket_retrofit_tool:new {
}
ObjectTemplates:addTemplate(object_tangible_container_loot_socket_retrofit_tool, "object/tangible/container/loot/socket_retrofit_tool.iff")
| nilq/small-lua-stack | null |
object_draft_schematic_dance_prop_prop_2011_flowers_s02_l = object_draft_schematic_dance_prop_shared_prop_2011_flowers_s02_l:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_dance_prop_prop_2011_flowers_s02_l, "object/draft_schematic/dance_prop/prop_2011_flowers_s02_l.iff")
| nilq/small-lua-stack | null |
local String
do
local _class_0
local _base_0 = {
startsWith = function(value, prefix)
return value:sub(1, #prefix) == prefix
end,
ends_with = function(value, suffix)
return value:sub(#value + 1 - #suffix) == suffix
end,
split = function(value, sep)
local _accum_0 = { }
lo... | nilq/small-lua-stack | null |
local locations = {
{ -2078.4, 1419.06, 7.31 },
{ -1975.6, 1227.14, 31.83 },
{ -2285.64, -12.7, 35.53 },
{ -2147.59, -139.86, 36.73 },
{ -2035.11, -43.72, 35.65 },
{ -2120.84, -4.27, 35.53 },
{ -2053.64, 82.59, 28.6 },
{ -1917.56, 82.59, 28.6 },
{ -1481, 686.4, 1.32 },
{ 2090.35, -1552.9, 13.31 },
{ 2343.57,... | nilq/small-lua-stack | null |
--[[
* ***********************************************************************************************************************
* Copyright (c) 2015 OwlGaming Community - All Rights Reserved
* All rights reserved. This program and the accompanying materials are private property belongs to OwlGaming Community
* Unauthori... | nilq/small-lua-stack | null |
--init.lua
function abortInit()
-- initailize abort boolean flag
abort = false
print("Press ENTER to abort startup")
-- if is pressed, call abortTest
uart.on("data",'\r', abortTest, 0)
-- start timer to execute startup function in 5 seconds
tmr.alarm(0,6000,0,startup)
end
function abortTest(data)
-- us... | nilq/small-lua-stack | null |
local activeTouches = {}
local touchBaseId = 4
function sendInput( ev, id, x,y,z )
-- local tid = activeTouches[ id ]
-- if not tid then
-- tid = 1
-- activeTouches[ ]
-- if ev == 'ts' then
-- end
--TODO: use a simplified touch ID
if ev == 'ts' then
mock._sendTouchEvent( 'down', id, x,y )
elseif ev == '... | nilq/small-lua-stack | null |
local tree = QuadTree.new({
center = vector3(4000.0,4000.0,30.0),
size = vector3(8000.0,8000.0,8000.0)
}, 10)
for i=1,10000 do
local x = math.random(0,8000)
local y = math.random(0,8000)
local z = math.random(0,8000)
tree:insert_point(vector3(x,y,z))
end
print(tree)
print(tree.topleft)
prin... | nilq/small-lua-stack | null |
local minigame = {}
local bump = require "libs.bump.bump"
local crt = lg.newShader("shaders/crt.glsl")
local walls = lg.newCanvas(2480, 2016)
local scanlines = lg.newCanvas(1000, 675)
local ground = nil
local crtscreen = nil
local directions = nil
local sprites = nil
local sounds = nil
local world = nil
local map = n... | nilq/small-lua-stack | null |
--[[
PersistentData = {} 持久化数据
文件内global函数是可供外部调用的
参数是个table,外部传入json串经过底层转换成table
返回参数需要是一个table,底层会把它转成json串传给外部应用,注意返回table里只能包含数字、字符串和bool值。
]]
local function check_address(addr)
return type(addr) == "string" and addr ~= ""
end
--be called by system when contract register.
function init()
... | nilq/small-lua-stack | null |
local DOF_ENABLED = CreateConVar("tv_dof", "1", bit.bor( FCVAR_ARCHIVE ))
-- NOTE: DOF SYSTEM NEEDS TO BE REWORKED:
-- BLUR-LEVEL CHANGES WHEN QUALITY IS TWEAKED.
local QUALITY = 1.0
local function SourceUnit2Inches( x )
return x * 0.75
end
local function Inches2SourceUnits( x )
return x / 0.75
end
local DOF_L... | nilq/small-lua-stack | null |
object_tangible_tcg_series7_garage_display_vehicles_pod_racer_balta_podracer = object_tangible_tcg_series7_garage_display_vehicles_shared_pod_racer_balta_podracer:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series7_garage_display_vehicles_pod_racer_balta_podracer, "object/tangible/tcg/series7/garage_displ... | nilq/small-lua-stack | null |
-- Nodes that would affect the local temperature e.g. fans, heater, A/C
local S = minetest.get_translator("homedecor_climate_control")
homedecor.register("air_conditioner", {
description = S("Air Conditioner"),
mesh = "homedecor_ac.obj",
tiles = {
"homedecor_ac.png",
"default_glass.png"
},
groups = { snappy ... | nilq/small-lua-stack | null |
AddCSLuaFile()
AddCSLuaFile("sh_sounds.lua")
include("sh_sounds.lua")
if CLIENT then
SWEP.DrawCrosshair = false
SWEP.PrintName = "Sako RK 95"
SWEP.CSMuzzleFlashes = true
SWEP.IronsightPos = Vector(-2.990, -1.423, 0.43)
SWEP.IronsightAng = Vector(0, 0, 0)
SWEP.AimpointPos = Vector(-2.990, -1.423, -0.49)
SWEP... | nilq/small-lua-stack | null |
sabolIntel = {
itemTemplates = { "object/tangible/loot/dungeon/corellian_corvette/imperial_assassin_filler01.iff", "object/tangible/loot/dungeon/corellian_corvette/imperial_assassin_filler02.iff", "object/tangible/loot/dungeon/corellian_corvette/imperial_assassin_intel.iff" },
}
sabolTicketInfo = { depPlanet = "tatoo... | nilq/small-lua-stack | null |
-- Configuration file for the AVR32 microcontrollers
specific_files = "crt0.s trampoline.s platform.c exception.s intc.c pm.c flashc.c pm_conf_clocks.c usart.c gpio.c tc.c spi.c platform_int.c adc.c pwm.c i2c.c ethernet.c lcd.c rtc.c usb-cdc.c"
addm( "FORAVR32" )
-- See board.h for possible BOARD values.
if comp.boar... | nilq/small-lua-stack | null |
local getUUID = require('uuid4').getUUID
return function (db, registry)
local alias = registry.alias
local register = registry.register
local Optional = registry.Optional
local String = registry.String
local Int = registry.Int
local Bool = registry.Bool
local Array = registry.Array
local Uuid = registr... | nilq/small-lua-stack | null |
--[[
References:
https://bitbucket.org/wilhelmy/lua-bencode/src
public domain lua-module for handling bittorrent-bencoded data.
This module includes both a recursive decoder and a recursive encoder.
--]]
local floor = math.floor
local sort, concat = table.sort, table.concat
local pairs, ipairs, type = pairs, ipa... | nilq/small-lua-stack | null |
local M, module = {}, ...
_G[module] = M
function M.run()
-- make this a volatile module:
package.loaded[module] = nil
print("Running component graphics_test...")
--ucg.setMaxClipRange()
disp:setColor(0, 0, 40, 80)
disp:setColor(1, 80, 0, 40)
disp:setColor(2, 255, 0, 255)
disp:setColo... | nilq/small-lua-stack | null |
--=========== Copyright © 2018, Planimeter, All rights reserved. ===========--
--
-- Purpose: Main Menu class
--
--==========================================================================--
require( "engine.shared.hook" )
require( "game.client.gui.mainmenu.closebutton" )
require( "game.client.gui.mainmenu.button" )
... | nilq/small-lua-stack | null |
env2 = {["abc"]=1234, age=25}
print("hi, this is test get global table case\n") | nilq/small-lua-stack | null |
-- Code from http://lua-users.org/wiki/SimpleLuaClasses
function class(base, init)
local c = {} -- a new class instance
if not init and type(base) == 'function' then
init = base
base = nil
end
-- the class will be the metatable for all its objects,
-- and they will look up their m... | nilq/small-lua-stack | null |
local PANEL = {}
AccessorFunc(PANEL, "m_iOverlap", "Overlap")
function PANEL:Init()
self.Panels = {}
self.OffsetX = 0
self.FrameTime = 0
self.pnlCanvas = vgui.Create("Panel", self)
self:SetOverlap(2)
self.btnLeft = vgui.Create("DSysButton", self)
self.btnLeft:SetType("up")
self.btnRight = vgui.Crea... | nilq/small-lua-stack | null |
return {
{
effect_list = {
{
type = "BattleBuffAddAttrRatio",
trigger = {
"onAttach",
"onStack"
},
arg_list = {
attr = "attackRating",
number = 50
}
}
}
},
{
effect_list = {
{
type = "BattleBuffAddAttrRatio",
trigger = {
"onAttach",
"onStack"
... | nilq/small-lua-stack | null |
function DropMoney(int, pos)
if (int <= 0) then return end
local e = ents.Create("bw_money")
e:SetPos(pos)
e:SetMoney(int)
e:Spawn()
e:Activate()
end | nilq/small-lua-stack | null |
-- Compe setup
require('compe').setup {
preselect = 'always';
source = {
path = true,
nvim_lsp = true,
luasnip = true,
buffer = false,
calc = false,
nvim_lua = false,
vsnip = false,
ultisnips = false,
},
}
| nilq/small-lua-stack | null |
return {'numToStr/Comment.nvim', opt = true,
keys = {
'<leader>/',
'gcc',
'gcb',
'gco',
'gcO',
'gcA',
},
wants = {
'treesitter-comment-string'
},
config = function ()
require('plugins.comment.config')
require('plugins.comment.keys').setup()
end
}... | nilq/small-lua-stack | null |
local Anim8 = require('lib/anim8')
local Class = require('lib/middleclass')
local Utils = require('utils')
local SndMgr = require('lib/sndmgr')
local Entity = require('entities/base')
local Player = Class('Player', Entity)
Player.static.pxSize = 16
Player.static.moveSpeed = 16*4
Player.static.shrink ... | nilq/small-lua-stack | null |
local mod = DBM:NewMod("BrawlRank2", "DBM-Brawlers")
local L = mod:GetLocalizedStrings()
mod:SetRevision(("$Revision: 14030 $"):sub(12, -3))
mod:SetModelID(46712)
mod:SetZone()
mod:RegisterEvents(
"SPELL_CAST_START 133308 135234",
"SPELL_CAST_SUCCESS 133227 132670",
"UNIT_DIED"
)
local warnSummonTwi... | nilq/small-lua-stack | null |
object_tangible_quest_naboo_theed_darkwalker_network_terminal = object_tangible_quest_shared_naboo_theed_darkwalker_network_terminal:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_naboo_theed_darkwalker_network_terminal, "object/tangible/quest/naboo_theed_darkwalker_network_terminal.iff")
| nilq/small-lua-stack | null |
TCP = TCP or {}
-- This whole thing was written by Andy Sloane, a1k0n, one of the Vendetta
-- Online developers over at Guild Software
-- http://a1k0n.net/vendetta/lua/tcpstuff/
-- http://www.guildsoftware.com/company.html
local function SetupLineInputHandlers(conn, conn_handler, line_handler, disconn_handler)... | nilq/small-lua-stack | null |
paths.dofile('layers/Residual.lua')
paths.dofile('layers/ResidualPool.lua')
paths.dofile('layers/AttentionPartsCRF.lua')
local function repResidual(num, inp, nRep)
local out={}
for i=1,nRep do
local tmpout
if i==1 then
tmpout = Residual(num, num)(inp)
else
tmpout... | nilq/small-lua-stack | null |
home = "/Users/mvshmakov"
remote_host = "pi@mvshmakov-pi.local"
settings {
logfile = home.."/.local/share/lsyncd/lsyncd.log", --Log path
statusFile = home.."/.local/state/lsyncd/lsyncd.status", --Status file
pidfile = home.."/.local/state/lsyncd/lsyncd.pid", --pid File path
nodaemo... | nilq/small-lua-stack | null |
local skynet = require "skynet"
local land = {}
skynet.start(function()
skynet.error("启动大陆管理服务")
skynet.dispatch("lua", function(session, address, cmd, ...)
skynet.error("大陆管理服务收到" .. cmd .. "指令")
end)
end) | nilq/small-lua-stack | null |
local keys = {}
keys.ar = {}
keys.das = {} -- number if delay completed, nil otherwise
function keys:update(dt)
for k, t in pairs(self.ar) do
local das, arr = 1000, 100
local type = state.autorepeat[k]
if type == "sd" then
t = t + game.conf.sdarr
while t >= 1 do
state:onkey(k, true)
t = t - 1
... | nilq/small-lua-stack | null |
return {'aldaar','aldehyde','aldoor','aldoordringend','aldra','aldus','aldert','aldo','alders','aldenhoven','aldenzee','alderden','aldewereld','aldenkamp','aldoordringende','alderts','aldos'} | nilq/small-lua-stack | null |
-- Static 3D scene example.
-- This sample demonstrates:
-- - Creating a 3D scene with static content
-- - Displaying the scene using the Renderer subsystem
-- - Handling keyboard and mouse input_system to move a freelook camera
require "LuaScripts/Utilities/Sample"
local attack_emitter_
local attack_effe... | nilq/small-lua-stack | null |
-----------------------
--[[ Organization : Insanity ]]--
--[[ Name : Ender (Thou who collects the souls of innocents) ]]--
--[[ Creator / Captain : DATA RESTRICTED ]]--
-------------------------------------------------------
--A script By makhail07
--Discord Creterisk#2958
--This script is a fucking mistake have fun... | nilq/small-lua-stack | null |
local tablex = require "pl.tablex"
local ngx_ssl = require "ngx.ssl"
local gkong = kong
local _M = {}
local EMPTY = tablex.readonly({})
function _M.serialize(ngx, kong)
local ctx = ngx.ctx
local var = ngx.var
local req = ngx.req
if not kong then
kong = gkong
end
local authenticated_entity
if ctx.... | nilq/small-lua-stack | null |
StoreProtocol = {}
-- PUBLIC ENUMS
StoreProtocol.OfferTypes = {
OFFER_TYPE_NONE = 0, -- (this will disable offer)
OFFER_TYPE_ITEM = 1,
OFFER_TYPE_STACKABLE = 2,
OFFER_TYPE_OUTFIT = 3,
OFFER_TYPE_OUTFIT_ADDON = 4,
OFFER_TYPE_MOUNT = 5,
OFFER_TYPE_NAMECHANGE = 6,
OFFER_TYPE_SEXCHANGE = 7,
OFFER_TYPE_P... | nilq/small-lua-stack | null |
-- https://github.com/Hammerspoon/Spoons/
CONFIG_KEY_RELOAD = {{"cmd", "alt", "ctrl"}, "R"}
hs.hotkey.alertDuration = 0
hs.hints.showTitleThresh = 5
hs.window.animationDuration = 0
hs.loadSpoon("ModalMgr")
hs.loadSpoon("WinWin")
hs.alert.show("Config loaded")
hs.hotkey.bind(CONFIG_KEY_RELOAD[1], CONFIG_KEY_RELO... | nilq/small-lua-stack | null |
--[[
module:MementoTest
author:DylanYang
time:2021-02-18 01:46:09
]]
local Originator = require("patterns.behavioral.memento.Originator")
local super = require("patterns.BaseTest")
local _M = Class("MementoTest", super)
function _M.protected:DoExecTest()
--“状态”,可以用于快速恢复;Memento序列,可以支持“连续恢复Undo”和“连续撤销恢... | nilq/small-lua-stack | null |
require("chttp")
local tempAvatars = tempAvatars or {}
local function onFailure(message)
print("-------------\nSEND failure\n-------------\n"..message)
end
function sendMsgToDiscord( body )
CHTTP( { failed = onFailure, succes = nil, method = "POST", url = GM_IRC.WebhookAdress, body = body, type = "application/jso... | nilq/small-lua-stack | null |
-- scaffolding entry point for bgfx
return dofile("bgfx.lua")
| nilq/small-lua-stack | null |
-- This is Foo.lua | nilq/small-lua-stack | null |
--[[
Copyright (C) 2013-2018 Draios Inc dba Sysdig.
This file is part of sysdig.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by ... | nilq/small-lua-stack | null |
-- BRK Simulate IRQ, Implied, 1 Byte, 7 Cycles
local mem = require(script.Parent.Parent.Memory)
local statusRegisters = require(script.Parent.Parent.Registers)
local internal = require(script.Parent.Parent.Internal)
local opVar = require(script.Parent.Parent.Util.OperatorVariations)
return function()
opVar.Break... | nilq/small-lua-stack | null |
ottomanic:stop( "Auto Import Stop" )
return true | nilq/small-lua-stack | null |
--[[
@Author: Ermano Arruda (exa371 at bham dot ac dot uk), June 2016
An implementation of ReplayMemory for the DQN algorithm proposed by Mnih et al
https://www.cs.toronto.edu/%7Evmnih/docs/dqn.pdf
]]
require 'torch'
local ReplayMemory = torch.class("ReplayMemory")
function ReplayMemory:__init(args)
self.max... | nilq/small-lua-stack | null |
function editVehicle(thePlayer, commandName)
if exports.mrp_integration:isPlayerVehicleConsultant(thePlayer) or exports.mrp_integration:isPlayerSeniorAdmin(thePlayer) or exports.mrp_integration:isPlayerVCTMember(thePlayer) then
local theVehicle = getPedOccupiedVehicle(thePlayer) or false
if not theVehicle then
... | nilq/small-lua-stack | null |
local ffi = require("ffi")
--local libmongoc = ffi.load(ffi.os == "OSX" and "libmongoc-1.0.dylib" or "libmongoc-1.0.so")
local ffi_load = require("mongoc.ffi_load").load
local libmongoc = ffi_load("libmongoc-1.0")
local libbson = require "mongoc.libbson-wrap"
--from...
ffi.cdef[[
typedef struct _mongoc_ind... | nilq/small-lua-stack | null |
function momoIRTweak.finalFixes.TieredRecipes()
--using
local AddIng = momoIRTweak.recipe.AddOrUpdateIngredient
local ITEM = momoIRTweak.FastItem
local SCI = momoIRTweak.FastSciencePack
local Rem = momoIRTweak.recipe.RemoveIngredient
local machine = momoIRTweak.machine
-- for some reason this need to direct ... | nilq/small-lua-stack | null |
ghost_vortex_oaa = class(AbilityBaseClass)
LinkLuaModifier("modifier_vortex_oaa_thinker", "abilities/neutrals/oaa_ghost_vortex.lua", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_vortex_oaa_debuff", "abilities/neutrals/oaa_ghost_vortex.lua", LUA_MODIFIER_MOTION_NONE)
function ghost_vortex_oaa:GetAOERadius()
r... | nilq/small-lua-stack | null |
local _, ADDONSELF = ...
local L = ADDONSELF.L
local RegEvent = ADDONSELF.regevent
local RegAddonLoaded = ADDONSELF.regaddonloaded
local RegisterKeyChangedCallback = ADDONSELF.RegisterKeyChangedCallback
-- local SCALE = 1.5
-- local function ResizePin()
-- BattlefieldMapFrame.groupMembersDataProvider:Se... | nilq/small-lua-stack | null |
-- table.getn doesn't return sizes on tables that
-- are using a named index on which setn is not updated
local function tablesize(tbl)
local count = 0
for _ in pairs(tbl) do count = count + 1 end
return count
end
function modulo(val, by)
return val - math.floor(val/by)*by;
end
local function GetNearest(xstar... | nilq/small-lua-stack | null |
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel(mrobberycfg.reseller_skin)
self:SetHullType(HULL_HUMAN)
self:SetHullSizeNormal()
self:SetNPCState(NPC_STATE_SCRIPT)
self:SetSolid(SOLID_BBOX)
self:CapabilitiesAdd(CAP_ANIMATEDFAC... | nilq/small-lua-stack | null |
object_tangible_dungeon_mustafar_uplink_trial_beetle_lair = object_tangible_dungeon_mustafar_uplink_trial_shared_beetle_lair:new {
}
ObjectTemplates:addTemplate(object_tangible_dungeon_mustafar_uplink_trial_beetle_lair, "object/tangible/dungeon/mustafar/uplink_trial/beetle_lair.iff")
| nilq/small-lua-stack | null |
local a,t,e
local m, s
local o = require"nixio.fs"
local n = {
"none",
"aes-128-ctr",
"aes-192-ctr",
"aes-256-ctr",
"aes-128-cfb",
"aes-192-cfb",
"aes-256-cfb",
"rc4",
"rc4-md5",
"rc4-md5-6",
"chacha20",
"chacha20-ietf-poly1305",
}
local s = {
"origin",
"verify_deflate",
"auth_sha1_v4",
"auth_aes128_md5",
"auth_aes128... | nilq/small-lua-stack | null |
-- Create a quick test node for the animated texture.
-- minetest.register_node("elegantstorage:controller", {
-- description = "Storage Controller",
-- drawtype = "node",
-- tiles = {
-- {
-- name = "elegantstorage_controller_powered.png",
-- animation = {
-- ... | nilq/small-lua-stack | null |
function StartAttack( event )
local target = event.target
local caster = event.caster
local ability = event.ability
local cooldown = ability:GetCooldown(ability:GetLevel())
if ability:IsCooldownReady() then
caster:PerformAttack(target, true, true, true, true)
ability:StartCooldown(c... | nilq/small-lua-stack | null |
local ffi = require("ffi")
-- gl2.h
local glheader = [[
/*
** Copyright (c) 2013 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, includ... | nilq/small-lua-stack | null |
return function()
local oil = require "oil"
local socket = require "socket.core"
local hostname = socket.dns.gethostname()
local portno = 2089
local ip, dnsinfo = socket.dns.toip(hostname)
assert(hostname == dnsinfo.name)
for index, ip in ipairs(dnsinfo.ip) do
dnsinfo.ip[index] = {host=ip,port=portno}
end
... | nilq/small-lua-stack | null |
local type, ipairs = type, ipairs
local re_match = ngx.re.match
local jwt_verify = require "trochilus.common.util.codec.jwt_lite.verify"
local exports = {}
exports.on_rewrite = function(ngx, ctx)
return nil
end
local verify = function(ngx, ctx)
local headers = ngx.req.get_headers()
local secret_ref, secr... | nilq/small-lua-stack | null |
local t = Def.ActorFrame { };
t[#t+1] = NOTESKIN:LoadActor( Var "Button", "Hold Explosion" ) .. {
HoldingOnCommand=cmd(visible,true);
HoldingOffCommand=cmd(visible,false);
InitCommand=cmd(visible,false;finishtweening;blend,"BlendMode_Add");
Frames = Sprite.LinearFrames(
NOTESKIN:GetMetricF( "GhostArrowDim", "Hold... | nilq/small-lua-stack | null |
vim.cmd([[
let g:netrw_nogx = 1 " disable netrw's gx mapping.
nmap gx <Plug>(openbrowser-smart-search)
vmap gx <Plug>(openbrowser-smart-search)
]])
| nilq/small-lua-stack | null |
local fastRenewalsLayout=
{
name="fastRenewalsLayout",type=0,typeName="View",time=0,report=0,x=0,y=0,width=1280,height=720,visible=1,fillParentWidth=1,fillParentHeight=1,nodeAlign=kAlignTopLeft,
{
name="shadeBg",type=1,typeName="Image",time=31057625,report=0,x=0,y=0,width=0,height=0,visible=1,fillParentWidth=1,fill... | nilq/small-lua-stack | null |
-- scanlines
local M = {}
function M.new()
local instance = display.newGroup()
local function build()
for i = display.screenOriginY, display.actualContentHeight,2 do
local rect = display.newRect(instance, display.contentCenterX, i, display.actualContentWidth * 1.25, 1)
rect:setFillColor(0,0,0,0.5... | nilq/small-lua-stack | null |
-- This is a part of uJIT's testing suite.
-- Copyright (C) 2015-2019 IPONWEB Ltd. See Copyright Notice in COPYRIGHT
--
-- Profiling a tail call
--
local aux = require('aux')
local fname_real = aux.init_and_start_profiling(100)
local function foo()
local sum1 = 1E3
local sum2 = 0
for i = 1, 1E7 do
... | nilq/small-lua-stack | null |
-->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
function HandleModScript(MOD_DEF,Multi_pak,global_integer_to_float)
pv(THIS.."From HandleModScript()")
if Multi_pak == nil then Multi_pak = false end
local file = ""
local FullPathFile = ""
local AtLeastOne_EXML_CHANGE_TABLE = false
loca... | nilq/small-lua-stack | null |
--
-- Created by IntelliJ IDEA.
-- User: Noneatme
-- Date: 29.01.2015
-- Time: 13:40
-- To change this template use File | Settings | File Templates.
--
cConfiguration = inherit(cSingleton)
--[[
]]
-- ///////////////////////////////
-- ///// checkFile //////
-- ///// Returns: void //////
-- ////////////////////... | nilq/small-lua-stack | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.