content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
--vim: ts=2 sw=2 sts=2 expandtab:cindent:formatoptions+=cro --------- --------- --------- --------- --------- --------- -- ## Example -- -- s=syms{ 'y','y','y','y','y','y','y','y','y', -- 'n','n','n','n','n'} -- print(symEnt(s)) ==> 0.9402 -- -- Inside a `sym`: function sym() return {coun...
nilq/small-lua-stack
null
--[[ 公式管理器 (也算函数管理器) --]] local THIS_MODULE = ... local C_LOGTAG = "FormulaManager" -- 数据库公式索引路径 local C_DBFML_IPATH = "db/formulas" -- 程序公式索引路径 local C_SRCFML_IPATH = "src/formulas" local FormulaManager = class("FormulaManager", require("app.main.modules.index.IndexListener")) -- 获得单例对象 local instance = nil funct...
nilq/small-lua-stack
null
object_mobile_som_som_mustafarian_computer_technician = object_mobile_som_shared_som_mustafarian_computer_technician:new { } ObjectTemplates:addTemplate(object_mobile_som_som_mustafarian_computer_technician, "object/mobile/som/som_mustafarian_computer_technician.iff")
nilq/small-lua-stack
null
require("http_common") require("granting_ticket_model") require ("granting_ticket_view") require("user_model") local http_server = require("http.server") local http_headers = require("http.headers") local http_util = require("http.util") local function postGrantingTicket(stream) local seconds = 2 -- wait 2 sec...
nilq/small-lua-stack
null
local deliveryVehicles = {[459]=true, [413]=true, [440]=true, [499]=true, [609]=true, [498]=true, [414]=true, [456]=true, [482]=true} local client = getLocalPlayer() local delEls = {} function createAssignments(tb) local totDis = 0 local px, py = getElementPosition(client) for ind, ent in ipairs(tb) do to...
nilq/small-lua-stack
null
ITEM.name = "7.62x54mm HPBT" ITEM.model = "models/lostsignalproject/items/ammo/762x54.mdl" ITEM.width = 2 ITEM.height = 1 ITEM.ammo = "7.62x54MMR -HP-" // type of the ammo ITEM.ammoAmount = 60 // amount of the ammo ITEM.description = "" ITEM.quantdesc = "A box that contains %s rounds of Hollow-Point 7.62x54mm ammo. " ...
nilq/small-lua-stack
null
local Bear = Fight:extend() function Bear:new(...) Bear.super.new(self, ...) Art.new(self, "bear") self.enemyName = "bear" self.anim:add("attacking", 1); self.anim:add("defending", 1); self.anim:add("prepareAttack", 1); self.anim:add("prepareDefense", 1); self.health = 100 self.attack = 2 self.timeAttack...
nilq/small-lua-stack
null
local infoCol = Color(135, 206, 250) if SERVER then util.AddNetworkString("opsGiveOOCBan") end impulse.OOCTimeouts = impulse.OOCTimeouts or {} local timeoutCommand = { description = "Gives the player an OOC ban for the time provided, in minutes. Reason is optional.", requiresArg = true, adminOnly = true...
nilq/small-lua-stack
null
--Credit: Merathilis & DoomCooldown_Pulse local KUI, E, L, V, P, G = unpack(select(2, ...)) local CF = KUI:NewModule("CooldownFlash", "AceHook-3.0") CF.modName = L["Cooldown Flash"] --Cache global variables --Lua functions local GetTime = GetTime local select, pairs, bit = select, pairs, bit local string = string loca...
nilq/small-lua-stack
null
print("Solving day 2") local instructions = {} for line in io.lines("Day02.txt") do local instruction, value = string.match(line, "(%a+) (%d+)") if (instruction == "forward") then table.insert(instructions, { x = tonumber(value), y = 0 }) elseif (instruction == "down") then table.insert(ins...
nilq/small-lua-stack
null
WireToolSetup.setCategory( "Chips, Gates", "Other/Sound", "Advanced" ) WireToolSetup.open( "spu", "SPU", "gmod_wire_spu", nil, "SPUs" ) if CLIENT then language.Add("Tool.wire_spu.name", "SPU Tool (Wire)") language.Add("Tool.wire_spu.desc", "Spawns a sound processing unit") language.Add("ToolWirespu_Model", "Mod...
nilq/small-lua-stack
null
---@class CS.FairyGUI.GMovieClip : CS.FairyGUI.GObject ---@field public onPlayEnd CS.FairyGUI.EventListener ---@field public playing boolean ---@field public frame number ---@field public color CS.UnityEngine.Color ---@field public flip number ---@field public material CS.UnityEngine.Material ---@field public shader st...
nilq/small-lua-stack
null
-- Copyright (c) 2020, The Pallene Developers -- Pallene is licensed under the MIT license. -- Please refer to the LICENSE and AUTHORS files for details -- SPDX-License-Identifier: MIT -- C CODE GENERATION -- ================= -- This module contains some helper functions for generating C code. -- To keep the output r...
nilq/small-lua-stack
null
-- A table containing functions to determine positions of UI elements. -- Define top level table. if not Positions then Positions = {} end ----------- ScreenGameplay ----------- Positions.ScreenGameplay = {} -- Difficulty meter position (the small colored square). Positions.ScreenGameplay.DifficultyMeterX = function...
nilq/small-lua-stack
null
Config = {} Config.Locale = 'fr' Config.DoorList = { { objName = 'v_ilev_ra_door4r', objCoords = {x = 1407.08, y = 1128.31, z = 114.33}, textCoords = {x = 1407.03, y = 1128.22, z = 114.52}, authorizedCodes = { '7812'}, locked = true, distance = 1.5 }, { ...
nilq/small-lua-stack
null
-- Optimizations local showMap, showBars, showArmor, showOxygen, isOpen, cinematicHud, isPaused local pulseHealth, pulseArmor, pulseStamina, pulseOxygen local healthActive, armorActive, hungerActive, thirstActive, stressActive, staminaActive, oxygenActive, microphoneActive, timeActive, cinematicActive, idActive loc...
nilq/small-lua-stack
null
local Path = require("plenary.path") local utils = require("harpoon.utils") local Dev = require("harpoon.dev") local log = Dev.log local config_path = vim.fn.stdpath("config") local data_path = vim.fn.stdpath("data") local user_config = string.format("%s/harpoon.json", config_path) local cache_config = string.format("...
nilq/small-lua-stack
null
object_tangible_tcg_series1_vendor_deed_bomarr_monk = object_tangible_tcg_series1_shared_vendor_deed_bomarr_monk:new { } ObjectTemplates:addTemplate(object_tangible_tcg_series1_vendor_deed_bomarr_monk, "object/tangible/tcg/series1/vendor_deed_bomarr_monk.iff")
nilq/small-lua-stack
null
--[[ file meta info @file Utils.lua @brief Utility functions. Filtering and table injections. --]] --[[ @brief Accessing the addons private table @var _ addonName, thrown away @var wt Global addonTable --]] local _, wt = ... -- Invoking lua functions to local variables local tinsert = tinsert local ipairs...
nilq/small-lua-stack
null
-- Copyright (c) 2020 Phil Leblanc -- see LICENSE file ------------------------------------------------------------------------ --[[ === he utility module content: equal test equality (deep) cmpany compare values with any type (useful to sort heterogeneous lists) class ...
nilq/small-lua-stack
null
-- Standard awesome library local gears = require('gears') local awful = require('awful') require('awful.autofocus') local hotkeys_popup = require('awful.hotkeys_popup') require('awful.hotkeys_popup.keys') local xresources = require('beautiful.xresources') local dpi = xresources.apply_dpi local apps = require('apps') ...
nilq/small-lua-stack
null
local _, ns = ... ns.Widgets = ns.Widgets or {} local L = ns.L local BUTTON_HEIGHT, BUTTON_PADDING = 42, 2 local BUTTON_BORDER_SPACING = 7 local ROW_HEIGHT = BUTTON_HEIGHT + BUTTON_PADDING local MAX_ROWS = 9 ---------------------------------------------------------------- -- Add aura editBox local createEditFrame d...
nilq/small-lua-stack
null
-- -- Please see the readme.txt file included with this distribution for -- attribution and copyright information. -- -- Adds the username to the list of holders for the given node function addWatcher (sNode, sUser) local node = DB.findNode(sNode); if not node then node = DB.createNode(sNode); end if node the...
nilq/small-lua-stack
null
return { ["Init"] = function(baseClass, prereqs) return baseClass:Extend( { ["Switch"] = function(self, c) local swtbl = { caseVariable = c, caseOf = function (self, code) local f if (self.caseVariable) then f = code[self.caseVariable] or code.Default else ...
nilq/small-lua-stack
null
print(select(1, 3, 2, 1)) --> ~^3\t2\t1$ print(select(2, 3, 2, 1)) --> ~^2\t1$ print(select(4, 3, 2, 1)) --> = do local function f(i, ...) return select(i, ...) end print(f(2, "a", "b", "c")) --> ~^b\tc$ end print(pcall(select, 0, 1, 2)) --> ~^false .* print(select('#', 1, 2, 3)) --> =3 print(...
nilq/small-lua-stack
null
adMessages = { } function loadResourceSettings() intervalTime = tonumber(get("intervalTime"))*60000 prefix = tostring(get("prefix")) end addEventHandler("onResourceStart", resourceRoot, loadResourceSettings) setTimer( loadResourceSettings, 30000, 0 ) addCommandHandler( "chatboxads", function(p) if hasObjectPermis...
nilq/small-lua-stack
null
return { id = "NG0029", events = { { alpha = 0.4, code = { 1 }, style = { text = "指挥官,新解锁了喵窝功能,快来看看吧", mode = 1, posY = 0, dir = 1, posX = 0 }, ui = { path = "/OverlayCamera/Overlay/UIMain/blur_panel/main/right_panel/commanders/box/home", triggerType = { 1 ...
nilq/small-lua-stack
null
-- -- Copyright 2010-2016 Branimir Karadzic. All rights reserved. -- License: https://github.com/bkaradzic/bx#license-bsd-2-clause -- project "bin2c" uuid "60eaa654-7d06-11e4-be8e-880965202986" kind "ConsoleApp" includedirs { "../include", } files { "../tools/bin2c/**.cpp", "../tools/bin2c/**.h", } con...
nilq/small-lua-stack
null
aurum.mobs.PATHMETHOD_WALK = b.pathfinder.require_pathfinder(b.set{ aurum.mobs.CHEAP and "cheap" or "any", "specify_vertical", "node_functions_walkable", "node_functions_passable", "clearance_height", }) aurum.mobs.PATHMETHOD_FLY = b.pathfinder.require_pathfinder(b.set{ aurum.mobs.CHEAP and "cheap" or "any", "s...
nilq/small-lua-stack
null
return function() local Modules = game:GetService("Players").LocalPlayer.PlayerGui.AvatarEditorInGame.Modules local CharacterModelVersion = require(script.Parent.CharacterModelVersion) local IncrementCharacterModelVersion = require(Modules.AvatarExperience.AvatarEditor.Actions.IncrementCharacterModelVersion) it(...
nilq/small-lua-stack
null
-- -- switch panel on or off -- -- panel to toggle defineProperty("panel") -- no image by default defineProperty("image") -- switch consists of single button with very simple logic components = { button { image = image; onMouseDown = function() local p = get(panel) ...
nilq/small-lua-stack
null
--[[ --------------------------------------------- Fool Job a game by hubert ronald --------------------------------------------- a game of liquid puzzle Gideros SDK Power and Lua coding. Artwork: Kenney Game Assets Platform Pack Industrial http://kenney.nl/assets/platformer-pack-industrial Design & ...
nilq/small-lua-stack
null
local has_lspconfig, lspconfig = pcall(require, 'lspconfig') if not has_lspconfig then print('‼ Tried loading lspconfig for denols ... unsuccessfully.') return has_lspconfig end -- TODO(scheatkode): Add autoinstall with spinner animation return { -- cmd = { vim.fn.expand('~/.local/bin/deno'), 'lsp' }, cm...
nilq/small-lua-stack
null
module 'mock_edit' local generateGUID = MOAIEnvironment.generateGUID -------------------------------------------------------------------- local function affirmGUID( entity ) if not entity.__guid then entity.__guid = generateGUID() end for com in pairs( entity.components ) do if not com.__guid then com.__gui...
nilq/small-lua-stack
null
------------------------------ --unique gusher body sprites-- ------------------------------ function CommunityVisualFixesScriptedChanges:onGusherUpdate(entity) if CommunityVisualFixesResources then --check if the resources mod exists if entity.Variant == 0 or entity.Variant == 1 then local data = entity:GetData(...
nilq/small-lua-stack
null
--- Constant reconnection policy. -- This policy will allow the cluster module to retry an unhealthy node after -- a given, constant delay. -- @module resty.cassandra.policies.reconnection.const -- @author thibaultcha local _M = require('resty.cassandra.policies.reconnection').new_policy('constant') local type = type...
nilq/small-lua-stack
null
-- TODO: Get this working.... --[[ local oldUpdate = GUIUnitStatus.UpdateUnitStatusBlip function GUIUnitStatus:UpdateUnitStatusBlip( blipIndex, localPlayerIsCommander, baseResearchRot, showHints, playerTeamType ) oldUpdate(self, blipIndex, localPlayerIsCommander, baseResearchRot, showHints, playerTeamType ) lo...
nilq/small-lua-stack
null
local function install(name, dir, script) if vim.fn.confirm("Install " .. name .. " server?", "&Yes\n&Cancel") ~= 1 then return end vim.fn.mkdir(dir, "p") local function onExit(_, code) if code ~= 0 then error("Couldn't install " .. name .. " server!") end print("Successfully installed " .. name .. " de...
nilq/small-lua-stack
null
fx_version 'cerulean' games { 'gta5' } author 'DISTINCTIVE DEVELOPMENT - Oulsen' description 'A simple script to control some extras on a vehicle with a hotkey' version '1.0.0' files{ "Newtonsoft.Json.dll", "config-controls.json", "config-extras.json" } client_scripts { "DD-EXTRACONTROL.net.dll" }
nilq/small-lua-stack
null
-- Copyright (c) 2021 Trevor Redfern -- -- This software is released under the MIT License. -- https://opensource.org/licenses/MIT describe("game.rules.map.furniture.door", function() local Door = require "game.rules.map.furniture.door" local Position = require "game.rules.world.position" local Orientati...
nilq/small-lua-stack
null
local https = require('https') local discordia = require('discordia') local ffi = require("ffi") local opus = ffi.load("opus") local sodium = ffi.load("sodium") local json = require("json") require('class') require('intent') local client = discordia.Client { logFile = "lolprobot files/egirl.log", cacheAllMe...
nilq/small-lua-stack
null
--[[ Copyright (c) 2019, Vsevolod Stakhov <vsevolod@highsecure.ru> Copyright (c) 2019, Denis Paavilainen <denpa@denpa.pro> 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/...
nilq/small-lua-stack
null
local uci = luci.model.uci.cursor() local server_table = {} uci:foreach("shadowsocksr", "servers", function(s) if s.alias then server_table[s[".name"]] = "[%s]:%s" % {string.upper(s.v2ray_protocol or s.type), s.alias} elseif s.server and s.server_port then server_table[s[".name"]] = "[%s]:%s:%s" % {string.upper(...
nilq/small-lua-stack
null
/dump NarciNPCModelFrame2:GetPosition() /dump NarciNPCModelFrame2:GetCameraPosition() /run NarciNPCModelFrame2:SetPosition(0, -0.3, 0.12);NarciNPCModelFrame2:SetCameraPosition(3.84, 0, 0.8) --Gnome Male /run NarciNPCModelFrame3:SetPosition(NarciNPCModelFrame2:GetPosition());NarciNPCModelFrame3:SetCameraPosition(Narci...
nilq/small-lua-stack
null
require "libs.fileActions" require "libs.utils" --Folder Actions Folder = {} function Folder:GetDirs(path) local dirs = {} local dirPath = '' for path in path:gmatch("[^/]+") do dirPath = dirPath.."/"..path if filesystem.isDir(dirPath) then table.insert(dirs,dirPath) ...
nilq/small-lua-stack
null
local LinkedList = require 'apicast.linked_list' local context_content = require 'apicast.policy.liquid_context_debug.context_content' local TemplateString = require 'apicast.template_string' local ngx_variable = require 'apicast.policy.ngx_variable' describe('Context content', function() describe('.from', function(...
nilq/small-lua-stack
null
slot2 = "BankPopUpGiveConfirmCcsView" BankPopUpGiveConfirmCcsView = class(slot1) BankPopUpGiveConfirmCcsView.onCreationComplete = function (slot0) slot8 = slot0.view ClassUtil.extends(slot2, slot0, ZoomPopUpChildView, true, slot0, slot0.bg) slot3 = slot0 slot0.initSignal(slot2) slot3 = slot0 slot0.onBankGiv...
nilq/small-lua-stack
null
--[[ Crystalis TAS lua scripts by TheAxeMan Copyright notice for this file: Copyright (C) 2011 TheAxeMan 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...
nilq/small-lua-stack
null
CreateListCategory( "Camera", "<insert description>" ) CreateListFunction( "SetCameraPosition", "Teleports the camera to the specified position." ) CreateListArgument( "posX", "number", "x-position in world coordinates." ) CreateListArgument( "posY", "number", "y-position in world coordinates." ) CreateListArgument...
nilq/small-lua-stack
null
local com = require("component") local event = require("event") local kbd = require("keyboard") local wonderful = require("wonderful") local class = require("lua-objects") local wmain = wonderful.Wonderful() local Rectangle = class(wonderful.element.Element, {name = "Rectangle"}) local doc = wmain:addDocument {sty...
nilq/small-lua-stack
null
function Falric_OnCombat (pUnit, Event) local chance = math.random(1,5) if(chance == 1) then pUnit:SendChatMessage(12, 0, "Men, women, and children... None were spared the master's wrath. Your death will be no different.") elseif(chance == 2) then pUnit:SendChatMessage(12, 0, "As you wish, my lord.") elseif(chan...
nilq/small-lua-stack
null
local helpers = require "spec.helpers" local cjson = require "cjson" local utils = require "kong.tools.utils" local fixtures = require "spec-old-api.03-plugins.17-jwt.fixtures" describe("Plugin: jwt (API)", function() local admin_client, consumer, jwt_secret local dao local bp local _ local jwt_secrets s...
nilq/small-lua-stack
null
AddCSLuaFile() SWEP.PrintName = "Signal Jammer" SWEP.Category = "Drones Rewrite Tools" SWEP.Purpose = "Tool that allows you to jam signals" SWEP.Spawnable = true SWEP.UseHands = true SWEP.DrawAmmo = false SWEP.ViewModelFOV = 55 SWEP.Slot = 0 SWEP.SlotPos = 6 SWEP.Primary.ClipSize = -1 SWEP.Primary.DefaultClip ...
nilq/small-lua-stack
null
local Core = require(script.Parent.Parent.Core) local defineComponent = require(script.Parent.Parent.defineComponent) local System = require(script.Parent.Parent.System) return function() it("should call plugin methods in order", function() local callIndex = 1 local pluginA = { coreIni...
nilq/small-lua-stack
null
----------------------------------------------------------------------------------------------- -- Client Lua Script for Masterloot -- Copyright (c) NCsoft. All rights reserved ----------------------------------------------------------------------------------------------- --dsfdsfsd require "Window" require "Apollo" re...
nilq/small-lua-stack
null
local _var = {} local mt = { __index = function(t, k) local ret = rawget(t, k) if ret == nil and type(k) == "userdata" then ret = {} rawset(t, k, ret) end return ret end } setmetatable(_var, mt) var = _var
nilq/small-lua-stack
null
--[[--------------- This is derived from LuaBit v0.4 Under the MIT license. copyright(c) 2006~2007 hanzhao (abrash_han@hotmail.com) --]]--------------- if (not pcall(function() bit32 = require("bit32") end)) then local function check_int(n) -- checking not float if(n - math.floor(n) > 0) then error("tr...
nilq/small-lua-stack
null
local turquoise = "#00ff95" minetest.register_craftitem("energy:energy_ingot", { description = minetest.colorize(turquoise,"Energy Ingot\n")..minetest.colorize(turquoise, "tier 6: (legendary)"), inventory_image = "energy_energy_ingot.png", }) minetest.register_craftitem("energy:energy_particles", { ...
nilq/small-lua-stack
null
--[[ Loads a runtime module. A runtime module is any ModuleScript that returns a function. These modules are required and optionally passed in arguments by this module. Runtime modules allow the control of when code is executed, along with being able to pass in helpful globals without modifying the environment. ...
nilq/small-lua-stack
null
local AkModellPacker = require("ak.modellpacker.AkModellPacker") local AkModellInstaller = {} function AkModellInstaller:new(verzeichnisname) assert(verzeichnisname) local o = {} setmetatable(o, self) self.__index = self o.modellPakete = {} o.index = 0 o.verzeichnisname = verzeichnisname ...
nilq/small-lua-stack
null
require 'bit' local SDL = require "LuaSDL2" local function dprint(a, f) local f = f or print if type(f)=="function" then if type(a)=="table" then for k,v in pairs(a) do f(k,v) end else f(a) end else print(a, f) end end local function initAudio() SDL.audioInit("xaudio2"); print("drivers") ...
nilq/small-lua-stack
null
function checkFlagsInSegmentUsingTable(segment, table) checkFlagsInSegmentUsingTable(segment,table,0) end function checkFlagsInSegmentUsingTable(segment, table, checkmode) local addr = table.addr for k,v in pairs(table.checks) do local readResult = segment:ReadUInt8(addr+k) local obj = Trac...
nilq/small-lua-stack
null
DefineClass.TradeRocket = { __parents = { "SupplyRocket" }, export_goods = false, -- { resource, amount } pairs pin_rollover = T{10, "<Description>"}, pin_rollover_arriving = T{8031, "<RocketType><newline>Travelling to Mars.<newline>Flight progress: <em><ArrivalTimePercent></em>%.<newline>Cargo Requested:<newline>...
nilq/small-lua-stack
null
local E, C, L, ET, _ = select(2, shCore()):unpack() if C.main.restyleUI ~= true then return end local _G = _G local select = select local function LoadSkin() GuildRegistrarGreetingFrame:StripLayout() GuildRegistrarFrame:StripLayout(true) GuildRegistrarFrame:SetLayout() GuildRegistrarFrame.bg:SetAnchor(...
nilq/small-lua-stack
null
local glass = peripheral.wrap("left") local modem = peripheral.wrap("back") local tArgs = { ... } local listenCh = -1 if #tArgs >= 1 then listenCh = tonumber(tArgs[1]) else print("please specify listen channel") return end local sendCh = 1000 + listenCh local turtleState = { message = "no message yet", items ...
nilq/small-lua-stack
null
resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937" client_script { "config.lua", "radialmenu.lua" } ui_page "html/menu.html" files { "html/menu.html", "html/raphael.min.js", "html/wheelnav.min.js", "html/doors.png", "html/engine.png", "html/hood.png", "html/key.png", "...
nilq/small-lua-stack
null
-- type = github -- DO NOT REMOVE THIS LINE! local name = "kubeaudit" local version = "0.16.0" local org = "Shopify" local repo = "kubeaudit" local base_url = "https://github.com/" .. org .. "/" .. repo food = { name = name, description = "Helps you audit your Kubernetes clusters against common security contro...
nilq/small-lua-stack
null
-- Camera camera = Pinhole.new() .withEyeAt(0.0, 15.0, 15.0) .lookingAt(0.0, -1.0, -1.0) .withZoom(1.2) camera.vpdistance = 100.0 -- Floor plastic = Plastic.new() .withDiffuseColor(0.5, 0.5, 0.5) .withAmbientReflection(0.25) .withDiffuseReflection(0.65) .withSpecularReflection(0.05) plane = Plane.new() .loca...
nilq/small-lua-stack
null
local API = { MouseIcon = nil; RenderWorld = nil; }; API.IsPartOfRenderWorld = function(self, UniverseObject) local World = Object:getFirstAncestor(UniverseObject); if (World ~= nil and self.RenderWorld ~= nil) then return self.RenderWorld:GetUtility('Space') == World:GetUtility('Space'); ...
nilq/small-lua-stack
null
-------------------------------- -- @module PhysicsJointLimit -- @extend PhysicsJoint -- @parent_module cc ---@class cc.PhysicsJointLimit:cc.PhysicsJoint local PhysicsJointLimit = {} cc.PhysicsJointLimit = PhysicsJointLimit -------------------------------- --- Set the anchor point on body b. ---@param anchr2 vec2_t...
nilq/small-lua-stack
null
T.Fail(function() rbxmk.runFile(42) end , "runFile expects string for its first argument") T.Fail(function() rbxmk.runFile("nonextant.lua") end , "runFile throws an error when file does not exist") T.Pass(rbxmk.runFile(path.expand("$sd/_average.lua"),...
nilq/small-lua-stack
null
#! /usr/bin/lua local Quiz = require 'KataAnimalQuiz' local lunit = require 'lunitx' _ENV = lunit.module('enhanced','seeall') local quiz local _io_read = io.read local _print = print -- mock function noprint() print = function() end end function say(resps) local next_resps = {} local index = 0 i...
nilq/small-lua-stack
null
local Class = _G.StopwatchMod.Attempt local Mod = _G.StopwatchMod.Mod local LuaNetwork = _G.LuaNetworking function Class:createAttempt(objective) local mod_info = "" local objective_id = "" if _G.SilentAssassin and _G.SilentAssassin.settings["enabled"] then mod_info = mod_info .. "SA;" end if objective...
nilq/small-lua-stack
null
local version={"unstable", 20090709.1752} --release, revision (YYYYMMDD.HHMM) if LoveUI==nil then LoveUI={}; --[[function LoveUI.PATH (path) local lf = love.filesystem path=path or ""; -- is a folder for k, subfile in pairs(lf.enumerate(path)) do local subpath=path.."/"..subfile; if subfile == "LoveU...
nilq/small-lua-stack
null
local component = require("component") local screenScale = {} ------------------------------------------------------------------------------------------------------ local function calculateAspect(screens) if screens == 2 then return 28 elseif screens > 2 then return 28 + (screens - 2) * 16 else return 12 e...
nilq/small-lua-stack
null
local exports = {} exports.name = "memory_card_inserter" exports.version = "0.0.2" exports.description = "Automatically insert Neo Geo memory card" exports.license = "MIT" exports.author = { name = "Megan Leet (Zowayix)" } local memory_card_inserter = exports function memory_card_inserter.startplugin() local functio...
nilq/small-lua-stack
null
local access = require "kong.plugins.kong-upstream-jwt.access" local KongUpstreamJWTHandler = {} function KongUpstreamJWTHandler:access(conf) access.execute(conf) end KongUpstreamJWTHandler.PRIORITY = 999 -- This plugin needs to run after auth plugins so it has access to `ngx.ctx.authenticated_consumer` KongUpstre...
nilq/small-lua-stack
null
local M = {} local fn = vim.fn local lib = require("utility/lib") local function srd_pair(pair_a) local pairs = { ["("]=")", ["["]="]", ["{"]="}", ["<"]=">", [" "]=" ", ["《"]="》", ["“"]="”", } if pair_a:match('^[%(%[{<%s《“]+$') then return table.concat(lib.map(lib.reverse(...
nilq/small-lua-stack
null
-- global EnergyBehaviour local _={} _.name="EnergyBehaviour" _.changeEnergy=function(actor, delta) actor.energy=actor.energy+delta if actor.energy<0 then actor.energy=0 end end return _
nilq/small-lua-stack
null
Common_UnitConsumeActPoint(attacker, 1); if Common_Break_Skill(attacker, _Skill) then return end Common_ChangeEp(attacker, _Skill[8001]) local target, all_targets = Common_GetTargets(...) Add_Cfg_Buff(attacker, _Skill, target, all_targets) Common_ShowCfgFlagEffect(_Skill) Common_UnitPlayAttack(attacker, _Skill.id); --...
nilq/small-lua-stack
null
test = require 'u-test' common = require 'common' test.simpletest = function() test.assert(2 == 2) test.stopTest(); end
nilq/small-lua-stack
null
require 'cudnn' require 'nn' require 'cunn' npy4th = require 'npy4th' require 'image' local cmd = torch.CmdLine() cmd:text() cmd:text('Options:') cmd:option('-inputdir', '', 'Path to video frame dir') cmd:option('-outdir', '', 'Path to output feature dir') cmd:option('-modelfile', '', 'Path to model file') cmd:option(...
nilq/small-lua-stack
null
local tiles_to_pave = settings.startup["creative-world-plus_tiles-to-pave"].value local tile_type = settings.startup["creative-world-plus_tile-type"].value if (tiles_to_pave == "All" or tiles_to_pave == "Land Tiles Only") then for _, tile in pairs (data.raw.tile) do if (tiles_to_pave == "All") then ...
nilq/small-lua-stack
null
module(..., package.seeall) local ffi = require("ffi") local C = ffi.C local header = require("lib.protocol.header") local lib = require("core.lib") local bitfield = lib.bitfield local ipsum = require("lib.checksum").ipsum -- GRE uses a variable-length header as specified by RFCs 2784 and -- 2890. The actual size is ...
nilq/small-lua-stack
null
--[[ ######################################################################## # _____ __ _ # # | __ \ / _| | | # # | |__) | __ ___| |_ ___ ___| |__ # # | __...
nilq/small-lua-stack
null
jedi_robe_tan_02_group = { description = "", minimumLevel = 0, maximumLevel = 0, lootItems = { {itemTemplate = "jedi_robe_tan_02", weight = 10000000}, } } addLootGroupTemplate("jedi_robe_tan_02_group", jedi_robe_tan_02_group)
nilq/small-lua-stack
null
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ========== PlaceObj('XTemplate', { group = "InGame", id = "Milestones", PlaceObj('XTemplateTemplate', { '__template', "NewOverlayDlg", 'Dock', false, 'HAlign', "left", 'MaxWidth', 800, }, { PlaceObj('XTemplateLayer', { '__condition', function (par...
nilq/small-lua-stack
null
-- https://github.com/romgrk/barbar.nvim local M = {} function M.get(spec, config, opts) local syn = spec.syntax -- stylua: ignore return { BufferCurrent = { bg = spec.fg3, fg = spec.fg1 }, BufferCurrentIndex = { bg = spec.fg3, fg = spec.diag.info }, BufferCurrentMod = { bg = spec.fg3,...
nilq/small-lua-stack
null
local indent = require('indent_blankline') indent.setup { -- show_current_context = true, char = '│', buftype_exclude = {'terminal'}, filetype_exclude = {'startup', 'NvimTree', 'packer', 'help', 'man', 'norg', 'qf'}, char_highlight_list = { 'IndentBlanklineIndent1', 'IndentBlankline...
nilq/small-lua-stack
null
------------------------------------------------------------------------------------------------------------------------ -- Proposal: -- https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0192-button_subscription_response_from_hmi.md ------------------------------------------------------------------...
nilq/small-lua-stack
null
local K, _, L = unpack(select(2, ...)) local _G = _G local print = _G.print local string_format = _G.string.format local string_lower = _G.string.lower local string_trim = _G.string.trim local tonumber = _G.tonumber local C_QuestLog_AbandonQuest = _G.C_QuestLog.AbandonQuest local C_QuestLog_GetInfo = _G.C_QuestLog.Ge...
nilq/small-lua-stack
null
-- utils local function mk_arr(n) local arr = {} for i = 0, n do table.insert(arr, 0) end return arr end local function inc_mod(n, m) return (n + 1) % m end local function log (fmt, ...) print (string.format(fmt, ...)) end local list = require 'list' -- fixed queue -- circular queues intensively u...
nilq/small-lua-stack
null
--[[ ä Name: Advanced Questbook By: Crypton ]] if (AdvQuestBookByName == nil or AdvQuestBookText == nil) then local i; local text; AdvQuestBookByName = {}; AdvQuestBookText = {}; for i = 420034, 425516 do text = TEXT("Sys"..i.."_name"); if (text ~= nil and text ~= "") then AdvQuestBookByName[text] = i; ...
nilq/small-lua-stack
null
local SyntaxKind = require("lunar.ast.syntax_kind") local SyntaxNode = require("lunar.ast.syntax_node") local IfStatement = setmetatable({}, { __index = SyntaxNode, }) IfStatement.__index = setmetatable({}, SyntaxNode) function IfStatement.new(expr, block) return IfStatement.constructor(setmetatable({}, IfStatement...
nilq/small-lua-stack
null
--[[ Copyright (c) 2016 Technicolor Delivery Technologies, SAS The source code form of this Transformer component is subject to the terms of the Clear BSD license. You can redistribute it and/or modify it under the terms of the Clear BSD License (http://directory.fsf.org/wiki/License:ClearBSD) See LICENSE file for m...
nilq/small-lua-stack
null
--[[ Migrated straight from AzVote2. Will be rewrited someday. function AzVote:ClearGamemodeRTV() table.Empty( self.GamemodeRTVVoters ) SetGlobalInt("AzVote GamemodeRTV Count", 0) end function AzVote:SetGamemodeRTVEndTime(t) SetGlobalInt("AzVote GamemodeRTVEndTime", t or 0) end function AzVote:...
nilq/small-lua-stack
null
modifier_member = class({}) function modifier_member:IsPurgable() return false end function modifier_member:RemoveOnDeath() return false end function modifier_member:GetTexture() return "player/member" end function modifier_member:OnCreated() self.iBonusDamage = 10 self.iBonusHp = 200 self.iBonusMp = 150 end func...
nilq/small-lua-stack
null
-- mdotengine - parser file -- Local definitions local Parser = {} function Parser.IsNode(str) return str:sub(str:len(), str:len()) == ">" and str:sub(1, 1) == "<" end function Parser:IsEndNode(str) return self.IsNode(str) and str:sub(2, 2) == "/" end function Parser:IsStartNode(str) return self.IsNode(str) and ...
nilq/small-lua-stack
null
local vim = vim local _M = {} local function cmp_keybindings(cmp) return { ['<CR>'] = cmp.mapping.confirm({ select = true , behavior = cmp.ConfirmBehavior.Replace }), ['<Tab>'] = cmp.mapping.confirm({ select = true , behavior = cmp.ConfirmBeha...
nilq/small-lua-stack
null
import ('System') import ('Assignment') import ('Assignment.Movement') import ('Assignment.Entity') import ('Assignment.World') function enter(entity, world) end function execute(entity, world) entity.QuickEnergy = entity.QuickEnergy + 0.01 entity.SlowEnergy = entity.SlowEnergy + 5 entity.Food = entity.Food - 0...
nilq/small-lua-stack
null