content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
local M = { } local colors = { red = "#E06C75", dark_red = "#BE5046", green = "#98C379", yellow = "#E5C07B", dark_yellow = "#D19A66", blue = "#61AFEF", purple = "#C678DD", cyan = "#56B6C2", white = "#ABB2BF", black = "#282C34", visual_black = "NONE", comment_grey = "#5C6370", gutter_fg_grey ...
nilq/small-lua-stack
null
return {'thriller','thrillerachtig','thrillerauteur','thrillerlezer','thrillerschrijfsters','thrillerschrijver','thrillergenre','thrillerdebuut','thrillerelement','thrillerclip','thracie','thrillerauteurs','thrillers','thrillerachtige','thrillerelementen','thrillerschrijvers'}
nilq/small-lua-stack
null
local Util = require('util') local Point = { } function Point.copy(pt) return { x = pt.x, y = pt.y, z = pt.z } end function Point.same(pta, ptb) return pta.x == ptb.x and pta.y == ptb.y and pta.z == ptb.z end function Point.above(pt) return { x = pt.x, y = pt.y + 1, z = pt.z, heading = pt.he...
nilq/small-lua-stack
null
return function (App) App.route( { method = "GET", path = "/API/Connections/List/", }, function (Request, Response) local Return = {} for Index, Connection in pairs(Connections) do table.insert(Return, {Id = Connection.Id}) ...
nilq/small-lua-stack
null
-- Copyright (C) 2011-2015 Anton Burdinuk -- clark15b@gmail.com -- https://tsdemuxer.googlecode.com/svn/trunk/xupnpd http.sendurl_buffer_size(32768,1); if cfg.daemon==true then core.detach() end core.openlog(cfg.log_ident,cfg.log_facility) if cfg.daemon==true then core.touchpid(cfg.pid_file) end if cfg.embedded==t...
nilq/small-lua-stack
null
local webhook = '' TriggerEvent('es:addGroupCommand', 'shotplayer', "superadmin", function(source, args, user) if webhook ~= '' then if tonumber(args[1]) ~= nil then if GetPlayerName(args[1]) ~= nil then TriggerClientEvent('chatMessage', source, "SYSTEM ", {255, 0, 0}, "Ot...
nilq/small-lua-stack
null
if not vim.g.vscode then -- 基础配置 require("basic") -- 快捷键映射 require("keybindings") -- Packer插件管理 require("plugins") -- 主题设置 require("colorscheme") -- 自动命令 require("autocmds") -- 插件配置 require("plugin-config.nvim-tree") require("plugin-config.bufferline") require("plugin-config.lualine") require("plugin-con...
nilq/small-lua-stack
null
require("config") require("framework.init") local Store = require("services.Store") -- define global module game = {} function game.startup() game.store = Store.new() game.store:addEventListener(Store.TRANSACTION_PURCHASED, game.onTransactionPurchased) game.store:addEvent...
nilq/small-lua-stack
null
-- luacheck: globals describe beforeAll expect it local noOptMatcher = function(_received, _expected) return { message = "", pass = true, } end return function() beforeAll(function() expect.extend({ scope_0 = noOptMatcher, }) end) it("SHOULD inherit from previous beforeAll", function() assert(expec...
nilq/small-lua-stack
null
local config = require "lua-url-shortener.config" describe("Test config file", function() local test_config_filename = "spec/config-sample.lua" it("should find config file", function() assert.truthy(config.file_exists(test_config_filename)) end) local test, msg = config.load_config(test_config_filename) ...
nilq/small-lua-stack
null
return { bg = '#000000', fg = '#CCCCCC', }
nilq/small-lua-stack
null
local Sewing = Class(function(self, inst) self.inst = inst self.repair_value = 1 end) function Sewing:DoSewing(target, doer) if target.components.fueled and target.components.fueled.fueltype == "USAGE" and target.components.fueled:GetPercent() < 1 then target.components.fueled:DoDelta(self.repair_...
nilq/small-lua-stack
null
--[[ LuiExtended License: The MIT License (MIT) --]] local zo_strformat = zo_strformat -- Local Damagetypes for easy use local PhysicalDamage = GetString(SI_DAMAGETYPE2) .. " Damage" -- TODO: Localize local FlameDamage = GetString(SI_DAMAGETYPE3) .. " Damage" -- TODO: Localize local ShockDamage ...
nilq/small-lua-stack
null
require("Cocos2d") local HPCounter = class("HPCounter",function() return cc.Node:create() end) function HPCounter:create() self._isBlooding = false self._num = 0 return HPCounter.new() end function HPCounter:showBloodLossNum(dmage,racetype,atack) local time = 1 local function getRandomXYZ() ...
nilq/small-lua-stack
null
local lunatest = require "lunatest" function busywait(n) n = n or 10000 for i=1,n do for j=1,n do -- no-op end end end function setup(n) -- show that test case time does not include setup busywait() end local teardown_count = 0 function teardown(n) teardown_count = teardown_co...
nilq/small-lua-stack
null
local shader = require "shader" local lovr2d = require "lovr2d" local context2d = lovr2d.newContext() local gridtex = lovr.graphics.newTexture("grid.png") gridtex:setWrap("repeat") local gridmat = lovr.graphics.newMaterial(gridtex) local gridw, gridh = gridtex:getDimensions() local gridquad = lovr2d.newQuad(-gridw, ...
nilq/small-lua-stack
null
local Cuboid = assert(foundation.com.Cuboid) local is_table_empty = assert(foundation.com.is_table_empty) local ng = Cuboid.new_fast_node_box local string_hex_escape = assert(foundation.com.string_hex_escape) local data_network = assert(yatm.data_network) minetest.register_node("yatm_data_logic:data_node_sensor", { ...
nilq/small-lua-stack
null
local template = require("nightfox.util.template") --#region Types ---@class Spec ---@field bg0 string ---@field bg1 string ---@field bg2 string ---@field bg3 string ---@field bg4 string ---@field fg0 string ---@field fg1 string ---@field fg2 string ---@field fg3 string ---@field sel0 string ---@field sel1 string ---...
nilq/small-lua-stack
null
-- If AAI is installed, update the technologies with SP0. if data.raw.technology["basic-automation"] and data.raw.technology["basic-logistics"] then require("prototypes.technology.science-pack-0-update") end
nilq/small-lua-stack
null
local RunService = game:GetService("RunService") local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Workspace = game:GetService("Workspace") local Promise = require(ReplicatedStorage.Packages.Promise) local Stitch = require(script.Parent.Parent.Parent.Parent...
nilq/small-lua-stack
null
local log = require 'goldsmith.log' local M = {} function M.run() log.toggle_debug_console() end return M
nilq/small-lua-stack
null
--Basic example for model loading, keyboad interaction, a script-based animation print("Starting Lua script for ModelViewer example") --Todo: -- Lua modules (for better organization, and maybe reloading?) -- Allow pointlights to attach to nodes -- Allow fill lights (no n-dot-l term) to hack global illum --These 9 spe...
nilq/small-lua-stack
null
--[[ Adobe Experience Manager (AEM) API Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API OpenAPI spec version: 3.2.0-pre.0 Contact: opensource@shinesolutions.com Generated by: https://openapi-generator.tech ]] --[[ Unit tests for openapi-client.model.truststore_items Automat...
nilq/small-lua-stack
null
--====================================================================-- -- dmc_lua/lua_bytearray/pack_bytearray.lua -- -- Documentation: http://docs.davidmccuskey.com/ --====================================================================-- --[[ The MIT License (MIT) Copyright (c) 2014-2015 David McCuskey Permissi...
nilq/small-lua-stack
null
require 'torch' require 'nn' require 'image' require 'densecap.DetectionModel' require 'densecap.DataLoader' local utils = require 'densecap.utils' local box_utils = require 'densecap.box_utils' local vis_utils = require 'densecap.vis_utils' --[[ Run a trained DenseCap model on images. The inputs can be any one of:...
nilq/small-lua-stack
null
object_mobile_space_comm_gotal_warlord_02 = object_mobile_shared_space_comm_gotal_warlord_02:new { } ObjectTemplates:addTemplate(object_mobile_space_comm_gotal_warlord_02, "object/mobile/space_comm_gotal_warlord_02.iff")
nilq/small-lua-stack
null
local mod = DBM:NewMod(1237, "DBM-Party-WoD", 4, 558) local L = mod:GetLocalizedStrings() mod:SetRevision(("$Revision: 13746 $"):sub(12, -3)) mod:SetCreatureID(79852) mod:SetEncounterID(1750) mod:SetZone() mod:RegisterCombat("combat") mod:RegisterEventsInCombat( "SPELL_CAST_START 163054", "SPELL_CAST_...
nilq/small-lua-stack
null
POTION.Name = "Dragon Potion" POTION.Model = "models/sohald_spike/props/potion_5.mdl" POTION.Scale = 3 POTION.Color = Color(127, 0, 0) POTION.OnDrink = function(pl) if SERVER then pl:EmitSound("npc/antlion/pain1.wav") pl:EmitSound("ambient/voices/cough" .. math.random(1, 4) .. ".wav") ...
nilq/small-lua-stack
null
function UpdateImpulsers() local x,y = 0,0 while x < width do while y < height do if GetChunk(x,y).hasimpulser then if not cells[y][x].updated and cells[y][x].ctype == 28 then if x > 1 then PullCell(x-2,y,0,false,1) end end y = y + 1 else y = y + 25 end end y = 0 x = x + 1 end ...
nilq/small-lua-stack
null
-- Copyright 2016 Marcel Haupt -- -- 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 ...
nilq/small-lua-stack
null
-- The CoolCam Siren can act as both Siren and Doorbell. -- The different modes, sounds and volume has to be set as configurations -- Please note that the configurations are not resetted to what it was before. local deviceName = "Siren" local doorbell = "dingdong" local alarm = "alarm" debug = true ---- local device...
nilq/small-lua-stack
null
describe('yaml', function() local yaml = require('wowapi.yaml') local null = require('lyaml').null describe('parse', function() it('works on empty', function() assert.Nil(yaml.parse('')) end) it('works on all types', function() local input = [[ --- bool: true number: 42 string: foo empty_s...
nilq/small-lua-stack
null
RGE_Enchantable = RGE_Item:New() function RGE_Enchantable:IsValid() return (self.bag > -1 and self.slot > -1 and self.type > -1 and not RGE.IsEmpty(self.link) and not RGE.IsEmpty(self.name) and IsItemEnchantable(self.bag, self.slot)) end function RGE_Enchantable:IsEnchantableBy(glyph) return glyph:C...
nilq/small-lua-stack
null
require("lspconfig").elixirls.setup { cmd = { DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh" }, } -- needed for the LSP to recognize elixir files (alternativly just use elixir-editors/vim-elixir) -- vim.cmd([[ -- au BufRead,BufNewFile *.ex,*.exs set filetype=elixir -- au BufRead,BufNewFile *.eex,...
nilq/small-lua-stack
null
include('shared.lua') function ENT:Draw() //self.Entity:DrawModel() RDbeamlib.BeamRender( self:GetEnt() ) end function ENT:Think() if ( CurTime() >= ( self.NextRBUpdate or 0 ) ) then RDbeamlib.UpdateRenderBounds( self:GetEnt() ) self.NextRBUpdate = CurTime() + 3 end end
nilq/small-lua-stack
null
local Promise = require(script.Parent.Parent.Promise) local AccessLayer = require(script.Parent.Layers.AccessLayer) local DocumentData = require(script.Parent.DocumentData) local stackSkipAssert = require(script.Parent.stackSkipAssert).stackSkipAssert local Document = {} Document.__index = Document function Document....
nilq/small-lua-stack
null
-- -- Copyright (c) 2018 Milos Tosic. All rights reserved. -- License: http://www.opensource.org/licenses/BSD-2-Clause -- -- https://github.com/madler/zlib local params = { ... } local ZLIB_ROOT = params[1] local ZLIB_FILES = { ZLIB_ROOT .. "*.c", ZLIB_ROOT .. "*.h" } local ZLIB_DEFINES = {} if getTargetOS() ==...
nilq/small-lua-stack
null
local tostring, tonumber, select, type, getmetatable, setmetatable, rawget = tostring, tonumber, select, type, getmetatable, setmetatable, rawget local bit = require('bit') local bnot, band, bor, bxor, lshift, rshift = bit.bnot, bit.band, bit.bor, bit.bxor, bit.lshift, bit.rshift local Types = require('types') local An...
nilq/small-lua-stack
null
return {'jus','juskom','juslepel','justeerder','justeren','justificatie','justitiabel','justitiabelen','justitie','justitieapparaat','justitieassistent','justitiebegroting','justitiebeleid','justitiedossier','justitieel','justitiekosten','justitieminister','justitiepaleis','justitiesamenwerking','justitiewoordvoerder',...
nilq/small-lua-stack
null
masks = { circle="plugin/mask/mask-Circle.fx", backgroundFilter="plugin/mask/mask-BackGroundFilter.fx", } function dgsCreateMask(texture1,texture2,settings) settings = settings or {} assert(dgsGetType(texture1) == "texture","Bad argument @dgsCreateMask at argument 1, expect texture "..dgsGetType(texture1)) local ...
nilq/small-lua-stack
null
#!/usr/bin/env lua local sys = require("sys") local sock = require"sys.sock" local thread = sys.thread assert(thread.init()) local evq = assert(sys.event_queue()) -- Scheduler local sched do sched = assert(thread.scheduler()) -- Workers assert(thread.run(sched.loop, sched)) end print("-- Timer event") loc...
nilq/small-lua-stack
null
local skynet = require "skynet" local snax = require "skynet.snax" skynet.start(function() local ps = snax.uniqueservice ("pingserver", "test queue") for i=1, 10 do ps.post.sleep(true,i*10) ps.post.hello() end for i=1, 10 do ps.post.sleep(false,i*10) ps.post.hello() end skynet.exit() end)
nilq/small-lua-stack
null
--[[ Copyright 2020 Teverse @File core/client/loader.lua @Author(s) Jay @Description Loads all open sourced components of the client. --]] print("Loaded Client") require("tevgit:core/client/debug.lua") require("tevgit:core/client/chat.lua") require("tevgit:core/client/playerList.lua") --require("tevgit...
nilq/small-lua-stack
null
--************************** -- YouBot Kuka Robot's battery -- @author Klaus Raizer -- @date 24-02-2017 -- -- Description: Controls the battery of the YouBot Kuka Robot --************************** -- Returns a list with the handles of all the recharge stations in the scene getListOfRechargeStations = function () ...
nilq/small-lua-stack
null
-- -- Please see the readme.txt file included with this distribution for -- attribution and copyright information. -- function onInit() -- REGISTER A GENERAL HANDLER ChatManager.registerRollHandler("", processDiceLanded); end --function onClose() -- UNREGISTER A GENERAL HANDLER --ChatManager.unregisterRollHan...
nilq/small-lua-stack
null
local function object(parent) local obj = {} obj.__index = parent return setmetatable(obj, obj) end local Entity = object() Entity._entity = true function Entity:__call(...) local obj = object(self) obj:call('new', ...) return obj end function Entity:extend() local cls = object(self) cls.__call = self.__call...
nilq/small-lua-stack
null
local M = {} local function make_specs(specs_name, ness) local background = vim.opt.background:get() package.loaded[specs_name] = nil if ness == nil then return require(specs_name) end vim.g[specs_name .. "_" .. background .. "ness"] = ness local specs = require(specs_name) vim.g[specs_name .. "_" .. backgrou...
nilq/small-lua-stack
null
local playerMeta = FindMetaTable("Player"); PLUGIN:SetGlobalAlias("cwDiseases"); PLUGIN.version = "r8" Clockwork.kernel:IncludePrefixed("cl_hooks.lua"); Clockwork.kernel:IncludePrefixed("sh_hooks.lua"); Clockwork.kernel:IncludePrefixed("sv_hooks.lua"); -- Called when the schema has been loaded. function PLUGIN:Clock...
nilq/small-lua-stack
null
local hello = require("plugins.HelloWorld.hello") return { name = "HelloWorld", description = "Hello World is an example Clank Plugin", version = { major = 0, minor = 1, patch = 0 }, depends = {}, events = { PLUGIN_INIT_EVENT = hello.init, PLUGIN_SHUTDOWN_EVENT = hello.shutdown, TICK_EVENT = hello.on...
nilq/small-lua-stack
null
local GameWeapon = {} GameWeapon.__index = GameWeapon function GameWeapon.create() local weapon = {} -- our new object setmetatable(weapon,GameWeapon) -- make GameWeapon handle lookup weapon.bulletCount = 20 -- initialize our object weapon.weaponChargingRate=0.02 weapon.weaponSpeed=30 ...
nilq/small-lua-stack
null
--Copyright (C) 2010 <SWGEmu> --This File is part of Core3. --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 of the License, --or (at your option) any later versio...
nilq/small-lua-stack
null
local env = environment() local l = mk_param_univ("l") local A = Local("A", mk_sort(l)) local a = Local("a", A) local b = Local("b", A) local P = Local("P", mk_arrow(A, Prop)) env = add_decl(env, mk_definition("id", {l}, Pi(A, mk_arrow(A, mk_arrow(A, Prop))), ...
nilq/small-lua-stack
null
--[[---------------------------------------------------------------------------- This file is part of Friday Night Funkin' Rewritten by HTV04 ------------------------------------------------------------------------------]] return Sprite ( love.graphics.newImage("images/GF_assets.png"), -- Automatically generat...
nilq/small-lua-stack
null
--Helper function for common use local function AddBox(panel,cmd,str) panel:AddControl("CheckBox",{Label=str, Command=cmd}) end --Helper function for common use local function AddTextBox(panel,cmd,str) panel:AddControl("TextBox",{Label=str, Command=cmd}) end local function AddSlider(panel,cmd,str,min,max,fl) ...
nilq/small-lua-stack
null
local s = splay_map() assert(s:empty()) assert(#s == 0) s:insert(10, 1) assert(not s:empty()) assert(#s == 1) assert(s:find(10) == 1)
nilq/small-lua-stack
null
--[[ _ _ ____ _ _ | | | | | _ \ | | | | |_ _ _ __ __ _| | ___| |_) |_ _ _ __ __| | | ___ _ | | | | | '_ \ / _` | |/ _ \ _ <| | | | '_ \ / _` | |/ _ \ | |__| | |_| | | | | (_| | | __/ |_) | |_| | | | ...
nilq/small-lua-stack
null
local s = require("null-ls.state") local u = require("null-ls.utils") local methods = require("null-ls.methods") local generators = require("null-ls.generators") local M = {} local postprocess = function(action) s.register_action(action) action.command = methods.internal.CODE_ACTION action.action = nil e...
nilq/small-lua-stack
null
---------------------------------------- -- Sassilization -- http://sassilization.com -- By Sassafrass / Spacetech / LuaPineapple -- Models By Jaanus ---------------------------------------- MAPS = {} MAPS.List = { "sa_orbit", "sa_exodus", "sa_olympia", "sa_stronghold", } /* Maps currently remove...
nilq/small-lua-stack
null
local encode = require 'modbus.encode' local decode = require 'modbus.decode' local ecm = require "modbus.ecm" local _M = {} local function create_header(unit) local data = encode.uint8(unit) return data end function _M.encode(pdu, req) if not pdu then return nil, 'no pdu object' end local adu = create_header...
nilq/small-lua-stack
null
-- Inspired by: -- https://blog.dutchcoders.io/openresty-with-dynamic-generated-certificates/ local ssl = require "ngx.ssl" local resty_lock = require "resty.lock" local lrucache = require "resty.lrucache" -- initialize memory caches for certs/keys. -- these lrucaches are NOT shared among nginx workers (https://githu...
nilq/small-lua-stack
null
-- A helper utility based on code by Quenty. local Maid = {} function Maid.new() local self = { _tasks = {}, } setmetatable(self, Maid) return self end function Maid:__index(key) return Maid[key] or self._tasks[key] end function Maid:__newindex(key, newTask) if rawget(self, key) or rawget(Maid, key) then ...
nilq/small-lua-stack
null
local os = require "os" local table = require "table" local process = require "luvit.process" local ibmt = require "ibmt" local odbxuv = require "odbxuv" local mq = require "koh.mq" local createQueryBuilder = require "odbxuv.queryBuilder".createQueryBuilder local setTimeout = require "luvit.timer".setTimeout local epoc...
nilq/small-lua-stack
null
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ========== PlaceObj('StoryBit', { ActivationEffects = { PlaceObj('ForEachExecuteEffects', { 'Label', "Colonist", 'Filters', { PlaceObj('HasTrait', { 'Trait', "Renegade", 'Negate', true, }), }, 'RandomPercent', 15, 'Effects', { ...
nilq/small-lua-stack
null
include( "shared.lua" ) include( "database/cl_database.lua" ) include( "datatables/minomodels.lua" ) include( "datatables/humanmodels.lua" ) include( "datatables/endgamesongs.lua" ) include( "datatables/abilities.lua" ) include( "cl_scoreboard.lua" ) include( "cl_report.lua" ) -- This gamemode was created by TB002. U...
nilq/small-lua-stack
null
return function() local isDark = require(script.Parent.isDark) it("throws if argument is not a Color3", function() expect(pcall(isDark, true)).to.equal(false) end) it("returns `false` for white", function() expect(isDark(Color3.new(1, 1, 1))).to.equal(false) end) it("returns `true` for black", fu...
nilq/small-lua-stack
null
local Root = script.Parent.Parent.Parent local CorePackages = game:GetService("CorePackages") local PurchasePromptDeps = require(CorePackages.PurchasePromptDeps) local Roact = PurchasePromptDeps.Roact local PromptState = require(Root.Enums.PromptState) local purchaseItem = require(Root.Thunks.purchaseItem) local laun...
nilq/small-lua-stack
null
-- vim: ts=2 sw=2 sts=2 et : -- Testing Nums -- (c) 2021 Tim Menzies (timm@ieee.org) unlicense.org package.path = '../src/?.lua;' .. package.path local Lib,Num=require("lib"),require("num") do local n=Num(10,"asds-") n:add {9,2,5,4,12,7,8,11,9,3,7,4,12,5,4,10,9,6,9,4} assert(n.mu == 7,"mu test") assert(3.06...
nilq/small-lua-stack
null
if UseItem(161) == true then goto label0 end; do return end; ::label0:: SetScenceMap(-2, 1, 29, 25, 0); SetScenceMap(-2, 1, 29, 24, 3698); SetScenceMap(-2, 1, 28, 24, 3696); ModifyEvent(-2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -2, -2, -2); jyx2_FixMapObject("梅庄地牢开门",1); do return end;
nilq/small-lua-stack
null
-- oUF_Simple: core/spawn -- zork, 2016 ----------------------------- -- Variables ----------------------------- local A, L = ... local oUF = L.oUF or oUF ----------------------------- -- oUF Tags ----------------------------- --add player regen to the unitless event tags oUF.Tags.SharedEvents["PLAYER_REGEN_DISABL...
nilq/small-lua-stack
null
function lang_switch_keys(lang) local in_lang = {} local langs = { [1] = {lang_key = "tr", lang_name = "Türkçe", script_name = "Satır Sil", sub_menu = "Satır/Sil"}, [2] = {lang_key = "en", lang_name = "English", script_name = "Delete Lines", sub_menu = "Lines/Delete"} } local lang_list = {} local ...
nilq/small-lua-stack
null
a = {} for i=-200, 100, 1 do a[i] = 0 end print(#a) print(a[-200]) print(a[100]) -- Matrix matrix = {} for i=1, 4 do matrix[i] = {} for j=1, 4 do matrix[i][j] = 0 end end matrix_tiny = {} xdim, ydim = 4,4 for i=1,ydim do for j=1, xdim do matrix_tiny[(i-1)*xdim+j]=0 end end -- Single List node = nil v = ...
nilq/small-lua-stack
null
env = require('test_run') test_run = env.new() engine = test_run:get_cfg('engine') -- one part indices -- int type space0 = box.schema.space.create('space0', { engine = engine }) index0 = space0:create_index('primary', { type = 'tree', parts = {1, 'INTEGER'} }) space0:insert({1, "AAAA"}) space0:insert({2, "AAAA"}) s...
nilq/small-lua-stack
null
local backgroundTexture = game.gui.getTexture("res/error_bg.png") local logoTexture = game.gui.getTexture("res/logo.png") local function onCreate(overlay, data) local menu = StackMenu:create(900, overlay, 15, "Error") menu:pad(100) menu:setBackground(backgroundTexture) local errorMessage = menu:addL...
nilq/small-lua-stack
null
--[[ * Natural Selection 2 - Combat++ Mod * Authors: * WhiteWizard * * Toggles the Combat HUD on and off during the count down sequence. * * Wrapped Functions: * 'Alien:OnCountDown' - Turns the Combat HUD off while the count down sequence is executing. * 'Alien:OnCountDownEnd' - Turns the C...
nilq/small-lua-stack
null
-- -- The agglomerative clustering algorithm. -- require 'hdf5' local agg_clustering = {} local K_c = 5 -- > indices: indice for k-nearest neighbors -- < labels: cluster labels for samples function agg_clustering.init(indices) -- initialize labels for input data given knn indices local nsamples = (#indices)[1] ...
nilq/small-lua-stack
null
------------------------------------------------------------------------------- -- Spine Runtimes Software License v2.5 -- -- Copyright (c) 2013-2016, Esoteric Software -- All rights reserved. -- -- You are granted a perpetual, non-exclusive, non-sublicensable, and -- non-transferable license to use, install, ex...
nilq/small-lua-stack
null
local if_nil = vim.F.if_nil local default_header = { type = "text", val = { -- [[⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢀⢄⢄⠢⡠⡀⢀⠄⡀⡀⠄⠄⠄⠄⠐⠡⠄⠉⠻⣻⣟⣿⣿⣄⠄⠄⠄⠄⠄⠄⠄⠄]], -- [[⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢠⢣⠣⡎⡪⢂⠊⡜⣔⠰⡐⠠⠄⡾⠄⠈⠠⡁⡂⠄⠔⠸⣻⣿⣿⣯⢂⠄⠄⠄⠄⠄⠄]], -- [[⠄⠄⠄⠄⠄⠄⠄⠄⡀⠄⠄⠄⠄⠄⠄⠄⠐⢰⡱⣝⢕⡇⡪⢂⢊⢪⢎⢗⠕⢕⢠⣻⠄⠄⠄⠂⠢⠌⡀⠄⠨⢚⢿⣿⣧⢄⠄⠄⠄⠄⠄]], -- [[⠄⠄⠄⠄⠄⠄⠄⡐⡈⠌⠄⠄⠄⠄⠄⠄⠄⡧⣟⢼⣕⢝⢬⠨⡪⡚⡺⡸⡌⡆⠜⣾⠄⠄⠄⠁⡐⠠⣐⠨⠄⠁⠹⡹⡻⣷⡕⢄...
nilq/small-lua-stack
null
draft_cm = require(GetScriptDirectory()..'/CM/handle') function Think() if (GetGameMode() == GAMEMODE_CM) then draft_cm.Handle() else print('Other mode launched, bypass') end end
nilq/small-lua-stack
null
local Locale = { list = { 'en', 'ru' }, main = 'en', __newindex = function()end -- ro } Locale.__index = Locale function Locale:get(cat, k, lang) assert(cat, 'Give category') assert(k, 'Give key') lang = lang or self.main local v = (self[lang] or {})[cat] if not v then return self[sel...
nilq/small-lua-stack
null
require "predefine" local CS = require "csharp" ------------------------------------------------------------------------------ -- command line ------------------------------------------------------------------------------ local dir = table.unpack {...} local USAGE = "regenerator.exe cs_windowskits.lua {cs_dst...
nilq/small-lua-stack
null
local function tcount(tbl) local cnt = 0 for k,v in pairs(tbl) do cnt = cnt + 1 end return cnt end return { tcount = tcount, }
nilq/small-lua-stack
null
local from_expr = require('related_files').pargen_from_expression return { -- Describe types of files by provinding a name/id, parser function and -- generator function (aka pargen). -- Alternatively for a lot of simple cases, you can use the -- 'pargen_from_expression' helper function that implements a...
nilq/small-lua-stack
null
local Object = require 'lib.classic' local squeak = require 'lib.squeak' local ParticlesComponent = squeak.components.particles local images = require 'services.images' local lg = love.graphics local Particles = Object:extend() function Particles:new() end function Particles:dust() local DUST_COUNT = 3 local p...
nilq/small-lua-stack
null
--Notifications function nadmin:Notify(...) --CLIENT version local arg = {...} local args = {} for _, a in ipairs(arg) do if isstring(a) or istable(a) then table.insert(args, a) elseif tostring(a) then table.insert(args, a) end end chat.AddText(unpack(args)) end net...
nilq/small-lua-stack
null
--[[ ä Name: Advanced Questbook By: Crypton ]] --[[ %s is a "Wild Card" character. AQB uses these to replace with data such as names of items, players, etc.. It is important not to remove them or you will receive errors. For translating, you can move them where they need to go in the sentence so the data forms ...
nilq/small-lua-stack
null
 -- German localisation by Alex6002 & LarryCurse local L = LibStub("AceLocale-3.0"):NewLocale("NauticusClassic", "deDE") if not L then return; end -- addon description L["Tracks the precise arrival & departure schedules of boats and Zeppelins around Azeroth and displays them on the Mini-Map and World Map in real-time...
nilq/small-lua-stack
null
zeta = game.Players.acb227 main = "Really black" range = 20 guard = false tor = zeta.Character.Torso bp = Instance.new("Model") bp.Parent = zeta.Character bp.Name = "Backpack Guardian is on Stand..By" script.Parent = bp hum = Instance.new("Humanoid") hum.MaxHealth = 0 hum.Parent = bp head = Instance.new("Pa...
nilq/small-lua-stack
null
include("shared.lua") function ENT:Draw() self:DrawModel() end language.Add("ent_frisbee_combat_mk2","Combat Frisbee MK2");
nilq/small-lua-stack
null
local Vargs = require 'klib/utils/vargs' local TypeUtils = require 'klib/utils/type_utils' local Event = require 'klib/event/proxy' local CHECK_POINT = { BEFORE = 1, AFTER = 2, MEET = 3 --- execute when condition meets } --- remove handler if condition meets --- arguments: table[event_id, condition, on_re...
nilq/small-lua-stack
null
local plr = game.Players.LocalPlayer local chr = plr.Character local maus = plr:GetMouse() local PGui=plr.PlayerGui local lleg = chr["Left Leg"] local rleg = chr["Right Leg"] local larm = chr["Left Arm"] local rarm = chr["Right Arm"] local hed = chr.Head local rutprt = chr.HumanoidRootPart local torso = chr.Torso local...
nilq/small-lua-stack
null
init_restriction = function() if restrictions == nil then return end for keyObj, valObj in pairs( restrictions ) do local object_n = keyObj local obj = Get_TECH_OBJECT( object_n ) if obj ~= nil then for keyM, valM in pairs( valObj ) do ...
nilq/small-lua-stack
null
-- when somthing wrong in lua scripts and a dead loop happens, we could remove this file -- by sending the command 'file.remote("init.lua")' to NodeMCU while it is booting -- in the first second! -- by leon(leonstill@163.com) 2018.12.02 ------------------------------------------------------------------------------- --...
nilq/small-lua-stack
null
--[[ Example Service This is an example to demonstrate how to use the BaseService class to implement a game service. **NOTE:** After declaring you service, you have to include your package inside the main.lua file! ]]-- require 'common' require 'services.baseservice' --Declare class ExampleServic...
nilq/small-lua-stack
null
ArrayName={} ArrayName[1] = 12 ArrayName[2] = 1 print(ArrayName[1])
nilq/small-lua-stack
null
local Boost = require 'Game.Parts.Boost' local Core = {} function Core:Attach(part) end function Core:Start(part) local boostParts = {} part:Traverse(function(p) local isBoost, type = Boost.Check(p) if isBoost then boostParts[type] = p end end) end return Core
nilq/small-lua-stack
null
--------------------------------------------------------------------- -- LuaSoap implementation for Lua. -- See Copyright Notice in license.html -- $Id: soap.lua,v 1.5 2004/11/03 13:29:51 tomas Exp $ --------------------------------------------------------------------- require"lxp.lom" local assert, ipairs, pairs, to...
nilq/small-lua-stack
null
ITEM.name = "Сундук" ITEM.desc = "Простейший деревянный сундук." ITEM.model = "models/container2.mdl" ITEM.width = 4 ITEM.height = 2 ITEM.invW = 6 ITEM.invH = 4 ITEM.locksound = "hgn/crussaria/devices/door_regular_stopclose.wav" ITEM.opensound = "hgn/crussaria/devices/door_regular_opening.wav"
nilq/small-lua-stack
null
require("config") require("framework.init") require("framework.shortcodes") require("framework.cc.init") local UIDemoApp = class("UIDemoApp", cc.mvc.AppBase) function UIDemoApp:ctor() UIDemoApp.super.ctor(self) self.scenes_ = { "TestUIPageViewScene", "TestUIListViewScene", "TestUIScro...
nilq/small-lua-stack
null
require 'nn' require 'cunn' require 'cudnn' local utils = paths.dofile'utils.lua' local model = nn.Sequential() -- building block local function Block(nInputPlane, nOutputPlane) model:add(cudnn.SpatialConvolution(nInputPlane, nOutputPlane, 3,3, 1,1, 1,1):noBias()) model:add(nn.SpatialBatchNormalization(nOutputP...
nilq/small-lua-stack
null
package.path = "../?.lua;" .. package.path local control_port = arg[1] or CONTROL_PORT or 'CNCB1' local data_port = arg[2] or DATA_PORT or 'CNCB0' local rs232 = require "rs232" local ztimer = require "lzmq.timer" local utils = require "utils" local TEST_CASE = require "lunit".TEST_CASE local out ...
nilq/small-lua-stack
null