content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
function love.keypressed(key) if key == "escape" or key == "q" then love.event.quit() elseif key == "p" or key == "space" then if not pause then pause = true else pause = false end elseif key == "f" then local fullscreen = love.window.getFullscreen() if not fullscreen then love.window.setFullscr...
nilq/small-lua-stack
null
Ext.Require("BootstrapShared.lua") Ext.Require("Server/_InitServer.lua")
nilq/small-lua-stack
null
object_tangible_tcg_series6_shared_painting_nightsister = SharedTangibleObjectTemplate:new { clientTemplateFileName = "object/tangible/tcg/series6/shared_painting_nightsister.iff" } ObjectTemplates:addClientTemplate(object_tangible_tcg_series6_shared_painting_nightsister, "object/tangible/tcg/series6/shared_paintin...
nilq/small-lua-stack
null
local TXT = Localize{ [0] = " ", [1] = "Door", [2] = "Leave the Cave", [3] = "Chest", [4] = "Button", [5] = "Lever", [6] = "Vault", [7] = "Cabinet", [8] = "Switch", [9] = "", [10] = "Bookcase", [11] = "", [12] = "Strange Torch", [13] = "The exit is sealed!", [14] = "You Successfully disarm the trap", [1...
nilq/small-lua-stack
null
require('mobdebug').start() waxClass{"TestDebugVC"} function viewDidLoad(self) self:ORIGviewDidLoad(); print(self:memberString()) print(self:memberDict()) self:setMemberString("123") self:setMemberDict({key1="value1", key2="value2"}) end function aButtonPress(self, sender) print("lua aButtonPress") print(se...
nilq/small-lua-stack
null
local github = require("cmp_git.github") local gitlab = require("cmp_git.gitlab") local utils = require("cmp_git.utils") local Source = { cache_issues = {}, cache_mentions = {}, cache_merge_requests = {}, config = {}, filetypes = {}, } Source.new = function(overrides) local self = setmetatable...
nilq/small-lua-stack
null
#!/usr/bin/env lua local ts = tostring io.write ([[ function allocate_integer (parent : widget_access_t; bar_type : type_t; flags : flags_t; min : agar.core.types.integer_access_t; max : agar.core.types.integer_access_t; visible : agar.core.types.integer_access_t) return...
nilq/small-lua-stack
null
local lsp_selection_range = require('lsp-selection-range') local client_module = require('lsp-selection-range.client') local Range = require('lsp-selection-range.range') local selection = require('lsp-selection-range.selection') local utils = require('lsp-selection-range.tests.helpers.utils') local simple_php = require...
nilq/small-lua-stack
null
local I = require("inspect") local T = require("tools") local lines, count = T.input(5) local LOWER = 0 local UPPER = 1 local BYTE_F = string.byte("F", 1) local BYTE_B = string.byte("B", 1) local BYTE_L = string.byte("L", 1) local BYTE_R = string.byte("R", 1) local function convert_line(line) local rows = {}...
nilq/small-lua-stack
null
function onCreate() makeLuaSprite('shade', 'shadepink', 0, 0); setLuaSpriteScrollFactor('shade', 0, 0); defaultCamZoom = getProperty('defaultCamZoom') - 0.01; setProperty('shade.scale.x', 1 / defaultCamZoom); setProperty('shade.scale.y', 1 / defaultCamZoom); setProperty('shade.alpha', 0.0001); addLuaSprit...
nilq/small-lua-stack
null
-- © 2016 Peter Brantsch <peter@bingo-ev.de>, see license.txt local config = { url = "http://www.invg.de/rt/getRealtimeData.action?stopPoint=2&station=IN-Klini&sid=273"; interval = 30; display = { interval = 5; lines = 4; columns = 20; }; hostname = "busschild-01"; telnetport = 23; } return co...
nilq/small-lua-stack
null
-- CSS Lang require'lspconfig'.cssls.setup{ on_attach = require('lsp').custom_attach }
nilq/small-lua-stack
null
--IupDialog Example in IupLua --Creates a simple dialog. require( "iuplua" ) vbox = iup.vbox { iup.label {title="Label"}, iup.button { title="Test" } } dlg = iup.dialog{vbox; title="Dialog"} dlg:show() if (iup.MainLoopLevel()==0) then iup.MainLoop() end
nilq/small-lua-stack
null
-- Complete list of commands (and command aliases for Bumpercarz) -- Type "/help <command name>" and it will show information about that command. rconadd(aliases: "addrcon") adminadd(aliases: "a", "addadmin") admindel(aliases: "deladmin", "revoke", "a del", "adminrevoke", "revokeadmin") setafk(aliases: "afk") adminli...
nilq/small-lua-stack
null
--[[ -- $Id$ -- Simple animation class -- See Copyright Notice in COPYRIGHT --]] require "class" Animation = class(function(self) self.running = true self.frames = {} self.activeFrame = 1 self.time = 0 self.duration = 0 end) function Animation:addFrame(image, x, y, width, height, delay) if type(image) == "stri...
nilq/small-lua-stack
null
------- Metadata -------------------------------------------------------------- -- Cpuing -- Author: Lucky Penny -- Description: Generates the meters for the cpu widget. -- License: Creative Commons BY-NC-SA 3.0 -- Version: 0.0.3 -- -- Initialize(): As described. -------------------------------------------------------...
nilq/small-lua-stack
null
Consumeables = { ["sandwich"] = math.random(35, 54), ["water_bottle"] = math.random(35, 54), ["tosti"] = math.random(40, 50), ["kurkakola"] = math.random(35, 54), ["twerks_candy"] = math.random(35, 54), ["snikkel_candy"] = math.random(40, 50), ["coffee"] = math.random(40, 50), ["whiskey"...
nilq/small-lua-stack
null
--[[ A tiny library for working with paths. Tiny, because it is simple. Only Unix-style paths are supported. Windows-style `\` are not handled. My hypothesis is that it's less error-prone for a path library to support a consistant API surface. If you need Windows paths, you can write conversion functions that will let...
nilq/small-lua-stack
null
--[[ AI Unit tests Mainly just to see if all AI functionality is available. Code: Perry Date: October, 2015 ]] AIUnitTests = class({}) function AIUnitTests:Run( global, unit, ability, aiPlayerRes ) local success = 0 local fail = 0 local globalF = { 'AI_FindUnitsInRadius', 'AI_MinimapEvent', 'AI_EntInde...
nilq/small-lua-stack
null
MQ_Consumer = { input_type = "mq.consume", icon = "terminal.png", output_type = "request" }
nilq/small-lua-stack
null
-- steel_bars/init.lua -- Load support for Minebase translation. local S = minetest.get_translator("steel_bars") minetest.register_craftitem("steel_bars:bar", { description = S("Steel Bar"), inventory_image = "steel_bars_bar.png", }) minetest.register_craft({ output = "steel_bars:bar", type = "shaped", recipe =...
nilq/small-lua-stack
null
local Slot = require("motras_slot") local t = require("motras_types") local TrackUpgdateUtils = {} function TrackUpgdateUtils.upgradeFromParams(params) if not (params.modules and params.slotId) then return {} end if not (params.modules[params.slotId] and params.modules[params.slotId].me...
nilq/small-lua-stack
null
local nextTick = require'nodish.process'.nextTick local S = require'syscall' local h = require "syscall.helpers" local events = require'nodish.events' local ev = require'ev' local nsocket = require'nodish.net.socket' local util = require'nodish._util' local dns = require'nodish.dns' local ffi = require'ffi' local loop...
nilq/small-lua-stack
null
local Rand = require("api.Rand") local Chara = require("api.Chara") local I18N = require("api.I18N") local Effect = require("mod.elona.api.Effect") local Skill = require("mod.elona_sys.api.Skill") local Charagen = require("mod.elona.api.Charagen") local Dialog = require("mod.elona_sys.dialog.api.Dialog") local Deferred...
nilq/small-lua-stack
null
local frames = { ["ContainerFrame1"] = { DriftDisabledBy = "bagsDisabled" }, ["ContainerFrame1.ClickableTitleFrame"] = { DriftDelegate = "ContainerFrame1", DriftDisabledBy = "bagsDisabled" }, ["ContainerFrame2"] = { DriftDisabledBy = "bagsDisabled" }, ...
nilq/small-lua-stack
null
local EVENT = {} EVENT.Title = "Petrify!" EVENT.Description = "Turns players into a stone like figure, playing a quite annoying sound when they move." EVENT.id = "petrify" function EVENT:GetConVars() local sliders = {} for _, v in pairs({}) do local name = "randomat_" .. self.id .. "_" .. v if...
nilq/small-lua-stack
null
minetest.register_node("terranova:craft_bench", { description = "Workshop", tiles = {"t.workbench.png"}, drawtype = "nodebox", on_construct = function() }) utils.register_craft({ output = "iron_ingot", input = {"magnetite_lump"}, type = {"craftbench", "smelter"}, milestone = 0, alternate = fal...
nilq/small-lua-stack
null
local lwGetMode = _G.love.window.getMode local lgPush = _G.love.graphics.push local lgPop = _G.love.graphics.pop local lgTranslate = _G.love.graphics.translate local lgScale = _G.love.graphics.scale local lgRectangle = _G.love.graphics.rectangle local lgSetColor = _G.love.graphics....
nilq/small-lua-stack
null
local f = string.format My.Translator:register("en", { side_mission_destroy_graveyard_too_close = "You are too close to the area of operations and can not accept the mission.", side_mission_destroy_graveyard = function(sectorName) return f("Destroy space junk in sector %s", sectorName) end, sid...
nilq/small-lua-stack
null
--[=[ @Author: Gavin "Mullets" Rosenthal @Desc: Public Modular Component System. The only respectible way to handle Roblox UI ]=] --[=[ Modular Component System is a light weight component system designed for handling interface at a surface level. Components work with attributes so you won't have to do anything w...
nilq/small-lua-stack
null
-- reserve the namespace save_restore = {} -- TODO: if this gets more versatile, add sanity checks for filename -- TODO: save and restore ought to be library functions and not implemented in each individual mod! save_restore.save_data = function( filename, data ) local path = minetest.get_worldpath()..'/'..filenam...
nilq/small-lua-stack
null
--[[Created by Luada --]] require "base.class" require "base.scriptObject" require "common.ticker" require "common.timeEvent" require "common.eventCenter" require "common.eventCallback" require "game"
nilq/small-lua-stack
null
local displayTime = true local useMilitaryTime = false local displayDayOfWeek = true local displayDate = true local timeAndDateString = nil local hour local minute local dayOfWeek local month local dayOfMonth local year -- Display Time and Date at top right of screen -- format: | 12:13 | Wednesday | January 17, 2017 ...
nilq/small-lua-stack
null
-- Copyright (C) by Zexuan Luo (spacewander), under MIT License -- Ported from https://github.com/ryanuber/go-glob local _M = {} local _E = {} local mt = {__index = _E} local GLOB = '*' local GLOB_BYTE = string.byte(GLOB, 1) -- http://lua-users.org/wiki/SplitJoin local function split(s, sep) local res = {} i...
nilq/small-lua-stack
null
local _M = {} local ffi = require "ffi" local C = ffi.C local ffi_str = ffi.string local base = require "resty.core.base" local FFI_OK = base.FFI_OK local FFI_ERROR = base.FFI_ERROR local FFI_AGAIN = base.FFI_AGAIN local get_request = base.get_request local co_yield = coroutine._yield local ERR_BUF_SIZE = 128 local ...
nilq/small-lua-stack
null
-- Copyright (c) 2021 Kirazy -- Part of Artisanal Reskins: Bob's Mods -- -- See LICENSE in the project directory for license information. -- Check to see if reskinning needs to be done. if mods["ScienceCostTweakerM"] then return end if not (reskins.bobs and reskins.bobs.triggers.technology.items) then return end loca...
nilq/small-lua-stack
null
--[[---------------------------------------------------------------------------- Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found...
nilq/small-lua-stack
null
local LibNumbers = Wheel("LibNumbers") assert(LibNumbers, "GenericXP requires LibNumbers to be loaded.") -- Lua API local _G = _G local math_floor = math.floor local math_min = math.min local tonumber = tonumber local tostring = tostring -- WoW API local GetRestState = GetRestState local GetTimeToWellRested = GetTim...
nilq/small-lua-stack
null
if not PriceTracker then return end local PriceTracker = PriceTracker local PriceTrackerEnchantingTable = {} PriceTracker.enchantingTable = PriceTrackerEnchantingTable PriceTrackerEnchantingTable.enchanting = ENCHANTING PriceTrackerEnchantingTable.enchantingRunes = { potency = { bagId = nil, itemIndex = nil },...
nilq/small-lua-stack
null
return {'timbaal','timbre','time','timemanagement','timen','timer','timesharing','timide','timiditeit','timing','timmeraar','timmerage','timmerbedrijf','timmerdoos','timmeren','timmerfabriek','timmergereedschap','timmerhout','timmering','timmerloods','timmerman','timmermansbaas','timmermansjongen','timmermansoog','timm...
nilq/small-lua-stack
null
local Hamming = {} function Hamming.compute(a,b) if #a ~= #b then return -1 end local distance = 0 for i = 1, a:len() do if (a:sub(i, i) ~= b:sub(i, i)) then distance = distance + 1 end end return distance end return Hamming
nilq/small-lua-stack
null
-- -- Author: SunLightJuly -- Date: 2014-07-29 16:56:47 -- local ArmatureTestLayer = require("layers.ArmatureTestLayer") local TestArmatureNesting = class("TestArmatureNesting", ArmatureTestLayer) function TestArmatureNesting:ctor(index) TestArmatureNesting.super.ctor(self) self:creatTitleAndSubTitle(index) end fun...
nilq/small-lua-stack
null
HOME = os.getenv("HOME") CONFIG_DIR = (os.getenv("XDG_CONFIG_HOME") or HOME .. "/.config") .. "/awesome" user = { terminal = os.getenv("TERMINAL") or "xterm", editor = os.getenv("EDITOR") or "vim", } -- If LuaRocks is installed, make sure that packages installed through it are -- found (e.g. lgi). If LuaRocks...
nilq/small-lua-stack
null
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf/protobuf" module('TeamCountClient_pb') TEAMCOUNTCLIENT = protobuf.Descriptor(); local TEAMCOUNTCLIENT_TEAMTYPE_FIELD = protobuf.FieldDescriptor(); local TEAMCOUNTCLIENT_LEFTCOUNT_FIELD = protobuf.FieldDescriptor(); local TEAMCOUNTCLIENT_BUY...
nilq/small-lua-stack
null
local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local PlayerGui = LocalPlayer:WaitForChild("PlayerGui") script.Parent.ShowAndLeave.Enabled = true local showButton = script.Parent.ShowAndLeave.EditAvatarButton local leaveButton = script.Parent.ShowAndLeave.LeaveButton local AvatarEd...
nilq/small-lua-stack
null
return { summary = 'Get the size of the Blob\'s data.', description = [[ Returns the size of the Blob's contents, in bytes. ]], arguments = {}, returns = { { name = 'bytes', type = 'number', description = 'The size of the Blob, in bytes.' } } }
nilq/small-lua-stack
null
-- Based on http://lua-users.org/wiki/SimpleLuaClasses -- Simplified to remove inheritance -- -- Example: -- -- Person = class() -- -- function Person:__init(name, age) -- self.name = name -- self.age = age -- end -- -- function Person:sayHi() -- print("Hi, my name is " .. self.name) -- end ...
nilq/small-lua-stack
null
-- Vaygr supplyLimit("Fighter", 135); supplyLimit("Scout", 30); supplyLimit("Interceptor", 135); supplyLimit("Bomber", 135); supplyLimit("LanceFighter", 135); supplyLimit("Capital", 26); supplyLimit("Carrier", 5);
nilq/small-lua-stack
null
local Vector2 = require('geometry.vector2') local DiskObstacle = require('geometry.disk') local SegSeqObstacle = require('geometry.segseq') local Obstacle = require('core.obstacle') local Vehicle = require('core.vehicle') local FollowPath = require('steering.follow_path') local Space ...
nilq/small-lua-stack
null
-- Plane of Earth function events.AfterLoadMap() Party.QBits[930] = true -- DDMapBuff, changed for rev4 for merge end
nilq/small-lua-stack
null
local M = {} local char_to_hex = function(c) return ("%%%02X"):format(c:byte()) end local encode = function(url) url = url:gsub("\n", "\r\n") url = url:gsub("([^%w _%%%-%.~/:%?@=&#])", char_to_hex) url = url:gsub(" ", "+") return url end function M.collect(self) local file_path = self.pathlib.user_data_p...
nilq/small-lua-stack
null
local utils = require("jupyter-nvim.utils") local config = require("jupyter-nvim.config") local M = {} M.setup = config.setup M.utils = utils return M
nilq/small-lua-stack
null
--- Simple, non-blocking, TCP socket server that listens for -- clients on a specific port and for each connection -- polls for data. -- -- @usage -- -- local function on_data(data, ip) -- print("Received", data, "from", ip) -- return "My response" -- end -- -- local function on_client_connected(ip) -- print("Clien...
nilq/small-lua-stack
null
local HttpRequestAdapter = require("AlgoLua.Api.HttpRequestAdapter") local json = require("AlgoLua.Libs.json") local HttpClient = {} local function _catch_response(on_success, on_error) return function(_, _, http_response) if (http_response and http_response.status == 200) then local _, response = pcall(json.dec...
nilq/small-lua-stack
null
RPGM.RegisterScaledConstant("HUD.Minimap.Size", 240) local rotation = Angle(0, 0, 0) local lerpAngle = LerpAngle local ft = FrameTime local hasFocus = system.HasFocus local function updateStats(ply) if not hasFocus() then return ply:EyeAngles() end local rot = ply:EyeAngles() if ply:InVehicle() then ...
nilq/small-lua-stack
null
BuildEnv(...) Area = Addon:NewClass('Area', Object) function Area:Constructor(id, level) self.id = id self.level = level end function Area:GetID() return self.id end function Area:GetLevel() return self.level end function Area:GetMapID() return MAP_FILE_TO_ID[self.id] end ...
nilq/small-lua-stack
null
minetest.register_node("sponge:sponge", { description = "Sponge Dry", drawtype = "normal", tiles = {"sponge_sponge.png"}, paramtype = 'light', walkable = true, pointable = true, diggable = true, buildable_to = false, stack_max = 99, groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3}, after_pl...
nilq/small-lua-stack
null
------------------------------------------------------------------------ --- @file percc.lua --- @brief (percc) utility. --- Utility functions for the percc_header structs --- Includes: --- - percc constants --- - percc header utility --- - Definition of percc packets --------------------------------------------------...
nilq/small-lua-stack
null
local core = require "core" local command = require "core.command" local config = require "core.config" local keymap = require "core.keymap" local function dv() return core.active_view end local function doc() return core.active_view.doc end command.add("core.docview", { ["doc:copy-path"] = function() ...
nilq/small-lua-stack
null
lightbridge = class:new() function lightbridge:init(x, y, dir, r) self.cox = x self.coy = y self.dir = dir self.r = r self.childtable = {} self.enabled = true self:updaterange() end function lightbridge:link() self.outtable = {} if #self.r > 2 then for j, w in pairs(outputs) do for i, v in pairs(objec...
nilq/small-lua-stack
null
--[[ Copyright (c) 2017 George Prosser Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute...
nilq/small-lua-stack
null
require("firecast.lua"); local __o_rrpgObjs = require("rrpgObjs.lua"); require("rrpgGUI.lua"); require("rrpgDialogs.lua"); require("rrpgLFM.lua"); require("ndb.lua"); require("locale.lua"); local __o_Utils = require("utils.lua"); local function constructNew_frmFichaRPGmeister4h_svg() local obj = GUI.fromHandle(_ob...
nilq/small-lua-stack
null
ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) ESX.RegisterUsableItem('moottorikitti', function(source) local _source = source TriggerClientEvent('esx_korjauskitti:moottori', _source) end) RegisterServerEvent('esx_korjauskitti:poistakitti') AddEventHandler('esx_korjaus...
nilq/small-lua-stack
null
Citizen.CreateThread(function() SwitchTrainTrack(0, true) SwitchTrainTrack(3, true) N_0x21973bbf8d17edfa(0, 120000) SetRandomTrains(true) end)
nilq/small-lua-stack
null
-- Nexss PROGRAMMER 2.0.0 - Lua -- Default template for JSON Data json = require "json" -- STDIN local NexssStdin = io.read() local parsedJson = json.decode(NexssStdin) -- Modify Data parsedJson['test'] = "test" local NexssStdout = json.encode(parsedJson) -- STDOUT io.write(NexssStdout)
nilq/small-lua-stack
null
return {'enig','enige','enigen','enigerlei','enigermate','enigerwijs','enigerwijze','eniggeboren','enigheid','enigma','enigmatisch','enigst','enigszins','eniac','enigmas','enigmata','enigmatische','enigmatischer','enigste'}
nilq/small-lua-stack
null
-- Packet Handlers Helpers.PacketHandler('lawman:GoOnDuty', function(playerId, data) Lawman.GoOnDuty(playerId, data.LocationId) end) Helpers.PacketHandler('lawman:GoOffDuty', function(playerId, data) Lawman.GoOffDuty(playerId) end) Helpers.PacketHandler('lawman:GetArmoryItem', function(playerId, data...
nilq/small-lua-stack
null
--- -- Plot a real-valued signal in a gnuplot time plot. This sink requires the -- gnuplot program. This sink should be used with relatively low sample rates, -- as it does not skip any samples, or it may otherwise throttle a flow graph. -- -- @category Sinks -- @block GnuplotPlotSink -- @tparam int num_samples Number ...
nilq/small-lua-stack
null
require( "debugLog" ) function make_logistics_wagon_items( wName, wFilePath ) local item = { type = "item", name = wName, icon = "__LogisticsWagons__/resources/icons/" .. wFilePath .. ".png", icon_size = 32, subgroup = "transport", order = "a[train-system]-z[" ....
nilq/small-lua-stack
null
--Copyright © 2017, Krizz --All rights reserved. --Redistribution and use in source and binary forms, with or without --modification, are permitted provided that the following conditions are met: -- * Redistributions of source code must retain the above copyright -- notice, this list of conditions and the fol...
nilq/small-lua-stack
null
--[[ Sample plugin file for highlight 3.9 ]] Description="Capitalize keywords if the syntax is not case sensitive." -- optional parameter: syntax description function syntaxUpdate(desc) if IgnoreCase ~=true then return end function Decorate(token, state) if (state == HL_KEYWORD and not token:match("%...
nilq/small-lua-stack
null
function GetTimeString(amt) local minutes = math.floor(amt / 60) local seconds = math.floor(amt % 60) local timestring = "" if minutes > 0 and seconds > 0 then timestring = minutes .. " minutes and " .. seconds .. " seconds." elseif seconds > 0 then timestring = seconds .. " seconds." elseif minutes > 0 then ...
nilq/small-lua-stack
null
Gamestate = require('./libraries/gamestate') suit = require('./libraries/SUIT/') local card = require('./src/card') local cards = card.getCards() local counter = 0 local cardTimer = 0 local gameTimer = 30 local prevCard = {} local prevIndex = 0 local score = 0 local gameOver = false local fadeOut = 255 local winCondi...
nilq/small-lua-stack
null
function setvalue(address,flags,value) local tt={} tt[1]={} tt[1].address=address tt[1].flags=flags tt[1].value=value gg.setValues(tt) end gg.alert("HYDRA SCRİPT V3\n Yapan=Hydra🇹🇷","DEWAMKE➡️") gg.toast("■□□□□□□□□□10% ") gg.sleep(300) gg.toast("■■□□□□□□□□20% ") gg.sleep(300) gg.toast("■■■□□□□□□□30% ...
nilq/small-lua-stack
null
require "ISBaseObject" require "ISUI/ISBackButtonWheel" require "ISUI/ISInventoryPage" require "ISUI/ISLayoutManager" require "ISUI/ISSafetyUI" ---@class ISPlayerDataObject : ISBaseObject ISPlayerDataObject = ISBaseObject:derive("ISPlayerDataObject"); function ISPlayerDataObject:createInventoryInterface() local...
nilq/small-lua-stack
null
local fs = require 'fs' local path = require 'path' local timer = require 'timer' local spawn = require 'coro-spawn' local function escape(s) local needs_escape = { ['-'] = true } return (s:gsub('.', function(c) if needs_escape[c] then return '%' .. c end end)) end local function multipart(...
nilq/small-lua-stack
null
local addon = KuiNameplates local ele = addon:NewElement('AbsorbBar') -- prototype additions ######################################################### function addon.Nameplate.UpdateAbsorb(f) f = f.parent f.state.absorbs = UnitGetTotalAbsorbs(f.unit) or 0 if f.elements.AbsorbBar then if f.state.hea...
nilq/small-lua-stack
null
local AddonName, AddonTable = ... -- Blackrock Caverns AddonTable.blackrock = { -- Rom'ogg Bonecrusher 55278, 55279, 55776, 55777, 55778, 56310, 56311, 56312, 56313, 56314, 157608, -- Corla, Herald of Twilight 55263, 55264, 55265, 55266, 55267, ...
nilq/small-lua-stack
null
function iscallable(x) if type(x) == 'function' then return true elseif type(x) == 'table' then -- It would be elegant and quick to say -- `return iscallable(debug.getmetatable(x).__call)` -- but that is actually not quite correct -- (at least in my experiments), since it...
nilq/small-lua-stack
null
ix.lang = ix.lang or {} ix.lang.stored = ix.lang.stored or {} ix.lang.names = ix.lang.names or {} function ix.lang.LoadFromDir(directory) for _, v in ipairs(file.Find(directory.."/sh_*.lua", "LUA")) do local niceName = v:sub(4, -5):lower() ix.util.Include(directory.."/"..v, "shared") if (LANGUAGE) then if...
nilq/small-lua-stack
null
return { CACHE_AGE = 3600, -- seconds ID_DELAY = 5000, -- milliseconds GATEWAY_DELAY = 500, -- milliseconds, DISCORD_EPOCH = 1420070400000, -- milliseconds GATEWAY_VERSION = 6, DEFAULT_AVATARS = 5, ZWSP = '\226\128\139', NS_PER_US = 1000, US_PER_MS = 1000, MS_PER_S = 1000, S_PER_MIN = 60, MIN_PE...
nilq/small-lua-stack
null
require('components/mutation/mutation_list') require('components/mutation/mutation_settings') local validItems = {} -- Empty table to fill with full list of valid airdrop items local tier1 = {} -- 1000 to 2000 gold cost up to 5 minutes local tier2 = {} -- 2000 to 3500 gold cost up to 10 minutes local tier3 = {} -- 350...
nilq/small-lua-stack
null
-- luacheck: max line length 152 -- local nvim = require'nvim' -- local tools = require'tools' -- local executable = require'tools'.files.executable local load_module = require'tools'.helpers.load_module local get_icon = require'tools'.helpers.get_icon -- local set_mapping = nvim.mappings.set_mapping local saga...
nilq/small-lua-stack
null
--[[ AarOS Interpreter 1.2 AarOS Version Interpreted: 1.2 Created by Aarex Read the readme.md for all of the commands. ]]-- -- Main variables code,xPosition,yPosition,direction,memory,memoryPosition,output=io.read("*a"),1,1,0,{0},1,'' -- Functions function getCharacterFromLocation(text,position) return string.sub(t...
nilq/small-lua-stack
null
local classes = classes; local super = classes.Object; local class = inherit({ name = "Stream", super = super, func = inherit({}, super.func), get = inherit({}, super.get), set = inherit({}, super.set), concrete = true, }, super); classes[class.name] = class; ...
nilq/small-lua-stack
null
function f(a, b) return a or b end print(f(3)) print(f(3, 4)) print(f(3, 4, 5))
nilq/small-lua-stack
null
if (SERVER) then return end function PIS:GetServerID() return game.GetIPAddress() or "192.168.0.0:27015" end function PIS:CreateSQLTables() sql.Query([[ CREATE TABLE IF NOT EXISTS nexus_psi_settings ( id TEXT(50), settings TEXT(4000), PRIMARY KEY (id) ) ]]) end function PIS:LoadSettings(ply) local i...
nilq/small-lua-stack
null
Script.Load("lua/Globals.lua") Script.Load("lua/GUIUtility.lua") Script.Load("lua/GUIAnimatedScript.lua") class 'MarineStatusHUD' (GUIAnimatedScript) MarineStatusHUD.kTexture = PrecacheAsset("ui/marine_HUD_presbg.dds") MarineStatusHUD.kXpBarTexture = PrecacheAsset("ui/combatui_xp_bar.dds") MarineStatusHUD....
nilq/small-lua-stack
null
--爱情加工厂 menuBtn.onClick=function() 退出页面() end require "import" import "android.app.*" import "android.os.*" import "android.widget.*" import "com.lua.views.MarTextView" ghost={ LinearLayout, layout_height="match_parent", layout_width="match_parent", orientation="vertical", background="#FFFFFFFF"...
nilq/small-lua-stack
null
-- -- from src/acker.c -- -- int A(int, int) to ack -- local function ack(x, y) if x == 0 then return y+1 end if y == 0 then return ack(x-1,1) end return ack(x-1, ack(x,y-1)) end return { ack = ack }
nilq/small-lua-stack
null
Wait(500) character_1:WithWaitTime(100):UseSkill(1) SkipAttack()
nilq/small-lua-stack
null
local adsKit = require "plugin.huaweiAdsKit" local widget = require( "widget" ) local json = require("json") local TAG = "adsKit" local header = display.newText( "Huawei Ads Kit", display.contentCenterX, 60, native.systemFont, 10 ) header:setFillColor( 255, 255, 255 ) local function listener( event ) print(TAG, ...
nilq/small-lua-stack
null
--[[ Performs a left-fold of the list with the given initial value and callback. ]] local function foldLeft(list, initial, callback) local accum = initial for i = 1, #list do accum = callback(accum, list[i], i) end return accum end return foldLeft
nilq/small-lua-stack
null
return { unpack = table.unpack or unpack, }
nilq/small-lua-stack
null
require('pathfinding/point'); local Point = Pathfinding.Point; --[[ Checks if a specific point is along a segment. Returns true if it is, otherwise false. All three arguments should be a Point object ]] function Pathfinding.pointOnSegment(point, segmentStart, segmentEnd) local dx,dy = segmentEnd.x - segmentStart.x...
nilq/small-lua-stack
null
----------------------------------- -- Area: Batallia Downs -- NPC: Luck Rune -- Involved in Quest: Mhaura Fortune -- !pos -362.167 -12.199 157.158 105 ----------------------------------- local ID = require("scripts/zones/Batallia_Downs/IDs") ----------------------------------- function onTrade(player,npc,trade) end...
nilq/small-lua-stack
null
-- *************************************************************** -- -- Copyright 2016 by Sean Conner. All Rights Reserved. -- -- This library is free software; you can redistribute it and/or modify it -- under the terms of the GNU Lesser General Public License as published by -- the Free Software Foundation; either ...
nilq/small-lua-stack
null
-- -- Created by IntelliJ IDEA. -- User: Noneatme -- Date: 23.12.2014 -- Time: 13:36 -- Project: MTA iLife -- CObject = inherit(CElement) registerElementClass("object", CObject) function CObject:constructor() end function CObject:destructor() end function CObject:setMass(...) return setObjectMass(self, ...) end
nilq/small-lua-stack
null
love.graphics.setBackgroundColor(0.1, 0.1, 0.1) love.graphics.setDefaultFilter("nearest", "nearest") require("lib.steady") score = 0 local W = require("src.worlds") currentWorld = W.intro music = love.audio.newSource("music/main.ogg", "static") music:setLooping(true) music:setVolume(0.08) function love.load() ...
nilq/small-lua-stack
null
local contrail = Material( "snowysnowtime/contrails/needler_contrail" ) function EFFECT:Init( data ) self.Position = data:GetStart() self.EndPos = data:GetOrigin() self.WeaponEnt = data:GetEntity() self.Attachment = data:GetAttachment() self.StartPos = self:GetTracerShootPos( self.Position, self.WeaponEnt, self...
nilq/small-lua-stack
null