content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
local _, ts_utils = pcall(require, 'nvim-treesitter.ts_utils')
local configs = require'nvim-treesitter.configs'
local M = {}
M.tbl_filetypes = {
'html', 'javascript', 'typescript', 'javascriptreact', 'typescriptreact', 'svelte', 'vue', 'tsx', 'jsx'
}
M.tbl_skipTag = {
'area', 'base', 'br', 'col', 'command', 'e... | nilq/small-lua-stack | null |
ActorPlayer = {
speed=3.5,
color1={242, 190, 101, 255},
color2={148, 84, 20, 255},
color3={36, 130, 15, 255},
color4={47, 40, 89, 255},
playerImage='fem_char'
}
| nilq/small-lua-stack | null |
-- hdf5-udf simple_vector.h5 simple_vector.lua Simple.lua:2000:float
function dynamic_dataset()
local udf_data = lib.getData("Simple.lua")
local udf_dims = lib.getDims("Simple.lua")
print("udf_dims=" .. udf_dims[1])
local N = udf_dims[1]
for i=1, N do
udf_data[i] = i-1
end
end
| nilq/small-lua-stack | null |
local day23 = require("day23")
describe("day23", function()
describe("Part 1", function()
it("should work for the sample input", function()
assert.are.equal(92658374, day23.part1("389125467", 10))
assert.are.equal(67384529, day23.part1("389125467", 100))
end)
it("should work for the real input", function... | nilq/small-lua-stack | null |
--[[FDOC
@id CharaTppIntelObject
@category Script Character
@brief 情報ギミック
]]--
--[[ 配置スクリプト
Command.StartGroup()
local locator = Command.CreateData( Editor.GetInstance(), "ChCharacterLocatorData" )
local params = Command.CreateEntity( "TppGadgetLocatorParameter" )
local objectCreator = Command.CreateEntity( "TppG... | nilq/small-lua-stack | null |
module("kinfo", package.seeall)
setfenv(1, getfenv(2));
kinfo = kinfo or {}
kinfo.enabled = false
kinfo.colors = kinfo.colors or {}
function kinfo:doInfo()
local param = kinstall.params[1]
if param == 'color' then
local cmd = table.concat(kinstall.params, ' ', 2)
if string.trim(cmd) == '' then
cecho... | nilq/small-lua-stack | null |
local lazy = require("bufferline.lazy")
---@module "bufferline.ui"
local ui = lazy.require("bufferline.ui")
---@module "bufferline.pick"
local pick = lazy.require("bufferline.pick")
---@module "bufferline.config"
local config = lazy.require("bufferline.config")
---@module "bufferline.constants"
local constants = lazy.r... | nilq/small-lua-stack | null |
ix.faction = ix.faction or {}
ix.faction.teams = ix.faction.teams or {}
ix.faction.indices = ix.faction.indices or {}
local CITIZEN_MODELS = {
"models/humans/group01/male_01.mdl",
"models/humans/group01/male_02.mdl",
"models/humans/group01/male_04.mdl",
"models/humans/group01/male_05.mdl",
"models/humans/group01/... | nilq/small-lua-stack | null |
local FirstNames = { "Hudson", "Jordan", "Austin", "Nathan", "Alex", "Hayden", "John", "Jasper", "Boris", "Horace", "Morris", "Doris", "Julian", "Nate", "Seth", "Luca", "Jackson", "Isaac", "David", "Matthew", "Thomas", "Sam", "Oscar", "Timothy", "Anthony", "Archer", "Christian", "Bailey", "Jayden", "Michael", "Brodie",... | nilq/small-lua-stack | null |
local numbershers = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"}
local frameX = 10
local frameY = 45
local active = false
local whee
local spacingY = 20
local textzoom = 0.35
local ActiveSS = 0
local SSQuery = {}
SSQuery[0] = {}
SSQuery[1] = {}
local frameWidth = capWideScale(360, 400)
local frameHeig... | nilq/small-lua-stack | null |
require "mods"
require "playerprofile"
require "playerdeaths"
require "saveindex"
require "map/extents"
local LOAD_UPFRONT_MODE = false
local MainScreen = nil
if PLATFORM == "PS4" then
MainScreen = require "screens/mainscreen_ps4"
else
MainScreen = require "screens/mainscreen"
end
-- Always on broadcasting widge... | nilq/small-lua-stack | null |
-- Bob's Functions Library mod
seablock.overwrite_setting('bool-setting', 'bobmods-library-technology-cleanup', false)
seablock.overwrite_setting('bool-setting', 'bobmods-library-recipe-cleanup', true)
| nilq/small-lua-stack | null |
require('prototypes/picker')
require('prototypes/renamer')
require('prototypes/zapper')
require('prototypes/tools')
| nilq/small-lua-stack | null |
--[[
Process sequence with command-line arguments.
]]
return
function(self, args)
local options = self:parse_args(args)
--[[
<options> is map of records {type: <>, value: <>}.
<result> should be map of values.
]]
local result = {}
for key, rec in pairs(options) do
result[key] ... | nilq/small-lua-stack | null |
AddCSLuaFile();
SWEP.Base = "weapon_coi_grenade";
SWEP.PrintName = "Trick Bag";
SWEP.HoldType = "grenade";
SWEP.ViewModel = "models/weapons/c_grenade.mdl";
SWEP.WorldModel = "";
SWEP.UseHands = false;
SWEP.NoDraw = true;
SWEP.Primary.Ammo = "trickbag";
SWEP.Primary.ClipSize = 1;
SWEP.Primary.DefaultClip = 1;
SWEP.Pr... | nilq/small-lua-stack | null |
--# selene: allow(unused_variable)
---@diagnostic disable: unused-local
-- This submodule allows you to create observers for accessibility elements and be notified when they trigger notifications. Not all notifications are supported by all elements and not all elements support notifications, so some trial and error wi... | nilq/small-lua-stack | null |
--- Make interpolation curves
-- A good place to generate and test these out: http://cubic-bezier.com/
-- Based upon https://gist.github.com/gre/1926947#file-keyspline-js
-- @module BezierFactory
local lib = {}
function lib.BezierFactory(P1x, P1y, P2x, P2y)
-- Same as CSS transition thing.
assert(P1x, "[BezierFact... | nilq/small-lua-stack | null |
----
-- @file Sound
---- Brief description.
-- <#Description#>
-- @return <#return value description#>
function Sound:calculateSerializeBufferSize()
end
---- Brief description.
-- <#Description#>
-- @param dataBuffer <#dataBuffer description#>
-- @param serializer <#serializer description#>
-- @return <#return valu... | nilq/small-lua-stack | null |
--[[
Disrupt Pirate Attack
NOTES:
- First, easy mission for LOTW
ADDITIONAL REQUIREMENTS TO DO THIS MISSION:
- Take it off the mission board. It should be persistent like the black market mission.
ROUGH OUTLINE
- Go to a sector.
- Pirates are there.
- Kill them al... | nilq/small-lua-stack | null |
BlacksmithingMaterials = {
[808] = {level = "1 - 14"}, -- iron ore
[5413] = {level = "1 - 14"}, -- iron ingot
[5820] = {level = "16 - 24"}, -- high iron ore
[4487] = {level = "16 - 24"}, -- steel ingot
[23103] = {level = "26 - 34"}, -- orichalcum ore
[23107] = {level = "26 - 34"}, -- orichalcu... | nilq/small-lua-stack | null |
local Combination = {
-- Note: combinations are put in alphabetical order (ex AltCtrl not CtrlAlt)
None = 0,
Shift = 1,
Ctrl = 2,
CtrlShift = 3,
Alt = 4,
AltShift = 5,
AltCtrl = 6,
AltCtrlShift = 7,
Meta = 8,
-- Expand to have Meta combinations if needed
}
local function get(shift, ctrl, alt, meta)
-- retur... | nilq/small-lua-stack | null |
class "LazyUtility"
Callback.Add("Load", function() LazyUtility:OnLoad() end)
function LazyUtility:OnLoad()
self.Nudes =
{
Sexy = "https://i.imgur.com/swMci7o.png",
Rainbows = "https://i.imgur.com/oeDGue7.png",
bilgewaterCutlass = "https://i.imgur.com/IREFNf6.png",
Botrk = "https://i.imgur.com/tVOUUBN.... | nilq/small-lua-stack | null |
XYZBadges.Config.Badges = {}
-- Whitelisted badges
--XYZBadges.Config.Badges["police"] = {name = "Police Officer", desc = "Has been whitelisted for PD", icon = "police"}
--XYZBadges.Config.Badges["ems"] = {name = "EMS", desc = "Has been whitelisted for EMS", icon = "ems"}
--XYZBadges.Config.Badges["fbi"] = {name = "F... | nilq/small-lua-stack | null |
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
ENT.WireDebugName = "Door Controller"
function ENT:Initialize()
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self.Inputs = WireLib.CreateSpecialInputs(self, {
"Open",
"Toggle"... | nilq/small-lua-stack | null |
----------------------
-- Author : Deediezi
-- Version 4.5
--
-- Contributors : No contributors at the moment.
--
-- Github link : https://github.com/Deediezi/FiveM_LockSystem
-- You can contribute to the project. All the information is on Github.
-- Main algorithm with all functions and events - Client side
----
--... | nilq/small-lua-stack | null |
RPGM.Classes.RegisterExtra("team", "salary", true)
RPGM.RegisterNotificationType("MONEY", gmodI18n.getAddon("rpgm"):getString("notifyTypeMoney"), "5Y76zSd")
if CLIENT then
RPGM.Config.NotificationSounds[NOTIFY_MONEY] = RPGM.Config.MoneyNotificationSound
end
local tostring = tostring
local find = string.find
loca... | nilq/small-lua-stack | null |
object_tangible_collection_rare_heavy_oppressor_flame_thrower = object_tangible_collection_shared_rare_heavy_oppressor_flame_thrower:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_rare_heavy_oppressor_flame_thrower, "object/tangible/collection/rare_heavy_oppressor_flame_thrower.i... | nilq/small-lua-stack | null |
Phonemes ={
names = {
"eee", "ihh", "ehh", "aaa",
"ahh", "aww", "ohh", "uhh",
"uuu", "ooo", "rrr", "lll",
"mmm", "nnn", "nng", "ngg",
"fff", "sss", "thh", "shh",
"xxx", "hee", "hoo", "hah",
"bbb", "ddd", "jjj", "ggg",
"vvv", "zzz", "thz", "zhh"
},
gains =... | nilq/small-lua-stack | null |
--[[
编写作者:
Author: CandyMi[https://github.com/candymi]
编写日期:
2020-11-06
]]
local cf = require "cf"
local cself = cf.self
local cfork = cf.fork
local cwait = cf.wait
local cwakeup = cf.wakeup
local ctimeout = cf.timeout
local lz = require"lz"
local uncompress = lz.uncompress
local gzuncompress = lz.gzuncompress... | nilq/small-lua-stack | null |
-- OptimisticSide
local ItemTrend = {
Lowering = 0;
Unstable = 1;
Stable" = 2;
Raising = 3;
Fluctuating = 4;
}
return ItemTrend
| nilq/small-lua-stack | null |
return {
data = {
ephemeral = true
},
dependencies = {
"object",
"container",
"character",
"vanishAfterDisconnect",
},
methods = {
onEnter = {
function(self, args)
return self.room:getDesc(self)
end,
function(self, args, ret)
self:send(ret)
end... | nilq/small-lua-stack | null |
pkmn = require("pkmn")
print(pkmn.paths.get_database_path())
| nilq/small-lua-stack | null |
require('busted.runner')()
require('__stdlib__/spec/setup/defines')
local Position = require('__stdlib__/stdlib/area/position')
local P = Position
describe('Position', function ()
local C = spy.on(Position, 'construct')
local N = spy.on(Position, 'new')
local L = spy.on(Position, 'load')
local K = sp... | nilq/small-lua-stack | null |
function dump(s)
io.stderr:write(require("scripts.inspect").inspect(s) .. "\n")
-- io.stderr:write(pandoc.utils.stringify(s) .. "\n")
end
local pandoc = _G.pandoc
function P(s)
print(require("scripts.inspect").inspect(s))
end
local COMMENT = false
local List = require("pandoc.List")
function Blocks(blocks)
... | nilq/small-lua-stack | null |
-- const { utils, consts } = require('../lora-lib');
-- const BluebirdPromise = require('bluebird');
-- const TXParamSetupReq_PARAM = consts.TXPARAMSETUPREQ;
-- module.exports = function (devAddr, DownlinkDwellTime, UplinkDwellTime, MaxEIRP) {
-- let _this = this;
-- return new BluebirdPromise((resolve, reject) =... | nilq/small-lua-stack | null |
-- Copyright (c) 2015 Corona Labs, Inc.
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, dist... | nilq/small-lua-stack | null |
---
---This example definition of a class file is a guideline. The class system is
---left intentionally vague so as to not be too opinionated. Class files are
---assumed to be js files instead of blank yaml files just to future proof the
---bundle-loading of class files in case someone wants extra functionality in
---... | nilq/small-lua-stack | null |
-- This file is auto-generated by shipwright.nvim
local common_fg = "#4C554D"
local inactive_bg = "#D5E7D8"
local inactive_fg = "#4B663C"
return {
normal = {
a = { bg = "#A3B5A6", fg = common_fg, gui = "bold" },
b = { bg = "#B8CCBA", fg = common_fg },
c = { bg = "#CAE0CD", fg = "#202E18" },
},
insert = {
a... | nilq/small-lua-stack | null |
package.path = ".\\?.lua;" .. package.path
package.cpath = ".\\?.dll;" .. package.cpath
crvmgr = require("test_c")
require("init")
el_test_num_table = {
{"1000000000000000000000000000000000000000000000000000000000000000000000000", "#3", "100000000000000000000000000000000000000000000000000000000000000000... | nilq/small-lua-stack | null |
music = "mountains.ogg"
function start()
portal_up = Portal:new{x=1, y=4}
portal_down = Portal:new{x=5, y=4}
end
function stop()
end
function update(step)
portal_up:update()
portal_down:update()
if (portal_up.go_time) then
change_areas("mountain_descent1", 1, 4, DIRECTION_EAST)
elseif (portal_down.go_time) ... | nilq/small-lua-stack | null |
AddCSLuaFile()
AddCSLuaFile("sh_sounds.lua")
include("sh_sounds.lua")
SWEP.magType = "pistolMag"
CustomizableWeaponry:registerAmmo(".30 Carbine", ".30 Caliber Rounds", 7.62, 33)
SWEP.PrintName = "M1 Carbine"
if CLIENT then
SWEP.DrawCrosshair = false
SWEP.CSMuzzleFlashes = true
SWEP.IconLetter = "w"
killico... | nilq/small-lua-stack | null |
-- https://github.com/ImagicTheCat/vRP
-- MIT license (see LICENSE or vrp/vRPShared.lua)
if not vRP.modules.map then return end
-- BLIPS: see https://wiki.gtanet.work/index.php?title=Blips for blip id/color
local IDManager = module("vrp", "lib/IDManager")
local Map = class("Map", vRP.Extension)
-- SUBCLASS
Map.En... | nilq/small-lua-stack | null |
function ExtractResources(sourceDir, destDir)
SetDataType("S06")
-- TODO: Finish this
end
function Load(dataDir, cacheDir, stageID)
SetDataType("S06")
local dir, type = dataDir, "xenon"
-- TODO: Make an IOPathCombine function please you beautiful moron
if IODirExists(dir .. "/xenon") then
type = "xenon"
els... | nilq/small-lua-stack | null |
object_tangible_loot_undead_decal_smear_01 = object_tangible_loot_undead_shared_decal_smear_01:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_undead_decal_smear_01, "object/tangible/loot/undead/decal_smear_01.iff")
| nilq/small-lua-stack | null |
local os = require('ffi').os
local env = require('env')
local tmpdir = os == 'Windows' and env.get('TMP') or '/tmp'
local db = require("./lus/db").DB:new("sqlite3", tmpdir.."/test.sqlite3")
local User = require("./lus/db").Model:extend():new(db)
local app = require("./lus/websocket").WebSocket:new()
-- prepare ... | nilq/small-lua-stack | null |
local rpc = require 'lua-lsp.rpc'
local log = require 'lua-lsp.log'
local method_handlers = require 'lua-lsp.methods'
_G.Types = _G.Types or {}
_G.Documents = _G.Documents or {}
_G.Globals = _G.Globals -- defined in analyze.lua
-- selfish default
_G.Config = _G.Config or {
language = "5.3",
b... | nilq/small-lua-stack | null |
-------------------------------------------------------------------------------
-- @author lilydjwg <lilydjwg@gmail.com>
-- @copyright GPLv3
-- vim:se sw=2:
-------------------------------------------------------------------------------
require "logging"
local LEVEL_PREFIX = {
[logging.DEBUG] = '\27[34m[D',
[logg... | nilq/small-lua-stack | null |
--[[
Config provider module
Copyright (c) 2020-2021 outsidepro-arts
License: MIT License
]]--
-- Before use this module, please fill the config.section by your unique name which should set to ExtState
local config = {}
-- A few local functions
local function toboolean(value)
if type(value) == "string" then
return ({... | nilq/small-lua-stack | null |
local responses = require "kong.tools.responses"
local singletons = require "kong.singletons"
local pl_stringx = require "pl.stringx"
local _ = require "lodash"
local function load_consumer_resources(consumer_id)
local cache = singletons.cache
local dao = singletons.dao
local role_cache_key = dao.rbac_role_consu... | nilq/small-lua-stack | null |
--[[
--MIT License
--
--Copyright (c) 2019 manilarome
--Copyright (c) 2020 Tom Meyers
--
--Permission is hereby granted, free of charge, to any person obtaining a copy
--of this software and associated documentation files (the "Software"), to deal
--in the Software without restriction, including without limitation the ... | nilq/small-lua-stack | null |
require("lunatest.lunatest")
function test_loads()
require("help")
assert_table(help)
end
function test_concat()
require("help")
local a = help.docstring[[This is an example]] .. function()
return "function return value"
end
assert_function(a)
assert_string(a())
end
function test_concat_lookup()
require("h... | nilq/small-lua-stack | null |
include("LensSupport")
local LENS_NAME = "ML_WONDER"
local ML_LENS_LAYER = LensLayers.HEX_COLORING_APPEAL_LEVEL
-- ===========================================================================
-- Wonder Lens Support
-- ===========================================================================
-- =====================... | nilq/small-lua-stack | null |
-- =============================================
-- -== TODO Comments ==-
-- =============================================
local todo_comments = require("todo-comments")
local colors = require("tokyonight.colors").setup({})
todo_comments.setup({
signs = true,
sign_priority = 8,
keywords = {
FIX = {
... | nilq/small-lua-stack | null |
-- Copyright (C) 2017-2020 DBotThePony
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publis... | nilq/small-lua-stack | null |
local playsession = {
{"Gerkiz", {6962}},
{"sickmyduck90", {1828967}},
{"bugmum", {153268}},
{"fabilord98", {1308116}},
{"Ardordo", {86936}},
{"Zorzzz", {1766697}},
{"Nikkichu", {1246953}},
{"vad7ik", {842508}},
{"IamTzu", {319808}},
{"Skybreaker", {765517}},
{"3615-Motiok", {1251318}},
{"CommanderFrog", {2... | nilq/small-lua-stack | null |
local THNN = require 'nn.THNN'
local SpatialConvolution, parent = torch.class('SpatialConvolution', 'nn.Module')
function SpatialConvolution:__init(nInputPlane, nOutputPlane, kW, kH, dW, dH, padW, padH, magnitude)
parent.__init(self)
dW = dW or 1
dH = dH or 1
self.nInputPlane = nInputPlane
self.nOutpu... | nilq/small-lua-stack | null |
--!A cross-platform build utility based on Lua
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law... | nilq/small-lua-stack | null |
local presetsFolder = script.Parent
local GenericWeatherPreset = require(presetsFolder:WaitForChild("GenericWeatherPreset"))
local SnowstormDay = {}
SnowstormDay.__index = SnowstormDay
setmetatable(SnowstormDay, GenericWeatherPreset)
function SnowstormDay.new()
local self = GenericWeatherPreset.new()
setmetat... | nilq/small-lua-stack | null |
local classes = {
[0] = 'None',
[1] = { -- Warrior
[1] = 'Arms',
[2] = 'Fury',
[3] = 'Protection'
},
[2] = { -- Paladin
[1] = 'Holy',
[2] = 'Protection',
[3] = 'Retribution'
},
[3] = { -- Hunter
[1] = 'BeastMastery',
[2] = 'Marksman... | nilq/small-lua-stack | null |
-- ***********************************************************************************************************************
-- THIS IS THE CODE FOR THE PLAYER
-- ***********************************************************************************************************************
player = {} -- create player table
... | nilq/small-lua-stack | null |
local LibProcessable = LibStub("LibProcessable")
local isOpening_lock = false -- semaphor to keep us from recursively checking
local delayBetweenSearches = 0.75 -- seconds (not MS) to wait between bag opens
-- // TODO don't try to open if you're talking to a vendor
local function IsPouch(container, slot)
local t... | nilq/small-lua-stack | null |
script.Parent = nil
game.DescendantAdded:connect(function(a)
pcall(function()
if a:FindFirstChild("DSource") ~= nil then
if a.DSource.Value:lower():match("cba") then
a:Remove()
Instance.new("Message", Workspace).Text = "No CBA fgt."
end
end
end)
end) | nilq/small-lua-stack | null |
--------------------------------
-- @module EventListenerPhysicsContactWithBodies
-- @extend EventListenerPhysicsContact
-- @parent_module cc
---@class cc.EventListenerPhysicsContactWithBodies:cc.EventListenerPhysicsContact
local EventListenerPhysicsContactWithBodies = {}
cc.EventListenerPhysicsContactWithBodies = Ev... | nilq/small-lua-stack | null |
require("mod.tools.data.keybind")
| nilq/small-lua-stack | null |
local lsp = { handlers = {} }
local util = require"lean._util"
function lsp.enable(opts)
opts.handlers = vim.tbl_extend("keep", opts.handlers or {}, {
['$/lean/fileProgress'] = util.mk_handler(lsp.handlers.file_progress_handler);
['textDocument/publishDiagnostics'] = function(...)
util.mk_handler(lsp.h... | nilq/small-lua-stack | null |
local PANEL = vgui.GetControlTable("ixStorageView")
function PANEL:Init()
if (IsValid(ix.gui.openedStorage)) then
ix.gui.openedStorage:Remove()
end
ix.gui.openedStorage = self
self:SetSize(ScrW(), ScrH())
self:SetPos(0, 0)
self:SetFadeTime(0.25)
self:SetFrameMargin(4)
self.storageInventory = self:Add("ixI... | nilq/small-lua-stack | null |
--- An iSCSI library implementing written by Patrik Karlsson <patrik@cqure.net>
-- The library currently supports target discovery and login.
--
-- The implementation is based on packetdumps and the iSCSI RFC
-- * http://tools.ietf.org/html/rfc3720
--
-- The library contains the protocol message pairs in <code>Packet</... | nilq/small-lua-stack | null |
return require 'parse.char.ascii7.symbol'
+ require 'parse.char.ascii7.whitespace.horizontal'
| nilq/small-lua-stack | null |
-- Copyright 2016-2019, Firaxis Games
-- ===========================================================================
-- CityPanel v3
-- ===========================================================================
include( "AdjacencyBonusSupport" ); -- GetAdjacentYieldBonusString()
include( "CitySupport" );
include( "... | nilq/small-lua-stack | null |
include "luaClass.class.namespace"
include "luaClass.class.config.init"
_ENV=namespace "luaClass"
LPublic={}
LPublic.__index=LPublic
function LPublic:new(memberTable)
local object={
members=memberTable;
}
setmetatable(object,self)
return object
end
function LPublic:implement(classObject)
... | nilq/small-lua-stack | null |
awful = require("awful")
settings = require("settings")
beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
wibox = require("wibox")
naughty = require "naughty"
menubar = require "menubar"
gears = require "gears"
math = require "math"
--[[
Entry needs to store:
Icon
Children?
Name
To... | nilq/small-lua-stack | null |
--Automatically generated by SWGEmu Spawn Tool v0.12 loot editor.
event3 = {
description = "",
minimumLevel = 0,
maximumLevel = 0,
lootItems = {
--Fill to 25%
{groupTemplate = "clothing_attachments", weight = 2000000},
--Fill to 25%
{groupTemplate = "armor_attachments", weight = 2000000},
--Fill to... | nilq/small-lua-stack | null |
T = require('luaunit')
lsys = dofile('lsys.lua')
function test_selector_empty_init()
local s = lsys.Selector()
T.assertEquals(s:choices(), {})
T.assertIsNil(s(), nil)
end
function test_selector_single_init()
local s = lsys.Selector{ 'a' }
T.assertEquals(s:choices(), {{1, 'a', weight = 1}})
T.assertEquals(... | nilq/small-lua-stack | null |
print(1 == 2, 3.2 == 3.2, 3.2 == 2, {} == 1, {} == {})
--> =false true false false false
print(1 < 2, 3.5 < -1, 2 < 1e10, 1e5 < 1e6, "xyz" < "xyza")
--> =true false true true true
print(1 <= 2, 3.5 <= -1, 2 <= 1e10, 1e5 <= 1e6, "xyz" <= "xyza")
--> =true false true true true
print(pcall(function() return {} <= {} en... | nilq/small-lua-stack | null |
local orient = require('trackOrientation');
local pos = require('trackPosition');
local mas = require('moveAndScan');
local M = {};
function M.distance(coord1, coord2)
local xDist = coord2.x - coord1.x;
local yDist = coord2.y - coord1.y;
local zDist = coord2.z - coord1.z;
return math.sqrt(xDist^2 + yDist^2 + ... | nilq/small-lua-stack | null |
--[[Copyright © 2014-2016, smd111
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the follo... | nilq/small-lua-stack | null |
--[[--
ui.link{
external = external, -- external URL
static = static, -- URL relative to the static file directory
module = module, -- module name
view = view, -- view name
action = action, -- action name
attr = attr, -- for views: table of HTML attributes
a_a... | nilq/small-lua-stack | null |
_G.require = require
require "./lunarbook.lua" | nilq/small-lua-stack | null |
----
-- Test cases for xlsxwriter.lua.
--
-- Test the creation of a simple xlsxwriter.lua file.
-- Check encoding of rich strings.
--
-- Copyright 2014, John McNamara, jmcnamara@cpan.org
--
local Workbook = require "xlsxwriter.workbook"
local workbook = Workbook:new("test_escapes07.xlsx")
local worksheet = workbook:... | nilq/small-lua-stack | null |
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel("models/props_c17/TrapPropeller_Engine.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self:SetUseType(SIMPLE_USE)
local phys = self:GetPh... | nilq/small-lua-stack | null |
--[=[
Provides a basis for binders that can be retrieved anywhere
@class BinderProvider
]=]
local require = require(script.Parent.loader).load(script)
local Promise = require("Promise")
local BinderProvider = {}
BinderProvider.ClassName = "BinderProvider"
BinderProvider.__index = BinderProvider
--[=[
Constructs ... | nilq/small-lua-stack | null |
-- This file is auto-generated by shipwright.nvim
local common_fg = "#7BA9C5"
local inactive_bg = "#18252D"
local inactive_fg = "#D1E0DA"
return {
normal = {
a = { bg = "#3B5362", fg = common_fg, gui = "bold" },
b = { bg = "#2B3E49", fg = common_fg },
c = { bg = "#1C2A32", fg = "#C6D5CF" },
},
insert = {
a... | nilq/small-lua-stack | null |
local json = require "json"
local webclient_lib = require 'webclient'
local webclient = webclient_lib.create()
local requests = {};
local requests = {}
local req, key = webclient:request("http://httpbin.org/relative-redirect/6") --302
requests[key] = req
local req, key = webclient:request("http://httpbin.org/absolut... | nilq/small-lua-stack | null |
local es_utils = require "resty.es.utils"
local make_path = es_utils.make_path
local deal_params = es_utils.deal_params
local _M = {
_VERSION = '0.01'
}
local mt = { __index = _M }
function _M.new(self, client)
return setmetatable({client = client}, mt)
end
function _M.info(self, s_params)
local b... | nilq/small-lua-stack | null |
--[[
NOTICE
Copyright (c) 2019 Andrew Bereza
Provided for public use in educational, recreational or commercial purposes under the Apache 2 License.
Please include this copyright & permission notice in all copies or substantial portions of Miner's Haven source code
]]
local module = {}
local Done = false
local BaseS... | nilq/small-lua-stack | null |
hook.Add("PlayerSpawn","Modulo:SpawnRPTeamAtPoint",function(ply)
local PlayerTeam = RPExtraTeams[ply:Team()]
if PlayerTeam != nil and PlayerTeam.SpawnPoint != nil then
if ply.ModuloSetSpawn then return end
if istable(PlayerTeam.SpawnPoint) then
local val = math.random(1, #Playe... | nilq/small-lua-stack | null |
local M = {}
M.lerp_factor = 5
M.players = {}
M.players_in_cars = {}
M.player_heads_attachments = {}
M.player_transforms = {}
local blacklist = {
woodplanks = true,
woodcrate = true,
weightpad = true,
wall = true,
tsfb = true,
tube = true,
trafficbarrel = true,
tirewall = true,
tirestacks = true,
t... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Garlaige Citadel (200)
-- NM: Old Two-Wings
-----------------------------------
function onMobDeath(mob, player, isKiller)
end;
function onMobDespawn(mob)
-- Set Old_Two_Wings's spawnpoint and respawn time (21-24 hours)
UpdateNMSpawnPoint(mob:getID());
mob:s... | nilq/small-lua-stack | null |
object_tangible_loot_creature_loot_collections_space_capacitor_mark_04_novaldex = object_tangible_loot_creature_loot_collections_space_shared_capacitor_mark_04_novaldex:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_space_capacitor_mark_04_novaldex, "object/tangible/loot/creature/l... | nilq/small-lua-stack | null |
--[[
Description:
Author:
Date:
--]]
local Root, Utilities, Service, Package;
return {
Init = function(cRoot, cPackage)
Root = cRoot
Utilities = Root.Utilities
Package = cPackage
Service = Root.Utilities.Services
--// Do init
end;
AfterInit = function(Root, Package)
--// Do after-init
end;... | nilq/small-lua-stack | null |
---
---
--- File: unitss.lua
--- This does the following things
--- 1. Coordinates the units data bases
--- 2. Verifies a units in a chain
--- 3. Verifies the unitss in a file list
--- 4. Generates the complete list of unitss in a chain
--- 5. Gets a units record
---
---
--- The entry for a units contains the fol... | nilq/small-lua-stack | null |
--!strict
local Types = require(script.Parent.Types)
local Symbols = require(script.Parent.Symbols)
local Symbol_ElementKind = Symbols.ElementKind
local Symbol_Portal = Symbols.ElementKinds.Portal
local function portal(hostParent: Instance, children: Types.ChildrenArgument?): Types.Element
local element = {
[Symbo... | nilq/small-lua-stack | null |
local _ = require("src/underscore")
local input
local result
describe("_.all", function()
describe("provide a truth function", function()
describe("all elements pass the function", function()
it("should return true", function()
input = {2, 4, 6}
result = _.all(input, function(i) return i ... | nilq/small-lua-stack | null |
--------------------------------------------------------------------------------
-- Easy Doorbell Clientside Init
--------------------------------------------------------------------------------
include( "easydoorbell/sh_init.lua" )
include( "easydoorbell/cl_permmenu.lua" )
include( "easydoorbell/sh_tool_functions.lua... | nilq/small-lua-stack | null |
local area_mng = require"misc/area/area_mng"
local ui_mng = class("ui_mng",area_mng){
__view_id = 1,
}
function ui_mng:__init()
area_mng.__init(self)
self:__init_callback__()
end
function ui_mng:__init_callback__()
for _,call_name in ipairs(love_callback) do
if not self[call_name] then
... | nilq/small-lua-stack | null |
local g_MapInfo = false
local function MiGetInfo(map)
local info = DbQuerySingle('SELECT played, rates, rates_count FROM '..MapsTable..' WHERE map=? LIMIT 1', map:getId())
info.name = map:getName()
info.rating = (info.rates_count > 0 and info.rates/info.rates_count) or 0
info.author = map:getInfo('author')
... | nilq/small-lua-stack | null |
PlanStrollState = { mName = "plan_stroll" }
PlanStrollState.__index = PlanStrollState
function PlanStrollState:Create(character, map)
local this =
{
mCharacter = character,
mMap = map,
mEntity = character.mEntity,
mController = character.mController,
mFrameRe... | nilq/small-lua-stack | null |
object_mobile_endor_ig88_security_battledroid_red = object_mobile_shared_endor_ig88_security_battledroid_red:new {
}
ObjectTemplates:addTemplate(object_mobile_endor_ig88_security_battledroid_red, "object/mobile/endor_ig88_security_battledroid_red.iff")
| nilq/small-lua-stack | null |
local _t_ = '_T_'
local _t_n_ = '_T_N_'
local _t_t_c_ = '_T_[T]_C_'
local _t_t_d_c_ = '_T_[T]_C_[C]_'
local _t_t_d_c_pk_ = '_T_[T]_C_PK_'
local level = redis.LOG_NOTICE
local m = 'create redisql\'s scheme %s'
local t = redis.call('hmset', _t_,
'TABLES', _t_n_,
'TABLES_COMMENT'... | nilq/small-lua-stack | null |
vlog_queue = {}
function vendor_log_queue(name,line)
if ( vlog_queue[name] == nil ) then
vlog_queue[name] = {}
end
table.insert(vlog_queue[name],line)
end
function write_vendor_log(again)
minetest.log("action","Writing vendor log queue to file")
for name,log_lines in pairs(vlog_queue) do
local logfile = min... | 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.