content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
-- The author disclaims copyright to this source code. --[[[ # netstring Encode and decode [netstrings](https://cr.yp.to/proto/netstrings.txt). ## Install `luarocks install ers35/netstring` --]] local netstring = {} --[[[ ## Usage --]] --[[[ ### netstring.encode(decoded) Encode a netstring. ```lua local encoded...
nilq/small-lua-stack
null
local execute = vim.api.nvim_command local fn = vim.fn -- Check if `packer` exists. If not, install it as a start plugin. local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then execute('!git clone https://github.com/wbthomason/packer.nvim '..install...
nilq/small-lua-stack
null
local bit = require "bit32" local ir = require "luainlua.bytecode.ir" local utils = require "luainlua.common.utils" --[[ /*---------------------------------------------------------------------- name args description ------------------------------------------------------------------------*/ OP_MOVE,/* ...
nilq/small-lua-stack
null
SWEP.Base = "arccw_base" SWEP.Spawnable = true -- this obviously has to be set to true SWEP.Category = "ArcCW - Halo Custom Edition" -- edit this if you like SWEP.AdminOnly = false SWEP.PrintName = "Battle Rifle" SWEP.TrueName = "BR55HB SR" SWEP.Trivia_Class = "Battle Rifle" SWEP.Trivia_Desc = "The BR55 Service Rifle ...
nilq/small-lua-stack
null
function gem.OnInit() end function gem.OnEnable() this.moveSpeed = 15.0; end function gem.Update(dt) local go = this.GameObject; local transform = go:GetTransform(); transform:TranslateZ(-dt * this.moveSpeed); local player = Scene.FindObjectWithName("minecart1"); distance = transform.Position - ...
nilq/small-lua-stack
null
local Cache = require "res.Cache" local util = require "res.util" local Pool = require "res.Pool" local SingltonPool = require "res.SingltonPool" local MultiPool = require "res.MultiPool" local Timer = require "common.Timer" local SimpleEvent = require "common.SimpleEvent" local res = require "res.res" local ipairs =...
nilq/small-lua-stack
null
--mobs_fallout v0.0.1 --maikerumine --made for Extreme Survival game --dofile(minetest.get_modpath("mobs_fallout").."/api.lua") --crafts-tenplus1 -- raw meat minetest.register_craftitem("mobs_fallout:meat_raw", { description = "Raw Meat", inventory_image = "mobs_meat_raw.png", on_use = minetest.item_eat(3), }) ...
nilq/small-lua-stack
null
local Util = require(script.Parent.Parent.Shared.Util) local Players = game:GetService("Players") local playerType = { Transform = function (text) local findPlayer = Util.MakeFuzzyFinder(Players:GetPlayers()) return findPlayer(text) end; Validate = function (players) return #players > 0, "No player with tha...
nilq/small-lua-stack
null
local DragWindow = { OnInitialize = function () local self = OpenUI.DragWindow local item = { itemId = SystemData.DragItem.itemId, iconName = SystemData.DragItem.itemName, newWidth = SystemData.DragItem.itemWidth, newHeight = SystemData.DragItem.itemHeight, iconScale = Syste...
nilq/small-lua-stack
null
return { fadeOut = 1.5, mode = 2, id = "DONGHUO11", once = true, fadeType = 1, fadein = 1.5, scripts = { { actor = 102050, nameColor = "#a9f548", side = 2, bgm = "story-8", dir = 1, say = "情况不妙…虽然击破了2艘新型舰…但是还有大量的信号源在朝我们靠近", typewriter = { speed = 0.05, speedUp = 0.01 }, paint...
nilq/small-lua-stack
null
pg = pg or {} pg.ship_skin_template_14 = { [402050] = { ship_group = 40205, name = "纽伦堡", bullet_skin_secondary = "", hand_id = 13, bgm = "", illustrator2 = -1, bg = "", id = 402050, group_index = 0, shop_id = 0, painting = "niulunbao", air_bomb_skin = "", air_bullet_skin = "", shop_type_id...
nilq/small-lua-stack
null
local lib = SanieUI.lib local textString local textColor --[[--------------------------- Fishing zone no-junk skill table. Data totally ripped off from El's Extreme Anglin' (elsanglin.com) --]]--------------------------- local zoneSkill = { ["Blackrock Mountain"] = 1, ["Burning Steppes"] = 1, ["Azuremyst Isle"] = 1...
nilq/small-lua-stack
null
import 'WzComparerR2.PluginBase' import 'WzComparerR2.WzLib' import 'System.IO' import 'System.Xml' ------------------------------------------------------------ local function enumAllWzNodes(node) return coroutine.wrap(function() coroutine.yield(node) for _,v in each(node.Nodes) do for child in enumA...
nilq/small-lua-stack
null
--[[ MIT License Copyright (c) 2019 Michael Wiesendanger 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
db = { ['Erundil Loraethor'] = {['language']='English', ['race']='High Elf', ['class']='Warden', ['lore']=''}, ['Uvlan Ramoran'] = {['language']='English', ['race']='Dark Elf', ['class']='Sorcerer', ['lore']=''}, ['Samia Nightthorn'] = {['language']='English', ['race']='Wood Elf', ['class']='Nightblade', ['lore']='New ...
nilq/small-lua-stack
null
--////////////////////////////////////////////////////////////////////// --************************ --EnableInputEvent --************************ EnableInputEvent = {} EnableInputEvent.__index = EnableInputEvent setmetatable(EnableInputEvent, {__index = Event}) function EnableInputEvent.new() local self = setmetata...
nilq/small-lua-stack
null
local opt = vim.opt local g = vim.g -- turn off at startup, will be enabled before loading the theme vim.cmd([[ syntax off filetype off filetype plugin indent off ]]) -- disable nvim intro opt.shortmess:append("sI") opt.lazyredraw = true opt.hidden = true -- :h hidden -- disable builtin vim plugins g.loa...
nilq/small-lua-stack
null
--[[-------------------------------------------------------------------]]--[[ Copyright wiltOS Technologies LLC, 2020 Contact: www.wiltostech.com ----------------------------------------]]-- wOS = wOS or {} wOS.ALCS = wOS.ALCS or {} wOS.ALCS.Prestige = wOS.ALCS.Prestige or {} wOS.ALCS.Prestige.DataSto...
nilq/small-lua-stack
null
local laser_beam_blend_mode = "additive" function make_laser_beam(sound) local result = { type = "beam", flags = {"not-on-map"}, width = 0.5, damage_interval = 20, random_target_offset = true, action_triggered_automatically = false, action = { type = "direct", action_del...
nilq/small-lua-stack
null
-- old graphics.lua for psp compat local defaultfont local scale = 0.375 local fontscale = 0.6 --default print font defaultfont = {font=font.load("oneFont.pgf"),size=15} font.setdefault(defaultfont.font) --set up stuff lv1lua.current = {font=defaultfont,color=color.new(255,255,255,255)} function love.graphics.newIma...
nilq/small-lua-stack
null
ENT.Base = "base_brush" ENT.Type = "brush" function ENT:StartTouch(ent) if ent and ent:IsValid()then if(ent:GetClass() == "minigolf_ball")then ent:GetGolfer():ChatPrint("Ball went out of bounds! Resetting in a second...") ent:SetRenderMode(RENDERMODE_TRANSALPHA) ent:SetColor(Color(255, 0, 0, 150)) tim...
nilq/small-lua-stack
null
--- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by xuanc. --- DateTime: 2020/2/3 上午10:54 --- Description: 添加任务 --- -- 任务Hash local taskKey = KEYS[1]; -- 等待队列 local waitingKey = KEYS[2]; -- field in taskKey local hashField = ARGV[1] -- 任务序列化对象 local taskObject = ARGV[2]; -- 有序集合值 local waitingValu...
nilq/small-lua-stack
null
test_run = require('test_run').new() test_run:cmd("create server master with script='replication/master1.lua'") test_run:cmd('start server master') test_run:cmd("switch master") errinj = box.error.injection errinj.set("ERRINJ_RELAY_FINAL_SLEEP", true) engine = test_run:get_cfg('engine') box.schema.user.grant('guest'...
nilq/small-lua-stack
null
if not momoIRTweak.technology then momoIRTweak.technology = {} end function momoIRTweak.DumpTechnologies() momoIRTweak.dumpRecipesText = "Technology dump \n" for i, r in pairs(data.raw.technology) do momoIRTweak.DumpTable(r) momoIRTweak.dumpText = momoIRTweak.dumpText .. "\n" end momoIRTweak.Log(momoIRTweak.d...
nilq/small-lua-stack
null
TestClass = { } TestClass.__index = TestClass TestClass.ClassVariable = "test" -- Constructor function TestClass.Create() local Class = {} setmetatable(Class, TestClass) return Class end -- Print class variable value function TestClass:Print() print(self.ClassVariable) end function main() ...
nilq/small-lua-stack
null
-- get Boilerplate for Translations local S = cannabis.S local path = cannabis.path minetest.register_node("cannabis:canapa_ice", { description = S("Hemp ice"), drawtype = "plantlike", tiles = {"cannabis_canapa_ice.png"}, inventory_image = "cannabis_canapa_ice.png", wield_image = "cannabis_canapa_ice.png", param...
nilq/small-lua-stack
null
memory.usememorydomain("EWRAM") local m = {[0]=0x03C62A,[1]=0x03C6A6,[2]=0x03C722,[3]=0x03C79E} while true do for i = 0, 3 do if (memory.readbyte(m[i]) == 0) then local p = memory.readbyte(0x03C1D8) if (i == 0) and (p == 1) then joypad.set({Left = 1}) elseif (i == 0) and (p == 2) then joyp...
nilq/small-lua-stack
null
--[[--------------------------------------------------------- Name: RunAI - Called from the engine every 0.1 seconds -----------------------------------------------------------]] function ENT:RunAI( strExp ) -- If we're running an Engine Side behaviour -- then return true and let it get on with it. if ( s...
nilq/small-lua-stack
null
-- KEYS: [1]job:sleeping, [2]job:ready, [3]job:counter -- ARGS: [1]currentTime local jobs=redis.call('zrangebyscore', KEYS[1], '-inf', ARGV[1]) local count = table.maxn(jobs) local batchsize = 64 if count>0 then -- Comments: add to the Ready Job list local i = 1 while i<=count do local j = 1 local batchJo...
nilq/small-lua-stack
null
--[[ Function Name: CalcView Syntax: Don't ever call this manually. Returns: Nothing. Notes: Used to calculate view angles. Purpose: Feature ]]-- SWEP.AttachmentViewOffset = Angle(0,0,0) local blankvecbak = Vector(0,0,0) local blankvec = Vector(0,0,0) local blankang = Angle(0,0,0) function SWEP:CalcView(ply, po...
nilq/small-lua-stack
null
--- Kaliel's Tracker --- Copyright (c) 2012-2020, Marouan Sabbagh <mar.sabbagh@gmail.com> --- All Rights Reserved. --- --- This file is part of addon Kaliel's Tracker. local addonName, KT = ... local M = KT:NewModule(addonName.."_ActiveButton") KT.ActiveButton = M local _DBG = function(...) if _DBG then _DBG("KT", .....
nilq/small-lua-stack
null
-- resty-gitweb@pages/refs.lua -- Refs page builder -- Copyright (c) 2020 Joshua 'joshuas3' Stockin -- <https://git.joshstock.in/resty-gitweb> -- This software is licensed under the MIT License. local utils = require("utils/utils") local git = require("git/git") local builder = require("utils/builder") local tabu...
nilq/small-lua-stack
null
--Molotov Cocktail_[rev002] --base code is from throwing enhanced and potions mods local MOD_NAME = minetest.get_current_modname() local MOD_PATH = minetest.get_modpath(MOD_NAME) local Vec3 = dofile(MOD_PATH..'/lib/Vec3_1-0.lua') minetest.register_craftitem('more_fire:molotov_cocktail', { description...
nilq/small-lua-stack
null
--- Utility to simplify the mapping of buffer local bindings -- @param mode str The mode in which the mapping takes place, -- this will be one of 'n' for normal mode, 'i' for insert mode -- or 'v' for visual mode. -- @param key str The key code that will be used in the mapping function BufMapper(mode, key, result) ...
nilq/small-lua-stack
null
return { { effect_list = { { type = "BattleBuffAddAttrRatio", trigger = { "onAttach" }, arg_list = { attr = "cannonPower", number = 250 } }, { type = "BattleBuffAddAttrRatio", trigger = { "onAttach" }, arg_list = { attr = "attackRating", numb...
nilq/small-lua-stack
null
return { tiles = { {"stone-path", {x = -15, y = -10}}, {"stone-path", {x = -15, y = -8}}, {"concrete", {x = -15, y = -7}}, {"concrete", {x = -15, y = -6}}, {"concrete", {x = -15, y = -5}}, {"concrete", {x = -15, y = -4}}, {"concrete", {x = -15, y = -2}}, {"concrete", {x = -15, y = 4}...
nilq/small-lua-stack
null
--[[ This is a rough test implementation of the Language Server Protocol to get things started. This only works with absolute input paths which are part of a workspace configured properly for the clangd LSP server. Temp files in /tmp/ are not deleted. To synchronize I/O using stdin/stdout, the script sleeps after e...
nilq/small-lua-stack
null
local citylights = require("citylights.colors") local theme = {} theme.loadSyntax = function() -- LuaFormatter off -- Syntax highlight groups local syntax = { Type = { fg = citylights.purple }, -- int, long, char, etc. StorageClass = { fg = citylights.cyan }, -- static, register, volatile, etc. ...
nilq/small-lua-stack
null
--[[ file: app/post/module.lua desc: Pass module requests on to the module ]] local oxy, luawa, header, request, user, session, template = oxy, luawa, luawa.header, luawa.request, luawa.user, luawa.session, oxy.template --try to load the module in question local module = oxy:loadModule(request.get.module) --f...
nilq/small-lua-stack
null
require "defines" require "util" require "loader" loader.addItems "settings/vanilla-items" loader.addSets "settings/vanilla-sets" loader.addSets "settings/bob-sets" loader.addSets "settings/farl-sets" MOD = { NAME = "Autofill", IF = "af" } --flying text colors local RED = {r = 0.9} local GREEN = {g = 0.7} local YELL...
nilq/small-lua-stack
null
screenW, screenH = guiGetScreenSize() gui = {} gui[1] = guiCreateButton(0.34, 0.73, 0.31, 0.03, "", true) guiSetAlpha(gui[1], 0.00) gui[2] = guiCreateGridList(0.34, 0.28, 0.32, 0.44, true) guiGridListAddColumn(gui[2], "Rule name", 0.5) guiGridListAddColumn(gui[2], "Punishment", 0.35) guiGridListAddRow(gui[2], "Deathma...
nilq/small-lua-stack
null
--Minetest --Copyright (C) 2014 sapier -- --This program is free software; you can redistribute it and/or modify --it under the terms of the GNU Lesser General Public License as published by --the Free Software Foundation; either version 2.1 of the License, or --(at your option) any later version. -- --This program is ...
nilq/small-lua-stack
null
local sixam = {} local animTimer = 1 local animation = {} function sixam:enter(arg) animTimer = 1 for i=0, 35 do animation[i] = {"newImage", "assets/animations/6am/s"..i..".png"} end animation.sound = {"newSource", "sounds/sixam_eerie.ogg", "static"} pushgamestate("quickload", animation) end function sixam...
nilq/small-lua-stack
null
-- Main for How To Make An RPG. -- -- By Chris Herborth (https://github.com/Taffer) -- MIT license, see LICENSE for details. -- Required external packages. local push = require "3rdparty.push.push" -- Tiled maps. local map = require 'assets.map' -- Horrible, horrible globals. gameState = { -- Texture atlas: ...
nilq/small-lua-stack
null
local _M = {} local lrucache_prueffi = require "resty.lrucache.pureffi" local ret, err = lrucache_prueffi.new(1000) if not ret then ngx.log(ngx.ERR, "failed to create the cache: " .. (err or "unknown")) return nil end function _M.set(key, value, ttl) ret:set(key, value, ttl) end function _M.get(key) ...
nilq/small-lua-stack
null
local propVFX = script:GetCustomProperty("VFX"):WaitForObject() local propValueName = script:GetCustomProperty("PropertyName") local autoStart = script:GetCustomProperty("AutoStart") local repeatCount = script:GetCustomProperty("RepeatCount") local bounceOnRepeat = script:GetCustomProperty("BounceOnRepeat") local propS...
nilq/small-lua-stack
null
#!/usr/bin/env lua local waldo = {"qux", "quz"} print(waldo[1]) -- qux for key,value in ipairs(waldo) do print(string.format("%s: %s", key, value)) end -- output -- 1: qux -- 2: quz
nilq/small-lua-stack
null
#!/usr/bin/env lua ---- -- Run this on openwrt with lua5.1 -- require "ubus" require "uloop" uloop.init() local conn = ubus.connect() if not conn then error("Failed to connect to ubusd") end local function print_table(v) if type(v) ~= 'table' then print(v) end for k, v in pairs(v) do if type(v) == 'table' ...
nilq/small-lua-stack
null
-- This is an example that illustrates specifically how to Enable -- a thermocouple to be read on AIN0 in differential input mode. -- For the most up to date thermocouple type constants, see the -- T-Series datasheet page: -- https://labjack.com/support/datasheets/t-series/ain/extended-features/thermocouple -- For ge...
nilq/small-lua-stack
null
require "lua_taival.datasets" local s = open_dataset(people); s.first(); local f = io.open("test_02.txt", "w") while not s.eof() do f:write(s.get('first_name').." "..s.get('last_name').." "..s.get('born_date').." "..s.get("is_male").."\n") s.movenext() end; s.close() f:write(tostring(s.is_open())) s.open() f:writ...
nilq/small-lua-stack
null
config = { t0 = "enum", t1 = "bonjour" }
nilq/small-lua-stack
null
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. m = Map("luci_statistics", translate("CSV Plugin Configuration"), translate( "The csv plugin stores collected data in csv file format " .. "for further processing by external programs." ...
nilq/small-lua-stack
null
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf" module('BseTakeUserBiblioReward_pb', package.seeall) local BSETAKEUSERBIBLIOREWARD = protobuf.Descriptor(); local BSETAKEUSERBIBLIOREWARD_STATUS_FIELD = protobuf.FieldDescriptor(); local BSETAKEUSERBIBLIOREWARD_MESSAGE_FIELD = protobuf.Fie...
nilq/small-lua-stack
null
function onCreate() -- background shit makeLuaSprite('stagesunset', 'stagesunset', -600, -300); setScrollFactor('stagesunset', 0.9, 0.9); makeLuaSprite('stagefrontkapiold', 'stagefrontkapiold', -650, 600); setScrollFactor('stagefrontkapiold', 0.9, 0.9); scaleObject('stagefrontkapiold', 1.1, 1.1); ma...
nilq/small-lua-stack
null
dofile'../../include.lua' -- Libraries local unix = require 'unix' local lD = require'libDynamixel' if not one_chain then if OPERATING_SYSTEM=='darwin' then chain = lD.new_bus() else rarm = lD.new_bus(Config.chain.rarm.ttyname) larm = lD.new_bus(Config.chain.larm.ttyname) rleg = lD.new_bus(Config.chain.rleg...
nilq/small-lua-stack
null
local DebugOutput = require"Toolbox.Debug.Registry".GetDefaultPipe() local Tools = require"Toolbox.Tools" local Import = require"Toolbox.Import" local Vlpeg = Import.Module.Relative"Vlpeg" local Object = Import.Module.Relative"Object" return Object( "Nested.PEG.Capture", { Construct = function(self, SubPattern)...
nilq/small-lua-stack
null
local debugMode = false if debugMode then print("VendorPrice: Debug Mode enabled.") end local OptionTable = {} local SetTooltipTable = { SetBagItem = function(self, bagID, slot) self.count = select(2, GetContainerItemInfo(bagID, slot)) end, SetInventoryItem = function(self, unit, slot) self.count = GetInventor...
nilq/small-lua-stack
null
local fn = vim.fn local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) end --require("logger_config") require("editor_setti...
nilq/small-lua-stack
null
---@class CfgskillsdatasTable local CfgskillsdatasTable ={ [1] = {script = 'SkillAttack',name = '普通攻击',id = 1,icon = 0,descr = '',HP = 0,MP = 0,speed = 0.0}, [1000101] = {script = 'SkillAttack',name = '普通攻击',id = 1000101,icon = 0,descr = '',HP = 0,MP = 0,speed = 0.0}, [2000101] = {script = 'SkillAttack',name = '普通攻击...
nilq/small-lua-stack
null
coSetCppProjectDefaults("debug")
nilq/small-lua-stack
null
local DEFLATE = require('compress.deflatelua') local LZW = require('opus.compress.lzw') local Tar = require('opus.compress.tar') local Util = require('opus.util') local io = _G.io local shell = _ENV.shell local args = { ... } if not args[2] then error('Syntax: tar FILE DESTDIR') end local inFile = sh...
nilq/small-lua-stack
null
Interface = { zoomLevel = 4, defaultZoom = 4, zoomLevels = { 8, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 8192 }, navigating = false, showZones = g_settings.getBoolean("Interface.showZones", true), showHous...
nilq/small-lua-stack
null
local socket = require"socket" local group = "225.0.0.37" local port = 12345 local c = assert(socket.udp()) print(assert(c:setoption("reuseport", true))) print(assert(c:setsockname("*", port))) --print("loop:", c:getoption("ip-multicast-loop")) --print(assert(c:setoption("ip-multicast-loop", false))) --print("loop:", c...
nilq/small-lua-stack
null
-- System System = Class() function System:Init(name) self.Entity = {} self.Name = name end function System:AddEntity(entity) table.insert(self.Entity, entity) end function System:RemoveEntity(name, id) for k, v in pairs(self.Entity) do if v.Name == name then if id and v.__id ~= ...
nilq/small-lua-stack
null
local util = {} function util.isTable(tbl) return type(tbl) == "table" end local function printTableInternal(tbl, indent, internal) local ind = ("\t"):rep(indent) print(ind .. "{") for index, value in pairs(tbl) do if util.isTable(value) then printTableInternal(value, indent + 1, true) else print(ind ....
nilq/small-lua-stack
null
object_tangible_collection_publish_gift_comlink_component_09 = object_tangible_collection_shared_publish_gift_comlink_component_09:new { gameObjectType = 8211,} ObjectTemplates:addTemplate(object_tangible_collection_publish_gift_comlink_component_09, "object/tangible/collection/publish_gift_comlink_component_09.iff")
nilq/small-lua-stack
null
pg = pg or {} pg.world_chapter_template_reset = { [8000] = { id = 8000, transport = 1, transport_colormask = 1, tip = "是否确定离开塞壬实验场,返回<color=#92fc63>NY港</color>近海?(离开后实验场入口依然存在,再次挑战时会重置为初始状态)", reset_map = { 800 }, reset_trigger = {}, reset_item = {}, reset_buff = {} }, [8030] = { id = 8030, ...
nilq/small-lua-stack
null
meta.name = "Cells Interlinked" meta.version = "1.0" meta.author = "Dregu" meta.description = "Cellular automaton (Game of Life) based level gen with some enemies and traps thrown in from the randomizer. It's endless. You can't win. You have no purpose." register_option_float("_enemy", "Enemy chance", 10, 0, 100) regi...
nilq/small-lua-stack
null
-- -- Created by IntelliJ IDEA. -- User: nander -- Date: 01/03/2019 -- Time: 20:49 -- To change this template use File | Settings | File Templates. -- return function(route) love.graphics.setLineWidth( 32 ) local from = GET(route.station1) local to = GET(route.station2) love.graphics.line(from.positio...
nilq/small-lua-stack
null
local class = require 'EasyLD.lib.middleclass' local Font = class('Font') Font.static.fonts = {} function Font.static.print(text, id, size, box, modeW, modeH, color) EasyLD.font.fonts[id]:print(text, size, box, modeW, modeH, color) end function Font:initialize(src) self.src = src self.font = {} self.color = {} ...
nilq/small-lua-stack
null
--[[ GD50 Match-3 Remake -- Tile Class -- Author: Colton Ogden cogden@cs50.harvard.edu The individual tiles that make up our game board. Each Tile can have a color and a variety, with the varietes adding extra points to the matches. ]] Tile = Class{} function Tile:init(x, y, color, vari...
nilq/small-lua-stack
null
-- config.lua module("config", package.seeall) local utils = require("utils") local servers = require("servers") local servers_filename = "upstream_endpoints.json" local initConfig = { provisioning = { dir = os.getenv( "YWC_PROV_DIR" ) } } local runtime_config = {} function init() check_env...
nilq/small-lua-stack
null
-- Tables local weaponStringTable = {} local playerWeaponTable = {} -- When the player login addEvent( "onServerPlayerLogin" ) addEventHandler( "onServerPlayerLogin", root, function ( userID ) givePlayerDbWeapons(source, userID) setPlayerWeaponString(source, userid) end ) function mathround(numbe...
nilq/small-lua-stack
null
function findBestPath(map, from, to) Node = {} function Node:new(parent, cost, h, state, transition) local node = {} node.parent = parent node.state = state node.transition = transition if parent then node.g = parent.g + cost else node...
nilq/small-lua-stack
null
require("prototypes.technology")
nilq/small-lua-stack
null
local SH = function(Y) return ScrH()/(1080/Y) end local WH = function(X) return ScrW()/(1920/X) end local DrawCSRect = function(Mat,Col,X,Y,W,H) surface.SetMaterial(Mat) surface.SetDrawColor(Col) surface.DrawTexturedRect(WH(X),SH(Y),WH(W),SH(H)) end local CsPlayer = "" surface.CreateFont( "HUDHl...
nilq/small-lua-stack
null
cs_spkeys = {'LeftShift'} mem_read_ubyte = memory.read_u8 mem_read_uword = memory.read_u16_be mem_read_ulong = memory.read_u32_be mem_write_ubyte = memory.write_u8 mem_write_uword = memory.write_u16_be mem_write_ulong = memory.write_u32_be get_game_size = function() cli_screenwidth = client.screenwidth() cli_screen...
nilq/small-lua-stack
null
--[[ Scripter: Mistiik (XRHTech) ]]-- local spring = {} spring.__index = spring function spring.new(dampling, friction) local self = setmetatable({ -- Hooks Constants k = dampling or 0.3, f = friction or 0.5, -- Vectors position = Vector3.new(), velocity = Vector3.new(), target = Vector3.new() ...
nilq/small-lua-stack
null
#!/usr/bin/env gt --[[ Author: Sascha Steinbiss <ss34@sanger.ac.uk> Copyright (c) 2015 Genome Research Ltd Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all co...
nilq/small-lua-stack
null
return { _fold = false, _id = "shaderTest1", _type = "ShaderTest", height = "$fill", width = "$fill", _children = { { _id = "label1", _type = "cc.Label", fontSize = 18, height = 0, scaleX = "$minScale", scaleY = "$minScale", string = "None", width = 0, ...
nilq/small-lua-stack
null
-- Translation support local S = minetest.get_translator("virtual_key") local MTGS = minetest.get_translator("keys") local KS = minetest.get_translator("keyring") virtual_key.craft_common = {} virtual_key.craft_common.base_form_def = { translator = S, title_tab_management = S("Virtual keys management"), title_tab_s...
nilq/small-lua-stack
null
local class = require "xgame.class" local Array = require "xgame.Array" local runtime = require "xgame.runtime" local Dispatcher = require "xgame.event.Dispatcher" local LogCat = class('LogCat', Dispatcher) function LogCat:ctor(context) self.context = context self.logs = Array.new() ...
nilq/small-lua-stack
null
--[[ Arena ]]-- ROT=require 'src.rot' function love.load() f=ROT.Display:new(80,24) m=ROT.Map.Arena:new(f:getWidth(), f:getHeight()) function callbak(x,y,val) f:write(val == 1 and '#' or '.', x, y) end m:create(callbak) end function love.draw() f:draw() end --]]
nilq/small-lua-stack
null
-- Dumps your equipment items abotEquipmentResult = "[" for a = 0, 23 do abId = GetInventoryItemID("player", a) if (string.len(tostring(abId or "")) > 0) then abotItemLink = GetInventoryItemLink("player", a) abCount = GetInventoryItemCount("player", a) abCurrentDurability, abMaxDurabi...
nilq/small-lua-stack
null
return { fusion_superblast2 = { areaofeffect = 4000, craterboost = 1.5, cratermult = 1, edgeeffectiveness = 0.5, explosiongenerator = "custom:EXPLOSIONHUGE_BUILDING", impulseboost = 1, impulsefactor = 1, name = "Matter/AntimatterExplosion", soundhit = "explosionbig", soundstart = "explos...
nilq/small-lua-stack
null
require "snd" require "timer" require "fmt" local sfxr = require("sfxr") local last = true local wav -- to cache sound room { nam = 'main'; timer = function() if snd.playing() then p [[PLAYING]] last = true return elseif last then last = false pn [[Нажмите на {button|кнопку} для эффекта.]]; p ...
nilq/small-lua-stack
null
--[[ This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:29' using the latest game version. NOTE: This file should only be used as IDE support; it should NOT be distributed with addons! **************************************************************************** CONTENTS OF THIS FILE IS COPYRI...
nilq/small-lua-stack
null
function hello() print("Hello There!") end
nilq/small-lua-stack
null
-- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture) mobs:register_mob("mobs:spider", { docile_by_day = true, type = "monster", -- agressive, does 6 damage to player when hit passive = false, attack_type = "dogfight", pathfinding = false, reach = 2, damage = 4, -- health & armor hp_min = 25,...
nilq/small-lua-stack
null
for line in io.lines(arg[1]) do local a = {} for i in line:gmatch("%S+") do local x, y, z = i:match("(%d)(%a+)(%d)") a[#a+1] = z .. y .. x end print(table.concat(a, " ")) end
nilq/small-lua-stack
null
local f = string.format My.Translator:register("de", { side_mission_repair = "Techniker ist verständigt", side_mission_repair_description = function(captainPerson, fromCallSign, toCallSign, crewCount, payment) return Util.random({ f("Hey, ich bin %s, Captain eines Raumschiffs", captainPerso...
nilq/small-lua-stack
null
AttackStyleName = AttackRun Data = { howToBreakFormation = ClimbAndPeelOff, maxBreakDistance = 1900, distanceFromTargetToBreak = 1100, safeDistanceFromTargetToDoActions = 3000, coordSysToUse = Target, horizontalMin = 0.1, horizontalMax = 0.4, horizontalFlip = 1, verticalMin = 0.6, vertica...
nilq/small-lua-stack
null
--时穿剑·太初剑 local m=14000001 local cm=_G["c"..m] function cm.initial_effect(c) --direct attack local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetCondition(cm.dircon) c:RegisterEffect(e1) --battle damage to effect damage local e2=Effect.CreateEffect(c)...
nilq/small-lua-stack
null
ys = ys or {} slot1 = ys.Battle.BattleConst.UnitType ys.Battle.BattleStrayBulletFactory = singletonClass("BattleStrayBulletFactory", ys.Battle.BattleCannonBulletFactory) ys.Battle.BattleStrayBulletFactory.__name = "BattleStrayBulletFactory" ys.Battle.BattleStrayBulletFactory.Ctor = function (slot0) slot0.super.Ctor(s...
nilq/small-lua-stack
null
local function fib(n) if n < 3 then return 1 else return fib(n - 1) + fib(n - 2) end end print(fib(30))
nilq/small-lua-stack
null
local T, C, L, G = unpack(select(2, ...)) G.Dungeons[777] = { { -- 测试1 id = 34696, alerts = { AlertIcon = { -- 图标提示 ["1544_cast_no_164862"] = {}, -- 地图_类型(cast施法 com对我施法 aura光环 auras多人光环 log战斗记录 bmsg首领讯息)_是否高亮(no/hl)_法术ID ["1544_cast_no_20473"] = {}, ["1544_com_no_19750"] = {}, }, PlateAler...
nilq/small-lua-stack
null
--[[ BaseLua https://github.com/dejayc/BaseLua Copyright 2012 Dejay Clayton All use of this file must comply with the Apache License, Version 2.0, under which this file is licensed: http://www.apache.org/licenses/LICENSE-2.0 --]] --[[ ---------------------------------------------------------...
nilq/small-lua-stack
null
--[[ Copyright The Snabb Authors. Licensed under the Apache License, Version 2.0 (the "License"). See LICENSE or https://www.apache.org/licenses/LICENSE-2.0 Modifications by Fabian Bonk. --]] local mod = {} local ffi = require "ffi" local config = require "core.config" local link = require "core.link" lo...
nilq/small-lua-stack
null
local Task = require 'CompileMe.task' local Command = require 'CompileMe.command' local upfind = require 'CompileMe.upfind' local M = {} M.compile = function () local makefilePath = upfind('Makefile')[1] local makefileDir = vim.fn.fnamemodify(makefilePath, ':h') local make = Command() make.args = {'make'} ...
nilq/small-lua-stack
null
local M = {} local ExecuteScope = {} ExecuteScope.__index = ExecuteScope M.ExecuteScope = ExecuteScope function ExecuteScope.new(scope_type) vim.validate({ scope_type = { scope_type, "string", true } }) local cursor if scope_type == "cursor" then cursor = vim.api.nvim_win_get_cursor(0) end local tbl =...
nilq/small-lua-stack
null