content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
--====================================================================-- -- config.lua --====================================================================-- application = { content = { width = 320, height = 480, scale = "letterbox", }, showRuntimeErrors = false }
nilq/small-lua-stack
null
------------------------------------------------------------------------ --- @file packetChecks.lua --- @brief Check of packet types ------------------------------------------------------------------------ local proto = require "proto/proto" local mod = {} function mod.isIP4(pkt) return pkt.eth:getType() == proto.e...
nilq/small-lua-stack
null
package("libpqxx") set_homepage("http://pqxx.org/") set_description("The official C++ client API for PostgreSQL.") add_urls("https://github.com/jtv/libpqxx/archive/refs/tags/$(version).tar.gz", "https://github.com/jtv/libpqxx.git") add_versions("7.7.0", "2d99de960aa3016915bc69326b369fcee04...
nilq/small-lua-stack
null
-- Generated by CSharp.lua Compiler local System = System local SlipeMtaDefinitions local SlipeServerDisplays local SlipeSharedUtilities local SystemNumerics System.import(function (out) SlipeMtaDefinitions = Slipe.MtaDefinitions SlipeServerDisplays = Slipe.Server.Displays SlipeSharedUtilities = Slipe.Shared.Util...
nilq/small-lua-stack
null
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf/protobuf" module('SkillInfo_pb') SKILLINFO = protobuf.Descriptor(); local SKILLINFO_SKILLHASH_FIELD = protobuf.FieldDescriptor(); local SKILLINFO_SKILLLEVEL_FIELD = protobuf.FieldDescriptor(); local SKILLINFO_SKILLPOINT_FIELD = protobuf.Fie...
nilq/small-lua-stack
null
-- TODO: -- -- highpass filter - requires intelligently switching the wet/dry mix of HP and LP based on which one is in use, or having a priority override -- grids UI local Beets = {} Beets.__index = Beets local ControlSpec = require 'controlspec' local Formatters = require 'formatters' local BREAK_OFFSET = 5 local E...
nilq/small-lua-stack
null
--[[-------------------------------------------------------------------------- Author: Michael Roth <mroth@nessie.de> Copyright (c) 2004, 2005 Michael Roth <mroth@nessie.de> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation ...
nilq/small-lua-stack
null
Label = require("engine.widget.Label") Button = require("engine.widget.Button") Window = require("engine.widget.Window")
nilq/small-lua-stack
null
local escape_tbl_ctl = { ["\\"] = "\\\\" , ["\n"] = "\\n", ["\r"] = "\\r" } local escape_tbl = setmetatable({ ['&amp;'] = '&', ['&quot;'] = '"', ['&apos;'] = "'", ['&lt;'] = '<', ['&gt;'] = '>', }, { __index = function(_,k) local c = string.match(k, "&#(%d+);") return c and string.char(...
nilq/small-lua-stack
null
effectiveness = {{"Super Effective", 4}, {"Effective", 2}, {"Normal", 1}, {"Ineffective", 0.5}, {"Very Ineffective", 0.25}, {"Null", 0}} pokemons = {} seen = 0 catches = 0 viewShiny = nil advancedSearchWindow = nil function init() connect(g_game, { onGameEnd = hide }) pokedexWindow = g_ui.displayUI('pokedex', mo...
nilq/small-lua-stack
null
-- These were copied from the 0.15 base mod and need to be replaced in time with -- graphics for wooden pipes. function assembler2pipepictures() return { north = { filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-N.png", priority = "extra-high", width = 35, height = 18...
nilq/small-lua-stack
null
--[[ MenuBar, by Goranaws --]] local MenuBar = Dominos:CreateClass('Frame', Dominos.Frame) Dominos.MenuBar = MenuBar local WIDTH_OFFSET = 2 local HEIGHT_OFFSET = 20 local MICRO_BUTTONS = { "CharacterMicroButton", "SpellbookMicroButton", "TalentMicroButton", "AchievementMicroButton", "QuestLogMicroButton", "Gu...
nilq/small-lua-stack
null
function assertType(value, expected) assert(type(value) == expected, string.format("expecting a %s as parameter but got %s", expected, type(value)) ) end
nilq/small-lua-stack
null
local ok, cmp = pcall(require, "cmp") if not ok then vim.notify("Unable to require cmp", vim.lsp.log_levels.ERROR, { title = "Plugin error" }) return end local cmpok, cmplsp = pcall(require, "cmp_nvim_lsp") if not cmpok then vim.notify("Unable to require cmp_nvim_lsp", vim.lsp.log_levels.ERROR, { title = "Plugin er...
nilq/small-lua-stack
null
local json = require 'json' local Error = require 'Error.lua' local protocol = require 'utils/protocol.lua' local protodef = require 'utils/protodef.lua' local wrappers = require 'utils/wrappers.lua' ---@class Reql ---@field public conn Connection ---@field public root boolean ---@field public parent Reql|nil ---@fi...
nilq/small-lua-stack
null
include("shared.lua") function ENT:Initialize() self:SetNoDraw(true) end function ENT:OnRemove() self:StopAndDestroyParticles() end
nilq/small-lua-stack
null
if CustomizableWeaponry then AddCSLuaFile() AddCSLuaFile("sh_sounds.lua") include("sh_sounds.lua") if CLIENT then SWEP.DrawCrosshair = false SWEP.PrintName = "G2 Contender" SWEP.CSMuzzleFlashes = false SWEP.ViewModelMovementScale = 1 SWEP.IconLetter = "f" SWEP.SelectIcon = surface.GetTextureID("vgui/hud/cw_co...
nilq/small-lua-stack
null
require("main/colors") require("main/options") require("main/keymaps") vim.opt.secure = true
nilq/small-lua-stack
null
--[[ Script to train a RNN network. ]] local function exec_command(command) print('\n') print('Executing command: ' .. command) print('\n') os.execute(command) end ------------------------------------------------------------------------------------------------------------ local function train_ne...
nilq/small-lua-stack
null
local component = require('component') local sides = require('sides') local inv = component.inventory_controller local robot = require('robot') local shell = require('shell') local args, opts = shell.parse(...) --TODO: Documentation local slot = tonumber(opts.slot) local amount = tonumber(args[1]) or math.huge local...
nilq/small-lua-stack
null
if not modules then modules = { } end modules ['meta-pdf'] = { version = 1.001, comment = "companion to meta-pdf.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } if true then return...
nilq/small-lua-stack
null
local s = smartfs.create("smartfs:form", function(state) state:size(10,7) state:label(2,0,"lbl","SmartFS example formspec!") local usr = state:label(7,0,"user","") if state.location.type ~= "nodemeta" then -- display location user name if it is user or inventory formspec usr:setText(state.location.player) end ...
nilq/small-lua-stack
null
local lib, config, corelib = {}, {}, {} local engine_core = {} local engine_path = debug.getinfo(1).short_src:match("([^%.]*)[\\/][^%.]*%..*$"):gsub("[\\/]", ".") .. "." config.engine_path = engine_path local version_meta = { __tostring = function(self) return table.concat(self, ".") end } local lib_batch_load =...
nilq/small-lua-stack
null
local chatdown=require("wetgenes.gamecake.fun.chatdown") -- conversation trees local bitdown=require("wetgenes.gamecake.fun.bitdown") -- ascii to bitmap local chipmunk=require("wetgenes.chipmunk") -- 2d physics https://chipmunk-physics.net/ -- debug text dump local ls=function(t) print(require("wetgenes.string")...
nilq/small-lua-stack
null
--------------------------------------------------------------------------------------------------- -- --filename: game.entities.ctrl.HealthBarCtrl --date:2019/10/31 0:04:07 --author: --desc: -- --------------------------------------------------------------------------------------------------- local strClassName = 'ga...
nilq/small-lua-stack
null
local function createModel(nClasses) local nClasses = nClasses or 1000 local modelType = 'A' -- on a titan black, B/D/E run out of memory even for batch-size 32 -- Create tables describing VGG configurations A, B, D, E local cfg = {} if modelType == 'A' then cfg = {64, 'M', 128, 'M', 256, 256,...
nilq/small-lua-stack
null
propertyGetters = { object = { model = getElementModel, doublesided = function(element) if isElementDoubleSided then return isElementDoubleSided(element) and "true" or "false" else return getElementData(element,"doublesided")=="true" and "true" or "false" end end, scale = getObjectSc...
nilq/small-lua-stack
null
object_draft_schematic_space_weapon_wpn_mining_laser_mk3 = object_draft_schematic_space_weapon_shared_wpn_mining_laser_mk3:new { } ObjectTemplates:addTemplate(object_draft_schematic_space_weapon_wpn_mining_laser_mk3, "object/draft_schematic/space/weapon/wpn_mining_laser_mk3.iff")
nilq/small-lua-stack
null
function lovr.conf(t) t.modules.headset = false t.window.width = 800 t.window.height = 600 end
nilq/small-lua-stack
null
require 'coroutine' local time = require 'lib.time' local async = {} -- This file implements waitSeconds, waitSignal, signal, and their supporting stuff. -- This table is indexed by coroutine and simply contains the time at which the coroutine -- should be woken up. local WAITING_ON_TIME = {} local WAITING_ON_SIGNA...
nilq/small-lua-stack
null
local playsession = { {"MeggalBozale", {16556}}, {"Nukesman", {3159}}, {"Reyand", {26320}}, {"Nikkichu", {40741}}, {"Peto7002", {13075}}, {"JinNJuice", {1773}}, {"zakky0919", {2922}}, {"dimo145", {2648}}, {"corbin9228", {34520}} } return playsession
nilq/small-lua-stack
null
----------------------------------------------------------------------------------------------------------------------- -- Base setup -- --------------------------------------------------------------------------------...
nilq/small-lua-stack
null
return { PluginId = 336673829, PluginIcon = "rbxassetid://8325760954", PluginGUID = "csqrl.plugin.plugin-importer", PluginSettingsKey = "2B605F1C627243798979D8221C971C14", DefaultLocale = "en-gb", Version = "3.0.9", }
nilq/small-lua-stack
null
local obj_heart = {} function obj_heart.init() obj_heart.data = {} obj_heart.name = "obj_heart" editor.importObject("SUITS", obj_heart.name, "obj_heart.new", mdl_heart) end function obj_heart.new(x, y) local tbl = {} tbl.x = x tbl.y = y table.insert(obj_heart.data, tbl) end function obj_heart.draw() local i ...
nilq/small-lua-stack
null
--[[ Name: god Desc: Enables godmode on a player Arguments: 1. Targets (players) ]] BSU.SetupCommand("god", function(cmd) cmd:SetDescription("Enables godmode on a player") cmd:SetCategory("utility") cmd:SetAccess(BSU.CMD_ADMIN) cmd:SetFunction(function(self, ply) local targets = self:GetPlayersArg...
nilq/small-lua-stack
null
local Spell = { } Spell.LearnTime = 600 Spell.ApplyFireDelay = 0.4 Spell.ForceAnim = { ACT_VM_PRIMARYATTACK_4 } Spell.Category = HpwRewrite.CategoryNames.Protecting Spell.Description = [[ Makes area around you completely invisible for everyone who is not inside. ]] Spell.OnlyIfLearned = { "Protego" } Spell.NodeOffs...
nilq/small-lua-stack
null
local dconv = require('dproto-conv-gen') local dprotofile = 'type_conversions/dproto/types.dproto' local asn_files = { 'type_conversions/asn/taste-types.asn', 'type_conversions/asn/taste-extended.asn', 'type_conversions/asn/userdefs-base.asn', 'type_conversions/asn/mybase.asn' } local asn = require('asn1_type...
nilq/small-lua-stack
null
-- Copyright (c) 2017-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the license found in the LICENSE file in -- the root directory of this source tree. An additional grant of patent rights -- can be found in the PATENTS file in the same directory. -- --[[ -- -- A parallel data...
nilq/small-lua-stack
null
local cfg = require("lib/config") local iracing = require("api/iracing"):instance(cfg.iracing) local twitch = require("api/twitch"):instance(cfg.twitch) local state = require("api/state"):instance(cfg.state) local ui = require("api/winformui"):instance(cfg.winformui) local common = require("lib/common") local session_...
nilq/small-lua-stack
null
function return_except_last(...) arg = {...} table.remove(arg) return table.unpack(arg) end print(return_except_last(1, 2, 3, 4, 5))
nilq/small-lua-stack
null
math.randomseed(os.time()) print("Munchkin Level Counter") io.read() level = 1 gear = 0 oneshot = 0 against = 0 enemyl = 0 enemye = 0 enemys = 0 runaway = 2 enemyr = 0 fast = 0 slow = 0 tempr = 0 nope = "n" runawayt = 0 enemys = enemyl + enemye print("Help on or off?") print("(\"y\":On)(\"n\":Off)") help = io.read() if...
nilq/small-lua-stack
null
return Def.Actor{ OnCommand=function(self) SL.Global.Stages.Stats[SL.Global.Stages.PlayedThisGame + 1] = { song = GAMESTATE:IsCourseMode() and GAMESTATE:GetCurrentCourse() or GAMESTATE:GetCurrentSong(), TimingWindows = SL.Global.ActiveModifiers.TimingWindows, MusicRate = SL.Global.ActiveModifiers.MusicRate,...
nilq/small-lua-stack
null
----------------------------------- -- Author: Eligio Becerra -- -- Copyright 2009 Eligio Becerra -- ----------------------------------- local setmetatable = setmetatable local tonumber = tonumber local sformat = string.format local smatch = string.match local sgmatch = string.gmatch local t...
nilq/small-lua-stack
null
while wait() do local Self = script:Clone() Self.Parent = script.Parent script.Disabled = true script.Disabled = false wait(0.1) script:Destroy() end
nilq/small-lua-stack
null
local helpers = require "spec.helpers" local cjson = require "cjson" --*****************************************************-- -- Setup to run the tests: -- 1. Setup Openwhisk server and create a action -- using include `action/hello.js` -- 2. Set `config.host` and `config.service_token` --**********************...
nilq/small-lua-stack
null
if minetest.get_modpath("factory") then minetest.registered_nodes["factory:storage_tank_water"].special_tiles[1].name = "ws_water_source_animated.png" minetest.registered_nodes["factory:storage_tank_lava"].special_tiles[1].name = "ws_lava_source_animated.png" end
nilq/small-lua-stack
null
-- require("settings.impatient") local sources = { -- settings "settings.colorschemes", "settings.keymaps", "settings.options", "settings.plugins", -- -- plugins "configs.alpha", "configs.autopairs", "configs.autosave", "configs.better_escape", "configs.bufferline", "con...
nilq/small-lua-stack
null
-- stolen from penlight local function copy_tbl (t) local res = {} for k,v in pairs(t) do res[k] = v end return res end do local WOStateDisqualifier = torch.class('WOStateDisqualifier') -- i assume source is a single sequence w/o start or end tokens. -- this will by default disqualify end-token fu...
nilq/small-lua-stack
null
--[[-- request.set_404_route{ module = module, -- module name view = view -- view name } In case a view or action is not found, the given module and view will be used to display an error page. --]]-- function request.set_404_route(tbl) request.configure(function() request._404_route = tbl -- TODO: ...
nilq/small-lua-stack
null
object_draft_schematic_space_cargo_hold_crg_pob_gunship_huge = object_draft_schematic_space_cargo_hold_shared_crg_pob_gunship_huge:new { } ObjectTemplates:addTemplate(object_draft_schematic_space_cargo_hold_crg_pob_gunship_huge, "object/draft_schematic/space/cargo_hold/crg_pob_gunship_huge.iff")
nilq/small-lua-stack
null
-- Heap contains the following functions: -- .new(comparator) - Creates a new Heap -- comparator: Uses this function to compare values. If none is given, will assume values are numbers and will find smallest value -- Comparator should accept two values and return true if a should be further up the heap than b a...
nilq/small-lua-stack
null
----------------------------------- -- -- tpz.effect.BALLAD -- getPower returns the TIER (e.g. 1,2,3,4) -- DO NOT ALTER ANY OF THE EFFECT VALUES! DO NOT ALTER EFFECT POWER! -- Todo: Find a better way of doing this. Need to account for varying modifiers + CASTER's skill (not target) ----------------------------------- r...
nilq/small-lua-stack
null
function system_log(x,y) interval = 1 font_size = 12.5 spacing = 1.2 local color = color4 timer = (updates % interval) if timer == 0 or conky_start == 1 then result = io.popen("journalctl -n 14 | sed 1d | awk '{$1=$2=$4=\"\"; print $0}' | sed 's/ //' | sed 's/ / /' | fold -w 80 -s") sl_t = {} ...
nilq/small-lua-stack
null
--[[ COPYRIGHT 2021-PRESENT NoahBrahim (noahalhandy.com) - ALL RIGHTS RESERVED. THIS SCRIPT IS ALLOWED TO BE MODIFIED TO SUPPORT DIFFERENT COMMANDS OR KEYBINDS TO TRIGGER THE SCRIPT. DO NOT DISTRIBUTE THIS SOFTWARE WITHOUT STRICT PERMISSION. THIS IS DUE TO THE AMMOUNT OF WORK PUT INTO THIS PROJECT. THANK YOU ...
nilq/small-lua-stack
null
local ProcessRunner = foundation.com.ProcessRunner local case = foundation.com.Luna:new("foundation.com.ProcessRunner") local function wait_until_dead(pr, pid, timeout) local elapsed = 0 while pr:is_alive(pid) do pr:update(0.016) elapsed = elapsed + 0.016 if elapsed > timeout then error("timeout...
nilq/small-lua-stack
null
return {'lid','lidcactus','lidgeld','lidkaart','lidland','lidmaat','lidmaatschap','lidmaatschapsaanvraag','lidmaatschapsbewijs','lidmaatschapsgeld','lidmaatschapskaart','lidnummer','lidocaine','lidstaat','lidwoord','lidbonden','lidmatenboek','lidia','lidwien','lida','lidewij','lidwina','lidy','lidje','lidjes','lidmaats...
nilq/small-lua-stack
null
--[[ 房间右上角菜单 ]] local layerBase = require("games/common2/module/layerBase"); local RoomMenuBarLayer = class(layerBase); RoomMenuBarLayer.s_cmds = { initToolBar = ToolKit.getIndex(); }; RoomMenuBarLayer.ctor = function ( self ) self:init(); end RoomMenuBarLayer.dtor = function ( self ) end Ro...
nilq/small-lua-stack
null
function ObstacleMixin:_GetPathingInfo() local position = self:GetOrigin() + Vector(0, -2, 0) local radius = LookupTechData(self:GetTechId(), kTechDataObstacleRadius, 1.0) local height = 5.0 return position, radius, height end
nilq/small-lua-stack
null
local Edge = {} Edge.__index = Edge local plugin_Settings = require(script.Parent.Parent.Settings) function Edge.new(mesh) local self = setmetatable({}, Edge) self.mesh = mesh self.line = nil self.vertices = {} self.faces = {} return self end function Edge:CreateLine() self.line = Instance.new('Cylinde...
nilq/small-lua-stack
null
#!/usr/bin/env tjost --[[ * Copyright (c) 2015 Hanspeter Portner (dev@open-music-kontrollers.ch) * * This is free software: you can redistribute it and/or modify * it under the terms of the Artistic License 2.0 as published by * The Perl Foundation. * * This source is distributed in the hope that it will be use...
nilq/small-lua-stack
null
local Director = class('Director', Person) function Director:initialize() Sim.Person.initialize(self) while self.age < 15 do Sim.Person.initialize(self) end self.movies = {} self.stats = { Popularity = math.random(), } end return Director
nilq/small-lua-stack
null
-- status listener -- TODO: currently is just the reactor status listener, but this will be modified to be more general local REACTOR_STATUS_PROTOCOL = "Lupus590:extremeReactors/status" peripheral.find("modem", function(side) rednet.open(side) end) local statusMessageBackgroundToggle = true term.setCursorPos...
nilq/small-lua-stack
null
if SERVER then return end local halos = {} local haloCount = 0 local haloFrame = 0 local haloRT, haloMat local localAng = Angle(0,-90,-90) local haloAdd_orig timer.Simple(0,function() haloAdd_orig = halo.Add end) hook.Add("VRMod_Start","halos",function(ply) if ply ~= LocalPlayer() then return end h...
nilq/small-lua-stack
null
local Ans = select(2, ...); local Utils = Ans.Utils; local ListView = Ans.UI.ListView; local Crafting = Ans.Data.Crafting; local EventManager = Ans.EventManager; AnsDestroyPreviewFrameMixin = {}; local REF_CACHE = {}; local resultItems = {}; local waitingForInfo = {}; function AnsDestroyPreviewFrameMixin:ShowTip(f, ...
nilq/small-lua-stack
null
return { init_effect = "", name = "测试-随机技能-治疗之泉-治疗光环", time = 0, picture = "", desc = "治疗光环", stack = 1, id = 60045, icon = 60045, last_effect = "hongsebuff", effect_list = { { type = "BattleBuffField", trigger = { "onUpdate" }, arg_list = { buff_id = 60046, exceptCaster = true, ...
nilq/small-lua-stack
null
-- Abstract UI ReplicatedPseudoInstance -- @author Validark local Players = game:GetService("Players") local Lighting = game:GetService("Lighting") local RunService = game:GetService("RunService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Resources = require(ReplicatedStorage:WaitForChild("R...
nilq/small-lua-stack
null
local present, toggleterm = pcall(require, "toggleterm") if not present then return end toggleterm.setup({ -- size can be a number or function which is passed the current terminal size = function(term) if term.direction == "horizontal" then return 15 elseif term.direction == "vertical" then return vim.o.c...
nilq/small-lua-stack
null
VEHICLE = {}; VEHICLE.ID = '%'; /* VEHICLE.Name = "Tow Truck"; VEHICLE.Make = "International"; VEHICLE.Model = "2674"; VEHICLE.Script = "international_2674"; */ VEHICLE.Name = "Tow Truck"; VEHICLE.Make = ""; VEHICLE.Model = ""; VEHICLE.Script = "towtruck"; VEHICLE.Cost = 0; VE...
nilq/small-lua-stack
null
modifier_item_forest_ring_int = class({}) -------------------------------------------------------------------------------- function modifier_item_forest_ring_int:IsHidden() return true end -------------------------------------------------------------------------------- function modifier_item_forest_ring_int:IsPurg...
nilq/small-lua-stack
null
borderColor = 100 function setup() -- Initialize random math.randomseed(os.time()) -- setup game game = {} game["boundryTop"] = createDefault(512, 0, 1024, 3, borderColor, borderColor, borderColor, 255) game["boundryLeft"] = createDefault(0, 384, 3, 768, borderColor, borderColor, borderColor, 255) game["boun...
nilq/small-lua-stack
null
-- Dependencies local Assets = require("engine.Assets") local Config = require("engine.Config") local Log = require("engine.Log") local Table = require("engine.Table") local Object = require("game.objects.Object") local Mapping = require("game.Mapping") local Level = require("game.Level") -- Room module loc...
nilq/small-lua-stack
null
-- Copyright (c) 2011-2014 Rob Hoelz <rob@hoelz.ro> -- -- 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,...
nilq/small-lua-stack
null
-- References -- https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute -- local colors = require("svgcreate.colors") local RGB = colors.RGBA; local maths = require("svgcreate.maths") local clamp = maths.clamp; local bit = require("bit") local lshift, rshift, band, bor = bit.lshift, bit.rshift, bit.band, bit.bor ...
nilq/small-lua-stack
null
-- All tables in SQL are now WITHOUT ROW ID, so if user -- tries to create table without a primary key, an appropriate error message -- should be raised. This tests checks it. box.cfg{} box.sql.execute("CREATE TABLE t1(a INT PRIMARY KEY, b UNIQUE)") box.sql.execute("CREATE TABLE t2(a UNIQUE, b)") box.sql.execute("CR...
nilq/small-lua-stack
null
function GLib.Enumerator.ArrayEnumerator (tbl, maxIndex) maxIndex = maxIndex or math.huge if maxIndex == math.huge then local i = 0 return function () i = i + 1 return tbl [i] end else local i = 0 return function () i = i + 1 if i > maxIndex then return nil end return tbl [i] end end en...
nilq/small-lua-stack
null
--[[ PLAYER SPAWN POINT LIST revive_point(<map_id>, <x_pos>, <y_pos>); start_point(<map_id>, <x_pos>, <y_pos>); respawn_point(<map_id>, <x_pos>, <y_pos>); --]] revive_point(54, 511000, 4250000); respawn_point(57, 5764.81, 5185.23); respawn_point(57, 5432.11, 5354.7); respawn_point(57, 5538.55, 5174.8); start_point(57, ...
nilq/small-lua-stack
null
UpgradesMenu = TuningMenu:subclass "UpgradesMenu" local PARAM_CHANGE_SPEED = 1 function UpgradesMenu:init(position, rotation) self.super:init(position, rotation, Vector2(1.4, 1.17)) self.headerHeight = 70 self.headerText = exports.dpLang:getString("garage_tuning_config_upgrades") self.buttonHeight = 80 self.but...
nilq/small-lua-stack
null
-- debugging functions cartdata_overlay_enabled = 2 function overlay_init() -- render debug overlay and profiling HUD overlay_enabled = dget(cartdata_overlay_enabled) == 0 overlay_menuitem() end function overlay_menuitem() overlay_enabled = not overlay_enabled if overlay_enabled then menuitem(2, "◆ debug overl...
nilq/small-lua-stack
null
AddCSLuaFile("shared.lua") include('shared.lua') /*----------------------------------------------- *** Copyright (c) 2012-2019 by DrVrej, All rights reserved. *** No parts of this code or any of its contents may be reproduced, copied, modified or adapted, without the prior written consent of the author, unless other...
nilq/small-lua-stack
null
local tap = require('tap') -- Test file to demonstrate assertion after `mremap()` on arm64. -- See also, https://github.com/LuaJIT/LuaJIT/issues/671. local test = tap.test('lj-671-arm64-assert-after-mremap') test:plan(1) -- `mremap()` is used on Linux to remap directly mapped big -- (>=DEFAULT_MMAP_THRESHOLD) memory...
nilq/small-lua-stack
null
--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-- -- Rectangle -- -- Notes: -- - Should work fine, but I haven't tested everything. -- - It has a lot of stuff, but you can remove stuff -- you don't use. -- -- Usage: -- Use the general (slower) rec constructo...
nilq/small-lua-stack
null
require "/scripts/vec2.lua" require "/lib/stardust/network.lua" require "/lib/stardust/tasks.lua" storagenet = { } function storagenet:onConnect() end function storagenet:onDisconnect() end local queue = taskQueue() local svc = { } local openPlayers = { } local playerTimeout = -1 local inUse local lastUsedB...
nilq/small-lua-stack
null
local S = homedecor.gettext homedecor.register("filing_cabinet", { description = S("Filing Cabinet"), mesh = "homedecor_filing_cabinet.obj", tiles = { homedecor.plain_wood, "homedecor_filing_cabinet_front.png", "homedecor_filing_cabinet_bottom.png" }, groups = { snappy = 3 }, sounds = default.node_sound_wo...
nilq/small-lua-stack
null
return require 'lib/couv'
nilq/small-lua-stack
null
--------------------------------------------- -- Auroral Drape -- -- Description: Silence and Blind Area of Effect (10.0') -- Type: Enfeebling -- Utsusemi/Blink absorb: Ignores shadows --------------------------------------------- require("scripts/globals/monstertpmoves") require("scripts/globals/settings") require("sc...
nilq/small-lua-stack
null
local Health = Class(function(self, inst) self.inst = inst self.maxhealth = 100 self.minhealth = 0 self.currenthealth = self.maxhealth self.invincible = false self.vulnerabletoheatdamage = true self.takingfiredamage = false self.takingfiredamagetime = 0 self.fire_damage_scale = 1 ...
nilq/small-lua-stack
null
return function(self) if not self:on_clean_line() then self:new_line() end end
nilq/small-lua-stack
null
local thread = require 'bee.thread' local errlog = thread.channel 'errlog' local TaskId = 0 local IdlePool = {} local RunningList = {} local GCInfo = {} thread.newchannel 'gc' local function createTask(name) TaskId = TaskId + 1 GCInfo[TaskId] = false local id = TaskId local requestName = 'request' ...
nilq/small-lua-stack
null
local main = require("plugins.transform.main") -- The unit tests are run within a timer phase in a headless Nginx process. -- Since `set_header` and `ngx.var.http_` API are disabled in this phase we have to stub it -- to avoid `API disabled in the current context` error. describe("main", function() descri...
nilq/small-lua-stack
null
local S = contraptions_mod.S minetest.register_node("useful_contraptions:putter_on", { description = S("Putter"), _doc_items_longdesc = S("A putter that puts items laying on top into a chest below."), _doc_items_usagehelp = S("Right-click the putter or send a mesecon signal to it, to switch it on or off."), tiles ...
nilq/small-lua-stack
null
-- function! BuildComposer(info) -- if a:info.status != 'unchanged' || a:info.force -- !cargo build --release --locked -- endif -- endfunction local vim = vim local function plug(path, config) vim.validate { path = {path, 's'}; config = {config, vim.tbl_islist, 'an array of packages'}; } vim.fn...
nilq/small-lua-stack
null
local PANEL = {} local button_height = 25 local button_width = 500 local menu_bar_height = 25 local scroll_bar_width = 14 local ic_selected = Material("vgui/pam/ic_selected") local ic_not_selected = Material("vgui/pam/ic_not_selected") local col_base = {r = 40, g = 40, b = 40, a = 255} local col_base_darker = {r = 3...
nilq/small-lua-stack
null
require 'nn' require 'rnn' require 'hdf5' g = hdf5.open("data/chorales_rnn.hdf5") Xtrain, ytrain, Xtest, ytest = {}, {}, {}, {} num_train, num_dev, num_test = 260, 32, 33 for i = 1, num_train do Xtrain[i] = g:read(string.format('train/chorale%d_X', i-1)):all()[{ {}, {1, 10} }]:t() ytrain[i] = g:read(string.format('t...
nilq/small-lua-stack
null
local config = { formatting = { typescript = { cmd = [[ :norm! gg=G ]], }, lua = { -- cmd = [[ !stylua % ]], }, }, code_generation = { typescript = { extract_function = function(opts) return { cre...
nilq/small-lua-stack
null
-- scaffold geniefile for Cinder Cinder_script = path.getabsolute(path.getdirectory(_SCRIPT)) Cinder_root = path.join(Cinder_script, "Cinder") Cinder_includedirs = { path.join(Cinder_script, "config"), Cinder_root, } Cinder_libdirs = {} Cinder_links = {} Cinder_defines = {} ---- return { _add_includedirs = funct...
nilq/small-lua-stack
null
-- local pattern_time = require("pattern") local Grid_={} function Grid_:new(args) local m=setmetatable({},{__index=Grid_}) local args=args==nil and {} or args -- initiate the grid m.g=grid.connect() m.g.key=function(x,y,z) if m.grid_on then m:grid_key(x,y,z) end end print("grid columns: "...
nilq/small-lua-stack
null
Citizen.CreateThread(function() local configLoaded = false while not configLoaded do Citizen.Wait(100) TAC.TriggerServerCallback('tigoanticheat:getServerConfig', function(config) TAC.Config = config configLoaded = true end) end return end)
nilq/small-lua-stack
null
-------------------------------- -- @module Texture2D -- @extend Ref -- @parent_module cc -------------------------------- -- @function [parent=#Texture2D] getMaxT -- @param self -- @return float#float ret (return value: float) -------------------------------- -- @function [parent=#Texture2D] getStringForFo...
nilq/small-lua-stack
null
-- Copyright (C) 2018-2021 by KittenOS NEO contributors -- -- Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTI...
nilq/small-lua-stack
null
local total = 0; local forecast = 0; local period = 6; local initialized = 0; local repeatcode = 0; local numrepeats = 0; function is_leap_year(year) local ly = 0; if year % 4 == 0 then if year % 100 == 0 then if year % 400 == 0 then ...
nilq/small-lua-stack
null