content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
local ITEM = {};
ITEM.ID = 26;
ITEM.Reference = "drug_beer";
ITEM.Name = "Beer";
ITEM.Description = "Drink your worries away.";
ITEM.Weight = 5;
ITEM.Cost = 200;
ITEM.MaxStack = 100;
ITEM.InventoryModel = "models/props_junk/garbage_glassbottle002a.mdl";
ITEM.ModelCamPos = ... | nilq/small-lua-stack | null |
--[[
DEBUG MODULE/CLASS FOR TERMINAL OUTPUT
WHEN DEALING WITH SUBTILE BUGS AND SHIT.
FREE TO USE FOR ANYONE
HENDRIX © 3 CLAWS GAMES
--]]
-- VARIABLES --------------------------
_G.debugMode = 0
-- PUT THIS CHUNK WHERE YOU LIKE IN ANY PART OF YOUR CODE AND CLASSES, IT IS VISIBLE EVERYWHERE ---
if _G.debugMode == 1 ... | nilq/small-lua-stack | null |
require 'src/content_loss'
require 'src/texture_loss'
require 'src/tv_loss'
require 'loadcaffe'
function crop_image(content_image)
--crop content
content_image = image.scale(content_image, 1.5*params.image_size, 1.5*params.image_size, 'bilinear')
local rands = torch.rand(1)
rands = rands[1]
if rand... | nilq/small-lua-stack | null |
local nb_player_demo = {}
nb_player_demo.players = {}
nb_player_demo.rotation = 0
nb_player_demo.rotation_step = 1
nb_player_demo.rotating = false
local register_entity = minetest.register_entity
local register_node = minetest.register_node
local chat_send_all = minetest.chat_send_all
local add_entity = minetest.add_e... | nilq/small-lua-stack | null |
-- Prosody IM
-- Copyright (C) 2008-2010 Matthew Wild
-- Copyright (C) 2008-2010 Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local use_luaevent = prosody and require "core.configmanager".get("*", "use_libevent");
if use_luaevent t... | nilq/small-lua-stack | null |
---------------------------------------------------------------------------------------------------
-- Proposal:
-- https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0204-same-app-from-multiple-devices.md
-- Description:
-- Two applications was registered with different appIDs and different appName... | nilq/small-lua-stack | null |
local Sprite = require('graphics/sprites/sprite')
local defaultAvatar = nil
-- for name, otherPlaya in pairs(otherPlayers) do
-- -- UGLY piece of shit hack.
-- --print(otherPlaya.name .. ": {" .. otherPlaya.state.X .. "," .. otherPlaya.state.Y .. "}")
-- otherPlaya.state['radius_w'] = myPlayer.radius_w
-- oth... | nilq/small-lua-stack | null |
--Radio--
channel = ... --Establece una conexion con el programa principal
socket = require("socket") --Inclute la libreria para comunicaciones TCP/IP
radio = assert(socket.bind("localhost", 4532)) --Genera un servidor en la direccion "localhost" y el puerto 4532
radio:settimeout(0) --Setea el tiempo maximo de espera ... | nilq/small-lua-stack | null |
--[[
# Copyright 2001-2014 Cisco Systems, Inc. and/or its affiliates. All rights
# reserved.
#
# This file contains proprietary Detector Content created by Cisco Systems,
# Inc. or its affiliates ("Cisco") and is distributed under the GNU General
# Public License, v2 (the "GPL"). This file may also include Detector Co... | nilq/small-lua-stack | null |
CorelliaDoabaGuerfelScreenPlay = CityScreenPlay:new {
numberOfActs = 1,
screenplayName = "CorelliaDoabaGuerfelScreenPlay",
planet = "corellia",
gcwMobs = {
{"comm_operator", "specforce_technician", 3308, 308, 5485.8, 45, 0, "npc_imperial", "conversation"},
{"dark_trooper", "rebel_commando", 3173.3, 300, 5302... | nilq/small-lua-stack | null |
local st = {}
local base = (...):gsub('%.', '/') .. '/'
local duration_show_splash = .5 -- in seconds
local color_fg = {120,240,230}
local color_bg = {25,30,28}
local cell_width = 25
local cell_height = 25
local cell_spacing = 5
local callbacks = {}
function callbacks.after(f) callbacks.after = f end
-- A... | nilq/small-lua-stack | null |
-- HistArray: an array that automatically forgets its history,
-- except for a fixed number of old values.
--
-- See spec/histArray_spec.lua for tests documenting how it works.
local M = {}
local function computeActualIndexFor(key, histSize)
return ((key-1) % (histSize+1) + 1)
end
local function getAllElementsFr... | nilq/small-lua-stack | null |
text = ""
blip=false
col = {}
addEvent("onShowMoney",true)
addEventHandler("onShowMoney",root,
function ()
playSound("sound.ogg")
end
)
addEvent("addArmorCol",true)
addEventHandler("addArmorCol",root,function(my)
col = my
end)
addEventHandler( "onClientProjectileCreation", root,
function ( creator )
if col an... | nilq/small-lua-stack | null |
Locales['sv'] = {
-- Cloakroom
['cloakroom'] = 'omklädnignsrum',
['ems_clothes_civil'] = 'civilkläder',
['ems_clothes_ems'] = 'ambulanskläder',
-- Vehicles
['ambulance'] = 'ambulans',
['helicopter_prompt'] = 'tryck ~INPUT_CONTEXT~ för att komma åt ~y~helikoptergaraget~s~.',
['garage_prompt'] = 'tryck ~I... | nilq/small-lua-stack | null |
EventConst = require("view/event/EventConst")
slot0 = class("EventMediator", import("..base.ContextMediator"))
slot0.register = function (slot0)
slot0:bind(EventConst.EVEN_USE_PREV_FORMATION, function (slot0, slot1, slot2)
slot3 = getProxy(EventProxy)
slot4 = getProxy(BayProxy)
slot5 = slot4:getData()
slot6 =... | nilq/small-lua-stack | null |
local Draw = require("api.Draw")
local IUiWidget = require("api.gui.IUiWidget")
local DebugStatsHook = require("mod.tools.api.debug.DebugStatsHook")
local DebugStatsWidget = class.class("DebugStatsWidget", IUiWidget)
function DebugStatsWidget:init()
self.max_lines = 10
self.padding = 10
self.texts = {}
end
... | nilq/small-lua-stack | null |
-- vim: ts=2 sw=2 sts=2 et :
-- simple explanation/optimizer/data miner/planner
-- (c) 2021 Tim Menzies (timm@ieee.org) unlicense.org
local Lib=require("lib")
local o, oo, isa, rogues = Lib.o, Lib.oo, Lib.isa, Lib.rogues
local rand,seed = Lib.rand, Lib.seed
local add,dist,norm
local the = {data="test/data/aa",
... | nilq/small-lua-stack | null |
-- handles zombie syncing during the first frame
local zombieSync = {}
-- modules stack
local sharedData = require("BZM_ClientSharedData")
local BZM_Enums = require("BZM_Enums")
local BZM_Utils = require("BZM_Utils")
local GetSandboxOptions = getSandboxOptions
zombieSync.UpdateClientZombie... | nilq/small-lua-stack | null |
idsystem = {
servername = 'Belirsiz',
debug = false,
ids = {},
_join = function(self)
for i = 1, 5000 do
if (self.ids[i] == nil) then
slot = i
break
end
end
--[[
@define
defines player slotnumber.
]]--
self.ids[slot] = source
source:setData('playerid',slot)
exports.mrp_an... | nilq/small-lua-stack | null |
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
DEFINE_BASECLASS("base_rd3_entity")
function ENT:Initialize()
BaseClass.Initialize(self)
self.Active = 0
self.damaged = 0
self.sequence = -1
self.thinkcount = 0
self.NscoopSpeed = 0
if WireAddon ~= nil then
self.WireD... | nilq/small-lua-stack | null |
ServerModSetup("2078243581")
ServerModSetup("2321974509")
ServerModSetup("375859599")
ServerModSetup("378160973")
ServerModSetup("666155465") | nilq/small-lua-stack | null |
#!/usr/bin/env lua
if arg[1] == "-h" or arg[1] == "--help" then
io.stderr:write( [[
Usage: minos.lua [ -h | --help ]
minos.lua [ search_key1 ... ]
Lists .mino files in the current directory, satisfying conditions,
described by $1 ... $7
$1 - game type, one of "g[ame]", "p[reset]", "e[rror]" or "x" (any)
$2 - s... | nilq/small-lua-stack | null |
function lobby_load()
gamestate = "lobby"
guielements = {}
guielements.chatentry = guielement:new("input", 4, 207, 43+7/8, sendchat, "", 43)
guielements.sendbutton = guielement:new("button", 359, 207, "send", sendchat, 1)
guielements.playerscroll = guielement:new("scrollbar", 389, 3, 104, 8, 50, 0)
if SE... | nilq/small-lua-stack | null |
local MemoryAddress = {}
local memoryFunctions = {
byte = {
unsigned = {
read = memory.readbyte,
write = memory.writebyte,
},
signed = {
read = memory.readbytesigned,
write = memory.writebytesigned,
},
},
word = {
unsigned = {
read = memory.readword,
write = m... | nilq/small-lua-stack | null |
-------------------------------------------------
-- Initialize the seed for the random generator
-------------------------------------------------
math.randomseed(os.time())
-------------------------------------------------
-- Function to show the menu on the screen
-------------------------------------------------
... | nilq/small-lua-stack | null |
---
-- @class ENT
-- @section ttt_win
ENT.Type = "point"
ENT.Base = "base_point"
local string = string
---
-- @param string name
-- @param Entity|Player activator
-- @param Entity|Player caller
-- @return[default=true] boolean
-- @realm shared
function ENT:AcceptInput(name, activator, caller)
if name == "TraitorWin... | nilq/small-lua-stack | null |
local default = require 'lib.gui.default'
local ZoneClicker = require 'lib.gui.zoneClicker'
local Class=require 'lib.hc.class'
local lg = love.graphics
local CheckBox=Class{name="CheckBox"}
local cbSize=10
function CheckBox:construct(label)
self.label=label
local lw = default.font:getWidth(label)
loca... | nilq/small-lua-stack | null |
client = nil
service = nil
cPcall = nil
Pcall = nil
Routine = nil
GetEnv = nil
origEnv = nil
logError = nil
--// Anti-Exploit
return function()
local _G, game, script, getfenv, setfenv, workspace,
getmetatable, setmetatable, loadstring, coroutine,
rawequal, typeof, print, math, warn, error, pcall,
xpcall, s... | nilq/small-lua-stack | null |
local Readable, super = Class(Event)
function Readable:init(text, x, y, width, height)
super:init(self, x, y, width or TILE_WIDTH, height or TILE_HEIGHT)
self.solid = false
self.text = text or {}
end
function Readable:onInteract(player, dir)
self.world:startCutscene(function(cutscene)
for _,... | nilq/small-lua-stack | null |
local AddPrefabPostInit = AddPrefabPostInit
GLOBAL.setfenv(1, GLOBAL)
local remove_table = {
seeds = TUNING.PERISH_SUPERSLOW,
lightbulb = TUNING.PERISH_FAST,
roe = TUNING.PERISH_FAST
}
local function add_prefab_post_init(prefab, perish_time)
AddPrefabPostInit(prefab, function(inst)
if inst.com... | nilq/small-lua-stack | null |
local line_ok, lualine = pcall(require, "lualine")
if not line_ok then
return
end
local settings = {
options = {
disabled_filetypes = { "NvimTree" },
globalstatus = true,
theme = 'gruvbox'
},
}
lualine.setup(settings)
| nilq/small-lua-stack | null |
local _2afile_2a = "fnl/conjure/remote/transport/bencode/init.fnl"
local _1_
do
local name_4_auto = "conjure.remote.transport.bencode"
local module_5_auto
do
local x_6_auto = _G.package.loaded[name_4_auto]
if ("table" == type(x_6_auto)) then
module_5_auto = x_6_auto
else
module_5_auto = {}... | nilq/small-lua-stack | null |
-- -*- mode: lua; tab-width: 2; indent-tabs-mode: 1; st-rulers: [70] -*-
-- vim: ts=4 sw=4 ft=lua noet
----------------------------------------------------------------------
-- @author Daniel Barney <daniel@pagodabox.com>
-- @copyright 2015, Pagoda Box, Inc.
-- @doc
--
-- @end
-- Created : 2 June 2015 by Daniel Barne... | nilq/small-lua-stack | null |
package.path = package.path..";../?.lua"
local ffi = require("ffi")
local lz4 = require("lz4_ffi")()
local testutils = require("testutils")()
local rand = math.random
local MESSAGE_MAX_BYTES = 1024;
local RING_BUFFER_BYTES = 1024 * 8 + MESSAGE_MAX_BYTES;
local DECODE_RING_BUFFER = RING_BUFFER_BYTES + ME... | nilq/small-lua-stack | null |
_ENV=namespace "ui"
---暂时不写这里
---@class EquipmentUpdateUI
local EquipmentUpdateUI=class "EquipmentUpdateUI" {
super(cc.Layer);
super(LUIObject);
}
function EquipmentUpdateUI:EquipmentUpdateUI(item)
self.item=item
end | nilq/small-lua-stack | null |
RegisterClientScript()
WEAPON.Cooldown = 0.5
WEAPON.Scale = 0.6
WEAPON.Sprite = "emmentalibur.png"
WEAPON.SpriteOrigin = Vec2(40, 284) * WEAPON.Scale
WEAPON.WeaponOffset = Vec2(20, -60) -- This should not be here
WEAPON.Animations = {
{"attack", 0.3}
}
WEAPON.AttackMode = WeaponAttackType.SingleShotRepeat
RegisterCl... | nilq/small-lua-stack | null |
/*
* @package : rlib
* @author : Richard [http://steamcommunity.com/profiles/76561198135875727]
* @copyright : (C) 2020 - 2020
* @since : 3.0.0
* @website : https://rlib.io
* @docs : https://docs.rlib.io
*
* MIT License
*
* THE SOFTWARE IS PROVIDED "AS IS",... | nilq/small-lua-stack | null |
keeses = {}
function spawnKeese()
local keese = {}
repeat
keese.x = multiple16(love.math.random(16,256))
keese.y = multiple16(love.math.random(72,224))
until checkLayer('Ground_layer', map:convertPixelToTile(keese.x-8, keese.y-8)) == 'dungeon_brick'
repeat
keese.vectorX = math... | nilq/small-lua-stack | null |
-- youtube-upnext.lua
--
-- Fetch upnext/recommended videos from youtube
-- This is forked/based on https://github.com/jgreco/mpv-youtube-quality
--
-- Diplays a menu that lets you load the upnext/recommended video from youtube
-- that appear on the right side on the youtube website.
-- If auto_add is set to true (defa... | nilq/small-lua-stack | null |
local irc = {
created = "2016-07-17",
description ="IRC client protocol implementation",
copyright = "Sebastian Cato",
license = "ISC License",
}
-- Grammar for RFC1459 2.3.1 (-ish...)
local lpeg = require "lpeg"
local crlf = lpeg.P("\r")^0 * "\n"
local SPACE = lpeg.P(" ")^1
local nonwhite = (1 - lpeg.S(" \0\r... | nilq/small-lua-stack | null |
return {
summary = 'Update a specific attribute of a single vertex in the Mesh.',
description = 'Set the components of a specific attribute of a vertex in the Mesh.',
arguments = {
{
name = 'index',
type = 'number',
description = 'The index of the vertex to update.'
},
{
name =... | nilq/small-lua-stack | null |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf/protobuf"
local RISKGRIDINFO_PB = require("RiskGridInfo_pb")
local RISKBOXINFO_PB = require("RiskBoxInfo_pb")
module('RiskOneMapInfo_pb')
RISKONEMAPINFO = protobuf.Descriptor();
local RISKONEMAPINFO_GRIDS_FIELD = protobuf.FieldDescriptor();... | nilq/small-lua-stack | null |
--[[
Name: firestation.lua
For: SantosRP
By: Ultra
]]--
local MapProp = {}
MapProp.ID = "firestation"
MapProp.m_tblSpawn = {
{ mdl = 'models/props/cs_office/offinspc.mdl',pos = Vector('4864.771484 13699.506836 154.706558'), ang = Angle('0.000 179.995 0.000') },
{ mdl = 'models/props/cs_office/computer_caseb.mdl',... | nilq/small-lua-stack | null |
local runCheck = require('./index')
require('tap')(function (test)
test("TCP port 80", function (expect)
runCheck({
id = 42,
target = "howtonode.org",
family = "inet4",
module = "tcp",
timeout = 10000,
}, {
port = 80,
send_body = "GET / HTTP/1.0\r\n" ..
... | nilq/small-lua-stack | null |
resource_manifest_version "05cfa83c-a124-4cfa-a768-c24a5811d8f9"
file 'vw_prop_vw_tables.ytyp'
data_file 'DLC_ITYP_REQUEST' 'vw_prop_vw_tables.ytyp'
| nilq/small-lua-stack | null |
local WantedIA_Status = fivem_roleplay_core._wanted_ia
AddEventHandler('five_roleplay_core:change_status')
RegisterNetEvent('five_roleplay_core:change_status', function(arg)
WantedIA_Status = arg
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if not WantedIA_Status then
... | nilq/small-lua-stack | null |
local tween_service = game:GetService('TweenService')
local lighting = game:GetService('Lighting')
task.spawn(function()
while true do
local tween = tween_service:Create(lighting, TweenInfo.new(1, Enum.EasingStyle.Linear), { ClockTime = (lighting.ClockTime + .1) })
tween:Play()
tween.Completed:Wait()
end
end) | nilq/small-lua-stack | null |
local Data = require("core.Data")
local Item = require("core.Item")
local Rand = require("core.Rand")
local chara_drop = {}
function chara_drop.create(chara, drop)
if drop.on_create then
drop.on_create({chara = chara})
elseif drop.id then
Item.create(chara.position, drop.id)
else
local args... | nilq/small-lua-stack | null |
local http = require('http')
local totalBytes = 0
local function start(port, address)
console.time('http')
local req
req = http.get('http://' .. address .. ':' .. port, function(res, err)
console.log('error', err)
res:on('data', function(data)
-- print('data', #data, totalByte... | nilq/small-lua-stack | null |
net.Receive("OpenSugMenu", function()
local f = vgui.Create("DFrame")
f:SetSize(ScrW() / 2, ScrH() / 2)
f:Center()
f:MakePopup()
f:SetTitle(" ")
f:ShowCloseButton(false)
function f:Paint(w, h)
draw.RoundedBox(0, 0, 0, w, h, Color(236, 240, 241, 255));
draw.RoundedBox(0, 0, 0, w, 20, Color(192, 57, 43, 255));... | nilq/small-lua-stack | null |
module = {}
print("Load RGBW")
ws2812.init()
local maxled = 15
local bright = 50
buff = ws2812.newBuffer(maxled, 4)
buffer_white = ws2812.newBuffer(maxled, 4)
buffer_green = ws2812.newBuffer(maxled, 4)
buffer_yellow = ws2812.newBuffer(maxled, 4)
buffer_red = ws2812.newBuffer(maxled, 4)
buff:fill(0, 0, 0, 10)
buff... | nilq/small-lua-stack | null |
--[[-------------------------------------------------------------------------
Copyright 2017 - 2021 viral32111
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/LIC... | nilq/small-lua-stack | null |
include "StarVFS/core/project.lua"
include "StarVFS/svfs/project.lua"
include "OrbitLogger/src/library.lua"
include "libSpace/src/library.lua"
| nilq/small-lua-stack | null |
local wezterm = require("wezterm")
return {
font = wezterm.font("JetBrains Mono"),
color_scheme = "Dracula",
window_background_opacity = 0.9,
enable_tab_bar = false,
}
| nilq/small-lua-stack | null |
GoldSave = {
["诗雨筱零_纳克萨玛斯::Horde"] = {
["show"] = true,
["name"] = "诗雨筱零",
["gold"] = 513527115,
},
}
| nilq/small-lua-stack | null |
Task.Wait(1)
function Tick(dt)
local brickPieces = script:FindDescendantsByName("Emissive")
for _, piece in pairs(brickPieces) do
local newColor = piece:GetColor() * 0.85
piece:SetColor(newColor)
end
end | nilq/small-lua-stack | null |
local finished = {}
local g = require "global"
function finished:draw()
love.graphics.setColor(255, 255, 255)
g.world.draw()
g.camera:draw(function()
g.player:draw()
end)
love.graphics.printf("Well, you've finished what's in the game right now. Sorry to disappoint. " ..
"Hopefully yo... | nilq/small-lua-stack | null |
local Q = require 'Q'
local make_dt = require 'Q/ML/DT/lua/make_dt'
local ml_utils = require 'Q/ML/UTILS/lua/ml_utils'
local JSON = require 'Q/ML/UTILS/lua/JSON'
local extract_goal = require 'Q/ML/UTILS/lua/extract_goal'
local check_extract_goal = require 'Q/ML/DT/lua/check_extr... | nilq/small-lua-stack | null |
vim.o.background = 'dark'
vim.cmd([[colorscheme gruvbox]])
vim.cmd([[highlight Normal guibg=none]])
vim.cmd([[highlight NoText guibg=none]])
| nilq/small-lua-stack | null |
--[[
module: FilterManager
author: DylanYang
time: 2021-02-25 11:47:02
idea:
advance:
]]
local FilterChain = require("patterns.j2ee.interceptingFilter.FilterChain")
local _M = Class("FilterManager")
local public = _M.public
_M.filterChain = nil
function _M:ctor(target)
self.filterChain = ... | nilq/small-lua-stack | null |
-- @module lib.modes.modes
local modes = {}
modes.ecb = require('lib.modes.ecb')
return modes
| nilq/small-lua-stack | null |
----------------------------------------
--
-- Copyright (c) 2015, Hadriel Kaplan
--
-- author: Hadriel Kaplan <hadrielk@yahoo.com>
--
-- This code is licensed under the MIT license.
--
-- Version: 1.0
--
------------------------------------------
-- prevent wireshark loading this file as a plugin
if not _G['pcapng_te... | nilq/small-lua-stack | null |
--[ require 'json' ]--
function table_print(tt, indent, done)
local done = done or {}
local indent = indent or 0
local space = string.rep(" ", indent)
if type(tt) == "table" then
local sb = {}
for key, value in pairs(tt) do
table.insert(sb, space) -- indent it
if type (value) == "tab... | nilq/small-lua-stack | null |
CaerdonBattlePet = {}
CaerdonBattlePetMixin = {}
--[[static]] function CaerdonBattlePet:CreateFromCaerdonItem(caerdonItem)
if type(caerdonItem) ~= "table" or not caerdonItem.GetCaerdonItemType then
error("Usage: CaerdonBattlePet:CreateFromCaerdonItem(caerdonItem)", 2)
end
local itemType = CreateFromMixins(Cae... | nilq/small-lua-stack | null |
local LspDefinition = require("refactoring.lsp")
local Query = require("refactoring.query")
local test_utils = require("refactoring.tests.utils")
describe("Lsp Definition", function()
it("should get the name next for the definition.", function()
vim.cmd(":e ./lua/refactoring/tests/lsp_utils_test_file.ts")
... | nilq/small-lua-stack | null |
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Knit = require(ReplicatedStorage.Packages.Knit)
local Loader = require(ReplicatedStorage.Packages.Loader)
Knit.AddControllers(ReplicatedStorage.Common.Controllers)
Loader.LoadChildren(ReplicatedStorage.Common.Components)
Knit.Start()
:andThen(fun... | nilq/small-lua-stack | null |
require 'torch'
require 'nn'
require 'nngraph'
require 'cutorch'
require 'cunn'
require 'cudnn'
cmd = torch.CmdLine()
cmd:text()
cmd:text('Convert a GPU torch net to CPU torch net.')
cmd:text()
cmd:text('Options')
cmd:argument('-model', 'GPU model checkpoint to convert')
cmd:text()
-- parse input params
local opt = c... | nilq/small-lua-stack | null |
--------------------------------
-- @module RelativeBox
-- @extend Layout
-- @parent_module ccui
--------------------------------
--
-- @function [parent=#RelativeBox] initWithSize
-- @param self
-- @param #size_table size
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @o... | nilq/small-lua-stack | null |
local Configuration = require(script.Parent.Parent.Configuration)
local Roact = Configuration.Roact
local RoactAnimate = Configuration.RoactAnimate
local SHEET_ASSETS = {
[1] = "rbxassetid://1330514658";
[2] = "rbxassetid://1330515143";
[3] = "rbxassetid://1330573324";
[4] = "rbxassetid://1330573609";
... | nilq/small-lua-stack | null |
require 'audio'
npy4th = require 'npy4th'
local sound = audio.load(arg[1])
if sound:size(2) > 1 then sound = sound:select(2,1):clone() end
sound:mul(2^-23)
sound = sound:view(1, 1, -1, 1)
sound = sound:resize(1, 1, 22050*20, 1)
npy4th.savenpy(arg[2], sound)
| nilq/small-lua-stack | null |
--Taiidan
supplyLimit("Frigate", 39);
supplyLimit("Carrier", 4);
supplyDesc("Battlecruiser", "HeavyCruiser"); | nilq/small-lua-stack | null |
local function generateCommandHelp(message)
local channel = message.channel
local commandList = {}
local embed = {
title = ":question: "..locale("help.embedTitle"),
description = locale("help.embedDescription"),
fields = {}
}
local categories = {}
local fields = {}
fo... | nilq/small-lua-stack | null |
AzVote = AzVote or {}
AZVOTE_STATE_NONE = 0
AZVOTE_STATE_VOTING = 1
AZVOTE_STATE_CHANGING = 2
function AzVote:Exclude( ply )
for k, item in pairs(self.VoteTable) do
for kk, _ply in pairs(item) do
if (ply == _ply) then
table.remove(item, kk)
end
end
end
end
function AzVote:GetState()
... | nilq/small-lua-stack | null |
object_tangible_collection_reward_damind_crystal_reward = object_tangible_collection_reward_shared_damind_crystal_reward:new {
}
ObjectTemplates:addTemplate(object_tangible_collection_reward_damind_crystal_reward, "object/tangible/collection/reward/damind_crystal_reward.iff")
| nilq/small-lua-stack | null |
local class = require 'middleclass'
local TTransport = require 'thrift.transport.TTransport'
local TBufferedTransport = class('TBufferedTransport', TTransport)
function TBufferedTransport:initialize(trans)
TTransport.initialize(self)
assert(trans)
self.trans = trans
self.rBufSize = 2048
self.wBufSize = 2048... | nilq/small-lua-stack | null |
print(mk_expr_placeholder())
print(mk_level_placeholder())
assert(is_placeholder(mk_expr_placeholder()))
assert(not is_placeholder(Var(0)))
assert(not is_placeholder(Const("A")))
assert(is_placeholder(mk_level_placeholder()))
assert(not is_placeholder(param_univ("l")))
local f = Const("f")
local a = Const("a")
assert(h... | nilq/small-lua-stack | null |
local M = {}
---Get the highlight groups for the plugin
---@param theme table
---@return table
function M.get(theme)
return {
-- https://github.com/lukas-reineke/indent-blankline.nvim/blob/caf7f61e94525bbd97e32f118efd6c0722430616/doc/indent_blankline.txt#L31
IndentLine = { fg = theme.colors.indentl... | nilq/small-lua-stack | null |
function sleep(n)
os.execute("sleep "..n)
end
function string_split(str, split_char)
local sub_str_tab = {};
while (true and str~="" ) do
local pos = string.find(str, split_char)
if (not pos) then
sub_str_tab[#sub_str_tab + 1] = str
break;
end
local ... | nilq/small-lua-stack | null |
local compiler = require("l2l.compiler")
local reader = require("l2l.reader")
local version = "0.0.2-pre"
local loadstring = _G["loadstring"] or _G["load"]
local paired_options = {eval=true, load=true, compile=true}
local single_options = {repl=true, help=true, version=true}
local aliases = {r="repl", e="eval", l="l... | nilq/small-lua-stack | null |
local moonshine = require 'moonshine'
kAngularVelocityEpsilon = 1e-1
kTurningAngularImpulse = 5
kThrusterForce = 12
kStabilizeAngularDamping = 4
kRopeLength = 100
kCameraEpsilon = 1
kMapWidth = 100
kMapHeight = 75
kSectorWidth = 20
kSectorHeight = 15
kAverageAsteroidSize = 24
kAsteroidSizeJitter = 12
kHookRadius = 3
k... | nilq/small-lua-stack | null |
describe("test set_current_journal()", function()
local lfs = require("lfs")
local pl = require"pl.import_into"()
-- Setup mock vim module before we require deardiary modules
_G.vim = require("mock.vim")
local journal_path = pl.path.join(lfs.currentdir(), "tmp", "journal2")
local deardiary = ... | nilq/small-lua-stack | null |
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
ESX.RegisterServerCallback('pz_armario:getPlayerDressing', function(source, cb)
local xPlayer = ESX.GetPlayerFromId(source)
TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store)
local count = store.c... | nilq/small-lua-stack | null |
FAdmin.StartHooks["00RCon"] = function()
FAdmin.Access.AddPrivilege("RCon", 3)
FAdmin.Commands.AddCommand("RCon", "<command>", "<args>")
FAdmin.ScoreBoard.Server:AddServerAction("RCon", "fadmin/icons/rcon", Color(155, 0, 0, 255), function() return FAdmin.Access.PlayerHasPrivilege(LocalPlayer(), "RCon") end,
f... | nilq/small-lua-stack | null |
local SetWalkSpeedCommand = {
Id = "SetWalkSpeed",
Aliases = { "walkspeed", "ws" },
Description = "Updates the WalkSpeed property on players' humanoids.",
Args = {
{
Type = "players",
Name = "Players",
Description = "The players to update"
},
{
Type = "number",
Name = "Walk speed",
Descript... | nilq/small-lua-stack | null |
local event = require("event")
local entity = require("entity")
local sprite = require("sprite")
local room = require("room")
local resource = require("resource")
local ai = require("ai")
local transform = require("transform")
local M = {}
local staff = {}
M.new = function (type)
local id = entity.new(STATE_PLAY)... | nilq/small-lua-stack | null |
//mapvote config
local function SetupDefaultConfig()
local DefaultConfig = { }
DefaultConfig.kRoundEndDelay = 2
DefaultConfig.kVoteStartDelay = 8
DefaultConfig.kVotingDuration = 30
DefaultConfig.kMapsToSelect = 7
DefaultConfig.kDontRepeatFor = 4
DefaultConfig.kVoteNotifyDelay = 6
DefaultConfig.kVoteChangeDelay... | nilq/small-lua-stack | null |
--dofile(minetest.get_modpath("christmas_craft").."/mods.lua")--disabled because 4seasons is not installed
dofile(minetest.get_modpath("christmas_craft").."/crafts.lua") --temporary disabled because cristmas is over--
if minetest.setting_getbool("is_winter") then
dofile(minetest.get_modpath("christmas_craft").."/setti... | nilq/small-lua-stack | null |
EventPrefix = GetCurrentResourceName()..":" | nilq/small-lua-stack | null |
--[[--------------------------------------------------------------------
Grid
Compact party and raid unit frames.
Copyright (c) 2006-2009 Kyle Smith (Pastamancer)
Copyright (c) 2009-2016 Phanx <addons@phanx.net>
All rights reserved. See the accompanying LICENSE file for details.
https://github.com/Phanx/Grid
htt... | nilq/small-lua-stack | null |
PLUGIN.name = "Business Restriction"
PLUGIN.desc = "Restricts Business"
PLUGIN.author = "Zadkiel"
function PLUGIN:CanPlayerUseBusiness(client, uniqueID)
return client:IsAdmin()
end | nilq/small-lua-stack | null |
function _G.run(...)
local arg={...}
print(arg[1])
if #arg>1 then
local cmd = table.concat(arg, ' ').."\n"
vim.fn.chansend(vim.g.current_terminal_job_id,cmd)
else
vim.fn.chansend(vim.g.current_terminal_job_id,arg[1].."\n")
end
end
vim.cmd[[
augroup terminal
au!
au TermOpen * command! -nargs=+... | nilq/small-lua-stack | null |
local DialogEx = {
Active = false,
HasTooltip = false,
}
DialogEx.__index = DialogEx
local keywordsTest = {
["Mods"] = "Mods are tools that make the game better.",
["The Red Prince"] = "Super cool origin guy.",
}
---@class KeywordData:table
---@field StartPos integer
---@field EndPos integer
---@field Tooltip str... | nilq/small-lua-stack | null |
return {
name = "dns.oszx.co",
label = _("OSZX DNS - UK"),
resolver_url = "https://dns.oszx.co/dns-query",
bootstrap_dns = "51.38.83.141,2001:41d0:801:2000::d64",
help_link = "https://dns.oszx.co/#mdoh",
help_link_text = "OSZX.co"
}
| nilq/small-lua-stack | null |
UNIT_NAME_FONT_KOREAN = "Fonts\\2002B.TTF"
UNIT_NAME_FONT_CHINESE = "Fonts\\ARKai_T.ttf"
UNIT_NAME_FONT_CYRILLIC = "Fonts\\FRIZQT___CYR.TTF"
UNIT_NAME_FONT_ROMAN = "Fonts\\FRIZQT__.TTF"
| nilq/small-lua-stack | null |
local QuestState = _G.QuestState;
QuestState.UI = {}; -- interface
local ui = {}; -- table of frames, labels, buttons, ...
----------------------------------- UTILITY ------------------------------------
local function TableFind(t, val)
for k, v in pairs(t) do
if(val == v) then
return k;
end;
end;
return ... | nilq/small-lua-stack | null |
---@meta
--=== touch ===
---@class touch
---@field TOUCH_TRIGGER_BELOW number
---@field TOUCH_TRIGGER_ABOVE number
---@field TOUCH_LVOLT_0V4 number
---@field TOUCH_LVOLT_0V5 number
---@field TOUCH_LVOLT_0V6 number
---@field TOUCH_LVOLT_0V7 number
---@field TOUCH_HVOLT_2V4 number
---@field TOUCH_HVOLT_2V5 number
---@f... | nilq/small-lua-stack | null |
--------------------------------
-- @module Stream
-- @extend Ref
-- @parent_module audio
---@class audio.Stream:cc.Ref
local Stream = {}
audio.Stream = Stream
--------------------------------
---
---@param path string
---@return audio.Stream
function Stream:createFromFile(path)
end
--------------------------------... | nilq/small-lua-stack | null |
ix.log.AddType("cardLog", function(client, ...)
local arg = {...}
if (arg[2] and #arg[2] > 0) then
return L("%s %s %s.", client:Name(), arg[1], arg[2])
else
return L("%s %s.", client:Name(), arg[1])
end
end)
| nilq/small-lua-stack | null |
ardour {
["type"] = "EditorAction",
name = "Rename Regions For Sample Library",
license = "MIT",
author = "David Healey",
description = [[Rename selected regions to aid exporting samples]]
}
function factory ()
local rename_regions_input_values --Persistent variable (session lifespan)
retur... | nilq/small-lua-stack | null |
local RPX = nil
Citizen.CreateThread(function()
Citizen.Wait(1)
exports["Library"]:AddHook(GetCurrentResourceName(), function(library)
RPX = library
if RPX.IsLoaded then
PlayerLoaded()
end
end)
end)
RegisterNetEvent('rpx:playerLoaded')
AddEventHandler('rpx:pla... | nilq/small-lua-stack | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.