content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
-- Manually converted to Lua from: -- https://github.com/w3c/web-platform-tests/blob/83adac74b20a51d6cb83946830907c95d505ed1a/dom/nodes/Element-childElementCount.html local gumbo = require "gumbo" local input = [[ <!DOCTYPE HTML> <meta charset=utf-8> <title>childElementCount</title> <h1>Test of childElementCount</h1>...
nilq/small-lua-stack
null
--[[---------------------------------------------------------------------------- --- @file create.lua --- @brief fácil's create command. ----------------------------------------------------------------------------]]-- local Core = require "facil.core" local _M = {} --- Creates new card -- @param name Short descripti...
nilq/small-lua-stack
null
-- NOTE: temporary _G.Utils = {} _G.Commands = {} -- ===== SETTINGS ================================ _G.Settings = { colorscheme = 'ayu', -- 'ayu'|'xresources' background = 'dark', -- 'dark'|'light' ayu_ver = 'nvim', -- 'luxed'|'nvim', dependent on plugin mapleader = ' ', } -- before plugins so if they are s...
nilq/small-lua-stack
null
width = 960 height = 640
nilq/small-lua-stack
null
function init() setName("Directional Warp") setDesc("Warps texture in a direction") setSize(140, 24+64+8+8+18+18+7+4) addOutput(24+32) addInput("Texture", 24+64+8+8) addInputParameter("Direction", "Blur direction", 24+64+8+8+18, 0, -1, -1) addInputParameter("Intensity", "Blur intensity", 24+...
nilq/small-lua-stack
null
local mod = DBM:NewMod("d511", "DBM-Scenario-MoP") local L = mod:GetLocalizedStrings() mod:SetRevision(("$Revision: 2 $"):sub(12, -3)) mod:SetZone() mod:RegisterCombat("scenario", 1031) mod:RegisterEventsInCombat( "SPELL_CAST_START" -- "SPELL_AURA_REMOVED" ) mod.onlyNormal = true local warnFlameWall...
nilq/small-lua-stack
null
-- This file is auto-generated by shipwright.nvim local common_fg = "#4B4B4B" local inactive_bg = "#D4D4D4" local inactive_fg = "#818181" return { normal = { a = { bg = "#A6A6A6", fg = common_fg, gui = "bold" }, b = { bg = "#B9B9B9", fg = common_fg }, c = { bg = "#CCCCCC", fg = "#555555" }, }, insert = { a...
nilq/small-lua-stack
null
-- Touch sensor for 8 pads -- Set threshold to 30% of untouched state -- Print padNum list per callback -- To use: -- tpad = require("touch_8pads_showlist") -- tpad.init({isDebug=false}) -- tpad.config() local m = {} m.pad = {2,3,4,5,6,7,8,9} -- 2=GPIO2, 3=GPIO15, 4=GPIO13, 5=GPIO12, 6=GPIO14, 7=GPIO27, 8=GPIO33, 9=...
nilq/small-lua-stack
null
--[[ AdiBags - Shadowlands item filter by PsyKzz version: v1.0 Adds a new filter for Anima and Conduit items ]] local addonName, addon = ... local AdiBags = LibStub("AceAddon-3.0"):GetAddon("AdiBags") local L = addon.L local covenantFilter = AdiBags:RegisterFilter("Shadowlands - Covenant Items", 100, "ABEvent-1.0") ...
nilq/small-lua-stack
null
local options = { { key = "StartingResources", name = "Starting Resources", desc = "Sets storage and amount of resources that players will start with", type = "section", }, { key = "ta_exp", name = "Tech Annihilation - Experimental Options", desc = "Tech Annihilation - Experimental Opt...
nilq/small-lua-stack
null
-- myauth-test-nginx.lua -- nginx wrapper for tests local _M = {} _M.module_name = "myauth-test-nginx" _M.debug_mode = true _M.debug_rbac_info = nil function _M.set_debug_rbac_header(info) _M.debug_rbac_info = info if _M.debug_mode then print(info) end end function _M.set_auth_header(value) if _M.debug...
nilq/small-lua-stack
null
local e = require "nixio.fs" local e = require "luci.sys" m = Map("passwall") -- [[ Rule Settings ]]-- s = m:section(TypedSection, "global_rules", translate("Rule status")) s.anonymous = true s:append(Template("passwall/rule/rule_version")) --[[ o = s:option(Flag, "adblock", translate("Enable adblock")) o.rmempty = f...
nilq/small-lua-stack
null
local ffi = require('ffi') local bit = require('bit') local C = ffi.C ffi.cdef [[ // from go.h struct go_state { uint8_t board[24][32]; uint64_t hash; uint8_t size; // max 21, to limit valid positions to 512 uint8_t turn; uint8_t passed; uint8_t scored; int16_t score; // raw score ...
nilq/small-lua-stack
null
function onEvent(name, value1, value2) if name == 'Phantom Puppet' then if value1 == '0' then doTweenY('ppoooooppppp', 'poop', -20, 1, 'linear') elseif value1 == '1' then doTweenY('ppoooooppp', 'poop', -220, 1, 'linear') end end end --MatPat event but lol --Scott Cawt...
nilq/small-lua-stack
null
return Def.ActorFrame{ OffCommand=function(s) if ddrgame == "max_" then s:stopeffect():sleep(0.2):linear(0.4):zoom(0) end end, Def.Sprite{ Condition=ddrgame == "max_", Texture=THEME:GetPathG("_difficulty","cursor/"..ddrgame.."cursor P1"), InitCommand=function(s) s:diffuse(Alpha(Color.Black,0.5)) en...
nilq/small-lua-stack
null
Config = { GridSize = 4, MaxTrains = 12, MinDistance = 500.0, -- Between trains. MaxRetries = 8, Models = { `freight`, `freightcar`, `freightcar2`, `freightcont1`, `freightcont2`, `freightgrain`, `freighttrailer`, `metrotrain`, `tankercar`, }, Fronts = { [`metrotrain`] = true, [`freight`] =...
nilq/small-lua-stack
null
-- | capitalize | Makes the first character uppercase, and the rest lowercase return function(text) return text:sub(1, 1):upper() .. text:sub(2):lower() end
nilq/small-lua-stack
null
-- Tiny JSON Encoder in Pure Lua -- -- @copyright 2020 LiosK -- @license Apache-2.0 local json = { _VERSION = "1.0.1" } function json.encode(value) local encoder = json["encode_" .. type(value)] or json.encode_other return encoder(value) end function json.encode_nil(value) return "null" end function json.enco...
nilq/small-lua-stack
null
data:extend({ { type = "recipe-category", name = "hw-brewery" }, { type = "assembling-machine", name = "hw-brewery", icon = "__homeworld-reloaded__/graphics/icons/brewery.png", icon_size = 32, flags = { "player-creation", "placeable-player" }, ...
nilq/small-lua-stack
null
slot2 = "BaseModuleCcsCheckBox" BaseModuleCcsCheckBox = class(slot1) BaseModuleCcsCheckBox.onCreationComplete = function (slot0) slot4 = AbstractSelectedComponent ClassUtil.extends(slot2, slot0) slot0._modelPropertySetter = nil slot0._modelPropertyGetter = nil slot0._modelPropertySignal = nil end BaseModuleCcs...
nilq/small-lua-stack
null
--- -- @author wesen -- @copyright 2019 wesen <wesen-ac@web.de> -- @release 0.1 -- @license MIT local BaseClientOutput = require("AC-ClientOutput/ClientOutput/BaseClientOutput") local ClientOutputTableRenderer = require("AC-ClientOutput/ClientOutput/ClientOutputTable/ClientOutputTableRenderer") --- -- Represents a ou...
nilq/small-lua-stack
null
--[[ The MIT License (MIT) Copyright (c) 2019 Loïc Fejoz 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
-- bullet -- created on 2021/8/24 -- author @zoloypzuo local WidgetSimple = require("ui.widget_simple") return WidgetSimple("Bullet")
nilq/small-lua-stack
null
function gameoverscreeninit() gameovertime = 30 end function gameoverscreenshow() --Flip state booleans gamestate__playstate = false gamestate__gameoverstate = true -- Play the gameover sound if not gamestate__gameoverstategood then sfx(7) end -- reset the player playerpowerreset() --Stop al...
nilq/small-lua-stack
null
Event.on_init(function(event) global.xiuxian = global.xiuxian or {} global.xiuxian.Level = global.xiuxian.Level or {} global.xiuxian.usedAge = global.xiuxian.usedAge or {} global.xiuxian.chenghao = global.xiuxian.chenghao or {} end) --Event.on_load(function(event) -- global.xiuxian = global.xiuxi...
nilq/small-lua-stack
null
----------------------------------- -- Area: Southern San d'Oria -- NPC: Kueh Igunahmori -- Guild Merchant NPC: Leathercrafting Guild -- !pos -194.791 -8.800 13.130 230 ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/shop"); require("scripts/globals/conquest"); local I...
nilq/small-lua-stack
null
--[[ Vultaic::Addon::PM --]] local function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() ...
nilq/small-lua-stack
null
local seeker = {} seeker.name = "seeker" seeker.depth = -199 seeker.nodeLineRenderType = "line" seeker.texture = "characters/monsters/predator73" seeker.nodeLimits = {1, -1} seeker.placements = { name = "seeker" } return seeker
nilq/small-lua-stack
null
Weapon.PrettyName = "FN FAL" Weapon.WeaponID = "m9k_fal" Weapon.DamageMultiplier = 0.8 Weapon.WeaponType = WEAPON_PRIMARY
nilq/small-lua-stack
null
dofile("common.inc"); dofile("settings.inc"); local stoneCoords = { {0, -20}, {15, -20}, {-15, -20}, {0, -35}, {30, -20}, {-30, -20}, {45, -20}, {-45, -20}, {15, -35}, {-15, -35}, {0, -50}, {30, -35}, {-30, -35}, {45, -35}, {-45, -35}, {15, -50}, {-15, -50}, {30...
nilq/small-lua-stack
null
--- -- @section shop util.AddNetworkString("TTT2CreditTransferUpdate") local function RerollShop(ply) if GetGlobalBool("ttt2_random_team_shops") then ResetRandomShopsForRole(ply:GetSubRole(), GetGlobalInt("ttt2_random_shop_items"), true) else UpdateRandomShops({ply}, GetGlobalInt("ttt2_random_shop_items"), fals...
nilq/small-lua-stack
null
function arrayContains(array, value) for _, entry in ipairs(array) do if entry == value then return true end end return false end function arrayMax(array) max = nil for _, entry in ipairs(array) do if not (entry == "none") then if max == nil or entry ...
nilq/small-lua-stack
null
#!/usr/bin/env tarantool local test = require("sqltester") test:plan(3) -- gh-3231: make sure that there is no redundant OP_Goto at the -- start of VDBE program. In other words OP_Init jumps exactly to -- the next opcode (i.e. opcode with address 1). -- test:do_execsql_test( "explain-1.0", [[ CREATE TA...
nilq/small-lua-stack
null
--------------------------------- -- GLOBAL VARIABLES --------------------------------- local WIDGET_START_X = 0 local WIDGET_START_Y = 0 local WIDGET_START_GAUGEX = WIDGET_START_X + 8 local WIDGET_START_GAUGEY = WIDGET_START_Y + 12 local WIDGET_WIDTH = 34 local WIDGET_HEIGHT = 27 local OFFSET = (WIDGET_WIDTH - 4) / 5 ...
nilq/small-lua-stack
null
local vector = require 'vector' local luaunit = require('luaunit') TestConstruct = {} function TestConstruct:testEmptyVector() luaunit.assertEquals(tostring(vector:new()), "{nil}") end function TestConstruct:test1LengthVector() luaunit.assertEquals(tostring(vector:new(1)), "{1}") end function TestC...
nilq/small-lua-stack
null
--[[ Copyright 2019 Manticore Games, Inc. 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, publish, ...
nilq/small-lua-stack
null
AddCSLuaFile( "cl_init.lua" ) -- Make sure clientside AddCSLuaFile( "shared.lua" ) -- and shared scripts are sent. include('shared.lua') function ENT:UpdateTransmitState() return TRANSMIT_ALWAYS end
nilq/small-lua-stack
null
-- Copyright 2021 SmartThings -- -- 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 or agreed to in ...
nilq/small-lua-stack
null
client_script { 'blips.lua' }
nilq/small-lua-stack
null
--------------------------------------------------------------------------- -- -- This file is part of the Corona game engine. -- For overview and more information on licensing please refer to README.md -- Home page: https://github.com/coronalabs/corona -- Contact: support@coronalabs.com -- ---------------------------...
nilq/small-lua-stack
null
-- for backwards compatibility return require "openssl.pkey"
nilq/small-lua-stack
null
--Copyright © 2020, Lili --All rights reserved. --Redistribution and use in source and binary forms, with or without --modification, are permitted provided that the following conditions are met: -- * Redistributions of source code must retain the above copyright -- notice, this list of conditions and the foll...
nilq/small-lua-stack
null
require('stdlib.handle.__all') require('abilities') require('stdlib.hookutils') require('unitevents.generic') --- Returns the difference between two points. function math.distance(x0, y0, x, y) local deltaX,deltaY = x-x0,y-y0 return math.sqrt(deltaX*deltaX + deltaY*deltaY) end stdlib = {} function stdlib....
nilq/small-lua-stack
null
--- Microexpansion network -- @type network -- @field #table controller_pos the position of the controller -- @field #number power_load the power currently provided to the network -- @field #number power_storage the power that can be stored for the next tick local network = { power_load = 0, power_storage = 0 } micro...
nilq/small-lua-stack
null
----------------------------------- -- Area: Port San d'Oria -- NPC: Cherlodeau -- Involved in Quest: Lure of the Wildcat (San d'Oria) -- !pos -20 -4 -69 232 ----------------------------------- require("scripts/globals/quests") ----------------------------------- function onTrade(player, npc, trade) end function onT...
nilq/small-lua-stack
null
ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) TriggerEvent('es:addGroupCommand', 'blip', 'admin', function(source, args, user) TriggerClientEvent('esx_jb_radars:ShowRadarBlip', source) end) TriggerEvent('es:addGroupCommand', 'rmblip', 'admin', function(source, args, user) Trigger...
nilq/small-lua-stack
null
local K, C, L = unpack(select(2, ...)) local Module = K:GetModule("Announcements") local _G = _G local string_format = _G.string.format local GetTime = _G.GetTime local lastTimePet = 0 local lastTimePlayer = 0 local healthPercent = 35 function Module:SetupHealthAnnounce() if (UnitAffectingCombat("pet") and (UnitHea...
nilq/small-lua-stack
null
-- Setup lspconfig. local cmplsp_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp") if not cmplsp_ok then return end local illu_ok, illuminate = pcall(require, "illuminate") if not illu_ok then return end local status_ok, lspstatus = pcall(require, "lsp-status") if not status_ok then return end local inst_ok, inst...
nilq/small-lua-stack
null
bright_night = {} -- engine const local SUNLIGHT = 15 -- mod config local night_light = math.max(math.min(tonumber(minetest.settings:get("bright_night_light")) or 4, 15), 3) local auto = minetest.settings:get_bool("bright_night_auto", true) local dawn = ({0.1979, 0.2049, 0.2118, 0.2170, 0.2216, 0.2259, 0.2299, 0.2339...
nilq/small-lua-stack
null
--[[ KahLua KonferPUG - an open roll loot distribution helper for PUGs. WWW: http://kahluamod.com/kpug SVN: http://kahluamod.com/svn/konferpug IRC: #KahLua on irc.freenode.net E-mail: cruciformer@gmail.com Please refer to the file LICENSE.txt for the Apache License, Version 2.0. Co...
nilq/small-lua-stack
null
function clone_many_times(net, T) local clones = {} local params, gradParams if net.parameters then params, gradParams = net:parameters() if params == nil then params = {} end end local paramsNoGrad if net.parametersNoGrad then paramsNoGrad = net:par...
nilq/small-lua-stack
null
--====================================================================-- -- corovel/luacrypto.lua -- -- create Corona-esque crypto interface -- -- Documentation: http://docs.davidmccuskey.com/ --====================================================================-- --[[ The MIT License (MIT) Copyright (c) 2014-2015 ...
nilq/small-lua-stack
null
--[[ Filename: MySQLHandlerS.lua Author: Multi, Sam@ke --]] MySQLHandlerS = {} function MySQLHandlerS:constructor(parent) mainOutput("MySQLHandlerS was loaded.") self.coreClass = parent self.queryAttemps = -1 self.typ = "mysql" self.database = getDBName() self.host = getDBHost() self.username = getDBUserna...
nilq/small-lua-stack
null
-- grabbed from the rojo plugin: https://github.com/rojo-rbx/rojo/blob/master/plugin/src/Components/FitText.lua local ReplicatedStorage = game:GetService("ReplicatedStorage") local TextService = game:GetService("TextService") local common = ReplicatedStorage.common local util = common.util local lib = ReplicatedStorag...
nilq/small-lua-stack
null
list.Set("DesktopWindows","Advanced Calculator", { title = "Calculator", icon = "icon64/advcalc.png", init = function( icon, providedwindow ) BuildAdvCMenu() providedwindow:Close() end }) local disttop = 23 local dispy = 50 AdvCalc = AdvCalc or { Ans = 0, M = 0, A = 0, B = 0, C = 0, D = 0, E = 0, F = 0, G = ...
nilq/small-lua-stack
null
ENT.Type = "anim" ENT.Base = "gmod_wire_ramcard_proxybase" ENT.PrintName = "Proxy (24 Values / 100U)" ENT.Author = "Free Fall" ENT.Contact = "" ENT.Information = "A Proxy RAM-Card" ENT.Category = "RAM-Cards (Wire)" ENT.Spawnable = true ENT.AdminSpawnable = true
nilq/small-lua-stack
null
PayConfig = {}; --商品列表id PayConfig.eGoodsListId = { MarketGold = 1; --商城银币商品信息 MarketVip = 2; --商城VIP商品信息 MarketProp = 3; --商城道具商品信息 MarketHot = 4; --商城促销商品信息 (2.0没用了) MarketCrystal = 12; --商城金条商品信息 Broken = 5; --破产商品 HallPlus = 6; --快捷支付大厅加号 RoomPay = 7; --快捷支付房间内 (这个列表会根据gameid 和 level而变化...
nilq/small-lua-stack
null
-- Copyright 2015 Daniel Dickinson <openwrt@daniel.thecshore.com> -- Licensed to the public under the Apache License 2.0. local m, s, o local nixio = require "nixio" require "luci.util" m = Map("nut_server", translate("Network UPS Tools (Server)"), translate("Network UPS Tools Server Configuration")) s = m:section...
nilq/small-lua-stack
null
--[[ A library providing advanced list support and better optimizations for list-based operations. ]] _libs = _libs or {} _libs.lists = true _libs.tablehelper = _libs.tablehelper or require 'tablehelper' _raw = _raw or {} _raw.table = _raw.table or {} list = {} _meta = _meta or {} _meta.L = {} _meta.L.__index = fun...
nilq/small-lua-stack
null
local lib = {} local function get_settings_path() return emu.subst_env(manager.machine.options.entries.homepath:value():match('([^;]+)')) .. '/autofire' end local function get_settings_filename() return emu.romname() .. '.cfg' end local function initialize_button(settings) if settings.port and settings.mask and s...
nilq/small-lua-stack
null
function onCreate() -- background shit makeLuaSprite('sky3', 'sky3', -600, -300); setScrollFactor('sky3', 0.9, 0.9); makeLuaSprite('ground', 'ground', -650, 600); setScrollFactor('ground', 0.9, 0.9); scaleObject('ground', 1.1, 1.1); makeLuaSprite('trees', 'trees', -500, -300); setScrollFactor('trees', 1.3, 1...
nilq/small-lua-stack
null
id = 'V-38460' severity = 'low' weight = 10.0 title = 'The NFS server must not have the all_squash option enabled.' description = 'The "all_squash" option maps all client requests to a single anonymous uid/gid on the NFS server, negating the ability to track file access by user ID.' fixtext = [=[Remove any instances of...
nilq/small-lua-stack
null
local mt = FindMetaTable("Player") // Overwrite default IsAdmin to return whether the player meets the hierarchial requirement for at least one rank local isadmin = mt.IsAdmin function mt:IsAdmin() local ourHeir = self:getHierarchy() // Find the admin rank and determine if its set hierarchy is lte for rankid, inf...
nilq/small-lua-stack
null
require 'torch' require 'optim' require 'nn' -- {corn, fertilizer, insecticide} data = torch.Tensor{ {40, 6, 4}, {44, 10, 4}, {46, 12, 5}, {48, 14, 7}, {52, 16, 9}, {58, 18, 12}, {60, 22, 14}, {68, 24, 20}, {74, 26, 21}, {80, 32, 24} } ninputs = 2; noutputs = 1; model = ...
nilq/small-lua-stack
null
local discordia = require("discordia") local Date, Time = discordia.Date, discordia.Time local function isOwnerAuthored(msg) return msg.author == msg.client.owner end local function isBotAuthored(msg) return msg.author == msg.client.user end local function canBulkDelete(msg) return msg.id > (Date() - Time.fromWeeks...
nilq/small-lua-stack
null
-- This file is subject to copyright - contact swampservers@gmail.com for more information. net.Receive("PonyCfg", function(len) local ply = net.ReadEntity() local cfg = net.ReadTable() if IsValid(ply) then PPM_SetPonyCfg(ply, cfg) end end) net.Receive("PonyInvalidate", function(len) loca...
nilq/small-lua-stack
null
local childprocess = require('childprocess') local core = require('core') local stream = require('stream') local Process = core.Emitter:extend() function Process:initialize() self._uv_process = nil self.stdin = stream.Writable:new() self.stdout = stream.Readable:new() self.stderr = stream.Readable:new() end f...
nilq/small-lua-stack
null
local o = vim.o local gl = require('galaxyline') local condition = require('galaxyline.condition') local gls = gl.section gl.short_line_list = {'LuaTree','vista','dbui'} o.showmode = false -- Hide mode as it's provided by the plugin o.laststatus = 2 -- Show status line o.showtabline = 2 -- Show tabline local colors ...
nilq/small-lua-stack
null
require 'cairo' rex = require 'rex_pcre' utf8 = require 'utf8' w_width, w_height = 120, 100 -- Widget path path = '/home/yonigger/.config/conky/weather' -- Font f = {'Noto Sans', 13} f_err = {'lemon', 10} -- Colors text_rgba = {0.4, 0.35, 0.36, 1} sun_rgba = {0.8, 0.3, 0.2, 1} -- {1.00, 0.87, 0.50, 1} clouds_rgba =...
nilq/small-lua-stack
null
local utils = {} -- a < b local function subset_of(a, b) for name, value in pairs(a) do if b[name] ~= value then return false end end return true end -- a = b local function equal_sets(a, b) return subset_of(a, b) and subset_of(b, a) end function utils.find_obs(metric_name...
nilq/small-lua-stack
null
--[[ Copyright (c) 2012 Matthias Richter 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, publish, distribu...
nilq/small-lua-stack
null
local ShadowRocket = class("ShadowRocket", State) local bid = "com.liguangming.Shadowrocket" local pingHost = "https://www.google.com" local shadowRocketDataBase = appDataPath(bid).."/Documents/Shadowrocket.sqlite*" local ssResultFile = "/private/var/mobile/Library/Preferences/shadowrocket_result.json" local ssConfigF...
nilq/small-lua-stack
null
-- insert space = box.schema.space.create('test', { engine = 'sophia' }) index = space:create_index('primary', { type = 'tree', parts = {1, 'num'} }) sophia_dir()[1] for key = 1, 132 do space:insert({key}) end t = {} for key = 1, 132 do table.insert(t, space:get({key})) end t -- replace/get for key = 1, 132 do spac...
nilq/small-lua-stack
null
local skynet = require "skynet" local util = require "bw.util" local conf = require "conf" local opcode = require "def.opcode" local errcode = require "def.errcode" local def = require "def" local export = {} function export.js_module(str) return string.format("module.exports = %s;", str) e...
nilq/small-lua-stack
null
local ModeSelectScene = Scene:extend() ModeSelectScene.title = "Game Start" --time for a very hacky fix regarding this... --ModeSelectScene.title = "Normal Mode" current_mode = 1 current_ruleset = 1 function ModeSelectScene:new() self.menu_state = { mode = current_mode, ruleset = current_ruleset, select = "m...
nilq/small-lua-stack
null
-- This file sets up autocompletion for neovim's native lsp local lspconfig = require('lspconfig') -- This enables all the language servers I want on my system -- Change these to whatever languages you use lspconfig.rnix.setup{} lspconfig.sumneko_lua.setup{} vim.o.completeopt = "menuone,noselect" -- Autocompletion set...
nilq/small-lua-stack
null
--[[--ldoc desc @module TestViewC @author ShuaiYang Date 2018-10-15 14:37:47 Last Modified by ShuaiYang Last Modified time 2018-10-30 16:07:43 ]] local appPath = "app.demo.yangshuai" local TestViewC = class("TestViewC",cc.load("boyaa").mvc.BoyaaCtr); local TestView = require(appPath..".testView.TestVi...
nilq/small-lua-stack
null
local gl = require 'gl' local function glCallOrRun(list, callback, ...) assert(type(list) == 'table', "expected first parameter to be a table to store the list id") if list.id then gl.glCallList(list.id) else list.id = gl.glGenLists(1) gl.glNewList(list.id, gl.GL_COMPILE_AND_EXECUTE) callback(...) g...
nilq/small-lua-stack
null
local ffi = require("ffi") local Application = require("Application") local windns_ffi = require("windns_ffi") local NativeSocket = require("NativeSocket") local ws2_32 = require("ws2_32") local Stopwatch = require("StopWatch") local clock = Stopwatch(); -- DNS UDP port local IPPORT_DNS = 53; local DNSNameServer = ...
nilq/small-lua-stack
null
require "src/core/arrays" local feature = {} feature.__index = feature function feature.new(name) local self = setmetatable({}, feature) self.id = math.random(0, 1e10) self.name = name self.cases = {} return self end local case = {} case.__index = case function case.new(feature, name, from, to...
nilq/small-lua-stack
null
local CreateReducer = require(script.Parent.Parent.Lib.Rodux).createReducer local Immutable = require(script.Parent.Parent.Lib.Immutable) local ui = CreateReducer({ areMessagesVisible = true, }, { ToggleMessagesVisibility = function(state) return Immutable.join(state, { areMessagesVisible = not state.areMessage...
nilq/small-lua-stack
null
include ("ordertypes") MapCommands.registerModdedMapCommand(OrderType.AutoTrader, { tooltip = "Auto Trader", icon = "data/textures/icons/autotrader.png", callback = "onAutoTraderPressed", }) function MapCommands.onAutoTraderPressed() MapCommands.clearOrdersIfNecessary() MapCommands.enqueueOrder("...
nilq/small-lua-stack
null
local npairs = require("nvim-autopairs") npairs.setup()
nilq/small-lua-stack
null
local skills={ {name="猴抓",info="猴子挠人",hard=1.0,tiaohe=0,type=0,suit=0,basepower=1,step=0.3,cd=0,buff="", trigger={ {name="attribute",argvs="搏击格斗,6",lv=10,},{name="powerup_quanzhang",argvs="3",lv=20,},{name="",argvs="",lv=0,}, },icon="anyingjuehunzhang",audio="音效.飙血",animation="zhua",}, {name="雕啄",info="大雕啄人",hard=1.0,...
nilq/small-lua-stack
null
elite_royal_guardian_icy_cleave = class({}) LinkLuaModifier( 'elite_royal_guardian_icy_cleave_modifier', 'encounters/elite_royal_guardian/elite_royal_guardian_icy_cleave_modifier', LUA_MODIFIER_MOTION_NONE ) function elite_royal_guardian_icy_cleave:OnSpellStart() --- Get Caster, Victim, Player, Point --- local cas...
nilq/small-lua-stack
null
-- -- THIS FILE HAS BEEN GENERATED AUTOMATICALLY -- DO NOT CHANGE IT MANUALLY UNLESS YOU KNOW WHAT YOU'RE DOING -- -- GENERATED USING @colyseus/schema 1.0.0-alpha.58 -- local schema = require 'colyseus.serialization.schema.schema' local IAmAChild = require 'test.schema.ArraySchemaTypes.IAmAChild' local ArraySchema...
nilq/small-lua-stack
null
local F, C = unpack(select(2, ...)) tinsert(C.themes["FreeUI"], function() if C.isClassic then return end ScenarioFinderFrameInset:DisableDrawLayer("BORDER") ScenarioQueueFrame.Bg:Hide() ScenarioFinderFrameInset:GetRegions():Hide() ScenarioQueueFrameRandomScrollFrame:SetWidth(304) F.Reskin(ScenarioQueueFrameF...
nilq/small-lua-stack
null
local prefix = "LLM.Sv.Detection.Lags.Anti_Multiple_Collisions."; hook.Add( "EntityTakeDamage", prefix .. "Critical_Collisions", function( ent, dmginfo ) if ( GetConVar( "llm_critical_collision_detector" ):GetInt() <= 0 ) then return; end; if ( not IsValid(ent) ) then return; end; if ( ent...
nilq/small-lua-stack
null
local require = require local grammar = require "cosmo.grammar" local interpreter = require "cosmo.fill" local loadstring = loadstring module(..., package.seeall) yield = coroutine.yield local preamble = [[ local is_callable, insert, concat, setmetatable, getmetatable, type, wrap, tostring, check_selector = ......
nilq/small-lua-stack
null
local ctx = require"luaossl.des" return ctx
nilq/small-lua-stack
null
test_run = require('test_run').new() REPLICASET_1 = { 'box_1_a', 'box_1_b' } REPLICASET_2 = { 'box_2_a', 'box_2_b' } REPLICASET_3 = { 'box_3_a', 'box_3_b' } test_run:create_cluster(REPLICASET_1, 'rebalancer') test_run:create_cluster(REPLICASET_2, 'rebalancer') util = require('util') util.wait_master(test_run, REPLICA...
nilq/small-lua-stack
null
------------- -- Imports -- ------------- local tostring = tostring local createFrame = function(index) local stringIndex = tostring(index) frame = CreateFrame("Button", "AssiduityArena" .. stringIndex, UIParent, "SecureUnitButtonTemplate") frame:SetAttribute("unit", "arena" .. stringIndex) frame:S...
nilq/small-lua-stack
null
local system = require "coutil.system" print(string.format([[ System Kernel : %s Version : %s Release : %s Platform : %s Network name : %s Temporary dir. : %s Physical memory: %12d bytes Free memory : %12d bytes Uptime : %12.4f seconds Load : %12.4...
nilq/small-lua-stack
null
--- This is a debugger command; it runs the thing into the inspect function -- @classmod InspectCommand -- region imports local class = require('classes/class') local prototype = require('prototypes/prototype') local inspect = require('functional/inspect').inspect local arg_parser = require('functional/arg_pa...
nilq/small-lua-stack
null
print("hello") os.exit(0)
nilq/small-lua-stack
null
local bin2c = require "shmuz.bin2c" local linit = [[ /* This is a generated file. */ /* ** $Id: linit.c,v 1.14.1.1 2007/12/27 13:02:25 roberto Exp $ ** Initialization of libraries for lua.c ** See Copyright Notice in lua.h */ #define linit_c #define LUA_LIB #include "lua.h" #include "lualib.h" #include "lauxlib.h...
nilq/small-lua-stack
null
ModUtil.RegisterMod("ModConfigMenu") ModConfigMenu.Menus = {} ModConfigMenu.CurrentMenuIdx = 1 function ModConfigMenu.Register(config) table.insert(ModConfigMenu.Menus, config) end ModUtil.LoadOnce(function() -- this table is intentionally not excluded from saves, so -- that mod config settings can be persiste...
nilq/small-lua-stack
null
local config = require('symbols-outline.config') local M = {} M.kinds = { "File", "Module", "Namespace", "Package", "Class", "Method", "Property", "Field", "Constructor", "Enum", "Interface", "Function", "Variable", "Constant", "String", "Number", "Boolean", "Array", "Object", "Key", "Null", "EnumMemb...
nilq/small-lua-stack
null
local function load_words(filename) local words = {} for w in io.lines(filename) do w = w:match("^%s*(%S+)") if w and #w > 0 then words[#words + 1] = w:lower() end end return words end local function reshape(mkv_chain) for ngram, transitions in pairs(mkv_chain) do local new_transitions ...
nilq/small-lua-stack
null
local A = require('utils.autogroup') A.augroups({ highlight_yank = { 'TextYankPost * silent! lua vim.highlight.on_yank{higroup="IncSearch", timeout=300}' }, set_cursor_shape = { 'VimEnter,VimResume * set guicursor=n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50' .. ',a:blinkwait700...
nilq/small-lua-stack
null