content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
--Custom Audio Peripheral for LD Jam return function(config) --A function that creates a new Keyboard peripheral. if not love.audio then error("love.audio module is disabled !") end local au, devkit = {}, {} local musiclist = {"BounceMan.ogg"} local sfxlist = { "DoorClose.wav", --1 "DoorOpen.w...
nilq/small-lua-stack
null
dofile("urlcode.lua") dofile("table_show.lua") JSON = (loadfile "JSON.lua")() local url_count = 0 local tries = 0 local item_type = os.getenv('item_type') local item_value = os.getenv('item_value') local downloaded = {} local addedtolist = {} downloaded["http://genforum.genealogy.com/javascript/TSpacer_wrapper.js"] ...
nilq/small-lua-stack
null
ACF.MenuOptions = ACF.MenuOptions or {} ACF.MenuLookup = ACF.MenuLookup or {} ACF.MenuCount = ACF.MenuCount or 0 local Options = ACF.MenuOptions local Lookup = ACF.MenuLookup do -- Menu population functions local function DefaultAction(Menu) Menu:AddTitle("There's nothing here.") Menu:AddLabel("This option is ei...
nilq/small-lua-stack
null
local BUILDER, PART = pac.PartTemplate("base") PART.ClassName = "player_config" PART.Group = "entity" PART.Icon = 'icon16/brick.png' local blood_colors = { dont_bleed = _G.DONT_BLEED, red = _G.BLOOD_COLOR_RED, yellow = _G.BLOOD_COLOR_YELLOW, green = _G.BLOOD_COLOR_GREEN, mech = _G.BLOOD_COLOR_MECH, antlion = _...
nilq/small-lua-stack
null
vim.cmd [[ syntax enable ]] local config_dir = vim.env.XDG_CONFIG_HOME or "~/.config" local bin_dir = config_dir .. '/bin' local cache_dir = vim.env.XDG_CACHE_HOME or "~/.cache" local backup_dir = cache_dir .. '/nvim/backup' local undo_dir = cache_dir .. '/nvim/undo' os.execute('mkdir -p ' .. backup_dir) os.execute('...
nilq/small-lua-stack
null
function showText_Create(red, green, blue, text, time, thePlayer) showText_Display = textCreateDisplay () showText_Text = textCreateTextItem ( "", 0.5, 0.3, 2, 0, 255, 0, 255, 2.3, "center", "center", 255 ) textDisplayAddText ( showText_Display, showText_Text ) end function showText ( red, green, blue, text, time, the...
nilq/small-lua-stack
null
LinkLuaModifier("modifier_boss_capture_point", "modifiers/modifier_boss_capture_point.lua", LUA_MODIFIER_MOTION_NONE) -- Taken from bb template if BossAI == nil then DebugPrint ( 'creating new BossAI object' ) BossAI = class({}) BossAI.hasFarmingCore = {} BossAI.hasSecondBoss = {} Debug.EnabledModules['boss...
nilq/small-lua-stack
null
require "Global.guard_types" local NullGuard = require("Battle.model.guard.NullGuard") local KnightGuard = require("Battle.model.guard.KnightGuard") local RogueGuard = require("Battle.model.guard.RogueGuard") -------------------------------------------------------------------------------------------------------- local...
nilq/small-lua-stack
null
modernUI.questInterface = function(self) local id = self.id local player = self.player local width = self.width local height = self.height local x = (400 - 270/2) local y = (200 - 90/2) - 30 local images = {'174070bd0ec.png', '174070e21a1.png'} -- available, unavailaible local playerData = players[player] l...
nilq/small-lua-stack
null
-- sendloop.lua -- 通过mqtt方式发送登录及状态信息到服务器 -- by leonstill@163.com 2018-12-13 local conf = ... or { host = "114.215.120.146", port = 1883, interval = 1000} local json = sjson if (wifi.getmode() ~= wifi.STATION and wifi.getmode() ~= wifi.STATIONAP) then syslog.print(syslog.WARN, "wifi mode should be 'wifi.STATION'...
nilq/small-lua-stack
null
--A lot of Thanks to iUltimateLP and his mod SimpleTeleporters for inspiration and for the use of His Code and graphics data:extend({ { type = "explosion", name = "teleport-sound", animation_speed = 5, animations = { { filename = "__PersonalTeleporter__/graphics/empty.png", ...
nilq/small-lua-stack
null
local core = require "core" local config = require "core.config" local tokenizer = require "core.tokenizer" local Object = require "core.object" local highlighter = Object:extend() function highlighter:new(doc) self.doc = doc self:reset() -- init incremental syntax highlighting core.add_thread(funct...
nilq/small-lua-stack
null
--- @module Frame -- A simple frame, often used for visually grouping or separating other elements. -- Can also be given text, which will be wrapped to fit. -- @option color string|table A color preset for the frame outline -- @option textColor string|table A color preset -- @option bg string|table A color preset -- @o...
nilq/small-lua-stack
null
package.path = "../lua/?.lua" local evdtest = require("evdtest") function foo() evdtest.waitevent("foo") end function bar() evdtest.waitevent("bar") end evdtest.startcoroutine(foo) evdtest.startcoroutine(bar) evdtest.waitevent("hello world")
nilq/small-lua-stack
null
return require "sparse-set.init"
nilq/small-lua-stack
null
local Tunnel = module("_core", "lib/Tunnel") local Proxy = module("_core", "lib/Proxy") API = Tunnel.getInterface("API") cAPI = {} Tunnel.bindInterface("API", cAPI) Proxy.addInterface("API", cAPI) initializedPlayer = false AddEventHandler( "playerSpawned", function() TriggerServerEvent("pre_playerSpawned") end ...
nilq/small-lua-stack
null
local anim = false function onRender() local forcedanimation = getElementData(getLocalPlayer(), "forcedanimation") if (getPedAnimation(getLocalPlayer())) and not (forcedanimation) then local screenWidth, screenHeight = guiGetScreenSize() anim = true dxDrawText("Press Spacebar to Cancel Animation", scr...
nilq/small-lua-stack
null
local libcore = require "core.libcore" local Class = require "Base.Class" local Unit = require "Unit" local OptionControl = require "Unit.ViewControl.OptionControl" local RectifierUnit = Class {} RectifierUnit:include(Unit) function RectifierUnit:init(args) args.title = "Rectify" args.mnemonic = "Re" ...
nilq/small-lua-stack
null
local function printInterpol(yazi) MsgC( Color(0,245,163), "[gInterpol] ", Color( 255, 255, 255),yazi, "\n") end hook.Add( "PlayerInitialSpawn", "whitelist_uyari", function( ply ) if gInterpolWhitelist[ ply:SteamID64() ] then printInterpol("------------------------------------------------------------------------...
nilq/small-lua-stack
null
#!/usr/bin/env tarantool test = require("sqltester") test:plan(3) --!./tcltestrunner.lua -- 2011 July 8 -- -- The author disclaims copyright to this source code. In place of -- a legal notice, here is a blessing: -- -- May you do good and not evil. -- May you find forgiveness for yourself and forgive others. --...
nilq/small-lua-stack
null
--Resource monitoring local monitor = {} --Unit:MB monitor.memory_used = 0 -- script memory being used by Lua (Unit:) monitor.objects_rendered = 0 monitor.light_sources = 0 monitor.draw_calls = 0 -- Number of draw calls made in a frame monitor.texture_memory = 0 -- VRam being used (Unit:) monitor.shader_switches ...
nilq/small-lua-stack
null
local playsession = { {"Redbeard28", {71876}}, {"BlkKnight", {69684}}, {"Krengrus", {24469}} } return playsession
nilq/small-lua-stack
null
#!/usr/bin/env lua file = io.open(arg[1]) io.write("<html>\n") io.write("<head>\n") io.write("<title>Soundpipe</title>\n") io.write("<link rel=\"stylesheet\" href=\"css/skeleton.css\">\n") io.write("<link rel=\"stylesheet\" href=\"css/normalize.css\">\n") io.write("</head>\n") io.write("<body>\n<div class=\"container...
nilq/small-lua-stack
null
--GPU: Image Object. --luacheck: push ignore 211 local Config, GPU, yGPU, GPUVars, DevKit = ... --luacheck: pop local SharedVars = GPUVars.Shared local RenderVars = GPUVars.Render local CalibrationVars = GPUVars.Calibration local VRamVars = GPUVars.VRam --==Varss Constants==-- local Verify = SharedVars.Verify local ...
nilq/small-lua-stack
null
local sh = setmetatable({}, { __index = function(_, k) return _3DreamEngine.lightShaders["point_shadow"][k] end }) sh.func = "sampleShadowPointSmoothDynamic" function sh:constructDefinesGlobal(dream) return [[ float sampleShadowPointSmoothDynamic(vec3 lightVec, samplerCube tex) { float sharpness = 10.0; ...
nilq/small-lua-stack
null
-- // Remove Duplicate GUIS for _, v in ipairs(game.CoreGui:GetChildren()) do if v.Name == "ScreenGui" then v:Destroy() end end -- // UI Library Depedency local library = loadstring(game:HttpGet("https://raw.githubusercontent.com/wally-rblx/uwuware-ui/main/main.lua"))() -- // Services local players = ...
nilq/small-lua-stack
null
translations.id = { name = "id", fullname = "Bahasa Indonesia", -- Error messages corrupt_map = "<r>Peta rusak. Sedang Memuat peta lainnya.", corrupt_map_vanilla = "<r>[KESALAHAN] <n>Tidak bisa mendapatkan informasi dari peta ini.", corrupt_map_mouse_start = "<r>[KESALAHAN] <n>Peta ini harus me...
nilq/small-lua-stack
null
------------------------------------------------------------------------------- -- Mob Framework Mod by Sapier -- -- You may copy, use, modify or do nearly anything except removing this -- copyright notice. -- And of course you are NOT allow to pretend you have written it. -- --! @file main_follow.lua --! @brief compon...
nilq/small-lua-stack
null
-- Usage: -- local mastNames = require '__radio__/mast_names' if _G.stations then return end _G.stations = { 'Alpha', 'Bravo', 'Charlie', 'Delta', 'Echo', 'Foxtrot', 'Golf', 'Hotel', 'India', 'Juliet', 'Kilo', 'Lima', 'Mike', 'November', 'Oscar', 'Papa', 'Queb...
nilq/small-lua-stack
null
data:extend({ { type = "recipe", name = "processed-sand", enabled = "false", ingredients = { {"unprocessed-sand",1}, {"stone-brick",1}, }, result = "processed-sand" }, })
nilq/small-lua-stack
null
--[[ bbbbbbbb b::::::b kkkkkkkk hhhhhhh b::::::b ...
nilq/small-lua-stack
null
object_tangible_collection_reward_hanging_light_reward_02 = object_tangible_collection_reward_shared_hanging_light_reward_02:new { } ObjectTemplates:addTemplate(object_tangible_collection_reward_hanging_light_reward_02, "object/tangible/collection/reward/hanging_light_reward_02.iff")
nilq/small-lua-stack
null
if nil ~= require then require "wow/FontString"; require "wow/Frame-Container"; require "wow/Frame-Layer"; require "wow/Frame-Alpha"; require "fritomod/Functions"; require "fritomod/Lists"; require "fritomod/Ordering"; require "fritomod/Anchors"; require "fritomod/Tables"; requi...
nilq/small-lua-stack
null
function loadSAESModelsLua() local file = fileOpen("models_client.lua") local content = fileRead(file, fileGetSize(file)) fileClose(file) loadstring(content)() end function overwriteDownloadExport() exports.RPGfile = { downloadFile = function(this, filepath) return fileExis...
nilq/small-lua-stack
null
local format_identifier, identifier_pattern, escape, special_functions_names, pretty_signature, signature -- try to define an alias using rem, the text that follows the identifier -- returns true, new_rem, alias_name in case of success -- returns true, rem in case of no alias and no error -- returns nil, err in case o...
nilq/small-lua-stack
null
local F, C = unpack(select(2, ...)) local ACTIONBAR = F:GetModule('Actionbar') ACTIONBAR.fader = { fadeInAlpha = 1, fadeInDuration = 0.3, fadeInSmooth = 'OUT', fadeOutAlpha = 0, fadeOutDuration = 0.9, fadeOutSmooth = 'OUT', fadeOutDelay = 0, } ACTIONBAR.faderOnShow = { fadeInAlpha = 1, fadeInDuration = 0.3,...
nilq/small-lua-stack
null
local localization = { mod_description = { en = "Open window with F2 to paste and execute Lua code in." }, } return localization
nilq/small-lua-stack
null
local housing_libs = {} local MESSAGE_ENTITY_SET_TO_INACTIVE = { "description.entity_set_to_inactive" } local entity_cost = {} ---- base -------------------------------------------------------------------- entity_cost["inserter"] = 0.1 entity_cost["fast-inserter"] = 0.1 entity_cost["filter-inserter"] = 0.1 ent...
nilq/small-lua-stack
null
-- ============ -- STRING UTILS -- ============ -- Created by datwaft <github.com/datwaft> local M = require("bubbly.core.module").new("utils.string") -- Returns a titlecase version of the string -- e.g. hello world -> Hello World ---@param str string ---@return string function M.titlecase(str) if not str then ...
nilq/small-lua-stack
null
return { Name = "blink"; Aliases = {"b"}; Description = "Teleports you to where your mouse is hovering."; Group = "DefaultDebug"; Args = {}; Run = function(context) -- We implement this here because player position is owned by the client. -- No reason to bother the server for this! local mouse = context.E...
nilq/small-lua-stack
null
if (SERVER) then AddCSLuaFile() end sound.Add({ name="weapon_kswep.single", volume=1.0, pitch={155,165}, sound="^weapons/sg550/sg550-1.wav", level=145, channel=CHAN_WEAPON }) sound.Add({ name="weapon_kswept_law.single", volume=1.0, pitch={55,60}, sound="^weapons/357_fire2.wav", level=165, channel=CHAN_WE...
nilq/small-lua-stack
null
local M = {} ---@param config table The configuration object ---@return Theme Returns a theme object which can be given to --`require("nord.util").load` to load the theme. function M.setup(config) config = config or require("nord.config") ---@class Theme local theme = {} theme.config = config theme.colors =...
nilq/small-lua-stack
null
local math2d = require('math2d') local magnetRamps = {} magnetRamps.setRange = function (ramp, range, player) ramp.range = range + 6 if ramp.rangeID then rendering.destroy(ramp.rangeID) end for each, tile in pairs(ramp.tiles) do tile.destroy() end ramp.tiles = {} ramp.rangeID = rendering.draw_sprite{ sprite ...
nilq/small-lua-stack
null
function Spawn( entityKeyValues ) thisEntity:SetModel("models/development/invisiblebox.vmdl") thisEntity:SetOriginalModel("models/development/invisiblebox.vmdl") local greevils = { "npc_black_greevil", "npc_white_greevil", "npc_orange_greevil", "npc_yellow_greevil", "npc_green_greevil", "npc_purple_greevil", "npc_...
nilq/small-lua-stack
null
local luvi = require('luvi'); _G.loadModule = function (idf,path) idf = idf:match("%.?([^%.]+)$"); luvi.bundle.register(idf,path); return require(idf); end; local fs = require("fs"); io.write("\n[ 그래프로 그림 그리기 ]\n\27[33m그릴 수 있는 그래프들은 다음과 같습니다\27[0m\n──────────────────────────────────────\n"); local items = fs.rea...
nilq/small-lua-stack
null
local assert = assert local type = type module( "environment", package.seeall ) local environments = {} local functions = { ["null"] = function() end } --[[------------------------------------------------------------------------- Working on Functions ----------------------------------------------------------...
nilq/small-lua-stack
null
local K, C = unpack(select(2, ...)) if C.Misc.PvPEmote ~= true then return end local Module = K:NewModule("PvPEmote", "AceEvent-3.0") local _G = _G local bit_band = bit.band local math_random = math.random local select = select local DoEmote = _G.DoEmote local GetAchievementInfo = _G.GetAchievementInfo local unitFi...
nilq/small-lua-stack
null
-- ======= Copyright (c) 2003-2014, Unknown Worlds Entertainment, Inc. All rights reserved. ======= -- -- lua\NS2Utility.lua -- -- Created by: Charlie Cleveland (charlie@unknownworlds.com) -- -- NS2-specific utility functions. -- -- ========= For more information, visit us at http://www.unknownworlds.com =====...
nilq/small-lua-stack
null
local ZkyTargetBar = LibStub("AceAddon-3.0"):GetAddon("ZkyTargetBar") local defaults = { profile = { position = nil, scale = 1.5, layout = 3, textPosition = { x = 0, y = -2 }, hideText = false, showInRaid = true, showInParty = false, showSolo = false,...
nilq/small-lua-stack
null
--- An empty module that can be used with require() print('empty_mod.lua called') return { foo = function() print('foo') end }
nilq/small-lua-stack
null
--[[ --MIT License -- --Copyright (c) 2019 manilarome --Copyright (c) 2020 Tom Meyers -- --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 ...
nilq/small-lua-stack
null
-- Density's values start from 0.0 to 1.0. DenistyMultiplier = 0.3 Citizen.CreateThread(function() while true do Citizen.Wait(0) SetVehicleDensityMultiplierThisFrame(DenistyMultiplier) SetPedDensityMultiplierThisFrame(DenistyMultiplier) SetRandomVehicleDensityMultiplierThisFrame(DenistyMult...
nilq/small-lua-stack
null
--[[-------------------------------------------------------------------- Copyright (C) 2012 Sidoine De Wispelaere. Copyright (C) 2012, 2013, 2014 Johnny C. Lam. See the file LICENSE.txt for copying permission. --]]-------------------------------------------------------------------- -- Gather informat...
nilq/small-lua-stack
null
return {id=5,name={key='key_name',text="aabbcc"},date={ _type_='DemoD5',x1=1,time={start_time=398966400,end_time=936806400,},},}
nilq/small-lua-stack
null
register_item({ name = "chips", texture = "chips.png", hunger = 6, }) register_item({ name = "water_bottle", texture = "water_bottle.png", thirst = 20, }) -- begin empty foods to mirror the regular foods register_item({ name = "empty_chips", texture = "empty_chips.png", }) register...
nilq/small-lua-stack
null
--[[ Data storage note: this plugin requires state which you can get from the following url: https://github.com/TheLinx/lstate ]] Name = "Data Storage" Hidden = true -- comment to enable this plugin disable() local state = require("state") local cfg = CONFIG.data local function load() local saved = state.loa...
nilq/small-lua-stack
null
-- Copyright 2022 SmartThings -- -- 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 ...
nilq/small-lua-stack
null
object_draft_schematic_armor_component_new_armor_core_basic_test = object_draft_schematic_armor_component_shared_new_armor_core_basic_test:new { } ObjectTemplates:addTemplate(object_draft_schematic_armor_component_new_armor_core_basic_test, "object/draft_schematic/armor/component/new_armor_core_basic_test.iff")
nilq/small-lua-stack
null
ModelFlags = { [`flatbed`] = { "isTowTruck" }, [`trash2`] = { "isTrashTruck" }, [`benson`] = { "isDeliveryTruck" }, [`prop_vend_snak_01`] = { "isVendingMachine", "isVendingMachineFood" }, [`prop_vend_coffe_01`] = { "isVendingMachine", "isVendingMachineBeverage" }, [`prop_vend_soda_01`] = { "isVe...
nilq/small-lua-stack
null
local a = vim.api local highlights = {} local ns_telescope_selection = a.nvim_create_namespace('telescope_selection') local ns_telescope_multiselection = a.nvim_create_namespace('telescope_mulitselection') local ns_telescope_entry = a.nvim_create_namespace('telescope_entry') local Highlighter = {} Highlighter.__inde...
nilq/small-lua-stack
null
local mqtt = require('mqtt') local assert = require('assert') local TAG = "mqtt" -- 主要测试了 ping 这几个方法 -- 这个测试需要用到 MQTT 服务器 local url = 'mqtt://127.0.0.1:1883' local url = 'mqtt://iot.wotcloud.cn:1883' local options = { clientId = 'wotc_34dac1400002_test' } local client = mqtt.connect(url, options) client.options.d...
nilq/small-lua-stack
null
local Widget = require "widgets/widget" local Text = require "widgets/text" local FollowText = Class(Widget, function(self, font, size, text) Widget._ctor(self, "followtext") self:SetScaleMode(SCALEMODE_PROPORTIONAL) self:SetMaxPropUpscale(1.25) self.text = self:AddChild(Text(font, size, text)) se...
nilq/small-lua-stack
null
---@class cipherlib local cipher = {} ---@alias CipherType ---| '"AES-128-ECB"' # AES cipher with 128-bit ECB mode. ---| '"AES-192-ECB"' # AES cipher with 192-bit ECB mode. ---| '"AES-256-ECB"' # AES cipher with 256-bit ECB mode. ---| '"AES-128-CBC"' # AES cipher with 128-bi...
nilq/small-lua-stack
null
local model = require "sailor.model" local helper = require "tests.helper" local access = require "sailor.access" local db = require "sailor.db" local fixtures = require "tests.fixtures.user" or {} describe("Testing #UserModel", function() --helper.blah() local User = model('user') local users = User:find_all()...
nilq/small-lua-stack
null
--[[ Copyright (C) 2018 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope th...
nilq/small-lua-stack
null
return { STOP = 0, VOID = 1, BOOL = 2, BYTE = 3, I08 = 3, DOUBLE = 4, I16 = 6, I32 = 8, I64 = 10, STRING = 11, UTF7 = 11, STRUCT = 12, MAP = 13, SET = 14, LIST = 15, UTF8 = 16, UTF16 = 17 }
nilq/small-lua-stack
null
local awful = require("awful") do local cmds = { "lxpolkit", "xautolock -time 15 -locker 'dm-tool lock;gpg-connect-agent reloadagent /bye'", "clipmenud", "xfce4-power-manager", } for _, i in pairs(cmds) do awful.spawn.with_shell(i .. "&") end end
nilq/small-lua-stack
null
----------------------------------------- -- ID: 6565 -- Item: Persikos Snow Cone -- Food Effect: 5 minutes, all Races ----------------------------------------- -- MP +35% (Max. 50 @ 143 Base MP) -- INT +3 -- [Element: Air]+5 ----------------------------------------- require("scripts/globals/status") require("scripts/g...
nilq/small-lua-stack
null
--[[ © CloudSixteen.com do not share, re-distribute or modify without permission of its author (kurozael@gmail.com). Clockwork was created by Conna Wiles (also known as kurozael.) http://cloudsixteen.com/license/clockwork.html --]] local COMMAND = Clockwork.command:New("DoorSetParent"); COMMAND.tip = "Set the ac...
nilq/small-lua-stack
null
function isAtBlock(dialogObject, x, y, z) return dialogObject:isAtBlock(x,y,z); end function callTutorialHookFunc(dialogObject, turorial) return dialogObject:callTutorial(turorial); end function unhireHookFunc(dialogObject) return dialogObject:unhireConverationPartner(); end function hireHookFunc(dialogObjec...
nilq/small-lua-stack
null
function Makazradon_OnEnterCombat(Unit,Event) Unit:RegisterEvent("Makazradon_Cripple", 45000, 0) Unit:RegisterEvent("Makazradon_FelCleave", 19000, 0) Unit:RegisterEvent("Makazradon_RainOfFire", 18000, 0) end function Makazradon_Cripple(Unit,Event) Unit:FullCastSpellOnTarget(11443,Unit:GetClosestPlayer()) end func...
nilq/small-lua-stack
null
function opponentNoteHit() health = getProperty('health') if getProperty('health') > 0.1 then setProperty('health', health- 0.0095); end end function onStepHit() if curStep == 30 then noteTweenAlpha("NoteAlphal1", 0, 1, 0.5, cubelnout) noteTweenAlpha("Note...
nilq/small-lua-stack
null
local ternary = function(condition, positive, negative) if condition then return positive end return negative end local BinarySearchTree = {} function BinarySearchTree:new() local obj = {} self.__index = self self._root = nil return setmetatable(obj, self) end function BinarySearchTree:is_root(va...
nilq/small-lua-stack
null
--[[ -- added by passion @ 2019/11/14 16:39:51 -- UIBoardUIMain模型层 -- 注意: -- 1、成员变量预先在OnCreate、OnEnable函数声明,提高代码可读性 -- 2、OnCreate内放窗口生命周期内保持的成员变量,窗口销毁时才会清理 -- 3、OnEnable内放窗口打开时才需要的成员变量,窗口关闭后及时清理 -- 4、OnEnable函数每次在窗口打开时调用,可传递参数用来初始化Model --]] local UUIBoardNPCModel = BaseClass("UUIBoardNPCModel", UIBaseModel) local bas...
nilq/small-lua-stack
null
local lookuptable = { [":"] = "=",["["] = "{",["]"] = "}",["\""]="",["("]="[",[")"]="]",} local function replaceIntKey(s1) return "("..s1.."):" end function str2Table(retStr) local contentStr = retStr local bHasStr = false local string=string local tonumber = tonumber contentStr = string.gsub(c...
nilq/small-lua-stack
null
while true do local left = redstone.getInput("left") if left then for i = 0, 15 do redstone.setAnalogOutput("right", i) os.sleep(0.2) end os.sleep(5) redstone.setAnalogOutput("right", 0) print("Input found") else print("No input") ...
nilq/small-lua-stack
null
vim.g.FerretExecutableArguments = { rg = '--vimgrep --no-heading --no-config --max-columns 4096 --hidden --glob !.git', }
nilq/small-lua-stack
null
--- A builtin build system: back-end to provide a portable way of building C-based Lua modules. local builtin = {} local unpack = unpack or table.unpack local fs = require("luarocks.fs") local path = require("luarocks.path") local util = require("luarocks.util") local cfg = require("luarocks.core.cfg") local dir = r...
nilq/small-lua-stack
null
ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) --acquire ESX RegisterServerEvent('esx_fork:getPaid') AddEventHandler('esx_fork:getPaid', function(amount) local xPlayer = ESX.GetPlayerFromId(source) --get xPlayer xPlayer.addMoney(math.floor(amount)) end) RegisterServerEvent('esx_fork:g...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- -- file: group_label.lua -- brief: displays label on units in a group -- author: gunblob -- -- Copyright (C) 2008. -- Licensed under the terms o...
nilq/small-lua-stack
null
Drugs.StartProcessActions = function() function processActions() local tasks = {} for rawPlayerId, actions in pairs(Drugs.ProcessActions or {}) do local playerId = tonumber(rawPlayerId or '0') or 0 if (playerId > 0) then table.insert(tasks, function(cb) ...
nilq/small-lua-stack
null
function toggleShader(thePlayer, apply) triggerClientEvent(thePlayer, "switchRoadshine3", thePlayer, apply) end
nilq/small-lua-stack
null
data:extend({ { type = "equipment-grid", name = "huge-equipment-grid", width = 20, height = 20, equipment_categories = {"armor"} }, { type = "equipment-grid", name = "mini-equipment-grid", width = 6, height = 4, equipment_categories = {"armor"} }, }) ...
nilq/small-lua-stack
null
--[[ Copyright (c) 2020 robot256 (MIT License) * Project: Vehicle Wagon 2 rewrite * File: config.lua * Description: Hold constants for data and control phases --]] LOADING_DISTANCE = 10 -- Allowable distance between vehicle and wagon when Loading CAPSULE_RANGE = 12 -- Range in Winch capsule prototype RANGE_COLOR...
nilq/small-lua-stack
null
local M = { git = { enable = true, }, update_focused_file = { update_cwd = true, }, actions = { open_file = { window_picker = { enable = false, }, }, }, } return M
nilq/small-lua-stack
null
--[==[ ****THIS MODULE CURRENTLY SUPPORTS LUA 5.1 ONLY! A module that brings pattern matching from functional programming languages into Lua's tables. This module relies heavily on (one-sided) unification. This file refers to a 'substitution hash' which is just a table with keys being "variable" name...
nilq/small-lua-stack
null
local command = vim.api.nvim_create_user_command command('FloatWinsClose', function() local wins = vim.api.nvim_list_wins() for _, win in ipairs(wins) do if vim.api.nvim_win_get_config(win).relative ~= '' then vim.api.nvim_win_close(win, true) end end end, { nargs = 0 })
nilq/small-lua-stack
null
local ok, mod ok, mod = pcall(require,'luasodium.crypto_hash.ffi') if ok then return mod end ok, mod = pcall(require,'luasodium.crypto_hash.core') if ok then return mod end return require'luasodium.crypto_hash.pureffi'
nilq/small-lua-stack
null
--[[ LibPlayerSpells-1.0 - Additional information about player spells. (c) 2013-2018 Adirelle (adirelle@gmail.com) This file is part of LibPlayerSpells-1.0. LibPlayerSpells-1.0 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Softwar...
nilq/small-lua-stack
null
-- -- Author: guobin -- Date: 2017-12-16 18:32:45 -- CONSOLE_LOG = true --控制台是否输出日志 LOG_LEVEL = 0 --文件日志的登记 0 debug; 1 info; 2 warning; 3 error LOG_PATH = "logs"
nilq/small-lua-stack
null
local buttonPadding = ScreenScale(14) * 0.5 -- base menu button DEFINE_BASECLASS("DButton") local PANEL = {} AccessorFunc(PANEL, "backgroundColor", "BackgroundColor") AccessorFunc(PANEL, "backgroundAlpha", "BackgroundAlpha") function PANEL:Init() self:SetFont("ixMenuButtonFont") self:SetTextColor(color_white) se...
nilq/small-lua-stack
null
local restserver = require("restserver") local server = restserver:new():port(8080) local message = {message = "Hello World"} server:add_resource("hello", { { method = "GET", path = "/", produces = "application/json", handler = function() return restserver.response():status(200):...
nilq/small-lua-stack
null
--tip local function deprecatedTip(old_name,new_name) print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********") end --functions of CCControl will be deprecated end local CCControlDeprecated = { } function CCControlDeprecated.addHandleOfControlEvent(self,func,controlEve...
nilq/small-lua-stack
null
local PLAYER = FindMetaTable("Player") function PLAYER:ROTGB_IsFirstPersonPlayerSpectating() return self.rotgb_PlayerFirstPersonView or false end function PLAYER:ROTGB_ToggleFirstPersonPlayerSpectating() self.rotgb_PlayerFirstPersonView = not self.rotgb_PlayerFirstPersonView end function PLAYER:ROTGB_StartSpectateR...
nilq/small-lua-stack
null
#!/usr/bin/env luajit -- run a suite -- run this from the test working dir, i.e. hydro/tests/<wherever>/ -- run this as ../suite.lua -- TODO instead, maybe run this in the local dir, with the test dir name as the param? nah, because each test shows/does dif things -- how about TODO instead, put this in a subdir cal...
nilq/small-lua-stack
null
-- id int 界面id -- file_name int 界面文件名 -- title string 界面标题 -- icon string 标题衬图 -- ishelp ...
nilq/small-lua-stack
null
-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. -- stylua: ignore start return {properties = {["volar-document-features.trace.server"] = {default = "off",description = "Traces the communication between VS Code and the language server.",enum = { "off", "messages", "verbose" },scope = "window",type = "string"},["volar-l...
nilq/small-lua-stack
null
-- workaround for a current haxe-lua problem in haxes development branch return nil
nilq/small-lua-stack
null
kHydrasPerHive = 3 kWhipSupply = 25 -- was 5 kSentriesPerBattery = 2 -- was 3 kAdrenalineAbilityMaxEnergy = 200 -- was 160 kHandGrenadeWeight = 0 -- was 0.1 kLayMineWeight = 0 -- was 0.10 kFocusDamageBonusAtMax = 0.5 -- was 0.33
nilq/small-lua-stack
null
--- Functionality related to saving/loading data -- module("vn.save", package.seeall) ---Access to global storage -------------------------------------------------------------------------------------------------------------- @section globals ---Sets a shared global variable. All save slots have access to the same se...
nilq/small-lua-stack
null