content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
local socket = require "socket"
local ssl = require "ssl"
--local apr = require "apr"
function tablelength(T)
local count = 0
for _ in pairs(T) do count = count + 1 end
return count
end
function main()
if tablelength(arg)==5 then
cert = arg[3]
local params = {
mode = "clie... | nilq/small-lua-stack | null |
local character = require "src/character"
--Should fail
function test_pick_unknown_character()
assert_error(function()
character.pick('unknown', 'base')
end, "Unknown character should fail")
end
function test_pick_unknown_costume()
assert_error(function()
character.pick('abed', 'unknown')
end, "Un... | nilq/small-lua-stack | null |
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local mod = E:GetModule('NamePlates_v1')
local LSM = E.Libs.LSM
--Lua functions
local select, unpack = select, unpack
local tinsert, tremove = tinsert, tremove
local strlower, strsplit = strlower, strsplit
local str... | nilq/small-lua-stack | null |
local M = {}
M.trim = function(s)
return s:gsub("%s+$", "")
end
return M
| nilq/small-lua-stack | null |
local gtable = require("gears.table")
local awful = require("awful")
local wibox = require("wibox")
local widget = require("util.widgets")
local beautiful = require("beautiful")
local helpers = require("helpers")
-- options
local spacing = beautiful.tasklist_spacing or dpi(4)
local align = beautiful.tasklist_align or ... | nilq/small-lua-stack | null |
-- ###############################
-- ## Project: MTA:Speedrace ##
-- ## Name: RenderGarage ##
-- ## Author: Noneatme ##
-- ## Version: 1.0 ##
-- ## License: See top Folder ##
-- ###############################
-- FUNCTIONS / METHODS --
local cFunc = {}; -- Local Functions
local cSetting = {}; -- Local Settin... | nilq/small-lua-stack | null |
local err = require("aspect.err")
local compiler_error = err.compiler_error
local quote_string = require("pl.stringx").quote_string
local config = require("aspect.config")
local utils = require("aspect.utils")
local reserved_words = config.compiler.reserved_words
local loop_keys = config.loop.keys
local tag_type = conf... | nilq/small-lua-stack | null |
require('plugins.install-plugins')
require('plugins.gruvbox')
require('plugins.lualine')
require('plugins.indent-blankline')
require('plugins.telescope')
require('plugins.nvim-lspconfig')
require('plugins.rust-tools')
require('plugins.nvim-cmp')
require('plugins.nerdcommenter')
require('plugins.treesitter')
require('pl... | nilq/small-lua-stack | null |
local config_dbg_core = slc.config("SL_CPC_DEBUG_SYSTEM_VIEW_LOG_CORE_EVENT")
local config_dbg_endpoint = slc.config("SL_CPC_DEBUG_SYSTEM_VIEW_LOG_ENDPOINT_EVENT")
if config_dbg_core.value == "1" and not slc.is_provided("segger_systemview") then
validation.error(
"Segger System View is required when SL_CPC_DEBUG_SY... | nilq/small-lua-stack | null |
local args = {...}
local done_command = args[1]
print('Running tests')
local status = dfhack.run_command('ai', 'validate')
if status == CR_OK then
print('test passed: df-ai:validate')
else
dfhack.printerr('test errored: df-ai:validate: status=' .. tostring(status))
end
local f = io.open('test_status.json', '... | nilq/small-lua-stack | null |
function Recipe.OnGiveXP.Woodwork3(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.Woodwork, 3);
end
function Recipe.OnGiveXP.Woodwork5(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.Woodwork, 5);
end
function Recipe.OnGiveXP.Woodwork10(recipe, ingredients, result, player)
... | nilq/small-lua-stack | null |
local runtime = {}
-- Restarts Hammerspoon (calling hs.reload())
runtime.restart = function (message)
hs.alert.show(message or "Restarting Hammerspoon...")
-- Give some time for alert to show up before reloading
hs.timer.doAfter(0.1, hs.reload)
end
local globals = {}
-- Guards an object from garbage collection... | nilq/small-lua-stack | null |
-- local on_attach = function(client)
-- require'completion'.on_attach(client)
-- end
local M = {}
local root_pattern = require("lspconfig/util").root_pattern
function M.setup()
-- lsp
require("lspconfig").rust_analyzer.setup({
cmd = { DATA .. "/lsp_servers/rust/rust-analyzer" },
-- cmd = {... | nilq/small-lua-stack | null |
local Start = {}
Start.scriptName = "OriginalStart"
Start.defaultConfig = {
START_ON_DOCK = false,
CLEAN_ON_UNLOAD = true,
CHANGE_CONFIG_SPAWN = true
}
Start.defaultData = {
chargenPlayers = {}
}
Start.config = DataManager.loadConfiguration(Start.scriptName, Start.defaultConfig)
Start.data = DataMan... | nilq/small-lua-stack | null |
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA)
combat:setArea(createCombatArea(AREA_WAVE4, AREADIAGONAL_WAVE4))
function onGetFormulaValues(player, level, maglevel)
local min = (level / 5) + (maglevel * 0.81) + 4
local max =... | nilq/small-lua-stack | null |
minpac.add('tomtom/tcomment_vim', {type = 'opt'})
| nilq/small-lua-stack | null |
local utils = require "typesystem_utils"
-- Type string of a type declaration built from its parts for error messages
function typeDeclarationString( this, typnam, args)
local rt = (this == 0 or not this)
and typnam
or (typedb:type_string(type(this) == "table"
and this.t... | nilq/small-lua-stack | null |
Letters = Def.ActorFrame{}
for i=1,72 do
Letters[#Letters+1] = Def.ActorFrame{
Def.ActorFrame{
OnCommand=function(self)
_G['GG'..i]=self
end;
Def.ActorFrame{
OnCommand=function(self)
_G['His'..i]=self
end;
LoadActor("testfont 8x16")..{
OnCommand=function(self)
self:SetTextureFiltering(false);
_... | nilq/small-lua-stack | null |
-- Tests for spell checking with 'encoding' set to "utf-8".
local helpers = require('test.functional.helpers')(after_each)
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
local clear, feed_command, expect = helpers.clear, helpers.feed_command, helpers.expect
local write_file, call = helpers.w... | nilq/small-lua-stack | null |
function read_file(file)
local input = io.open(file, 'r')
if input ~= nil then
io.input(input)
local content = io.read()
io.close(input)
return content
end
return nil
end
prev_address = ''
prev_value = ''
while true do
address = read_file('address.txt')
value... | nilq/small-lua-stack | null |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf/protobuf"
local CUSTOMBATTLESTATE_PB = require("CustomBattleState_pb")
local CUSTOMBATTLETYPE_PB = require("CustomBattleType_pb")
module('CustomBattleConfig_pb')
CUSTOMBATTLECONFIG = protobuf.Descriptor();
local CUSTOMBATTLECONFIG_TAGTYPE_F... | nilq/small-lua-stack | null |
--[[
TheNexusAvenger
Manages inventories for players.
--]]
local CHARACTER_ARMOR_SLOTS = {
"Head",
"Body",
"Legs",
}
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ReplicatedStorageProject = require(ReplicatedStorage:WaitForChild("Projec... | nilq/small-lua-stack | null |
data:add_type {
name = "dialog",
fields = {
{
name = "nodes",
type = types.map(types.string, types.any) -- TODO
}
}
}
data:add {
_type = "elona_sys.dialog",
_id = "ignores_you",
nodes = {
__start = {
text = {
{"talk.ignores_you", args = functio... | nilq/small-lua-stack | null |
function InitServer()
slot2 = "server"
slot0 = getCSVField(slot1)
end
return
| nilq/small-lua-stack | null |
---------------------------------------------------------------
-- EasyMotion.lua: Combo shortcuts for targeting
---------------------------------------------------------------
-- Creates a set of combinations for different pools of units,
-- in order to alleviate targeting. A healer's delight.
-- Thanks to Yoki for o... | nilq/small-lua-stack | null |
slot0 = class("SecondSummaryPage3", import(".SummaryAnimationPage"))
slot0.OnInit = function (slot0)
setActive(slot0._tf:Find("propose_panel"), slot0.summaryInfoVO.isProPose)
setActive(slot0._tf:Find("un_panel"), not slot0.summaryInfoVO.isProPose)
if slot0.summaryInfoVO.isProPose then
slot2 = slot0._tf:Find("pro... | nilq/small-lua-stack | null |
local Nskin = {}
-- [1.] Button Redirects
-- Defining on which direction the other directions should be based on
-- This will let us use less files which is quite handy to keep the noteskin directory nice
-- Do remember this will Redirect all the files of that Direction to the Direction its pointed to
-- Here, we're ... | nilq/small-lua-stack | null |
--- Library for using a Rnr content based bus.
-- @module rnr_client
-- @alias device
local M = {}
--- Initialize and starts the module.
-- This is called automatically by toribio if the _load_ attribute for the module in the configuration file is set to
-- true.
-- @param conf the configuration table (see @{conf}).
... | nilq/small-lua-stack | null |
-------------------------------------------------
-- Game Setup Logic
-------------------------------------------------
include( "InstanceManager" );
include ("SetupParameters");
-- Instance managers for dynamic game options (parent is set dynamically).
g_BooleanParameterManager = InstanceManager:new("BooleanParameter... | nilq/small-lua-stack | null |
local addonName = "KibsItemLevelContinued"
local addonNamespace = LibStub and LibStub(addonName .. "-1.0", true)
if not addonNamespace or addonNamespace.loaded.Debug then return end
addonNamespace.loaded.Debug = true
local queue = {}
local printer
addonNamespace.Debug = function(...)
if printer then
... | nilq/small-lua-stack | null |
local account = require('account')
local ffi = require('ffi')
local list = require('list')
local string = require('string')
local settings = require('settings')
local table = require('table')
local ui = require('core.ui')
local world = require('world')
local state = require('mv.state')
local mv = require('mv... | nilq/small-lua-stack | null |
-- This script is ran when the user is running a local app/sandbox
local share = teverse.construct("guiTextBox", {
parent = teverse.coreInterface,
size = guiCoord(0, 60, 0, 16),
position = guiCoord(0.5, -65, 1, -16),
strokeRadius = 2,
text = "Share",
textAlign = "middle",
textSize = 12
})
... | nilq/small-lua-stack | null |
---@diagnostic disable: lowercase-global, undefined-global
package.path = '../moontale-unity/Packages/com.hmilne.moontale/Runtime/?.lua;' .. package.path
before_each(function()
_G.Log = print
_text = spy.new(function() end)
_clear = spy.new(function() end)
_push = spy.new(function() end)
_pop = sp... | nilq/small-lua-stack | null |
-- file: 'thanks.lua'
-- desc: to print the list of the contributing guys
function list_iter (t)
local i = 0
local n = table.getn(t)
return function ()
i = i + 1
if i <= n then return t[i] end
end
end
helpful_guys = {
"----参与翻译----",
"buxiu", "凤舞影天", "zhang3",
"morler", "lambda", "sunlight",
"\n",
"----参与... | nilq/small-lua-stack | null |
--[[
-- 作者:左笑林
-- 日期:2017-03-02
-- 文件名:file_operation.lua
-- 版权说明:南京正溯网络科技有限公司.版权所有©copy right.
-- 本文件主要用于文件相关操作语句的扩展函数
--]]
local lfs = require("lfs")
local _M ={}
_M.__index = _M;
function _M.new()
return setmetatable({},_M)
end
function getType(path)
return lfs.attributes(path).mode
end
function getSi... | nilq/small-lua-stack | null |
-- settings for various lsp
local yamlls_settings = {
yaml = {
schemas = {
['https://json.schemastore.org/ansible-playbook'] = '*-pb.{yml,yaml}',
['http://json.schemastore.org/gitlab-ci'] = '.gitlab-ci.{yml,yaml}',
},
validate = true,
hover = true,
completion = true,
format = {
... | nilq/small-lua-stack | null |
local root = script.Parent.Parent
local PluginModules = root:FindFirstChild("PluginModules")
local Color = require(PluginModules:FindFirstChild("Color"))
local PluginEnums = require(PluginModules:FindFirstChild("PluginEnums"))
local Style = require(PluginModules:FindFirstChild("Style"))
local includes = root:FindFirs... | nilq/small-lua-stack | null |
local USER_ID = KEYS[1]
local GROUP_ID = KEYS[2]
local NOW = tonumber(KEYS[3])
local BUCKET_LIFETIME_MS = tonumber(KEYS[4])
local bucket_now = redis.call('zscore', 'bi:' .. GROUP_ID, USER_ID)
if bucket_now ~= nil and bucket_now ~= false and tonumber(bucket_now) + BUCKET_LIFETIME_MS > NOW then
redis.call('zadd', ... | nilq/small-lua-stack | null |
local ldb = require("lua-db.lua_db")
local raw = {}
-- this module contains some shortcuts for encoding/decoding raw pixel
-- data from lua-db. No headers are checked, but the string lenght must
-- must match width*height*4. The raw pixel format is always 32bpp RGBA.
-- string+dimensions to new drawbuffer
function r... | nilq/small-lua-stack | null |
object_tangible_food_generic_drink_deuterium_pyro = object_tangible_food_generic_shared_drink_deuterium_pyro:new {
}
ObjectTemplates:addTemplate(object_tangible_food_generic_drink_deuterium_pyro, "object/tangible/food/generic/drink_deuterium_pyro.iff")
| nilq/small-lua-stack | null |
require "Polycode/Scene"
class "CollisionScene" (Scene)
function CollisionScene:CollisionScene(...)
if type(arg[1]) == "table" and count(arg) == 1 then
if ""..arg[1]:class() == "Scene" then
self.__ptr = arg[1].__ptr
return
end
end
for k,v in pairs(arg) do
if type(v) == "table" then
if v.__ptr ... | nilq/small-lua-stack | null |
local ucursor = require 'luci.model.uci'.cursor()
local json = require 'luci.jsonc'
local server_section = arg[1]
local local_port = arg[3]
local host = arg[4]
local server = ucursor:get_all('vssr', server_section)
local ssr = {
server = host,
server_port = server.server_port,
local_address = '0.0.0.0',
... | nilq/small-lua-stack | null |
local BattleMemories = {};
local Players = GAMESTATE:GetHumanPlayers();
local thisTapTiming = {}
return Def.ActorFrame{
Def.Quad{--Timing
InitCommand=cmd(zoom,20;visible,false);
OnCommand=function(self)
for pn in ivalues(Players) do
thisTapTiming[pn] = {};
... | nilq/small-lua-stack | null |
---Factory API documentation
---Functions for controlling factory components which are used to
---dynamically spawn game objects into the runtime.
---@class factory
factory = {}
---loaded
factory.STATUS_LOADED = nil
---loading
factory.STATUS_LOADING = nil
---unloaded
factory.STATUS_UNLOADED = nil
---The URL identifies ... | nilq/small-lua-stack | null |
local utils = {}
function utils.get_value_or_default(table, name, default)
if table and not (table[name] == nil) then
local actual_type, expected_type = type(table[name]), type(default)
assert(
type(table[name]) == type(default),
string.format('Invalid type for "%s". Expecte... | nilq/small-lua-stack | null |
digtron.doc = {}
if not minetest.get_modpath("doc") then
return
end
local coal_fuel = minetest.get_craft_result({method="fuel", width=1, items={"default:coal_lump"}}).time
local dig_stone_count = coal_fuel/digtron.config.dig_cost_cracky
local dig_dirt_count = coal_fuel/digtron.config.dig_cost_crumbly
local dig_wood_... | nilq/small-lua-stack | null |
-- // Information
--[[
Original Thread: https://v3rmillion.net/showthread.php?tid=1140457
]]
-- // Dependencies
local CommandHandler, CommandClass = loadstring(game:HttpGet("https://raw.githubusercontent.com/Stefanuk12/ROBLOX/master/Universal/Commands/Module.lua"))()
-- // Services
local Players = game:GetService... | nilq/small-lua-stack | null |
includes("Core")
includes("StaticBuilds")
| nilq/small-lua-stack | null |
---
-- Server and client both need this for scoring event logs
-- @section Scoring
local pairs = pairs
local IsValid = IsValid
-- Weapon AMMO_ enum stuff, used only in score.lua/cl_score.lua these days
-- Not actually ammo identifiers anymore, but still weapon identifiers. Used
-- only in round report (score.lua) to... | nilq/small-lua-stack | null |
-- Borrowed this from Factorio
yatm.fluids.fluid_registry.register("yatm_refinery", "vapourized_light_oil", {
description = "Vapourized Light Oil",
groups = {
gas = 1,
vapourized = 1,
vapourized_light_oil = 1,
},
tiles = {
source = "yatm_vapourized_light_oil_source.png",
flowing = "yatm_va... | nilq/small-lua-stack | null |
do return end -- BROKEN PIECE OF SHIT! :argh: GARRRRRYYYYYYYYYYYYYY!!!!!!!!!!!!
function CatmullRomCams.SV.Save(save_data)
if not CatmullRomCams.Tracks[player.GetByID(1):UniqueID()] then return end
local SaveGameData = {} -- I'm assuming here that you can only save games in singleplayer. Tell me if I'm wrong though... | nilq/small-lua-stack | null |
local cmd = 'gcc -O0 -g -shared -fPIC ' ..
' -I /usr/include/lua5.1/ %s -o %s -llua5.1'
return function(pattern)
local codegen = require 'lpeg2c.codegen'
local c = codegen(pattern)
local tmp = os.tmpname()
local c_filename = tmp .. '.c'
local c_file = io.open(c_filename, 'w')
c_file:write(c... | nilq/small-lua-stack | null |
local has_telescope, telescope = pcall(require, "telescope")
if not has_telescope then
error("This plugin requires nvim-telescope/telescope.nvim")
end
local find = require("telescope._extensions.software-licenses.find")
local health = require("telescope._extensions.software-licenses.health")
return telescope.registe... | nilq/small-lua-stack | null |
local button1x, button1y = 1,1
local text1 = " Menu "
local button2x, button2y = 3,10
local text2 = "Shutdown"
local button3x, button3y = 4,11
local text3 = "Reboot"
local button4x, button4y = 2,3
local text4 = " Settings "
local button5x, button5y = 2,4
local text5 = " Programs "
local menu = 0
local bac... | nilq/small-lua-stack | null |
WayHandlers = require("lib/way_handlers")
local Startpoint_secure = {}
-- determine if this way can be used as a start/end point for routing
function Startpoint_secure.startpoint_secure(profile,way,result,data)
local highway = way:get_value_by_key("highway")
local tunnel = way:get_value_by_key("tunnel")
if hig... | nilq/small-lua-stack | null |
vessel=import.FlightGlobals.ActiveVessel
vdv=vessel.VesselDeltaV
currentStageNum=vessel.currentStage
function printStageMass(stageNum)
local sdv=vdv.GetStage(stageNum)
if sdv!=nil then
print("Stage "..stageNum)
print("Start Mass:"..sdv.startMass)
print("End Mass: "..sdv.endMass)
... | nilq/small-lua-stack | null |
--- Premake 5 Glasslight Ninja generator.
--- Mykola Konyk, 2021
local p = premake
local project = p.project
local config = p.config
local ninja = p.modules.ninja
ninja.project = {}
local m = ninja.project
-- Write out a build option.
function m.write_build_option(option_name, options)
if options ~= nil a... | nilq/small-lua-stack | null |
--[[
Code obtained from NovaFusion
http://nova-fusion.com/2011/04/19/cameras-in-love2d-part-1-the-basics/
--]]
local camera = {}
camera.pos = require "vector"
camera.x = 0
camera.y = 0
camera.scaleX = 1
camera.scaleY = 1
camera.rotation = 0
camera.layers = {}
function camera:set()
love.graphics.push()
love.gr... | nilq/small-lua-stack | null |
local map = require 'map'
local opts = { noremap = true, silent = true }
local telescope = require 'telescope'
telescope.setup {
extensions = {
project = {
base_dirs = {
{ path = '~/REPO', max_depth = 4 },
},
hidden_files = true, -- default: false
},
},
defaults = {
preview ... | nilq/small-lua-stack | null |
-- {% extends 'init.base_template.lua' %}
-- {% block content %}
local elixir_ls_bin = "/elixir-ls/language_server.sh"
require('lspconfig').elixirls.setup{
cmd = {elixir_ls_bin},
on_attach = on_attach,
capabilities = capabilities,
settings = {
elixirLS = {
dialyzerEnabled = false, fetchD... | nilq/small-lua-stack | null |
--local notifiedPlayerIds = {}
local md = TGNSMessageDisplayer.Create()
local exemptRookies = {}
local Plugin = {}
function Plugin:CreateCommands()
local exemptCommand = self:BindCommand( "sh_letrookiecommand", nil, function(client, playerPredicate)
local player = TGNS.GetPlayer(client)
if playerPredicate == nil... | nilq/small-lua-stack | null |
-- Copyright (c) 2018, Souche Inc.
local Object = require "utility.object"
local Array = require "utility.array"
local Function = require "utility.function"
local String = require "utility.string"
local fs = require "fs"
local inner_modules = require "test.inner_modules"
return function(name, loaded_modules)
loca... | nilq/small-lua-stack | null |
local vim, lsp = vim, vim.lsp
local M = {}
-- coc diagnostic
local function get_coc_diagnostic(diag_type)
local has_info, info = pcall(vim.api.nvim_buf_get_var, 0, 'coc_diagnostic_info')
if not has_info then return end
if info[diag_type] > 0 then return info[diag_type] end
return ''
end
-- nvim-lspcon... | nilq/small-lua-stack | null |
Test = require('connecttest')
require('cardinalities')
local events = require('events')
local mobile_session = require('mobile_session')
local mobile = require('mobile_connection')
local tcp = require('tcp_connection')
local file_connection = require('file_connection')
----------------------------------------------... | nilq/small-lua-stack | null |
local a={ssid="DoT-"..string.format("%x",node.chipid()*256):sub(0,6):upper(),pwd="",auth=false,mode=3,login="admin",pass="0000"}local function b(c,d)local e,f=pcall(sjson.encode,d)if f and file.open(c,"w")then file.write(f)file.close()end end;local function g(h)local i,f;if file.open(h,"r")then i,f=pcall(sjson.decode,f... | nilq/small-lua-stack | null |
return{
[[
猎魔词缀参考
金环
固定基底词缀: 0
获得 20 级的主动技能【猫之势】
获得 20 级的主动技能【鸟之势】
获得 20 级的主动技能【蛛之势】
获得 20 级的主动技能【蟹之势】
]],
[[
+3弓
林野猎弓
工艺: true
前缀: {range:0.5}LocalIncreaseSocketedGemLevel1
前缀: {range:1}LocalIncreaseSocketedBowGemLevel2
前缀: None
后缀: None
后缀: None
后缀: {range:1}LocalIncreasedAttackSpeed2
品质: 20
插槽: G-G-G-G-G-G
等级需求: 56... | nilq/small-lua-stack | null |
Color = {
["black"] = { 0, 0, 0 },
["red"] = { 255, 0, 0 },
["green"] = { 0, 255, 0 },
["blue "] = { 0, 0, 255 },
["white"] = { 255, 255, 255 },
["brown"] = { 165, 42, 42 },
["cyan"] = { 0, 255, 255 },
["darkblue"] = { 0, 0, 139 },
["darkred"] = { 139, 0, 0 },
["fuchsia"] = { 25... | nilq/small-lua-stack | null |
return "659282248893133858981552542523681828522955561639292843326243684738654451464864528812983483486236384754226295316487769423451437516492761664926412248718232143745964685196664973247492535328169989532682485255574712754752716319754453946863236985841323268426983528881773567817398626455458641267836443332762162749693995... | nilq/small-lua-stack | null |
-- Generated by CSharp.lua Compiler
local System = System
local DCETHotfix = DCET.Hotfix
System.namespace("DCET.Hotfix", function (namespace)
namespace.class("AMHandler_1", function (namespace)
return function (Message)
local Handle, GetMessageType
Handle = function (this, session, msg)
return... | nilq/small-lua-stack | null |
----
--
-- A hello world spreadsheet using the xlsxwriter.lua module.
--
-- Copyright 2014-2015, John McNamara, jmcnamara@cpan.org
--
local Workbook = require "xlsxwriter.workbook"
local workbook = Workbook:new("hello_world.xlsx")
local worksheet = workbook:add_worksheet()
worksheet:write("A1", "Hello world")
work... | nilq/small-lua-stack | null |
local awful = require('awful')
local naughty = require('naughty')
local util = {}
function util.client_is_valid(c)
return pcall(function () return c.valid end) and c.valid
end
function util.next_valid_client(cs)
if #cs == 0 then
return
end
local c = table.remove(cs)
if util.client_is_vali... | nilq/small-lua-stack | null |
local BenchmarkBpClass = Inherit(CppObjectBase)
function BenchmarkBpClass:Start()
self.m_TestResult = {}
-- GlueFunc
self:TestBPReflection()
self:TestGlueFunction()
self:TestDynamicMultiCast()
end
function BenchmarkBpClass:TestBPReflection( )
self:TestFunc("TestCallFunc_0param")
self:TestFunc("TestCallFunc_1par... | nilq/small-lua-stack | null |
--get the addon namespace
local addon, ns = ...
--get the config values
local cfg = ns.cfg
local barcfg = cfg.bars.bags
if not barcfg.disable then
local bar = CreateFrame("Frame","rABS_Bags",UIParent, "SecureHandlerStateTemplate")
bar:SetWidth(200)
bar:SetHeight(40)
... | nilq/small-lua-stack | null |
local t =
Def.ActorFrame {
Def.Sprite {
Texture = NOTESKIN:GetPath("_down", "tap mine underlay"),
Frames = Sprite.LinearFrames(1, 1),
InitCommand = function(self)
self:diffuseshift():effectcolor1(0.4, 0, 0, 1):effectcolor2(1, 0, 0, 1):effectclock("beat")
end
},
Def.Sprite {
Texture = NOTESKIN:GetPath("... | nilq/small-lua-stack | null |
fx_version 'cerulean'
games 'gta5'
client_scripts {
'client.lua'
}
server_scripts {
'Auth.lua',
'server.lua'
} | nilq/small-lua-stack | null |
object_draft_schematic_food_drink_rancoraid = object_draft_schematic_food_shared_drink_rancoraid:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_food_drink_rancoraid, "object/draft_schematic/food/drink_rancoraid.iff")
| nilq/small-lua-stack | null |
ESX = nil
local PlayersSelling = {}
local jagerbomb = 1
local golem = 1
local whiskycoca = 1
local rhumcoca = 1
local vodkaenergy = 1
local vodkafruit = 1
local rhumfruit = 1
local teqpaf = 1
local mojito = 1
local mixapero = 1
local metreshooter = 1
local jagercerbere = 1
TriggerEvent('esx:getSh... | nilq/small-lua-stack | null |
local setmetatable = setmetatable
local _M = {}
function _M:new(create_app, Router, Group, Request, Response)
local instance = {}
instance.router = Router
instance.group = Group
instance.request = Request
instance.response = Response
instance.fn = create_app
instance.app = nil
setmeta... | nilq/small-lua-stack | null |
local TestAssetItem = DClass("TestAssetItem", BaseComponent)
_G.TestAssetItem = TestAssetItem
function TestAssetItem:init()
self.icon = self.transform:Find("Icon"):GetComponent(typeof(Image))
local icons = {
"Icon/Head/10001",
"Icon/Head/10002",
"Icon/Head/10003",
"Icon/Buff/Buf... | nilq/small-lua-stack | null |
local actor, super = Class(Actor, "kris_lw")
function actor:init()
super:init(self)
-- Display name (optional)
self.name = "Kris"
-- Width and height for this actor, used to determine its center
self.width = 19
self.height = 37
-- Hitbox for this actor in the overworld (optional, uses wi... | nilq/small-lua-stack | null |
AddObjectCommand = Command:extends{}
AddObjectCommand.className = "AddObjectCommand"
function AddObjectCommand:init(objType, params)
self.objType = objType
self.params = params
end
function AddObjectCommand:execute()
local bridge = ObjectBridge.GetObjectBridge(self.objType)
local objectID = brid... | nilq/small-lua-stack | null |
error('shard should not be mandatory dependency')
| nilq/small-lua-stack | null |
local S = core.get_translator("wardrobe")
wardrobe.formspec_name = "wardrobe_wardrobeSkinForm"
function wardrobe.show_formspec(player, page)
local pname = player:get_player_name()
if not pname or pname == "" then return end
local page_count = math.ceil(wardrobe.skin_count / wardrobe.skins_per_page)
local page_p... | nilq/small-lua-stack | null |
--#############################################################################
--# Console HTML5 Plugin
--# (c)2018 C. Byerley (develephant)
--#############################################################################
local lib
local platform = system.getInfo("platform")
if platform == 'html5' then
lib... | nilq/small-lua-stack | null |
object_building_kashyyyk_poi_kash_shaman_ritual_fire = object_building_kashyyyk_shared_poi_kash_shaman_ritual_fire:new {
}
ObjectTemplates:addTemplate(object_building_kashyyyk_poi_kash_shaman_ritual_fire, "object/building/kashyyyk/poi_kash_shaman_ritual_fire.iff")
| nilq/small-lua-stack | null |
if (not system) then
if (not (CachesDirectory and DocumentsDirectory and ResourceDirectory and TemporaryDirectory)) then
return nil
end
local caches_path = CachesDirectory.."/lua-script.zip$?.lua;"
local documents_path = DocumentsDirectory.."/lua-script.zip$?.lua;"
local resource_path = ResourceDirectory... | nilq/small-lua-stack | null |
return {
treginifile = {
type = 'treginifile',
fields = {
create = {
ret = 'treginifile'
},
readinteger = {
ret = 'integer'
},
writeinteger = {
type = 'procedure'
}
}
}
}
| nilq/small-lua-stack | null |
--[[
General Lua Libraries for Lua 5.1, 5.2 & 5.3
Copyright (C) 2002-2018 stdlib authors
]]
--[[--
Additions to the core math module.
The module table returned by `std.math` also contains all of the entries from
the core math table. An hygienic way to import this module, then, is simply
to override the core `m... | nilq/small-lua-stack | null |
local VariationalDropout, parent = torch.class('onmt.VariationalDropout', 'nn.Module')
function VariationalDropout:__init(p)
parent.__init(self)
self.p = p or 0.5
self.train = true
if self.p >= 1 or self.p < 0 then
error('<dropout> illegal percentage, must be 0 <= p < 1')
end
self.noiseInit = torch.Ten... | nilq/small-lua-stack | null |
local LibQuest = Wheel:Set("LibQuest", 1)
if (not LibQuest) then
return
end
local LibMessage = Wheel("LibMessage")
assert(LibMessage, "LibQuest requires LibMessage to be loaded.")
local LibEvent = Wheel("LibEvent")
assert(LibEvent, "LibQuest requires LibEvent to be loaded.")
LibMessage:Embed(LibQuest)
LibEvent:Embe... | nilq/small-lua-stack | null |
return Command 'cuddle'
:setCategory 'Roleplay'
:setDesc 'Cuddles the mentioned user.'
:setAliases {'snuggles'}
:setUsage '<@user>'
:run(function(msg, args, util)
local user = msg.mentionedUsers:toArray()[1]
p(util.giphy 'cuddle')
local embed = util.Embed()
:setTitle(msg.... | nilq/small-lua-stack | null |
Config = {}
Config.Ped = {
{label='Stripteaseuse 1',type=5, hash='s_f_y_stripper_01'},
{label='Stripteaseuse 2',type=5, hash='s_f_y_stripper_02'},
{label='Stripteaseuse Fat',type=5, hash='a_f_m_fatcult_01'},
{label='Stripteaseurs 1',type=5, hash='a_m_y_musclbeac_01'},
{label='Stripteaseurs SM',type=5, hash=... | nilq/small-lua-stack | null |
local noise = love.math.noise
local function update(s, dt, camera)
if s.remaining < 0 then return end
local k = s.remaining / s.duration
local x = (noise(s.seed+0, s.remaining * s.freq) - 0.5) * 2
local y = (noise(s.seed+1, s.remaining * s.freq) - 0.5) * 2
local angle = (noise(s.seed+2, s.remaining * s.freq) - 0... | nilq/small-lua-stack | null |
--Script Name : jlp_Remove items and time selection, tracks, env depending on focus
--Author : Jean Loup Pecquais
--Description : Remove items and time selection, tracks, env depending on focus
--v1.0.0
local libPath = reaper.GetExtState("Reaper Evolution", "libPath")
if not libPath or libPath == "" then
reaper.MB... | nilq/small-lua-stack | null |
local table = require("hs/lang/table")
local TextureManager = require("hs/core/TextureManager")
local DisplayObject = require("hs/core/DisplayObject")
local Event = require("hs/core/Event")
--------------------------------------------------------------------------------
-- 単一のテクスチャを描画する為のクラスです.
--
-- @class table
-- @... | nilq/small-lua-stack | null |
-- data.lua
data.raw.item["artillery-turret"].sound =
{
filename = "__EpicArtillerySounds__/sounds/KABOOM.ogg",
volume = 1
}
data.raw.gun["artillery-wagon-cannon"].attack_parameters.sound =
{
filename = "__EpicArtillerySounds__/sounds/KABOOM.ogg",
volume = 1
}
-- integrations
require("integrations.bigger-artill... | nilq/small-lua-stack | null |
--[[
---- SettingsLib
About
| SettingsLib is a general Settings Library for every exploit-related use-case.
Project Link
| https://github.com/YieldingExploiter/Scripts/blob/main/src/glib/settings/Script.lua
Supported Environments
| Script-Ware
| Synapse-X
| Krnl
Required Functions
| readfile
| writefile
| isfile
| ... | nilq/small-lua-stack | null |
include("shared.lua")
function ENT:Initialize()
self.CanDraw = GetConVarNumber("metrostroi_drawsignaldebug")>0
for k,v in pairs(self.ValidModels) do
if v==self:GetModel() then
self.CanDraw = true
break
end
end
end
function ENT:Draw()
if not self.CanDraw then retu... | nilq/small-lua-stack | null |
function computeDistance(pt1, pt2)
local squareSum = 0
for k, v in pairs(pt1) do
squareSum = squareSum + (pt1[k]-pt2[k])*(pt1[k]-pt2[k])
end
return math.sqrt(squareSum)
end
function computeRelativeOrientation(currentPos, targetPos)
local ori
if targetPos[1]-currentPos[1] >= 0 then
... | nilq/small-lua-stack | null |
--------------------------------------------------------------------------
-- Moonshine - a Lua virtual machine.
--
-- Email: moonshine@gamesys.co.uk
-- http://moonshinejs.org
--
-- Copyright (c) 2013-2015 Gamesys Limited. All rights reserved.
--
-- Permission is hereby granted, free of charge, to any person obtaining
... | 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.