content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
local error_handler = require "api-umbrella.proxy.error_handler" local rewrite_response = require "api-umbrella.proxy.middleware.rewrite_response" local settings = ngx.ctx.settings -- Perform any response rewriting. local err = rewrite_response(settings) if err then return error_handler(err, settings) end
nilq/small-lua-stack
null
function typecheck(values) if DEBUG then local i = 1 while true do local k, v = debug.getlocal(2, i) if not k then break end if values[k] then local ok = true if type(values[k]) == 'string' then if type(v) ~= values[k] then ok = false end els...
nilq/small-lua-stack
null
return { -- Nomes e Descrições --heist_alex = "Rats",--Rats --heist_alex_2_hl = "Code for Meth",--Code for Meth --heist_alex_3_hl = "Bus Stop",--Bus Stop heist_alex_crimenet = "Ajude o Hector a eliminar os líderes Mendoza.$NL;$NL;» Obtenha Metanfetamina do Laboratório dos Mendoza$NL;» Troque a Metanfetamina por In...
nilq/small-lua-stack
null
local format = string.format local lpeg = require"lpeg" local P, S, R = lpeg.P, lpeg.S, lpeg.R local C, V = lpeg.C, lpeg.V local Ct, Cg, Cc = lpeg.Ct, lpeg.Cg, lpeg.Cc local Cp, Cmt = lpeg.Cp, lpeg.Cmt local Cb, Cs = lpeg.Cb, lpeg.Cs local patterns = require"DSL.patterns" local space = patterns.space local function t...
nilq/small-lua-stack
null
sudo={299599695}
nilq/small-lua-stack
null
AddCSLuaFile() DEFINE_BASECLASS( "weapon_csbasegun" ) CSParseWeaponInfo( SWEP , [[WeaponData { "MaxPlayerSpeed" "250" "WeaponType" "Pistol" "FullAuto" 0 "WeaponPrice" "750" "WeaponArmorRatio" "1.5" "CrosshairMinDistance" "8" "CrosshairDeltaDistance" "3" "Team" "CT" "BuiltRightHanded" "0" "Playe...
nilq/small-lua-stack
null
local MtlsCertsHandlerFactory = {} local register = require("kong.plugins.mtls_certs_manager.register") local renew = require("kong.plugins.mtls_certs_manager.renew") local Roles = { ["register_instance"] = register, ["renew_instance"] = renew } function MtlsCertsHandlerFactory:getRole(conf) return Roles[conf....
nilq/small-lua-stack
null
-- Author: Edward Koltun -- Date: March 3, 2022 --[[ $module FCMCtrlUpDown Summary of modifications: - `GetConnectedEdit` returns the original control object. - Handlers for the `UpDownPressed` event can now be set on a control. ]] local mixin = require("library.mixin") local mixin_helper = require("library.mixin_...
nilq/small-lua-stack
null
HUD_IW_MAX = 8 HUD_IW_TICK = 0.4 if minetest.is_singleplayer() == true then HUD_IW_TICK = 0.2 end HUD_SB_SIZE = {x = 24, y = 24} HUD_HEALTH_POS = {x = 0.5,y = 1} HUD_HEALTH_OFFSET = {x = -248, y = -93} HUD_AIR_POS = {x = 0.5, y = 1} HUD_AIR_OFFSET = {x = 6, y = -93} HUD_HUNGER_POS = {x = 0.5, y = 1} HUD_HUNGER_OFFS...
nilq/small-lua-stack
null
-- Types -- local _M = {} _M.PROTOCOL = { V2005 = 0, V2017 = 1, } _M.SYSTEM = { Q_SURFACE_WATER = 21, Q_AIR = 22, Q_SOUND = 23, Q_GROUND_WATER = 24, Q_SOIL = 25, Q_SEA_WATER = 26, Q_VOLATILE_ORGANICS = 27, S_AIR = 31, S_SURFACE_WATER = 32, S_GROUND_WATER = 33, S_SEA = 34, S_SOIL ...
nilq/small-lua-stack
null
workspace "Mirra" architecture 'x64' configurations { "Debug", "Release", "Dist" } outputdir="%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" -- Include directory Relative to root folder IncludeDir = {} IncludeDir["GLFW"] = "Mirra/vendor/GLFW/include" IncludeDir["Glad"] = "Mirra/vendor/Glad/include" Inc...
nilq/small-lua-stack
null
local Parser = require "argparse" getmetatable(Parser()).error = function(_, msg) error(msg) end describe("tests related to options", function() describe("passing correct options", function() it("handles no options passed correctly", function() local parser = Parser() parser:option "-s" "--s...
nilq/small-lua-stack
null
gl.setup(1280, 720) node.alias("room") local json = require "json" -- Configure room here local SAAL = "Saal 1" util.auto_loader(_G) util.file_watch("schedule.json", function(content) print("reloading schedule") talks = json.decode(content) end) util.file_watch("config.json", function(content) local c...
nilq/small-lua-stack
null
--------------------------------------------- -- Enervation -- -- Description: Lowers the defense and magical defense of enemies within range. -- Type: Magical (Dark) --------------------------------------------- require("scripts/globals/monstertpmoves") require("scripts/globals/settings") require("scripts/globals/stat...
nilq/small-lua-stack
null
local function squares_iter(ls, i) if i + 1 <= #ls then local v = ls[i + 1] return i + 1, v, v*v end end local function squares(ls) return squares_iter, ls, 0 end local function foo(ls) local s, ssq = 0, 0 for i, v, vsq in squares(ls) do s = s + v ssq = ssq + vsq end return s, ssq end print(foo {3, 7,...
nilq/small-lua-stack
null
-------------------------------- -- @module PhysicsJointPin -- @extend PhysicsJoint -------------------------------- -- @function [parent=#PhysicsJointPin] construct -- @param self -- @param #cc.PhysicsBody physicsbody -- @param #cc.PhysicsBody physicsbody -- @param #point_table point -- @return PhysicsJointPin#Phys...
nilq/small-lua-stack
null
local util = require 'lspconfig.util' return { default_config = { cmd = { 'plz', 'tool', 'lps' }, filetypes = { 'bzl' }, root_dir = function(fname) return util.root_pattern '.plzconfig'(fname) end, single_file_support = true, }, docs = { description = [[ `plz` will automatically ins...
nilq/small-lua-stack
null
percentage_based_auto_attack_damage = class({}) function percentage_based_auto_attack_damage:OnCreated( kv ) if not IsServer() then return end self:StartIntervalThink(0.1) end function percentage_based_auto_attack_damage:OnIntervalThink() if not IsServer() then return end local caster = self:GetParent() local ...
nilq/small-lua-stack
null
if (redis.call('exists', KEYS[1]) == 0) then redis.call('hset', KEYS[1], ARGV[2], 1); redis.call('pexpire', KEYS[1], ARGV[1]); return nil; end ; if (redis.call('hexists', KEYS[1], ARGV[2]) == 1) then redis.call('hincrby', KEYS[1], ARGV[2], 1); redis.call('pexpire', KEYS[1], ARGV[1]); return nil;...
nilq/small-lua-stack
null
--- -- Communicating game state to players -- @section GameMessage local net = net local string = string local table = table local IsValid = IsValid --- -- Sends a GameMessage to every @{Player} -- @note most uses of the Msg functions here have been moved to the LANG -- functions. These functions are essentially depr...
nilq/small-lua-stack
null
yatm.fluids.fluid_registry.register("yatm_brewery_apple_cider", "apple_cider", { description = "Apple Cider", groups = { apple = 1, alcoholic = 1, cider = 1, booze = 1, }, tiles = { source = "yatm_apple_cider_source.png", flowing = "yatm_apple_cider_flowing.png", }, fluid_tank = {...
nilq/small-lua-stack
null
local K, C = unpack(select(2, ...)) local Module = K:GetModule("Blizzard") local _G = _G local floor = _G.floor local gsub = _G.gsub local strjoin = _G.strjoin local strlen = _G.strlen local strsub = _G.strsub local tonumber = _G.tonumber local wipe = _G.wipe local CALENDAR_COPY_EVENT = _G.CALENDAR_COPY_EVENT local C...
nilq/small-lua-stack
null
HSK_Module_AutoShotOverride_OnAction = {} HSK_Module_AutoShotOverride_OnAction[HSK_SPELL_AUTOSHOT_NAME] = function(slot, checkCursor, onSelf) if CheckInteractDistance("target", 3) and (not PlayerFrame.inCombat) then AttackTarget(); elseif not IsAutoRepeatAction(slot) then CastSpellByName(HSK_SP...
nilq/small-lua-stack
null
hook.Add('PlayerSpawn', 'PPM2.Hooks', function(self) if IsValid(self.__ppm2_ragdoll) then self.__ppm2_ragdoll:Remove() self:UnSpectate() end return timer.Simple(0, function() if not (self:IsValid()) then return end if self:GetPonyData() then self:GetPonyData():PlayerRespawn() ...
nilq/small-lua-stack
null
--*********************************************************** --** THE INDIE STONE ** --*********************************************************** if isClient() then return end require "Map/SGlobalObject" ---@class STrapGlobalObject : SGlobalObject STrapGlobalObject = SGlobalOb...
nilq/small-lua-stack
null
local MultiValve = {} require'hcm' local ImageProc2 = require'ImageProc.ffi2' local c_zlib = require'zlib.ffi'.compress local ImProc, colors local lA_meta = { c = 'zlib', id = 'labelA', } local detected --local ptable = require'util'.ptable hcm.set_guidance_color('GRAB ANY VALVE') local discrete_prior_mt = {} fun...
nilq/small-lua-stack
null
function makePlayer(layer) local player for k, object in pairs(map.objects) do if object.name == "Player" then player = object break end end local sprite = love.graphics.newImage("gfx/banana_sprite.png") layer.player = { sprite = sprite, x = player.x, y = player.y, ox ...
nilq/small-lua-stack
null
local Bar = {} function Bar.make(color_bar,color_progress,width,height, max) local bar = GUI.make_frame_element({0,0, width,height}, color_bar) local margin = 5 local progress_width = width-margin*2 local progress_height = height-margin*2 local progress = GUI.make_frame_element({margin,margin,progress_w...
nilq/small-lua-stack
null
include('shared.lua') local Heatwave = Material("effects/strider_bulge_dudv") local Size = 100 function ENT:Draw() local mypos = self:GetPos() local dist = LocalPlayer():GetPos():Distance(mypos) if(dist < 3000) then //self.Entity:DrawModel() render.UpdateScreenEffectTexture() render.SetMaterial(Heatwav...
nilq/small-lua-stack
null
#!/usr/local/bin/lua local window={} window.prototype = {x=0,y=0,w=100,h=200} print(window.w)
nilq/small-lua-stack
null
function momoPyTweak.compatibility.bobInserter() if (settings.startup["momo-removeLongInserter"].value) then momoIRTweak.technology.RemoveAllUnlockEffect({"long-handed-inserter", "long-handed-inserter-2"}) end end
nilq/small-lua-stack
null
local ReplicatedStorage: ReplicatedStorage = game:GetService("ReplicatedStorage") local Packages: Folder = ReplicatedStorage:WaitForChild("Packages") local Portal = require(Packages:WaitForChild("Portal")) Portal = Portal.new() local Contexts = { Server = Portal:Context("Server"), Client = Portal:Context("Client"),...
nilq/small-lua-stack
null
description 'A simple loading screen!' files { 'index.html', 'css/index.css', 'css/colors.css', 'css/icomoon.css', 'fonts/gravity.otf', 'fonts/icomoon.ttf', 'img/cursor.png', 'img/logo.png', 'img/bg1.png', 'img/bg2.png', 'img/bg3.png', 'js/synn.js', ...
nilq/small-lua-stack
null
if (SERVER) then AddCSLuaFile() end KswepDefaultSight= {} local def=KswepDefaultSight def.name = "Default" def.model = nil def.fov = 10 def.rtscope = false def.nv = false def.rtmat = nil def.IronPos=Vector() def.IronAng=Vector() def.AltIronPos=Vector() def.AltIronAng=Vector() def.sensitivity = 1 def.mins...
nilq/small-lua-stack
null
local M = { } local name = "test_escape" local me = ... local FX = require("FunctionalX") local TK = require("PackageToolkit") local case = TK.test.case M[name] = function() local fn = FX.strings.escape local _ = (case(fn, { "a" }, { "a" }, "strings.parseNumbers case 0")) _ = (case(fn, { "a", ...
nilq/small-lua-stack
null
local colors = { white = "#dadada", darker_black = "#131a1c", black = "#181f21", -- nvim bg black2 = "#1d2426", one_bg = "#22292b", one_bg2 = "#293032", one_bg3 = "#32393b", grey = "#3c4345", grey_fg = "#464d4f", grey_fg2 = "#4f5658", light_grey = "#575e60", red = "#e06e6e", baby_...
nilq/small-lua-stack
null
-- Test local api = vim.api local function exthighlight(bufnr, ns, higroup, start, finish, rtype, inclusive, priority) rtype = rtype or 'v' inclusive = inclusive or false priority = priority or 50 -- sanity check if start[2] < 0 or finish[1] < start[1] then return end local region = vim.region(bufnr, sta...
nilq/small-lua-stack
null
ITEM.name = "Dirty Water" ITEM.desc = "A bottle of dirty water" ITEM.model = "models/fallout 3/water.mdl" ITEM.skin = 1 ITEM.staminaAmount = 5
nilq/small-lua-stack
null
-- test_gf.lua 测试gateway-forward服务。 local skynet = require "skynet" local _NEW_CLINET = require "mock/client".new ---------------------------------------------------------------------------------------- local gateway_forward_host = "127.0.0.1:2020" --每一个client的服务会最多建立多少个连接(UID区域) local client_max_num = 500 --每一个client的...
nilq/small-lua-stack
null
onWin = function(W) W:addConditionProgress("boss", "BossYasha") W:setMap("res/map/yashasanctuary/yashasanctuary.tmx", 615, 620) if (W:isConditionFulfilled("npc_yasha", "friendly")) then W:unlockAchievement("ACH_FRIEND_YASHA") else W:unlockAchievement("ACH_KILL_YASHA") end end onLose = fu...
nilq/small-lua-stack
null
local _PACKAGE = (...):match("^(.+)[%./][^%./]+") or "" local util = require(_PACKAGE .. "/util") local dep = require(_PACKAGE .. "/dep") local Vector = dep.Vector local Container = require(_PACKAGE .. "/container") local DEFAULT_FONT = love.graphics.newFont(16) local DEFAULT_COLOR = {34, 32, 52, 255} --...
nilq/small-lua-stack
null
local state = {} state._NAME = ... local Body = require'Body' local t_entry, t_update, t_exit,t_last_debug local motion_inited require'wcm' require'hcm' local table_pose local obj_num,obj_x, obj_y, obj_z, obj_type local target_pose local t_min_delay = 2.0 local item_count=0 local function find_release_posit...
nilq/small-lua-stack
null
slot0 = class("ChargeDiamondCard") slot0.NewTagType = 2 slot0.DoubleTagType = 4 slot0.Ctor = function (slot0, slot1, slot2) slot0.go = slot1 slot0.tr = tf(slot1) slot0.iconImg = slot0.tr:Find("IconImg") slot0.diamondCountText = slot0.tr:Find("Count/Text") slot0.priceText = slot0.tr:Find("Price/Text") slot0.begin...
nilq/small-lua-stack
null
--require('dim').setup({ -- disable_lsp_decorations = false, -- disable virt text and underline by lsp on unused vars and functions -- change_in_insert = false, -- change highlights in insert mode (real time updates) --})
nilq/small-lua-stack
null
TAC.Commands = {} TAC.IsConsole = function(playerId) return (playerId == nil or playerId <= 0 or tostring(playerId) == '0') end RegisterCommand('anticheat', function(source, args, raw) if (not TAC.PlayerAllowed(source)) then TAC.Print(false, '%{reset}[%{red}' .. _('name') .. '%{reset}] %{white}' .. _(...
nilq/small-lua-stack
null
-- This is a language file for mattata -- Language: tr-tr -- Author: By_Azade -- DO NOT CHANGE ANYTHING THAT BEGINS OR ENDS WITH A % -- THESE ARE PLACEHOLDERS! -- DO NOT CHANGE ANY MARKDOWN/HTML FORMATTING! -- IF YOU ARE UNSURE, ASK ON TELEGRAM (t.me/mattataDev) return { ['errors'] = { ['connection'] = '...
nilq/small-lua-stack
null
require "_Utils" local common = require "_ConvCommon" local types = require "_ConvCommonTypes" local convert = require "_ConvCommonConvert" local function TestCategory(cat) return function(node) return (node.type == "element") and node.name == "type" and node.attr.category == cat end end --May ...
nilq/small-lua-stack
null
local module = {} local private = {} module.Name = "Unban" module.Description = "Unbans a player from the game globally, or locally" module.Location = "Player" function module.Execute(Client: player?, Type: string, Attachment) if Type == "command" then local possiblyUserId = module.API.Players.getUserIdFr...
nilq/small-lua-stack
null
debugging = {} local lg = love.graphics require "fixcolor" function debugging:update(dt) end --local newPath = nil --local pathSelected = {} function debugging:keypressed(key, scancode, isrepeat) -- q stops the game if key == "q" then love.event.quit() elseif key == "m" then musicSelected:setVolume(0) ...
nilq/small-lua-stack
null
-- Autogenerated from KST: please remove this line if doing any edits by hand! local luaunit = require("luaunit") require("params_call_extra_parens") TestParamsCallExtraParens = {} function TestParamsCallExtraParens:test_params_call_extra_parens() local r = ParamsCallExtraParens:from_file("src/term_strz.bin") ...
nilq/small-lua-stack
null
lightning_mat = { passes = { base = { queue='transparent', shader="lightning", blending=true, srcBlendColor="src_alpha", srcBlendAlpha="src_alpha", dstBlendColor="one_minus_src_alpha", dstBlendAlpha="one_minus_src_alpha", topology='lines', depthTest=false } }, }
nilq/small-lua-stack
null
module(..., package.seeall) CGGetName = { {"gender","INT", 1} } GCGetName = { {"name","CHAR", 32} } CGCreateRole = { {"career", "INT", 1}, {"gender", "INT", 1}, {"accname", "CHAR", 32}, {"rolename", "CHAR", 32}, } --[10001,["asdf","asdf",23232323]] CGAskLogin = { {"account",...
nilq/small-lua-stack
null
-- -- Created by IntelliJ IDEA. -- User: xiaobo -- Date: 2018/3/30 -- Time: 上午11:25 -- To change this template use File | Settings | File Templates. -- local require = require local _M = require("vendor.Model"):new { _version = '0.0.1' } local rememberMe = false local User = require('models.User') function _M.rule...
nilq/small-lua-stack
null
--Tested with Lua 5.3.4 io.write("How many Fibonacci numbers do you want? ") n = io.read("*n") f1=0 f2=1 for i=1, n do temp = f1 + f2 print(temp) f1 = f2 f2 = temp end
nilq/small-lua-stack
null
local a = require('plenary.async.tests') local mock = require('luassert.mock') local Window = require('vgit.core.Window') local Navigation = require('vgit.Navigation') local describe = describe local it = it local before_each = before_each local after_each = after_each local eq = assert.are.same a.describe('Navigatio...
nilq/small-lua-stack
null
--- Allows for making queries against the League of Legends Game API -- -- By first creating an api object and creating a new game object from it -- you can then make queries against the League of Legends Game API. -- -- @module lol.game local api = require('lol.api') local utils = require('pl.utils') --- This class ...
nilq/small-lua-stack
null
--_G.message = "no spaces or special chars :) use more than one word for best result (might bug if only one word)" return(function(ThroitCheats_lIIllIIlllIlllIIIIIIII,ThroitCheats_IIlllIlllIIIlIlIllIl,ThroitCheats_IIlllIlllIIIlIlIllIl)local ThroitCheats_llIIlIIIIlllIIIllIlIll=string.char;local ThroitCheats_IIIlIIlllI...
nilq/small-lua-stack
null
local wrapper = require("core.lib.wrapper") local Item = require("core.Item") local dataPath = "bundle/simple-crafting/data/"; local _loadedResources = wrapper.loadBundleScript("data/resources"); local _loadedRecipes = wrapper.loadBundleScript("data/recipes"); local M = {}...
nilq/small-lua-stack
null
local skynet = require "skynet" skynet.register_protocol { -- 注册system消息 name = "system", id = skynet.PTYPE_SYSTEM -- pack = skynet.pack, -- unpack = skynet.unpack -- unpack必须指定一下,接收到消息后会自动使用unpack解析 } skynet.start(function() local othermsg = skynet.localname(".othermsg") local msg, sz = skyne...
nilq/small-lua-stack
null
local premake = require('premake') local vstudio = require('vstudio') local vcxproj = vstudio.vcxproj local VsVcxRootNamespaceTests = test.declare('VsVcxRootNamespaceTests', 'vcxproj', 'vstudio') function VsVcxRootNamespaceTests.isSetToProjectName() workspace('MyWorkspace', function () project('MyProject') end)...
nilq/small-lua-stack
null
SetupProject("Tut_09_Basic_Lighting", "BasicLighting.cpp", "data/DirVertexLighting_PCN.vert", "data/DirVertexLighting_PN.vert", "data/ColorPassthrough.frag") SetupProject("Tut_09_Scale_and_Lighting", "ScaleandLighting.cpp", "data/DirVertexLighting_PCN.vert", "data/DirVertexLighting_PN.vert", "data/ColorPassthro...
nilq/small-lua-stack
null
currentLevel = 1 local Game = require("src.states.game") local Gamestate = require("lib.gamestate") local Timer = require("lib.timer") function love.load() Gamestate.registerEvents() Gamestate.switch(Game) end function love.update(dt) Timer.update(dt) end function love.keypressed(key) if key == 'escape' then lo...
nilq/small-lua-stack
null
local res = script.res local main = script.main local utils = require(res.Utilities) local signal = require(res.Signal) local claim = require(main.claim) local restrict = require(main.restrict) local replicator = main.replicate local DEFAULT_TICKETS = 10 local Kits = {} Kits.__index = Kits function Kits.new() ret...
nilq/small-lua-stack
null
---@class KNGM : module local M = {} --#region Constants local match = string.match local call = remote.call --#endregion --#region Settings local income = settings.global["KNGM_income"].value --#endregion --#region Functions of events local function on_entity_died(event) local entity = event.entity local forc...
nilq/small-lua-stack
null
--http://springrts.com/phpbb/viewtopic.php?f=23&t=30560 function widget:GetInfo() return { name = "replay buttons", desc = "click buttons to change replay speed", author = "knorke", version = "1", date = "June 2013", license = "click button magic", layer = 10, enabled = true, } end lo...
nilq/small-lua-stack
null
local default_skin = ts_skins.build_skin_texture(ts_skins.get_body_features(""), ts_skins.get_clothing_textures("")) local priv = minetest.settings:get("ts_skins_dummies.priv") or "server" if priv == "" then priv = "server" end minetest.register_entity("ts_skins_dummies:dummy", { initial_properties = { visual = "me...
nilq/small-lua-stack
null
-- -- Read/Write test -- local flake = require 'flake' local thread = require 'thread' local lfsu = require 'lfsu' local qt = require 'qtest' local function sparkWithFile(path) local info = {getInputFiles = function(cfg, src) return {src} end} local f = flake.lift(function() end, 'foo', info) loc...
nilq/small-lua-stack
null
require('onmt.init') local cmd = onmt.utils.ExtendedCmdLine.new('lm.lua') local options = { { 'mode', 'string', [['score' apply lm to input text, 'sample' samples output based on input text.]], { enum = { 'score', 'sample' } } }, { '-src', '', [[Source sequences to sample/score.]],...
nilq/small-lua-stack
null
-- Stuff related to the chat (not keyboard nor interface) local fetching_player_room = {} local roompw = {} local fastest = {} local next_easter_egg = os.time() + math.random(30, 60) * 60 * 1000 local GameInterface local setNameColor local function capitalize(str) local first = string.sub(str, 1, 1) if first == "+...
nilq/small-lua-stack
null
local folderOfThisFile = (...):match("(.-)[^%/%.]+$") local class = require(folderOfThisFile.."/middleclass") local Winding = require(folderOfThisFile.."/Winding") local Polygon = class("Polygon") function Polygon:init(vertices) -- vertices: type(list(Point)) self._vertices = vertices or {} end function Poly...
nilq/small-lua-stack
null
function onCreate() makeLuaSprite("Sky","happysky", -200,-150) addLuaSprite("Sky",false) setLuaSpriteScrollFactor("Sky", 0.2,0.2); makeLuaSprite("Ground","happyground", -600,-300) addLuaSprite("Ground",false) setLuaSpriteScrollFactor("Ground", 0.8,0.8); end
nilq/small-lua-stack
null
-- Shim in case droptune is being used as a git submodule or such. if not (love or package.path:find("%?%.lua%;%?%/init%.lua%;")) then package.path = "?.lua;?/init.lua;" .. package.path end return require(... .. ".src")
nilq/small-lua-stack
null
--[=============================================================================[ The MIT License (MIT) Copyright (c) 2014 RepeatPan excluding parts that were written by Radiant Entertainment Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation fil...
nilq/small-lua-stack
null
local network = require "network" local function fillText(text, n) for k = 1, n - #text do text = text .. " " end return text end print("MCNET routing table") local routes = network.info.getRoutes() local maxlen = {12, 8, 5} for host, route in pairs(routes) do maxlen[1] = maxlen[1] < #host+1 ...
nilq/small-lua-stack
null
local InCombat = { } local OutCombat = { } XB.CR:Add(252, '[XB] Death Knight - Unholy', inCombat, outCombat)
nilq/small-lua-stack
null
--- === cp.localized === --- --- Helps look up localized names for folders. local require = require --local log = require "hs.logger".new "localized" local fs = require "hs.fs" local plist = require "hs.plist" local localeID = require "cp.i18n.localeID" lo...
nilq/small-lua-stack
null
local old_ptd001_init = PlayerTweakData.init function PlayerTweakData:init(tweak_data) old_ptd001_init(self, tweak_data) self.put_on_mask_time = 0 end
nilq/small-lua-stack
null
local L = WeakAuras.L local function createOptions(id, data) local options = { foregroundTexture = { type = "input", name = L["Foreground Texture"], order = 0 }, backgroundTexture = { type = "input", name = L["Background Textu...
nilq/small-lua-stack
null
local Identity, parent = torch.class('nn.Identity', 'nn.Module') function Identity:__init() parent.__init(self) end function Identity:forward(input) local currentOutput=input; self.output= currentOutput return self.output end function Identity:backward(input, gradOutput) local gradInput=gradOutput; ...
nilq/small-lua-stack
null
VERSION = "1.0.0" AddRuntimeFile("one-dark", "colorscheme", "one-dark.micro")
nilq/small-lua-stack
null
local IM = 139968 local IA = 3877 local IC = 29573 local seed = 42 local function random(max) seed = (seed * IA + IC) % IM return max * seed / IM; end local WIDTH = 60 local function print_fasta_header(id, desc) io.write(">" .. id .. " " .. desc .. "\n") end local function repeat_fasta(id, desc, a...
nilq/small-lua-stack
null
local PluginNetworkClient = {} local clientEvents = {} local plugin local player = game:GetService("Players").LocalPlayer local packetFolder = game:GetService("ServerStorage"):FindFirstChild("PNCPacketFolder") or Instance.new("Folder") packetFolder.Name = "PNCPacketFolder" packetFolder.Parent = game:GetService("ServerS...
nilq/small-lua-stack
null
function MAKER.createMakerElementCache(ID, notrim) local ID = MAKER.ensureID(ID) local ELEM = {}; ELEM.ID = ID; for k, v in pairs(MAKER.PROP_TO_ID) do ELEM[k] = sgui_get(ID,v); end; ELEM.type = MAKER.getElemType(ID); ELEM.parent = MAKER.getParent(ID); ELEM.special = MAKER.getSpecial(ID); if(not notrim) then...
nilq/small-lua-stack
null
-- For-in statement local function test(s, i) i = i + 1 if (i > 10) then return end return i end for i in test, 1, 0 do print(i) end
nilq/small-lua-stack
null
require "test.normalTest.Role" _ENV=namespace "test" using_namespace "battle" ---@type Role local role=Role("oneRole") role.attack=998 role.defence=334 role.hp=9988 role:speak("ok") role:showInfo() local equipment=Equipment("xixixi",3,4) role.equipments:push_back(equipment) local role2=Role("tworole") role:attackRo...
nilq/small-lua-stack
null
function Sandboxed:test_lua() io.write(string.format("in Sandboxed::test_lua\n")); end function test_lua() io.write(string.format("in test_lua\n")); end sandboxed = Sandboxed.new(); sandboxed:test_c();
nilq/small-lua-stack
null
local Grid = require ("jumper.grid") -- The grid class local Pathfinder = require ("jumper.pathfinder") -- The pathfinder lass function initEntities () entities = {} collisionBoxes = {} actorEntity = {} actorEntityNote = false -- entity = {} -- entity.name = "square2" -- entity.boxes = {} -- box = {} -- box.xy...
nilq/small-lua-stack
null
local policy = require 'apicast.policy' describe('policy', function() local phases = { 'init', 'init_worker', 'rewrite', 'access', 'balancer', 'header_filter', 'body_filter', 'post_action', 'log' } describe('.new', function() it('allows to set a name for the policy', function() local ...
nilq/small-lua-stack
null
local md = TGNSMessageDisplayer.Create() local Plugin = {} Plugin.HasConfig = true Plugin.ConfigName = "printablenames.json" function Plugin:JoinTeam(gamerules, player, newTeamNumber, force, shineForce) local _, nonPrintableCharactersCount = string.gsub(player:GetName(), "[^\32-\126]", "") if nonPrintableCharacters...
nilq/small-lua-stack
null
data:extend({ { name = 'street-car', type = 'item', icons = { { icon = '__street-car__/graphics/icons/street-hint.png', icon_size = 128, icon_mipmaps = 4, }, { icon = '__base__/graphics/icons/car.png', icon_size = 64, icon_mipmaps = 4, }, }, stack_size = 1, subgroup = 'street-t...
nilq/small-lua-stack
null
local solarC = calender.solartolunar({ year = 2019, month = 10, day = 21, }) print(solarC.year, solarC.month, solarC.day, solarC.isLeap) local lunarC = calender.lunartosolar({ year = 1989, month = 9, day = 25, isLeap = 0, }) print(lunarC.year, lunarC.month, lunarC.day)
nilq/small-lua-stack
null
local jwt = require "resty.jwt" local validators = require "resty.jwt-validators" local strings = require "saml.service_provider.strings" local _M = {} local mt = { __index = _M } -- Example token_obj in JSON: -- -- relay_state -- { -- "header": { -- "typ":"JWT", -- "alg":"HS256", -- "kid": "key_2020_0...
nilq/small-lua-stack
null
local channels = { [0] = "0", [1] = "A", [2] = "B", [3] = "C", [4] = "D", [5] = "E", [6] = "F", [7] = "User" } local opcode_names = { [0] = { [0] = "Padding" }, [1] = { [0] = "Put Full", [1] = "Put Part", [2] = "Arithmetic", [3] = "Log...
nilq/small-lua-stack
null
--[[ List of available models to load. ]] local model_list = {} paths.dofile('test/init.lua')(model_list) model_list['hg-generic-best'] = paths.dofile('hg-generic-best.lua') -- best combo of all models model_list['hg-generic-ensemble'] = paths.dofile('hg-generic-ensemble.lua') -- Ensemble net model_list['h...
nilq/small-lua-stack
null
local TxD = { {0,1,0,1,1,0,1}, {0,1,1,0,0,0,0}, {0,0,0,0,0,1,1}, {0,0,0,1,0,0,0}, {0,1,1,0,0,0,0}, {1,0,0,1,0,0,0}, {0,0,0,0,1,1,0}, {0,0,1,1,0,0,0}, {1,0,0,1,0,0,0}, } local Q = {0,1/math.sqrt(5),0,0,1/math.sqrt(5),1/math.sqrt(5),1/math.sqrt(5),1/math.sqrt(5),0} function TFN(TxD) -- TFN normált local n,m...
nilq/small-lua-stack
null
local Wave = {} local Platform = require(script.Platform) local State = require(script.State) local Object = require(script.Object) local App = require(script.App) local SymbolCache = require(script.SymbolCache) local Class = SymbolCache.new() local Property = SymbolCache.new() local Event = SymbolCache.ne...
nilq/small-lua-stack
null
local ngx = ngx local string = string local string_len = string.len local string_format = string.format local pairs = pairs local ipairs = ipairs local tonumber = tonumber local getmetatable = getmetatable local type = type local next = next local tab...
nilq/small-lua-stack
null
-- -- OOP Module -- based off of LOOP (http://loop.luaforge.net/) by Renato Maia <maia@inf.puc-rio.br> -- edited by TAD2020 to combine Simple and Multiple Inheritance Class Models in to one file and for simple use -- local pairs = pairs local ipairs = ipairs local unpack = unpack local ra...
nilq/small-lua-stack
null
function onTargetTile(cid, position) position.stackpos = 255 local corpse = getThingFromPos(position) if(corpse.uid == 0 or not isCorpse(corpse.uid) or not isMoveable(corpse.uid) or getCreatureSkullType(cid) == SKULL_BLACK) then return false end doRemoveItem(corpse.uid) doConvinceCreature(cid, doCreateMonste...
nilq/small-lua-stack
null
return { sessions = { primary_key = { "id" }, cache_key = { "session_id" }, table = "sessions", fields = { id = { type = "id", dao_insert_value = true }, session_id = { type = "text", unique = true, required = true }, expires = { ...
nilq/small-lua-stack
null