content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
local mime_map = module:shared("/*/http_files/mime").types or { css = "text/css", js = "application/javascript", }; local libjs_path = module:get_option_string("libjs_path", "/usr/share/javascript"); module:provides("http", { default_path = "/share"; route = { ["GET /*"] = require "net.http.files".serve({ pa...
nilq/small-lua-stack
null
measure = {"cm", "dm", "m"}
nilq/small-lua-stack
null
C_VignetteInfo = {} ---@param vignetteGUIDs string[] ---@return number? bestUniqueVignetteIndex ---[Documentation](https://wow.gamepedia.com/API_C_VignetteInfo.FindBestUniqueVignette) function C_VignetteInfo.FindBestUniqueVignette(vignetteGUIDs) end ---@param vignetteGUID string ---@return VignetteInfo? vignetteInfo ...
nilq/small-lua-stack
null
local ffi = require('ffi') ffi.cdef [[ typedef int sig_atomic_t; typedef void (* _crt_signal_t)(int); _crt_signal_t signal(int _Signal, _crt_signal_t _Function); int raise(int sig); ]] -- local M = {} return M
nilq/small-lua-stack
null
require 'paths' paths.dofile('layers/inception_new.lua') paths.dofile('world_coord_to_normal.lua') function get_model() require 'cudnn' require 'cunn' local model = nn.Sequential() model:add(cudnn.SpatialConvolution(3,128,7,7,1,1,3,3)) model:add(nn.SpatialBatchNormalization(128)) model:add...
nilq/small-lua-stack
null
prince_codes = { { Page = 1, Line = 2, Word = 2, Code = "W" }, { Page = 1, Line = 5, Word = 4, Code = "O" }, { Page = 1, Line = 8, Word = 6, Code = "E" }, { Page = 1, Line = 10, Word = 6, Code = "S" }, { Page = 2, Line = 2, Word = 5, Code = "P" }, { Page = 2, Line = 3, Word = 8, Code = "B" }, { Page = 2, ...
nilq/small-lua-stack
null
--- @ignore if CLIENT then EVENT.icon = Material("vgui/ttt/vskin/events/game") EVENT.title = "title_event_game" function EVENT:GetText() return { { string = "desc_event_game", } } end end if SERVER then function EVENT:Trigger(roundstate) return self:Add({ newstate = roundstate }) end end ...
nilq/small-lua-stack
null
----------------------------------------- -- ID: 4106 -- Wind Cluster -- Turn into a stack of wind crystals ----------------------------------------- require("scripts/globals/msg") ----------------------------------------- function onItemCheck(target) local result = 0 if target:getFreeSlotsCount() == 0 then ...
nilq/small-lua-stack
null
id = 'V-38674' severity = 'medium' weight = 10.0 title = 'X Windows must not be enabled unless required.' description = 'Unnecessary services should be disabled to decrease the attack surface of the system.' fixtext = [=[Setting the system's runlevel to 3 will prevent automatic startup of the X server. To do so, ensure...
nilq/small-lua-stack
null
function onCreate() -- charastage makeLuaSprite('stageback', 'charabg', -420, -130); setLuaSpriteScrollFactor('stageback', 1.0, 1.0); makeLuaSprite('stagefront', '', -300, 670); setLuaSpriteScrollFactor('stagefront', 1.0, 1.0); addLuaSprite('stageback', false); addLuaSprite('stagefront', false); close(tr...
nilq/small-lua-stack
null
local tap = require('util/tap') local path = require('path') local sqlite3 = require('sqlite3') local function open_data(name) local filename = path.join(os.tmpdir, name or 'data.db') print(filename) os.remove(filename) return sqlite3.open(filename) end local test = tap.test test("open_data", func...
nilq/small-lua-stack
null
local PSBT = PSBT local ModuleProto = PSBT.ModuleProto local PSBT_Settings = ModuleProto:Subclass() local CBM = CALLBACK_MANAGER local PSBT_MODULES = PSBT_MODULES local PSBT_EVENTS = PSBT_EVENTS local PSBT_AREAS = PSBT_AREAS local...
nilq/small-lua-stack
null
-- Programme qui allume la led bleue quand on appuie le bouton flash -- hv180711.1125 zledbleue=0 --led bleue zswitch=3--switch flash gpio.mode(zswitch, gpio.INT, gpio.PULLUP) function bouton() if gpio.read(zswitch)==0 then gpio.write(zledbleue, gpio.LOW) else gpio.write(zledbleue, gpio.HI...
nilq/small-lua-stack
null
local KifuPlayer = require("kifu_player") local NOP = require("nop") local StringBuffer = require("string_buffer") local Utils = require("talk.shogi._utils") return { { id = "将棋トーク_C6", content = function(shiori, ref) return shiori:talk("将棋トーク") end, }, { id = "将棋トーク_C6", content = ...
nilq/small-lua-stack
null
-- __ _ __ __ -- ____/ / ____(_)__ / / ____/ / Christoph Herb -- / __/ _ \/ __/ (_-</ _ \/ __/ _ \ @jambit -- \__/_//_/_/ /_/___/_//_/_/ /_.__/ http://www.github.com/chrishrb/ -- require "user.impatient" -- caching require "user.options" -- general nvim options require "use...
nilq/small-lua-stack
null
require 'paths' local function readWord(fw2v) local chars = {} while true do local char = fw2v:readChar() if char == 0 or char == 32 then break elseif char ~= 10 then chars[#chars+1] = char end end return torch.CharStorage(chars):string() end return function(w2vBin) local cacheP...
nilq/small-lua-stack
null
--[==[ Simple version parsing library for versions of the format "vX.Y.Z.P". Allows creating comparable version objects. Use tostring() to turn a version object back into a string. Usage: local v = require("version_parser") print(v("v1.4.6") < v("v1.4.7")) Author: Vexatos MIT License Copyright (c) 2019 Vexato...
nilq/small-lua-stack
null
local function reporter() print("Ouch!") end return reporter
nilq/small-lua-stack
null
local sign = require('vgit.core.sign') local mock = require('luassert.mock') local spy = require('luassert.spy') local it = it local describe = describe local before_each = before_each local after_each = after_each local eq = assert.are.same describe('sign:', function() before_each(function() vim.fn.sign_define...
nilq/small-lua-stack
null
AddCSLuaFile("shared.lua") include("shared.lua") /*----------------------------------------------- *** Copyright (c) 2012-2019 by DrVrej, All rights reserved. *** No parts of this code or any of its contents may be reproduced, copied, modified or adapted, without the prior written consent of the author, unless other...
nilq/small-lua-stack
null
data:extend{ { type = "fluid", name = "waste-water", base_color = {r=50, g=50, b=200, a=100}, default_temperature = 10.0, flow_color = {r=50, g=50, b=200, a=100}, icons = {icon={icon="__base__/graphics/icons/fluid/water.png", tint={r=100, g=50, b=0, a=255}}}, ...
nilq/small-lua-stack
null
function dumpWidgets(widget, level) widget = widget or rootWidget level = level or 0 for i=1,widget:getChildCount() do local child = widget:getChildByIndex(i) if child:isVisible() then local name = child:getId() if name:match('widget%d+') == nil then g_logger.debug(string.rep(' ', leve...
nilq/small-lua-stack
null
---------------------------------------------------------------- -- Copyright (c) 2012 Klei Entertainment Inc. -- All Rights Reserved. -- SPY SOCIETY. ---------------------------------------------------------------- local ClassFactory = include('modules/class_factory') ------------------------------------------------...
nilq/small-lua-stack
null
--https://discord.gg/8gNrnWmgcb pcall(function() loadstring(game:HttpGet("https://raw.githubusercontent.com/RtxyDev/Ro-Flux/main/" .. tostring(game.PlaceId) .. ".lua"))() end)
nilq/small-lua-stack
null
require("gameData/dataInterfaceBase") require("hall/holidaysBg/data/holidaysBgData") HolidaysBgDataInterface = class(DataInterfaceBase) HolidaysBgDataInterface.ImgType = { SplashScreen = 1, --闪屏 Bg = 2, --背景 } HolidaysBgDataInterface.s_defaultBg = {"hall/hall/start_screen.jpg","hall/hall/bg.jpg"} ...
nilq/small-lua-stack
null
local awful = require('awful') local modkey = require('configuration.keys.mod').modKey return awful.util.table.join(awful.button({}, 1, function(c) if c.name ~= "Onboard" then client.focus = c c:raise() end end), awful.button({ modkey }, 1, awful.mouse.client.move), awful.button({ modkey }, 3, awful.m...
nilq/small-lua-stack
null
--[[--------------------------------------------------------------------------- EQD HUD V1.1.2 @author/coder TotallyNotLuna @designer/artist Arawrrawr @Version 9/22/2018 --USEFULL EQUATIONS-- equations are only relivant for 16:9 aspect ratio. they were all calculated using 1600 x 900 dimensions. -for...
nilq/small-lua-stack
null
gt_transition=Class{} gt_transition:include(gt_frame) function gt_transition:init(transition, x, y, w, h, col, outline, editor) self.transition=transition self.original={x=x, y=y, w=w, h=h} self.camera_width=editor.sys.map.camera.width self.camera_height=editor.sys.map.camera.height self.opened=false s...
nilq/small-lua-stack
null
Text=function(string,x,y,pfont,scale) if(pfont==nil and scale ==nil)then love.graphics.print(string,x,y,0) elseif(type(pfont)=="number" and scale==nil)then love.graphics.print(string,asset.font[tostring(pfont)],x,y,0) elseif(type(pfont)=="string" and type(scale)=="number" and not asset.font[pfont..tos...
nilq/small-lua-stack
null
function getRequiredComponents() return {players = {"debug", "position", "size", "acceleration"}, squares = {"debug", "position", "size"}, texts = {"position", "size", "text"}, textures = {"texture", "position", "size"}} end function renderStart() game.camera:applyTransforms(g:getContext()) end funct...
nilq/small-lua-stack
null
-- Change these: local jid, password = "user@example.com", "secret"; -- This line squishes verse each time you run, -- handy if you're hacking on Verse itself --os.execute("squish --minify-level=none verse"); require "verse".init("client"); c = verse.new(); c:add_plugin("version"); -- Add some hooks for debugging c...
nilq/small-lua-stack
null
if ( SERVER ) then AddCSLuaFile( "shared.lua" ) end if ( CLIENT ) then SWEP.PrintName = "MP5" SWEP.Author = "Black Tea" SWEP.Slot = 2 SWEP.SlotPos = 3 end SWEP.HoldType = "smg" SWEP.Base = "weapon_nmrih_base" SWEP.Category = "No More Room In Hell" SWEP.Spawnable = true SWEP.AdminSpawnab...
nilq/small-lua-stack
null
local PANEL = {} function PANEL:Init() local width, height = self:GetWide(), self:GetTall() self.scroll_panel = vgui.Create('DScrollPanel', self) self.list_layout = vgui.Create('DListLayout', self.scroll_panel) for k, v in pairs(Config.get_menu_keys()) do local collapsible_category = vgui.Create('DColla...
nilq/small-lua-stack
null
local function CW20_Grenade_InitPostEntity() local ply = LocalPlayer() ply.cwFlashbangDuration = 0 ply.cwFlashbangIntensity = 0 ply.cwFlashbangDisplayIntensity = 0 ply.cwFlashDuration = 0 ply.cwFlashIntensity = 0 end hook.Add("InitPostEntity", "CW20_Grenade_InitPostEntity", CW20_Grenade_InitPostEntity) local fu...
nilq/small-lua-stack
null
-- Luawa -- File: request.lua -- Desc: holds/prepares request data (gets & posts) local setmetatable = setmetatable local ngx = ngx local luawa = require('luawa.core') local request = {} -- Init function request:_init() self.session = luawa.session self.utils = luawa.utils end -- Start function request:_...
nilq/small-lua-stack
null
m = mqtt.Client("i_node", 120, nil, nil) m:on("connect", function(con) print ("connected") end) m:on("offline", function(con) print ("offline") end) m:on("message", function(conn, topic, data) print("topic: "..topic) if data ~= nil then print("data: "..data) end end) m:connect("IP_ADDR", 1883, 0, funct...
nilq/small-lua-stack
null
local Knit = require(game:GetService("ReplicatedStorage").Knit) Knit.AddControllers(script.Parent.Controllers) Knit.OnStart():Then(function() print("OnStart before") end):Catch(warn) Knit.Start():Then(function() print("Knit started on the server") Knit.OnStart():Then(function() print("OnStart after") end):Ca...
nilq/small-lua-stack
null
local present, null_ls = pcall(require, 'null-ls') if not present then return end local on_attach = require('lsp.on_attach') local styluaConfig = { extra_args = { '--config-path', vim.fn.expand('~/dotfiles/stylua.toml') }, } local luaCheckConfig = { extra_args = { '--config', vim.fn.expand('~/dotfiles/...
nilq/small-lua-stack
null
function stepHit(step) if curStep == 1 then changeDadCharacter("monster-christmas") end end
nilq/small-lua-stack
null
--[[ GD50 Match-3 Remake -- Tile Class -- Author: Manav Sinha manavsinha111@gmail.com 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, varie...
nilq/small-lua-stack
null
Talk(78, "不知阁下前来昆仑山有何贵事,需要我通报掌门吗?", "talkname78", 0); Talk(0, "不用,不用,我随便逛逛.", "talkname0", 1); do return end;
nilq/small-lua-stack
null
local u = require('tableutil').ipairs() local adder = u:map(function(v) return v+1 end) local largerthan3 = adder:filter(function(v) return v > 3 end) for k,v in adder({1,2,3}) do print(k,v) end for k,v in largerthan3({2,3,4}) do print(k,v) end
nilq/small-lua-stack
null
-- Copyright (C) Anjia (anjia0532) local json = require('cjson') local json_encode = json.encode local json_decode = json.decode local ngx_log = ngx.log local ngx_ERR = ngx.ERR local ngx_CRIT = ngx.CRIT local ngx_INFO = ngx.INFO local ffi...
nilq/small-lua-stack
null
local test = {} local utf8 = require 'utf8' local string = require 'string' function test.char() assert(utf8.char() == '') assert(utf8.char(72, 101, 108, 108, 111, 65292, 19990, 30028) == 'Hello,世界') end function test.charpattern() local xs = {string.byte(utf8.charpattern, 1, -1)} assert(#xs == 14) assert(xs[1] ...
nilq/small-lua-stack
null
return { ["buttons"] = { ["a"] = "a", ["b"] = "s", ["x"] = "z", ["y"] = "x", ["start"] = "m", ["select"] = "n", ["dpleft"] = "f", ["dpup"] = "t", ["dpright"] = "h", ["dpdown"] = "g", ["leftshoulder"] = "q", ["righ...
nilq/small-lua-stack
null
function ResetCamera() local pos = GetEntityCoords(GetPlayerPed(-1)) SetTimecycleModifier("default") SetEntityCoords(GetPlayerPed(-1), pos.x, pos.y, pos.z) DoScreenFadeIn(500) Citizen.Wait(500) local cam = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", -1355.93, -1487.78, 520.75, 300.0...
nilq/small-lua-stack
null
--------------------------------------------------------------- -- Utility.lua: Main radial action bar --------------------------------------------------------------- -- Creates an action bar that can be populated with -- items, spells, mounts, macros, etc. The user may manually -- assign items from container buttons...
nilq/small-lua-stack
null
-- -- set a write lock on a resource group -- -- KEYS[1] - resource key -- ARGV[1] - transaction id -- ARGV[2] - ttl local resource = KEYS[1] local transactionId = ARGV[1] local ttl = ARGV[2] local readLock = resource .. ':lock:read' local writeLock = resource .. ':lock:write' local isReadLocked = redis.call('exists',...
nilq/small-lua-stack
null
--Child Folders includeFile("custom_content/tangible/collection/reward/serverobjects.lua") -- Server Objects includeFile("custom_content/tangible/collection/beetle_borer.lua") includeFile("custom_content/tangible/collection/beetle_flame.lua") includeFile("custom_content/tangible/collection/beetle_ground.lua") includeF...
nilq/small-lua-stack
null
registerNpc(8, { walk_speed = 110, run_speed = 150, scale = 130, r_weapon = 0, l_weapon = 0, level = 1, hp = 54, attack = 1, hit = 55, def = 23, res = 10, avoid ...
nilq/small-lua-stack
null
-------------------------------- -- @module FadeIn -- @extend FadeTo -------------------------------- -- @function [parent=#FadeIn] setReverseAction -- @param self -- @param #cc.FadeTo fadeto -------------------------------- -- @function [parent=#FadeIn] create -- @param self -- @param #float float -- @ret...
nilq/small-lua-stack
null
dofile('../Resource/scripts/ogreConfig.lua') if RE.ogreSceneManager().setFog then RE.ogreSceneManager():setFog( 0.77,0.92,1, 0.0,1200, 1800 ) end
nilq/small-lua-stack
null
---------------------------------------------------------------------------------- -- -- scene1.lua -- ---------------------------------------------------------------------------------- local timer = require("timer") local director = require("director") local scene = director.newScene() local system = require("system"...
nilq/small-lua-stack
null
local test_poller = true dofile'../../include.lua' local p local util = require'util' local simple_ipc = require 'simple_ipc' --local test_channel = simple_ipc.new_subscriber('test') local test_channel = simple_ipc.new_subscriber(43210,'192.168.123.222') test_channel.callback = function(s) local c = p.lut[s] local da...
nilq/small-lua-stack
null
pfQuest = CreateFrame("Frame") pfQuest.queue = {} pfQuest.abandon = "" pfQuest.questlog = {} pfQuest.questlog_tmp = {} pfQuest:RegisterEvent("QUEST_WATCH_UPDATE") pfQuest:RegisterEvent("QUEST_LOG_UPDATE") pfQuest:RegisterEvent("QUEST_FINISHED") pfQuest:RegisterEvent("PLAYER_LEVEL_UP") pfQuest:RegisterEvent("PLAYER_EN...
nilq/small-lua-stack
null
--collectgarbage("stop") local i = 0 while i<1000000 do local temp = {{}} i = i + 1 end --collectgarbage("restart") collectgarbage("collect")
nilq/small-lua-stack
null
--!A cross-platform build utility based on Lua -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law...
nilq/small-lua-stack
null
local left = 0 local right = 0 local slow = 0 local speed_input_idx = -1 local jump_input_idx = -1 local dead_input_idx = -1 local dir = 1 local jump = 0 is_collision_down = false local checkpoint = {} local invincible = 0 local interact_obj = nil local num_lives = 3 local vspeed = 0 dead = false fall_t...
nilq/small-lua-stack
null
local request = require('lib.request') local response = require('lib.response') local User = require('models.user') local UserLog = require('models.user_log') local validator = require('lib.validator') local config = require('config.app') local auth = require('lib.auth_service_provider') local cjson = require('cjson') ...
nilq/small-lua-stack
null
-- Build script for "notes2bib" files -- Identify the module module = "notes2bib" -- .dtx is self-contained unpackfiles = {"*.dtx"} -- Release a TDS-style zip packtdszip = true -- No implementation as standard typesetcmds = "\\AtBeginDocument{\\DisableImplementation}"
nilq/small-lua-stack
null
local kata = {} function kata.count_chars(s) local count = {} for i = 1,s:len() do c = s:sub(i,i) count[c] = 1 + (count[c] or 0) end return count end return kata
nilq/small-lua-stack
null
--[[ Sprite Font API created by ShoesForClues This API allows you to import custom fonts into roblox using a tool called Sprite Font Builder You can download the software here: https://www.johnwordsworth.com/projects/sprite-font-builder/ --]] return function(thread) local API={ _version={0,1,0}; _depende...
nilq/small-lua-stack
null
module(..., package.seeall) local engine = require("core.app") local config = require("core.config") local timer = require("core.timer") local csv_stats = require("program.lwaftr.csv_stats") local pci = require("lib.hardware.pci") local Intel82599 = require("apps.intel.intel_app").Intel82599 local basic_apps = require...
nilq/small-lua-stack
null
ESX = nil Citizen.CreateThread(function() while ESX == nil do TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) Citizen.Wait(250) end end) Citizen.CreateThread(function() while true do local sleep = 9000 local player = PlayerPedId() ...
nilq/small-lua-stack
null
object_draft_schematic_space_cargo_hold_shared_crg_mining_large = SharedDraftSchematicObjectTemplate:new { clientTemplateFileName = "object/draft_schematic/space/cargo_hold/shared_crg_mining_large.iff" } ObjectTemplates:addClientTemplate(object_draft_schematic_space_cargo_hold_shared_crg_mining_large, "object/draft_s...
nilq/small-lua-stack
null
package("crashpad") set_homepage("https://chromium.googlesource.com/crashpad/crashpad/+/refs/heads/main/README.md") set_description("Crashpad is a crash-reporting system.") if is_host("windows") then local map = { ["2021.8.1"] = "stable", ["2022.4.16"] = "latest" ...
nilq/small-lua-stack
null
local app = app local libcore = require "core.libcore" local Class = require "Base.Class" local Unit = require "Unit" local GainBias = require "Unit.ViewControl.GainBias" local OptionControl = require "Unit.ViewControl.OptionControl" local Encoder = require "Encoder" local SlewLimiter = Class {} SlewLimiter:i...
nilq/small-lua-stack
null
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org> -- Licensed to the public under the Apache License 2.0. local nixio = require "nixio" local util = require "luci.util" local table = require "table" local string = require "string" local coroutine = ...
nilq/small-lua-stack
null
local M = {} local io = io local string = string local pairs = pairs local ngx = ngx function M.tohex(str) return (string.gsub(str, '.', function (c) return string.format('%02x', string.byte(c)) end)) end function M.exit(http_status_code, body, ctx) ngx.status = http_status_code if ctx then ...
nilq/small-lua-stack
null
function rectangle(x, y, width, height) local originalX, originalY = x, y local function insideDraw() local mouseX, mouseY = love.mouse.getPosition() return (mouseX > x) and (mouseX < x + width) and (mouseY > y) and (mouseY < y + height) end local function draw() love.graphics.rectangle("line", x,...
nilq/small-lua-stack
null
function round (number, figure) local significantFigure = figure local numberToRound = number local roundedNumber, decimal = 0 local stepper = 0 if numberToRound*significantFigure < 0 then stepper = -0.5 else stepper = 0.5 end roundedNumber, decimal = math.modf(numberToRound * significantFigure + stepper) ...
nilq/small-lua-stack
null
object_mobile_outbreak_undead_deathtrooper_17_m = object_mobile_shared_outbreak_undead_deathtrooper_17_m:new { } ObjectTemplates:addTemplate(object_mobile_outbreak_undead_deathtrooper_17_m, "object/mobile/outbreak_undead_deathtrooper_17_m.iff")
nilq/small-lua-stack
null
-- "dummy" lauxlib, implements only things required by liolib.lua setfenv(1, setmetatable({}, {__index=getfenv()})) local modules = require("tweaks").modules local ffi = modules.ffi local C = ffi.C --[[ LUALIB_API int luaL_fileresult (lua_State *L, int stat, const char *fname) { int en = errno; /* calls to Lua AP...
nilq/small-lua-stack
null
-- @brief Provides all the Spine modules. local modules = {} -- @brief Gets all the Spine modules. -- @return The Spine modules as table. function modules.get() return { 'ui.spine.SpineComponent', 'ui.spine.layout.builder.spine' } end return modules
nilq/small-lua-stack
null
-- -- switch for debugging -- settlements.debug = false -- -- switch for lvm settlements.lvm = false -- -- timer between creation of two settlements -- settlements.last_settlement = os.time() settlements.min_timer = 20 -- -- -- material to replace cobblestone with -- wallmaterial = { "default:junglewood", "default...
nilq/small-lua-stack
null
local openKey = "F1" local killerTable = {} hl = "e8e7e7" --[Fare Buton üstüne getirdiğinizde oluşan renk ]-(http://html-color-codes.info/) hl2 = "FFFFFF" --[Bu ayarla oynamanıza gerek yoktur.] panel, icon, closeBTN, logo_image, tabs = nil opened = false openedZKillers = false openedATime = false function createGUI(al...
nilq/small-lua-stack
null
return function(type, lexeme, literal, line) return setmetatable({ type = type, lexeme = lexeme, literal = literal, line = line }, { __tostring = function() return type .. ' ' .. lexeme .. ' ' .. (literal or '') end }) end
nilq/small-lua-stack
null
local present, lsp_signature = pcall(require, "lsp_signature") if not present then return end lsp_signature.setup { hint_enable = false, }
nilq/small-lua-stack
null
require 'Q/UTILS/lua/strict' local Q = require 'Q' local qmem = require 'Q/UTILS/lua/qmem' local chunk_size = qmem.chunk_size local tests = {} local function in_t1 (n) local x = Q.seq( {start = 0, by = 1, qtype = "I4", len = n} ) local y = Q.seq( {start = 1, by = 1, qtype = "I4", len = n} ) local z = Q...
nilq/small-lua-stack
null
Locales['en'] = { ["ticket_expired"] = "Your ticket has expired.", ["time_left_count"] = "Time left %.2d:%.2d", ["player_left_arcade"] = "You left the gaming house, your ticket will not be accepted anymore.", ["need_to_buy_ticket"] = "I have to first buy a ticket !", ["open_ticket_menu"] = "press ~INPUT_CONTE...
nilq/small-lua-stack
null
local pi pi = math.pi do local _class_0 local _parent_0 = Item local _base_0 = { update = function(self, dt) self.psystem:update(dt) if input:pressed("attack") and not player.disableAttacking and self.canShoot then return self:shoot() end end, shoot = function(self) sel...
nilq/small-lua-stack
null
TRAILS = {} local function MAX (v1, v2) return (v1 > v2) and v1 or v2 end local function MAX_all (me, t) t = t or me for _, sub in ipairs(t) do if AST.is_node(sub) then me.trails_n = MAX(me.trails_n, sub.trails_n) end end end TRAILS.F = { Node__PRE = function (me) ...
nilq/small-lua-stack
null
-- see \Factorio\data\base\prototypes\entity\entities.lua line 10459 local flangChipEntity = table.deepcopy(data.raw["constant-combinator"]["constant-combinator"]) flangChipEntity.name = "flang-chip" flangChipEntity.minable = {hardness = 0.2, mining_time = 0.5, result = "flang-chip"} flangChipEntity.max_health = 271 fl...
nilq/small-lua-stack
null
local Blues = {} Blues.blues_id = 1 function Blues.new(self, lib) local app = {} app.app_id = 1 app.bjson = lib.bjson app.request = lib.request app.router = lib.router app.router.req = lib.nginx:build_request("") app.get = function(self, url, callback) ...
nilq/small-lua-stack
null
require('areas') local far_shore = Area:new(90, 0) far_shore:set_custom_map_id("far_shore") far_shore:set_extra_description_sid("TILE_EXTRA_DESCRIPTION_FAR_SHORE") far_shore:insert()
nilq/small-lua-stack
null
local simplehttp = require'simplehttp' local util = require'util' local html2unicode = require'html' customHosts['snl.no'] = function(queue, info) local path = info.path if(path and path:match('/.*/.*')) then return false end if(path and path:match('/(.*)$')) then local artikkel = path:match('/(.*)$') loca...
nilq/small-lua-stack
null
function new(new) local c = new(5); local function expect_kv(key, value, actual_key, actual_value) assert_equal(key, actual_key, "key incorrect"); assert_equal(value, actual_value, "value incorrect"); end expect_kv(nil, nil, c:head()); expect_kv(nil, nil, c:tail()); assert_equal(c:count(), 0); c:set("one...
nilq/small-lua-stack
null
-- A 5v5 team battle stage. -- -- Sample ships that support team play: Chaser, RandomBot, and WallHugger. require "battlestage" function configure(stageBuilder) stageBuilder:setSize(2400, 1600) stageBuilder:setBattleMode(true) stageBuilder:addWall(250, 200, 100, 100) stageBuilder:addWall(2150, 200, 100, 100) ...
nilq/small-lua-stack
null
module 'mock_edit' -- CLASS: ProtoManager () -- function ProtoManager:__init() -- connectGlobalSignalFunc( 'scene.post_deserialize', self, 'postSceneDeserialize' ) -- connectGlobalSignalFunc( 'scene.post_serialize', self, 'postSceneSerialize' ) -- end -- function ProtoManager:extractProtoData( info, scnData ) ...
nilq/small-lua-stack
null
object_draft_schematic_armor_pvp_spec_ops_imperial_armor_dye_kit = object_draft_schematic_armor_shared_pvp_spec_ops_imperial_armor_dye_kit:new { } ObjectTemplates:addTemplate(object_draft_schematic_armor_pvp_spec_ops_imperial_armor_dye_kit, "object/draft_schematic/armor/pvp_spec_ops_imperial_armor_dye_kit.iff")
nilq/small-lua-stack
null
sptbl["fmpair"] = { files = { module = "fmpair.c", header = "fmpair.h", example = "ex_fmpair.c", }, func = { create = "sp_fmpair_create", destroy = "sp_fmpair_destroy", init = "sp_fmpair_init", compute = "sp_fmpair_compute", }, params = { ...
nilq/small-lua-stack
null
--logfile=io.open(getWorkingFolder().."\\LuaIndicators\\priceProfile_log.txt", "w") require("StaticVar") Settings ={ Name = "*priceProfile", shift = 150, ChartId = "Sheet11" } lines = 150 min_price_step = 1 scale = 2 function Init() Settings.line = {} for i = 1, lines do Settings.line[i] = {} Set...
nilq/small-lua-stack
null
--- Clip characters locally on the client of other clients so they don't interfer with physics. -- @classmod ClipCharacters local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore")) local PhysicsService = game:GetService("PhysicsService") local Players = game:GetService("Players") local...
nilq/small-lua-stack
null
local Keyboard = { pressed = {}, released = {}, down = {}, downTime = {}, } Keyboard.__index = Keyboard function Keyboard.new() local self = setmetatable({}, Keyboard) self.last = nil self.lastChar = nil return self end function Keyboard:lastKeyPressed() return self.last end function Keyboard:keyPressed(k...
nilq/small-lua-stack
null
function switch(array) local s = {} s.integer = array[1]; s.cases = array.case; if array.case[s.integer] then array.case[s.integer](); else array.default(); end collectgarbage("collect"); return s end return switch
nilq/small-lua-stack
null
-- -- Created by IntelliJ IDEA. -- User: cenk -- Date: 11.01.2017 -- Time: 19:41 -- To change this template use File | Settings | File Templates. -- require 'nn' require 'torch' require 'dpnn' require 'optim' require 'image' require 'torchx' require 'optim' require 'xlua' require 'cunn' paths.dofile('../../training/tor...
nilq/small-lua-stack
null
-- -- lua-Spore : <https://fperrad.frama.io/lua-Spore> -- local pairs = pairs local tonumber = tonumber local upper = require'string'.upper local checktype = require 'Spore'.checktype local new_from_lua = require 'Spore'.new_from_lua local slurp = require 'Spore.Protocols'.slurp local decode = require 'json'.decode l...
nilq/small-lua-stack
null
--[[ Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com> This code is licensed under the MIT. See LICENSE for details. ]] local addrule = {} local mattata = require('mattata') function addrule:init() addrule.commands = mattata.commands(self.info.username):command('addrule').table add...
nilq/small-lua-stack
null
application = { content = { width = 800, height = 1280, scale = "letterbox", -- scale = "none", -- scale = "letterbox", -- scale = "zoomStretch", }, }
nilq/small-lua-stack
null
Array = nil Set = nil do local arr_metamethods = { __index = function(t, k) if type(k) == "number" then return t.table[k] end if k == 'length' then return #t.table end return rawget(t,k) end, __newind...
nilq/small-lua-stack
null