content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
local Observable = require("reactivex.observable")
local Observer = require("reactivex.observer")
local Subscription = require("reactivex.subscription")
local Subject = require("reactivex.subjects.subject")
require('reactivex.operators.switch')
describe('switch', function()
it('errors when the source errors', funct... | nilq/small-lua-stack | null |
local vim = vim
local global = {}
local home = os.getenv("HOME")
function global.load_variables()
global.is_mac = jit.os == 'OSX'
global.is_linux = jit.os == 'Linux'
global.is_windows = jit.os == 'Windows'
local path_sep = global.is_windows and '\\' or '/'
global.vim_path = home .. path_sep..'.confi... | nilq/small-lua-stack | null |
local Keys = {
["ESC"] = 322, ["BACKSPACE"] = 177, ["E"] = 38, ["ENTER"] = 18, ["LEFT"] = 174, ["RIGHT"] = 175, ["TOP"] = 27, ["DOWN"] = 173
}
Config = {}
Config.MarkerSize = { x = 1.5, y = 1.5, z = 1.2 }
Config.MarkerColor = { r = 0, g = 130, b = 204 }
Config.MainMenu = {
{x = 2500.960... | nilq/small-lua-stack | null |
-- Do blocks explicitly define lexical scope
do
local x = 6
y = 7
end
print(x, y) -- nil 7
| nilq/small-lua-stack | null |
local gearman = require "luagearman.gearman"
local ffi = require "ffi"
ffi.cdef([[
typedef enum
{
GEARMAN_WORKER_ALLOCATED= (1 << 0),
GEARMAN_WORKER_NON_BLOCKING= (1 << 1),
GEARMAN_WORKER_PACKET_INIT= (1 << 2),
GEARMAN_WORKER_GRAB_JOB_IN_USE= (1 << 3),
GEARMAN_WORKER_PRE_SLEEP_IN_USE=... | nilq/small-lua-stack | null |
-- Unit tests for Util.lua, part of the FitzUtils library.
-- Run from the Binds directory
-- Load up libs required for testing.
require('test/luaunit/luaunit')
require("Util")
-- Upvalue
local U = FitzUtils;
TestFitzUtils = {}
function TestFitzUtils:setUp()
-- Turn off prints
U:Debug(false)
e... | nilq/small-lua-stack | null |
--[[--ldoc desc
业务自定义的全局管理类
]]
---------------------------------------------------------------------------------------------
local Global = {}
-- local globals = {};
-- -- 保护global中定义的全局变量不被修改
-- local protectEnv = function(env)
-- local mt = getmetatable(env);
-- local cache = {};
-- mt.__newindex = funct... | nilq/small-lua-stack | null |
function love.conf(t)
t.releases = {
title = "l2 engine",
package = "l2",
loveVersion = "0.10.2",
version = "0.1",
author = "Egor Dorichev",
email = "egordorichev@gmail.com",
description = "l2 engine template",
homepage = nil,
identifier = "l2",
excludeFileList = {},
releaseDirectory = nil
}
t... | nilq/small-lua-stack | null |
--[[
Name: Alfa
For: TalosLife
By: TalosLife
]]--
local Car = {}
Car.Make = "Kia"
Car.Name = "Kia Forte Koup"
Car.UID = "kia_Cope"
Car.Desc = "A drivable kia by TheDanishMaster"
Car.Model = "models/tdmcars/kia_fortekoup.mdl"
Car.Script = "scripts/vehicles/TDMCars/kiafortekoup.txt"
Car.Price = 19000
Car.FuellTank = ... | nilq/small-lua-stack | null |
--mz.h & mz_zip.h 2.9.1 Zip manipulation
local ffi = require'ffi'
ffi.cdef[[
enum {
MZ_OK = 0,
MZ_STREAM_ERROR = -1,
MZ_DATA_ERROR = -3,
MZ_MEM_ERROR = -4,
MZ_BUF_ERROR = -5,
MZ_VERSION_ERROR = -6,
... | nilq/small-lua-stack | null |
line_blue =
{["off_color"] = "none",
["on_color"] = "none",
["line_color"] = "0cf",
["line_width"] = "3"};
line_pink =
{["off_color"] = "none",
["on_color"] = "none",
["line_color"] = "f9c",
["line_width"] = "3"};
line_brown =
{["off_color"] = "none",
[... | nilq/small-lua-stack | null |
local function file_exists(file)
local f = io.open(file, "rb")
if f then f:close() end
return f ~= nil
end
local function load_file(file_name)
if not file_exists(file_name) then
print("File " .. file_name .. " does not exist")
return {}
end
local lines = {}
for line in io.lines(file_name) do
... | nilq/small-lua-stack | null |
-- C# program will use this!
civ3_home = "/Users/jim/civ3"
-- variable init
-- vars for bic flag hunt
byte_chunks = {}
offset = 0
num_bytes = 32
idx = 1
num_bic_with_bldg = 0
num_bic_with_wchr = 0
num_bic_with_both = 0
-- vars for tile hunt
tile_off = {}
num_mountains = 0
-- called for each sav
function process_sa... | nilq/small-lua-stack | null |
corellia_destroy_missions = {
minLevelCeiling = 25,
lairSpawns = {
{
lairTemplateName = "corellia_gubbur_lair_neutral_small",
minDifficulty = 4,
maxDifficulty = 8,
size = 20,
},
{
lairTemplateName = "corellia_meatlump_camp_neutral_medium_theater",
minDifficulty = 4,
maxDifficulty = 8,
s... | nilq/small-lua-stack | null |
local function OffsetCoords(tCoord, offsetX, offsetY)
for i = 1, #tCoord, 2 do
tCoord[i ] = tCoord[i ] + offsetX
tCoord[i + 1] = tCoord[i + 1] + offsetY
end
end
local function ScaleCoords(tCoord, scaleX, scaleY)
for i = 1, #tCoord, 2 do
tCoord[i ] = tCoord[i ] * scaleX
... | nilq/small-lua-stack | null |
---------------------------------------------
-- Red lotus Blade
--
-- Description: Deals fire elemental damage. Damage varies with TP.
-- Type: Physical
-- Utsusemi/Blink absorb: 1 Shadow?
-- Range: Melee
---------------------------------------------
require("scripts/globals/monstertpmoves")
require("scripts/globals/s... | nilq/small-lua-stack | null |
--------------
-- Includes --
--------------
addEvent('onPlayerChatting', true)
addEvent('onClientPlayerChatting', true)
--------------------------------
-- Local function definitions --
--------------------------------
local function ChtOnPlayerChatting(chatting)
for player, pdata in pairs(g_Players) d... | nilq/small-lua-stack | null |
for i,v in ipairs({
createObject ( 3749, 894.20001, 2246.8, 21.4, 0, 0, 270 ),
createObject ( 8417, 875.7998, 2225.5, 15.5, 0, 179.995, 0 ),
createObject ( 8417, 834.4502, 2225.5, 15.5, 0, 179.995, 0 ),
createObject ( 8417, 875.79999, 2185.5, 15.5, 0, 179.995, 0 ),
createObject ( 8417, 834.4502, 2185.5, 15.5, 0, 179.99... | nilq/small-lua-stack | null |
-- See LICENSE for terms
return {
PlaceObj("ModItemOptionToggle", {
"name", "CropsNeverFail",
"DisplayName", T(302535920011851, "Crops Never Fail"),
"Help", T(302535920011852, "Crops will never fail no matter the conditions (you'll get a random yield amount instead of failing)."),
"DefaultValue", false,
}),
... | nilq/small-lua-stack | null |
require('./emerald/emerald') | nilq/small-lua-stack | null |
registerNpc(871, {
walk_speed = 160,
run_speed = 370,
scale = 160,
r_weapon = 112,
l_weapon = 0,
level = 69,
hp = 2000,
attack = 224,
hit = 183,
def = 190,
res = 84,
avoid... | nilq/small-lua-stack | null |
scifi_nodes.get_switch_rules = function(param2)
-- param2 = 2
local rules = {
{x=1, y=-1, z=-1},
{x=1, y=-1, z=1},
{x=0, y=-1, z=-1},
{x=0, y=-1, z=1},
}
-- Left and right when looking to +y ?
if param2 == 3 then
rules = mesecon.rotate_rules_right(mesecon.rotate_rules_right (rules))
elseif param2 == ... | nilq/small-lua-stack | null |
#include "util.lua"
function drawEffectsText()
UiPush()
UiAlign("top left")
UiTranslate(20, 20)
if string.find(GetString("game.levelid"), "hub") then
UiTranslate(0, 40)
end
UiTextShadow(0, 0, 0, 0.25, 2.0)
UiFont("MOD/ui/stranger.ttf", 50)
UiColor(1, 0.25, 0.25, 0.75)
UiText("Stalker Mod")
UiTran... | nilq/small-lua-stack | null |
if op == "+" then
r = a + b
elseif op == "-" then
r = a - b
elseif op == "*" then
r = a * b
elseif op == "/" then
r = a / b
else
error("invalid operation")
end
if true then foo = 'bar' else foo = nil end
if true then
print('hello')
end
if true then
print('hello') end
if nested then
if nested then
... | nilq/small-lua-stack | null |
--[[
Title: world store
Author(s): big
Date: 2018.8.24
City: Foshan
use the lib:
------------------------------------------------------------
NPL.load("(gl)Mod/WorldShare/store/WorldStore.lua")
local WorldStore = commonlib.gettable('Mod.WorldShare.store.World')
---------------------------------------------------------... | nilq/small-lua-stack | null |
local Lerp = Lerp
local tonumber = tonumber
local table_insert = table.insert
local table_remove = table.remove
local math_ceil = math.ceil
local math_abs = math.abs
local math_min = math.min
local render_StartBeam = render.StartBeam
local cam_IgnoreZ = cam.IgnoreZ
local render_EndBeam = render.EndBeam
local render_Add... | nilq/small-lua-stack | null |
--魔鍵憑神-アシュタルトゥ
--Script by mercury233
local s,id,o=GetID()
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2)
c:EnableReviveLimit()
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGE... | nilq/small-lua-stack | null |
return {
Version = "6.18.1",
[1001] = {
item_name = "Boots of Speed",
cost = 300,
cost_total = 300,
from = {},
},
[1004] = {
item_name = "Faerie Charm",
cost = 125,
cost_total = 125,
from = {},
},
[1006] = {
item_name = "Rejuvenation Bead",
cost = 150,
cost_total = 150,
from = {},
},
... | nilq/small-lua-stack | null |
mainmenu = {
waiting = true,
timeout = 60,
blinkFrames = 0,
}
mainmenu.title = {
x = 0,
y = 0,
text = 'Galleons',
angleX = love.math.random() * math.pi,
angleY = love.math.random() * math.pi,
}
mainmenu.buttons = {
{icon = sprites.ui_A, color={r=0.2, g=0.8, b=0.2}, text = 'Play', y... | nilq/small-lua-stack | null |
function Alcohol.ChangeUnits(ply, amount)
if not Alcohol.Units[ply:SteamID64()] then
Alcohol.ResetUnits(ply, true)
end
Alcohol.Units[ply:SteamID64()] = Alcohol.Units[ply:SteamID64()] + amount
net.Start("Alcohol:Units:Change")
net.WriteUInt(Alcohol.Units[ply:SteamID64()], 7)
net.Send(ply)
hook.Run("Alcohol:... | nilq/small-lua-stack | null |
local mod = DBM:NewMod(1490, "DBM-Party-Legion", 3, 716)
local L = mod:GetLocalizedStrings()
mod:SetRevision(("$Revision: 15188 $"):sub(12, -3))
mod:SetCreatureID(91789)
mod:SetEncounterID(1811)
mod:SetZone()
mod:RegisterCombat("combat")
mod:RegisterEventsInCombat(
"SPELL_AURA_APPLIED 193698",
"SPELL_... | nilq/small-lua-stack | null |
local ev = require'ev'
local ev_common = require'websocket.ev_common'
local socket = require'socket'
setloop('ev')
describe('The ev_common helper module',function()
local listen_io
setup(function()
local listener = socket.bind('*',12345)
listener:settimeout(0)
listen_io = ev.IO.n... | nilq/small-lua-stack | null |
--[[
Creates a Roact component that is a grey rounded button
Props:
position : UDim2 - Position of the button.
zIndex : number - Determines the order of UI element rendering.
anchorPoint : UDim2 - The anchor point of the button.
onResume : function() - Fires when the button is activated.
]]
local CorePa... | nilq/small-lua-stack | null |
-- some locals
local SR = SR_Tracker
local config = SR.Config
--
-- localizations
local ipairs = ipairs
local istable = istable
local IsValid = IsValid
local GetHumans = player.GetHumans
local mysql = SR.MySQL
local srEncode = SR.Encode
local setPlyVar = SR.SetPlyVar
local hasMenuPermissions = SR.HasMenuPermissions... | nilq/small-lua-stack | null |
return {
generate_xmldoc_under_cursor = require('knife.docs').generate_xmldoc_under_cursor
}
| nilq/small-lua-stack | null |
---@class SystemInfo
C_System = {}
| nilq/small-lua-stack | null |
function completor_handle_event(event)
return require'completor.handle'.handle(event)
end
local function autocmd(event)
local cmd = string.format(
"autocmd %s * lua completor_handle_event('%s')",
event,
event
)
vim.cmd(cmd)
end
autocmd("TextChangedP")
autocmd("TextChangedI")
autocmd("InsertEnter")
autocmd... | nilq/small-lua-stack | null |
--
-- Copyright (c) 2017, Xavier Gastaldi.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--
require 'nn'
... | nilq/small-lua-stack | null |
TOOL.Category = "Construction"
TOOL.Name = "#tool.dynamite.name"
TOOL.ClientConVar[ "group" ] = 52
TOOL.ClientConVar[ "damage" ] = 200
TOOL.ClientConVar[ "delay" ] = 0
TOOL.ClientConVar[ "model" ] = "models/dav0r/tnt/tnt.mdl"
TOOL.ClientConVar[ "remove" ] = 0
TOOL.Information = { { name = "left" } }
cleanup.Registe... | nilq/small-lua-stack | null |
local mpd = {
client = require("widgets.playback.mpd.client"),
stream = require("widgets.playback.mpd.stream"),
}
return mpd
| nilq/small-lua-stack | null |
local Config = require("AdituV.DetectTrap.Config");
local Effects = require("AdituV.DetectTrap.Magic.Effects");
local Spells = require("AdituV.DetectTrap.Magic.Spells");
local LockData = require("AdituV.DetectTrap.LockData");
local MCPFeature = require("AdituV.DetectTrap.Utility.McpFeature");
local MobilePlayer = requi... | nilq/small-lua-stack | null |
local f = string.format
My.Translator:register("de", {
comms_directions_label = "Richtungsangaben",
comms_directions_main = function()
return Util.random({
"Wo soll es denn hingehen?",
"Womit kann ich helfen?",
})
end,
comms_directions_detail = function(stationCa... | nilq/small-lua-stack | null |
-- Gui to Lua
-- Version: 3.2
-- Instances:
local KATAlyzer = Instance.new("ScreenGui")
local MainFrame = Instance.new("Frame")
local UICorner = Instance.new("UICorner")
local DropFrame = Instance.new("Frame")
local CombatBTN = Instance.new("TextButton")
local VisualsBTN = Instance.new("TextButton")
local CombatWindo... | nilq/small-lua-stack | null |
#!/usr/bin/env lua
-- In case we want to run tests when library is not installed.
local LUA_PATH_SEP = package.config:sub(3, 3)
package.path = package.path .. LUA_PATH_SEP .. '../src/?.lua'
local CORRECT_OUTPUT = [[- . . . . . - - . - . . - . . - . - . - . - - . . . . - . - - - . - -... | nilq/small-lua-stack | null |
local base = require('xe.ui.TreeNode')
---@class xe.AssetsNode:xe.ui.TreeNode
local M = class('xe.AssetsNode', base)
local im = imgui
local wi = require('imgui.Widget')
function M:ctor(attr)
base.ctor(self)
self:_updateAttr(attr)
self:setOnSelect(function()
self:getView():onSelChanged(self)
en... | nilq/small-lua-stack | null |
slot0 = class("LevelAwardPage", import("...base.BaseActivityPage"))
slot0.OnInit = function (slot0)
slot0.bg = slot0:findTF("bg")
slot0.award = slot0:findTF("scroll/award")
slot0.content = slot0:findTF("scroll/content")
slot0.scrollTF = slot0:findTF("scroll")
slot0.pageSignDownTF = slot0:findTF("sign")
slot0.pag... | nilq/small-lua-stack | null |
local is_blank = assert(foundation.com.is_blank)
local ItemInterface = assert(yatm.items.ItemInterface)
local fspec = assert(foundation.com.formspec.api)
local is_stack_cartridge = assert(yatm_armoury.is_stack_cartridge)
local InventorySerializer = assert(foundation.com.InventorySerializer)
function get_ammo_can_forms... | nilq/small-lua-stack | null |
--[[
Luci configuration model for statistics - collectd exec plugin configuration
(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
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 ... | nilq/small-lua-stack | null |
local BaseClass = require "NJLI.STATEMACHINE.NodeEntity"
local Image = {}
Image.__index = Image
--#############################################################################
--DO NOT EDIT ABOVE
--#############################################################################
--#######################################... | nilq/small-lua-stack | null |
Config = {}
Config.Animations = {
{
name = 'festives',
label = 'Festives',
items = {
{label = "Play music", type = "scenario", data = {anim = "WORLD_HUMAN_MUSICIAN"}},
{label = "Dj", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@dj", anim = "dj"}},
{label = "Drink a beer", ty... | nilq/small-lua-stack | null |
--[[
The MIT License (MIT)
Copyright (c) 2016 Christoph Kubisch
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, ... | nilq/small-lua-stack | null |
local inspect = require 'inspect'
local _ = require ("moses")
local ml_test = {}
ml_test.__index = ml_test
local _read_dataset = function(datafile, training_share)
local samples_file = assert(io.open(datafile, 'r'))
-- get all classes
local classes = {}
local dataline
for line in samples_file:lines() d... | nilq/small-lua-stack | null |
function Mining.Core.GetRandomOre()
local pool = {}
for k, v in pairs(Mining.Config.Ores) do
for i=1, v.rarity do
table.insert(pool, k)
end
end
return table.Random(pool)
end
function Mining.Core.MinedOre(ply, ore)
local oreData = Mining.Config.Ores[ore]
if not Mining.Users[ply:SteamID64()] then
Minin... | nilq/small-lua-stack | null |
function always()
print "Hello from Lua!"
load "subalf"
end
function runTask()
print "Running from Lua!"
end
function fromMoon()
tasks.subloaded()
end | nilq/small-lua-stack | null |
--[[
____ _____ _____ _____ _ _ _____
| _ \ / ____/ ____| / ____| | | |_ _|
| |_) | (___| (___ | | __| | | | | |
| _ < \___ \\___ \ | | |_ | | | | | |
| |_) |____) |___) | | |__| | |__| |_| |_
|____/|_____/_____/ \_____|\____/|_____|
by Alex & Fede
--]]
-- V3rmill... | nilq/small-lua-stack | null |
--- === hs.caffeinate ===
---
--- Control system power states (sleeping, preventing sleep, screen locking, etc)
---
--- **NOTE**: Any sleep preventions will be removed when hs.reload() is called. A future version of the module will save/restore state across reloads.
local caffeinate = require "hs.caffeinate.internal"
... | nilq/small-lua-stack | null |
function onLoad()
self.createButton(
{
click_function = "calculateTotal",
function_owner = self,
label = "TOT",
position = {0, 2.5, -0.37},
rotation = {0, 180, 0},
scale = {0.3, 0.5, 0.5},
width = 350,
height = 3... | nilq/small-lua-stack | null |
local function get_variables_hash(msg)
if msg.to.type == 'chat' then
return 'chat:'..msg.to.id..':variables'
end
if msg.to.type == 'channel' then
return 'channel:'..msg.to.id..':variables'
end
if msg.to.type == 'user' then
return 'user:'..msg.from.id..':variables'
end
end
local function get_val... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Qulun Dome
-- NPC: The Mute
-- !zone 148
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigger(player,npc)
local duration = math.random(600,900);
if (player:hasStatusEffect(tpz.effect.SILENCE) == false) then
player... | nilq/small-lua-stack | null |
-- pattern for finding figure references
-- Example: {#f:fig1ref:t}
local patt = "{%#%l:.+:%a}"
local id_patt = ":(.+):"
local type_patt = "{#(.+):.+:%a}"
-- to keep track of which figures have already been seen
local seen_elements = {}
-- storage for figure numbers arranged by figure type
local figure_numbers = {}
... | nilq/small-lua-stack | null |
all_defaults = {["generic注释开始"]=0,["generic注释结束"]=0,["IO口未设置"]=0,["KEY9 按键HOLD消息:"]=255,["KEY8 按键双击消息:"]=255,["KEY8 按键三击消息:"]=255,["KEY9 按键双击消息:"]=255,["期望音量 32"]=0.000000,["KEY9 按键抬按消息:"]=255,["KEY9 按键三击消息:"]=255,["使能32"]=0,["KEY1 按键短按消息:"]=255,["KEY0 按键HOLD消息:"]=255,["KEY0 按键抬按消息:"]=255,["KEY1 按键长按消息:"]=255,["KEY0 按键... | nilq/small-lua-stack | null |
local class = require('opus.class')
local Region = require('opus.ui.region')
local Util = require('opus.util')
local _rep = string.rep
local _sub = string.sub
local _gsub = string.gsub
local colors = _G.colors
local Canvas = class()
local function genPalette(map)
local t = { }
local rcolors = Util.transpos... | nilq/small-lua-stack | null |
--- C++ compilers
local M = {
gcc = require("configure.lang.cxx.compiler.gcc"),
clang = require("configure.lang.cxx.compiler.clang"),
msvc = require("configure.lang.cxx.compiler.msvc"),
}
M.env_name = "CXX"
M.description = "C++ compiler"
local os = Platform.current():os()
if os == Platform.OS.linux then
M.c... | nilq/small-lua-stack | null |
-----------------------------------------
-- Spell: Infrasonics
-- Lowers the evasion of enemies within a fan-shaped area originating from the caster
-- Spell cost: 42 MP
-- Monster Type: Lizards
-- Spell Type: Magical (Ice)
-- Blue Magic Points: 4
-- Stat Bonus: INT+1
-- Level: 65
-- Casting Time: 5 seconds
-- Recast ... | nilq/small-lua-stack | null |
require("luaCallCs")
require("luaCallCsReflect")
require("csCallLua")
require("genCode")
--require("luaTdrTest")
function islua53() return not not math.type end
-- for test case
CMyTestEnv = TestEnvironment:new()
function CMyTestEnv:new(oo)
local o = oo or {}
setmetatable(o, self)
self.__index = self
... | nilq/small-lua-stack | null |
--[[
Copyright (c) 2016 by Marco Lizza (marco.lizza@gmail.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including... | nilq/small-lua-stack | null |
local table = require('table')
local enumerable = {}
local enumerator_cache = setmetatable({}, {__mode = 'k'})
local empty_constructor
local add_fn = function(x, y)
return x + y
end
local min_fn = function(x, y)
return x < y and x or y
end
local max_fn = function(x, y)
return x > y and x or y
end
enumer... | nilq/small-lua-stack | null |
--redis-store consistency check
local ns = ARGV[1]
if ns and #ns > 0 then
ns = ns..":"
end
local concat = function(...)
local arg = {...}
for i = 1, #arg do
arg[i]=tostring(arg[i])
end
return table.concat(arg, " ")
end
local dbg =function(...) redis.call('echo', concat(...)); end
local errors={}
local er... | nilq/small-lua-stack | null |
-- Settings.
local winSize = { 800, 600 }
local monitor = 0
-- Constants.
local PLAYER_SPEED = 300
local BALL_SPEED = 330
-- Game objects.
local playerLeft = {
pos = { 0, 0 },
size = { 10, 70 },
score = 0,
}
local playerRight = {
pos = { 0, 0 },
size = { 10, 70 },
score = 0,
}
local ball = {
pos = { 0, 0 },
r... | nilq/small-lua-stack | null |
--
-- floating_terminal.lua
-- floating terminal
--
local config = require("configs").floating_terminal
local wm = require("modules.wm")
FloatingTerm = {}
function FloatingTerm:get_instance ()
return hs.appfinder.windowFromWindowTitle(config.title)
end
function FloatingTerm:spawn_instance ()
os.execute(config.c... | nilq/small-lua-stack | null |
ENT.Type = "nextbot"
ENT.Base = "base_nextbot"
ENT.RenderGroup = RENDERGROUP_TRANSLUCENT
ENT.IsRapist = true
AccessorFuncDT(ENT, "RapistType", "Int", 0)
AccessorFuncDT(ENT, "RapeVictim", "Entity", 0)
function ENT:GetRaping()
return self:GetRapeVictim():IsValid()
end
ENT.IsRaping = ENT.GetRaping
function ENT:GetRa... | nilq/small-lua-stack | null |
return Def.ActorFrame {Name = "YOU_WISH_YOU_WERE_PLAYING_BEATMANIA_RIGHT_NOW"}
| nilq/small-lua-stack | null |
local topHeight = 0
if System:iOS() then
topHeight = window:statusBarHeight() + window:navBarHeight()
end
linear = ScrollView(false, true):width(MeasurementType.MATCH_PARENT):marginTop(topHeight)
-- 默认状态,Label输入文字样式
action1 = Label():marginTop(5):marginBottom(5):bgColor(Color(121, 45, 122, 1.0)):setGravity(Gravity.... | nilq/small-lua-stack | null |
describe("Busted unit testing framework", function()
describe("should be awesome", function()
local router = require("squall_router").new_router()
it("router instance not a nil", function()
assert.is_true(router ~= nil)
end)
it("router should accept correct validators", function()
local ... | nilq/small-lua-stack | null |
version = 4
volume = 1.0
randSampContainer = 0
| nilq/small-lua-stack | null |
--[[
Extra: I have not tested to see if this works on trading plaza! dont dm me about that!
Discord webhook is sent when you crash a server, the information sent is the game.JobId and the amount of players crashed.
(I made the script loop close robloxguis so youll know when the server crashed when your screen goes blur... | nilq/small-lua-stack | null |
-- state
-- LOVE Jam 2022
-- Theme: Earthquake
require ("gametitle")
require ("gameover")
--[[local state = {
[1] = "GameTitle",
[2] = "GameLoop",
[3] = "GameOver"
}]]--
currentState = "GameTitle"
baseSpeed = 10
font = love.graphics.newFont("fnt/Kenney High Square.ttf", 40)
bigFont = love.graphics.newFont("fnt/Ke... | nilq/small-lua-stack | null |
ENT.Type = "anim"
ENT.Base = "base_wire_entity"
ENT.PrintName = "Keycard (Wire)"
ENT.Author = "Jesse Dubay (adb)"
ENT.Contact = "jesse@thefortytwo.net"
ENT.Spawnable = false
ENT.AdminSpawnable = false
| nilq/small-lua-stack | null |
--[[
------------------------------------------------------------------------------
Peep is licensed under the MIT Open Source License.
(http://www.opensource.org/licenses/mit-license.html)
------------------------------------------------------------------------------
Copyright (c) 2014 Landon Manning - LManning17@gma... | nilq/small-lua-stack | null |
GLib.Net.DataType = GLib.Enum (
{
UInt8 = 0,
UInt16 = 1,
UInt32 = 2,
UInt64 = 3,
Int8 = 4,
Int16 = 5,
Int32 = 6,
Int64 = 7,
Float = 8,
Double = 9,
Vector = 10,
Char = 11,
Bytes = 12,
String = 13,
LongString = 14,
Boolean = 15,
}
)
GLi... | nilq/small-lua-stack | null |
if _hx_bit_raw then
_hx_bit_clamp = function(v)
if v <= 2147483647 and v >= -2147483648 then
if v > 0 then return _G.math.floor(v)
else return _G.math.ceil(v)
end
end
if v > 2251798999999999 then v = v*2 end;
if (v ~= v or math.abs(v) == _G.math.huge) then return nil ... | nilq/small-lua-stack | null |
-----------------------------------------
-- LOCALIZED GLOBAL VARIABLES
-----------------------------------------
local ZGV = _G.ZGV
local BugReport = {}
local guiRoot, uiCenter, uiTopLeft, uiBottomRight, uiTopRight, ctEditBox = _G.GuiRoot, _G.CENTER, _G.TOPLEFT, _G.BOTTOMRIGHT, _G.TOPRIGHT, _G.CT_EDITBOX
local tinser... | nilq/small-lua-stack | null |
--To include this file, use
--dofile('csv.lua') or require('csv')
--Function to convert a *SV file to a Lua array
--file: the name of the file to read
--delim: the delimeter (default ',')
function dataToTable(file, delim)
--Set initial values
if delim == nil then --allow delim to be optional
delim = ',... | nilq/small-lua-stack | null |
--#########################################################
function CheckBoxClass.ProcessEvents(this)
if (WM_MOUSEMOVE.occured) then
--
--if (WM_MOUSEMOVE.iPar5==this.obj1Num) then
--
--else
--
--end
end
if (WM_LBUTTONDOWN.occured) then
if... | nilq/small-lua-stack | null |
local TwoGuysInMotorcycleAi = {}; TwoGuysInMotorcycleAi.__index = TwoGuysInMotorcycleAi
function TwoGuysInMotorcycleAi:new(actor)
assert(actor, "Is needed a actor to manipulate")
local this = {
actor = actor,
elapsedTime = 0
}
return setmetatable(this, TwoGuysInMotorcycleAi)
end
funct... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Port Bastok
-- NPC: Ronan
-- Start & Finishes Quest: Out of One's Shell
-----------------------------------
require("scripts/globals/settings")
require("scripts/globals/titles")
require("scripts/globals/quests")
local ID = require("scripts/zones/Port_Bastok/IDs")
----------... | nilq/small-lua-stack | null |
package("aqt")
set_kind("binary")
set_homepage("https://github.com/miurahr/aqtinstall")
set_description("aqt: Another (unofficial) Qt CLI Installer on multi-platforms")
set_license("MIT")
if is_host("windows") then
add_configs("shared", {description = "Download shared binaries.", default = ... | nilq/small-lua-stack | null |
local void = require('gitsigns.async').void
local scheduler = require('gitsigns.async').scheduler
local config = require('gitsigns.config').config
local mk_repeatable = require('gitsigns.repeat').mk_repeatable
local popup = require('gitsigns.popup')
local util = require('gitsigns.util')
local manager = require('gitsig... | nilq/small-lua-stack | null |
DEFINE_BASECLASS("tfa_nmrih_base")
local lastresortnanim = -2
SWEP.Type = "Melee"
SWEP.LuaShellEject = false
SWEP.Primary.Blunt = false
SWEP.Primary.Damage = 60
SWEP.Primary.Reach = 75
SWEP.Primary.RPM = 60
SWEP.Primary.SoundDelay = 0.2
SWEP.Primary.Delay = 0.35
SWEP.Primary.Window = 0.3
SWEP.Secondary.Blunt = fal... | nilq/small-lua-stack | null |
local addonName, G = ...
function G.LocalToServer(t)
return t ~= 0 and GetServerTime() + t - GetTime() or 0
end
function G.ServerToLocal(t)
return t ~= 0 and GetTime() + t - GetServerTime() or 0
end
function G.Eventer(handlers)
local frame = CreateFrame('Frame')
for ev in pairs(handlers) do
frame:Registe... | nilq/small-lua-stack | null |
local QuestGroupsByName = {}
local buttonPool = CreateFramePool("Button", QuestMapFrame.QuestsFrame, "ZQA_AbandonButton")
local function Slug(value)
return value:lower():gsub('[^a-z]', '')
end
local function PlaceButton(parent, offset, title, tooltip, slug)
title = title or parent:GetText()
tooltip = tool... | nilq/small-lua-stack | null |
local E = Brazier.Equals
local function _testArray(suite, subSuite, equals)
TestSuite.assert(suite)(subSuite)(1)(equals( {})( {}))
TestSuite.assert(suite)(subSuite)(2)(equals( { 1 })( { 1 }))
TestSuite.assert(suite)(subSuite)(3)(equals({ 1, 2, 3 })({ 1, 2, 3 }))
TestSuite.assert(suit... | nilq/small-lua-stack | null |
local o = require("buftabline.options")
local add_commands = require("buftabline.add-commands")
local reset = function() vim.cmd("comclear") end
describe("add_commands", function()
it("should create commands", function()
reset()
add_commands()
assert.equals(vim.fn.exists(":ToggleBuftabli... | nilq/small-lua-stack | null |
local M = { }
M.trim = function(path)
if (string.match(path, "[/\\%.]")) == nil then
return ""
else
return string.match(path, "(.-)[/\\%.]?[^%./\\]+$")
end
end
return M
| nilq/small-lua-stack | null |
local cmd = {}
cmd.title = "Rocket"
cmd.description = "Rocket a player into the sky; they will explode."
cmd.author = "Nub"
cmd.timeCreated = "Sunday, May 24 2020 @ 12:20 AM CST"
cmd.category = "Fun"
cmd.call = "rocket"
cmd.usage = "<player>"
cmd.server = function(caller, args)
local targs = nadmin:FindPla... | nilq/small-lua-stack | null |
id = 'V-38677'
severity = 'high'
weight = 10.0
title = 'The NFS server must not have the insecure file locking option enabled.'
description = 'Allowing insecure file locking could allow for sensitive data to be viewed or edited by an unauthorized user.'
fixtext = 'By default the NFS server requires secure file-lock req... | nilq/small-lua-stack | null |
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
RegisterCommand('setped', function(source, args)
if source == 0 then
local id = args[1]
if id then
local tPlayer = ESX.GetPlayerFromId(id)
if tPlayer ~= nil then
TriggerClientEvent('Tomci0:OpenPedMenu', id)
els... | nilq/small-lua-stack | null |
--[[
Copyright (c) 2012 Benjamin Halsted <bhalsted@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the"Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merg... | nilq/small-lua-stack | null |
-- troubleshoot-item.lua
--@ module = true
--[====[
troubleshoot-item
=================
Print various properties of the selected item. Sometimes useful for
troubleshooting issues such as why dwarves won't pick up a certain item.
]====]
function find_specific_ref(object, type)
for i, ref in pairs(object.specific_... | nilq/small-lua-stack | null |
This is a test for lk.
The secret word is 'adagio'.
| 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.