content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
PongGame = class(Observer) function PongGame:init(maxScore) self:initializePlayersWithNill() self.maxScore = maxScore self:resetScore() self.paddles = {} self.paddlesCollision = {} self.winner = false end function PongGame:initializePlayersWithNill() self.players = {[1] = nil, [2] = nil} e...
nilq/small-lua-stack
null
-- Copyright (C) Anton heryanto. local cjson = require "cjson" local upload = require "resty.upload" local table_new_ok, new_tab = pcall(require, "table.new") local open = io.open local sub = string.sub local find = string.find local type = type local setmetatable = setmetatable local random = math.random local read_...
nilq/small-lua-stack
null
local module = { Name = "Teleport", Description = "Teleports a player to another player", Location = "Player", } module.Execute = function(Client, Type, Attachment) if Type == "command" then local char = module.API.getCharacter(module.API.getPlayerWithName(Attachment)) if char then local Input = module.API....
nilq/small-lua-stack
null
local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false) local IceFocusThreat = IceCore_CreateClass(IceThreat) -- constructor function IceFocusThreat.prototype:init() IceFocusThreat.super.prototype.init(self, "FocusThreat", "focus") end function IceFocusThreat.prototype:GetDefaultSettings() local settings = Ic...
nilq/small-lua-stack
null
local tt = require "tabletrack" local dump = function(t) -- uncomment next line for verbose output --print(require("pl.pretty").write(t)) end describe("tabletrack", function() local filename = "./tracker_output" local snapshot before_each(function() os.remove(filename) snapshot = assert:snapshot...
nilq/small-lua-stack
null
local _ = function(k,...) return ImportPackage("i18n").t(GetPackageName(),k,...) end local HungerFoodHud local ThirstHud local HealthHud local VehicleSpeedHud local VehicleFuelHud local VehicleHealthHud local SpeakingHud local minimap function OnPackageStart() HungerFoodHud = CreateWebUI(0, 0, 0, 0, 0, 28) Se...
nilq/small-lua-stack
null
Locale = require("delayedLoad.dlua").new("localeCore.dlua"); function LANG(idTxt) return Locale.lang(idTxt); end function lang(idTxt) return Locale.lang(idTxt); end function tryLang(idTxt) return Locale.tryLang(idTxt); end function tryLANG(idTxt) return Locale.tryLang(idTxt); end return Locale;
nilq/small-lua-stack
null
if love.filesystem then -- loverocks require 'rocks' () -- src love.filesystem.setRequirePath("src/?.lua;" .. love.filesystem.getRequirePath()) -- lib love.filesystem.setRequirePath("lib/?;lib/?.lua;lib/?/init.lua;" .. love.filesystem.getRequirePath()) end function love.conf(t) t.identity = "wizlove" t.versi...
nilq/small-lua-stack
null
object_tangible_storyteller_prop_pr_lifeday_mystic_tree = object_tangible_storyteller_prop_shared_pr_lifeday_mystic_tree:new { } ObjectTemplates:addTemplate(object_tangible_storyteller_prop_pr_lifeday_mystic_tree, "object/tangible/storyteller/prop/pr_lifeday_mystic_tree.iff")
nilq/small-lua-stack
null
local name, id = ... local log = require "log" log.set_name(name..id) require "gateway.gate"
nilq/small-lua-stack
null
local Fmt = require(script.Parent.Fmt) local Level = { Error = 0, Warning = 1, Info = 2, Debug = 3, Trace = 4, } local function getLogLevel() return Level.Info end local function addTags(tag, message) return tag .. message:gsub('\n', '\n' .. tag) end local TRACE_TAG = (' '):rep(15) .. '[MazeGenerator-Trace] ...
nilq/small-lua-stack
null
return require((...)..".ecs")
nilq/small-lua-stack
null
-- Copyright (c) 2021 Trevor Redfern -- -- This software is released under the MIT License. -- https://opensource.org/licenses/MIT local tables = require "moonpie.tables" local Thunk = require "moonpie.redux.thunk" local Aliens = require "game.rules.aliens" local FieldOfView = require "game.rules.field_of_view...
nilq/small-lua-stack
null
-- [1. Simple Table] mytable = {} print("type of mytable: ", type(mytable)) mytable[1] = "Lua" mytable["wow"] = "Before Altering" print("the element of index 1 in mytable is: ", mytable[1]) print("the element of index wow in mytable is: ", mytable["wow"]) -- [alternatetable and mytable point at the same table] altern...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- F I N A L C U T P R O A P I -- -----------------------------------------------------------------------------...
nilq/small-lua-stack
null
if mods["Clowns-Processing"] and mods["Clowns-Extended-Minerals"] then recipe_1 = { {"processing-unit", 100}, {"steel-plate", 100}, {"cobalt-plate", 100}, {"pipe", 100}, {"stone-brick", 100} } recipe_2 = { {"particle-accelerator-mk1", 1}, {"advanced-processing-unit", 100}, {"clowns-plate-osmium", 1...
nilq/small-lua-stack
null
GM.Challenges = {} GM.Challenges["5_Pots"] = { Name = "No Challenges", Other = "5_Pots", Desc = "No Challenges", Pro = "Pro_Crafting", Item = "item_pot", Unlocks = "10_Pots", Amount = 1000, Diff = 3, } GM.Challenges["10_Pots"] = { Name = "No Challenges", Other = "10_Pots", Desc = "No Challenges", Pro = "G...
nilq/small-lua-stack
null
AddCSLuaFile( "shared.lua" ) include( 'shared.lua' ) function ENT:OnRemove() for k, v in pairs(self.m_Entities) do if (IsValid(v)) then self:EndTouch(v) end end end function ENT:Think() for k, v in pairs(self.m_Players) do if (!IsValid(v)) then self.m_Players[k] = nil end end for k, v in pairs(sel...
nilq/small-lua-stack
null
#!/usr/bin/lua require "nixio" require "luci.util" require "luci.sys" local uci = require("luci.model.uci").cursor() local fs = require "luci.openclash" local json = require "luci.jsonc" local function dler_checkin() local info, path, checkin local token = uci:get("openclash", "config", "dler_token") local email =...
nilq/small-lua-stack
null
-- STD is a small lua rendition of the C++ standard template library. -- algorithm.lua aims to provide similar functonality to that of <algorithm> if not std then std = {} end; std.algorithm = {}; -- Returns the (i, v) pair max of the given table function std.algorithm.max_of(t) local result = -math.huge; local ind...
nilq/small-lua-stack
null
object_draft_schematic_droid_component_cybernetic_heat_resist_module_two_core = object_draft_schematic_droid_component_shared_cybernetic_heat_resist_module_two_core:new { } ObjectTemplates:addTemplate(object_draft_schematic_droid_component_cybernetic_heat_resist_module_two_core, "object/draft_schematic/droid/componen...
nilq/small-lua-stack
null
-- snap amount is the amount of different angles car can drive on, -- (360 / vehiclesnap_amount) is the difference between 2 axis -- car will slowly turn towards such angle axis -- Default 16, recommended other tries 4, 8 or 32. -- You can change snapping amount and keybinds ingame in menus. local function OnOffText(...
nilq/small-lua-stack
null
os.loadAPI("/system/drivers/global/json") _G.reg = {} function os.loadReg(f) fh = fs.open(f,"r") _G.reg[fs.getName(f)] = textutils.unserialise(fh.readAll()) fh.close() end os.loadReg("/system/config/users") os.loadReg("/system/config/software") os.loadReg("/system/config/system") if reg.software.Goldcore.CO...
nilq/small-lua-stack
null
--[[ Desc: Dash state (run) Author: SerDing Since: 2017-07-28 21:54:14 Alter: 2017-07-30 12:40:40 ]] local _TIME = require('engine.time') local _Vector2 = require("utils.vector2") local _MATH = require("engine.math") local _SETTING = require("setting") local _Base = require "entity.states.base" ---@class State.M...
nilq/small-lua-stack
null
--[[ Adds ligature fonts ]] Description="Adds ligature fonts in HTML output" Categories = {"format", "html", "usability" } function themeUpdate() if (HL_OUTPUT == HL_FORMAT_HTML or HL_OUTPUT == HL_FORMAT_XHTML) then Injections[#Injections+1]="pre.hl, ol.hl { font-family: Monoid,\"Fira Code\",\"DejaVu Sans Co...
nilq/small-lua-stack
null
local addOn, ab = ... local db = ConsolePort:GetData() local L = db.ACTIONBAR local Bar = ab.bar --------------------------------------------------------------- -- Set up buttons on the bar. --------------------------------------------------------------- local Eye = CreateFrame('Button', '$parentShowHideButtons', Bar, ...
nilq/small-lua-stack
null
-- gitsigns highlights local lush = require("lush") local base = require("apprentice.base") local M = {} M = lush(function() return { -- gitsigns.nvim GitSignsAdd {base.ApprenticeGreenSign}, GitSignsChange {base.ApprenticeBlueSign}, GitSignsDelete {base.ApprenticeRedSign}, -- GitSignsCurrentLineB...
nilq/small-lua-stack
null
function pillage(keys) local caster = keys.caster local damage = caster:GetAverageTrueAttackDamage() local armor = keys.target:GetPhysicalArmorValue() local damageReduction = ((0.02 * armor) / (1 + 0.02 * armor)) local goldGain = damage * (1 - damageReduction) caster:ModifyGold(goldGain, false, ...
nilq/small-lua-stack
null
-- Generate a solution-level androidfile. -- -- originally from: -- Copyright (c) 2012 Richard Swift and the Premake project local jni = premake.extensions.jni local project = premake.project function jni.makefile(sln) _p('LOCAL_PATH := $(call my-dir)') for _,prj in ipairs(sln.projects) do _p('include %s/Android....
nilq/small-lua-stack
null
-- -- Created by IntelliJ IDEA. -- User: hanks -- Date: 2017/5/13 -- Time: 00:01 -- To change this template use File | Settings | File Templates. -- require "import" import "android.widget.*" import "android.content.*" import "androlua.LuaAdapter" import "androlua.LuaImageLoader" import "androlua.LuaFragment" import "...
nilq/small-lua-stack
null
surface.CreateFont( "ConvictSansChat", { font = "Comic Sans MS", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name extended = false, size = 24, weight = 500, blursize = 0, scanlines = 0, antialias = true, underline = false, italic = false, strikeout = false,...
nilq/small-lua-stack
null
data:extend{ { type = "recipe", name = "coking", category = "oil-processing", --enabled = false, energy_required = 30, ingredients = { { type = "item", name = "coal", amount = 10 } }, results = { { type = "item", name = "coke", ...
nilq/small-lua-stack
null
-------------------------------- -- @module SpritePolygon -- @extend Node -- @parent_module ccexp -------------------------------- -- @overload self, cc.Texture2D -- @overload self, string -- @function [parent=#SpritePolygon] setTexture -- @param self -- @param #string filename -- @return experiment...
nilq/small-lua-stack
null
require "Client.Scripts.Modulus.Entity.SkillEvent.Event.SkillEvent" require "Client.Scripts.Modulus.Entity.SkillEvent.Event.AttackEvent" require "Client.Scripts.Modulus.Entity.SkillEvent.Event.AudioEvent" require "Client.Scripts.Modulus.Entity.SkillEvent.Event.EffectEvent" require "Client.Scripts.Modulus.Entity.SkillEv...
nilq/small-lua-stack
null
--测 试 用 IsHasEffect Duel.IsEnvironment TYPE_SPSUMMON function cxxxxxxxx.condition(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) return g:GetCount()>=2 and g:IsExists(function(c) return c:IsType(TYPE_TUNER) end,1,nil) end local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) if g:GetCou...
nilq/small-lua-stack
null
-- local dbg = require("debugger") -- dbg.auto_where = 2 local _context = require'context' context = 'null' api = 'null' get_selection = _context.get_selection local function run() context = _context.context() api = require'nvimapi' end return { run = run }
nilq/small-lua-stack
null
--[[ 小记事 project by Ayaka_Ago ]] import "android.app.*" import "android.os.*" import "android.widget.HorizontalScrollView" import "com.androlua.LuaUtil" import "android.support.v4.widget.SwipeRefreshLayout" import "android.content.res.ColorStateList" import "android.support.v7.widget.CardView" import "android.animatio...
nilq/small-lua-stack
null
local renderer = require("easymark.renderer") local config = require("easymark.config") ---Find Easymark buffer --- ---@return string|nil local function find_easymark_buffer() for _, v in ipairs(vim.api.nvim_list_bufs()) do if vim.fn.bufname(v) == config.plug_name then return v end end return nil end ---Fin...
nilq/small-lua-stack
null
function GM.Select_Clothes ( ) local Models = {}; local sexID = LocalPlayer():GetSex(); if (sexID == "m") then sexID = SEX_MALE; end if (sexID == "f") then sexID = SEX_FEMALE; end local realID = "m"; if (sexID == SEX_FEMALE) then realID = "f" end; local face = LocalPlayer():GetFace(); for k, v in pairs...
nilq/small-lua-stack
null
slot2 = "BaseRankUserCcsPane" BaseRankUserCcsPane = class(slot1) BaseRankUserCcsPane.onCreationComplete = function (slot0) slot0._userInfos = {} slot0._btns = {} slot5 = slot0 for slot4, slot5 in pairs(slot0.getChildren(slot4)) do slot9 = slot5 table.insert(slot7, slot0._userInfos) end slot0._maxIndex = #...
nilq/small-lua-stack
null
local table = require 'table' --[[ This is compiled list of known IKE vendor IDs. Most of the VIDs have been copied from ike-scan with permission from the original author, Roy Hills, so a big 'thank you' is in order. -- http://www.nta-monitor.com/wiki/index.php/Ike-scan_Documentation Unknown ids: ab926d9ee113a0219...
nilq/small-lua-stack
null
local Node = require('gui.node') local input, max = input, math.max --- Displays a tip for the the specified slot. local SlotTip = {} SlotTip.__index = SlotTip setmetatable(SlotTip, {__index = Node}) --- Returns a new `SlotTip`. `slot` should be set in the parent's `tick`. function SlotTip.new() local self = setm...
nilq/small-lua-stack
null
-- local file = io.open( "test.txt", "r" ) -- 198 local file = io.open( "input.txt", "r" ) -- 3912944 local gamma = "" local epsilon = "" local bits = nil local line_length = nil -- use the bits table to keep track of the number of 0 and 1 at each bit for line in file:lines() do if not bits then line_length = #line...
nilq/small-lua-stack
null
local MissileHit = class("MissileHit") function MissileHit:initialize(playerHit, damageGivenByPlayer) self.playerHit = playerHit self.damageGivenByPlayer = damageGivenByPlayer end return MissileHit
nilq/small-lua-stack
null
-- tz -- A simple timezone module for interpreting zone files local M = {} local tstart = 0 local tend = 0 local toffset = 0 local thezone = "eastern" function M.setzone(zone) thezone = zone return M.exists(thezone) end function M.exists(zone) return file.exists(zone .. ".zone") end function M.getzones() l...
nilq/small-lua-stack
null
object_draft_schematic_armor_component_armor_core_recon_basic = object_draft_schematic_armor_component_shared_armor_core_recon_basic:new { } ObjectTemplates:addTemplate(object_draft_schematic_armor_component_armor_core_recon_basic, "object/draft_schematic/armor/component/armor_core_recon_basic.iff")
nilq/small-lua-stack
null
return { HOOK_PLAYER_OPENING_WINDOW = { CalledWhen = "Called when a player is about to open a window", DefaultFnName = "OnPlayerOpeningWindow", -- also used as pagename Desc = [[ This hook is called when a player is about to open a window, e.g. when they click on a chest or a furnace. ]], Params = { ...
nilq/small-lua-stack
null
--[[ This module impements a pretty printer to the AST ]] local pp = {} local block2str, stm2str, exp2str, var2str local explist2str, varlist2str, parlist2str, fieldlist2str local function iscntrl (x) if (x >= 0 and x <= 31) or (x == 127) then return true end return false end local function isprint (x) return ...
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_frmFichaOdisseia2_07_svg() local obj = GUI.fromHandle(_ob...
nilq/small-lua-stack
null
local function map_2digit_year(y2) local current_year = atom.date:get_current().year local guess2 = math.floor(current_year / 100) * 100 + tonumber(y2) local guess1 = guess2 - 100 local guess3 = guess2 + 100 if guess1 >= current_year - 80 and guess1 <= current_year + 10 then return guess1 elseif guess2 ...
nilq/small-lua-stack
null
-- -- tests/actions/vstudio/vc2010/test_project_configs.lua -- Test the Visual Studio 2010 project configurations item group. -- Copyright (c) 2009-2014 Jason Perkins and the Premake project -- local suite = test.declare("vstudio_vc2010_project_configs") local vc2010 = premake.vstudio.vc2010 -- -- Setup...
nilq/small-lua-stack
null
local fallbackQueue = pl.class({ _init = function (self, text, fallbacks) self.q = {} self.fallbacks = fallbacks self.text = text self.q[1] = { start =1, stop = #text } self.q[#(self.q)+1] = { popFallbacks = true } end, pop = function (self) table.remove(self.fallbacks,...
nilq/small-lua-stack
null
return { title = 'Asterix e Obelix', waves = { {{'druid', 5}, {'priest', 8}}, {{'druid', 10}, {'priest', 12}}, {{'druid', 15}, {'priest', 20}}, }, landscape ={ {{type = 'rock', num = 5}, {type = 'tree', num = 5}}, }, gold = 10000 }
nilq/small-lua-stack
null
#!/usr/bin/lua --[[-------------------------------------------------------------------------- -- Licensed to Qualys, Inc. (QUALYS) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- QUALYS licenses this fi...
nilq/small-lua-stack
null
--[[ TheNexusAvenger Implementation of a command. --]] local BaseCommand = require(script.Parent.Parent:WaitForChild("BaseCommand")) local Command = BaseCommand:Extend() --[[ Creates the command. --]] function Command:__new() self:InitializeSuper("cmdbar","Administrative","Brings up the command line. Alternati...
nilq/small-lua-stack
null
local AnimationConfig = require(script.Parent.AnimationConfig) local function expo(t: number) return t ^ 2 end return function() describe("AnimationConfig", function() it("can merge configs", function() local config = AnimationConfig:mergeConfig({ tension = 0, ...
nilq/small-lua-stack
null
local LSM = LibStub('LibSharedMedia-3.0') LSM:Register('statusbar', 'Asphyxia', [[Interface\AddOns\EuiScript\textures\StatusBars\Asphyxia]]) LSM:Register('statusbar', 'Bezo', [[Interface\AddOns\EuiScript\textures\StatusBars\Bezo]]) LSM:Register('statusbar', 'Dajova', [[Interface\AddOns\EuiScript\textures\StatusBars\Da...
nilq/small-lua-stack
null
object_tangible_furniture_all_frn_all_fan_faire_11_painting_01 = object_tangible_furniture_all_shared_frn_all_fan_faire_11_painting_01:new { } ObjectTemplates:addTemplate(object_tangible_furniture_all_frn_all_fan_faire_11_painting_01, "object/tangible/furniture/all/frn_all_fan_faire_11_painting_01.iff")
nilq/small-lua-stack
null
function SWEP:ThrowBaby( mdl ) if CLIENT then return end -- If we are the client this is as much as we want to do for i = 1, 3 do local ent = ents.Create( "prop_physics" ) -- Create a prop_physics entity if not IsValid( ent ) then return end -- Always make sure that created entities are actually created ...
nilq/small-lua-stack
null
gMyTicks = 0 gFPS_NextCalc = 0 gFPS_Counter = 0 gFPS = 0 -- called from main.lua function UpdateFPS () -- calc fps gFPS_Counter = gFPS_Counter + 1 if (gFPS_NextCalc < gMyTicks) then DisplayFPS(gFPS_Counter) gFPS_NextCalc = gMyTicks + 1000 gFPS_Counter = 0 gFPS = gFPS_Counter -- also update memory usa...
nilq/small-lua-stack
null
-- Copyright (c) Facebook, Inc. and its affiliates. PLUGIN = nil function Initialize(Plugin) Plugin:SetName("chatlog") Plugin:SetVersion(1) PLUGIN = Plugin cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChat) LOG("Loaded plugin: chatlog") return true end function OnChat(player, chat) ...
nilq/small-lua-stack
null
local Brain = require('game.bt.Brain') local AttackTarget = require('game.actions.AttackTarget') local PatrolTo = require('game.actions.PatrolTo') local strClassName = 'game.brains.monster_undeath_2' local monster_undeath_2 = lua_declare(strClassName, lua_class(strClassName, Brain)) function monster_undeath_2:ctor(o...
nilq/small-lua-stack
null
-- MIT License -- -- Copyright (c) 2020 moo-sama -- -- 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, m...
nilq/small-lua-stack
null
local Class = require("class") local Conv = require("conv") local Native = require("saori_universal.native") local Module = require("ukagaka_module.saori") local Process = require("process") local Protocol = Module.Protocol local Response = Module.Response local M = Class() M.__index = M function M:_ini...
nilq/small-lua-stack
null
--[[ Title: UMaul Author: noriah <code@noriah.dev> UMaul Library Functions ]] --[[ Function: UMaul.playerAuthed Called when a player is authenticated by GMod This will be called after ULib runs its stuff, so we wont run into any errors (hopefully) Unless the player disconnects between then and now Paramete...
nilq/small-lua-stack
null
common_io_validation.validate_instance_numbers("iot_flash")
nilq/small-lua-stack
null
--[[ TheNexusAvenger Class representing 2 UDim points for a side of a rectangle. 4 are used by the RectPoint8 class for the CutFrame. The first point is the distance from the start and the second point is the distance from the end. This class is immutable. --]] local RootModule = script.Parent.Parent local NexusIns...
nilq/small-lua-stack
null
function onCreatePost() setProperty('dad.alpha', 0.7) setBlendMode('dad','add'); end
nilq/small-lua-stack
null
function onAddItem(moveitem, tileitem, position) -- has to be a candle if moveitem.itemid ~= 2048 then return true end moveitem:remove() tileitem:transform(6280) position:sendMagicEffect(CONST_ME_MAGIC_RED) return true end
nilq/small-lua-stack
null
local playsession = { {"Gerkiz", {60578}}, {"BluJester", {28669}}, {"Muckknuckle", {129821}}, {"rileythelol", {44414}}, {"moonlight1986", {7738}}, {"EPO666", {46801}}, {"PogomanD", {2653}}, {"JailsonBR", {5404}}, {"MaFiX", {6934}}, {"Discotek", {5853}}, {"nakedzeldas", {1845}}, {"DeadKid", {36514}}, {"redl...
nilq/small-lua-stack
null
local API_SE = require(script:GetCustomProperty("APIStatusEffects")) local ICON = script:GetCustomProperty("EffectIcon") local EFFECT_TEMPLATE = script:GetCustomProperty("EffectTemplate") local data = {} data.name = "Blind" data.duration = 5.0 data.icon = ICON data.color = Color.BLACK data.effectTemplate = EFFECT_TE...
nilq/small-lua-stack
null
// pMuch edit this is a 1 line remover but you can also do other shit with it --function gui.IsGameUIVisible() return false end // 1 line remove // Another version of removing this shit. function removecustomescapes() gui.IsGameUIVisible() return false end end concommand.Add("escaperemove", function() removecus...
nilq/small-lua-stack
null
local module = {} ------------------------------------ -- 기본함수, 필요 모듈 가져오기 ------------------------------------ local type = typeof or type local clock = os.clock local tonumber = tonumber local script = script local EasingFunctions = require(script and script.EasingFunctions or "EasingFunctions") local Stepped = req...
nilq/small-lua-stack
null
local _, C = unpack(select(2, ...)) local ACTIONBAR_FADER = { fadeInAlpha = 1, -- Transparency when displayed fadeInDuration = 0.3, -- Display time-consuming fadeOutAlpha = 0, -- Transparency after fade fadeOutDelay = 0.1, -- Delay fade fadeOutDuration = 0.8, -- Fading time-consuming } C.ActionBars = { margin =...
nilq/small-lua-stack
null
class("GetWBOtherBossCommand", pm.SimpleCommand).execute = function (slot0, slot1) slot4 = {} if slot1:getBody().type == WorldBoss.OTHER_BOSS_TYPE_FRIEND then for slot10, slot11 in pairs(slot6) do table.insert(slot4, slot11.id) end elseif slot3 == WorldBoss.OTHER_BOSS_TYPE_GUILD then for slot10, slot11 in ...
nilq/small-lua-stack
null
local function foo(a) local b = a -- trace: a end local function bar(a) foo(a) end local function baz(a) bar(a) end baz(2) bar(4)
nilq/small-lua-stack
null
return { new = function(requires) assert(type(requires) == "table", "Not a table!") local system = { requires = requires } function system:match(entity) for i=1, #self.requires do if not entity:get(self.requires[i]) then return false else return true end end end function sy...
nilq/small-lua-stack
null
----------------------------------------------------- --name : lib/crunch/22_space_wrapper.lua --description: wraps the outputstream to automaticly add space characters when needed (assumes that single tokens are NOT split in multiple :write calls) --author : mpmxyz --github page: https://github.com/mpmxyz/oc...
nilq/small-lua-stack
null
foundation_binary:require("tests/bit_test.lua") foundation_binary:require("tests/bin_buf_test.lua") foundation_binary:require("tests/byte_buf_test.lua") foundation_binary:require("tests/byte_encoder_test.lua")
nilq/small-lua-stack
null
-- Some basic VRF Utilities defined in a common module. require "vrfutil" -- Global Variables -- -- Global variables get saved when a scenario gets checkpointed in one of the folowing way: -- 1) If the checkpoint mode is AllGlobals all global variables defined will be saved as part of the save stat -- 2) In setting C...
nilq/small-lua-stack
null
local lighting = game:GetService("Lighting") local players = game:GetService("Players") local replicatedStorage = game:GetService("ReplicatedStorage") local components = require(replicatedStorage.Services.ComponentService) local transmit = require(replicatedStorage.Events.Transmit) local Cell = require(replicatedStora...
nilq/small-lua-stack
null
id = 'V-38577' severity = 'medium' weight = 10.0 title = 'The system must use a FIPS 140-2 approved cryptographic hashing algorithm for generating account password hashes (libuser.conf).' description = 'Using a stronger hashing algorithm makes password cracking attacks more difficult.' fixtext = [==[In "/etc/libuser.co...
nilq/small-lua-stack
null
local attackRequests = { hyperionGM = 5; --Requests sent to server from client }; for i, v in pairs(attackRequests) do v = v - 3; end; table.foreach(attackRequests, print); local currentTime = 0; local margin = 5; local maxRequests = 50; local decrementRequests = function(deltaTime) local rate = 1; ...
nilq/small-lua-stack
null
---@tag telescope.layout ---@brief [[ --- --- Layout strategies are different functions to position telescope. --- --- All layout strategies are functions with the following signature: --- --- <code> --- function(picker, columns, lines, layout_config) --- -- Do some calculations here... --- return { --- ...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------------------------------- --- @class PostProcessAsset -------------------------------------------------------------------------------------------------------- local PostProcessAsset = {} return PostProcessAsset
nilq/small-lua-stack
null
-- box.uuid uuid = require('uuid') -- -- RFC4122 compliance -- uu = uuid.new() -- new()always generates RFC4122 variant bit.band(uu.clock_seq_hi_and_reserved, 0xc0) == 0x80 vsn = bit.rshift(uu.time_hi_and_version, 12) -- new() generates time-based or random-based version vsn == 1 or vsn == 4 -- -- to/from string -- u...
nilq/small-lua-stack
null
Class = require 'hump/class' require 'settings' require 'entities/entity' NullPlayer = Class{ init = function(self, id, name) self.id = id self.name = name self.score = 0 print('Null player ready for non-action!') end; -- TODO: move to common base setPlane = function(se...
nilq/small-lua-stack
null
--[[Info]]-- require "resources/essentialmode/lib/MySQL" MySQL:open("127.0.0.1", "gta5_gamemode_essential", "root", "space031") --[[Register]]-- RegisterServerEvent('garages:CheckForSpawnVeh') RegisterServerEvent('garages:CheckForVeh') RegisterServerEvent('garages:SetVehOut') RegisterServerEvent('garages:SetVehIn'...
nilq/small-lua-stack
null
local netConnected = IsNetConnected(); local loggedOnSMO = IsNetSMOnline(); local t = Def.ActorFrame{ LoadFont("ScreenSystemLayer Credits") .. { InitCommand=cmd(uppercase,true;zoom,1;shadowlength,1;queuecommand,"Begin"); UpdateTextCommand=cmd(queuecommand,"Begin"); BeginCommand=function(self) -- chec...
nilq/small-lua-stack
null
-- Returns sign of the argument. -- By default, returns 0 for 0, unlike Mathf.Sign which returns 1 function Sign(n, ZeroSign, Eps) Eps = Eps or 0 if n > Eps then return 1 elseif n < -Eps then return -1 else return ZeroSign or 0 end end
nilq/small-lua-stack
null
function onInit() if User.isHost() then -- subscribe to user login events User.onLogin = onLogin; -- subscribe to module changes Module.onModuleAdded = onModuleAdded; Module.onModuleUpdated = onModuleUpdated; end end function onLogin(username, activated) if User.isHost() then if...
nilq/small-lua-stack
null
local deleteTable = {} local deleteTable2 = {} function loaDragap(map,dim,player) local temp = {} local theMapFile = xmlLoadFile("maps/"..map..".map") local nodes = xmlNodeGetChildren(theMapFile) for i,v in ipairs(nodes) do local attributes = xmlNodeGetAttributes(v) local type = xmlNodeGetName(v) if type == ...
nilq/small-lua-stack
null
return { id = "solarsheriff", price = 99999, onSale = true, }
nilq/small-lua-stack
null
require("games/common2/match/module/matchLayerBase"); local MatchToolbarLayer = class(MatchLayerBase); MatchToolbarLayer.init = function(self) local localseat = PlayerSeat.getInstance():getMyLocalSeat(); if self.m_viewConfig[localseat] then self:addView(localseat,self.m_viewConfig[localseat]); end end ...
nilq/small-lua-stack
null
--[[-------------------------------------------------------------------- Grid Compact party and raid unit frames. Copyright (c) 2006-2009 Kyle Smith (Pastamancer) Copyright (c) 2009-2016 Phanx <addons@phanx.net> All rights reserved. See the accompanying LICENSE file for details. https://github.com/Phanx/Grid htt...
nilq/small-lua-stack
null
--[[ Data Format: T/F if affected by {EXPERTORMIGHTY, MASTEROFARMS, THAUMATURGE, WEAPONEXPERT, CRITS, PENETRATION} --]] local double = "double" local AbilityData = { [40267] = {true, false, true, false, true, true}, --Anti-Cavalry Caltrops [38561] = {true, false, true, false, true, true}, --Caltrops [61493] = {...
nilq/small-lua-stack
null
buffer = Procedural.TextureBuffer(128) Procedural.Cloud(buffer):process() Procedural.Lerp(buffer):setImageA(bufferGradient):setImageB(bufferCellNormal):process() tests:addTextureBuffer(buffer) dotfile = tests:getDotFile("texture_18", "Lerp_Demo") dotfile:set("Cloud", "texture_cloud", "Gradient", "texture_gradient", "Le...
nilq/small-lua-stack
null
--[=[ Tracks a parent bound to a specific binder @class BoundParentTracker ]=] local require = require(script.Parent.loader).load(script) local BaseObject = require("BaseObject") local ValueObject = require("ValueObject") local BoundParentTracker = setmetatable({}, BaseObject) BoundParentTracker.ClassName = "Bound...
nilq/small-lua-stack
null
local fs = require "nixio.fs" local conffile = "/etc/dnsfilter/black.list" f = SimpleForm("custom") t = f:field(TextValue, "conf") t.rmempty = true t.rows=13 t.description = translate("Will Always block these Domain") function t.cfgvalue() return fs.readfile(conffile) or "" end function f.handle(self,state,data) i...
nilq/small-lua-stack
null
local Players = GAMESTATE:GetHumanPlayers() local IsUltraWide = (GetScreenAspectRatio() > 21/9) local ShouldDisplayStatsForPlayer = function(player) local pn = ToEnumShortString(player) return SL[pn].ActiveModifiers.DataVisualizations == "Step Statistics" end local ShouldDisplayStats = function() -- Ultra...
nilq/small-lua-stack
null