content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
minetest.register_craftitem("floodfill:bucket", { description = "Floodfill Magic Bucket", inventory_image = "bucket.png^[colorize:gold:80", stack_max = 1, liquids_pointable = true, on_use = function(itemstack, player, pointed_thing) if pointed_thing.type ~= "node" then return end local opos = poi...
nilq/small-lua-stack
null
X = {} local IBUtil = require(GetScriptDirectory() .. "/ItemBuildlogic"); local npcBot = GetBot(); local talents = IBUtil.FillTalenTable(npcBot); local skills = IBUtil.FillSkillTable(npcBot, IBUtil.GetSlotPattern(1)); X["items"] = { "item_wraith_band", "item_boots", "item_magic_wand", "item_ring_of_aquila", "i...
nilq/small-lua-stack
null
local _M = {} -- https://forums.coronalabs.com/topic/9760-buffered-movieclip-image-sequence/ ----------------------------- -- LOCALS ----------------------------- local _W = display.contentWidth local _H = display.contentHeight --display.newRect(_W/2, _H/2, _W, _H) ----------------------------- -- INCLUDES ----------...
nilq/small-lua-stack
null
local L = BigWigs:NewBossLocale("Atal'Dazar Trash", "esES") or BigWigs:NewBossLocale("Atal'Dazar Trash", "esMX") if not L then return end if L then L.skyscreamer = "Vociferador de cielos hambriento" L.tlonja = "T'lonja" L.shieldbearer = "Portaescudos de Zul" L.witchdoctor = "Médica bruja Zanchuli" L.kisho = "Dinom...
nilq/small-lua-stack
null
local PlatformSurface = require('motras_platform_surface') local Box = require('motras_box') local ModuleUtils = require('modulesutil') local Transf = require('transf') local ModuleUtils = require('motras_modelutils') local PlatformBuilder = require('motras_platform_builder') local PlatformEdge = require('motras_...
nilq/small-lua-stack
null
-- -- (C) 2013 Kriss@XIXs.com -- local coroutine,package,string,table,math,io,os,debug,assert,dofile,error,_G,getfenv,getmetatable,ipairs,Gload,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,unpack,_VERSION,xpcall,module,require=coroutine,package,str...
nilq/small-lua-stack
null
-- Copyright (c) 2015 Anshul Samar -- Copyright (c) 2014, Facebook, Inc. All rights reserved. -- Licensed under the Apache License, Version 2.0 found in main folder -- See original LSTM/LM code: github.com/wojzaremba/lstm -- g_print method from Benjamin Marechal require 'gnuplot' function g_transfer_data(x) r...
nilq/small-lua-stack
null
-- Name: Onebuddy -- Description: Light and dark atom one theme -- Author: Th3Whit3Wolf <the.white.wolf.is.1337@gmail.com> -- Maintainer: Th3Whit3Wolf <the.white.wolf.is.1337@gmail.com> -- Website: httpc.//github.com/Th3Whit3Wolf/onebuddy -- License: MIT local Color, c, Group, g, s = require...
nilq/small-lua-stack
null
-- [[ Internal Mapper ]] -- -- A set of functions to provide an internal positional mapper. -- Supplies some callback functions that can be passed to movement -- functions that while update and maintain internal positions.
nilq/small-lua-stack
null
project "Sandbox" kind "ConsoleApp" language "C++" outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" targetdir ("%{wks.location}/bin/"..outputdir.."/%{prj.name}") objdir ("%{wks.location}/bin-int/"..outputdir.."/%{prj.name}") -- sets the building order dependson { "Hex" } includedirs { "....
nilq/small-lua-stack
null
-- -- Please see the readme.txt file included with this distribution for -- attribution and copyright information. --
nilq/small-lua-stack
null
function CreateDoublyLinkedList() local newdll = { firstLink = nil, lastLink = nil, iterator = { currentLink = nil, linksPerTick = nil }, dataIdentifierToLink = {}, count = 0, freeIndexes = {} } return newdll end function AddLink(linkedList, data, dataIdentifier) --Create new link local ne...
nilq/small-lua-stack
null
-------------------------------- -- @module NavMeshObstacle -- @extend Component -- @parent_module cc -------------------------------- -- -- @function [parent=#NavMeshObstacle] getSyncFlag -- @param self -- @return int#int ret (return value: int) -------------------------------- -- -- @function [parent=#N...
nilq/small-lua-stack
null
#!/usr/bin/env lua if os.getenv("kak_opt_easymotion_chars") then kak_easymotion_chars = os.getenv("kak_opt_easymotion_chars") else kak_easymotion_chars = "abcdefghijklmnopqrstuvwxyz" end -- Calculate `count` value for Kakoune from the two-char long input. local function getCount(jumper) local counter = string.find...
nilq/small-lua-stack
null
return { version = "1.5", luaversion = "5.1", tiledversion = "1.7.2", orientation = "orthogonal", renderorder = "right-down", width = 40, height = 20, tilewidth = 8, tileheight = 8, nextlayerid = 7, nextobjectid = 169, properties = {}, tilesets = { { name = "sprite_sheet", firs...
nilq/small-lua-stack
null
do function conky_round(arg) local n = conky_parse(arg) return math.floor(tonumber(n) + .5) end function conky_wifi_icon(arg) local arg = conky_parse(arg) if arg == "unk" then return " " end local n = tonumber(arg) if (n > 75)...
nilq/small-lua-stack
null
local corpseIds = {3058, 3059, 3060, 3061, 3064, 3065, 3066} local removalLimit = 500 function onCastSpell(creature, variant, isHotkey) local position = variant:getPosition() local tile = Tile(position) if tile then local items = tile:getItems() if items then for i, item in ipairs(items) do if item:getTy...
nilq/small-lua-stack
null
local http = require("socket.http") local ltn12 = require("socket.ltn12") function SendFile(FilePath) local files = "" local file = io.open(FilePath,"rb") if file then files = file:read("*a") file:close() end local response_body = {} local boundary = "----------------------------831b...
nilq/small-lua-stack
null
require "lmkbase" require "lmkutil" local files = lmkbase.files (".") local PreOldPath = "" -- "/usr/local/Trolltech/Qt-4.6.0/lib/" local OldPath = ".framework/Versions/4/" local NewPath = "@executable_path/../Frameworks/Qt/" local libs = { "QtAssistant", "QtCore", "QtDesigner", "QtDesignerComponents", ...
nilq/small-lua-stack
null
--entity_helper.lua --Templates and constants for the entity prototypes require("copy_prototype") --============================================================================== -- Constants local empty_circuit_connector = { led_red = { filename = graphics .. "empty.png", width = 1, height = 1 }, led_green = { fi...
nilq/small-lua-stack
null
do --- jit-flush if not jit or not jit.status or not jit.status() then return end for i=1,100 do if i==50 then jit.flush(2) end for j=1,100 do end for j=1,100 do end end jit.flush() local function f() for i=1,100 do end end for i=1,100 do local x = gcinfo(); f() end jit.flush() local f...
nilq/small-lua-stack
null
local status_ok, lspconfig = pcall(require, "lspconfig") if not status_ok then vim.notify("Lspconfig not found!") return end require("user.lsp.lsp-installer") require("user.lsp.handlers").setup() require("user.lsp.null-ls")
nilq/small-lua-stack
null
-- -- @copyright (c) 2015 Upstart Illustration LLC. All rights reserved. -- AdNetwork = enum(0 , 'Unknown' , 'AdColony' , 'AdMob' , 'Chartboost' , 'iAd' , 'Leadbolt' , 'Vungle' ) AdType = enum(0 , 'Unknown' , 'Banner' , 'Interstitial' , 'Video' ) AdImpressionType = enum(0 , 'Regular' , 'Pre...
nilq/small-lua-stack
null
LinkLuaModifier("modifier_oaa_glaives_of_wisdom", "abilities/oaa_glaives_of_wisdom.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_oaa_glaives_of_wisdom_fx", "abilities/oaa_glaives_of_wisdom.lua", LUA_MODIFIER_MOTION_NONE) silencer_glaives_of_wisdom_oaa = class(AbilityBaseClass) function silencer_glaives_of...
nilq/small-lua-stack
null
local projname = ... -- this file is expected to be included from a project scope local sizzplugins_dir = (solution().basedir .. "/") local hl2sdk_dir = sizzplugins_dir .. "../source-sdk-2013/mp/src/" local sdklib_dir = hl2sdk_dir .. "lib/public/" local sizzlib_dir = sizzplugins_dir .. "lib/" local external...
nilq/small-lua-stack
null
dofile(ModPath .. "infcore.lua") -- Similarly to CopMovement, HRT's sometimes spawn without a team set. -- This function is called to sync the units to late joiners. To prevent possible crashes, substitute a default team if none is set. Hooks:PreHook(CopBrain, "save", "inf_setbraincopteam", function(self, save_data) ...
nilq/small-lua-stack
null
local awful = require('awful') local wibox = require('wibox') local gears = require('gears') local clickable_container = require('widget.clickable-container') local dpi = require('beautiful').xresources.apply_dpi local icons = require('themes.icons') local colors = require('themes.dracula.colors') local watch = require...
nilq/small-lua-stack
null
--Test = require('connecttest') --require('cardinalities') --local events = require('events') --local mobile_session = require('mobile_session') --local mobile = require('mobile_connection') --local tcp = require('tcp_connection') --local file_connection = require('file_connection') --function Test:ActivationApp() ...
nilq/small-lua-stack
null
--------------------------------------------------------------------------------------------------- ---screen_metrics.lua ---date: 2021.2.27 ---reference: src/api.lua ---desc: Defines ScreenMetrics, which deals with the recording and updating of the current screen --- settings. -------------------------------------...
nilq/small-lua-stack
null
local Q = require 'Q' local qconsts = require 'Q/UTILS/lua/q_consts' function sum_prod_eval(X, w) local A = {} for i = 1, #X do A[i] = {} local temp = Q.vvmul(X[i], w) for j = i, #X do A[i][j] = Q.sum(Q.vvmul(X[j], temp)):eval() end end return A end return sum_prod_eval
nilq/small-lua-stack
null
local Scheduler = require('app.helpers.Scheduler') local SoundMng = require('app.helpers.SoundMng') local tools = require('app.helpers.tools') local ConvertToTableView = require('app.helpers.ConvertToTableView') local cache = require('app.helpers.cache') local app = require('app.App'):instance() local GVMessageListVie...
nilq/small-lua-stack
null
--------------------------------------------------------------------------------------------------- -- func: changesjob -- desc: Changes the players current subjob. --------------------------------------------------------------------------------------------------- require("scripts/globals/status") cmdprops = { pe...
nilq/small-lua-stack
null
local snet = slib.Components.Network local SERVER = SERVER local table = table local hook = hook local IsValid = IsValid local ipairs = ipairs local AddOriginToPVS = AddOriginToPVS local RealTime = RealTime local isentity = isentity local istable = istable local unpack = unpack local table_insert = table.insert local t...
nilq/small-lua-stack
null
require 'telescope' local i = 0 context("A context", function() before(function() i = i + 1 end) after(function() i = i - 1 end) context("A nested context", function() test("A passing test", function() assert_true(true) end) test("A failing test", function() assert_true(false) en...
nilq/small-lua-stack
null
require "app.config.namespace" require "app.config.events"
nilq/small-lua-stack
null
function set_team() local ChangeTeamFrame = vgui.Create( "DFrame" ) ChangeTeamFrame:SetPos( 50, 50 ) --Set the window in the middle of the players screen/game window ChangeTeamFrame:SetSize( 200, 250 ) --Set the size ChangeTeamFrame:SetTitle( "Change Team" ) --Set title ChangeTeamFrame:SetVisible( true ) ChangeTeam...
nilq/small-lua-stack
null
-- Graph contains the following Enums: -- Graph.GraphType - Values: OneWay, TwoWay -- OneWay: The Graph will assume connections are one-way (Connect('A', 'B', 1) will connect 'A' to 'B', but not 'B' to 'A' -- TwoWay: The Graph will assume connections are two-way (Conenct('A', 'B', 1) will connect 'A' to 'B' and '...
nilq/small-lua-stack
null
local awful = require("awful") local wibox = require("wibox") local naughty = require("naughty") local utils = require("utils") local gears = require("gears") local home = os.getenv("HOME") local system_widgets_resources = { { name = "bluetooth", normal_image = home .. "/.config/awesome/themes/Ne...
nilq/small-lua-stack
null
AddCSLuaFile() SWEP.Base = "weapon_base" SWEP.PrintName = "YAWD Weapon Base" SWEP.Author = "YAWD Team" SWEP.Category = "YAWD" SWEP.Spawnable = false SWEP.AdminOnly = true SWEP.m_WeaponDeploySpeed = 1 SWEP.Slot = 0 SWEP.SlotPos = 0 SWEP.DrawCrosshair = true SWEP.DrawAmmo = true SWEP.Weight = 5 SWEP.ViewModelFOV = 74...
nilq/small-lua-stack
null
-- minetest/fire/init.lua minetest.register_node("fire:basic_flame", { description = "Fire", drawtype = "firelike", tiles = {{ name="fire_basic_flame_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1}, }}, inventory_image = "fire_basic_flame.png", light_source = 14, groups...
nilq/small-lua-stack
null
--------------------------------------------------------------------------------------------------- -- Proposal: -- https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0221-multiple-modules.md -- Description: -- HMI sent capabilities, where CLIMATE has three modules, to the SDL. -- Mobile App sends...
nilq/small-lua-stack
null
return {'omdat','omdijken','omdijking','omdoen','omdolen','omdopen','omdoping','omdraai','omdraaien','omdraaiing','omdragen','omduikelen','omduwen','omdonderen','omdwalen','omdurman','omdeden','omdeed','omdijk','omdijkingen','omdijkt','omdijkte','omdoe','omdoet','omdoolde','omdoolt','omdoop','omdoopt','omdoopte','omdoo...
nilq/small-lua-stack
null
local base = require('imgui.Widget') ---@class im.Checkbox:im.Widget local M = class('im.Checkbox', base) function M:ctor(...) base.ctor(self, ...) end function M:setLabel(label) self:setParam(1, label) return self end function M:getLabel() return self:getParam(1) end function M:setChecked(b) s...
nilq/small-lua-stack
null
local status_ok, lualine = pcall(require, "lualine") if not status_ok then return end local hide_in_width = function() return vim.fn.winwidth(0) > 80 end local diagnostics = { "diagnostics", sources = { "nvim_diagnostic" }, sections = { "error", "warn" }, symbols = { error = " ", warn = " " }, colored = fals...
nilq/small-lua-stack
null
local S, L, O, U, D, E = unpack(select(2, ...)); local Module = S:NewNameplateModule('TotemIcon'); -- Local Config local ENABLED; local TOTEM_TEXTURE = 971076; local TOTEM_LOCALIZED_NAME = { ['enUS'] = 'Totem', ['deDE'] = 'Totem', ['esES'] = 'Tótem', ['esMX'] = 'Totém', ['frFR'] = 'Totem', ['...
nilq/small-lua-stack
null
--[[ 24 * t // s == k CSoundGen::m_iTempoDecrement 24 * t % s == rem CSoundGen::m_iTempoRemainder 24 * t == k * s + rem CSoundGen::m_iTempoAccum + rem 60 * floor(1e6 / intv) == 60 * framerate (0.4....
nilq/small-lua-stack
null
local SPEED = 4 local ROLL_SPEED = 1 function start(this_pgid) pgid = this_pgid end function stop() end function collide(pid, entity_id) play_sample("sfx/knock.ogg", 1, 0, 1) remove_particle(pid) end function logic(pid) local frames = get_particle_blackboard(pid, 0) local frame = get_particle_blackboard(pid, 1...
nilq/small-lua-stack
null
nodes = {} edges = {} if nil == len_factor then len_factor = 1 end function start_tree() n = 0 print("strict graph tree {") print("graph [mode=KK,dimen=2]") end function node() if l then node_string = string.format("N%s [shape=plaintext,label=\"%s\"]", N.id, lbl) else node_string = string.format("N%s [shap...
nilq/small-lua-stack
null
-- Copyright 2014 David Mentler AddCSLuaFile() --[[ = Circular Queue = Store queued objects efficiently. This utility saves memory by tricking lua to store the queue using backing arrays, making it way faster than inserting into a tables first index. queue = CircularQueue( <size = 8> ) queue:Add...
nilq/small-lua-stack
null
fx_version 'adamant' game 'gta5' description 'ESX Menu Default' version 'legacy' client_scripts { 'client/main.lua' } ui_page { 'html/ui.html' } files { 'html/ui.html', 'html/css/app.css', 'html/js/mustache.min.js', 'html/js/app.js' }
nilq/small-lua-stack
null
-- Convert mat to .t7 -- Assume the matlab file only has one field require 'torch' require 'paths' require 'mattorch' function tablelength(T) local count = 0 for _ in pairs(T) do count = count + 1 end return count end cmd = torch.CmdLine() cmd:option('--path2file', '.') opt = cmd:parse(arg or {}) dir = paths....
nilq/small-lua-stack
null
local shadow = {} local image = love.graphics.newImage function shadow.Animation() local shadow = { image('entities/img/shadow/shadow1.png'), image('entities/img/shadow/shadow2.png'), image('entities/img/shadow/shadow3.png') } return shadow end return shadow
nilq/small-lua-stack
null
--[[ Copyright (c) David-John Miller AKA Anoyomouse 2016 * Part of the warehousing mod * * See LICENCE in the project directory for licence information --]] function define_warehouse_connector(mainOffset) local logisticAnimationOffset = {0.015625, 0.234375}; local result = { connector_main = { ...
nilq/small-lua-stack
null
-- Discordia Command Manager -- microsievert#2039 local discordia = require "discordia" local class = discordia.class discordia.extensions.string() -- > Creating class base local Command = class("CommandClass") function Command:__init(name) if name then self._name = name self._permissions = {} sel...
nilq/small-lua-stack
null
local share = require "share" local enet = require "enet" local server = {} do local host function server.start() host = enet.host_create("*:22122") end function server.update(dt) if host then while true do local event = host:service(0) if not event then break ...
nilq/small-lua-stack
null
--Lua code loader local Globals = (...) or {} local edata = select(2,...) or {} Globals._GameCode = edata.luacode return Globals
nilq/small-lua-stack
null
RealMobHealth_Options = { ["ShowStatusBarTextAdditions"] = true, ["ShowNamePlateHealthText"] = true, ["ShowTooltipText"] = false, ["EnablePeerCache"] = true, ["ModifyHealthBarText"] = false, ["ShowTooltipHealthText"] = false, } RealMobHealth_CreatureHealthCache = { ["4531-28"] = 2732, ["11611-57"] = 3036, ["1...
nilq/small-lua-stack
null
require "resty.nettle.types.des" local lib = require "resty.nettle.library" local ffi = require "ffi" local ffi_new = ffi.new local ffi_typeof = ffi.typeof local ffi_copy = ffi.copy local ffi_cdef = ffi.cdef local ffi_str = ffi.string local ceil = math.ceil local assert ...
nilq/small-lua-stack
null
--- Determines where the tabs will be placed within a @{Chat} Compound. -- @classmod TabLocation local Enum = require("vyzor.enum") --- TabLocation options. -- @table TabLocation. local _enum = { Top = "top", Bottom = "bottom", Right = "right", Left = "left", } local TabLocation = Enum("TabLocation", _enum) ...
nilq/small-lua-stack
null
local new, centroid; function new(x, y) return { x, y } end function centroid(points, nrep) local x = 0.0 local y = 0.0 local npoints = #points for _ = 1, nrep do x = 0.0 y = 0.0 for i = 1, npoints do local p = points[i] x = x + p[1] y = y...
nilq/small-lua-stack
null
-- @description Stretch selected items to fit between nearest markers -- @author Aaron Cendan -- @version 1.0 -- @metapackage -- @provides -- [main] . > acendan_Stretch selected items to fit between nearest markers.lua -- @link https://aaroncendan.me -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- ~~~~~~~~~~~ GLOBAL VARS ~...
nilq/small-lua-stack
null
return { order = 'cCfmpo', kinds = { c = { group = 'neotags_ClassTag' }, C = { group = 'neotags_ConstantTag' }, f = { group = 'neotags_FunctionTag' }, m = { group = 'neotags_MethodTag' }, o = { group = 'neotags_ObjectTag' }, p = { group...
nilq/small-lua-stack
null
local picoturtle = require "picoturtle" function Turtle(opt) t = picoturtle.new() end function arcr(t, r, deg) for i = 1, deg, 1 do t:fd(r) t:rt(1) end end function arcl(t, l, deg) for i = 1, deg, 1 do t:fd(l) t:lt(1) end end
nilq/small-lua-stack
null
local Bullet, super = Class(Object) function Bullet:init(x, y, texture) super:init(self, x, y) self.layer = LAYERS["bullets"] -- Set scale and origin self:setOrigin(0.5, 0.5) self:setScale(2, 2) -- Add a sprite, if we provide one if texture then self:setSprite(texture, 0.25, true...
nilq/small-lua-stack
null
-- -- YATM Debug -- -- Various utilities, modules and items for debugging YATM related features -- local mod = foundation.new_module("yatm_debug", "1.0.0") mod:require("items.lua")
nilq/small-lua-stack
null
return { name = "Warlock"; description = "An ancient tome of powerful cursed magic. But at what cost?"; pointsGainPerLevel = 1; startingPoints = 1; lockPointsOnClassChange = true; minLevel = 30; maxLevel = 50; -- visual attributes layoutOrder = 3; bookColor = Color3.fromRGB(76, ...
nilq/small-lua-stack
null
local EditMatcher = {} function EditMatcher.onChanged() local matcher = guiGetInternalData(this, "matcher") if not matcher then return end guiSetText(this, matcher(guiGetText(this)) or "") end function EditMatcher.onBlur() local matcher = guiGetInternalData(this, "matcher") if not matcher then return end ...
nilq/small-lua-stack
null
local Map = {} function Map:new(params, isoGrid, aiPlayer, humanPlayer) local size = params.size; local newMap = {size=size, isoGrid = isoGrid, distFun=require("math.geometry").manhattanDist}; -- set meta tables so lookups will work setmetatable(newMap, self); self.__index = s...
nilq/small-lua-stack
null
local converter = require("gesture.view.converter") local M = {} local Canvas = {} Canvas.__index = Canvas M.Canvas = Canvas local vim = vim local set_extmark = vim.api.nvim_buf_set_extmark function Canvas.new(bufnr, ns) local tbl = {_rows = {}, _board_rows = {}, _bufnr = bufnr, _ns = ns} return setmetatable(tb...
nilq/small-lua-stack
null
local moon = require("moon") local conf = ... if conf and conf.slave then if conf.auto_quit then print("auto quit, bye bye") -- 使服务退出 moon.timeout(10, function() moon.quit() end) end else moon.async(function() while true do moon.new_service("...
nilq/small-lua-stack
null
local socket = require('socket') local http = require('socket.http') local ltn12 = require('ltn12') local log = require('log') local config = require('config') -- XML modules local xml2lua = require "xml2lua" local xml_handler = require "xmlhandler.tree" ----------------------- -- SSDP Response parser local function p...
nilq/small-lua-stack
null
WINDOW_WIDTH = 1280 WINDOW_HEIGHT = 720 VIRTUAL_WIDTH = 432 VIRTUAL_HEIGHT = 243 MAX_SCORE = 5 require "baseClass/class" -- lua classes require "baseClass/Observer" -- obeserver Patter require "baseClass/Message" -- observer Patter Push = require "thirdLibrary/push" -- require the library require "Player" requi...
nilq/small-lua-stack
null
local F = vim.fn local L = vim.loop local utils = require('ucw.utils') local logger = require('ucw.log').logger() local M = {} ---Normalize object keys ---i.e. from {["a.b.c"] = 1} to {a = { b = { c = 1 }}} local function normalize_keys(obj) if type(obj) ~= 'table' then return obj end local res = {} for...
nilq/small-lua-stack
null
local testcase = require('testcase') local basename = require('basename') function testcase.basename() -- test that extract the basename for _, v in ipairs({ { "", ".", }, { ".", ".", }, { "/.", ".",...
nilq/small-lua-stack
null
--[[ In the lxp example, we used user values to associate the callback table with the userdatum that represents a parser. This choice created a small problem, because what the C callbacks receive is the lxp_userdata structure, and that structure does not offer direct access to the table. We solved this problem by sto...
nilq/small-lua-stack
null
local feature = {} feature.name = "Tags" feature.desc = "Use this feature to trigger already created tags. Use the tag command instead to create and manage tags!" feature.onCommandType = "override" local perserver = Misc.loadJson("perserver.json") feature.onMessage = function(m, event) local prefix = Misc.getPrefi...
nilq/small-lua-stack
null
Touches = class() function Touches:init() -- you can accept and set parameters here self.touches = {} end function Touches:add(t) table.insert(self.touches, {t}) end function Touches:expand(t) table.insert(self.touches[#self.touches],t) end function Touches:draw() local last if #self.touches...
nilq/small-lua-stack
null
utils = require 'mp.utils' require 'mp.options' local options = { directory = ".", ratings_file = "RBS-ratings.txt", } read_options(options, "ratings-based-shuffle") all_files = {} ratings = {} function init_playlist() mp.osd_message("Initializing ratings-based shuffle..") mp.set_property("shuffle", ...
nilq/small-lua-stack
null
local skynet = require "skynet" local socket = require "skynet.socket" local httpd = require "http.httpd" local sockethelper = require "http.sockethelper" local urllib = require "http.url" local table = table local string = string local mode, protocol = ... protocol = protocol or "http" local function response(id, wr...
nilq/small-lua-stack
null
local host, dir, fileuri, query, localfile, callback = ... local doRequest, firstRec, subsRec, finalise local n, total, size = 0, 0 doRequest = function(socket, hostIP) -- luacheck: no unused if hostIP then local con = net.createConnection(net.TCP, 0) -- Note that the current dev version can o...
nilq/small-lua-stack
null
require("lsp").setup "sh"
nilq/small-lua-stack
null
local S = homedecor.gettext local bathroom_tile_colors = { { "1", "white/grey", "#c0c0c0:200" }, { "2", "white/dark grey", "#404040:150" }, { "3", "white/black", "#000000:200" }, { "4", "black/dark grey", "" }, { "red", "white/red", "#d00000:150" }, { "green", "white/...
nilq/small-lua-stack
null
-- copy all globals into locals, some locals are prefixed with a G to reduce name clashes local coroutine,package,string,table,math,io,os,debug,assert,dofile,error,_G,getfenv,getmetatable,ipairs,Gload,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,un...
nilq/small-lua-stack
null
object_static_worldbuilding_vegitation_fngi_mushroom_clump_a1 = object_static_worldbuilding_vegitation_shared_fngi_mushroom_clump_a1:new { } ObjectTemplates:addTemplate(object_static_worldbuilding_vegitation_fngi_mushroom_clump_a1, "object/static/worldbuilding/vegitation/fngi_mushroom_clump_a1.iff")
nilq/small-lua-stack
null
dead_flesh = { -- this is a scourge spell requirements = function(player) local level = 99 local items = {"surge", "star_staff", "scribes_book", 20000} local itemAmounts = {1, 1, 1, 20000} local description = "Weaken your opponent for a short time." return level, items, itemAmounts, description end }
nilq/small-lua-stack
null
local logger = require "logger" local tap = {} local FLAG_C = 1 local FLAG_C_OFF = 254 local blocks -- move this into a tap table local current_block local function compute_checksum (data, length) local checksum = 0 for i = 1, length do checksum = checksum ~ data:byte(i) end return checksum end --- --...
nilq/small-lua-stack
null
ESX = nil local PlayerArrested, PlayersinJail = {}, 0 TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) RegisterServerEvent( "esx_extendedjail:suggestions" ) AddEventHandler( "esx_extendedjail:suggestions", function() if source ~= 0 then local xPlayer = ESX.GetPlayerFromId(source) if xPlayer.job.n...
nilq/small-lua-stack
null
--[[ |WARNING| THESE TESTS RUN IN YOUR REAL ENVIRONMENT. |WARNING| If your tests alter a DataStore, it will actually alter your DataStore. This is useful in allowing your tests to move Parts around in the workspace or something, but with great power comes great responsibility. Don't mess up your stuff! ------------...
nilq/small-lua-stack
null
function onCreate() -- background stuffs makeLuaSprite('oceanBg1', 'oceanBg1', -825, -900); setScrollFactor('oceanBg1', 1.0, 1.0); scaleObject('oceanBg1', 1.0, 1.0); makeLuaSprite('oceanBg2', 'oceanBg2', -825, -900); setScrollFactor('oceanBg2', 1.0, 1.0); scaleObject('oceanBg2', 1.0, 1.0); makeLuaSprite('oce...
nilq/small-lua-stack
null
--- init net package -- @author zrong(zengrong.net) -- Creation 2014-01-02 local net = {} net.SocketTCP = import(".SocketTCP") return net
nilq/small-lua-stack
null
-- Set completeopt to have a better completion experience vim.o.completeopt = 'menuone,noselect' -- luasnip setup local luasnip = require 'luasnip' -- nvim-cmp setup local cmp = require 'cmp' cmp.setup { snippet = { expand = function(args) require('luasnip').lsp_expand(args.body) end, }, mapping =...
nilq/small-lua-stack
null
slot3 = {} FishingJoyPlayer = class(slot1, "FishingJoyPlayer") FishingJoyPlayer.ctor = function (slot0, slot1) slot0.cannonFireType = 0 slot0.cannonRenderType = 0 slot0.cannonFireMul = 0 slot0.lockfishId = 0 slot0.lockingFish = false slot0.lockedFish = {} slot0.firedBulletCount = 0 slot0.allowFire = false slo...
nilq/small-lua-stack
null
local shuttle = scene:getObjects("shuttle1_mover")[1]; local military0 = scene:getObjects("military0")[1]; local military1 = scene:getObjects("military1")[1]; local military10 = scene:getObjects("military10")[1]; local military11 = scene:getObjects("military11")[1]; local display1 = nil; local function setupDisplay(na...
nilq/small-lua-stack
null
local colour = ImportPackage('colours') function cmd_inv(player) if InventoryData[player] == nil then return AddPlayerChat(player, "<span color=\""..colour.COLOUR_LIGHTRED().."\">Server:</> You have nothing in your inventory!") end if #InventoryData[player] == 0 then return AddPlayerChat(p...
nilq/small-lua-stack
null
--[[ https://gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html SetPedDefaultComponentVariation(ped) ClearPedDecorations(ped) Appearance. Props (0: Hat\ 1: Glass\ 2: Ear\ 6: Watch\ 7: Bracelet): *GetNumberOfPedPropTextureVariations(ped, propId, drawableId) *GetNumberOfPedPropDrawableVar...
nilq/small-lua-stack
null
AddCSLuaFile() AddCSLuaFile("sh_sounds.lua") include("sh_sounds.lua") if CLIENT then SWEP.DrawCrosshair = false SWEP.PrintName = "FN F2000" SWEP.CSMuzzleFlashes = true SWEP.ViewModelMovementScale = 1.15 SWEP.MuzzleEffect = "muzzleflash_6" SWEP.PosBasedMuz = false SWEP.SnapToGrip = true SWEP.ShellScale = 0.6 ...
nilq/small-lua-stack
null
-- ltfl - Lua Tools For Linux (light fall) -- -- Returns true if the subsystem is 'block' -- and the devtype is 'disk' -- and it has a ID_BUS that is not NULL -- and the ID_TYPE is 'disk' -- -- This will also catch those usb thumb drives local function isPhysicalDisk(dev) if dev.IsInitialized and dev:getProperty("sub...
nilq/small-lua-stack
null
dofile(ModPath .. "/classes/UT.lua") local packages = {} local settings = UT.getSettings() -- time mode table.insert(packages, "levels/instances/unique/hlm_random_right003/world") table.insert(packages, "levels/instances/unique/hlm_gate_base/world") table.insert(packages, "levels/instances/unique/hlm_door_wooden_whit...
nilq/small-lua-stack
null
model.floor={} model.floor.handles={} model.floor.handles.e1=sim.getObjectHandle('ResizableFloor_10_50_element') model.floor.handles.e2=sim.getObjectHandle('ResizableFloor_10_50_visibleElement') model.floor.handles.itemsHolder=sim.getObjectHandle('Floor_floorItems') function model.floor.update() local c=model.read...
nilq/small-lua-stack
null
--- Turbo.lua "The parrot". Repeats everything it is told. -- -- Copyright 2013 John Abrahamsen -- -- 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/LICENS...
nilq/small-lua-stack
null