content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
local matrix = {}
function matrix.T(a: table)
local m: integer, n: integer, x: table = #a, #a[1], {};
for i = 1, n do
local xi: number[] = table.numarray(n, 0.0)
x[i] = xi
for j = 1, m do xi[j] = @number (a[j][i]) end
end
return x;
end
function matrix.mul(a: table, b: table)
assert(@integer(#a[1]) == #b);
... | nilq/small-lua-stack | null |
local Log = {
Created = false,
Create = function (self, name, filename)
local log = {}
setmetatable(log, self)
log.Name = name
log.Filename = filename
log.Created = false
return log
end,
CreateLog = function (self, clear)
if self.Created then
return
end
clear = cl... | nilq/small-lua-stack | null |
---@meta
--=== mcp4725 ===
---@class mcp4725
---@field PWRDN_NONE integer
---@field PWRDN_1K integer
---@field PWRDN_100K integer
---@field PWRDN_500K integer
mcp4725 = {}
---Gets contents of the dac register and EEPROM.
---@param tbl table @{[a0], [a1], [a2]}
--- - **A0** Address bit 0. This bit is user configurabl... | nilq/small-lua-stack | null |
local utils = require"test_utils"
local JSON = require"JSON"
local sh, stdout, stderr, sleep, sh_ex, sh_until_ok =
utils.sh, utils.stdout, utils.stderr, utils.sleep, utils.sh_ex, utils.sh_until_ok
local pl_file = require"pl.file"
local pl_path = require "pl.path"
local pl_tmpname = pl_path.tmpname
local _M = {}
... | nilq/small-lua-stack | null |
-- multiDemo.lua
--
-- Demonstrates how to use luadep to define a dependency that accepts multiple modules.
local module = require("module")
local container = require("container")
local recipeBook = module({})
:setName("VanillaRecipeBook")
:setVersion("1.0.0-beta")
:isA("RecipeBook")
:dependsOn("Recip... | nilq/small-lua-stack | null |
-------------------------------------------------------------------------------
--
-- The comment extraction example given in doc/grammar.html. For those of you
-- who haven't read it, the code and comments are available below.
--
-- Authors: Humberto Anjos and Francisco Sant'Anna
--
-- $Id: comment-extraction.lua,... | nilq/small-lua-stack | null |
ENT.Type = "ai";
ENT.Base = "base_ai"; | nilq/small-lua-stack | null |
--- Injects a loverocks-compatible module loader into your game.
-- See http://github.com/Alloyed/loverocks for details
-- (c) Kyle McLamb, 2016 <alloyed@tfwno.gf>, MIT License.
<%- rocks_warning %>
-- |version: <%- loverocks_version %>|
local rocks_tree = (...)
local rocks = {}
rocks.paths = {
rocks_tree .. "/s... | nilq/small-lua-stack | null |
-- This script demonstrates button remapping. The player character in this
-- game can do four things: jump, shoot, crouch, and run. By pressing start,
-- the player is taken to a screen where they can assign which face buttons go
-- with which action.
-- This example assumes controllers with XINPUT aka XBOX 360 butto... | nilq/small-lua-stack | null |
---------------------------------------------------------------------------
-- @author Uli Schlachter
-- @copyright 2010 Uli Schlachter
-- @popupmod wibox
---------------------------------------------------------------------------
local capi = {
drawin = drawin,
root = root,
awesome = awesome,
screen =... | nilq/small-lua-stack | null |
do
local _ = {
['character-corpse'] = {
icon = '__core__/graphics/icons/entity/character.png',
name = 'character-corpse',
icon_mipmaps = 4,
armor_picture_mapping = {
['modular-armor'] = 3,
['heavy-armor'] = 2,
['... | nilq/small-lua-stack | null |
--[[
выполняет функцию для всех обьектов из таблицы
если функция возвращает false - то происходит досрочный выход из цикла
]]
function ForEachInTable (t, func, ...)
local index, value = next (t)
while index do
if func (value, ...)==false then
return
end
index, value = next (t, inde... | 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 icons = require('icons')
require('notify').setup({
timeout = 3000,
stages = 'fade',
icons = {
ERROR = icons.diagnostics.Error,
WARN = icons.diagnostics.Warning,
INFO = icons.diagnostics.Information,
DEBUG = icons.diagnostics.Debug,
TRACE = icons.diagnostics.Trace,
},
background_colo... | nilq/small-lua-stack | null |
--freetype/*.h from freetype 2.9.1
require'ffi'.cdef[[
// config/ftconfig.h ---------------------------------------------------------
typedef signed short FT_Int16;
typedef unsigned short FT_UInt16;
typedef signed int FT_Int32;
typedef unsigned int FT_UInt32;
typedef int FT_Fast;
typedef unsigned i... | nilq/small-lua-stack | null |
--[[
(C) Copyright 2014 William Dyce
All rights reserved. This program and the accompanying materials
are made available under the terms of the GNU Lesser General Public License
(LGPL) version 2.1 which accompanies this distribution, and is available at
http://www.gnu.org/licenses/lgpl-2.1.html
This library is distri... | nilq/small-lua-stack | null |
AddCSLuaFile()
SWEP.HoldType = "normal"
if CLIENT then
SWEP.PrintName = "binoc_name"
SWEP.Slot = 7
SWEP.ViewModelFOV = 10
SWEP.EquipMenuData = {
type = "item_weapon",
desc = "binoc_desc"
};
SWEP.Icon = "vgui/ttt/icon_binoc"
end
SWEP.Base = "weapon_tttbase"
SWEP.ViewModel ... | nilq/small-lua-stack | null |
object_building_kashyyyk_shrb_beach_root_cup_cluster = object_building_kashyyyk_shared_shrb_beach_root_cup_cluster:new {
}
ObjectTemplates:addTemplate(object_building_kashyyyk_shrb_beach_root_cup_cluster, "object/building/kashyyyk/shrb_beach_root_cup_cluster.iff")
| nilq/small-lua-stack | null |
newaction
{
trigger = "raw",
shortname = "Raw output",
description = "Generate raw representation of Premake structures",
onsolution = function(sln)
require('raw')
premake.generate(sln, ".raw", premake.raw.workspace)
end,
}
return function(cfg)
return (_ACTION == "raw")
end
| nilq/small-lua-stack | null |
local Part={}
function Part:new(o)
o=o or {}
setmetatable(o,self)
self.__index=self
o.swing = o.swing or 50
o.enabled = o.enabled==nil and true or o.enabled
o.stroke = o.stroke or 1
o.note = o.note or 9
o.count = o.count or 1
o.interval = o.interval or 0
o.s=nil
return o
end
fu... | nilq/small-lua-stack | null |
--------------------------------------------------------------------
------- this file in auto generate by the bind3D -------------------
------- https://github.com/xtoolbox/pcad2kicad -------------------
--------------------------------------------------------------------
fpTable = {
{
name = "0201",
path ... | nilq/small-lua-stack | null |
local opts = {noremap = true, silent = true}
local map = vim.api.nvim_set_keymap
map("n", "<leader>pr", ":term pio -f -c vim run<CR>i", opts)
map("n", "<leader>pu", ":term pio -f -c vim run --target upload<CR>i", opts)
map("n", "<leader>pc", ":term pio -f -c vim run --target clean<CR>i", opts)
map("n", "<leader>pp", "... | nilq/small-lua-stack | null |
-- Note: export_helpers/export_triggers/export_ancillaries*.lua scripts run after all other scripts are run, including all the mod/*.lua scripts, after the LoadingGame,
-- and during the UICreated (game created) events (see cm:load_exported_files calls in wh_campaign_setup.lua).
-- In particular, all the mod/*.lua scri... | nilq/small-lua-stack | null |
local obj = require 'core.obj'
local Sprite = require 'type.graphics.Sprite'
local ItemRegistry = obj.new('ItemRegistry', function(self, image, quantity, offset_x, offset_y, frame_width, frame_height, frame_spacing_x, frame_spacing_y)
self.sprite = Sprite(image)
self.sprite:loadFrames(
quantity,
... | nilq/small-lua-stack | null |
----------------------------Aliases----------------------------
local key = vim.api.nvim_set_keymap
local remap = { noremap = true, silent = true }
---------------------------Leader Keys---------------------------
-- Set with normal Vim opts, 'Space' as mapleader
vim.g.mapleader = ' '
-- Set 'Space' as <NOP> key to... | nilq/small-lua-stack | null |
require("ElementManager")
require("SkillManager")
require("CoRunner")
Container = {}
function Container:New(elementId, core)
local o = {}
setmetatable(o, self)
self.__index = self
o.id = elementId
o.core = core
o.ElementMass = 0
o.Capacity = 0
o.Name = "<Unknown>"
o.ReducedContentM... | nilq/small-lua-stack | null |
local PLUGIN = PLUGIN
PLUGIN.name = "Cooking4Kek"
PLUGIN.author = "Kek1ch"
PLUGIN.desc = "Крафт снаряжения и не только."
nut.util.include("sv_plugin.lua")
| nilq/small-lua-stack | null |
return PlaceObj('ModDef', {
'title', "Depot_OCD",
'description', "Compatible with Cernan Update (Space Race and Green Planet DLC's)\n\nDepot OCD: Giving you the choice of having all Depots as 3hexes long.\n\nEver get triggered by how a Universal Storage Depot is 3 Hexes long and the base plate of Warehouse Depots are... | nilq/small-lua-stack | null |
-- Enhanced Raid Frames is a World of Warcraft® user interface addon.
-- Copyright (c) 2017-2021 Britt W. Yazel
-- This code is licensed under the MIT license (see LICENSE for details)
local _, addonTable = ...
local EnhancedRaidFrames = addonTable.EnhancedRaidFrames
local media = LibStub:GetLibrary("LibSharedMedia-3... | nilq/small-lua-stack | null |
--- Pseudo-random sort.
local A, L = unpack(select(2, ...))
local P = A.sortModes
local M = P:NewModule("random", "AceEvent-3.0")
P.random = M
local format, random, sort, strbyte, strlen, wipe = format, random, sort, strbyte, strlen, wipe
local fmod = math.fmod
local salt = ""
local hashCache = {}
local function has... | nilq/small-lua-stack | null |
return (function(self, name, value)
api.log(4, 'setting attribute %s on %s to %s', name, tostring(self:GetName()), tostring(value))
u(self).attributes[name] = value
api.RunScript(self, 'OnAttributeChanged', name, value)
end)(...)
| nilq/small-lua-stack | null |
exports['Scoreboard']:scoreboardAddColumn ( "Money" );
for i, v in ipairs ( getElementsByType ( "player") ) do
if ( not getElementData ( v, "Money")) then
setElementData ( v, "Money", "$0" )
end
end
addEventHandler ( "onPlayerJoin", root, function ( )
setElementData ( source, "Money", "$0" )
end )
addEventHand... | nilq/small-lua-stack | null |
--[[
File-Author: Pyrr
File-Hash: 7d854c80b8da104d80127c2e9eec1db83cd3fa31
File-Date: 2018-03-30T22:15:20Z
]]
local lib,name,path = ...
------------------------------------------------------ lib.color ------------------------------------------------------
local me = {
exports = {"GetColorByName", "GetColorByItemRarit... | nilq/small-lua-stack | null |
local gears = require("gears")
local naughty = require("naughty")
require("socket")
local socket_unix = require("socket.unix")
local notify = {}
function notify.watch(args)
args = args or {}
local socket_name = args.socket_filename
if not socket_name then
local xdg_dir = os.getenv("XDG_RUNTIME_DIR")
so... | nilq/small-lua-stack | null |
-- Petit WEB IDE tout simple autonome
-- ATTENTION: tourne sur le port 88 !
print("\n _web_ide2.lua zf190227.1739 \n")
--[[
XChip's NodeMCU IDE
Create, Edit and run NodeMCU files using your webbrowser.
Examples:
http://<mcu_ip>/ will list all the files in the MCU
http://<mcu_ip>/newfile.lua displays the file on y... | nilq/small-lua-stack | null |
-- Copyright 2015 Boundary
-- @brief convenience variables and functions for Lua scripts
-- @file boundary.lua
local fs = require('fs')
local json = require('json')
local boundary = {param = nil}
-- import param.json data into a Lua table (boundary.param)
local json_blob
if (pcall(function () json_blob = fs.readFileS... | nilq/small-lua-stack | null |
local stats = require "util.statistics".new();
local config = require "core.configmanager";
local log = require "util.logger".init("stats");
local timer = require "util.timer";
local fire_event = prosody.events.fire_event;
local stats_config = config.get("*", "statistics_interval");
local stats_interval = tonumber(st... | nilq/small-lua-stack | null |
local ui = {
logo_string = '<img src="data:image/png;base64,'
..'iVBORw0KGgoAAAANSUhEUgAAARIAAAA/CAYAAAAsckd/AAABhGlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9TpSIVwXYQcQhSnayIijhqFYpQIdQKrTqYXPoFTRqSFBdHwbXg4Mdi1cHFWVcHV0EQ/ABxc3NSdJES/5cUWsR6cNyPd/ced+8AoVZimtUxDmi6bSbjMTGdWRUDrxDQhxDGMCQzy5iTpATajq97+Ph6F+VZ7c/9OXrUrMU... | nilq/small-lua-stack | null |
-- Get Off V1.0
-- By: Parvulster
-- Get Off Command
getoff = "/getoff"
vehicleusers = {}
function EntitySpawn(args)
if args.entity.__type == "Vehicle" then
local vehicle = args.entity
vehicleusers[vehicle:GetId()] = {}
end
end
function PlayerChat(args)
if args.text == getoff then
local vehicle = args.vehi... | nilq/small-lua-stack | null |
local drawableNinePatch = require("structs.drawable_nine_patch")
local utils = require("utils")
local crumbleBlock = {}
local textures = {
"default", "cliffside"
}
crumbleBlock.name = "MaxHelpingHand/CustomizableCrumblePlatform"
crumbleBlock.depth = 0
crumbleBlock.placements = {}
for _, texture in ipairs(textur... | nilq/small-lua-stack | null |
require "Utilities/Enums"
require "Race"
Building = { race = nil, x = nil, y = nil, view = nil, health = nil, image = nil, level = nil, name = nil, defense = nil}
function Building:new(o)
o = o or {}
setmetatable(o, self)
self.__index = self
return o
end
function Building:Draw(tile_size, posX, po... | nilq/small-lua-stack | null |
local ucursor = require "luci.model.uci".cursor()
local json = require "luci.jsonc"
local server_section = arg[1]
local server = ucursor:get_all("firefly", server_section)
local v2ray = {
log = {
--error = "/var/log/v2ray.log",
loglevel = "warning"
},
-- 传入连接
inbound = {
port = tonumber(server.server_port),
... | nilq/small-lua-stack | null |
#!/usr/local/bin/lua -i
local function name2node(graph, name)
local node = graph[name]
if not node then
-- Node does not exist, make a new one
node = {name = name, arcs = {}}
graph[name] = node
end
return node
end
function readgraph(filename)
local f = assert(io.open(filena... | nilq/small-lua-stack | null |
--鉄獣の凶襲
--
--Script by JustFish
function c101102053.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,1... | nilq/small-lua-stack | null |
local M = {}
function M.config()
require('gitsigns').setup {
signs = {
add = { hl = 'GitSignsAdd', text = '+', numhl = 'GitSignsAddNr', linehl = 'GitSignsAddLn', },
change = { hl = 'GitSignsChange', text = '~', numhl = 'GitSignsChangeNr', linehl = 'GitSignsChangeLn', },
... | nilq/small-lua-stack | null |
local class = require "com/class"
local Console = class:derive("Console")
local Vec2 = require("src/Essentials/Vector2")
function Console:new()
self.history = {}
self.command = ""
self.open = false
self.active = false
self.backspace = false
self.BACKSPACE_FIRST_REPEAT_TIME = 0.5
self.BACKSPACE_NEXT_REPEAT_TI... | nilq/small-lua-stack | null |
local M =
{
ai = 1,
}
return M | nilq/small-lua-stack | null |
-- load ShaguPlates environment
setfenv(1, ShaguPlates:GetEnvironment())
if ShaguPlates.libhealth then return end
local mobdb = {}
local target, dmg, perc, diff = nil, 0, 0, 0, 0
local UnitHealth, UnitHealthMax
local libhealth = CreateFrame("Frame")
libhealth.enabled = true
libhealth.reqhit = 4
libhealth.reqdmg = 5
l... | nilq/small-lua-stack | null |
return {'anzegem','anzegemse'} | nilq/small-lua-stack | null |
////////////////////////////////////////
// Maax´s Libary (MLIB) //
// Coded by: Maax //
// //
// Version: v1.0 (Workshop) //
// //
// You are not permitted to //
// reupload this Sc... | nilq/small-lua-stack | null |
require 'paths'
require 'rnn'
require 'nngraph'
local dl = require 'dataload'
assert(nn.NCEModule and nn.NCEModule.version and nn.NCEModule.version >= 4, "update dpnn : luarocks install dpnn")
require 'cunn'
--[[ command line arguments ]]--
cmd = torch.CmdLine()
cmd:text()
cmd:text('Train a multi-GPU Language Model us... | nilq/small-lua-stack | null |
-- This file is automatically generated, do not edit!
-- Path of Building
--
-- Minion active skills
-- Skill data (c) Grinding Gear Games
--
local skills, mod, flag, skill = ...
skills["ChaosElementalCascadeSummoned"] = {
name = "Cascade",
hidden = true,
color = 3,
description = "Icicles emerge from the ground in... | nilq/small-lua-stack | null |
local Helpers = {}
function Helpers.p(...)
print(vim.inspect(...))
end
function Helpers.pr(str)
local s = ""
if type(str) == "string" then
s = str
else
s = vim.inspect(str)
end
s = vim.split(s, "\n")
local buffer = repl:buffer()
local n = vim.api.nvim_buf_line_count(buf... | nilq/small-lua-stack | null |
--====================================================================--
-- lua_states.lua
--
-- Documentation: http://docs.davidmccuskey.com/display/docs/lua_states.lua
--====================================================================--
--[[
The MIT License (MIT)
Copyright (C) 2013-2014 David McCuskey. All Rig... | nilq/small-lua-stack | null |
local _, addon = ...
local AdiBags = LibStub("AceAddon-3.0"):GetAddon("AdiBags")
local FilterName = 'MagiDetailedFilters'
local MatchIDs
local Tooltip
local Result = {}
local CategoryStorage = {}
local function FormatListForAdiBags(List)
Set = {}
for _, v in ipairs(List) do
Set[v] = true
end
... | nilq/small-lua-stack | null |
--[[--------------------------------------------------------
-- Database - A Database Asbraction Layer for Lua --
-- Copyright (c) 2014-2015 TsT worldmaster.fr --
--]]--------------------------------------------------------
-- a voir :
-- https://github.com/FPtje/MySQLite/blob/master/mysqlite.lua
-- https://github.c... | nilq/small-lua-stack | null |
--[[---------------------------------------------------------------------------
gName-Changer | LANGUAGE FILE
This addon has been created & released for free
by Gaby
Steam : https://steamcommunity.com/id/EpicGaby
--------------... | nilq/small-lua-stack | null |
fx_version "cerulean"
games { "gta5" }
ui_page "html/ui.html"
files {
"html/ui.html",
"html/js/*.js",
"html/css/*.css",
"html/webfonts/*.eot",
"html/webfonts/*.svg",
"html/webfonts/*.ttf",
"html/webfonts/*.woff",
"html/webfonts/*.woff2",
}
shared_scripts {
"@caue-lib/shared/sh_mod... | nilq/small-lua-stack | null |
local ABILITY = script:GetCustomProperty("Ability"):WaitForObject()
local PARENT = script:GetCustomProperty("Parent"):WaitForObject()
local TAG = script:GetCustomProperty("Tag")
local effects = {}
for _, obj in ipairs(PARENT:FindDescendantsByType("Vfx")) do
if obj:GetCustomProperty("Tag") == TAG then
tab... | nilq/small-lua-stack | null |
object_tangible_food_generic_dish_synthsteak = object_tangible_food_generic_shared_dish_synthsteak:new {
}
ObjectTemplates:addTemplate(object_tangible_food_generic_dish_synthsteak, "object/tangible/food/generic/dish_synthsteak.iff")
| nilq/small-lua-stack | null |
pfDB["quests-itemreq"]["data-turtle"] = {
[51425] = {
[51301] = 0,
},
[60329] = {
[1547] = 0,
},
[60330] = {
[1553] = 0,
},
[60331] = {
[80466] = 0,
},
}
| nilq/small-lua-stack | null |
local include = require 'include'
local ffi = require 'ffi'
local serialization = require('serialization');
local util = require 'util'
local Serial = require('Serial');
local kBPacket = require('kBPacket');
ffi.cdef[[
typedef long int __time_t;
typedef long int __suseconds_t;
typedef struct timeval {
__tim... | nilq/small-lua-stack | null |
slot0 = class("AttireFramePanel", import("...base.BaseSubView"))
slot0.Card = function (slot0)
function slot2(slot0)
slot0._go = slot0
slot0._tf = tf(slot0)
slot0.mark = slot0._tf:Find("info/mark")
slot0.print5 = slot0._tf:Find("prints/line5")
slot0.print6 = slot0._tf:Find("prints/line6")
slot0.emptyTF = ... | nilq/small-lua-stack | null |
local api = require('vfiler/actions/api')
local core = require('vfiler/libs/core')
local vim = require('vfiler/libs/vim')
local VFiler = require('vfiler/vfiler')
local M = {}
------------------------------------------------------------------------------
-- Control buffer
---------------------------------------------... | nilq/small-lua-stack | null |
require('tree')
local lu = require('luaunit')
local function get_children(leaves, nodes)
local children = {}
local leaf_ctr = 1
nodes = nodes or 0
for i = 1, leaves + nodes do
if leaf_ctr <= leaves then
children[i] = Leaf:new()
leaf_ctr = leaf_ctr + 1
else
... | nilq/small-lua-stack | null |
-- Inspiration from tjdevries
-- https://github.com/tjdevries/config_manager/blob/master/xdg_config/nvim/lua/tj/first_load.lua
local empty = require("blaz.helper.vim").empty
local data_dir = string.format("%s/site", vim.fn.stdpath("data"))
local function download_vim_plug()
local plug_download_url = "https://raw.gi... | nilq/small-lua-stack | null |
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Multiplayer lobby
gVoiceIconSpeaker = gXLFriendsEnum2UVs[7]
gVoiceIconTalking = gXLFriendsEnum2UVs[10]
gVoiceIconMuted = gXLFriendsEnum2UVs[8]
gVoiceIconTV = gXLFriendsEnum2UVs[9]
--
-- voice status icons
gVoiceStatus =
{... | nilq/small-lua-stack | null |
-- Copyright (c) 2015 Adobe Systems Incorporated. All rights reserved.
--
-- 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 r... | nilq/small-lua-stack | null |
--我的二维码页面
local MyQRCodeLayer = class("MyQRCodeLayer", cc.Layer)
local ExternalFun = appdf.req(appdf.EXTERNAL_SRC .. "ExternalFun")
local AnimationHelper = appdf.req(appdf.EXTERNAL_SRC .. "AnimationHelper")
local MultiPlatform = appdf.req(appdf.EXTERNAL_SRC .. "MultiPlatform")
function MyQRCodeLayer:ctor(info)
l... | nilq/small-lua-stack | null |
require 'nn'
-- dummy values
local ninputs = 100
local nhiddens = 300
local noutputs = 10
-- Simple 2-layer neural network, with tanh hidden units
model = nn.Sequential()
model:add(nn.Reshape(ninputs)) -- can these be added behind the scenes?
model:add(nn.Linear(ninputs,nhiddens))
model:add(nn.Tanh())
model:add(nn.L... | nilq/small-lua-stack | null |
-- call single argument integer constructor
p1 = player.new(2)
-- p2 is still here from being
-- set with lua["p2"] = player(0); below
local p2shoots = p2:shoot()
assert(not p2shoots)
-- had 0 ammo
-- set variable property setter
p1.hp = 545;
-- get variable through property getter
print(p1.hp);
local did_shoot_1 ... | nilq/small-lua-stack | null |
local local0 = 0.3
local local1 = 0.3 - local0
local local2 = 0.3 - local0
local local3 = 0.3 - local0
local local4 = 0.3 - local0
local local5 = 0.4 - local0
local local6 = 3.5 - local0
local local7 = 0.4 - local0
local local8 = 3.3 - local0
local local9 = 0 - local0
local local10 = 0 - local0
local local11 = 4.9 - lo... | nilq/small-lua-stack | null |
local Panel = LGUI.class(LGUI.Element, function(self, parent)
self.super.init(self, parent)
self.width = 100
self.height = 100
self.color = nil
self:applySkin(LGUI.skin.Panel)
end)
function Panel:applySkin(skin)
self.color = skin.color
end
function Panel:setColor(color)
self.color = col... | nilq/small-lua-stack | null |
-- Zytharian (roblox: Legend26)
-- Services
local projectRoot = game:GetService("ServerScriptService")
local RS = game:GetService("ReplicatedStorage")
-- Includes
local Classes = require(projectRoot.Modules.ClassSystem)
local Util = require(projectRoot.Modules.Utilities)
local LEnums = require(projectRoot.Modules.Enu... | nilq/small-lua-stack | null |
local tokenizer = require("latoft.compiler.tokenizer")
local parser = require("latoft.compiler.parser")
local assembler = require("latoft.compiler.assembler")
local compiler = {}
compiler.parse = function(source, source_path)
local text = tokenizer.read(source, source_path)
return parser.read(text)
end
compi... | nilq/small-lua-stack | null |
--
-- Registry is a way to resolve cyclic dependencies which normally can exist
-- between files of the same module/library.
--
-- Files, which want to expose their API to the other files, which in turn can't
-- require the formers directly, should put their API to the registry.
--
-- The files should use the registry ... | nilq/small-lua-stack | null |
local lib = LibStub and LibStub("LibClassicDurations", true)
if not lib then return end
local Type, Version = "SpellTable", 51
if lib:GetDataVersion(Type) >= Version then return end -- older versions didn't have that function
local Spell = lib.AddAura
local Talent = lib.Talent
local INFINITY = math.huge
l... | nilq/small-lua-stack | null |
local M = {}
local cursors = {}
local get_default_cache_path = function()
local HOME = os.getenv('HOME')
local XDG_CACHE_HOME = os.getenv('XDG_CACHE_HOME')
local BASE = XDG_CACHE_HOME or HOME
return BASE .. '/.vis-cursors'
end
M.path = get_default_cache_path()
local apply_cursor_pos = function(win)
if win.file ... | nilq/small-lua-stack | null |
posX = 0
posY = 0
ID = 0
macroF = 0
timeRes = 0
maxCap = 0 -- maximum capacity
coop = 0 -- mode
comScope = 0 -- comunication scope
time = 0 -- time passed
cap = 202 -- current capacity
startup = 1 -- to spawn the
cId = 0 -- company id
bId = 0 -- base id
explorers = 0
transporters = 0
deliveryOre = 0 -- ore delivered e... | nilq/small-lua-stack | null |
--[[============================================================
--=
--= LuaCss - CSS Tokenizing & Minimizing
--= https://github.com/ReFreezed/LuaCss
--=
--= References:
--= - https://www.w3.org/TR/css-syntax-3/
--= - https://drafts.csswg.org/cssom/ (Editor's draft, 2018-05-17)
--=
--= MIT License:
--= Copyright... | nilq/small-lua-stack | null |
local vehicles = {}
function tvRP.spawnGarageVehicle(vtype,name,pos) -- vtype is the vehicle type (one vehicle per type allowed at the same time)
local vehicle = vehicles[vtype]
if vehicle and not IsVehicleDriveable(vehicle[3]) then -- precheck if vehicle is undriveable
-- despawn vehicle
SetVehicleHasBe... | nilq/small-lua-stack | null |
include("sourcenet/querycvar.lua")
function FindPlayerByNetChannel(netchan)
for k, v in pairs(player.GetAll()) do
if netchan == CNetChan(v:EntIndex()) then
return v
end
end
end
hook.Add("PlayerInitialSpawn", "InitialCheatsCheck", function(ply)
ply.CheatsCookie = ply:QueryConVarValue("sv_cheats")
end)
hook.... | nilq/small-lua-stack | null |
local E, L, V, P, G = unpack(ElvUI); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB, Localize Underscore
local UF = E:GetModule('UnitFrames')
gpsRestricted = nil
function UF:Construct_Unit_GPS(frame, unit)
if not frame then return end
local gps = CreateFrame("Frame", nil, frame, 'BackdropTemplate'... | nilq/small-lua-stack | null |
do
kAlienTechMap[#kAlienTechMap+1] = { kTechId.DrifterRegeneration, 5, 3 }
kAlienTechMap[#kAlienTechMap+1] = { kTechId.DrifterCamouflage, 8, 3 }
kAlienTechMap[#kAlienTechMap+1] = { kTechId.DrifterCelerity, 11, 3 }
kAlienLines[#kAlienLines+1] = GetLinePositionForTechMap(kAlienTechMap, kTechId.CragHive, kTechId.Drif... | nilq/small-lua-stack | null |
sideQuests = {
[1] = { -- Plant 5 seeds in oliver's house
type = 'type:plant;oliver',
amount = 5,
points = 6,
},
[2] = { -- Fertilize 5 plants in oliver's house
type = 'type:fertilize;oliver',
amount = 5,
points = 2,
},
[3] = { -- Get 5000 coins
type = 'type:coins;get',
amount = 5000,
points = 7,... | nilq/small-lua-stack | null |
local __is = {}
function __is:__index(key)
self[key] = function(value)
if type(value) == tostring(key) then
return true, value
else
return false, key .. " expected, got " .. type(value)
end
end
return self[key]
end
local is = {}
is["nil"] = function(value)
if value == nil then
return true, value
e... | nilq/small-lua-stack | null |
--[[
Upbit Open API
## REST API for Upbit Exchange - Base URL: [https://api.upbit.com] - Official Upbit API Documents: [https://docs.upbit.com] - Official Support email: [open-api@upbit.com]
OpenAPI spec version: 1.0.0
Contact: ujhin942@gmail.com
Generated by: https://github.com/swagger-api/swagger-codeg... | nilq/small-lua-stack | null |
-- Toggable tray, for those who don't like to see it all the time.
-- http://awesome.naquadah.org/wiki/Minitray
-- Usage: after requiring a module, bind minitray.toggle() to a key.
local wibox = require("wibox")
-- Module minitray
local minitray = { geometry = {} }
local function show()
local scrgeom = screen[mo... | nilq/small-lua-stack | null |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('XTemplate', {
__is_kind_of = "XTextButton",
group = "Paradox",
id = "ParadoxUIComboButton",
PlaceObj('XTemplateWindow', {
'__class', "XTextButton",
'Dock', "right",
'Background', RGBA(255, 255, 255, 0),
'MouseCursor', "UI/Cursors/R... | nilq/small-lua-stack | null |
data:extend({
{
type = "item-subgroup",
name = "LTN-signal",
group = "signals",
order = "z[LTN-signal]"
},
{
type = "virtual-signal",
name = "min-train-length",
icon = "__"..MOD_NAME.."__/graphics/icons/min-train-length.png",
subgroup = "LTN-signal",
order = "z[LT... | nilq/small-lua-stack | null |
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by vdatcu.
--- DateTime: 05/07/2018 11:04
---
local CLASS_UNDER_TEST = 'api-gateway.redis.redisHealthCheck'
local ngxUpstreamMock, ngxSocketMock, shared
beforeEach(function()
ngxUpstreamMock = mock('ngx.upstream', { 'get_primary_peers', 'get_ba... | nilq/small-lua-stack | null |
--
-- PianoRollMainView.lua
--
require "Common"
if language() == "fr" then
currentVelocityStr = "Vél.:"
controllerProgramChangesStr = "PC"
controllerPitchBendStr = "PB"
controllerKeyAftertouchStr = "KAT"
controllerChannelAftertouchStr = "CAT"
controllerSysexStr = "SYSEX"
controllerControlChangeStr = "CC"
controller... | nilq/small-lua-stack | null |
return {
code = 605,
key = "NO_INTERACTION_COMPONENT",
} | nilq/small-lua-stack | null |
------------------------------------------------------------------------
--[[ Recursor ]]--
-- Decorates module to be used within an AbstractSequencer.
-- It does this by making the decorated module conform to the
-- AbstractRecurrent interface (which is inherited by LSTM/Recurrent)
------------------------------------... | nilq/small-lua-stack | null |
-- data handler for RGB-IR images
--
-- David-Alexandre Beaupre
--
require 'image'
require 'cutorch'
require 'gnuplot'
require 'xlua'
require 'math'
require 'io'
local TestDataHandler = torch.class('TestDataHandler')
function TestDataHandler:__init(data_root, testing, img_nb, psz, half_range, fold, gpu, offset)
... | nilq/small-lua-stack | null |
for i = 1, GetNumChannelMembers(7) do
c = GetChannelRosterInfo(7, i)
InviteUnit(c);
---GuildInvite(c);
print('Talked to: ' .. c);
end
| nilq/small-lua-stack | null |
local TrinketAlerter = BannZay.TrinketAlerter;
local AceConfig = LibStub("AceConfig-3.0");
local AceConfigDialog = LibStub("AceConfigDialog-3.0");
if TrinketAlerter == nil or AceConfig == nil or AceConfigDialog == nil then print("TrinketAlerter blizzard options will not be created as there dependencies to be satisfied... | nilq/small-lua-stack | null |
Config = {}
Config.ZDiff = 2.0
Config.BlipSprite = 431
Config.Locale = 'en'
Config.EnableBlips = false
Config.ATMLocations = {
{ ['x'] = -386.733, ['y'] = 6045.953, ['z'] = 31.501},
{ ['x'] = -110.753, ['y'] = 6467.703, ['z'] = 31.784},
{ ['x'] = 155.4300, ['y'] = 6641.991, ['z'... | nilq/small-lua-stack | null |
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Editbox for Lua. Handles the overall setup of them, with functions
-- for managing them.
function IFEditbox_fnSetString(this,NewStr)
if(this.bPasswordMode) then
local ShowStr = string.rep("*", string.len(NewStr))
IFText_fnSetSt... | nilq/small-lua-stack | null |
-- Gnuplot specific settings
-- keymap('', '-', ':s/^/\#/<CR>:nohlsearch<CR>', {})
| 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.