content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
local PANEL = {}
AccessorFunc( PANEL, "m_colText", "TextColor" )
AccessorFunc( PANEL, "m_colTextStyle", "TextStyleColor" )
AccessorFunc( PANEL, "m_FontName", "Font" )
AccessorFunc( PANEL, "m_bDoubleClicking", "DoubleClickingEnabled", FORCE_BOOL )
AccessorFunc( PANEL, "m_bAutoStretchVertical", "AutoStretchVertical... | nilq/small-lua-stack | null |
local pl = require 'pl.import_into' ()
local xtend = {}
setmetatable(xtend, { __call = function(_, ...)
local res = {}
for i = 1, select('#', ...) do
for k, v in pairs(select(i, ...)) do
res[k] = v
end
end
return res
end })
function xtend.deep(...)
local res
for i = 1, select('#', ...) do
local inp... | nilq/small-lua-stack | null |
--====================================================================--
-- dmc_websockets/message.lua
--
--
-- by David McCuskey
-- Documentation: http://docs.davidmccuskey.com/display/docs/dmc_websockets.lua
--====================================================================--
--[[
Copyright (C) 2014 David McCus... | nilq/small-lua-stack | null |
--[[--
claimed_identifier, -- identifier owned by the user
errmsg, -- error message in case of failure
errcode = -- error code in case of failure (TODO: not implemented yet)
auth.openid.verify{
force_https = force_https, -- only allow https
curl_options = cur... | nilq/small-lua-stack | null |
fx_version 'adamant'
game 'gta5'
description 'cron'
version '1.0.0'
server_script 'server/main.lua'
| nilq/small-lua-stack | null |
local namespace = require("bzutils").utils.namespace
local CameraController = require("cam_ctrl").CameraController
local SpectateController = require("cam_ctrl").SpectateController
local PatrolController = require("patrol_ctrl")
local WaveController = require("wave_ctrl")
local SpectatorCraft = require("tvspec")
... | nilq/small-lua-stack | null |
local config = require("apioak.pdk.config")
local etcd = require("resty.etcd")
local _M = {}
local function get_cli()
local oak_conf = config.all()
local etcd_conf = oak_conf.etcd
local etcd_options = {}
etcd_options.http_host = etcd_conf.host
etcd_options.timeout = etcd_conf.timeout
et... | nilq/small-lua-stack | null |
#!/usr/bin/lua
---------------------------------------------------------------------
-- LuaLDAP test file.
-- This test will create a copy of an existing entry on the
-- directory to work on. This new entry will be modified,
-- renamed and deleted at the end.
-----------------------------------------------------------... | nilq/small-lua-stack | null |
local skynet = require "skynet"
local stm = require "skynet.stm"
local md5 = require "md5"
local QueueMap = require "meiru.lib.queuemap"
local server = require "meiru.util.server"
local _filebox
---------------------------------------------
--command
---------------------------------------------
local FileBox ... | nilq/small-lua-stack | null |
module(..., package.seeall)
CGGet = {
{"URL","CHAR",255}, -- 請求地址
{"BODY","CHAR",255},
{"TYPE","INT",1}, -- 返回格式 1為gzip
}
GCGet = {
{"CONT","CHAR",255}
}
| nilq/small-lua-stack | null |
WireToolSetup.setCategory( "Memory" )
WireToolSetup.open( "data_transferer", "Transferer", "gmod_wire_data_transferer", nil, "Transferers" )
if ( CLIENT ) then
language.Add( "Tool.wire_data_transferer.name", "Data Transferer Tool (Wire)" )
language.Add( "Tool.wire_data_transferer.desc", "Spawns a data transferer." )... | nilq/small-lua-stack | null |
ACF.RegisterEngineType("GenericPetrol", {
Name = "Generic Petrol Engine",
Efficiency = 0.304, --kg per kw hr
TorqueScale = 0.25,
HealthMult = 0.2,
})
| nilq/small-lua-stack | null |
CubeGenerator = {}
setmetatable(CubeGenerator, {__index = HiveBaseModule})
CubeGenerator.new = function (varname)
local this = HiveBaseModule.new(varname)
this.gen = PrimitiveGenerator()
setmetatable(this, {__index=CubeGenerator})
return this
end
function CubeGenerator:Do()
self:UpdateValue()
... | nilq/small-lua-stack | null |
resource_manifest_version '05cfa83c-a124-4cfa-a768-c24a5811d8f9'
name 'RTO System Link'
description 'The in-game link to the RTO System Discord bot.'
author 'Agent Squad Productions (www.agentsquad.org)'
version 'v1.0.0'
url 'https://github.com/Agent-Squad-Productions/rto-system'
client_scripts {
"config.... | nilq/small-lua-stack | null |
local poketch_0 = DoorSlot("poketch","0")
local poketch_0_hub = DoorSlotHub("poketch","0",poketch_0)
poketch_0:setHubIcon(poketch_0_hub)
local poketch_1 = DoorSlot("poketch","1")
local poketch_1_hub = DoorSlotHub("poketch","1",poketch_1)
poketch_1:setHubIcon(poketch_1_hub)
local poketch_2 = DoorSlot("poketch","2")
loca... | nilq/small-lua-stack | null |
function onCreate()
-- background shit
makeLuaSprite('bg', 'bg', -570, -340);
setScrollFactor('bg', 1, 1);
makeAnimatedLuaSprite('char', 'maniaBg', -230, -340);
setScrollFactor('char', 1, 1);
luaSpriteAddAnimationByPrefix('char', 'bgchar', 'maniaBG', 24, true);
addLuaSprite('bg', false);
addLuaSprite('char',... | nilq/small-lua-stack | null |
local students = {}
local teacher = nil
function link (teacher, student)
map (teacher, 'NEW_SLIDE', student, 'SHOW_SLIDE')
map (teacher, 'REPLY_CONTROL', student, 'CONTROL_CHANGED')
map (teacher, 'PERFORM_SEEK', student, 'SEEK')
map (student, 'TRY_GET_CONTROL', teacher, 'REQUEST_CONTROL')
map (student, 'REWI... | nilq/small-lua-stack | null |
function hide()
addonWindow:hide()
addonWindow2:hide()
addonWindow3:hide()
addonWindow4:hide()
addonWindow5:hide()
addonWindow6:hide()
addonWindow7:hide()
end
function init()
connect(g_game, 'onTextMessage', onClick)
addonWindow = g_ui.displayUI('addons')
addonWindow:hide()
addonWindow2 = g_ui.di... | nilq/small-lua-stack | null |
--[[
* The `Matter.Contact` module contains methods for creating and manipulating collision contacts.
*
* @class Contact
]]--
Contact = {}
Contact.__index = Contact
--[[
* Creates a new contact.
* @method create
* @param {vertex} vertex
* @return {contact} A new contact
]]--
function Contact.create(vertex)
--... | nilq/small-lua-stack | null |
local InCombat = {
}
local OutCombat = {
}
XB.CR:Add(104, {
name = '[XB] Druid - Guardian',
ic = InCombat,
ooc = OutCombat,
})
| nilq/small-lua-stack | null |
--------------------------------------------------------------------------------
-- Handler.......... : onDebugToggleAchievement
-- Author........... :
-- Description...... :
--------------------------------------------------------------------------------
----------------------------------------------------------... | nilq/small-lua-stack | null |
-- Emergency Lights resource by vovo4ka
-- please, do not remove copyright
local strobo_interval = 10 -- strobo light freq. 10 = 0.5 sec
local is_strobo_enabled = enable -- enable/disable stroboscopic lights mode
-- lamps
local flash_interval = 1 -- flash freq
-- led blink mode
local blink_interval = 20 -- blink i... | nilq/small-lua-stack | null |
assert ( math.abs( 5 ) , 5 )
assert ( math.abs( -5 ) , 5 )
assert ( math.cos(math.pi) == -1 )
assert ( math.huge + 1 == math.huge )
assert ( math.min ( 1 , 5 ) == 1 )
assert ( math.min ( 1 , 5 , -1 ) == -1 )
assert ( math.max ( 1 , 5 ) == 5 )
assert ( math.max ( 1 , 5 , -1 ) == 5 )
assert ( math.sin(0) == 0 )
| nilq/small-lua-stack | null |
local awful = require("awful")
local wibox = require("wibox")
local beautiful = require("beautiful")
local separators = require('util.separators')
local widget = require('util.widgets')
-- widgets load
local pad = separators.pad
local textclock = wibox.widget {
font = M.f.body_2,
format = '<span foreground="'..M.x... | nilq/small-lua-stack | null |
return {
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
desc_get = "每隔20秒,有30.0%(满级60.0%)的概率发动,敌方所有单位受到的伤害上升20.0%(满级40.0%),持续10秒",
name = "雷达扫描",
init_effect = "",
time = 0,
color = "yellow",
picture = "",
desc = "每隔20秒,有$1的概率发动,敌方所有单位受到的伤害上升$2,持续10秒",
stack = 1,
id = 13401,
icon = 13400,
last_effect = ""... | nilq/small-lua-stack | null |
local ppwm = require("lib_ppwm")
--
local red = ppwm:create(1, 1000, 0)
local function on_action()
-- red:update_duty(1023)
red:transition_to_duty(1000, 10)
end
local function off_action()
-- red:update_duty(0)
red:transition_to_duty(0, 10)
end
local function process_interval(intervals, actions, position)... | nilq/small-lua-stack | null |
--region *.lua
--Date
--此文件由[BabeLua]插件自动生成
require "cocos.init"
cc.exports.dxm = cc.exports.dxm or {}
require "dxm/common/singleton"
require "dxm/common/time_helper"
require "dxm/common/game_state"
require "dxm/scene/base_scene"
require "dxm/ui/normal_ui.lua"
require "dxm/ui/stack_ui.lua"
require "dxm/ui/dialog_ui"... | nilq/small-lua-stack | null |
local dpdk = require "dpdk"
local memory = require "memory"
local device = require "device"
local stats = require "stats"
local log = require "log"
function master(txPorts, minIp, numIps, rate)
if not txPorts then
log:info("usage: txPort1[,txPort2[,...]] [minIP numIPs rate]")
return
end
txPorts = tostring(t... | nilq/small-lua-stack | null |
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include( "shared.lua" )
util.AddNetworkString("OCRP_UpdateStation")
function ENT:Initialize()
self.DropTime = CurTime()
if self.Amount == nil then
self.Amount = 1
end
if self:GetNWString("Class") == nil then
self:Remove()
end
self:SetModel(GAM... | nilq/small-lua-stack | null |
-- !strict
type PartsHolder = {
[number] : {
[number] : number?
}?
}
wait(4)
local S : number = os.clock()
--workspace.Part:Destroy()
--workspace.Part:Destroy()
local RunService : service = game:GetService("RunService")
local RandomSeed = Random.new()
local Seed : number = RandomSeed:NextInteger(0, 1000000)... | nilq/small-lua-stack | null |
-- --------------------
-- TellMeWhen
-- Originally by Nephthys of Hyjal <lieandswell@yahoo.com>
-- Other contributions by:
-- Sweetmms of Blackrock, Oozebull of Twisting Nether, Oodyboo of Mug'thol,
-- Banjankri of Blackrock, Predeter of Proudmoore, Xenyr of Aszune
-- Currently maintained by
-- Cybeloras... | nilq/small-lua-stack | null |
local Synth={}
function Synth:new(name)
-- define maps for the synth type
local maps={}
maps.pitch={}
maps.velocity={}
for i=1,63 do
table.insert(maps.pitch,i)
table.insert(maps.velocity,(i-1)*2) -- 0 to 124 (sorta midi range)
end
-- middle duration is one note
maps.duration={}
for i=8,1,-1 d... | nilq/small-lua-stack | null |
#!/usr/bin/env luajit
local this_dir = arg[0]:match('(.+/)[^/]+%.lua') or './'
package.path = this_dir..'../src/'..package.path
local net = require'nodish.net'
local process = require'nodish.process'
net.createServer(function(client)
client:pipe(client)
client:pipe(process.stdout,false)
end):listen(12345)
... | nilq/small-lua-stack | null |
require 'optim'
require 'rnn'
require 'hdf5'
require 'xlua'
require 'nngraph'
cjson = require 'cjson'
utils = require 'misc.utils'
dofile("misc/optim_updates.lua")
dofile("misc/vocab.lua")
torch.setdefaulttensortype('torch.FloatTensor')
torch.manualSeed(123)
fd = io.open('sample.txt', 'a')
fd:write('\n'..'***********... | nilq/small-lua-stack | null |
--[[ RealMobHealth Shared Functions
by SDPhantom
https://www.wowinterface.com/forums/member.php?u=34145 ]]
------------------------------------------------------------------
--------------------------
--[[ Namespace ]]
--------------------------
local AddOn=select(2,...);
AddOn.API=AddOn.API or {};
----------------... | nilq/small-lua-stack | null |
Player = game.Players.LocalPlayer
Character = Player.Character
PlayerGui = Player.PlayerGui
Backpack = Player.Backpack
Torso = Character.Torso
Head = Character.Head
Humanoid = Character.Humanoid
LeftArm = Character["Left Arm"]
LeftLeg = Character["Left Leg"]
MMouse = nil
RightArm = Character["Right Arm"]
RightLeg = Cha... | nilq/small-lua-stack | null |
-- roles.lua :
-- LICENSE: The MIT License (MIT)
--
-- Copyright (c) 2016 Pascal TROUVIN
--
-- For Microsoft Azure
-- Author: Pascal Trouvin
--
-- History:
-- 20160203: 1st version
-- import requirements
-- allow either cjson, or th-LuaJSON
local has_cjson, jsonmod = pcall(require, "cjson")
if not has_cjson then
... | nilq/small-lua-stack | null |
-------------------------------------------------------------------------------
-- Importing module
-------------------------------------------------------------------------------
local http = require "socket.http"
local https = require "ssl.https"
local url = require "socket.url"
local table = require "table"
local lt... | nilq/small-lua-stack | null |
-- CLIENTSIDED --
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
SetCanAttackFriendly(GetPlayerPed(-1), true, false)
NetworkSetFriendlyFireOption(true)
end
end) | nilq/small-lua-stack | null |
includeFile("tangible/tcg/series8/decorative_bespin_lamp_off.lua")
includeFile("tangible/tcg/series8/combine_decorative_bespin_lamp_off.lua")
includeFile("tangible/tcg/series8/decorative_bespin_glass_sculpture.lua")
includeFile("tangible/tcg/series8/decorative_bespin_sconce_off.lua")
includeFile("tangible/tcg/series8/p... | nilq/small-lua-stack | null |
require "lib.classes.class"
require "Battle.consts"
local Action = require("Battle.model.actions.Action")
--------------------------------------------------------------------------------------------------------
-- class: ActionBuilder
-- A builder class for an action
local ActionBuilder = class(function(self)
self... | nilq/small-lua-stack | null |
local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = true, require('compat53.module'); if p then _tl_compat = m end end; local assert = _tl_compat and _tl_compat.assert or assert; local pairs = _tl_compat and _tl_compat.pairs or pairs; local table = _tl_compat and _tl_compat.t... | nilq/small-lua-stack | null |
local lfs = require 'lfs'
local sysinfo = require 'utils.sysinfo'
local class = require 'middleclass'
local focas_ubus = class('FANUC_FOCAS_UBUS_S')
---
function focas_ubus:initialize(app_dir)
assert(app_dir)
self._app_dir = app_dir
local arch = sysinfo.cpu_arch_short()
assert(arch == 'arm', 'Currently only arm... | nilq/small-lua-stack | null |
local Entity = require "lib.concord.entity"
local Position = require "src.components.Position"
local Sprite = require "src.components.Sprite"
local MovementController = require "src.components.MovementController"
local PlayerEntity = Entity()
-- A player has the following components:
PlayerEntity:give(Position, 0, 0) ... | nilq/small-lua-stack | null |
possibleSpells = {
}
| nilq/small-lua-stack | null |
includeFile("ais.lua") | nilq/small-lua-stack | null |
-- Zancudo Gates (GTAO like): -1600.30100000 2806.73100000 18.79683000
exports('GetZancudoGatesObject', function()
return ZancudoGates
end)
ZancudoGates = {
Gates = {
Open = function()
EnableIpl("CS3_07_MPGates", false)
end,
Close = function()
EnableIpl("CS3_07_... | nilq/small-lua-stack | null |
----------------------------------------------------------------------------
-- LuaJIT MIPS disassembler module.
--
-- Copyright (C) 2005-2011 Mike Pall. All rights reserved.
-- Released under the MIT/X license. See Copyright Notice in luajit.h
---------------------------------------------------------------------------... | nilq/small-lua-stack | null |
--[[
GD50
Angry Birds
Author: Colton Ogden
cogden@cs50.harvard.edu
]]
AlienLaunchMarker = Class{}
function AlienLaunchMarker:init(world)
self.world = world
-- starting coordinates for launcher used to calculate launch vector
self.baseX = 90
self.baseY = VIRTUAL_HEIGHT - 100
-- s... | nilq/small-lua-stack | null |
-- Track messages received by users of the MUC
-- We rewrite the 'id' attribute of outgoing stanzas to match the stanza (archive) id
-- This module is therefore incompatible with the muc#stable_id feature
-- We rewrite the id because XEP-0333 doesn't tell clients explicitly which id to use
-- in marker reports. Howeve... | nilq/small-lua-stack | null |
local aliases = {}
local fake_message = import("fake_message")
local last_message_arrived = discordia.Stopwatch()
local unixToString = import("unixToString")
local command = import("classes.command")
local plugin = import("classes.plugin")("meta")
if not config.aliases then
config.aliases = {}
end
client:on("messag... | nilq/small-lua-stack | null |
local DataTables = {
GET = {}
}
function DataTables._collection( collection_path, options )
local Collection = require( collection_path )
local collection = Collection:new( options )
local result = {}
local tablerows = {}
for _, row in ipairs( collection:rows() ) do
local tablerow = {}
for _,... | nilq/small-lua-stack | null |
local intern = require 'intern'
local t = require 'testhelper'
t( type( intern() ), 'function' )
local int = intern()
t( type( int( 1 )), 'table' )
t( int( 1 ), int( 2 ), t.diff )
t( type( int( 1, nil, 0/0, 3 )), 'table' )
t( int( 1, nil, 0/0, 3 ), int( 1, nil, 0/0, 3 ))
t( int( 1, nil, 0/0, 3 ), int( 1, nil, 0/0 ... | nilq/small-lua-stack | null |
object_intangible_vehicle_walker_at_xt_pcd = object_intangible_vehicle_shared_walker_at_xt_pcd:new {
}
ObjectTemplates:addTemplate(object_intangible_vehicle_walker_at_xt_pcd, "object/intangible/vehicle/walker_at_xt_pcd.iff") | nilq/small-lua-stack | null |
YoptaWords = { -- Глобальной делаем для того, чтобы какие нибудь магистры на кодерах всяких darkrp серверов смогли увеличить количество слов
{'нах', ";"},
{'есть', "end"},
{'жы', "then"},
{"сука", "="},
{"внатуре", "="},
{"куку","local"},
{"йопта", "function"},
{"четко", "true"},
{"нечетко", "false"},
{"вилко... | nilq/small-lua-stack | null |
local showtrainer = false
Citizen.CreateThread(function()
while true do
Wait(1)
if IsControlJustReleased(1, 167) and not blockinput then -- f6
if not showtrainer then
showtrainer = true
SendNUIMessage({
showtrainer = true
})
else
showtrainer = false
SendNUIMessage({
hidetraine... | nilq/small-lua-stack | null |
local classic = require 'classic'
-- Do not install if ALEWrap missing
local hasALEWrap, framework = pcall(require, 'alewrap')
if not hasALEWrap then
return nil
end
local Atari, super = classic.class('Atari', Env)
Atari.timeStepLimit = 100000
-- Constructor
function Atari:_init(opts)
-- Create ALEWrap options fro... | nilq/small-lua-stack | null |
local M = {}
--[[
-- Returns a iterator for all the matches from the query
-- @returns iterator of all the matches
--]]
function M.get_query_matches(buffer, lang, query_str)
buffer = buffer or API.nvim_get_current_buf()
local root = TS.get_parser(buffer, lang):parse()[1]:root()
local query = TS.parse_que... | nilq/small-lua-stack | null |
local Modules = script.Parent
local FFlagAESPromptsSupportGamepad = require(Modules.Flags.FFlagAESPromptsSupportGamepad)
return {
enableExperimentalGamepadSupport = FFlagAESPromptsSupportGamepad,
} | nilq/small-lua-stack | null |
-- make sure we are pointing to the local copas first
package.path = string.format("../src/?.lua;%s", package.path)
local now = require("socket").gettime
local copas = require "copas"
local semaphore = require "copas.semaphore"
local test_complete = false
copas.loop(function()
local sema = semaphore.new(10, 5, ... | nilq/small-lua-stack | null |
-- We are introducing variables for the position of the rectangle
-- so that we can change it when the player presses keys
-- ref: https://www.lua.org/pil/1.2.html
x = 0
y = 0
-- this controls how much we want to move the rectangle when a key is pressed
-- start value is 10 so that the movement is noticeable
movement ... | nilq/small-lua-stack | null |
function OnLoad()
Print("Loading !")
DelayAction(function() Basic() end, 3.25)
end
function Print(msg)
print("<font color=\"#5E9C19\">Legacy Mid ></font><font color=\"#5E9C41\"> "..msg.."</font>")
end
Champions = {
["Viktor"] = true,
["TwistedFate"] = true,
}
class 'Basic'
class 'Viktor'
class 'TwistedFate'
--... | nilq/small-lua-stack | null |
local Native = require('lib.native.native')
---@class PlayerSlotState
local PlayerSlotState = {
Empty = Native.ConvertPlayerSlotState(0), --PLAYER_SLOT_STATE_EMPTY
Playing = Native.ConvertPlayerSlotState(1), --PLAYER_SLOT_STATE_PLAYING
Left = Native.ConvertPlayerSlotState(2), --PLAYER_SLOT_STATE_LEFT
}
ret... | nilq/small-lua-stack | null |
test_run = require('test_run').new()
REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
test_run:create_cluster(REPLICASET_1, 'storage')
test_run:create_cluster(REPLICASET_2, 'storage')
util = require('util')
util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait... | nilq/small-lua-stack | null |
-- Trackpad input by Paul Hedderly
-- Expects three sources X, Y and touch
-- On the Korg Nanopad2 these would be nanoP.ch0.cc1, nanoP.ch0.cc2, nanoP.ch0.cc16
-- so you could map and feed this script with something like:
-- [midi nanoP]
-- read = nanoPAD2
-- write = nanoPAD2
-- [lua trackpad]
-- script = trackpad.lua
-... | nilq/small-lua-stack | null |
local rx, _, util = require(script:GetCustomProperty("rx"))()
local mazeGroup = script:GetCustomProperty("maze_group")
local maze = script:GetCustomProperty("maze"):WaitForObject()
local weapon = script:GetCustomProperty("weapon")
local templatesList = script:GetCustomProperty("templates")
local bufferSize = 100
local... | nilq/small-lua-stack | null |
ITEM.name = "Патроны 5,45x39"
ITEM.ammo = "545x39"
ITEM.ammoAmount = 120
ITEM.desc = "Коробка с патронами калибра 5,45x39"
ITEM.category = "Патроны"
ITEM.price = 3400
ITEM.exRender = false
ITEM.model = "models/kek1ch/ammo_545x39_fmj.mdl"
ITEM.width = 2
ITEM.height = 1
ITEM.iconCam = {
pos = Vector(99.... | nilq/small-lua-stack | null |
module(..., lunit.testcase, package.seeall)
local common = dofile("common.lua")
local net = require "luanode.net"
function test()
local tests_run = 0
function pingPong (port, host)
local N = 1000
local count = 0
local sent_final_ping = false
local server = net.createServer(function (self, socket)
console.log(... | nilq/small-lua-stack | null |
local u = {}
local function offsetObject(obj,dx,dy,done)
done[obj] = true
local x,y = obj.x+dx, obj.y+dy
local taken = obj.world[obj.layer][x][y]
if taken then
offsetObject(taken,dx,dy,done)
end
obj.world:moveObject(obj, obj.x+dx, obj.y+dy)
end
local function offsetPathNode(pn,dx,dy,done)
done[p... | nilq/small-lua-stack | null |
local scripts = {
"tool",
"misc",
"nodes",
"spawneggs",
"equip",
}
for _, script in ipairs(scripts) do
antum.loadScript(script)
end
| nilq/small-lua-stack | null |
local snowflakes = {}
local snowing = false
local box_width, box_depth, box_height = 4,4,4
local position = {0,0,0}
local flake_removal = nil
local snow_fadein = 10
sx,sy = guiGetScreenSize()
sx2,sy2 = sx/2,sy/2
localPlayer = getLocalPlayer()
--local random = math.random
function random(lower,upper)... | nilq/small-lua-stack | null |
workspace "Hazel_Kai"
architecture "x64"
startproject "Sandbox"
configurations
{
"Debug",
"Release",
"Dist"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
-- Inlcude directories relative to root folder(solution dir)
IncludeDir = {}
IncludeDir["GLFW"] = "Hazel_Kai/vendor/GLFW/include"
In... | nilq/small-lua-stack | null |
local config = require("aerial.config")
local M = {}
M.rpad = function(str, length, padchar)
local strlen = vim.api.nvim_strwidth(str)
if strlen < length then
return str .. string.rep(padchar or " ", length - strlen)
end
return str
end
M.lpad = function(str, length, padchar)
if string.len(str) < length... | nilq/small-lua-stack | null |
local benchmark = require "benchmark"
local x = {}
for i = 1, 1000000 do
x[i] = 1/0
if (i % 2) == 0 then
x[i] = x[i] * (-1)
end
end
benchmark(x, "infs")
| nilq/small-lua-stack | null |
slot2 = "PdkPlayerInfoCcsPane"
PdkPlayerInfoCcsPane = class(slot1)
PdkPlayerInfoCcsPane.onCreationComplete = function (slot0)
slot13 = slot0.onDataChanged
createSetterGetter(slot2, slot0, "data", nil, nil, nil, nil, handler(slot11, slot0))
slot3 = slot0
slot0.onDataChanged(slot2)
end
PdkPlayerInfoCcsPane.onDat... | nilq/small-lua-stack | null |
local _M = {}
function _M.handler(event)
return {status = 200, body = 'Hello DuEdge!'}
end
return _M | nilq/small-lua-stack | null |
function scandir(command)
local i, t, popen = 0, {}, io.popen
local pfile = popen(command)
for filename in pfile:lines() do
i = i + 1
t[i] = filename
end
pfile:close()
return t
end
function readAll(file)
local f = assert(io.open(file, "rb"))
local content = f:read("*all"... | nilq/small-lua-stack | null |
--[[ $%BEGINLICENSE%$
Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
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; version 2 of the
License.
This program is dis... | nilq/small-lua-stack | null |
--------------------------------------------------------------------------------
function Spawn( entityKeyValues )
if not IsServer() then
return
end
if thisEntity == nil then
return
end
BallAbility = thisEntity:FindAbilityByName( "creature_pangoballer_gyroshell" )
StopBallAbility = thisEntity:FindAbilityB... | nilq/small-lua-stack | null |
local constants = require "kong.constants"
local plugin_handler = require "kong.plugins.escher.handler"
local ConsumerDb = require "kong.plugins.escher.consumer_db"
local KeyDb = require "kong.plugins.escher.key_db"
local EscherWrapper = require "kong.plugins.escher.escher_wrapper"
describe("escher plugin", function()... | nilq/small-lua-stack | null |
if getResourceName(getThisResource()) == "openframe" then
local script = {}
function push(str)
table.insert(script, str)
end
function getScripts()
return script
end
function load()
return 'for i,v in ipairs(exports.openframe:getScripts()) do loadstring(v)() end'
end
else
loadstring(exports.openfr... | nilq/small-lua-stack | null |
package.preload['lunajson._str_lib']=(function(...)
local e=math.huge
local c,h,u=string.byte,string.char,string.sub
local a=setmetatable
local o=math.floor
local t=nil
local t={
0,1,2,3,4,5,6,7,8,9,e,e,e,e,e,e,
e,10,11,12,13,14,15,e,e,e,e,e,e,e,e,e,
e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,
e,10,11,12,13,14,15,e,e,e,e,e,e,e,e,... | nilq/small-lua-stack | null |
local Spell = { }
Spell.LearnTime = 60
Spell.ApplyFireDelay = 0.4
Spell.Description = [[
Unlocks and opens doors,
hacks keypads that are not
protected by magic.
]]
Spell.CanSelfCast = false
Spell.NodeOffset = Vector(-377, -365, 0)
Spell.AccuracyDecreaseVal = 0
function Spell:OnFire(wand)
local ent = wand:HPWGetAi... | nilq/small-lua-stack | null |
-- Natural Selection 2 Competitive Mod
-- Source located at - https://github.com/xToken/CompMod
-- lua\CompMod\Weapons\Marine\HeavyMachineGun\shared.lua
-- - Dragon
local networkVars =
{
mg_upg1 = "boolean",
mg_upg2 = "boolean",
}
local originalHeavyMachineGunOnInitialized
originalHeavyMachineGunOnInitialized = ... | nilq/small-lua-stack | null |
local completion = require "cc.shell.completion"
local complete = completion.build({completion.choice, {"autorun"}})
shell.setCompletionFunction("apps/item-transporter.lua", complete)
shell.setAlias("item-transporter", "apps/item-transporter.lua") | nilq/small-lua-stack | null |
object_tangible_holiday_empire_day_crew_carrier_steering_mechanism_crate = object_tangible_holiday_empire_day_shared_crew_carrier_steering_mechanism_crate:new {
}
ObjectTemplates:addTemplate(object_tangible_holiday_empire_day_crew_carrier_steering_mechanism_crate, "object/tangible/holiday/empire_day/crew_carrier_stee... | nilq/small-lua-stack | null |
ITEM.name = "Evacuation"
ITEM.desc = "An old cassette with audio of an unknown station being evacuated"
ITEM.model = "models/z-o-m-b-i-e/metro_2033/mafony/m33_cassete_02.mdl"
ITEM.music = "avoxgaming/ambients/evacuation.mp3" | nilq/small-lua-stack | null |
-- ... filetypes.lua
local autwo = require("neovim.core.autwo")
local events = "BufNewFile,BufRead"
autwo.group("ExtraFileTypes", {
{ events, "*.env*", "set ft=sh" },
{ events, "*.mdx", "set ft=markdown" },
{ events, "*.mjml", "set ft=html" },
{ events, "*tmux*", "set ft=tmux" },
{ events, ".eslintignore,... | nilq/small-lua-stack | null |
#!/usr/bin/env lua
local env = setmetatable({}, {__index=_G})
if setfenv then setfenv(1, env) else _ENV = env end
require 'symmath.tests.unit.unit'(env, 'tests/unit/match')
timer(nil, function()
env.W = Wildcard
env.const = Constant
env.zero = const(0)
env.one = const(1)
env.x = var'x'
env.y = var'y'
env.z = var'z'
... | nilq/small-lua-stack | null |
--[[
MIT License
Copyright (c) 2019 Michael Wiesendanger
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, mod... | nilq/small-lua-stack | null |
fx_version 'cerulean'
game 'gta5'
version '0.1.0'
author 'Reece Stokes <hagen@hyena.gay>'
description 'FiveM utility resource for easier alertbox handling.'
repository 'https://github.com/MrGriefs/alertbox'
client_script {
'util.lua',
'client.lua',
}
server_script {
'config.lua',
'server.lua',
} | nilq/small-lua-stack | null |
local Players = game:GetService('Players')
local Player = Players.LocalPlayer or Players:GetPropertyChangedSignal('LocalPlayer'):Wait()
local Mouse = Player:GetMouse()
local Lib = game.ReplicatedStorage:WaitForChild('Lib')
local Misc = require(Lib:WaitForChild("Misc"))
... | nilq/small-lua-stack | null |
function URLEncodeChar(c)
return sprintf("%%%02x",string.byte(c))
end
function URLEncode(s)
return string.gsub(s,"[^%w]",URLEncodeChar)
end
function FIFO_PushPlainText (fifo,s) fifo:PushFilledString(s,string.len(s)) end
function URLEncodeArr(arr)
local res = ""
for k,v in pairs(arr) do
if (res ~= "") then ... | nilq/small-lua-stack | null |
package.path = "../?.lua;"..package.path
local ffi = require("ffi")
local cctype = require("wordplay.cctype")
local toupper = cctype.toupper
local tolower = cctype.tolower
local tokenz = require("wordplay.wordplay")
local word_iter = tokenz.word_iter
local trans_item = tokenz.trans_item
local binstream = require("wo... | nilq/small-lua-stack | null |
--[[
-- Initializing WIFI
net.wf.setup(
net.wf.mode.AP,
"robotito-guille",
"robotito",
net.wf.powersave.NONE
)
net.wf.start()
-- Socket UDP
local socket = require("__socket")
local host = "192.168.4.1"
local port = 2018
local ip_broadcast = "192.168.4.255"
local message_id = 0
print("Binding to host '" ... | nilq/small-lua-stack | null |
return {
version = "1.1",
luaversion = "5.1",
orientation = "orthogonal",
width = 32,
height = 32,
tilewidth = 16,
tileheight = 16,
properties = {},
tilesets = {
{
name = "tiles",
firstgid = 1,
tilewidth = 64,
tileheight = 64,
spacing = 0,
margin = 0,
imag... | nilq/small-lua-stack | null |
G = {}
G.res_suffix = ".png" | nilq/small-lua-stack | null |
local lanes = require("lanes").configure{ with_timers = false}
local l = lanes.linda "my linda"
-- we will transfer userdata created by this module, so we need to make Lanes aware of it
local dt = lanes.require "deep_test"
local test_deep = true
local test_clonable = true
local test_uvtype = "function"
local makeUse... | nilq/small-lua-stack | null |
----
-- Tests for the xlsxwriter.lua Worksheet class.
--
-- Copyright 2014-2015, John McNamara, jmcnamara@cpan.org
--
require "Test.More"
plan(4)
----
-- Tests setup.
--
local expected
local got
local caption
local Worksheet = require "xlsxwriter.worksheet"
local worksheet
----
-- Test the _write_page_margins() met... | nilq/small-lua-stack | null |
-----------------------------------
-- Attachment: Flame Holder
-----------------------------------
require("scripts/globals/status")
-----------------------------------
local validskills = {
[1940] = true,
[1941] = true,
[1942] = true,
[1943] = true,
[2065] = true,
[2066] = true,
[2067] = ... | 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.