content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
local luaunit = require("luaunit") local middleclass = require("middleclass") local types = require("luaplot.types") -- luacheck: globals TestTypes TestTypes = {} function TestTypes.test_is_number_with_limits_false_not_number() local result = types.is_number_with_limits(nil) luaunit.assert_is_boolean(result) l...
nilq/small-lua-stack
null
local awful = require('awful') local naughty = require('naughty') local modkey = require('config.keys.mod').modKey local altkey = require('config.keys.mod').altKey local apps = require('config.apps') local hotkeys_popup = require('awful.hotkeys_popup').widget local hotkeys_popup_custom = require('module.hotkeys-popup...
nilq/small-lua-stack
null
if data.raw.item["thorium-fuel-cell"] then table.insert(data.raw["technology"]["mixed-oxide-fuel"].effects, {type = "unlock-recipe", recipe = "thorium-mixed-oxide"}) local plate="angels-plate-lead" if mods["bobplates"] then plate="lead-plate" end clowns.functions.replace_ing("thorium-fuel-cell","iron-plat...
nilq/small-lua-stack
null
-- menu.lua -- Copyright (c) 2018 Jon Thysell local game = require "game" local Menu = game.Game:new({ id = "menu", title = "RetroLove Menu", caption = "Made with LÖVE", games = {}, selectedGame = 0, boxSize = 80, boxLeftMargin = 10, }) function Menu:keyReleasedGame(key) if key == "q"...
nilq/small-lua-stack
null
print((string.gsub("hello, up-down!", "%A", ".")))
nilq/small-lua-stack
null
local iHelpers = require("KnownUserImplementationHelpers") local knownUser = require("KnownUser") local utils = require("Utils") iHelpers.system.getConnectorName = function() return "nginx-" .. ngx.config.nginx_version end iHelpers.json.parse = function(jsonStr) local json = require("json") return json.parse(jsonS...
nilq/small-lua-stack
null
-- config: (lint (only var:unresolved-member) (dynamic-modules a_module)) local a_module, b_module = require("a_module"), require("b_module") print(a_module.unknown) print(b_module.unknown)
nilq/small-lua-stack
null
-- very simple lexer program which looks at all identifiers in a Lua -- file and checks whether they're in the global namespace. -- At the end, we dump out the result of count_map, which will give us -- unique identifiers with their usage count. -- (an example of a program which itself needs to be careful about wha...
nilq/small-lua-stack
null
-- language specific higlights local lush = require("lush") local base = require("lush_jsx.base") local styles = require("lush_jsx.settings").styles local M = {} M = lush(function() return { clojureKeyword {base.LushJSXBlue}, clojureCond {base.LushJSXOrange}, clojureSpecial {base.LushJSXOrange}, clo...
nilq/small-lua-stack
null
local opts = require("nvim-scratchpad.config").options local type_assert = require("nvim-scratchpad.helpers").type_assert local M = {} M.setup = function (custom_opts) require("nvim-scratchpad.config").set_options(custom_opts) end M.scratchpad = function (ext) local dir if type(opts.scratchpad_dir) == "f...
nilq/small-lua-stack
null
object_tangible_item_beast_converted_murra_decoration = object_tangible_item_beast_shared_converted_murra_decoration:new { } ObjectTemplates:addTemplate(object_tangible_item_beast_converted_murra_decoration, "object/tangible/item/beast/converted_murra_decoration.iff")
nilq/small-lua-stack
null
local t = {} t.init = {x = 2, y = 2} t.layout = {} t.layout[1] = { {0, 0, 6, 0, 0}, {0, 2, 2, 0, 1}, {5, 3, 6, 2, 6}, {0, 2, 2, 0, 1}, {0, 0, 6, 0, 0} } t.moves = {4, 5} return t
nilq/small-lua-stack
null
--[[ LuCI - Lua Configuration Interface Copyright 2019 lisaac <lisaac.cn@gmail.com> 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 $Id$ ]]-- require "luc...
nilq/small-lua-stack
null
local Dictionary = { copy = require(script.copy), copyDeep = require(script.copyDeep), count = require(script.count), equals = require(script.equals), equalsDeep = require(script.equalsDeep), every = require(script.every), filter = require(script.filter), flatten = require(script.flatten), flip = require(scrip...
nilq/small-lua-stack
null
local gui = require 'yue.gui' local ev = require 'gui.event' local ca = require 'gui.new.common_attribute' local function tree_icon(view) local canvas1 = gui.Canvas.createformainscreen{width=24, height=24} local painter = canvas1:getpainter() painter:setfillcolor('#CCC') painter:beginpath() ...
nilq/small-lua-stack
null
local test_env = require("test/test_environment") test_env.unload_luarocks() local fs = require("luarocks.fs") local is_win = test_env.TEST_TARGET_OS == "windows" describe("Luarocks fs test #whitebox #w_fs", function() describe("fs.Q", function() it("simple argument", function() assert.are.same(is_w...
nilq/small-lua-stack
null
CHIP_DATA_ADDRESS = {} CHIP_DATA_ADDRESS.BASE_OFFSET_FIRST_CHIP = 0x08011530 CHIP_DATA_ADDRESS.BYTES_PER_CHIP = 32 function CHIP_DATA_ADDRESS.from_id(id) return CHIP_DATA_ADDRESS.BASE_OFFSET_FIRST_CHIP + (id - 1) * CHIP_DATA_ADDRESS.BYTES_PER_CHIP end return CHIP_DATA_ADDRESS
nilq/small-lua-stack
null
local take = package.loaded.take take.utils = {} function take.utils.basename2lib(name) if jit.os == 'Windows' then return name .. '.dll' elseif jit.os == 'OSX' then return 'lib' .. name .. '.dylib' else return 'lib' .. name .. '.so' end end function take.utils.basename2exe(name) if ...
nilq/small-lua-stack
null
local Plugin = Plugin function Plugin:Initialise() self.Enabled = true end function Plugin:Cleanup() self.BaseClass.Cleanup( self ) self.Enabled = false end --necessary to enable the evolve button during PGP function Plugin:Think( DeltaTime ) if Plugin.dt.PGP_On then Client.GetLocalPlayer().g...
nilq/small-lua-stack
null
local M_PI = math.pi local sw, sh = stage:getSize() stage:addChild(DisplayImage.new(Image.new("assets/images/bg.png"):extend(sw, sh, "repeat"))) local car0 = assets:loadDisplay("assets/images/car.png"):setPosition(0, 48 * 0) local car1 = assets:loadDisplay("assets/images/car.png"):setPosition(0, 48 * 1) local ...
nilq/small-lua-stack
null
-- destroy random monsters set_post_entity_spawn(function(ent, flags) ent.flags = set_flag(ent.flags, ENT_FLAG.DEAD) ent:destroy() end, SPAWN_TYPE.LEVEL_GEN_GENERAL, 0, ENT_TYPE.MONS_SKELETON, ENT_TYPE.MONS_BAT, ENT_TYPE.MONS_SCARAB) -- destroy treasure, random pots set_post_entity_spawn(function(ent, flags) ...
nilq/small-lua-stack
null
vim.g.onedark_dark_sidebar = false vim.api.nvim_command [[colorscheme onedark]]
nilq/small-lua-stack
null
-- libunbound based net.adns replacement for Prosody IM -- Copyright (C) 2012-2015 Kim Alvefur -- Copyright (C) 2012 Waqas Hussain -- -- This file is MIT licensed. local setmetatable = setmetatable; local table = table; local t_concat = table.concat; local t_insert = table.insert; local s_byte = string.byte; local s_c...
nilq/small-lua-stack
null
Keybind.g( { { 'x', 'iu', ':lua require"treesitter-unit".select()<CR>', { noremap = true }, }, { 'x', 'au', ':lua require"treesitter-unit".select(true)<CR>', { noremap = true }, }, ...
nilq/small-lua-stack
null
include "shared.lua" include "cl_draw.lua" include "cl_fullscreen.lua" include "net.lua" local CeilPower2 = MediaPlayerUtils.CeilPower2 function MEDIAPLAYER:NetReadUpdate() -- Allows for another media player type to extend update net messages end function MEDIAPLAYER:OnNetReadMedia( media ) -- Allows for another m...
nilq/small-lua-stack
null
local Timer = require "lib.timer" local info_state = { load = function(self) self.font = love.graphics.newFont("assets/mr_pixel/Mister Pixel Regular.otf", 40) love.graphics.setFont(self.font) self.opening_text = [[ I am Defne. My dad thinks I eat a lot of chocolate, and he didn't buy m...
nilq/small-lua-stack
null
local Objects = { createObject ( 6448, 853.7002, 2160.5, 13.5, 0, 0, 359.495 ), createObject ( 6450, 879.5, 2278.7998, 12.1, 0, 0, 179.747 ), createObject ( 8411, 868.29999, 2225.19995, -45.1, 0, 0, 359.495 ), createObject ( 8411, 868.5, 2250.6001, -45.1, 0, 0, 359.489 ), createObject ( 8411, 868.70001, 2276, -45.1, 0,...
nilq/small-lua-stack
null
---@type Ellyb local Ellyb = Ellyb:GetInstance(...); local Tooltips = {}; Ellyb.Tooltips = Tooltips; Tooltips.ANCHORS = { --- Align the top right of the tooltip with the bottom left of the owner BOTTOMLEFT= "BOTTOMLEFT", --- Align the top left of the tooltip with the bottom right of the owner BOTTOMRIGHT= "BOTTOM...
nilq/small-lua-stack
null
Shooter = Object:extend() function Shooter:new(x, y, width, height, laserLength) self.x = x self.y = y self.width = width self.height = height self.dir = 0 self.lasers = {} self.laserLength = laserLength end function Shooter:lookAtMouse() local base = love.mouse.getX() - self.x local...
nilq/small-lua-stack
null
return { home = os.getenv("HOME") .. "/.shiplog", }
nilq/small-lua-stack
null
function split(line) local wa = {} for i in string.gmatch(line, "%S+") do table.insert(wa, i) end return wa end -- main local file = assert(io.open("days_of_week.txt", "r")) io.input(file) local line_num = 0 while true do local line = io.read() if line == nil then break end line_nu...
nilq/small-lua-stack
null
local Behavior = CreateAIBehavior("VtolUnIgnorant", "HeliUnIgnorant", { Alertness = 0, })
nilq/small-lua-stack
null
function require_fix(filename) local file = io.open(filename, 'r') local new_file_str = '' for line in file:lines() do if line:find('require') then print(line) local first_quota = line:find('\'') if first_quota then local second_quota = line:find('\'', first_quota + 1) local ...
nilq/small-lua-stack
null
local playsession = { {"tyssa", {310665}}, {"Killeraoc", {1569244}}, {"Tony3D", {1175336}}, {"agenda51", {204935}}, {"drakferion", {1560485}}, {"rlidwka", {1294698}}, {"teomarx", {520169}}, {"Thomas.wur", {509285}}, {"Thoren", {137419}}, {"TheEggOnTop", {1516380}}, {"Domi_playerHD", {8932}}, {"LastWanderer"...
nilq/small-lua-stack
null
local lu = require 'luaunit' local request = require 'http.request' local xtest = require 'test.xtest' local M = {} function M.config_http() return { log = {level = 'd', file = 'flash_http.out'}, server = {host = 'localhost', port = 0}, middleware = {'flash', function(req, res) if req.url.path == ...
nilq/small-lua-stack
null
local col = {} col.foreground = "#ffffff" col.background = "#131a21" col.cursor_bg = "#a3b8ef" col.cursor_fg = "#a3b8ef" col.cursor_border = "#a3b8ef" col.split = "#3b4b58" col.ansi = { "#29343d", "#f9929b", "#7ed491", "#fbdf90", "#a3b8ef", "#ccaced", "#9ce5c0", "#ffffff" } col.brights = { "#3b4b58", "#fc...
nilq/small-lua-stack
null
local export = { } local memory = require 'families.internals.memory' local reason = require 'families.internals.reason' ------------------------------------------------------------------------------- function export: __index (selector) if memory.destroyed[ self ] then error (reason.invalid.destroyed) ...
nilq/small-lua-stack
null
local PICKUP = {} local function AddNotification(tbl, notification) return { [1] = notification, [2] = tbl[1] or "", [3] = tbl[2] or "", [4] = tbl[3] or "", [5] = tbl[4] or "" } end function PICKUP.Add(player, msg) player.clientUserData.notification = AddNotification(player.clientUserData.notification,...
nilq/small-lua-stack
null
-- General camera parameters FieldOfView = 90.000000 ClipNear = 1 ClipFar = 9999 TerrainClip = 1.0 -- Interpolation in camera motion and camera snapping -- -- Rate = rate to interpolate -- Base = base to perform interpolation in (2.71828 for linear, must be >1) -- Threshold = threshold to start performing interpolati...
nilq/small-lua-stack
null
-- procedural mesh examples b = BinooAPI b:CreateSphere("sphere", 3, 8) b:CreateBox("box", 1, 1, 1, 3,3,3) b:CreateCone("cone", 1, 1, 0, 3,3) b:CreatePlane("plane", 1, 1, 3, 3) b:CreateSlope("slope", 1, 2, 3) b:CreateStairs("stairs", 5, 2, 2, 3) b:CreateTorus("torus", 0, 45, 1, 0.25, 32, 4)
nilq/small-lua-stack
null
return { corawin = { acceleration = 0, activatewhenbuilt = true, brakerate = 0, buildcostenergy = 1207, buildcostmetal = 158, builder = false, buildpic = "corawin.dds", buildtime = 6000, category = "ALL SURFACE", collisionvolumeoffsets = "0 -7 0", collisionvolumescales = "60 90 60", collisionvo...
nilq/small-lua-stack
null
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg)...
nilq/small-lua-stack
null
---------------------【1.配置信息】----------------------- client_id=wifi.sta.getmac() device_type='relay' cl=nil -- [1.2 GPIO配置] pin_led = 0 pin_relay=1 gpio.mode(pin_led,gpio.OUTPUT) gpio.mode(pin_relay,gpio.OUTPUT) gpio.write(pin_led,gpio.LOW) gpio.write(pin_relay,gpio.LOW) ---------------------【2.设备连接】------------------...
nilq/small-lua-stack
null
--[[ Copyright (C) 2018 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope th...
nilq/small-lua-stack
null
done = function(summary, latency, requests) io.stderr:write("uri ; rps ; latency in ms(50%) ; latency in ms(95%)\n") io.stderr:write(string.format("%s; ", wrk.path)) io.stderr:write(string.format("%s; ", summary.requests / summary.duration * 1000000 )) for _, p in pairs({50, 95}) do n = latency:percen...
nilq/small-lua-stack
null
local addon, Pesky = ... Pesky.Data = {} Pesky.Data.Minion = { ["mn.mn.04A1207307F7879B"] = { name = "King Humbart", icon = "item_icons\\frank_birlen_head" }, ["mn.mn.00F115FB3FEC7350"] = { name = "Warboss Drak", icon = "item_icons\\mount_croc_bb" }, ["mn.mn.2C92A06CE24F172B"] = { name = "Ilchorin", icon = "item_ic...
nilq/small-lua-stack
null
{data={name="Explorer Annnne", author="Magnus siiftun1857 Frankline", color0=0x984ff, color1=0xea8700, color2=0x3f3f3f, wgroup={0, 0, 2, 0}}, blocks={ {0x1604b8, {-18.435, 0.142}, command={faction=1443}, features=COMMAND|THRUSTER|GENERATOR|ASSEMBLER|CANNON_BOOST|TRACTOR|FACTORY|MELEE|UNIQUE}, {0x160519, {1...
nilq/small-lua-stack
null
object_tangible_deed_pet_deed_horned_platile_deed = object_tangible_deed_pet_deed_shared_horned_platile_deed:new { } ObjectTemplates:addTemplate(object_tangible_deed_pet_deed_horned_platile_deed, "object/tangible/deed/pet_deed/horned_platile_deed.iff")
nilq/small-lua-stack
null
local module = {} function module.onEnable(entity, component) local lamp = entity for index, possibleClickDetector in pairs(lamp:GetDescendants()) do if possibleClickDetector:IsA("ClickDetector") then possibleClickDetector.MouseClick:connect(function() for index, possibleLight in pairs(lamp:GetDescendants...
nilq/small-lua-stack
null
Marine.kWalkBackwardSpeedScalar = 0.9
nilq/small-lua-stack
null
local GSE = GSE local L = GSE.L local Statics = GSE.Static --- Return the characters current spec id function GSE.GetCurrentSpecID() local version, build, date, tocversion = GetBuildInfo() local majorVersion = GSE.split(version, '.') if tonumber(majorVersion[1]) == 1 then return GSE.GetCurrentClassID() and...
nilq/small-lua-stack
null
GROUP_NAME = "emergency" Models = { [`blazer2`] = "cruiser", [`dcrfpiu`] = "cruiser", [`dcrspeedo`] = "cruiser", [`dcrtahoe`] = "cruiser", [`dcrtahoe2`] = "cruiser", [`dpscharger`] = "cruiser", [`dpscharger2`] = "cruiser", [`dpscvpi`] = "cruiser", [`dpsf150`] = "cruiser", [`dpsfpis`] = "cruiser", [`dpsfpiu`...
nilq/small-lua-stack
null
local metric_tube_inject_item_calls = monitoring.counter( "pipeworks_tube_inject_item_calls", "count of pipeworks.tube_inject_item calls" ) local metric_tube_inject_item_time = monitoring.counter( "pipeworks_tube_inject_item_time", "time of pipeworks.tube_inject_item calls" ) local metric_tube_inject_item_limited...
nilq/small-lua-stack
null
UiTile = UiCopyTable(dxMain) function UiTile:Create(x, y, sx, sy,image,text,parent) local tile = setmetatable({ x=x, y=y, sx=sx, sy=sy, text = text, children = {}, parent = false, visible = true, el = createElement("dxtile"), hover = false, redraw = true, enabled = true, ty...
nilq/small-lua-stack
null
local _ = require("levee")._ return { test_core = function() local t = {foo = "bar", more = "more\nnewline", nested = {1, {two = 2}, 3}} _.repr(t) t["t"] = t _.repr(t) end, }
nilq/small-lua-stack
null
--- === cp.apple.finalcutpro.browser.AppearanceAndFiltering === --- --- Clip Appearance & Filtering Menu Popover local require = require --local log = require("hs.logger").new("appearanceAndFiltering") local axutils = require "cp.ui.axutils" local Button = require "cp.u...
nilq/small-lua-stack
null
local PANEL = {} local MODEL_ANGLE = Angle(0, 45, 0) function PANEL:Init() self.brightness = 1 self:SetCursor("none") self.OldSetModel = self.SetModel self.SetModel = function(self, model) self:OldSetModel(model) local entity = self.Entity if (IsValid(entity)) then local sequence = entity:Sel...
nilq/small-lua-stack
null
--MCmobs v0.2 --maikerumine --made for MC like Survival game --License for code WTFPL and otherwise stated in readmes --dofile(minetest.get_modpath("mobs").."/api.lua") --################### --################### AGENT --################### mobs:register_mob("mobs_mc:63agent", { type = "animal", passive = true, ...
nilq/small-lua-stack
null
module(..., package.seeall) function apply(env, options) -- load the generic GCC toolset first tundra.unitgen.load_toolset("gcc", env) env:set_many { ["NATIVE_SUFFIXES"] = { ".c", ".cpp", ".cc", ".cxx", ".m", ".mm", ".a", ".o" }, ["CXXEXTS"] = { "cpp", "cxx", "cc", "mm" }, ["FRAMEWORKS"] = "", [...
nilq/small-lua-stack
null
return (function(self, event) return api.UnregisterEvent(self, event) end)(...)
nilq/small-lua-stack
null
function RegisterHooks() cPluginManager:AddHook(cPluginManager.HOOK_TICK, OnTick) cPluginManager:AddHook(cPluginManager.HOOK_KILLING, OnKilling) cPluginManager:AddHook(cPluginManager.HOOK_TAKE_DAMAGE, OnTakeDamage) cPluginManager:AddHook(cPluginManager.HOOK_PLAYER_DESTROYED, OnPlayerDestroyed) cPluginManager:AddHo...
nilq/small-lua-stack
null
require("config") --Changes require("prototypes.changes") --Dust require("prototypes.copper-dust") require("prototypes.iron-dust") --Masher require("prototypes.masher") require("prototypes.masher-2") --Furnace require("prototypes.coal-furnace-3") require("prototypes.electric-furnace-2") --Furnace require("prototypes.in...
nilq/small-lua-stack
null
-- https://github.com/w3c/web-platform-tests/blob/8c07290db5014705e7daa45e3690a54018d27bd5/dom/nodes/Element-remove.html local gumbo = require "gumbo" local input = [[ <!DOCTYPE html> <meta charset=utf-8> <title>Element.remove</title> <link rel=help href="http://dom.spec.whatwg.org/#dom-childnode-remove"> <div id=log...
nilq/small-lua-stack
null
match_null_layout= { name="match_null_layout",type=0,typeName="View",time=0,x=0,y=0,width=0,height=0,visible=1,nodeAlign=kAlignTopLeft,fillParentWidth=1,fillParentHeight=1 } return match_null_layout;
nilq/small-lua-stack
null
-- Pattern Awards -- Pattern Novice awards.register_achievement("tinker_pattern_novice", { title = tinkers_testers.S("Pattern Novice"), description = tinkers_testers.S("Craft 32 blank patterns") trigger = { type = "craft", item = "tinkers_testers:blank_pattern", target = 32 } }) ...
nilq/small-lua-stack
null
--[[ TheNexusAvenger Implementation of a command. --]] local BaseCommand = require(script.Parent.Parent:WaitForChild("BaseCommand")) local Command = BaseCommand:Extend() --[[ Creates the command. --]] function Command:__new() self:InitializeSuper("change","BasicCommands","Changes the stat of a set of players."...
nilq/small-lua-stack
null
return {'ketamine','ketchup','ketel','ketelaar','ketelbikker','ketelbink','ketelbinkie','ketelboeter','ketelbouw','ketelbouwer','keteldal','ketelhuis','ketelinstallatie','ketelkoek','ketellapper','ketelmuziek','ketelruim','ketelsteen','keteltrom','keten','ketenaansprakelijkheid','ketenbeheer','ketenbeheersing','ketenbe...
nilq/small-lua-stack
null
describe('defaultIfEmpty', function() it('errors if the source errors', function() expect(Rx.Observable.throw():defaultIfEmpty(1).subscribe).to.fail() end) it('produces the values from the source unchanged if at least one value is produced', function() expect(Rx.Observable.fromRange(3):defaultIfEmpty(7))...
nilq/small-lua-stack
null
local util = require "util" local values = function(dict) local gen, state, k, v = pairs(dict) return function() k, v = gen(state, k, v) if v ~= nil then return v end end end local dap = util.try_require "dap" local dapui = util.try_require "dapui" if dap and dapui then dap.set_...
nilq/small-lua-stack
null
function decompresscolors(meshlist) for meshindex = 1, #meshlist do local mesh = meshlist[meshindex] if mesh.colors~=nil then local colors = mesh.colors mesh.colors = {} for color, group in pairs(colors) do for groupitemindex = 1, #group do local gro...
nilq/small-lua-stack
null
--[[ credits: factorio devs --]] --[[ Measurement results: 0.18.3, 2020-2-4, dimensions = 256, 4225 entities, no research, 6.4ms script update time. 0.18.3, 2020-2-4, dimensions = 256, 4225 entities, all research, 6.2ms script update time. 0.18.3, 2020-2-4, dimensions = 128, 1089 entities, no research, 2.1ms script u...
nilq/small-lua-stack
null
PauseState = Class{__includes = BaseState} function PauseState:render() love.graphics.setFont(flappyFont) love.graphics.printf('PAUSED', 0, 64, VWIDTH, 'center') love.graphics.setFont(mediumFont) love.graphics.printf('Press P to unpause. ', 0, 160, VWIDTH, 'center') end
nilq/small-lua-stack
null
local function setModuleSlots(name) for _,m in pairs(data.raw[name]) do if m.module_specification == nil then m.module_specification = { module_slots = 1 } m.allowed_effects = {"consumption", "speed", "productivity", "pollution"} end end end setModuleSlots("assembling-machin...
nilq/small-lua-stack
null
return Def.ActorFrame { LoadActor("arrow") .. { InitCommand = function(self) self :y(8) :shadowlengthx(0) :shadowlengthy(2) end }, Def.BitmapText { Font = "Common Normal", InitCommand = function(self) self :y(-8) :settext("Barely") :shadowlengthx(0) :shadowlengthy(2) :st...
nilq/small-lua-stack
null
Digraph = Core.class() function Digraph:init(nNodes) self.nNodes = nNodes self.nodes = {} self.edges = {} for i=1, nNodes do self.nodes[i] = Node.new(i) end end function Digraph:addEdge(node1, node2) local newEdge = Edge.new(node1, node2) table.insert(self.edges, newEdge) node1:addEdge(newEdg...
nilq/small-lua-stack
null
local me = ... local M = { } local name1 = "module" local name2 = "import" local TK = require("PackageToolkit") local m = TK[name1][name2](me, "m/../m/./m2") M.run = function(msg) if msg == nil then msg = "" end print(TK.ui.dashed_line(80, '-')) print(string.format("test %s.%s()", name1, name2)) print(msg...
nilq/small-lua-stack
null
-- -*- Mode: Lua; -*- -- -- rpl-appl-test.lua -- -- © Copyright IBM Corporation 2017. -- LICENSE: MIT License (https://opensource.org/licenses/mit-license.html) -- AUTHOR: Jamie A. Jennings assert(TEST_HOME, "TEST_HOME is not set") list = im...
nilq/small-lua-stack
null
object_tangible_loot_creature_loot_collections_meatlump_uniform_piece_04 = object_tangible_loot_creature_loot_collections_shared_meatlump_uniform_piece_04:new { } ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_meatlump_uniform_piece_04, "object/tangible/loot/creature/loot/collections/meatl...
nilq/small-lua-stack
null
----------------------------------- -- Area: Windurst Woods -- NPC: Soni-Muni -- Starts & Finishes Quest: The Amazin' Scorpio -- !pos -17.073 1.749 -59.327 241 ----------------------------------- require("scripts/globals/npc_util") require("scripts/globals/quests") require("scripts/globals/titles") -------------------...
nilq/small-lua-stack
null
ITEM.name = "Пара латных рукавиц" ITEM.desc = "Умело сделанные рукавицы из стальных пластин." ITEM.model = "models/aoc_armour/gauntlet_gk_right.mdl" ITEM.Width = 2 ITEM.Height = 2 ITEM.price = 75 ITEM.permit = "mat" ITEM.iconCam = { pos = Vector(0, 0, 24.782472610474), ang = Angle(90, -90, 0), fov = 45 }
nilq/small-lua-stack
null
return {'lindaan','linde','lindeblad','lindebloesem','lindebloesemthee','lindeboom','lindehout','lindehouten','lindelaan','linden','lindethee','lineair','lineamenten','lineariseren','linearisering','lineariteit','linesman','lingerie','lingeriefabrikant','lingerielijn','lingeriewinkel','linguist','linguistiek','linguist...
nilq/small-lua-stack
null
tickCount = 0 xml = require("scripts.lua-xml") lbt = require("scripts.lbt") serpent = require("scripts.serpent") require("scripts.timer") require("scripts.cutscenes") require("scripts.sounds") require("scripts.graphics") require("scripts.functions") require("scripts.animations") require("scripts.world") --executeCuts...
nilq/small-lua-stack
null
---------------------------------------------------------- -- Load RayUI Environment ---------------------------------------------------------- RayUI:LoadEnv("Misc") local M = _Misc local mod = M:NewModule("Auction", "AceEvent-3.0") local MAX_BUYOUT_PRICE = 10000000 function mod:ADDON_LOADED(event, addon) if a...
nilq/small-lua-stack
null
local path = require 'path' local Logs = require 'lib.logs' local Config = require 'scripts.config' local DataFetcher = require 'scripts.make.data-fetcher' local Parser = require 'scripts.make.parser' local Encoder = require 'scripts.make.encoder' local Writer = require 'scripts.make.writer' local PWD local insert =...
nilq/small-lua-stack
null
local base = require('imgui.Widget') ---@class im.lstg.PerformanceInfo:im.Widget local M = class('im.lstg.PerformanceInfo', base) local im = imgui function M:ctor(...) base.ctor(self, ...) self.plot = {} self.plotTargets = {} self.plotBufSize = 60 local dir = cc.Director:getInstance() self:se...
nilq/small-lua-stack
null
local x = {...} local emes = x[1] local win = window:new("Error",nil,18) do local font = love.graphics.getFont() if font:getWidth(emes)+6 > win.width then win.width = font:getWidth(emes)+6 end win:setBackgroundColor(250,250,250) win.callbacks.draw = function() love.graphics.setColor(0,0,0,255) ...
nilq/small-lua-stack
null
-- -- Please see the readme.txt file included with this distribution for -- attribution and copyright information. -- control = nil; freeadjustment = 0; slots = {}; mod_lock = 0; function registerControl(ctrl) control = ctrl; end function updateControl() if control then if adjustmentedit then control.label...
nilq/small-lua-stack
null
config = {} config.webhookDrop = '' config.webhookSend = '' config.webhookEquip = '' config.webhookUnEquip = '' config.webhookColor = 16431885 config.webhookIcon = 'https://i.imgur.com/5ydYKZg.png' config.webhookBottom = 'BRZ - ' config.imageServer = 'https://cdn.brz.gg/gtav/vrp'
nilq/small-lua-stack
null
function GM:UpdateAnimation( ply, velocity, maxseqgroundspeed ) local len = velocity:Length() local movement = 1.0 if ( len > 0.2 ) then movement = ( len / maxseqgroundspeed ) end local rate = math.min( movement, 2 ) -- if we're under water we want to constantly be swimming.. if ( ply:WaterLevel() >= 2 ) ...
nilq/small-lua-stack
null
local time = 0 love = { timer = { getTime = function() return time end, setTime = function(ts) time = ts end } }
nilq/small-lua-stack
null
require 'nn' local Zero, parent = torch.class('nn.Zero', 'nn.Module') function Zero:__init() parent.__init(self) end function Zero:updateOutput(input) self.output:resizeAs(input) self.output:zero() return self.output end function Zero:updateGradInput(input, gradOutput) self.gradInput:resizeAs(input) ...
nilq/small-lua-stack
null
Foo.aaa(); local test = Foo.new(333); test:abc(1,2,3); --test:aaa(); test:constmethod(); ret = test:constretmethod(); print("constretmethod: "..ret); test.testProp = 123; print("testProp: "..test.testProp); func() print("ONE: "..Foo.ONE); print("TWO: "..Foo.TWO); print("THREE: "..Foo.THREE); local ptrtest = test:pt...
nilq/small-lua-stack
null
Ryan.Globals = { Color = { Purple = 49, Red = 6 }, Controls = { Horn = 86, Duck = 73, Sprint = 21 }, CyrillicAlphabet = { ["A"] = "A", ["a"] = "a", ["Б"] = "B", ["б"] = "b", ["В"] = "V", ["в"] = "v", ["Г"] = "G", ["г"] = "g", ["Д"] = ...
nilq/small-lua-stack
null
local typedefs = require "kong.db.schema.typedefs" return { name = "jwt-claims-advanced", fields = { { protocols = typedefs.protocols_http }, { config = { type = "record", fields = { -- These 3 params 100% match the JWT plugin for how -- the JWT is found in the inc...
nilq/small-lua-stack
null
-- P40 - [练习 1.33] -- 递归版本 function filtered_accumulate(filter, combiner, null_value, term, a, next, b) if a > b then return null_value elseif filter(a) then return combiner(term(a), filtered_accumulate(filter, combiner, null_value, term, next(a), next, b)) else return filtered_acc...
nilq/small-lua-stack
null
ITEM.name = "Traffic Cone" ITEM.desc = "A plastic old traffic cone" ITEM.model = "models/props_junk/TrafficCone001a.mdl" ITEM.width = 1 ITEM.height = 1 ITEM.money = {1, 4}
nilq/small-lua-stack
null
local M = {}; local mod = require "mod"; mod.name = "Ants"; mod.dir = "Ants/"; mod.screenWidth = 640; mod.screenHeight = 480; local function InitAll() ScreenInit(mod.screenWidth, mod.screenHeight); PrimitiveInit(); TextureInit(IKDM_MEDIUM, 256); SpriteInit(IKDM_MEDIUM, 256); TtfInit(IKDM_SMALL, ...
nilq/small-lua-stack
null
-- Minetest: builtin/client/init.lua local scriptpath = core.get_builtin_path() local clientpath = scriptpath.."client"..DIR_DELIM local commonpath = scriptpath.."common"..DIR_DELIM dofile(clientpath .. "register.lua") dofile(commonpath .. "after.lua") dofile(commonpath .. "chatcommands.lua") dofile(clientpath .. "cha...
nilq/small-lua-stack
null
-- Version 1 by folk, zx64 -- To the extent possible under law, the authors have waived all copyright and related or neighboring rights to lib-reset.lua. -- http://creativecommons.org/publicdomain/zero/1.0/ -- In laymans terms: "do whatever you want with this file and its content" -- Credits: folk, zx64 --[[ USAGE DES...
nilq/small-lua-stack
null
--[[ ============================================================================================================ Author: Rook Date: March 9, 2015 Called when Shock is cast. Additional parameters: keys.DelayBeforeDamage ================================================================================================...
nilq/small-lua-stack
null