content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
local LBuilding = require("data.battle.LBuilding") local LTroop = class("LTroop", LBuilding) function LTroop:ctor() LBuilding.ctor(self) self._type = enum.battle.entity.troop self._mass = nil self._visualRange = nil --可见范围,用于跟随 self._moveSpeed = nil --移动速度 self._maxShieldHp = nil --最大护盾值 end function LTroop:i...
nilq/small-lua-stack
null
return function(v, msg) local memberID = v:match('%d+') local mention = v:match('<@%!?(%d+)>') local id = mention or memberID if not isSnowflake(id) then return end -- using getBans to avoid http bad requests when the ban does not actually exists local bans = msg.guild and msg.guild:getBans() return ban...
nilq/small-lua-stack
null
------------------------------------------------------------------- --// PROJECT: Union of Clarity and Diversity --// RESOURCE: UCDhousing --// DEVELOPER(S): Lewis Watson (Noki) --// DATE: 09/12/2015 --// PURPOSE: Create houses from data passed by client. --// FILE: \make\make.lua [server] -----------------------------...
nilq/small-lua-stack
null
SILE.registerCommand("package-documentation", function (options, _) local package = SU.required(options, "src", "src for package documentation") SU.debug("autodoc", package) local exports = require(package) if type(exports) ~= "table" or not exports.documentation then SU.error("Undocumented package "..packa...
nilq/small-lua-stack
null
local Screen = require('test.functional.ui.screen') local helpers = require('test.functional.helpers')(after_each) local lfs = require('lfs') local eq, eval, expect, source = helpers.eq, helpers.eval, helpers.expect, helpers.source local clear = helpers.clear local command = helpers.command local expect_err = helpers...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- -- file: gui_build_costs.lua -- brief: Shows metal and energy consumption + time required to construct a unit/building. -- original author: M...
nilq/small-lua-stack
null
for n in pairs(_G) do print(n); end print("-------------------------------------"); function getfield (f) local v = _G for w in string.gmatch(f, "[%w_]+") do v = v[w]; end return v; end function setfield (f, v) local t = _G; for w, d in string.gmatch(f, "([%w_]+)(%.?)") do if d == "." then t[w] = t[w]...
nilq/small-lua-stack
null
local HttpService = game:GetService("HttpService") local lib = {} --- Encodes a cframe in JSON function lib.EncodeCFrame(cframe) return HttpService:JSONEncode({ cframe:components() }) end --- Decode's a previously encoded cframe. function lib.DecodeCFrame(Data) if Data then local DecodedData = HttpService:JSOND...
nilq/small-lua-stack
null
local buf = require("doubleBuffering") local module = require("ethel.module") local physics = module.load("physics") local FORMATMETA = {} local function format(p) return setmetatable(p, FORMATMETA) end local newWindow do local meta = {} meta.__index = meta function meta:fromAbsCoords(x, y) return x - s...
nilq/small-lua-stack
null
local Byte = {} function Byte.bytesToHex(byteArray) local s = {} for i, byte in ipairs(byteArray) do s[i] = Byte.byteToHex(byte) end return table.concat(s, " ") end function Byte.byteToHex(byte) return string.format("%02X", byte) end return Byte
nilq/small-lua-stack
null
--[[ This script creates redirects file for mini-sprite of the current generation from animated to static. Arguments: - $1: specifies which redirect are to eb created. Can be one of these: - 'all': Creates redirects for all Pokémon. - <gen number>: Creates redirects for all Pokémon introduced in in ...
nilq/small-lua-stack
null
----------------------------------------------------------------------------------------- -- -- http://code.tutsplus.com/tutorials/corona-sdk-create-an-alphabet-soup-game-interaction--mobile-10441 -- -- väga abiks -- http://code.tutsplus.com/tutorials/corona-sdk-make-a-word-drop-game--mobile-20446 ------------------...
nilq/small-lua-stack
null
-- update refining recipes to make the ratios nicer guftlib.recipe.energy_set("clowns-ore1-chunk", 1) guftlib.recipe.energy_set("clowns-ore2-chunk", 1) guftlib.recipe.energy_set("clowns-ore3-chunk", 1) guftlib.recipe.energy_set("clowns-ore4-chunk", 1) guftlib.recipe.energy_set("clowns-ore5-chunk", 1) guftlib.recipe.ene...
nilq/small-lua-stack
null
require "lizards" -- Read in layout descriptions from text file layouts = lizards.layouts_t("LAYOUT.JS", lizards.FORMAT_JS) template = lizards.template_t(layouts, "partial.js", lizards.FORMAT_JS) grid = template:realize() lizards.output_t():svg(grid, "partial.svg", 0) -- lizards.output_t():json(grid, "CUST1.js", 0)...
nilq/small-lua-stack
null
return function(self, struc) assert_table(struc) self.struc = struc self.is_folded = false end
nilq/small-lua-stack
null
--TODO: Just the function is written here, it needs to be actually exported and documented properly local function ins_sort_inplace ( in_arr, cmp_func, s_idx, e_idx ) s_idx = s_idx or 1 e_idx = e_idx or #in_arr cmp_func = cmp_func or function ( A, B ) return A <= B end for cand_idx = s_idx+1, e_idx do ...
nilq/small-lua-stack
null
--- Pipeline library lets you create systems that register their stuff via folders. -- It automatically does the boring stuff like converting filenames for you, -- requiring you to write the real thing only. -- Check out sh_item and sh_admin libraries for examples. library 'Pipeline' local stored = Pipeline.stored or ...
nilq/small-lua-stack
null
require("indent_guides").setup( { exclude_filetypes = { "help", "dashboard", "dashpreview", "NvimTree", "vista", "sagahover", "coc-explorer", "floaterm", "packer" } } )
nilq/small-lua-stack
null
function jtorch._saveSelectNode(node, ofile) ofile:writeInt(node.dimension) ofile:writeInt(node.index) end
nilq/small-lua-stack
null
local floor floor = math.floor do local _class_0 local _base_0 = { filter = function(item, other) return "cross" end, changeSprite = function(self, sprite, update) if update == nil then update = true end self.sprite = sprite self.dim = Vector(self.sprite.width, self...
nilq/small-lua-stack
null
local httpService = game:GetService('HttpService') local function safeIndex(object, key) local success, value = pcall(function() return object[key] end) if success then return value end end local original, table = table, nil; table = { from = function(...) return {...} ...
nilq/small-lua-stack
null
-- Created by Elfansoer --[[ Ability checklist (erase if done/checked): - Scepter Upgrade - Break behavior - Linken/Reflect behavior - Spell Immune/Invulnerable/Invisible behavior - Illusion behavior - Stolen behavior ]] -------------------------------------------------------------------------------- modifier_snapfire_...
nilq/small-lua-stack
null
alphabet = "abcdefgh" uppers = "ABCDEFGH" romanNums = { [1] = 'i', [2] = 'ii', [3] = 'iii', [4] = 'iv', [5] = 'v', [6] = 'vi', [7] = 'vii', [8] = 'viii' } switchNumLet = true function pack(...) return { ... }, select("#", ...) end function mathTypeQ( x ) return x.isMathType end function perm( n, r, r...
nilq/small-lua-stack
null
#!/usr/bin/env tarantool local log = require('log') local json = require('json') local roles = require('cartridge.roles') local t = require('luatest') local g = t.group() local function check_error(expected_error, fn, ...) local _, err = fn(...) for _, l in pairs(string.split(tostring(err), '\n')) do ...
nilq/small-lua-stack
null
--============ Copyright © 2020, Planimeter, All rights reserved. ============-- -- -- Purpose: Dump list of console commands -- --============================================================================-- love.filesystem.createDirectory( "docs" ) local markdown = {} table.insert( markdown, "List of console comma...
nilq/small-lua-stack
null
local Spell = { } Spell.LearnTime = 240 Spell.ApplyFireDelay = 0.45 Spell.Description = [[ Used to conjure a blindfold over the eyes of the victim, therefore obstructing their view of their surroundings. Works only on players. ]] Spell.AccuracyDecreaseVal = 0.3 Spell.NodeOffset = Vector(-622, -1160, 0) if S...
nilq/small-lua-stack
null
require "utils.MenuItem" local Global = require "Global" HighScoreState = {} function HighScoreState:new() local object = { parentMenu = "menu" } setmetatable(object, { __index = HighScoreState }) return object end function HighScoreState:init() return end function HighScoreState:update(dt) return ...
nilq/small-lua-stack
null
loadfile("./util/lua2cc.lua")() loadfile("./util/ccfn.lua")() vgg16 = new_context({ name = "vgg16", inputs = { "in" }, outputs = { "out" } }) features = new_module() classifier = new_module() for i = 1, 2 do if i == 1 then inp = "#in" else inp = nil end features:append(fn.conv2d , { input ...
nilq/small-lua-stack
null
local testutil = require("testutil"); local fs = require("filesystem") local shell = require("shell") local text = require("text") local tx = require("transforms") local sh = require("sh") -- this method no longer exists and i'm too lazy to rewrite all of these tests -- by provided this method here for the tests, we c...
nilq/small-lua-stack
null
--[[ Connects to an event for the next time it's triggered. A common idiom is to keep a reference to the connection around and disconnect it inside the listener. This function abstracts that. Usage: -- This will only fire for the next player to join the game onNextEvent(game.Players.PlayerAdded, function(pla...
nilq/small-lua-stack
null
data:extend( { { type = "item", name = "stone", icon = "__base__/graphics/icons/stone.png", flags = {"goes-to-main-inventory"}, subgroup = "minerals", order = "d[stone]", stack_size = 200 }, { type = "noise-layer", name = "stone" }, { type = "autoplace-control", name ...
nilq/small-lua-stack
null
definitionsDialog = {} local allEDF = {} function createDefinitionsDialog() definitionsDialog.window = guiCreateWindow ( screenX/2 - 300, screenY/2 - 150, 600, 300, "DEFINITIONS", false ) guiSetVisible ( definitionsDialog.window, false ) --create the Element Definitions tab definitionsDialog.availEDF = guiCreate...
nilq/small-lua-stack
null
-- DEPRECATED: This story is provided for backwards compatibility with horsecat and will be removed. -- Please only make changes to `src\Stories\Private\Core\GenericSlider.story.lua` local ReplicatedStorage = game:GetService("ReplicatedStorage") local Roact = require(ReplicatedStorage.Packages.Roact) local GenericSl...
nilq/small-lua-stack
null
if _G.Settings.background == 'light' then vim.o.background = 'light' else vim.o.background = 'dark' end -- Colorscheme-dependent functions {{{ local function luxed_ayu() vim.g.ayucolor = 'dark' vim.api.nvim_exec( [[ augroup custom_colors autocmd! autocmd ColorScheme ayu call ayu#hi('MatchParen'...
nilq/small-lua-stack
null
local dungeonIndex = 19 MethodDungeonTools.dungeonTotalCount[dungeonIndex] = {normal=319,teeming=383,teemingEnabled=true} local selectorGroup local AceGUI = LibStub("AceGUI-3.0") local db local function fixBoralusShowHide(widget, frame, isFrame) frame = frame or MethodDungeonTools.main_frame local originalSho...
nilq/small-lua-stack
null
local PLUGIN = PLUGIN; local Clockwork = Clockwork; Clockwork.datastream:Hook("DispCharges", function(data) if (Schema.dispChargesPanel and Schema.dispChargesPanel:IsValid()) then Schema.dispChargesPanel:Close(); Schema.dispChargesPanel:Remove(); end; Schema.dispChargesPanel = vgui.Create("cwDispCharges"); Sc...
nilq/small-lua-stack
null
-- Natural Selection 2 Competitive Mod -- Source located at - https://github.com/xToken/CompMod -- lua\CompMod\TechData\NewTechData.lua -- - Dragon -- This file contains all the updated tech data. In mostly one place to make my life easier! function BuildCompModTechDataUpdates() local newTechTable = { } local techI...
nilq/small-lua-stack
null
_G["PixelVisionOSVersion"] = "v2.7+"
nilq/small-lua-stack
null
if not nyagos then print("This is a script for nyagos not lua.exe") os.exit() end -- hub exists, replace git command local hubpath=nyagos.which("hub.exe") if hubpath then nyagos.alias.git = "hub.exe" end share.git = {} local getcommits = function(args) local fd=io.popen("git log --format=...
nilq/small-lua-stack
null
-- Copyright 2022 philh30 -- -- 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 -- -- Unless required by applicable law or agreed to in writ...
nilq/small-lua-stack
null
-- Copyright (c) 2021 Kirazy -- Part of Artisanal Reskins: Compatibility -- -- See LICENSE in the project directory for license information. -- Check to see if reskinning needs to be done. if not mods["extendedangels"] then return end if not (reskins.angels and reskins.angels.triggers.bioprocessing.entities) then retu...
nilq/small-lua-stack
null
fx_version "adamant" game "gta5" author "Trsak" description "ESX Inventory HUD" version "2.4.0" ui_page "html/ui.html" client_scripts { "@es_extended/locale.lua", "client/main.lua", "client/trunk.lua", "client/property.lua", "client/player.lua", "client/shops.lua", "client/storage.lua", "locales/*....
nilq/small-lua-stack
null
--[[ 91501248, -- Pot of the Forbidden 03717252, -- Shaddoll Beast 67503139, -- Prediction Princess Crystaldine 77723643, -- Shaddoll Dragon 30328508, -- Shaddoll Squamata 26517393, -- Spirit of the Tailwind 95492061, -- Manju 31118030, -- Prediction Princess Arrowsylph 32231618, -- Prediction Princess Coinorma 0493989...
nilq/small-lua-stack
null
return { mods_options = { en = "Mod Options", es = "Configuración de mods", ru = "Настройки модов", }, open_vmf_options = { en = "Open Options Menu", es = "Abrir el menu de configuración", ru = "Открыть меню настроек", }, open_vmf_options_description = { en = "Keybind for opening a...
nilq/small-lua-stack
null
local Items = require 'database.items' local TscFile = require 'tsc_file' local WorldGraph = require 'database.world_graph' local Music = require 'database.music' local C = Class:extend() local TSC_FILES = {} do for key, location in ipairs(WorldGraph(Items()):getLocations()) do if location.map ~= nil and locat...
nilq/small-lua-stack
null
-- bell_positions are saved through server restart -- bells ring every hour -- they ring as many times as a bell ought to --Load documentation dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/documentation.lua") bell = {}; bell.RING_INTERVAL = 3600; --60*60; -- ring each hour bell.BELL_SAVE_FILE = ...
nilq/small-lua-stack
null
proc = "%" ind = math.random(2) denom = 10^ind enum = 2 + math.random(2*denom - 5); value = enum / denom result = math.floor(value * 100) q = lib.math.gcd(enum, denom) enum = enum / q denom = denom / q
nilq/small-lua-stack
null
-- -*- Mode: Lua; -*- -- -- violation.lua Functions for creating, signaling, and printing errors -- -- © Copyright IBM Corporation 2017. -- LICENSE: MIT License (https://opensource.org/licenses/mit-license.html) -- AUTHOR: Jamie A. Jennings ...
nilq/small-lua-stack
null
local function CreateTextLabel() local TextLabel = Instance.new("TextLabel") TextLabel.BackgroundTransparency = 1 TextLabel.Font = Enum.Font.Oswald TextLabel.TextColor3 = Color3.new(1, 1, 1) TextLabel.TextStrokeTransparency = .5 TextLabel.ZIndex = 101 TextLabel.TextScaled = true return TextLabel end return fu...
nilq/small-lua-stack
null
require("Game/Login/LoginConst") require("Game/Login/LoginModel") local crypt = require "crypt" LoginController = {} function LoginController:Init( ) print('Cat:LoginController.lua[Init]') self:InitEvents() self.loginView = require("Game/Login/LoginView").New() UIMgr:Show(self.loginView) end function Lo...
nilq/small-lua-stack
null
-------------------------------- -- @module WebView -- @extend Widget -- @parent_module ccexp -------------------------------- -- Gets whether this WebView has a back history item.<br> -- return WebView has a back history item. -- @function [parent=#WebView] canGoBack -- @param self -- @return bool#bool ret (return ...
nilq/small-lua-stack
null
data:extend({ { type = "font", name = "xx_font_30b", from = "default-bold", size = 30 }, { type = "font", name = "xx_font_30", from = "default", size = 30 }, { type = "font", name = "xx_font_17", from = "default...
nilq/small-lua-stack
null
require("ak.core.eep.EepSimulator") local StorageUtility = require("ak.storage.StorageUtility") StorageUtility.debug = false ------------------------------------------------------------------------------------ -- Ein Speicherplatz kann nur einmal verwendet werden -- Sinnvoll zu nutzen, wenn man jedem Signal oder and...
nilq/small-lua-stack
null
AddEventHandler("onResourceStart", function(resource) if resource == GetCurrentResourceName() then print("\n^1FAVELA GRATIS - ^2 Criada por ^1OLDBOB ^2 OTIMIZADA E CUSTOMIZADA POR ^1LAFA2K\n^0") end end)
nilq/small-lua-stack
null
slot1 = class("EffectAddMoney", import(".Effect")) slot1.ctor = function (slot0) slot0.super.ctor(slot0) slot0:SetEffectType(DNTG_EffectType.ETP_ADDMONEY) slot0.m_nParamCount = 3 slot0.lSco = 0 end slot1.Execute = function (slot0, slot1, slot2, slot3, slot4) if slot1 == nil then return 0, slot3 end slot5 =...
nilq/small-lua-stack
null
local app = app local libcore = require "core.libcore" local Class = require "Base.Class" local Unit = require "Unit" local GainBias = require "Unit.ViewControl.GainBias" local Encoder = require "Encoder" local FoldUnit = Class {} FoldUnit:include(Unit) function FoldUnit:init(args) args.title = "Fold" ...
nilq/small-lua-stack
null
--------------------------------------------------------------------------------------------------- -- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0190-resumption-data-error-handling.md -- -- Description: -- Check data resumption succeeded in case if HMI responds with SUCCESS result...
nilq/small-lua-stack
null
local MP = minetest.get_modpath(minetest.get_current_modname()) local bootstrap = loadfile(MP.."/bootstrap.lua")() mtzip = bootstrap(MP)
nilq/small-lua-stack
null
local M = {} local path_sep = vim.loop.os_uname().sysname == "Windows" and "\\" or "/" M.joinPath = function(...) return table.concat(vim.tbl_flatten({ ... }), path_sep) end M.get_root_dir = function() return M.joinPath(vim.fn.stdpath("cache"), "jop") end return M
nilq/small-lua-stack
null
local AddonName, AddonTable = ... -- Legion Cooking AddonTable.cooking = { -- Ingredients 124118, -- Fatty Bearsteak 133680, -- Slice of Bacon 146757, -- Prepared Ingredients 151653, -- Broken Isles Recipe Scrap }
nilq/small-lua-stack
null
-- SHA1 hash function in ComputerCraft -- By Anavrins -- For help and details, you can PM me on the CC forums -- You may use this code in your projects without asking me, as long as credit is given and this header is kept intact -- http://www.computercraft.info/forums2/index.php?/user/12870-anavrins -- http://past...
nilq/small-lua-stack
null
-- IN MENU local state = {} local LG = love.graphics local LK = love.keyboard local LM = love.mouse function state.init() local self = {} self = { keys = { escape = "quit", ["return"] = "startGame", up = "incIndex", down = ...
nilq/small-lua-stack
null
function isTypes(item, ...) local itemType = type(item) for v in ipairs(...) do if itemType == v then return true end end return false end function setTextKeyValue(t, txt, v) local branches = {} for branch in txt:gmatch("([^%.]+)%.") do branches[#branches + 1...
nilq/small-lua-stack
null
---@class Equip_EquipedCell 装备的质点信息 local Equip_EquipedCell = DClass("Equip_EquipedCell", BaseComponent) _G.Equip_EquipedCell = Equip_EquipedCell function Equip_EquipedCell:ctor() self.messager = Messager.new(self) end function Equip_EquipedCell:addListener() end function Equip_EquipedCell:onDispose() self.m...
nilq/small-lua-stack
null
----------------------------------------- -- LOCALIZED GLOBAL VARIABLES ----------------------------------------- local ZGV = _G.ZGV local npcDataCom = ZGV._NpcDataCommon local questDataCom = ZGV._QuestDataCommon local questStepDataCom = ZGV._QuestStepDataCommon local objectDataCom = ZGV._ObjectDataCommon loc...
nilq/small-lua-stack
null
Citizen.CreateThread(function() Wait(50) while true do miid(0.685, 1.345, 1.0,1.0,0.50, "~y~~H~ ID :~w~ ".. GetPlayerServerId(NetworkGetEntityOwner(GetPlayerPed(-1))) .. '', 255, 255, 255, 255) Citizen.Wait(1) end end) function miid(x,y ,width,height,scale, text, r,g,b,a, outline) Set...
nilq/small-lua-stack
null
-- General logging switch local enableLogging = require('state') if enableLogging ~= false then enableLogging = true end -- Custom action filter local ignoreActions = { ['BUTTON_RELEASED'] = { ['UI_FakeMovement'] = true, }, ['RELATIVE_CHANGE'] = { ['UI_FakeCamera'] = true, ['CameraMouseX'] = true, ['Camer...
nilq/small-lua-stack
null
-- Implements register allocation for pflua's native backend -- -- Follows the algorithm described in: -- "Linear scan register allocation" -- Poletto and Sarkar -- https://dl.acm.org/citation.cfm?id=330250 -- -- The result of register allocation is a table that describes -- the register allocated for the give...
nilq/small-lua-stack
null
local skynet = require "skynet" local dns = require "dns" local resolve_list = { "github.com", "stackoverflow.com", "lua.com", } skynet.start(function() -- you can specify the server like dns.server("8.8.4.4", 53) for _ , name in ipairs(resolve_list) do local ip, ips = dns.resolve(name) for k,v in ipairs(ips...
nilq/small-lua-stack
null
-- Clock function main() draw.setscreen(1) draw.settitle('Clock') while true do draw.doevents() draw.beginframe() draw.clear() getTime() drawClock() draw.endframe() draw.sleep(250) end end function drawClock() draw.setantialias(false) -- Draw the clock bord...
nilq/small-lua-stack
null
--[[ Load a mo file, retuan a lua function or table. A sample and description(in chinese): http://zengrong.net/post/1986.htm @see http://lua-users.org/lists/lua-l/2010-04/msg00005.html Modifier zrong(zengrong.net) Creation 2013-11-29 usage: local mo_data=assert(require("utils.Gettext").loadMOFromFile("main.mo")...
nilq/small-lua-stack
null
AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) include( 'shared.lua' ) function ENT:Initialize() self.Entity:PhysicsInit( SOLID_VPHYSICS ) self.Entity:SetMoveType( MOVETYPE_VPHYSICS ) self.Entity:SetSolid( SOLID_VPHYSICS ) self.Entity:SetCollisionGroup( COLLISION_GROUP_WEAPON ) self.Entity:SetMate...
nilq/small-lua-stack
null
---@class HeroSelectWindow local HeroSelectWindow = DClass("HeroSelectWindow", BaseWindow) _G.HeroSelectWindow = HeroSelectWindow function HeroSelectWindow:ctor(data) self.positionIdx = data[1] local posInfo = FormationMgr:getPosInfo(self.positionIdx) local curRoleId = posInfo.heroId if curRoleId > 0 ...
nilq/small-lua-stack
null
DamagePlants = { iInsideCount = 0, pPlantsEntityCurrent = nil, iLastUpdatedCount = 0 } function DamagePlants.main() Game.ImportLibraryWithName("actors/characters/samus/scripts/samus.lua", "Samus") end function DamagePlants.OnPlayerDead() DamagePlants.iInsideCount = 0 DamagePlants.UpdateFeedback...
nilq/small-lua-stack
null
require('Spawnbarriers') function Server_StartGame(game, standing) Spawnbarriers(game, standing); end
nilq/small-lua-stack
null
DumpLimit = 10000 local _KNOWNGLOBALS = dump, structs local Keywords = {} do local t = {"and", "break", "do", "else", "elseif", "end", "false", "for", "function", "if", "in", "local", "nil", "not", "or", "repeat", "return", "then", "true", "until", "while", "goto"} for k, v in pairs(t) do Keywords[v] = k end end...
nilq/small-lua-stack
null
function description() return "Focuses the command bar" end function run() focus_commandbar_in_window(focused_window_index()) return false end
nilq/small-lua-stack
null
-- Requires LÖVE2D (love2d.org) or a compiled executable to run. -- Known caveats: -- 1) The method for updating the snake and checking collisions is pretty inefficient. Not sure how to fix. -- Runs only once the game loads unless called externally. function love.load() -- Load head images headUp = love.grap...
nilq/small-lua-stack
null
if not m_set then m_set = {one='m2', two='m3', alt='m1',} end Zero = {['name'] = 'Zero',['menu'] = 'Zero', --['m2g1'] = 'lock '.. _addon.command ..' reset', ['m2g3'] = 'lock '.. _addon.command ..' back', ['Alt+d'] = 'input /deliverybox', -- ['Alt+x'] = 'input /sendpost', --...
nilq/small-lua-stack
null
-- mimetypes.lua -- Version 1.0.0 --[[ Copyright (c) 2011 Matthew "LeafStorm" Frazier 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 ...
nilq/small-lua-stack
null
-- https://github.com/nvim-pack/nvim-spectre -- WARN: spectre 手动安装依赖项 sed 和 ripgrep -- sed 命令(自行安装,如果已有则忽略) -- repgrep: https://github.com/BurntSushi/ripgrep local status_ok, spectre = pcall(require, "spectre") if not status_ok then vim.notify("spectre not found!") return end spectre.setup( { mapping = ...
nilq/small-lua-stack
null
item_sonic = class(ItemBaseClass) LinkLuaModifier("modifier_item_sonic_passives", "items/sonic.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_sonic_fly", "items/sonic.lua", LUA_MODIFIER_MOTION_NONE) function item_sonic:GetIntrinsicModifierName() return "modifier_item_sonic_passives" end function item_so...
nilq/small-lua-stack
null
local MAPPER = require 'utils' MAPPER.nnoremap('<F1>', '<cmd> :Startify<CR>')
nilq/small-lua-stack
null
txd = engineLoadTXD("washing.txd") engineImportTXD(txd, 479) dff = engineLoadDFF("washing.dff", 479) engineReplaceModel(dff, 479)
nilq/small-lua-stack
null
local cjson=require "cjson" require "helloZS" ngx.say(api_common_version) -- local cache=ngx.shared.ngx_cache cache:set('hah',"zhangliutong",10000) ngx.say(cache:get('hah')) --ngx.req.read_body() --local args=ngx.req.get_post_args() -- --if not args or not args.info then -- ngx.exit(ngx.HTTP_BAD_REQUEST) -- end l...
nilq/small-lua-stack
null
local PANEL = {} --[[--------------------------------------------------------- Function: Init -----------------------------------------------------------]] function PANEL:Init() --> VBar - Paint self.VBar.Paint = function( pnl, w, h ) draw.RoundedBox(0, 0, 0, w, h, Color(225, 225, 225, 255)) draw.Rou...
nilq/small-lua-stack
null
PJ_QUESTS = PJ_QUESTS or {} local mod = PJ_QUESTS --- Listener for a state change. core:remove_listener("pj_quests_on_state_changed_example") core:add_listener( "pj_quests_on_state_changed_example", "pj_quests_on_state_changed", true, function(context) ---@type string local state = context.string out("change...
nilq/small-lua-stack
null
local PANEL = {} function PANEL:Init() self.Material = nil self.AutoSize = true self:SetAlpha( 255 ) self:SetMouseInputEnabled( false ) self:SetKeyboardInputEnabled( false ) end function PANEL:Paint() if (!self.Material) then return true end surface.SetMaterial( self.Material ) surface.SetDrawColor( 255...
nilq/small-lua-stack
null
local function abc() if fdasf then end return abc
nilq/small-lua-stack
null
local key_socket_user = KEYS[1]; local key_active_users = KEYS[2]; local key_mobile_users = KEYS[3]; local key_active_sockets = KEYS[4]; local key_user_lock = KEYS[5]; local key_user_sockets = KEYS[6]; local user_id = ARGV[1]; local socket_id = ARGV[2]; local create_time = ARGV[3]; local mobile_connection = tonumber(A...
nilq/small-lua-stack
null
fx_version 'adamant' games { 'gta5' } client_scripts { "client/*.lua", "client/exports/*.lua", "client/system/*.lua", "client/module/*.lua", } files { "html/css/*.css", "html/css/img/*.png", "html/*.html", "html/scripts/*.js", } ui_page "html/index.html"
nilq/small-lua-stack
null
local ui_new_checkbox, ui_reference, ui_new_slider, ui_get, client_get_cvar, client_set_cvar, client_set_event_callback = ui.new_checkbox, ui.reference, ui.new_slider, ui.get, client.get_cvar, client.set_cvar, client.set_event_callback local ref_slowwalk, ref_slowwalk_key = ui_reference("AA", "Other", "Slow motion") l...
nilq/small-lua-stack
null
--[[ ====================================== ]]-- function love.load() love.graphics.setDefaultFilter("nearest", "nearest", 1) love.graphics.setNewFont("fnt/SomepxRegular.ttf", 64) screen = {} music = love.audio.newSource("audio/bgm/bmsr.wav", "stream") music:setLooping(true) music:setVolume(0.25) sfxBtn = lov...
nilq/small-lua-stack
null
local HideNSeek local inventory_manager = {} function inventory_manager.backup_player_inventory(player) if type(player) == "string" then player = minetest.get_player_by_name(player) end local inventory = player:get_inventory() local inv_list = inventory:get_list("main") inventory:set_size("main_backup",...
nilq/small-lua-stack
null
return Def.ActorFrame { OnCommand= function(self) self:queuecommand("Recenter") end, RecenterCommand= function(self) SCREENMAN:GetTopScreen():xy(0, 0) end, Def.Quad{ InitCommand=cmd(scaletocover,-SCREEN_WIDTH*2,SCREEN_TOP,SCREEN_WIDTH*2,SCREEN_BOTTOM;diffuse,color("0,0,0,0.5")); }; };
nilq/small-lua-stack
null
StormFox2.Setting.AddSV("darken_2dskybox", false, nil, "Effect") local convar = GetConVar("sv_skyname") local mat_2dBox = "skybox/" .. convar:GetString() local last_f = 1 local function OnChange( str ) StormFox2.Map.Set2DSkyBoxDarkness( last_f ) end cvars.RemoveChangeCallback("sv_skyname", "sf_skynamehook") cvars....
nilq/small-lua-stack
null
local ItemSlot = require "widgets/itemslot" local InvSlot = Class(ItemSlot, function(self, num, atlas, bgim, owner, container,screen) ItemSlot._ctor(self, atlas, bgim, owner) self.owner = owner self.screen = screen self.container = container self.num = num end) function InvSlot:GetSlotNum() if s...
nilq/small-lua-stack
null
hook.Add("Initialize", "sbv_physenv_fix", function() physenv.SetPerformanceSettings({ MaxVelocity = 11784960000, MaxAngularVelocity = 11784960000 }) end)
nilq/small-lua-stack
null
function onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.actionid ~= 62378 then return false end if player:getStorageValue(Storage.DeeperBanutaShortcut) ~= 1 then player:removeItem(10523, 1) player:setStorageValue(Storage.DeeperBanutaShortcut, 1) player:sendTextMessage(MESSAGE_EVEN...
nilq/small-lua-stack
null
function love.conf(t) t.window.title = "Fowl Play" t.window.width = 1028 t.window.height = 720 t.window.fullscreen = false t.window.vsync = true end
nilq/small-lua-stack
null