content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
local dataTypes = {} local function serializedValue(type, value) return { _serialized_type = type, value = value, } end local function parseValueForDeserialization(value) if typeof(value) ~= "table" then return end if not value._serialized_type then return end return value.value end...
nilq/small-lua-stack
null
description=[[ Discovers hosts and routing information from devices running RIPv2 on the LAN. It does so by sending a RIPv2 Request command and collects the responses from all devices responding to the request. ]] --- -- @usage -- nmap --script broadcast-rip-discover -- -- @output -- Pre-scan script results: -- | broa...
nilq/small-lua-stack
null
-- Assumes pwd is same as this script's directory function modifyPlist( options ) local baseName = options.dstFile; local appBundleFile = options.dstDir .. "/" .. baseName .. ".app" print( "modifying plist: " .. appBundleFile .. " using name: " .. baseName ) os.execute( "defaults write "..appBundleFile.."/Contents/...
nilq/small-lua-stack
null
function onCreate() for i = 0, getProperty('unspawnNotes.length')-1 do if getPropertyFromGroup('unspawnNotes', i, 'noteType') == 'Carmen Note' then setPropertyFromGroup('unspawnNotes', i, 'texture', 'Carmen Note'); --Change the note texture if getPropertyFromGroup('unspawnNotes', i, 'mustPress') then setPr...
nilq/small-lua-stack
null
-- note mlh: commented out during migration to endpoint... Load calls will need to support callback if this code is to be reinstated -- local sessions = {} -- local getSteamIdConnectedTimeInSeconds = function(steamId) -- local player = TGNS.GetPlayerMatchingSteamId(steamId) -- local client = TGNS.GetClient(player) ...
nilq/small-lua-stack
null
return {'vtje','vtjes'}
nilq/small-lua-stack
null
function getAny(param, func, size) local retVal = func(resiot_baslice(param.bytes, param.position, param.position + size)) param.position = param.position + size return retVal end function setValue(appeui, deveui, name, value) worked, err = resiot_setnodevalue(appeui, deveui, name, value) if (not...
nilq/small-lua-stack
null
logs = { EXP_MAX = 1e10, EXP_MIN = 1e-10, LOG_ZERO = -1e10, LOG_INF = 1e10 } logs.EXP_LIMIT = math.log(logs.EXP_MAX) function logs.safe_log(x) if x == 0 then return logs.LOG_ZERO elseif x > 0 then return math.log(x) else error("passing a negtive number to the log function.") end end function logs.sa...
nilq/small-lua-stack
null
local outColor = color("#00326B") local lang = "us"; if THEME:GetCurLanguage() == "ja" then lang = "jp"; end; local t = Def.ActorFrame{ LoadActor(lang.."_bg")..{ InitCommand=cmd(Center;); }; } return t;
nilq/small-lua-stack
null
----------------------------------- -- Area: Temenos E T -- Mob: Light Elemental ----------------------------------- local ID = require("scripts/zones/Temenos/IDs") function onMobEngaged(mob, target) local mobID = mob:getID() if mobID == ID.mob.TEMENOS_C_MOB[2]+1 then GetMobByID(ID.mob.TEMENOS_C_MOB[2...
nilq/small-lua-stack
null
-- -- Public domain -- local socket = require("socket") local ssl = require("ssl") local util = require("util") local params = { mode = "server", protocol = "tlsv1", key = "../certs/serverAkey.pem", certificate = "../certs/serverA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_n...
nilq/small-lua-stack
null
--[[ Copyright 2017 wrxck <matthew@matthewhesketh.com> This code is licensed under the MIT. See LICENSE for details. ]] local unicode = {} local mattata = require('mattata') local json = require('dkjson') function unicode:init() unicode.commands = mattata.commands( self.info.username ):comman...
nilq/small-lua-stack
null
local Y = require("yalg.yalg") local SaveRestore = require("src.SaveRestore") local Highscores = require("src.Highscores") local L = require("src.Local") local S = require("src.menu.options.styles") ------------------ -- DELETE SAVES -- ------------------ local DelSaves = Y.Switcher( Y.HDiv( Y.Button(L["...
nilq/small-lua-stack
null
object_tangible_loot_creature_loot_generic_generic_heart = object_tangible_loot_creature_loot_generic_shared_generic_heart:new { } ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_generic_generic_heart, "object/tangible/loot/creature_loot/generic/generic_heart.iff")
nilq/small-lua-stack
null
local PlayerJob = {} local isLoggedIn = false local isInMenu = false local sleep RegisterNetEvent('QBCore:Client:OnPlayerLoaded') AddEventHandler('QBCore:Client:OnPlayerLoaded', function() isLoggedIn = true PlayerJob = QBCore.Functions.GetPlayerData().job end) RegisterNetEvent('QBCore:Client:OnPlayerUnload') ...
nilq/small-lua-stack
null
local asserts = require 'testing.asserts' local test_runner = require 'testing.test_runner' local mnist = require 'datasets.mnist' local tests = {} function tests.mnistTrain() local ds = mnist{} asserts.EQ(60000, ds:getSize()) local image1 = ds:getImage(1) asserts.tablesEQ({28, 28, 3}, image1:shape()) loc...
nilq/small-lua-stack
null
do local cur_volume = 1 function Characters:Tick() if Flux.menu_music then if !system.HasFocus() then Flux.menu_music:SetVolume(0) else Flux.menu_music:SetVolume(cur_volume) end if !IsValid(Flux.intro_panel) then if cur_volume > 0.05 then cur_volume = ...
nilq/small-lua-stack
null
object_mobile_outbreak_undead_civilian_43 = object_mobile_shared_outbreak_undead_civilian_43:new { } ObjectTemplates:addTemplate(object_mobile_outbreak_undead_civilian_43, "object/mobile/outbreak_undead_civilian_43.iff")
nilq/small-lua-stack
null
object_tangible_quest_wave_event_shared_aaa_wave_event_test_object = SharedTangibleObjectTemplate:new { clientTemplateFileName = "object/tangible/quest/wave_event/shared_aaa_wave_event_test_object.iff" } ObjectTemplates:addClientTemplate(object_tangible_quest_wave_event_shared_aaa_wave_event_test_object, "object/tang...
nilq/small-lua-stack
null
local techHandler = LazarusMod:GetModule('techhandler') techHandler:ChangeTechData(kTechId.BabblerEgg, { [kTechDataDisplayName] = "BABBLER_EGG", [kTechDataTooltipInfo] = "BABBLER_EGG_TOOLTIP", })
nilq/small-lua-stack
null
if SERVER and game.SinglePlayer() then util.AddNetworkString("arccw_sp_reloadlangs") end ArcCW.LangTable = ArcCW.LangTable or {} -- Converts raw string to a lang phrase. not case sensitive. ArcCW.StringToLang = { -- Class ["pistol"] = "class.pistol", ["revolver"] = "class.revolver", ["machine pisto...
nilq/small-lua-stack
null
-- Run exactly once, at the beginning of a program require('lfs') require('cutorch') require('nn') require('cunn') require('cudnn') require('xlua') require('optim') require('image') require('nngraph') require('strict')
nilq/small-lua-stack
null
function main() ret = nil num = m.getvar("tx.test"); if num == nil then m.log(9, "Don't know what to say about this so called number."); return ret end num = tonumber(num) if num > 1 then m.log(9, "Number is bigger than one."); ret = "Whee :)" else m...
nilq/small-lua-stack
null
object_draft_schematic_space_reactor_collection_reward_reactor_02_mk2 = object_draft_schematic_space_reactor_shared_collection_reward_reactor_02_mk2:new { } ObjectTemplates:addTemplate(object_draft_schematic_space_reactor_collection_reward_reactor_02_mk2, "object/draft_schematic/space/reactor/collection_reward_reacto...
nilq/small-lua-stack
null
local tArgs = { ... } if #tArgs > 2 then local programName = arg[0] or fs.getName(shell.getRunningProgram()) print("Usage: " .. programName .. " <alias> <program>") return end local sAlias = tArgs[1] local sProgram = tArgs[2] if sAlias and sProgram then -- Set alias shell.setAlias(sAlias, sProgram...
nilq/small-lua-stack
null
--[[ The Context object implements a write-once key-value store. It also allows for a new Context object to inherit the entries from an existing one. ]] local Context = {} function Context.new(parent) local meta = {} local index = {} meta.__index = index if parent then for key, value in pairs(getmetatable(par...
nilq/small-lua-stack
null
wifi_mode = 1 wifi_ssid = "YOUR_WIFI_SSID_HERE" wifi_pass = "YOUR_WIFI_PASSWORD_HERE" mqtt_ip = "YOUR_THINGSBOARD_HOST_OR_IP_HERE" mqtt_port = 1883 access_token = "DHT11_DEMO_TOKEN"
nilq/small-lua-stack
null
--This is a comment :eyes: local module = {} function module.init(Modules) -- This function is called after all modules have been required -- Modules is a table of all of the modules, indexed by name only -- ex. module at GUI.ItemPreview.Frame.Preview is Modules.Preview -- TWO MODULES CANNOT HAVE THE SAME NAME! ...
nilq/small-lua-stack
null
local an, ns = ... local _G = getfenv(0) -- Things local wwtc = {} local charClassID, charData, charName, guildName, playedLevel, playedLevelUpdated, playedTotal, playedTotalUpdated, regionName local hookedCollections, loggingOut = false, false, false local bankOpen, crafterOpen, guildBankOpen, reagentBankUpdated = ...
nilq/small-lua-stack
null
local ck = require('resty.cookie') local cookie_store = ngx.shared[ngx.var.COOKIE_STORE] local cookie_name = "NGXCAS" function first_access() -- CAS_URI and CAS_SERVICEREG are both trusted return ngx.redirect( ngx.var.CAS_URI .. "/login?service=" .. ngx.var.CAS_SERVICEREG, ngx.HTTP_MOVED_TEMPORARILY) end ...
nilq/small-lua-stack
null
local MIN_LEVEL = 44 LevelUpEnemyState = State:new() function LevelUpEnemyState:needToRun(game_context, bot_context) -- must be in battle if not game_context.battle.is_in_battle then return false end local character_has_lvlup = false for character_index = 0,2 do local character = game_context.cha...
nilq/small-lua-stack
null
function model.getAvailableCameras() local l=sim.getObjectsInTree(sim.handle_scene,sim.handle_all,0) local retL={} for i=1,#l,1 do local data=sim.readCustomDataBlock(l[i],simBWF.modelTags.RAGNARCAMERA) if data then retL[#retL+1]={simBWF.getObjectAltName(l[i]),l[i]} end ...
nilq/small-lua-stack
null
#!/usr/bin/env tarantool local set = require "set" set.config{ memtx_dir = "files", vinyl_dir = "files", wal_dir = "logs" } set.server{ host = "127.0.0.1", port = 8080, modules = { "example" } }
nilq/small-lua-stack
null
deathWatchRescueScientistConvoTemplate = ConvoTemplate:new { initialScreen = "", templateType = "Lua", luaClassHandler = "deathWatchRescueScientistConvoHandler", screens = {} } thanks1 = ConvoScreen:new { id = "thanks1", leftDialog = "@conversation/death_watch_rescue_scientist:s_d3b5ac87", -- Ah! I'm so glad you...
nilq/small-lua-stack
null
local mod = get_mod("rwaon_talents") ------------------------------------------------------------------------------ -- Double Duration Burn Dots DoubleBurnDotLookup = { sienna_adept_ability_trail = "sienna_adept_ability_trail_double", burning_dot = "burning_dot_double", burning_1W_dot = "burning_1W_dot_double", b...
nilq/small-lua-stack
null
--[[ A HashVocabulary object. Initialized from a file with one HashVocabulary token per line. Maps between HashVocabulary tokens and indices. If an UNK token is defined in the HashVocabulary, returns the index to this token if queried for an out-of-HashVocabulary token. --]] local HashVocab = torch.class('datasets.H...
nilq/small-lua-stack
null
--------------------------------------------------------------------------------------------------- -- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0216-widget-support.md -- -- Description:Check SDL rejects request with "INVALID_ID" result code if app tries to delete Main window -- -...
nilq/small-lua-stack
null
class 'Overseer' function Overseer:__init( ... ) -- The Overseer is a helper class, an entity makes a request to the Overseer to get information -- from a clients game, line of sight is the only request at the moment. -- The Overseer takes that request, finds a player that's in the area relevant to the request -- ...
nilq/small-lua-stack
null
--- Core index module. -- Modules -- local af = require("arrayfire_lib") -- Forward declarations -- -- Exports -- local M = {} -- See also: https://github.com/arrayfire/arrayfire/blob/devel/src/api/cpp/index.cpp -- function M.Add (array_module) -- Import these here since the array module is not yet registered. --...
nilq/small-lua-stack
null
object_mobile_halloween_skeleton_1 = object_mobile_shared_halloween_skeleton_1:new { } ObjectTemplates:addTemplate(object_mobile_halloween_skeleton_1, "object/mobile/halloween_skeleton_1.iff")
nilq/small-lua-stack
null
project "Light Engine" kind "StaticLib" staticruntime "on" cppdialect "C++17" language "C++" targetdir (TargetDir) objdir (ObjectDir) defines "_CRT_SECURE_NO_WARNINGS" files "%{prj.location}/**.**" excludes "%{prj.location}/**.vcxproj**" pchheader "ltpch.h" pchsource "sr...
nilq/small-lua-stack
null
local Dta = select(2, ...) --[[ shopping list structure: list = { <type> = { name = <item name> amount = <required number>, -- only ater ScanInventory(): stock = <total available>, shelf = { <id> = <stack size>, ... } }, ... } ]] -- compile a list of inventory items available for reque...
nilq/small-lua-stack
null
require 'nn' require 'cltorch' nn.Threshold.baseUpdateOutput = nn.Threshold.updateOutput nn.Threshold.baseUpdateGradInput = nn.Threshold.updateGradInput local function floatToString(val) local valstring = tostring(val) if valstring:find('%.') or valstring:find('e') then valstring = valstring .. 'f' end...
nilq/small-lua-stack
null
TweakDataHelper = TweakDataHelper or {} local tdh = TweakDataHelper tdh._storage = {} tdh._overwrite_storage = {} tdh._callbacks = {} function tdh:ModifyTweak(data, ...) local dest_tbl = tweak_data or self._storage local path = {...} local key = table.remove(path) for _, k in pairs(path) do de...
nilq/small-lua-stack
null
local Roact = require(game:GetService("ReplicatedStorage").Roact) local Settings = require(script.Parent.Parent.Parent.Parent:WaitForChild("Settings")) local BlipController = require(script.Parent.Parent.BlipController) local ToolTip = require(script.Parent.ToolTip) local TagController = require(script.Parent.Parent.Pa...
nilq/small-lua-stack
null
function EFFECT:Init( effectdata ) self.pos = effectdata:GetOrigin()+Vector(0,0,100) self.Entity:SetPos(self.pos) self.em = ParticleEmitter(self.pos) self.Die = CurTime()+0.1 end function EFFECT:Think() for i=1,3 do local x = math.random(-2,2)*10 local y = math.random(-2,2)*10 local part = self.em:A...
nilq/small-lua-stack
null
love.filesystem.load('libs/utils.lua')() utils=new_utils() love.filesystem.load('libs/acid.lua')() acid=new_acid() acid.update=utils.set_timer(acid.update,1/60) love.filesystem.load('libs/object_utils.lua')() o_utils=new_object_utils() love.filesystem.load('libs/cellAM.lua')() cellam1=new_cellAM(80,60) c...
nilq/small-lua-stack
null
sptbl["delay"] = { files = { module = "delay.c", header = "delay.h", example = "ex_delay.c", }, func = { create = "ut_delay_create", destroy = "ut_delay_destroy", init = "ut_delay_init", compute = "ut_delay_compute", }, params = { ma...
nilq/small-lua-stack
null
--[[ MyGame.Example.TestSimpleTableWithEnum Automatically generated by the FlatBuffers compiler, do not modify. Or modify. I'm a message, not a cop. flatc version: 2.0.6 Declared by : //monster_test.fbs Rooting type : MyGame.Example.Monster (//monster_test.fbs) --]] local flatbuffers = require('flatbuff...
nilq/small-lua-stack
null
require('plenary.reload').reload_module('telescope') local tester = require('telescope.pickers._test') describe('scrolling strategies', function() it('should handle cycling for full list', function() tester.run_file [[find_files__scrolling_descending_cycle]] end) end)
nilq/small-lua-stack
null
object_tangible_loot_mustafar_cube_loot_cube_loot_1k = object_tangible_loot_mustafar_cube_loot_shared_cube_loot_1k:new { } ObjectTemplates:addTemplate(object_tangible_loot_mustafar_cube_loot_cube_loot_1k, "object/tangible/loot/mustafar/cube/loot/cube_loot_1k.iff")
nilq/small-lua-stack
null
local Elements = { -----------[[ ADMINS ]]----------------- Ranks = { ["Owner"] = {"brandonisabillionare", "Player1"}; -- All commands, full power, stops admin, and other ownery things ["Admin"] = {"FoodForDays345"}; -- Most commands, can kick, ban, crash, and has power in servers ["Member"] = {"Friend", "Other...
nilq/small-lua-stack
null
--[[ Copyright 2021 Manticore Games, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
nilq/small-lua-stack
null
local default_settings = { fileencoding = "utf-8", -- Incremental live completion, default on `master` inccommand = "nosplit", -- Use system clipboard clipboard = vim.opt.clipboard + "unnamedplus", -- Hide the `-- INSERT --` messages showmode = false, -- Highlight searches when done searching hlse...
nilq/small-lua-stack
null
object_tangible_loot_loot_schematic_marauder_s02_leggings_schematic = object_tangible_loot_loot_schematic_shared_marauder_s02_leggings_schematic:new { templateType = LOOTSCHEMATIC, customName = "Marauder Armor Leggings Schematic", objectMenuComponent = "LootSchematicMenuComponent", attributeListComponent = "LootSch...
nilq/small-lua-stack
null
return PlaceObj("ModDef", { "title", "Disable Annoying Sounds", "version", 3, "version_major", 0, "version_minor", 3, "saved", 0, "image", "Preview.png", "id", "ChoGGi_DisableAnnoyingSounds", "steam_id", "1816633344", "pops_any_uuid", "03c6b6ff-1afd-489e-b923-69f171b248eb", "author", "ChoGGi", "lua_revision"...
nilq/small-lua-stack
null
local lspsignature = require("lsp_signature") local on_attach = require("plugins.lsp_attach").on_attach local present2, lspinstall = pcall(require, "nvim-lsp-installer") if not present2 then return end lspsignature.setup({ bind = true, handler_opts = { border = "rounded", }, floating_window_above_cur_line = fal...
nilq/small-lua-stack
null
xml = require("cheat_xml") json = dofile("../json/init.lua") function readAll(file) local f = io.open(file, "rb") local content = f:read("*all") f:close() return content end print(json.stringify(xml.conv_cheat(readAll(arg[1])), {indent = true}))
nilq/small-lua-stack
null
local pcall = pcall local xpcall = xpcall local traceback = debug.traceback local pairs = pairs local ipairs = ipairs local type = type local setmetatable = setmetatable local ostime = os.time local pathRegexp = require("lor.lib.utils.path_to_regexp") local utils = require("lor.lib.utils.utils") local random = utils.ra...
nilq/small-lua-stack
null
require "Global.consts" GAME_OVER_SCREEN_PATH = RESOURCES_PATH .. "/GameOverScreen/background.png"
nilq/small-lua-stack
null
EditorOperator = EditorOperator or class(MissionScriptEditor) function EditorOperator:create_element() self.super.create_element(self) self._element.class = "ElementOperator" self._element.values.operation = "none" self._element.values.elements = {} end function EditorOperator:_build_panel() self:_create_panel() ...
nilq/small-lua-stack
null
package.path = package.path .. ';' .. cfg.dir .. '/?.lua' require("fw_common"); open_by_program = "fw_edit"; -- 被 fw 编辑工具打开 is_open_by_ufw = true; output_view_tabs = {} output_bin_tabs = {} enable_moudles = { ["isdtool"] = false, ["audio"] = true, ["charge"] = true, ["status"] = true, ["ton...
nilq/small-lua-stack
null
function onCreate() -- background shit makeLuaSprite('outside', 'stages/Outside', -600, 40); setLuaSpriteScrollFactor('outside', 0.8, 0.8); scaleObject('outside', 0.8, 0.8); makeLuaSprite('inside', 'stages/BACKGROUND', -800, -370); setLuaSpriteScrollFactor('inside', 0.9, 0.9); scaleObject('inside', 0.9, 0.9); ...
nilq/small-lua-stack
null
local StackFsm = {} function StackFsm:new(o) o = o or {} self.__index = self setmetatable(o, self) local Stack = require("stack") o.stack = Stack:new() return o end function StackFsm:getCurrentState() return self.stack:top() end function StackFsm:pushState(state) local function stateEql(s1, s2) if s1 an...
nilq/small-lua-stack
null
if ngx.req.get_uri_args()["jump"] == "1" then ngx.req.set_uri("/lua_rewrite_foo", false); ngx.req.set_uri("/lua_rewrite_bar", false); ngx.req.set_uri_args({ a = 1, b = 2 }); end
nilq/small-lua-stack
null
slot0 = class("SpringFestivalTownScene2", import("..TemplateMV.BackHillTemplate")) slot0.getUIName = function (slot0) return "SpringFestivalTownUI2" end slot0.edge2area = { default = "map_middle" } slot0.init = function (slot0) slot0.super.init(slot0) slot0.top = slot0:findTF("top") slot0._bg = slot0:findTF("B...
nilq/small-lua-stack
null
package.path = "../src/?.lua;src/?.lua;" .. package.path pcall(require, "luarocks.require") local redis = require 'redis' local params = { host = '127.0.0.1', port = 6379, } local client = redis.connect(params) client:select(15) -- for testing purposes -- Start processing the monitor messages. Open a termin...
nilq/small-lua-stack
null
data.raw["gui-style"].default["red-background-image-style"] = { type = "button_style", parent = "icon_button", default_graphical_set = { type = "composition", filename = "__split_with_the_team__/graphics/custom_buttons.png", priority = "extra-high-no-scale", corner_size =...
nilq/small-lua-stack
null
--[[ Copyright 2015 Rackspace 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 applicable law or agreed to in writing, software dis...
nilq/small-lua-stack
null
local pl = {} ---------------- --- Lua 5.1/5.2/5.3 compatibility. -- Ensures that `table.pack` and `package.searchpath` are available -- for Lua 5.1 and LuaJIT. -- The exported function `load` is Lua 5.2 compatible. -- `compat.setfenv` and `compat.getfenv` are available for Lua 5.2...
nilq/small-lua-stack
null
local Aye = Aye; Aye.utils.Buffs = Aye.utils.Buffs or {}; -- Check if @unitID can detect demons -- -- @param {uint} unitID @unitID should be visible (UnitIsVisible) -- @return {0|1} buff if unit can detect demons Aye.utils.Buffs.UnitCanDetectDemons = Aye.utils.Buffs.UnitCanDetectDemons or function(unitID) -- Rune ...
nilq/small-lua-stack
null
#!/usr/bin/env texlua module = "gbt7714" installfiles = {"*.sty", "*.bst"} textfiles = {"README.md", "LICENSE"} checkengines = {"xetex"} stdengine = "xetex" typesetexe = "xelatex" unpackexe = "xetex" checkruns = 3 checkopts = "-file-line-error -halt-on-error -interaction=nonstopmode" typesetopts = "-file-line-err...
nilq/small-lua-stack
null
a = 5 * 6 b = 6 + 7 * 3 c = true and false
nilq/small-lua-stack
null
local the = require"the" local shuffle,top,map,push,sort,firsts = the.get"tables shuffle top map push sort firsts" local shout,out = the.get"prints shout out" local e,rnd = the.get"maths e round" local obj,has = the.get"metas obj has" local Num,Sym,Skip = require"num", require"sym", require"skip" local g...
nilq/small-lua-stack
null
class "PhysFSFileProvider" function PhysFSFileProvider:PhysFSFileProvider(...) local arg = {...} for k,v in pairs(arg) do if type(v) == "table" then if v.__ptr ~= nil then arg[k] = v.__ptr end end end if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then self.__ptr = Polycode.PhysFSFileProvider(u...
nilq/small-lua-stack
null
local response = require "wsapi.response" local cgilua = require "cgilua.main" local _M = {} function _M.run(wsapi_env) _G.CGILUA_APPS = _G.CGILUA_APPS or wsapi_env.DOCUMENT_ROOT .. "/cgilua" _G.CGILUA_CONF = _G.CGILUA_CONF or wsapi_env.DOCUMENT_ROOT .. "/cgilua" _G.CGILUA_TMP = _G.CGILUA_TMP or os.getenv("TMP...
nilq/small-lua-stack
null
--[[ Name: furn_store.lua ]]-- local MapProp = {} MapProp.ID = "furn_store" MapProp.m_tblSpawn = { { mdl = 'models/props_trainstation/trainstation_clock001.mdl',pos = Vector('1542.281250 1987.125000 680.718750'), ang = Angle('0.000 0.000 0.000'), }, { mdl = 'models/props/cs_militia/barstool01.mdl',pos = Vector...
nilq/small-lua-stack
null
ITEM.name = "9x21mm Gyurza SP-10 (7N29)" ITEM.model = "models/lostsignalproject/items/ammo/9x19_p.mdl" ITEM.ammo = "9x21MM -AP-" // type of the ammo ITEM.ammoAmount = 60 // amount of the ammo ITEM.description = "" ITEM.quantdesc = "A box that contains %s rounds of 9x21mm Gyurza SP-10 (7N29) ammo. " ITEM.longdesc = "An...
nilq/small-lua-stack
null
--[[ Math stuff ]] local scrW, scrH local cos, sin, pi = math.cos, math.sin, math.pi --(1 - t) * from + t * to function LerpColor(t, from, to) return Color( (1 - t) * from.r + t * to.r, (1 - t) * from.g + t * to.g, (1 - t) * from.b + t * to.b, (1 - t) * from.a + t * to.a ) end --[[ ...
nilq/small-lua-stack
null
local x = 250 local y = 250 local r = 4 local d_r = 7 local t = 0.0001 local a = -0.035 clear() local color = {} color.alpha = 255 for i = 1, 50 do for angle = 0, 360, 1 do d_x = r * math.cos(angle * math.pi / 180) d_y = r * math.sin(angle * math.pi / 180) color.red = 125 * math.sin(0.5 * angle - 0) + 75 ...
nilq/small-lua-stack
null
USER_ID = "2001370210" KEY = "56b74108e785b589" DEV_CLASS = 'A' HOST = "115.28.93.201" PORT = 7005 VER = "32" udpSocket = net.createUDPSocket() function packSend(data) local status = "1234" local packet_class = "01" local sta = data local packet_len = string.format("%04d",41+s...
nilq/small-lua-stack
null
-- $Id: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/SpaceMode/EscortPlan.lua#1 $ --///////////////////////////////////////////////////////////////////////////////////////////////// -- -- (C) Petroglyph Games, Inc. -- -- -- ***** ** * * -- * ** ...
nilq/small-lua-stack
null
local utils = require("utils") function clone(object, object_type, new_name) local prototype = data.raw[object_type][object] if not prototype.type or not prototype.name then error("Invalid prototype: prototypes must have name and type properties.") return nil end local p = table.deepco...
nilq/small-lua-stack
null
local mpath = pathJoin(os.getenv("MODULEPATH_ROOT"),"Compiler",myModuleFullName()) prepend_path("MODULEPATH",mpath)
nilq/small-lua-stack
null
local ip = ngx.var.binary_remote_addr -- ngx.say(ngx.var.remote_addr) -- ngx.exit(200) local limit = ngx.shared.limit local req, _ = limit:get(ip) if req then if req > 20 then ngx.exit(503) else limit:incr(ip, 1) end else limit:set(ip, 1, 10) end local jsjump = ngx.shared.jsjump lo...
nilq/small-lua-stack
null
AddCSLuaFile() ENT.Type = "anim" ENT.PrintName = "Doorbust Charge" ENT.Author = "Black Tea" ENT.Spawnable = true ENT.AdminOnly = true ENT.Category = "NutScript - Weapons" ENT.RenderGroup = RENDERGROUP_BOTH ENT.radius = 32 ENT.burstTime = 5 ENT.doorRestore = 300 function ENT:SpawnFunction(client, trace, className) ...
nilq/small-lua-stack
null
-- Includes #include 'include/config.lua' -- Defines #POINTS_FACTOR = 1 -- Globals local g_Stats = { 'cash', 'points', 'mapsPlayed', 'mapsBought', 'mapsRated', #if(DM_STATS) then 'dmVictories', 'huntersTaken', 'dmPlayed', #end #if(DD_STATS) then 'ddVictories', 'ddPlayed', 'kills', #end #if(RACE_ST...
nilq/small-lua-stack
null
require 'sys' require 'cunn' require 'ccn2' require 'cudnn' cudnn.benchmark = true -- run manual auto-tuner provided by cudnn cudnn.verbose = false -- require 'fbcunn' -- require 'nnbhwd' print('Running on device: ' .. cutorch.getDeviceProperties(cutorch.getDevice()).name) steps = 10 -- nb of steps in loop to average...
nilq/small-lua-stack
null
admins = {"arts@psto.net", "arts@point.im" } use_libevent = true; modules_enabled = { "roster"; "saslauth"; "tls"; "dialback"; "disco"; "private"; "vcard"; "legacyauth"; "ping"; "pep"; "register"; "adhoc"; "admin_adhoc"; "admin_telnet"; "posix"; "s2s_blackwhitelist"; -- http://cod...
nilq/small-lua-stack
null
--[[ Module\Focus\focus.lua Move MyfocusFrame here Terry@bf 2010 - 09 - 29 ]] local T = LibStub("AceAddon-3.0"):GetAddon("TUnitFrame") if not T then return end local M = T:NewModule("FocusFrame") if not M then return end function M:OnInitialize() T:Debug("FocusFrame Module initialized") end ...
nilq/small-lua-stack
null
local utils = {} -- Transform the coordinates from the original image space to the cropped one function utils.transform(pt, center, scale, res, invert) -- Define the transformation matrix local pt_new = torch.ones(3) pt_new[1], pt_new[2] = pt[1], pt[2] local h = 200*scale local t = torch.ey...
nilq/small-lua-stack
null
local exit = os.exit local dofile = dofile local getpid = require('testcase.getpid') local PID = getpid() for _, pathname in ipairs({ 'test/eval_test.lua', 'test/exit_test.lua', 'test/filesystem_test.lua', 'test/getopts_test.lua', 'test/getpid_test.lua', 'test/iohook_test.lua', 'test/printe...
nilq/small-lua-stack
null
--script at workspace.boot_button.Script --Generate a part that will call a touched() event at BIOS function callBIOS() local currentPos = script.Parent.Position currentPos = Vector3.new(currentPos.X - 2, currentPos.Y + 1, currentPos.Z) local caller = Instance.new("Part") caller.Position = currentPos caller.Si...
nilq/small-lua-stack
null
require("hall/password/type/passwordTypeObject"); local PasswordTypeObjectMatchInvite = class(PasswordTypeObject); -- virtual PasswordTypeObjectMatchInvite.generateData = function(self) local info = table.verify(InvitationalDataInterface.getInstance():getCurMyMatchItemData()); local data = { ...
nilq/small-lua-stack
null
---------------------------------- -- Author : Jean Loup Pecquais -- Name : Group/Ungroup selected item ---------------------------------- local function main() reaper.Undo_BeginBlock() local item_count = reaper.CountSelectedMediaItems(0) local GroupeState = 0 for i = 0, item_count - 1 do local sel_item ...
nilq/small-lua-stack
null
---@class CS.FairyEditor.Component.FontSizeInput : CS.FairyGUI.GLabel ---@field public value number ---@field public max number ---@type CS.FairyEditor.Component.FontSizeInput CS.FairyEditor.Component.FontSizeInput = { } ---@return CS.FairyEditor.Component.FontSizeInput function CS.FairyEditor.Component.FontSizeInput....
nilq/small-lua-stack
null
giant_decay_mite_hatchling = Creature:new { objectName = "@mob/creature_names:giant_decay_mite_hatchling", socialGroup = "mite", faction = "", level = 7, chanceHit = 0.25, damageMin = 50, damageMax = 55, baseXp = 187, baseHAM = 113, baseHAM...
nilq/small-lua-stack
null
--[[This file calls the main objects]]-- -- Creates objects -- local loader = {} local input = {} local audio = {} local screen = {} -- Main loader function -- function love.load() -- Main objects and initialization -- screen = require("objects.screen") audio = require("objects.audio") input = require("obj...
nilq/small-lua-stack
null
local activewidget = nil; local activenode = nil; function onInit() -- create the active indicator widget activewidget = addBitmapWidget(activeicon[1]); activewidget.setVisible(false); -- get the active node if User.isHost() then activenode = window.getDatabaseNode().createChild("actor.active", "n...
nilq/small-lua-stack
null
--region super.lua --Author : jefflwq --Date : 2016/02/24 --说明 : 用于在类中调用基类成员函数 --用例 -- class "clsA" -- { -- clsA = -- function(self, name) -- print("In clsA.") -- end, -- PrintName = -- function(self) ...
nilq/small-lua-stack
null