content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
-- Copyright (C) 2018 Igara Studio S.A. -- Copyright (C) 2018 David Capello -- -- This file is released under the terms of the MIT license. -- Read LICENSE.txt for more information. do local spec = ImageSpec{colorMode=ColorMode.GRAY, width=32, height=64, transparentColor=2} assert(spec.colorMode == ColorMode.GRA...
nilq/small-lua-stack
null
local argcheck = require('argcheck') local base64 = require('base64') local image = require('image') local LogShowoff, Parent = torch.class('LogShowoff', {}) local function map(collection, func) local mapped_collection = {} for key, value in pairs(collection) do table.insert(mapped_collection, func(value, key...
nilq/small-lua-stack
null
--------- -- The main build module that handles complete process of building standalone executable. ---- local deps_analyser = require 'luapak.deps_analyser' local fs = require 'luapak.fs' local log = require 'luapak.logging' local lua_finder = require 'luapak.lua_finder' local luarocks = require 'luapak.luarocks.init'...
nilq/small-lua-stack
null
player_manager.AddValidModel( "PMC3_02", "models/player/PMC_3/PMC__02.mdl" ) list.Set( "PlayerOptionsModel", "PMC3_02", "models/player/PMC_3/PMC__02.mdl" )
nilq/small-lua-stack
null
--[[ Advanced Tiled Collider Version 0.14 Copyright (c) 2013 Minh Ngo 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, mod...
nilq/small-lua-stack
null
--Initialization text for the 'wgl' spec header. return [[ #ifdef __wglext_h_ #error Attempt to include auto-generated WGL header after wglext.h #endif #define __wglext_h_ #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN 1 #endif #ifndef NOMINMAX #define NOMINMAX #endif #include <windows.h> #ifdef CODEGEN_...
nilq/small-lua-stack
null
--- -- Buffered network I/O helper functions. -- -- The functions in this module can be used for delimiting data received by the -- <code>nmap.receive_buf</code> function in the Network I/O API (which see). -- @copyright Same as Nmap--See http://nmap.org/book/man-legal.html local pcre = require "pcre" local stdnse = r...
nilq/small-lua-stack
null
return { name = "test", -- Name of the Database structdef = { -- Defines new struct members function(name, fields) return "" -- Return a method as Lua string end }, defines = "", -- Additional defines prepended to the C++ code tables = { -- The actual table definitions table = { field1 = "string", -...
nilq/small-lua-stack
null
local pg_result = require "pg.result" local prepared_statement_reference = {} local prepared_statement_reference_mt = { __name = "pg prepared statement reference"; __index = prepared_statement_reference; } local function new_prepared_statement_reference(conn, name) return setmetatable({ conn = assert(conn); na...
nilq/small-lua-stack
null
---------------------------------------------------------------------------------- -- -- scenetemplate.lua -- ---------------------------------------------------------------------------------- local widget = require "widget" local composer = require( "composer" ) local scene = composer.newScene() require "sqlite3" ----...
nilq/small-lua-stack
null
local PLUGIN = PLUGIN local playerMeta = FindMetaTable("Player")
nilq/small-lua-stack
null
-- ============================================================= -- Copyright Roaming Gamer, LLC. 2008-2016 (All Rights Reserved) -- ============================================================= -- SSK PRO Loader -- ============================================================= -- Development Notes: -- 1. In future, add...
nilq/small-lua-stack
null
--[[ Swagger Petstore This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. OpenAPI spec vers...
nilq/small-lua-stack
null
local string = Elona.require("string") local inspect = Elona.require("Debug").inspect.inspect local Theme = {} function Theme.apply(theme_id) local theme = data.raw["theme.theme"][theme_id] if theme == nil then print("No such theme " .. theme_id) return end for _, trans in pairs(theme.transf...
nilq/small-lua-stack
null
data:extend( { { type = "technology", name = "bigger-batteries", icon = "__One Big Battery__/graphics/technology/bigger-batteries.png", icon_size = 128, effects = { { type = "unlock-recipe", recipe = "b-battery" } }, prerequisites = {"better-batteries"}, unit = { count = 300,...
nilq/small-lua-stack
null
-- Main script that loads other scripts, sets some of the options automatically. -- User should typically set the following options to start training/testing a model: -- 'expName', 'dataset', 'split', 'stream'. See opts.lua for others. require 'torch' require 'cutorch' require 'paths' require 'xlua' require 'optim' req...
nilq/small-lua-stack
null
local M = {} M.bounds_min = vmath.vector3(-0.500100076199, -0.500100076199, -0.125001251698) M.bounds_max = vmath.vector3(0.500100076199, 0.500100076199, 0.125000238419) M.size = vmath.vector3(1.0002001524, 1.0002001524, 0.250001490116) return M
nilq/small-lua-stack
null
-- Copyright (c) 2016 Thermo Fisher Scientific -- -- 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, modify, -- merge, ...
nilq/small-lua-stack
null
-- Copyright 2014 Technical Machine, Inc. See the COPYRIGHT -- file at the top-level directory of this distribution. -- -- Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -- http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -- <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -...
nilq/small-lua-stack
null
local hostname = module:get_option_string("sasl_hostname", module.host); module:hook("stream-features", function(event) local features = event.features; local mechs = features:get_child("mechanisms", "urn:ietf:params:xml:ns:xmpp-sasl"); if mechs then mechs:tag("hostname", { xmlns = "urn:xmpp:domain-based-name:1" ...
nilq/small-lua-stack
null
-- Copyright (C) 2018-2021 by KittenOS NEO contributors -- -- Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTI...
nilq/small-lua-stack
null
local t = {a = 1, b = 2, c = 3} for k, v in pairs(t) do print(k, v) end t = {"a", "b", "c"} for k, v in ipairs(t) do print(k, v) end
nilq/small-lua-stack
null
local language_data = { ['default'] = { ['title'] = 'Kill drug dealer', ['description'] = 'A detachment of enemy combines has landed somewhere. Find and eliminate them!', ['cancel_title'] = 'Event canceled', ['cancel_description'] = 'The event did not take place due to a lack of players in the event area.', ...
nilq/small-lua-stack
null
local Moistlocals = {} Moistlocals.main_func = {} local rootPath = utils.get_appdata_path("PopstarDevs", "2Take1Menu") utils.make_dir(rootPath .. "\\Blacklist") utils.make_dir(rootPath .. "\\lualogs") utils.make_dir(rootPath .. "\\scripts\\MoistsLUA_cfg") --TODO: Script Settings Set & save local save_ini = rootP...
nilq/small-lua-stack
null
//autoconcede default config local function SetupDefaultConfig() local DefaultConfig = { } DefaultConfig.kImbalanceDuration = 30 DefaultConfig.kImbalanceNotification = 10 DefaultConfig.kImbalanceAmount = 4 DefaultConfig.kMinimumPlayers = 6 return DefaultConfig end DAK:RegisterEventHook("PluginDefaultConfigs", {...
nilq/small-lua-stack
null
workspace "Algon" architecture "x64" configurations{ "Debug", "Release", "Dist" } outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" project "Algon" location "Algon" kind "sharedLib" language "c++" targetdir ("bin/" ..outputdir.. "/%{prj.name}") objdir ("bin-int/" ..outputdir.. "/%{prj.na...
nilq/small-lua-stack
null
local plugin = script:FindFirstAncestorWhichIsA("Plugin") local require = require(plugin:FindFirstChild("Lighter", true)) local Command = {} Command.Alias = { "h" } Command.Params = { "command" } Command.Info = { "This is the 'help' command for the command list", } local Cmds = script.Parent:GetChildren() local Modu...
nilq/small-lua-stack
null
interp.macro { name = 'a', arg = true; "killapp()", ".m %s", "goapp '%s'", } interp.macro { name = 'ml', arg = true; ".m %s", "require '%s'", } interp.macro { name = 'd', arg = true; '.l %s.lua', 'draw.view:invalidate()' } interp.macro { name = 'md', arg = true; '.m %s', '...
nilq/small-lua-stack
null
--[[ Elements handled: .Enchant Options: - spacing: Padding between enchant icons. (Default: 0) - size: Size of the enchant icons. (Default: 16) - initialAnchor: Initial anchor in the enchant frame. (Default: 'BOTTOMLEFT') - growth-x: Growth direction, affected by initialAnchor. (Default: 'UP') ...
nilq/small-lua-stack
null
require "config" for line in io.lines() do io.write( '"' .. ccprefix .. line .. '",\n' ) end io.flush()
nilq/small-lua-stack
null
CodexDB["units"]["enUS"]={ [3]="Flesh Eater", [6]="Kobold Vermin", [30]="Forest Spider", [36]="Harvest Golem", [38]="Defias Thug", [40]="Kobold Miner", [43]="Mine Spider", [46]="Murloc Forager", [48]="Skeletal Warrior", [54]="Corina Steele", [60]="Ruklar the Trapper", [61]="Thuros Lightfingers", [66]="Tharynn Bouden", ...
nilq/small-lua-stack
null
local dkjson = require("dkjson") --lua to json local obj = { id = 1, name = "thushear", age = 10, is_male = false, hobby = {"film","read"} } local str = dkjson.encode(obj,{indent = true}) ngx.say(str,"<br/>") -- str to obj str = '{"hobby":["file","Read"],"is_male":false,"name":"thushear","id":1,"age":nu...
nilq/small-lua-stack
null
-- Lua stuff function onCreate() -- triggered when the lua file is started makeAnimatedLuaSprite('sexualintercourse', 'characters/stupid fucks', getProperty('GF_X') - 120, getProperty('GF_Y') + 200); luaSpriteAddAnimationByPrefix('sexualintercourse', 'first', 'stereo boom', 24, false); luaSpritePlayAnimation('...
nilq/small-lua-stack
null
local highlights = require("neo-tree.ui.highlights") local example = { window = { position = "left", width = 40, -- Mappings for tree window. See https://github.com/nvim-neo-tree/neo-tree.nvim/blob/main/lua/neo-tree/sources/filesystem/commands.lua -- for built-in commands. You can also create your ow...
nilq/small-lua-stack
null
-- Copyright (C) 2018 The Dota IMBA Development Team -- -- 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 ...
nilq/small-lua-stack
null
-- -- Created by IntelliJ IDEA. -- User: guoxiang.li -- Date: 2020/06/30 -- Time: 21:26 -- To change this template use File | Settings | File Templates. -- local a, b a = 12 b = 3 a = a % b
nilq/small-lua-stack
null
--[[ This LocalScript is designed to simply listen for errors, then report them back to the server so that the ErrorReporter can handle them. ]] -- services local ScriptContext = game:GetService("ScriptContext") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("...
nilq/small-lua-stack
null
local vim = vim local cmp = require 'cmp' local luasnip = require 'luasnip' local M = {} local menu = { gh_issues = '[issue]', nvim_lua = '[lua]', nvim_lsp = '[lsp]', luasnip = '[snip]', path = '[path]', buffer = '[buf]', } local function has_words_before() local line, col = u...
nilq/small-lua-stack
null
return { short_music_name = "song06", bpm = 640, offset_time = 0, music_name = "bgm-song06", left_track = { { begin_time = "0.5625", key_flag = "K_LEFT", end_time = "0.5625" }, { begin_time = "3.5625", key_flag = "K_LEFT", end_time = "3.5625" }, { begin_time = "6.65625", key_flag ...
nilq/small-lua-stack
null
bordok_herd_master = Creature:new { objectName = "@mob/creature_names:bordok_herd_master", socialGroup = "bordok", faction = "", level = 40, chanceHit = 0.43, damageMin = 355, damageMax = 420, baseXp = 3915, baseHAM = 9500, baseHAMmax = 11600, armor = 0, resists = {25,25,25,200,200,-1,-1,-1,-1}, meatType =...
nilq/small-lua-stack
null
canyon_corsair_guard = Creature:new { objectName = "@mob/creature_names:canyon_corsair_guard", randomNameType = NAME_GENERIC, randomNameTag = true, socialGroup = "canyon_corsair", faction = "canyon_corsair", level = 36, chanceHit = 0.42, damageMin = 325, damageMax = 360, baseXp = 3642, baseHAM = 8900, baseH...
nilq/small-lua-stack
null
------------------------ --- For GUI Building --- ------------------------ stats = { [1] = { [1] = { id = "joinDate", name = "Join Date" }, [2] = { id = "country", name = "Country" }, [3] = { id = "id5", name = "Playtime" }, [4] = { id = "id4", name = "Total Checkpoints" }, [5] = { id ...
nilq/small-lua-stack
null
local _, L = ... function L.GetListString(...) local ret = '' local strings = {...} local num = #strings for i, str in pairs(strings) do ret = ret .. '• ' .. str .. (i == num and '' or '\n') end return ret end function L.ValidateKey(key) return ( key and ( not key:lower():match('button') ) ) and key end fun...
nilq/small-lua-stack
null
--[[ * Natural Selection 2 - Combat++ Mod * Created by: WhiteWizard * * Combat++ Client message hooks. ]] local function OnCombatScoreUpdate(message) CombatScoreDisplayUI_SetNewXPAward(message.xp, message.source, message.targetId) end Client.HookNetworkMessage("CombatScoreUpdate", OnCombatScoreUpdate...
nilq/small-lua-stack
null
local _, ns = ... local SyLevel = ns.SyLevel local colorFunc local typeface, size, align, reference, offsetx, offsety, flags local Media = SyLevel.media local function createText(self) local tc = self.SyLevelBindText if (not tc) then if (not self:IsObjectType("Frame")) then tc = self:GetParent():CreateFontStri...
nilq/small-lua-stack
null
--[[ Copyright (c) 2015-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory. ]]-- --[[ Cop...
nilq/small-lua-stack
null
local t = My.Translator.translate local f = string.format My.Translator:register("de", { side_mission_scan_asteroids = function(number) return f("%d Asteroiden scannen", number) end, side_mission_scan_asteroids_description = function(number, sectorName, payment) return Util.random({ ...
nilq/small-lua-stack
null
BLT.Items.ColorTextBox = BLT.Items.ColorTextBox or class(BLT.Items.TextBox) local ColorTextBox = BLT.Items.ColorTextBox ColorTextBox.type_name = "ColoredTextBox" function ColorTextBox:Init(...) ColorTextBox.super.Init(self, ...) local panel = self:Panel() panel:rect({name = "color_preview", w = self...
nilq/small-lua-stack
null
mapObjects = { ["Duel"] = { ["Objects"] = { { 8957, 2539.6001, 2823, 12.7 }, { 8957, 2616.3, 2830.8999, 12.7 }, }, }, } -- function loadMap(map, dimension) if (mapObjects[map]) then unloadMap() for k, v in ipairs(mapObjects[map]["Objects"]) do local obj = createObject(v[1], v[2], v[3], v[4],...
nilq/small-lua-stack
null
--[[ Name: cl_menu_phone.lua For: TalosLife By: TalosLife ]]-- local Panel = {} function Panel:Init() end function Panel:OnKeyCodeTyped( key ) if key == KEY_ENTER then self:KillFocus() end end function Panel:DoClick() GAMEMODE.Gui.m_pnlPhone:MakePopup() GAMEMODE.Gui.m_pnlPhone:SetKeyboardInputEnabled( true ...
nilq/small-lua-stack
null
local mod = DBM:NewMod(2353, "DBM-EternalPalace", nil, 1179) local L = mod:GetLocalizedStrings() mod:SetRevision("2019071740256") mod:SetCreatureID(152364) mod:SetEncounterID(2305) mod:SetZone() mod:SetUsedIcons(1, 2) mod:SetHotfixNoticeRev(20190716000000)--2019, 7, 16 --mod:SetMinSyncRevision(16950) --mod.respawnTim...
nilq/small-lua-stack
null
local PATH = (...):gsub('%.[^%.]+$', '') local Components = require(PATH..".components") local Type = require(PATH..".type") --- An object that exists in a world. An entity --- contains components which are processed by systems. ---@class Entity:table local Entity = {} Entity.__mt = { __index = Entity, } ...
nilq/small-lua-stack
null
-- local status_ok, tabout = pcall(require, "tabout") -- if not status_ok then -- return -- end -- -- tabout.setup { -- tabkey = "<Tab>", -- key to trigger tabout, set to an empty string to disable -- backwards_tabkey = "<S-Tab>", -- key to trigger backwards tabout, set to an empty string to disable -- act_as_tab =...
nilq/small-lua-stack
null
local playsession = { {"BlkKnight", {1213003}}, {"elvo36", {514946}}, {"iReed", {964994}}, {"Bidoas", {1069406}}, {"Krono", {256807}}, {"Mordalfus", {338199}}, {"NormalValue", {1209827}}, {"TfGuy44", {3724}}, {"Immo", {1141}}, {"Gizan", {339145}}, {"Camo5", {884571}}, {"cabb99", {403934}}, {"waxman", {6109...
nilq/small-lua-stack
null
local Assert = require(script.Parent._Util.Assert) local assertTypeOf = Assert.prepTypeOf("Darken") local clampColour = require(script.Parent._Util.ClampColour) return function(colour: Color3, coefficient: number): Color3 assertTypeOf("colour", "Color3", colour) assertTypeOf("coefficient", "number", coefficie...
nilq/small-lua-stack
null
--------------------------------------------------------------------------- -- userbase.lua: -- Base Lua definitions that other Lua scripts rely on (auto-loaded). --------------------------------------------------------------------------- -- Lua global data chk_interrupt_macro = { } chk_interrupt_activity = { } c...
nilq/small-lua-stack
null
return function(ngx) ngx.print('Hello World!\n') ngx.eof() end
nilq/small-lua-stack
null
-- Lua bindings for GNU bc require("bc") -- Return table of factorials from 0 to n function facsUpTo (n) local f, fList = bc.number(1), {} fList[0] = 1 for i = 1, n do f = bc.mul(f, i) fList[i] = f end return fList end -- Return left factorial of n function leftFac (n) local su...
nilq/small-lua-stack
null
local unexpected = {} local order = {} randomize() for i = 1, 100 do table.insert(unexpected, i) it('does 100 its', function() table.insert(order, i) end) end teardown(function() assert.are_not.same(unexpected, order) end)
nilq/small-lua-stack
null
Weapon.PrettyName = "TEC-9" Weapon.WeaponID = "m9k_tec9" Weapon.DamageMultiplier = 1.1 Weapon.WeaponType = WEAPON_PRIMARY
nilq/small-lua-stack
null
-- Only required if you have packer configured as `opt` vim.cmd("packadd packer.nvim") return require("packer").startup(function(use) use({ "wbthomason/packer.nvim", opt = true }) local config = function(name) return string.format("require('plugins.%s')", name) end -- local use_with_config = function(pat...
nilq/small-lua-stack
null
--[[ Export.lua @Author : DengSir (tdaddon@163.com) @Link : https://dengsir.github.io ]] local ns = select(2, ...) local Addon = ns.Addon local L = ns.L local AceSerializer = LibStub('AceSerializer-3.0') local Base64 = LibStub('LibBase64-1.0') local CRC32 = LibStub('Li...
nilq/small-lua-stack
null
-- Startup sequence local MOD = { --LoadIndex = 1, LoadName = "Startup", UseOffline = true, } MijHUD.LoadModule(MOD) local BootInterval = 0.125 -- 0.22 local MxColumnWidth = 30 MOD.BootSequence = { Done = 30, Snd = {}, Lf = { Ena = 1, Dis = 30, "CPU CHECK", "MEMORY SET", "D-BUS CLE...
nilq/small-lua-stack
null
ESX = nil previewPed = nil isInterfaceOpening = false isModelLoaded = false isPlayerReady = false --[[ NOTE: (on player initialization) The way es_extended spawns player causes the ped to start a little above ground and 'fall down'. Since our camera position is based off of ped position, i...
nilq/small-lua-stack
null
local t = LoadActor(THEME:GetPathB("","_doors"), "_newer door", 1.5, true ) t[#t+1] = LoadActor(("../cheer"))..{ StartTransitioningCommand=cmd(play); }; t[#t+1] = LoadActor(("../../cleared"))..{ StartTransitioningCommand=cmd(play); }; t[#t+1] = Def.ActorFrame{ Def.Sprite{ InitCommand=cmd(Center); SetCommand=fun...
nilq/small-lua-stack
null
local pipes = require('pipes') local function fmtTm() return os.date('%Y%m%d %H:%M:%S') end local function fmtSrc(src) return string.format('%08x', src) end local function funcStr(src, ss, str) io.output(io.stderr):write(fmtTm(),' [', fmtSrc(src), '] ', str, '\n') end local function funcLua(src, ss, ......
nilq/small-lua-stack
null
-- vessels/documentation.lua -----Load documentation via doc_helper------------------------ local MP = minetest.get_modpath(minetest.get_current_modname()) local docpath = MP .. DIR_DELIM .. "doc" doc.add_category("vessels", { name = "_Vessels_", description = "Vessels", build_formspec = doc.entry_builders.text_and...
nilq/small-lua-stack
null
collectibles = { {"we_firesword_inactive", 1}, {"qe_yashaessence", 1}, {"gold", 50}, } markers = { { map = "res/map/highland/highland.tmx", position = {500, 1700}, step = 0 }, { map = "res/map/highland/highland.tmx", position = {375, 1325}, npc = "npc_jason", step = 0 } }
nilq/small-lua-stack
null
local say = require("say") local assert = require("luassert") local Query = require("exasolvs.Query") local function append_yields(_, arguments) local appender_class = arguments[1] local expected = arguments[2] local original_query = arguments[3] local out_query = Query:new() local appender = appen...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- -- Acid resist gates -- -------------------------------------------------------------------------------- data:extend{ { type = "technology", name = "acid-resist-gates", ...
nilq/small-lua-stack
null
return { name = "doh.tiar.jp", label = _("Tiarap Public DNS - JP"), resolver_url = "https://doh.tiar.jp/dns-query", bootstrap_dns = "172.104.93.80,2400:8902::f03c:91ff:feda:c514", help_link = "https://tiarap.org/", help_link_text = "Tiarap.org" }
nilq/small-lua-stack
null
local entity_manager = require("control.entity_manager") local force_manager = require("control.force_manager") local gui = require("control.gui") local function init_player(player) if not global.tc_player_state then global.tc_player_state = {} end if global.tc_player_state[player.index] == nil the...
nilq/small-lua-stack
null
return { msg_timeout = 100, tbar_timeout = 200, font_def = "default.ttf", font_fb = "emoji.ttf", font_sz = 18, font_hint = 2, font_str = "", text_color = "\\#aaaaaa", -- decoration settings borderw = 1, bordert = 1, bordert_float = 1, borderw_float = 4, border_color = {60, 104, 135}, titlebar_color = {60...
nilq/small-lua-stack
null
Skada:AddLoadableModule("Overhealing", nil, function(Skada, L) if Skada.db.profile.modulesBlocked.Overhealing then return end local mod = Skada:NewModule(L["Overhealing"]) local spellsmod = Skada:NewModule(L["Overhealing spells"]) mod.metadata = {showspots = true, click1 = spellsmod, columns = {Overheal = ...
nilq/small-lua-stack
null
local function utf8len(str) return vim.str_utfindex(str) end local function utf8char(str, i) if i >= utf8len(str) or i < 0 then return nil end local s1 = vim.str_byteindex(str, i) local s2 = vim.str_byteindex(str, i + 1) return string.sub(str, s1 + 1, s2) end local unicode = require("n...
nilq/small-lua-stack
null
---@alias FramePoint string|"'TOPLEFT'"|"'TOPRIGHT'"|"'BOTTOMLEFT'"|"'BOTTOMRIGHT'"|"'TOP'"|"'BOTTOM'"|"'LEFT'"|"'RIGHT'"|"'CENTER'" ---@alias Layer string|"'BACKGROUND'"|"'BORDER'"|"'ARTWORK'"|"'OVERLAY'"|"'HIGHLIGHT'" ---@alias Strata string|"'WORLD'"|"'BACKGROUND'"|"'LOW'"|"'MEDIUM'"|"'HIGH'"|"'DIALOG'"|"'FULLSCRE...
nilq/small-lua-stack
null
-- Example configuration file for Premake5 using the CUDA module -- To build this sample, run '.\premake5.exe vs2019' from the root of this project. -- Include the premake5 CUDA module require('premake5-cuda') workspace "NVIDA" architecture "x64" location ("builds") if _ACTION == "vs2019" then location ("build...
nilq/small-lua-stack
null
function qico() local q = {} -- msg queue, just strings for now local t = {} -- topics function add_event(name, payload) local tmp = { name = name, payload = payload, } add(q, tmp) end function add_topic(name) t[name] = {} local topic_str = "" for k,v in pairs(t) do ...
nilq/small-lua-stack
null
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg)...
nilq/small-lua-stack
null
return { version = "1.1", luaversion = "5.1", tiledversion = "1.0.3", orientation = "orthogonal", renderorder = "right-down", width = 64, height = 64, tilewidth = 16, tileheight = 16, nextobjectid = 1, properties = {}, tilesets = { { name = "tiles_s", firstgid = 1, tilewidt...
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
--[[dividerData = { type = "divider", width = "full", -- or "half" (optional) height = 10, -- (optional) alpha = 0.25, -- (optional) reference = "MyAddonDivider" -- unique global reference to control (optional) } ]] local widgetVersion = 2 local LAM = LibAddonMenu2 if not LAM:RegisterWi...
nilq/small-lua-stack
null
local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) combat:setArea(createCombatArea(AREA_SHORTWAVE3)) function onGetFormulaValues(player, level, maglevel) local min = (level / 5) + (maglevel * 4.5) + 20 local max = (level / 5) + ...
nilq/small-lua-stack
null
abyssal_underlord_dark_rift_oaa = class( AbilityBaseClass ) LinkLuaModifier( "modifier_abyssal_underlord_dark_rift_oaa_timer", "abilities/oaa_dark_rift.lua", LUA_MODIFIER_MOTION_NONE ) LinkLuaModifier( "modifier_abyssal_underlord_dark_rift_oaa_portal", "abilities/oaa_dark_rift.lua", LUA_MODIFIER_MOTION_NONE ) -------...
nilq/small-lua-stack
null
local neuron = {weights = nil, bias = nil, transfer_function} local matrix = require "matrix" local cmath = require "cmath" function neurom:new(n_features, set_bias, set_transfer) local result ={} setmetatable(result,self) self.__index = self self.weights = matrix.one(n_features,1) self.bias = set_bias self.tran...
nilq/small-lua-stack
null
plr = game.Players.LocalPlayer loc = plr.PERKS perks = true loc.POINTS.Value = perks loc.DAMAGE.Value = perks loc.HEALTH.Value= perks loc.GOLD.Value = perks loc.ENERGY.Value = perks loc.ARMOR.Value = perks loc.PEACEFUL.Value = perks loc.DOUBLEMINE.Value = perks loc.DOUBLEKILLS.Value = perks loc.FLAMEHEAD.Value = perks...
nilq/small-lua-stack
null
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ========== DefineConst{ group = "Buildings", help = T(4698, --[[ConstDef Buildings BuildingDailyDustAccumulation help]] "Dust accumulation per Sol"), id = "BuildingDailyDustAccumulation", name = T(4699, --[[ConstDef Buildings BuildingDailyDustAccumulation name...
nilq/small-lua-stack
null
server = nil service = nil return function() if server.Settings.Trello then debugPrint('Trello Module is enabled.') server.TrelloAPI = { } else debugPrint('Trello Module is disabled.') end end
nilq/small-lua-stack
null
function truth(a, b) local ix = a:find(b) if ix then return string.rep("_", ix-1) .. b .. string.rep("_", #a-#b-ix+1), true end return string.rep("_", #a), false end for line in io.lines(arg[1]) do local sep, t, u, c, res = line:find(";"), {}, {}, 1, {} for i in line:sub(sep+1):gmatch("%S+") do u[#u + ...
nilq/small-lua-stack
null
lycan_boss_shapeshift = class(AbilityBaseClass) LinkLuaModifier( "modifier_lycan_boss_shapeshift_transform", "modifiers/modifier_lycan_boss_shapeshift_transform", LUA_MODIFIER_MOTION_NONE ) LinkLuaModifier( "modifier_lycan_boss_shapeshift", "modifiers/modifier_lycan_boss_shapeshift", LUA_MODIFIER_MOTION_NONE ) -------...
nilq/small-lua-stack
null
local playsession = { {"mewmew", {1386}}, {"AhalaiMahalai", {31625}}, {"ookl", {823766}}, {"MegaDocent", {332213}}, {"Eagle34", {120738}}, {"judos", {251351}}, {"JoaoPinga", {10322}}, {"Nikkichu", {249795}}, {"p0p3", {218437}}, {"autopss", {6052475}}, {"Hanakocz", {2432}}, {"XaLpHa1989", {161955}}, {"Eiskl...
nilq/small-lua-stack
null
local Migrate = {} Migrate.version = 010802 function Migrate.Run() if not global.version then global.version = 0 end if global.version < Migrate.version then if global.version < 010003 then Migrate.v1_0_3() end if global.version < 010100 then Migrate.v1_1_0() end if global...
nilq/small-lua-stack
null
local utils = require('telescope.utils') local entry_display = {} entry_display.truncate = function(str, len) str = tostring(str) -- We need to make sure its an actually a string and not a number if utils.strdisplaywidth(str) <= len then return str end local charlen = 0 local cur_len = 0 local result ...
nilq/small-lua-stack
null
local Q = require 'Q' local qconsts = require 'Q/UTILS/lua/q_consts' require 'Q/UTILS/lua/strict' local tests = {} tests.t1 = function() local a = Q.mk_col({1, 2, 4, 5, 6, 7, 8, 9}, "I4") local b = Q.mk_col({0, 1, 2, 1, 1, 2, 0, 2}, "I2") local exp_val = {9, 13, 20} local nb = 3 local res = Q.sumby(a, b, nb...
nilq/small-lua-stack
null
local m = {} -- module local lfs = require "lfs" local exception = require "exception" local fileutil = require "fileutil" local property = require "property" local sourceCtxPath = property.sourceCtxPath or "" -- -- createFile -- function m.createFile (fileName) if fileName then fileutil.n...
nilq/small-lua-stack
null
local entityEnumerator = { __gc = function(enum) if enum.destructor and enum.handle then enum.destructor(enum.handle) end enum.destructor = nil enum.handle = nil end } local function EnumerateEntities(initFunc, moveFunc, disposeFunc) return coroutine.w...
nilq/small-lua-stack
null
enchantress_untouchable_lua = class({}) LinkLuaModifier( "modifier_enchantress_untouchable_lua", "abilities/waveunits/modifier_enchantress_untouchable_lua", LUA_MODIFIER_MOTION_NONE ) LinkLuaModifier( "modifier_enchantress_untouchable_lua_debuff", "abilities/waveunits/modifier_enchantress_untouchable_lua_debuff", LUA_M...
nilq/small-lua-stack
null
--[[ UTL.RateApp() Opens rate dialog. For iOS it is required to have Config.IOS_APP_ID variable set to app ID Usage: Config = { IOS_APP_ID = "000000000" }; local function create(group, params, scene) -- when user clicks Rate button call UTL.RateApp(); end ]] function UTL.RateApp() local ...
nilq/small-lua-stack
null
g_commando_house_loot_deed = { description = "Command Bunker Blueprint", minimumLevel = 0, maximumLevel = 0, lootItems = { {itemTemplate = "commando_house_loot_deed", weight = 10000000} } } addLootGroupTemplate("g_commando_house_loot_deed", g_commando_house_loot_deed)
nilq/small-lua-stack
null
local flashingVehicles = { } function bindKeys(res) bindKey("p", "down", toggleFlashers) for key, value in ipairs(getElementsByType("vehicle")) do if isElementStreamedIn(value) then local flasherState = getElementData(value, "lspd:flashers") if flasherState and flasherState > 0 then flashingVehicles[va...
nilq/small-lua-stack
null