content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
local CATEGORY_NAME = "Voting"
---------------
--Public vote--
---------------
if SERVER then ulx.convar( "voteEcho", "0", _, ULib.ACCESS_SUPERADMIN ) end -- Echo votes?
-- First, our helper function to make voting so much easier!
function ulx.doVote( title, options, callback, timeout, filter, noecho, ... )
timeout ... | nilq/small-lua-stack | null |
-- AddOn class definition
AddOn = CreateClass(function (addon, name, version)
addon.name = name;
if (version ~= nil) then addon.version = version; end
addon.locale = {};
end);
-- Member functions
function AddOn:GetInfos()
local str = self.name;
if (self.version ~= nil) then
str =... | nilq/small-lua-stack | null |
TUTORIALS['en'][#TUTORIALS['en'] + 1] = {
name = "World Map",
contents = {
{type = CONTENT_TYPES.IMAGE, value = "/images/tutorial/world_map.png"},
{type = CONTENT_TYPES.TEXT, value = "An interesting option to view PSoul full map is through the world map. To open this window, press Ctrl + Shift +... | nilq/small-lua-stack | null |
buffer = Procedural.TextureBuffer(128)
Procedural.Gradient(buffer):setColours(Procedural.ColourValue_Black, Procedural.ColourValue_Red, Procedural.ColourValue_Green, Procedural.ColourValue_Blue):process()
Procedural.AlphaMask(buffer):setParameterImage(bufferCellNormal):process()
tests:addTextureBuffer(buffer)
dotfile =... | nilq/small-lua-stack | null |
Vector2 = {}
Vector2.meta = {
__index = Vector2,
__tostring = function( v )
return "{"..tostring( v.x )..", "..tostring( v.y ).."}"
end,
__add = function( v1, v2 )
return Vector2:new( v1.x + v2.x, v1.y + v2.y )
end,
__sub = function( v1, v2 )
return Vector2:new( v1.x - v2.x, v1.y - v2.y )
end,
__mul = fun... | nilq/small-lua-stack | null |
-- Server Objects
includeFile("custom_content/static/worldbuilding/organic/taun_skel_s01.lua")
includeFile("custom_content/static/worldbuilding/organic/taun_skel_s02.lua")
includeFile("custom_content/static/worldbuilding/organic/taun_skel_s03.lua")
includeFile("custom_content/static/worldbuilding/organic/taun_skel_s04.... | nilq/small-lua-stack | null |
---@class TouchKey:cc.Sprite
local TouchKey = class("TouchKey", function(texture)
return cc.Sprite:createWithTexture(texture)
end)
TouchKey.__index = TouchKey
local StateGrabbed = 0
local StateUngrabbed = 1
TouchKey._state = StateGrabbed
function TouchKey:rect()
local s = self:getTexture():getContentSize()
... | nilq/small-lua-stack | null |
--- === plugins.finalcutpro.hud.panels.info ===
---
--- Info Panel for the Final Cut Pro HUD.
local require = require
--local log = require "hs.logger".new "info"
local image = require "hs.image"
local fcp = require "cp.apple.finalcutpro"
local tools = r... | nilq/small-lua-stack | null |
object_building_kashyyyk_decd_wroshyr_tree_branches_dead01 = object_building_kashyyyk_shared_decd_wroshyr_tree_branches_dead01:new {
}
ObjectTemplates:addTemplate(object_building_kashyyyk_decd_wroshyr_tree_branches_dead01, "object/building/kashyyyk/decd_wroshyr_tree_branches_dead01.iff")
| nilq/small-lua-stack | null |
--[[
A library to make the manipulation of the action packet easier.
The primary functionality provided here are iterators which allow for
easy traversal of the sub-tables within the packet. Example:
=======================================================================================
require('actions')
function e... | nilq/small-lua-stack | null |
local _, Addon = ...
local Ability = Addon.UI.Groups.Ability
local DCL = Addon.Libs.DCL
local HBDPins = Addon.Libs.HBDPins
local L = Addon.Locale
local PinHelper = Addon.UI.PinHelper
local Widgets = Addon.UI.Widgets
function Ability:Create(parent, ability, rankIndex)
-- Tooltip/heading button.
local title = ("%s (... | nilq/small-lua-stack | null |
local Bucket
Bucket = require("cloud_storage.google").Bucket
local execute
execute = function(cmd)
local proc = io.popen(cmd)
local out = proc:read("*a")
proc:close()
return out:match("^(.-)%s*$")
end
local MockStorage
do
local _class_0
local _base_0 = {
bucket = function(self, bucket)
return Buck... | nilq/small-lua-stack | null |
return {
summary = 'Different ways arcs can be drawn.',
description = 'Different ways arcs can be drawn with `lovr.graphics.arc`.',
values = {
{
name = 'pie',
description = [[
The arc is drawn with the center of its circle included in the list of points (default).
]]
},
{
... | nilq/small-lua-stack | null |
--[[
Registry.lua
]]
local Constants = require(script.Parent.Parent.Core.Constants)
local Pool = require(script.Parent.Parent.Core.Pool)
local DEBUG = Constants.DEBUG
local ENTITYID_MASK = Constants.ENTITYID_MASK
local ENTITYID_WIDTH = Constants.ENTITYID_WIDTH
local NONE = Constants.NONE
local NULL_ENTITYID = Constan... | nilq/small-lua-stack | null |
--
-- Testmodule initialisation, this script is called via autoload mechanism when the
-- TeamSpeak 3 client starts.
--
require("ts3init") -- Required for ts3RegisterModule
require("z20backupmyts3/events") -- Forwarded TeamSpeak 3 callbacks
require("sgtcommon/sgt-common") -- Common functions for my l... | nilq/small-lua-stack | null |
--[[--
trace.debug_trace(
message -- optional message to add
)
This function includes a traceback into the debugging log
--]]--
function trace.debug_trace(message)
trace._new_entry{ type = "traceback", message = tostring(debug.traceback(message or "", 2)) }
end
| nilq/small-lua-stack | null |
local S = ethereal.intllib
-- register Ethereal wood type gates
doors.register_fencegate("ethereal:fencegate_scorched", {
description = S("Scorched Wood Fence Gate"),
texture = "scorched_tree.png",
material = "ethereal:scorched_tree",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.re... | nilq/small-lua-stack | null |
local mdoor_list = { --Number , Description , Inven Image , Image
-- {"Misc Door 1" , "door1"},
-- {"Misc Door 2" , "door2"},
{"Misc Door 3" , "door3"},
{"Misc Door 4" , "door4"},
-- {"Misc Door 5" , "door5"},
}
for i in ipairs(mdoor_list) do
local desc = mdoor_list[i][1]
local img = mdoor_list[i][2]
doors.re... | nilq/small-lua-stack | null |
assert(i==1)
assert(f==2)
assert(d==3)
assert(s=="Hello world")
assert(n=="Hi there")
--Assigning strings to char arrays not supported in tolua++ (?)
--n = "Hello"
--assert(n=="Hello")
assert(a.i==11)
assert(a.f==12)
assert(a.d==13)
assert(a.s=="Hello world from class")
assert(a.n=="Hi there from class")
--a.n = "Hell... | nilq/small-lua-stack | null |
-- Set completeopt to have a better completion experience
vim.o.completeopt = 'menuone,noselect,menu'
-- Setup nvim-cmp.
local cmp = require'cmp'
require("nvim-autopairs").setup({
check_ts = true,
map_c_w = true,
})
-- If you want insert `(` after select function or method item
local cmp_autopairs = require('nvi... | nilq/small-lua-stack | null |
-- example HTTP POST script which demonstrates setting the
-- HTTP method, body, and adding a header
wrk.method = "POST"
tableIn = 0
index = 0
arr = {}
request = function()
local f = assert(io.open("/users/moyan/downloads/query_result.txt", 'r'))
count = 0
if arr[0] == nil then
while true do
line =... | nilq/small-lua-stack | null |
--迭代函数都难写易用
function all_words()
local line = io.read() -- current line
local pos = 1 -- current position in the line
return function () -- iterator function
while line do -- repeat while there are lines
local s, e = string.find(line, "%w+", pos)
if s then -- found a word?
pos = e + 1 -- next posi... | nilq/small-lua-stack | null |
local cpath = select(1, ...) or "" -- callee path
local function nTimes(n, f, x) for i = 0, n - 1 do x = f(x) end return x end -- calls n times f(x)
local function rmlast(str) return str:sub(1, -2):match(".+[%./]") or "" end -- removes last dir / file from the callee path
local cdpath = rmlast(cpath) -- callee dir path... | nilq/small-lua-stack | null |
return function (tableA, tableB)
local minTable = {}
for ind, valA in pairs(tableA) do
if tableB[ind] then
minTable[ind] = valA < tableB[ind] and valA or tableB[ind]
else
error("tables did not have matching indices")
return
end
end
return minTable
end | nilq/small-lua-stack | null |
-- Natural Selection 2 Competitive Mod
-- Source located at - https://github.com/xToken/CompMod
-- lua\CompMod\Mixins\WalkMixin\shared.lua
-- - Dragon
WalkMixin = CreateMixin( WalkMixin )
WalkMixin.type = "Walk"
WalkMixin.networkVars =
{
walking = "boolean"
}
function WalkMixin:__initmixin()
self.walking = f... | nilq/small-lua-stack | null |
-----------------------------------------------------
FACTION.name = "Panzergrenadiers"
FACTION.desc = "- Donator $5 Pack Includes 2500 Reichsmarks On 1 Citizen Char and Panzergrenadier - Heavily Armed Panzergrenadiers."
FACTION.color = Color(0, 29, 255)
FACTION_PZG = FACTION.index
FACTION.isPubl... | nilq/small-lua-stack | null |
--for _, force in pairs(game.forces) do
-- force.reset_technologies()
-- if force.technologies['electronics'].researched then
-- force.recipes['solder-alginic'].enabled = true
-- end
--end
| nilq/small-lua-stack | null |
--This script is a simple documentation of a tree in a Lua table with a file dialog
actualtree={branchname="Standard-Baumansicht",
arg[0]}
--dofile("filename_with_actualtree_also_possible.lua")
--1. basic data
--1.1 libraries
require("iuplua") --require iuplua for GUIs
--1.2 initalize clipboard
clipboard... | nilq/small-lua-stack | null |
local RD = {}
--local nettable = {};
--local ent_table = {};
local resourcenames = {}
local resources = {}
local status = false
local rd_cache = cache.create(1, false) --Store data for 1 second
--[[
]]
--local functions
RD_OverLay_Distance = CreateClientConVar("rd_overlay_distance", "512", false, false)
RD_OverLay_... | nilq/small-lua-stack | null |
local min = math.min
local max = math.max
local now = ngx.now
local sleep = ngx.sleep
local DEFAULT_EXPTIME = 3600
local DEFAULT_TIMEOUT = 5
local NAME_KEY = "channel_up"
local POST_VAL_KEY_PREFIX = "channel_post_value_"
local RESP_VAL_KEY_PREFIX = "channel_resp_value_"
local function waitstep(step, deadline)
sl... | nilq/small-lua-stack | null |
local skynet = skynet or require "skynet"
local crypt = skynet.crypt or require "skynet.crypt"
local tableHelper = require "TableHelper"
local strHelper = require "StringHelper"
local data = nil
local path
if skynet.init then
path = "client/auth.tmp"
else
path = cc.FileUtils:getInstance():getWrit... | nilq/small-lua-stack | null |
TriggerEvent('chat:addSuggestion', '/ped.female', 'Set your ped as a Female', {
{ name="Model", help="Female Peds: 0 - 61" }
})
-- FEMALE PEDS --
RegisterCommand('ped.female', function(source,args)
local id = PlayerPedId()
local ped = args[1]
if ped == '0' then
TriggerEvent('femaleciv0... | nilq/small-lua-stack | null |
local nvim = require'nvim'
local load_module = require'tools'.helpers.load_module
local plugins = nvim.plugins
local set_autocmd = nvim.autocmds.set_autocmd
-- local set_command = nvim.commands.set_command
-- local set_mapping = nvim.mappings.set_mapping
local treesitter = load_module'nvim-treesitter.configs'
... | nilq/small-lua-stack | null |
--[[
Leaderboards - World (Client)
1.0.1 - 2020/10/15
by Nicholas Foreman (META) (https://www.coregames.com/user/f9df3457225741c89209f6d484d0eba8)
--]]
------------------------------------------------------------------------------------------------------------------------
-- OBJECTS AND REFERENCES
-----... | nilq/small-lua-stack | null |
module(..., package.seeall)
local lib = require("core.lib")
local lwconf = require("apps.lwaftr.conf")
local setup = require("program.lwaftr.setup")
local util = require("program.lwaftr.check.util")
local load_requested_counters = util.load_requested_counters
local read_counters = util.read_counters
local diff_counte... | nilq/small-lua-stack | null |
local present, feline = pcall(require, "feline")
if not present then
return
end
local colors = require("base16").get_colors("base_30")
local lsp = require "feline.providers.lsp"
local lsp_severity = vim.diagnostic.severity
local icon_styles = {
default = {
left = "",
right = " ",
main_icon... | nilq/small-lua-stack | null |
local lswRest = require('leaseweb.rest')
local module = {}
function module.init(self, apiKey, bareMetalId)
module.apiKey = apiKey
local bareMetal = {}
bareMetal.retrieveBareMetal = function()
local s, bm = lswRest:get(
'/v1/bareMetals/' .. bareMetalId, apiKey)
if s == 200 then
return bm['b... | nilq/small-lua-stack | null |
--- Coordinate player sorting. This usually involves multiple client/server
-- round trips. Handle synchronization in general, including support for
-- pausing/resuming a sort due to combat.
local A, L = unpack(select(2, ...))
local M = A:NewModule("sorter", "AceEvent-3.0", "AceTimer-3.0")
A.sorter = M
M.private = {
... | nilq/small-lua-stack | null |
----------------------------------------------------------------
--==============================================================
IDENTIFIER = 'S7_UI_Components_Library'
---@class MODINFO: ModInfo
---@field ModVersion string
---@field ModSettings table
---@field DefaultSettings table
---@field SubdirPrefix string
MO... | nilq/small-lua-stack | null |
--Entity
function CEntityInstance:SetNetworkableEntityInfo(key, value)
local t = CustomNetTables:GetTableValue("custom_entity_values", tostring(self:GetEntityIndex())) or {}
t[key] = value
CustomNetTables:SetTableValue("custom_entity_values", tostring(self:GetEntityIndex()), t)
end
function CEntityInstance:Clear... | nilq/small-lua-stack | null |
#!/usr/bin/env lua
local t = require 'tapered'
package.path = '../src/?.lua;' .. package.path
local lu = require 'listutils'
local hu = require 'hashutils'
t.is(lu.author(), 'Peter Aronoff',
"listutils author() should be 'Peter Aronoff'")
t.is(lu.version(), '2.2.0',
"listutils version() should be '2.2.0'")
... | nilq/small-lua-stack | null |
local config = {}
local function load_env_file()
local env_file = os.getenv("HOME")..'/.env'
local env_contents = {}
if vim.fn.filereadable(env_file) ~= 1 then
print('.env file does not exist')
return
end
local contents = vim.fn.readfile(env_file)
for _,item in pairs(contents) do
local line_con... | nilq/small-lua-stack | null |
local assets =
{
--Asset("ANIM", "anim/fire_large_character.zip"),
Asset("ANIM", "anim/campfire_fire.zip"),
Asset("SOUND", "sound/common.fsb"),
}
local firelevels =
{
{anim="level1", sound="dontstarve/common/maxlight", radius=1, intensity=.75, falloff= 1, colour = {207/255,234/255,245/255}, soundintensity=.1},... | nilq/small-lua-stack | null |
--***********************************************************
--** THE INDIE STONE **
--***********************************************************
if isClient() then return end
local function noise(message) print('MOTent.lua: '..message) end
local function ReplaceExistingObject... | nilq/small-lua-stack | null |
--[[
IronBrew:tm: obfuscation; Version 2.7.2
]]
return(function(yarrakistermisin_IIIlllIl,yarrakistermisin_lIIIlIIIIIl,yarrakistermisin_lIIIlIIIIIl)local yarrakistermisin_lIllIlllIIlll=string.char;local yarrakistermisin_lIlllIlllI=string.sub;local yarrakistermisin_IIIllllIlllllll=table.concat;local yarrakistermisin_IIl... | nilq/small-lua-stack | null |
x,y,var = "string", 4, {} | nilq/small-lua-stack | null |
--[=[
MIT License
Copyright (c) 2016 Johannes Westhuis, Alexander Schulz
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... | nilq/small-lua-stack | null |
-- some locals
local SR = SR_Tracker
local config = SR.Config
local colors = config.Colors
local languages = config.Languages
--
-- localizations
local ScrW = ScrW
local ScrH = ScrH
local ipairs = ipairs
local os_time = os.time
local os_date = os.date
local tonumber = tonumber
local math_max = math.max
local math... | nilq/small-lua-stack | null |
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
if player:getStorageValue(Storage.TheApeCity.Questline) == 7
and player:getStorageValue(Storage.TheApeCity.ParchmentDecyphering) ~= 1 then
player:setStorageValue(Storage.TheApeCit... | nilq/small-lua-stack | null |
local t = Def.ActorFrame{
Def.Sprite{
Texture="_Exit 2x1.png";
InitCommand=cmd(pause,setstate,0;y,164);
GainFocusCommand=cmd(setstate,1);
LoseFocusCommand=cmd(setstate,0);
};
};
return t;
| nilq/small-lua-stack | null |
function onUse(cid, item, fromPosition, itemEx, toPosition)
doTransformItem(item.uid, item.itemid - 1)
doSendMagicEffect(fromPosition, CONST_ME_POFF)
return true
end
| nilq/small-lua-stack | null |
List = {}
function List:new ()
local l = {first = 0, last = -1 }
setmetatable(l, self)
self.__index = self
return l
end
function List:pushleft (value)
local first = self.first - 1
self.first = first
self[first] = value
return self:len()
end
function List:push (value)
return self:pushright(value)
end
functio... | nilq/small-lua-stack | null |
-------------------------------------------------------------------------------
-- Module Declaration
--
local mod, CL = BigWigs:NewBoss("Drakos the Interrogator", 578, 622)
if not mod then return end
mod:RegisterEnableMob(27654)
mod.engageId = 2016
-- mod.respawnTime = 0 -- resets, doesn't respawn
-----------------... | nilq/small-lua-stack | null |
---------------------------------------------------------
--
---------------------------------------------------------
function MINIGAME:ShouldHUDPaint()
return SS.Lobby.Minigame.IsInQueue() or LocalPlayer():IsPlayingMinigame()
end
---------------------------------------------------------
--
------------------------... | nilq/small-lua-stack | null |
-- table
mytable = {} -- 声明一个table
mytable.first = "tom"
mytable.second = "james"
print(mytable[1])
print(mytable.first)
print(mytable["second"])
-- 引入模块 my-module.lua
require "my-module"
print(module.index)
print(module.sum(10, 20)) | nilq/small-lua-stack | null |
-- Setup
require('luau')
_addon = _addon or {}
_addon.name = 'AutoJoin'
_addon.author = 'Arcon'
_addon.commands = {'autojoin','aj'}
_addon.version = '1.0.0.0'
defaults = {}
defaults.mode = 'whitelist'
defaults.whitelist = S{}
defaults.blacklist = S{}
defaults.autodecline = false
settings = config.load(defaults)
--... | nilq/small-lua-stack | null |
--[[
Carbon for Lua
#class Testing.TestResult
#description {
An object to signal success and failure conditions to the test engine.
}
]]
local Carbon = (...)
-- We don't know that the built-in shallow copy works yet, technically
local function shallow_copy(from, to)
to = to or {}
for key, value in pairs(fro... | nilq/small-lua-stack | null |
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg)... | nilq/small-lua-stack | null |
slot0 = class("SummaryPage4", import(".SummaryAnimationPage"))
slot0.OnInit = function (slot0)
slot2 = slot0.summaryInfoVO.furnitures
slot3 = {}
for slot7 = 1, findTF(slot0._go, "content").childCount, 1 do
triggerToggle(findTF(slot8, "info"), slot2[tonumber(go(slot8).name)])
if slot2[tonumber(go(slot8).name)]... | nilq/small-lua-stack | null |
include('shared.lua')
function SWEP:Think()
end
function SWEP:PrimaryAttack()
end
function SWEP:SecondaryAttack()
end
function SWEP:DrawWorldModel()
self:DrawWorldModelTranslucent()
end
function SWEP:Holster()
self.Owner:stopSounds()
if self.Owner.rightHilt then
self.Owner.rightHilt:SetNoDraw(true)
self.... | nilq/small-lua-stack | null |
local Entries = {}
Entries[#Entries + 1] = {
type = "flag",
group = { "isCementMixer" },
data = {
{
id = "brick",
label = "Pegar Tijolo",
icon = "cube",
event = "caue-inventory:getBrick",
parameters = {}
}
},
options = {
... | nilq/small-lua-stack | null |
local endpoints = require "kong.api.endpoints"
local utils = require "kong.tools.utils"
local Set = require "pl.Set"
local kong = kong
local unescape_uri = ngx.unescape_uri
local function get_cert_id_from_sni(self, db, helpers)
local id = unescape_uri(self.params.certificates)
if utils.is_valid_... | nilq/small-lua-stack | null |
local moving = false
local whee
local pressingtab = false
local top
local function scrollInput(event)
if top:GetSelectionState() == 2 then
return
elseif event.DeviceInput.button == "DeviceButton_tab" then
if event.type == "InputEventType_FirstPress" then
pressingtab = true
elseif event.type == "InputEventT... | nilq/small-lua-stack | null |
handle=compmsg.createDispatcher()
result=compmsg.initDispatcher(handle, "I")
| nilq/small-lua-stack | null |
function cookingwithbeaconslib.public.enable_feature_custom_beacon_shapes()
if not cookingwithbeaconslib.private.feature_custom_beacon_shapes then
assert(not data.raw["simple-entity"]["custom-beacon-radius-visualization"], "CookingWithBeaconsLib: custom-beacon-radius-visualization already exists but t... | nilq/small-lua-stack | null |
local PlayerData = {}
local tab, PoliceCadIsShowed = nil, false
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
while ESX.GetPlayerData().job == nil do
Citizen.Wait(100)
end
PlayerData = ESX.GetP... | nilq/small-lua-stack | null |
-- stanceBar - a bar for displaying class specific buttons for things like stances/forms/etc
local _, Addon = ...
local playerClass = select(2, UnitClass('player'))
-- don't bother loading the module if the player is currently playing something without a stance
if not (
playerClass == 'DRUID'
or playerClass == 'ROG... | nilq/small-lua-stack | null |
local stage = {}
stage.warnings = {
["581"] = {
message_format = "'not (x {operator} y)' can be replaced by 'x {replacement_operator} y'"
.. " (if neither side is a table or NaN)",
fields = {"operator", "replacement_operator"}
},
["582"] = {message_format = "Error prone negation: negation... | nilq/small-lua-stack | null |
--[[
_______ ______ ______ _____ _ _ _______ ______ ______ _____ _ _
| |______ |_____] |_____/ | |____/ |_____| |_____] |_____/ | | |____/
|_____ |______ |_____] | \_ __|__ | \_ | | |_____] | \_ |_____| | \_
... | nilq/small-lua-stack | null |
data:extend({
{ -- Gunship
type = "recipe",
name = "gunship",
normal =
{
enabled=false,
energy_required=10,
ingredients =
{
{"electric-engine-unit",64},
{"steel-plate",200},
{"iron-plate",400},
{"electronic-circuit",40},
{"submachine-gun",5},
... | nilq/small-lua-stack | null |
function UpdateClientsideModel(newModel, cse)
if cse then
cse:SetModel(newModel)
timer.Simple(0, function() return end)
cse:ResetSequenceInfo()
cse:ResetSequence("pose_standing_02")
end
end
function StartCharacterCreation()
net.Start("VBNET_SetViewEntity")
net.SendToServer()
local cse = Client... | nilq/small-lua-stack | null |
require 'torch'
require 'nn'
local cjson = require 'cjson'
local M = {}
-- Parse a string of comma-separated numbers
-- For example convert "1.0,3.14" to {1.0, 3.14}
function M.parse_num_list(s)
local nums = {}
for _, ss in ipairs(s:split(',')) do
table.insert(nums, tonumber(ss))
end
return nums
end
-... | nilq/small-lua-stack | null |
local Grid = {
{10, 10, 10, 10, 10, 10, 10, 10, 10, 61, 10, 13, 10, 10, 10, 10, 10, 10, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15},
{10, 10, 10, 10, 10, 11, 11, 11, 10, 10, 10, 13, 10, 10, 10, 10, 10, 10, 10, 14, 15, 15, 129, 15, 15, 15, 15, 15, 15, 68, 15, 15},
{10, 10, 61, 10, 11, 19, 19, 19, 1... | nilq/small-lua-stack | null |
_G._DEBUG=false
local posix = require("posix")
require("strict")
local dbg = require("Dbg"):dbg()
local MRC = require("MRC")
local testDir = "spec/MRC"
describe("Testing MRC class #MRC.",
function()
it("Test parsing of modA",
function()
l... | nilq/small-lua-stack | null |
local ent_type
local death_blocks = {}
local function activate(level_state)
if ent_type == nil then
ent_type = ENT_TYPE.FLOORSTYLED_TEMPLE
end
--Death Blocks - from JawnGC
define_tile_code("death_block")
level_state.callbacks[#level_state.callbacks+1] = set_pre_tile_code_callback(functio... | nilq/small-lua-stack | null |
--[[ Copyright (C) 2017-2018 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the ho... | nilq/small-lua-stack | null |
SWEP.AnimCycle = SWEP.ViewModelFlip and 0 or 1
function SWEP:FixAkimbo()
if self.Akimbo and self.Secondary.ClipSize > 0 then
self.Primary.ClipSize = self.Primary.ClipSize + self.Secondary.ClipSize
self.Secondary.ClipSize = -1
self.Primary.RPM = self.Primary.RPM * 2
self.Akimbo_Inverted = self.ViewModelFlip
... | nilq/small-lua-stack | null |
-- WRAPPER FUNCTION FOR REQUIRE [BEGIN] --------------------------------------
return function(global)
print "[LOAD] -> shared/Helpers/RoduxRemoteBridge"
-- PRIVATE DATA AND HELPER FUNCTIONS [BEGIN] ---------------------------------
local Assert = global.Assert
local Require = global.Require
local logger = Re... | nilq/small-lua-stack | null |
--[[/*
=============================================================================
= =
= UPLINK For PSP =
= ... | nilq/small-lua-stack | null |
-------------------------------------------------------------------
-- This script is created by zdroid9770; please do not edit this --
-- script and claim it as your own, as of All rights are claimed --
-- by me. --
-- Copyright (c) zdroid9770 ... | nilq/small-lua-stack | null |
_G["spawn_points"] = {} -- list of all spawn points
local to_spawn = 1 -- time to next spawn
local creatures = {} -- list of all spawned creatures
local prefab = nil
player = -1
Editor.setPropertyType("player", Editor.ENTITY_PROPERTY)
local to_despawn = {}
function init()
prefab = Engine.loadResource(g_engine, "pr... | nilq/small-lua-stack | null |
local Keys = {
-- Letters
["A"] = 0x7065027D,
["B"] = 0x4CC0E2FE,
["C"] = 0x9959A6F0,
["D"] = 0xB4E465B4,
["E"] = 0xCEFD9220,
["F"] = 0xB2F377E8,
["G"] = 0x760A9C6F,
["H"] = 0x24978A28,
["I"] = 0xC1989F95,
["J"] = 0xF3830D8E,
-- Missing K, don't know if anything ... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Kazham
-- NPC: Nenepp
-- Standard Info NPC
-----------------------------------
local ID = require("scripts/zones/Kazham/IDs");
require("scripts/globals/pathfind");
require("scripts/globals/quests")
require("scripts/globals/titles")
-----------------------------------
local... | nilq/small-lua-stack | null |
w,h = System.screenSize();
window:frame(0, 0, w, h);
window:backgroundColor(0xDDDDDD);
label = Label();
label:frame(0,50,w, 60);
label:text("Hello LuaView!");
button0 = Button();
button0:frame(10,10,100,100);
button1:title("button0-DebugReadCmd");
button0:callback(function()
debug.DebugReadCmd();
print("button0-Deb... | nilq/small-lua-stack | null |
local gc = Var("GameCommand");
local item_width = 260;
local item_height = 36;
local ColorTable = LoadModule("Theme.Colors.lua")( LoadModule("Config.Load.lua")("SoundwavesSubTheme","Save/OutFoxPrefs.ini") )
return Def.ActorFrame {
OnCommand=function(self) self:diffusealpha(0):decelerate(0.3):diffusealpha(1) end;
Off... | nilq/small-lua-stack | null |
return {'eshuis'} | nilq/small-lua-stack | null |
pg = pg or {}
pg.enemy_data_statistics_267 = {
[13600328] = {
cannon = 21,
reload = 150,
speed_growth = 0,
cannon_growth = 1800,
battle_unit_type = 35,
air = 0,
base = 447,
dodge = 0,
durability_growth = 35200,
antiaircraft = 125,
speed = 12,
reload_growth = 0,
dodge_growth = 0,
luck = 0,
... | nilq/small-lua-stack | null |
function onCastSpell(creature, var)
local position = variantToPosition(var)
local tile = Tile(position)
local items = tile and tile:getItems()
local removed = false
for k, item in pairs(items) do
if item and isInArray(FIELDS, item:getId()) then
item:remove()
removed = true
end
end
if removed then
... | nilq/small-lua-stack | null |
local darkplus = {
black = "#17191e",
bg0 = "#282a36",
bg1 = "#31353f",
bg2 = "#393f4a",
bg3 = "#3b3f4c",
fg = "#abb2bf",
purple = "#c678dd",
green = "#98c379",
orange = "#d19a66",
blue = "#... | nilq/small-lua-stack | null |
function start(song)
end
function update(elapsed)
end
function beatHit(beat)
if beat == 8 then
print('got hit the fuck out DAYUM HE NEED SUM MILK')
playActorAnimation("dad","hit",false)
shakeCam(0.01,0.3)
setActorY(27.9,"carhit")
end
end
function stepHit(step)
end | nilq/small-lua-stack | null |
return Def.ActorFrame {
Def.Sprite {
Texture = "top",
},
Def.ActorFrame {
InitCommand = function(self)
self:xy(-284, -6)
end,
Def.Sprite {
Texture = "bar",
InitCommand = function(self)
self
:y(4)
:horizalign(left)
end,
OnCommand = function(self)
self
:cropright(1)
:... | nilq/small-lua-stack | null |
dofilepath("data:scripts\\utilfunc.lua")
dofilepath("data:scripts\\TMG_objectdata.lua")
dofilepath("data:scripts\\TMG_initialstate.lua")
dofilepath("data:scripts\\TMG_initialfleet.lua")
dofilepath("player:TestMissionGrid\\TMG_savegame.lua")
dofilepath("data:scripts\\TMG_sectormap_proto.lua")
padAmount = 8
labelWid = 2... | nilq/small-lua-stack | null |
local LevelManager =
Class(
function(self, inst)
self.inst = inst
self._exp = net_shortint(inst.GUID, "LevelManager._exp", "onexpdirty")
self._max_exp = net_shortint(inst.GUID, "LevelManager._max_exp", "onmaxexpdirty")
self._level = net_shortint(inst.GUID, "LevelManager._level", "onleveldirty")
self._max_l... | nilq/small-lua-stack | null |
local M = {
on_setup_callback_map = {},
}
function M.execute_command(command, callback)
LSP.buf_request(
0, 'workspace/executeCommand', command, function(err, _, res)
if callback then
callback(err, res)
elseif err then
print('Execute command faile... | nilq/small-lua-stack | null |
-------------------------------------------------------------------------------
-- AdiBags - Zereth Mortis By Crackpot (US, Illidan)
-------------------------------------------------------------------------------
local addonName, addon = ...
local AdiBags = LibStub("AceAddon-3.0"):GetAddon("AdiBags")
local tonumber =... | nilq/small-lua-stack | null |
local CombatLog =
{
Name = "CombatLog",
Type = "System",
Namespace = "C_CombatLog",
Functions =
{
},
Events =
{
{
Name = "CombatLogEvent",
Type = "Event",
LiteralName = "COMBAT_LOG_EVENT",
},
{
Name = "CombatLogEventUnfiltered",
Type = "Event",
LiteralName = "COMBAT_LOG_EVENT_UNFILTERE... | nilq/small-lua-stack | null |
RegisterNetEvent('__pmc_callback:server')
AddEventHandler('__pmc_callback:server', function(eventName, ticket, ...)
local s = source
local p = promise.new()
TriggerEvent('s__pmc_callback:'..eventName, function(...)
p:resolve({...})
end, s, ...)
local result = Citizen.Await(p)
TriggerClientEvent(('__pmc_callb... | nilq/small-lua-stack | null |
--[[
npcPath.lua
Copyright (C) 2016 Kano Computing Ltd.
License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2
This is an Npc with random behaviour that can just walk around.
]]--
local Npc = require 'game.gameWorld.characters.npc'
local NpcPath = {}
NpcPath.__index = NpcPath
-- inherit from base class Chara... | nilq/small-lua-stack | null |
-- Imports
local RepSource = game:GetService("ReplicatedStorage"):WaitForChild("src")
local Class = require(RepSource:WaitForChild("Class"))
local TweenService = game:GetService("TweenService")
-- ObjectComponent Class
local ButtonDim = Class.new("ButtonDim", "ButtonComponent")
-- constructor
function ButtonDim.new... | nilq/small-lua-stack | null |
#!/usr/local/bin/lua
------ EXPRESSION BASICS ------
-- Most languages have a notion of expressions and statements.
-- Expressions are things that return a value, and statements are things that don't
-- Let's try to define basic expression syntax!
-- (WILL: write grammar on the board as you're going)
-- Basic variabl... | 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.