content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
-- drive.lua
local math = require("math")
local pairs = pairs
module(...)
--[[
calculate computes the wheel angles and speeds.
x and y are the strafe inputs from the operator, w is the rotation speed
about the z-axis.
gyroDeg is the field-centric shift (in degrees).
The units for wheelBase an... | nilq/small-lua-stack | null |
--[[
Director.lua
@Author : DengSir (tdaddon@163.com)
@Link : https://dengsir.github.io
]]
local ns = select(2, ...)
local Util = ns.Util
local Addon = ns.Addon
local Action = ns.Action
local Condition = ns.Condition
local Director = Addon:NewModule('Director', 'AceEvent-3.0')
function Directo... | nilq/small-lua-stack | null |
function love.conf(t)
t.title="Possession"
t.version="11.2"
t.author="Weirdfellows"
t.identity="possessionroguelike"
t.url="http://possessiongame.com"
t.modules.physics=false
t.window.resizable = true
t.window.minwidth=1024
t.window.minheight=768
end | nilq/small-lua-stack | null |
bh_tusken_death_hunter = Creature:new {
objectName = "@mob/creature_names:tusken_death_hunter",
socialGroup = "tusken_raider",
faction = "tusken_raider",
level = 150,
chanceHit = 0.5,
damageMin = 395,
damageMax = 500,
baseXp = 4916,
baseHAM = 110000,
baseHAMmax = 112000,
armor = 1,
resists = {60,60,60,60,60... | nilq/small-lua-stack | null |
-- Copyright (c) 2021 Maksim Tuprikov <insality@gmail.com>. This code is licensed under MIT license
return {}
| nilq/small-lua-stack | null |
ccs = ccs or {}
---BoneNode object
---@class BoneNode : Node
local BoneNode = {}
ccs.BoneNode = BoneNode
--------------------------------
--
---@return float
function BoneNode:getDebugDrawWidth() end
--------------------------------
---@overload fun():array_table
---@overload fun():array_table
---@return array_table
... | nilq/small-lua-stack | null |
-- vim-highlightedyank
-- Make the yanked region apparent!
-- https://github.com/machakann/vim-highlightedyank
vim.g.highlightedyank_highlight_duration = 200
| nilq/small-lua-stack | null |
--vim: filetype=lua ts=2 sw=2 sts=2 et :
-- # Dump tables to string
-- Note for Python programmers:
-- To do something like in Python, inherit from ``o``:
--
-- class o(object):
-- def __init__(i, **k): i.__dict__.update(**k)
-- def __repr__(i):
-- return i.__class__.__name__ + str(
-- ... | nilq/small-lua-stack | null |
--[[
LuCI - Lua Configuration Interface
Copyright 2015 Promwad.com
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
$Id$
]]--
module("luci.controller.h... | nilq/small-lua-stack | null |
object_tangible_collection_rare_rifle_proton = object_tangible_collection_shared_rare_rifle_proton:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_rare_rifle_proton, "object/tangible/collection/rare_rifle_proton.iff") | nilq/small-lua-stack | null |
local awful = require("awful")
local wibox = require("wibox")
local naughty = require("naughty")
local gears = require("gears")
local beautiful = require("beautiful")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local utils = require("utils")
local timer = require("gears.timer")
... | nilq/small-lua-stack | null |
--[=[
Utility functions for manipulating terrain
@class TerrainUtils
]=]
local require = require(script.Parent.loader).load(script)
local Region3Utils = require("Region3Utils")
local Region3int16Utils = require("Region3int16Utils")
local Vector3int16Utils = require("Vector3int16Utils")
local TerrainUtils = {}
--[... | nilq/small-lua-stack | null |
-- Tests for 99bottles.lua
local nbottles = require '99bottles'
local total, pass = 1, 1
local function dec(str, len)
return #str < len
and str .. (('.'):rep(len-#str))
or str:sub(1,len)
end
print('99 bottles of beer lyrics:\n')
local lyrics = nbottles(99)
print(lyrics)
print('\n'..('-'):rep(80))
print... | nilq/small-lua-stack | null |
local cosock = require "cosock"
-- mDNS
local ADDRESS = "224.0.0.251"
local PORT = 5353
-- resolve host name using mDNS. resolution is called with each address
return function(name, resolution)
local labels = {}
for label in string.gmatch(name, "[%a%d-]+") do
table.insert(labels, string.pack("> s1", l... | nilq/small-lua-stack | null |
fx_version 'cerulean'
game 'gta5'
client_scripts {
"config.lua",
'client/native.lua',
'client/main.lua',
}
server_scripts {
"config.lua",
"@mysql-async/lib/MySQL.lua",
"server/native.lua",
"server/main.lua",
"version_checker.lua"
}
files {
"client/native_min.lu... | nilq/small-lua-stack | null |
--[[
RTA Timer
Author:
Museus (Discord: Museus#7777)
Track RTA time and display it below the IGT timer
]]
ModUtil.RegisterMod("RtaTimer")
local config = {
ModName = "RtaTimer",
DisplayTimer = true,
MultiWeapon = false,
}
if ModConfigMenu then
ModConfigMenu.Register(config)
end
func... | nilq/small-lua-stack | null |
-- Revert massive buff of insulated wire recipe
bobmods.lib.recipe.set_energy_required('insulated-cable', 2)
seablock.lib.substingredient('insulated-cable', 'tinned-copper-cable', nil, 8)
seablock.lib.substingredient('insulated-cable', 'rubber', nil, 8)
bobmods.lib.recipe.set_result('insulated-cable', {'insulated-cable... | nilq/small-lua-stack | null |
#!/usr/bin/env tarantool
-- Those lines of code are for debug purposes only
-- So you have to ignore them
-- {{
package.preload['mqtt.driver'] = './mqtt/driver.so'
-- }}
box.cfg {wal_mode = 'none'}
local os = require('os')
local mqtt = require('mqtt')
local yaml = require('yaml')
local fiber = require('fiber')
loca... | nilq/small-lua-stack | null |
-- TODO - multi coloured
colours = {
{ name = "red", rgb = {r=1.0, g=0.0, b=0.0} },
{ name = "green", rgb = {r=0.0, g=1.0, b=0.0} },
{ name = "blue", rgb = {r=0.0, g=0.0, b=1.0} },
{ name = "yellow", rgb = {r=1.0, g=1.0, b=0.0} },
{ name = "magenta", rgb = {r=1.0, g=0.0, b=1.0} },
{ name = "cyan"... | nilq/small-lua-stack | null |
-- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(..., package.seeall)
local ffi = require("ffi")
local C = ffi.C
local S = require("syscall")
local lib = require("core.lib")
local shm = require("core.shm")
local counter = require("core.counter")
local histogram = require("core.his... | nilq/small-lua-stack | null |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:29' using the latest game version.
NOTE: This file should only be used as IDE support; it should NOT be distributed with addons!
****************************************************************************
CONTENTS OF THIS FILE IS COPYRI... | nilq/small-lua-stack | null |
--[[
La suite de fibonaci
--]]
function fibo (a, b, i)
local out_ = 0
local a2 = a
local b2 = b
for j = 0, i + 1 do
io.write(j)
out_ = out_ + a2
local tmp = b2
b2 = b2 + a2
a2 = tmp
end
return out_
end
io.write(fibo(1, 2, 4))
| nilq/small-lua-stack | null |
--
-- Functions for Lua's operators
--
return {
first = function(x) return x end,
unm = function(x) return -x end,
add = function(x,y) return x + y end,
sub = function(x,y) return x - y end,
mul = function(x,y) return x * y end,
div = function(x,y) ... | nilq/small-lua-stack | null |
require "Assets.LuaScripts.Modulus.TimeMgr.Handler.BaseTimerHandler"
require "Assets.LuaScripts.Modulus.TimeMgr.Handler.MillTimerHandler"
require "Assets.LuaScripts.Modulus.TimeMgr.Handler.SecTimerHandler"
require "Assets.LuaScripts.Modulus.TimeMgr.Handler.MinTimerHandler"
require "Assets.LuaScripts.Modulus.TimeMgr.Ha... | nilq/small-lua-stack | null |
--[[
Vectors for operations in a d-dimensional space.
]]
_libs = _libs or {}
require('tables')
require('maths')
local table, math = _libs.tables, _libs.maths
vector = {}
_libs.vectors = vector
_meta = _meta or {}
_meta.V = {}
_meta.V.__index = vector
_meta.V.__class = 'Vector'
-- Constructor for vectors. Optiona... | nilq/small-lua-stack | null |
AddCSLuaFile()
include("acf/shared/sh_acfm_getters.lua")
local function checkIfDataIsMissile(data)
local guns = list.Get("ACFEnts").Guns
local class = guns[data.Id]
if not (class and class.gunclass) then
return oldDisplayData(data)
end
local classes = list.Get("ACFClasses").GunClass
class = classes[... | nilq/small-lua-stack | null |
require("prototypes.constants")
data.raw["underground-belt"]["express-underground-belt"].max_distance = 11
local stacksize = 50
if settings.startup["ore_stacks_200"].value then
stacksize = 200
data.raw.item["iron-plate"].stack_size = stacksize
data.raw.item["copper-plate"].stack_size = stacksize
data.raw.item["s... | nilq/small-lua-stack | null |
local PLUGIN = PLUGIN;
local Clockwork = Clockwork;
-- Called when a player's weapons should be given.
function PLUGIN:PlayerGiveWeapons(player)
if (player:GetFaction() == FACTION_CREMATOR) then
Clockwork.player:GiveSpawnWeapon(player, "cw_immolator");
Clockwork.player:GiveSpawnWeapon(player, "cw_beam_immolator"... | nilq/small-lua-stack | null |
util.AddNetworkString( "AM_Notify" )
function AM_Notify( ply, text, broadcast )
if broadcast then
net.Start( "AM_Notify" )
net.WriteString( text )
net.Broadcast()
return
end
net.Start( "AM_Notify" )
net.WriteString( text )
net.Send( ply )
end
function AM_TrimModel( model )
if isstring( model ) then
lo... | nilq/small-lua-stack | null |
-----------------------------------------
-- ID: 4759
-- Scroll of Blizzard III
-- Teaches the black magic Blizzard III
-----------------------------------------
function onItemCheck(target)
return target:canLearnSpell(151)
end
function onItemUse(target)
target:addSpell(151)
end | nilq/small-lua-stack | null |
object_mobile_azure_cabal_greel_scoundrel_f_01 = object_mobile_shared_azure_cabal_greel_scoundrel_f_01:new {
}
ObjectTemplates:addTemplate(object_mobile_azure_cabal_greel_scoundrel_f_01, "object/mobile/azure_cabal_greel_scoundrel_f_01.iff")
| nilq/small-lua-stack | null |
-- file: setup.lua
local module = {}
local function wifi_wait_ip()
if wifi.sta.getip()== nil then
print("IP unavailable, Waiting...")
else
tmr.stop(1)
print("\n====================================")
print("ESP8266 mode is: " .. wifi.getmode())
print("MAC address is: " .. wifi.ap.getmac())
p... | nilq/small-lua-stack | null |
object_mobile_naboo_tanoa_vills = object_mobile_shared_naboo_tanoa_vills:new {
}
ObjectTemplates:addTemplate(object_mobile_naboo_tanoa_vills, "object/mobile/naboo_tanoa_vills.iff")
| nilq/small-lua-stack | null |
local IO = terralib.includec("stdio.h")
local stdlib = terralib.includec("stdlib.h")
local number = double
local alignment = 8
local function isinteger(x) return math.floor(x) == x end
local llvmprefetch = terralib.intrinsic("llvm.prefetch",{&opaque,int,int,int} -> {})
local dotune = true
-- terra naivel1conv(A : &do... | nilq/small-lua-stack | null |
reclusive_roba = Creature:new {
objectName = "@mob/creature_names:reclusive_roba",
socialGroup = "self",
faction = "",
level = 30,
chanceHit = 0.39,
damageMin = 290,
damageMax = 300,
baseXp = 3005,
baseHAM = 8400,
baseHAMmax = 10200,
armor = 0,
resists = {20,20,20,160,-1,160,-1,-1,-1},
meatType = "meat_car... | nilq/small-lua-stack | null |
local panelData = {
type = "panel",
name = "Window Title",
displayName = "Longer Window Title",
author = "Seerah",
version = "1.3",
slashCommand = "/myaddon", --(optional) will register a keybind to open to this panel
registerForRefresh = true, --boolean (optional) (will refresh all o... | nilq/small-lua-stack | null |
AddCSLuaFile()
local name = "Jaguar XFR SEG Photon"
local A = "AMBER"
local R = "RED"
local B = "BLUE"
local W = "WHITE"
local CW = "C_WHITE"
local SW = "S_WHITE"
local EMV = {}
EMV.Siren = 5
EMV.Color = nil
EMV.Skin = 0
EMV.Positions = {
--Front Grill
{ Vector(-7.25,114.075,32.6), Angle(0,0,25.2), "led_sqr" }, --... | nilq/small-lua-stack | null |
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Packages = script.Parent.Parent.Parent
local Roact = require(Packages.Roact)
local ClientContext = require(script.Parent.ClientContext)
local BusControlsInner = Roact.Component:extend("BusControlsInne... | nilq/small-lua-stack | null |
local function runString (commandstring)
outputChatBoxR("Executing client-side command: "..commandstring)
local notReturned
--First we test with return
local commandFunction,errorMsg = loadstring("return "..commandstring)
if errorMsg then
--It failed. Lets try without "return"
notReturned = true
commandFunc... | nilq/small-lua-stack | null |
local BaseInstance = import("./BaseInstance")
local AnalyticsService = import("./AnalyticsService")
local ContentProvider = import("./ContentProvider")
local CoreGui = import("./CoreGui")
local ContextActionService = import("./ContextActionService")
local CorePackages = import("./CorePackages")
local CreatorTyp... | nilq/small-lua-stack | null |
Pipe = Class{}
PIPE_IMAGE = {
['red'] = love.graphics.newImage('assets/sprites/pipe/RedPipe.png'),
['blue'] = love.graphics.newImage('assets/sprites/pipe/BluePipe.png'),
['green'] = love.graphics.newImage('assets/sprites/pipe/GreenPipe.png'),
}
function Pipe:init(offset, isTop)
self.color = 'blue'
... | nilq/small-lua-stack | null |
local Class = require("lib.middleclass")
local Frequency = Class("Frequency")
function Frequency:initialize(r, g, b)
self.r = r
self.g = g
self.b = b
end
return Frequency | nilq/small-lua-stack | null |
local utils = require(GetScriptDirectory() .. "/util")
local npcBot = GetBot();
local castSFDesire = 0;
local MoveDesire = 0;
local AttackDesire = 0;
local npcBotAR = 0;
local ProxRange = 1500;
function MinionThink( hMinionUnit )
if not hMinionUnit:IsNull() and hMinionUnit ~= nil then
if string.find(hMinionUnit:Ge... | nilq/small-lua-stack | null |
-- @Author: KevinZhang
-- @Date: 2017-11-14 20:58:55
-- @Last Modified by KevinZhang
-- @Last Modified time 2018-01-22 11:23:31
local TongZhang = import("..base.TongZhang")
local CardBase = import("..base.CardBase")
local M = class(TongZhang)
-- 牌型:对子
-- 特征:牌点相同的两张牌,不区分花色
function M:ctor(data,ruleDao... | nilq/small-lua-stack | null |
---------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
-- INTERPOLATION HELPERS -----------------------------------------------... | nilq/small-lua-stack | null |
local NegInversion, parent = torch.class('nn.NegInversion', 'nn.Module')
function NegInversion:__init(inversion)
parent.__init(self)
self.inversion = inversion or nil
end
function NegInversion:updateOutput(input)
self.output = input
--print(self.inversion:nElement().."->"..self.output:size(2))
if self.in... | nilq/small-lua-stack | null |
return {
---entire buffer text object
setup = function()
vim.keymap.set('x', 'ie', '<cmd>keepjumps normal! gg0oG$<cr>', { silent = true })
vim.keymap.set('x', 'ae', '<cmd>keepjumps normal! gg0oG$<cr>', { silent = true })
vim.keymap.set('o', 'ie', '<cmd>keepjumps normal! ggVG<cr>', { silent = true })
vim.keym... | nilq/small-lua-stack | null |
--
-- Copyright 2010-2021 Branimir Karadzic. All rights reserved.
-- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
--
project "geometryc"
uuid (os.uuid("geometryc"))
kind "ConsoleApp"
includedirs {
path.join(BX_DIR, "include"),
path.join(BGFX_DIR, "include"),
path.join(BGFX_DIR, "3rdparty")... | nilq/small-lua-stack | null |
require(game.ServerScriptService.Server.runTests)()
| nilq/small-lua-stack | null |
return {
postgres = {
up = [[
DO $$
BEGIN
ALTER TABLE IF EXISTS ONLY "header_translator_dictionary" ADD "cache_key" TEXT UNIQUE;
EXCEPTION WHEN DUPLICATE_COLUMN THEN
-- Do nothing, accept existing state
END;
$$;
]]
... | nilq/small-lua-stack | null |
local Core = {}
--Quick to use empty sprite
function Core.empty_sprite()
return {
filename = "__core__/graphics/empty.png",
priority = "extra-high",
width = 1,
height = 1
}
end
--Quick to use empty animation
function Core.empty_animation()
return {
filename = Core.e... | nilq/small-lua-stack | null |
--
-- Copyright (c) 2017, Jesse Freeman. All rights reserved.
--
-- Licensed under the Microsoft Public License (MS-PL) License.
-- See LICENSE file in the project root for full license information.
--
-- Contributors
-- --------------------------------------------------------
-- This is the official list of Pixel Visi... | nilq/small-lua-stack | null |
--[[
© 2020 TERRANOVA do not share, re-distribute or modify
without permission of its author (zacharyenriquee@gmail.com).
--]]
local Schema = Schema;
local PLUGIN = PLUGIN;
util.AddNetworkString("ixCpSystemRequestTaglines")
util.AddNetworkString("ixCpSystemReceiveTaglines")
function PLUGIN:LoadData()
for _, v in ... | nilq/small-lua-stack | null |
IncludeDir = {}
IncludeDir["redaxe"] = "%{wks.location}/Redaxe"
IncludeDir["glad"] = "%{wks.location}/Redaxe/vendor/Glad/include"
IncludeDir["glfw"] = "%{wks.location}/Redaxe/vendor/Glfw/include"
IncludeDir["spdlog"] = "%{wks.location}/Redaxe/vendor/SpdLog/include"
IncludeDir["imgui"] = "%{wks.location}/Redaxe/vendor/I... | nilq/small-lua-stack | null |
----------------------------------------------------------------------------------------------------
-- This is a singleton class that manages MOAIDeck.
--
-- @author Makoto
-- @release V3.0.0
----------------------------------------------------------------------------------------------------
-- import
local C... | nilq/small-lua-stack | null |
-----------------------------------------------------------------------------------------
-- help.lua
-- (c) 2018, Velocity by Jericho Crosby <jericho.crosby227@gmail.com>
-----------------------------------------------------------------------------------------
local composer = require( "composer" )
local scene = compo... | nilq/small-lua-stack | null |
custom = {
alpha = 0,
progress = 0
}
pickColor = {
r = 255,
g = 255,
b = 255
}
customLoops = {
{ img = "files/img/custom/car_color.png", title = "Cor Do Carro", subTitle = "Comprar nova cor do carro.", butText = "Comprar - $40000"},
{ img = "files/img/custom/car_lights.png", title = "Cor Do Farol", subTitl... | nilq/small-lua-stack | null |
return {
version = "1.1",
luaversion = "5.1",
tiledversion = "1.1.5",
orientation = "orthogonal",
renderorder = "right-down",
width = 100,
height = 100,
tilewidth = 32,
tileheight = 32,
nextobjectid = 14,
properties = {},
tilesets = {
{
name = "Tileset",
firstgid = 1,
filen... | nilq/small-lua-stack | null |
local module = {}
table = require(script.Parent.Table)
local switch = {}
setmetatable(switch, {
__call = function(self, item)
if not item then
warn("Switch statement needs a value to be compared")
else
return function(data)
for i, v in pairs(data) do
if item == module.convertFromString(i) then
... | nilq/small-lua-stack | null |
local utils = {}
function utils.get_document_title(splash)
return splash:evaljs("document.title")
end
local secret = require("secret")
utils.hello = secret.hello
return utils
| nilq/small-lua-stack | null |
-- This is a VT100 terminal output writer for Pandoc.
-- Inwoke with: pandoc -t terminal.lua
-- Copyright (c) 2018 Orange
-- Homepage: https://github.com/Orange-OpenSource/pandoc-terminal-writer
-- This module is released under the MIT License (MIT).
-- Please see LICENCE.txt for details.
-- Author: Camille Oudot
-- ... | nilq/small-lua-stack | null |
discordlib.optiontype =
{
SUB_COMMAND = 1,
SUB_COMMAND_GROUP = 2,
STRING = 3,
INTEGER = 4,
BOOLEAN = 5,
USER = 6,
CHANNEL = 7,
ROLE = 8,
MENTIONABLE = 9,
NUMBER = 10,
}
function discordlib.slashcmd()
local slashcmd = {
description = "",
opti... | nilq/small-lua-stack | null |
--[[
MailSlurp API
MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - ... | nilq/small-lua-stack | null |
local playsession = {
{"rocifier", {296017}},
{"z903857322", {7977}},
{"Fingerdash", {1793}},
{"Tranic", {9727}},
{"Menander", {2206378}},
{"TiTaN", {1985830}},
{"Nikkichu", {1043679}},
{"Avelix", {368499}},
{"t_Mind", {70149}},
{"everLord", {1583728}},
{"facere", {817235}},
{"Piewdennis", {63894}},
{"davi... | nilq/small-lua-stack | null |
--[[
TheNexusAvenger
Implementation of a command.
--]]
local BaseCommand = require(script.Parent.Parent:WaitForChild("BaseCommand"))
local Command = BaseCommand:Extend()
--[[
Creates the command.
--]]
function Command:__new()
self:InitializeSuper("crash","BasicCommands","Crashes a set of players. Admins can no... | nilq/small-lua-stack | null |
bt = {}
bt.reset = {}
bt.reset["repeat"]= function(...)
end
local bt_fns = {
reset={},
tick={},
}
-- nodes never call :reset() on themselves
-- distance on x-z plane
function distance(a, b)
local x = a.x - b.x
local z = a.z - b.z
return math.abs(math.sqrt(x*x + z*z))
end
-- 3d distance
function distan... | nilq/small-lua-stack | null |
include("shared.lua")
ENT.RenderGroup = RENDERGROUP_BOTH
function ENT:Draw()
self:DrawModel()
if self:GetPos():Distance(LocalPlayer():GetPos()) < 600 then
local pos = self:GetPos() + Vector(0, 0, 1) * math.sin(CurTime() * 2) * 2
local PlayersAngle = LocalPlayer():GetAngles()
local ang = Angle( 0, Player... | nilq/small-lua-stack | null |
cfg = {}
-- Configure blip colors at cfg/display.lua
cfg.teams = { -- Only one team for each group, you can set multiple teams, groups on same team will see each other's blips
["Politi"] = { -- Team name must be unique
-- groups
"Politi-Job",
"EMS-Job"
},
}
return cfg | nilq/small-lua-stack | null |
-- Setup work thread
-- ==========================================================
function OnMsg.GameTimeStart()
AutoScanMapInstallThread()
end
function OnMsg.LoadGame()
AutoScanMapInstallThread()
end
local AutoScanMapModActive = true
function AutoScanMapInstallThread()
-- make sure the handler thread i... | nilq/small-lua-stack | null |
local F = "__subway__";
require("circuit-connector-sprites")
local power_batch_size = settings.startup["subway-power-batching"].value or 1
local function cwc0c()
return {shadow = {red = {0,0},green = {0,0},copper = {0,0}}, wire = {red = {0,0},green = {0,0},copper = {0,0}}}
end
local function blank()
return {
fi... | nilq/small-lua-stack | null |
-- interface:
PalettesInfo = {
Count = PalettesInfo and PalettesInfo.Count or 200, -- new maximum number of palettes
-- PtrGetBW -> void* __fastcall GetBW(int palID)
-- calling: return mem.call(PalettesInfo.PtrGetBW, 2, palID)
-- PtrGetRed in MM6 (similar)
-- shades of other colors are obtained using traditio... | nilq/small-lua-stack | null |
RegisterNetEvent('8bit_phone:client:SetSettings')
AddEventHandler('8bit_phone:client:SetSettings', function(data)
Config.Settings = data
SendNUIMessage({
action = 'setup',
data = { name = 'settings', data = data }
})
end)
RegisterNUICallback('ToggleMute', function(data, cb)
if data.mute... | nilq/small-lua-stack | null |
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by torvald.
--- DateTime: 2019-11-03 22:00
---
require("document")
local args = {...}
local dir = args[1] or env.PWD
--print("args-1",args[1])
-- resolve relative dir
if args[1] and args[1]:byte(1) ~= 0x2F and args[1]:byte(1) ~= 0x5C then
dir ... | nilq/small-lua-stack | null |
object_intangible_ship_lambda_pcd = object_intangible_ship_shared_lambda_pcd:new {
}
ObjectTemplates:addTemplate(object_intangible_ship_lambda_pcd, "object/intangible/ship/lambda_pcd.iff")
| nilq/small-lua-stack | null |
-------------------------------------------------
-- Battery Widget for Awesome Window Manager
-- Shows the battery status using the ACPI tool
-- More details could be found here:
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/battery-widget
-- @author Pavel Makhov
-- @copyright 2017 Pavel Makhov
--... | nilq/small-lua-stack | null |
local n="koolddns"
local i=require"luci.dispatcher"
local o=require"luci.model.network".init()
local m=require"nixio.fs"
local a,t,e
arg[1]=arg[1]or""
a=Map(n,translate("Koolddns Config"))
a.redirect=i.build_url("admin","services","koolddns")
t=a:section(NamedSection,arg[1],"koolddns","")
t.addremove=false
t.dynamic=fa... | nilq/small-lua-stack | null |
language.Add("pac_projectile", "Projectile")
local PART = {}
PART.ClassName = "projectile"
PART.Group = 'advanced'
PART.Icon = 'icon16/bomb.png'
pac.StartStorableVars()
pac.GetSet(PART, "Speed", 1)
pac.GetSet(PART, "AddOwnerSpeed", false)
pac.GetSet(PART, "Damping", 0)
pac.GetSet(PART, "Gravity", true)
pac.GetS... | nilq/small-lua-stack | null |
-- Converted From LST file data\pathfinder\paizo\roleplaying_game\core_essentials\ce_abilitycategories.lst
-- From repository https://github.com/pcgen/pcgen at commit 11ceb52482855f2e5f0f6c108c3dc665b12af237
DefineAbilityCategory({
Name="Racial Size",
Category="Racial Size",
Editable=false,
EditPool=true,
Fra... | nilq/small-lua-stack | null |
local UV = require "luv"
local Hub = require "luver.hub"
local Luver = {}
function Luver.start(f)
Hub:fork_callback(f)
UV.run()
end
function Luver.stop()
UV.stop()
end
function Luver.fork(f, ...)
Hub:fork_callback(f, ...)
end
function Luver.sleep(ts)
Hub:sleep(ts)
end
function Luver.now()
... | nilq/small-lua-stack | null |
--- GENERATED CODE - DO NOT MODIFY
-- Amazon CloudSearch Domain (cloudsearchdomain-2013-01-01)
local M = {}
M.metadata = {
api_version = "2013-01-01",
json_version = "1.1",
protocol = "rest-json",
checksum_format = "",
endpoint_prefix = "cloudsearchdomain",
service_abbreviation = "",
service_full_name = "Amazo... | nilq/small-lua-stack | null |
local function checkLength( value )
return value and #value >= 0 and #value <= 165
end
local allowedImageHosts = {
["imgur.com"] = true,
["hizliresim.com"] = true,
["resimag.com"] = true,
}
local imageExtensions = {
[".jpg"] = true,
[".jpeg"] = true,
[".png"] = true,
[".gif"] = true,
}
function verifyImageURL(... | nilq/small-lua-stack | null |
--[[
ThemePrefsRows: you give it the choices, values, and params, and it'll
generate the rest; quirky behavior to be outlined below. Documentation
will be provided once this system is stabilized.
v0.5.2: Dec. 28, 2010. Throw an error for default/value type mismatches.
v0.5.1: Dec. 27, 2010. Fix Choices not necessarily... | nilq/small-lua-stack | null |
local cc = require("classcommons2")
return assert(cc.instance)
| nilq/small-lua-stack | null |
dofile "build/setup.lua"
require "luci.lucid".start()
| nilq/small-lua-stack | null |
local event = {}
_OSENV.event = {
timers = {}
}
local function updateTimers()
for k, timer in pairs(_OSENV.event.timers) do
if computer.uptime() >= timer.started + timer.time then
timer.callback()
if timer.type == "after" then
table.remove(_OSENV.ev... | nilq/small-lua-stack | null |
local Nonogram = require("core.module.model.Nonogram");
local function GameModel()
local model = {};
model.selection_sector = nil;
model.base_nonogram = nil;
model.trace_nonogram = nil;
function model:init(nonogram_data)
self.base_nonogram = Nonogram(nonogram_data);
self.trace_nonogram = Nonogr... | nilq/small-lua-stack | null |
-- Abstract: InMobi plugin
-- Version: 1.0
-- Sample code is MIT licensed; see https://www.coronalabs.com/links/code/license
---------------------------------------------------------------------------------------
local widget = require( "widget" )
local inMobi = require( "plugin.inMobi" )
local json = require("json")... | nilq/small-lua-stack | null |
return (function (modules, ...)
local _G = _G
local error = _G.error
local setfenv = _G.setfenv
local setmetatable = _G.setmetatable
local moduleCache = {}
local packageGlobals = {}
local function makeEnvironment(moduleChunk)
local exports = {}
... | nilq/small-lua-stack | null |
ATTRIBUTE.name = "Magic Power"
ATTRIBUTE.desc = "Increases Magic Power and Mana regen."
ATTRIBUTE.maxValue = 100
ATTRIBUTE.noStartBonus = false
function ATTRIBUTE:onSetup(client, value)
end | nilq/small-lua-stack | null |
LinkLuaModifier( "modifier_item_shivas_guard_thinker", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_item_shivas_cuirass", "items/shivas_cuirass.lua",LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_item_shivas_cuirass_aura", "items/shivas_cuirass.lua",LUA_MODIFIER_MOTION_NONE )
--------------------------... | nilq/small-lua-stack | null |
--[[
Copyright 2014 Google Inc. All Rights Reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file or at
https://developers.google.com/open-source/licenses/bsd
]]
require 'torch'
require 'image'
local M = {}
-- Copies values from src to dst.
local function update(d... | nilq/small-lua-stack | null |
object_mobile_dressed_meatlump_hideout_female_03 = object_mobile_shared_dressed_meatlump_hideout_female_03:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_meatlump_hideout_female_03, "object/mobile/dressed_meatlump_hideout_female_03.iff")
| nilq/small-lua-stack | null |
require "scriptlets-driver.juju"
framework = Juju:new()
function pre_install_scriptlet(model, event)
current_config = model:load_config()
for u in list_iter(model.units) do
u.open_port(80, current_config.service_port)
end
-- model.set_application_port(4080)
end
function post_start_scriptlet(model, ... | nilq/small-lua-stack | null |
-- Use <Tab> and <S-Tab> to navigate through popup menu
vim.api.nvim_set_keymap('i', '<Tab>', 'pumvisible() ? "\\<C-n>" : "\\<Tab>"', {expr = true})
vim.api.nvim_set_keymap('i', '<S-Tab>', 'pumvisible() ? "\\<C-p>" : "\\<Tab>"', {expr = true})
-- Set completeopt to have a better completion experience
vim.o.completeopt... | nilq/small-lua-stack | null |
function isReturnHome()
local emptySlot = 0;
for i=1, 16 do
if(turtle.getItemCount(i) == 0) then emptySlot = emptySlot + 1 end
end
if(emptySlot <= 0)then return true
else return false
end
end
function returnToHome(z)
for cz=1, z do
upTurtle()
end
end
function returnToCurrentZ(z)
for cz=1, z... | nilq/small-lua-stack | null |
require("harpoon").setup({
projects = {
["/home/theprimeagen/personal/harpoon/{}"] = {
term = {
cmds = {
"echo hello {}"
}
},
},
["/home/theprimeagen/work/nrdp/{}"] = {
term = {
cmds = {
... | nilq/small-lua-stack | null |
function GM:AddNotify( str, type, length )
notification.AddLegacy( str, type, length )
end
function GM:PaintNotes()
end
| nilq/small-lua-stack | null |
local php = {}
-- php -r 'var_dump(array_flip(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES | ENT_HTML5, "UTF-8")));'
php.getEntityTable = function() return entitytable end
-- see [https://github.com/wikimedia/mediawiki/blob/master/includes/parser/StripState.php], but we don't have Parser.php, no need to unstr... | nilq/small-lua-stack | null |
local ServerStorage = game:GetService("ServerStorage")
local MonsterDictionary = require(ServerStorage.Monster.MonsterDictionary)
local MonsterBlocks = ServerStorage.MonsterBlocks.MonsterBlock
local RunSerivce = game:GetService("RunService")
local SignalEvent = require(ServerStorage.Utility.SignalEvent)
local Collectio... | nilq/small-lua-stack | null |
local HallCommonHeadItemButton = class(Button, false);
HallCommonHeadItemButton.ctor = function(self, data, index, isNeedTip)
super(self, "hall/common/bg_blank.png");
self.m_imgFiles = data.imgFiles;
self.m_text = data.text;
self.m_index = index;
self.m_isNeedTip = isNeedTip;
local w,h = 195,118;
sel... | 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.