content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
local SoundManager = {}
local Sounds = game.ReplicatedStorage.Pioneers.Assets.Sound
local TweenService = game:GetService("TweenService")
local masterGroup = Instance.new("SoundGroup", workspace)
local effectGroup = Instance.new("SoundGroup", workspace)
masterGroup.Volume = 1
effectGroup.Volume = 1
loca... | nilq/small-lua-stack | null |
MinHeap = {}
MinHeap.__index = MinHeap
local floor = math.floor
function MinHeap.new()
return setmetatable({ n = 0 }, MinHeap)
end
function MinHeap:insertvalue(num)
self[self.n] = num
self.n = self.n + 1
local child = self.n - 1
local parent, temp
while child > 0 do
parent = floor((child - 1)/2)
if self[... | nilq/small-lua-stack | null |
--[[
Licensed under GNU General Public License v2
* (c) 2019, Alphonse Mariyagnanaseelan
Bindings for the treetile layout
--]]
local awful = require("awful")
local gtable = require("gears.table")
local treetile = require("treetile")
local k = {
m = "Mod4",
c = "Mod1",
a = "Control",
... | nilq/small-lua-stack | null |
local skynet = require "skynet"
local socket = require "socket"
local httpd = require "http.httpd"
local sockethelper = require "http.sockethelper"
local urllib = require "http.url"
local service = require "service"
local table = table
local string = string
local webrouter = require "http_webrouter"
local httpserver =... | nilq/small-lua-stack | null |
vehicleUpgrades = { names = { }, prices = { } }
lowriders = { [536]=true, [575]=true, [534]=true, [567]=true, [535]=true, [576]=true, [412]=true }
racers = { [562]=true, [565]=true, [559]=true, [561]=true, [560]=true, [558]=true }
_getVehicleCompatibleUpgrades = getVehicleCompatibleUpgrades
function getVehicleCompa... | nilq/small-lua-stack | null |
local K, C = unpack(select(2, ...))
local Module = K:NewModule("NoTutorials")
local _G = _G
function Module:KillTutorials()
_G.HelpOpenTicketButtonTutorial:Kill()
_G.HelpPlate:Kill()
_G.HelpPlateTooltip:Kill()
_G.EJMicroButtonAlert:Kill()
_G.WorldMapFrame.BorderFrame.Tutorial:Kill()
_G.SpellBookFrameTutorialBut... | nilq/small-lua-stack | null |
----------------------------------------------------------------------------------------------------
-- Mock for the environment without Sound.
----------------------------------------------------------------------------------------------------
-- import
local class = require "flower.class"
local BaseSoundMgr = requir... | nilq/small-lua-stack | null |
-- signs_mtg/init.lua
-- Aliases to support loading worlds using nodes following the old naming convention
-- These can also be helpful when using chat commands, for example /giveme
minetest.register_alias("sign_wall", "base_signs:wood_sign_wall")
minetest.register_alias("default:sign_wall", "base_signs:wood_sign_wall... | nilq/small-lua-stack | null |
slot2 = "NewbieApi30003"
NewbieApi30003 = class(slot1)
NewbieApi30003.ctor = function (slot0)
slot4 = BaseNewbieApi
ClassUtil.extends(slot2, slot0)
end
NewbieApi30003.checkStart = function (slot0, slot1)
slot4 = gameMgr
if gameMgr.getIsLoginBank(slot3) then
slot4 = slot0
slot0.finish(slot3)
else
slot5 =... | nilq/small-lua-stack | null |
--[[
Testing the Bag
--]]
local Collections = require("Collections")
local names = {
alpha = "alpha-value";
beta = "beta-value";
gamma = "gamma-value";
}
local bg = Collections.Bag();
for k,v in pairs(names) do
print("adding: ", k, v)
bg[k] = v;
end;
print("Count after add: ", #bg)
bg["gamma"] = nil;
print... | nilq/small-lua-stack | null |
NMS_MOD_DEFINITION_CONTAINER =
{
["MOD_FILENAME"] = "TestMod.pak",
["MOD_AUTHOR"] = "Mjjstral",
["NMS_VERSION"] = "1.77",
["MODIFICATIONS"] =
{
{
["PAK_FILE_SOURCE"] = "NMSARC.59B126E2.pak",
["MBIN_CHANGE_TABLE"] =
{
{
["MBIN_FILE_SOURCE"] = "GCSKYGLOBALS.GLOBALS.MBIN",
["EX... | nilq/small-lua-stack | null |
local unionScienceInfo = {}
function unionScienceInfo:Start(data)
self:initData(data)
self:initUi()
end
function unionScienceInfo:initData(data)
-- ERROR_LOG("ding==========>>>",sprinttb(data))
self.isLock=data.isLock
if data then
self.id = data.id
end
self.info = module.unionScienc... | nilq/small-lua-stack | null |
-- Must be called after app:enable("etlua")
local function render_component(name, data)
local template_f = require("views.components." .. name)
return template_f(data):render_to_string()
end
return render_component
| nilq/small-lua-stack | null |
HUD = class("HUD", Entity)
function HUD:initialize()
Entity.initialize(self)
self.layer = 1
self.hurtTimer = 0
self.hurtTime = 0.3
self.pad = 5
self.lineSpace = 20
self.healthImg = assets.images.healthIcon
self.shieldImg = assets.images.shieldIcon
self.clockMap = Spritemap:new(assets.images.clockIcon... | nilq/small-lua-stack | null |
local module = {}
module.SSID = {}
module.SSID["NAME"] = "PASSWORD"
module.PORT = 80
return module
| nilq/small-lua-stack | null |
local M = {}
-- http://stackoverflow.com/questions/6380820/get-containing-path-of-lua-file
function script_path()
local str = debug.getinfo(2, "S").source:sub(2)
return str:match("(.*/)")
end
function M.parse(arg)
local cmd = torch.CmdLine()
cmd:text()
cmd:text('OpenFace')
cmd:text()
cmd:... | nilq/small-lua-stack | null |
--[[--
Provide WebView class.
This class allow to display HTML content in a window.
The WebView highly depends on the underlying OS.
Opening multiple WebView windows is not supported.
A webview requires a thread to run its own event loop, which is not compatible with the base event loop.
This class provide ... | nilq/small-lua-stack | null |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:26' using the latest game version.
NOTE: This file should only be used as IDE support; it should NOT be distributed with addons!
****************************************************************************
CONTENTS OF THIS FILE IS COPYRI... | nilq/small-lua-stack | null |
local status = require("nvimmercurial/status")
local graphlog = require("nvimmercurial/graphlog")
local commands = require("nvimmercurial/commands")
status.register_close_callback(function()
graphlog.close()
end)
graphlog.register_close_callback(function()
status.close()
end)
local commit_msg_buf = -1;
-- In... | nilq/small-lua-stack | null |
----------------------------------------
-- CCNode
----------------------------------------
CCNodeExtend.remove = CCNodeExtend.removeSelf
function CCNodeExtend:add(child, zorder, tag)
self:addChild(child, zorder or 0, tag or 0)
return self
end
function CCNodeExtend:addTo(target, zorder, tag)
target:addC... | nilq/small-lua-stack | null |
for i = 1, 10 do
local t = false
repeat
t = f3(i)
if f4() then
break
else
f1()
end
f2()
until true
if t then
break
end
end
| nilq/small-lua-stack | null |
local p = {}
--[[
luastatus supports using pango markup like attributes.
see bellow for a quick demo of how to use this.
the attributes allowed are the same as the span attributes in pango,
represented inside a table.
]]--
-- For more informations about pango:
-- https://developer.gnome.org/pango/stable/PangoMarku... | nilq/small-lua-stack | null |
-- prevent use of loadstring(code)()
-- this is a simple VM which replicates loadstring()() in it's entirety
-- not written by me
local waitDeps = {
'Rerubi';
'LuaK';
'LuaP';
'LuaU';
'LuaX';
'LuaY';
'LuaZ';
}
local holder = script.Parent:WaitForChild("Dependencies"):WaitForChild("VM");
for i,v in pairs(waitDe... | nilq/small-lua-stack | null |
if mods['Krastorio2'] then
data:extend({
-- -- Basic science
{
type = "bool-setting",
name = "k2-automation-science-pack",
default_value = true,
setting_type = "startup",
order = "AA-AA-S1"
},
-- K2 extended science packs
{
type = "bool-settin... | nilq/small-lua-stack | null |
--- === plugins.core.macosshortcuts ===
---
--- Adds actions for macOS Monterey Shortcuts.
local require = require
--local log = require "hs.logger".new "macosshortcuts"
local shortcuts = require "hs.shortcuts"
local image = require "hs.image"
local config = re... | nilq/small-lua-stack | null |
function onCreate()
-- background shit
makeLuaSprite('bg', 'bg', -500, -300);
setLuaSpriteScrollFactor('bg', 0.9, 0.9);
makeLuaSprite('ground', 'ground', -650, 600);
setLuaSpriteScrollFactor('ground', 0.9, 0.9);
scaleObject('ground', 1.1, 1.1);
-- sprites that only load if Low Quality is turned off
... | nilq/small-lua-stack | null |
registerNpc(111, {
walk_speed = 180,
run_speed = 520,
scale = 95,
r_weapon = 0,
l_weapon = 0,
level = 37,
hp = 26,
attack = 165,
hit = 107,
def = 106,
res = 68,
avoid ... | nilq/small-lua-stack | null |
--
-- Created by IntelliJ IDEA.
-- User: xinzhang
-- Date: 10/08/2017
-- Time: 11:59 PM
-- To change this template use File | Settings | File Templates.
--
SUMMER_START = 5;
SUMMER_END = 8;
| nilq/small-lua-stack | null |
local modpath = minetest.get_modpath("ks_metals")
dofile(modpath.."/nodes.lua")
dofile(modpath.."/smelting.lua")
| nilq/small-lua-stack | null |
local originX = SCREEN_CENTER_X;
local originY = SCREEN_CENTER_Y+82;
local textbanner = 30;
local spacing = 31;
local numcharts = 18;
local voffset = 0;
local paneLabels = {"Taps","Jumps","Holds","Hands","Mines","Other"};
local t = Def.ActorFrame{
OnCommand=cmd(stoptweening;diffusealpha,0;sleep,0.5;line... | nilq/small-lua-stack | null |
----------------------------------------------------------------------------------------------------
-- skada module
--
--if Skada its not present, dont use this module
if not IsAddOnLoaded( "Skada" ) then return; end
--get the engine and create the module
local Engine = select(2,...);
local mod = Engine.AddOn:NewMo... | nilq/small-lua-stack | null |
object_mobile_chief_olum = object_mobile_shared_chief_olum:new {
}
ObjectTemplates:addTemplate(object_mobile_chief_olum, "object/mobile/chief_olum.iff")
| nilq/small-lua-stack | null |
--Codeforces plugin
local botAPI, discord, pluginName, pluginPath, pluginDir = ...
local plugin = {}
--== Plugin Meta ==--
plugin.name = "Codeforces" --The visible name of the plugin
plugin.icon = ":bar_chart:" --The plugin icon to be shown in the help command
plugin.version = "V0.0.1" --The visible version string o... | nilq/small-lua-stack | null |
--每个服务进程都有一个唯一的服务标识,由服务分组(group)和服务索引(index)两部分构成
--有三种形式:
--servcie_id(string): 2.1
--service_id(number): 131073
--service_name: lobby.1
--在上面的示例中,服务id 2.1中的2表明服务分组(group)为2(lobby),实例编号(index)为1
service_groups =
{
router = 1,
gateway = 2,
lobby = 3,
dbagent = 4,
indexsvr = 5,
mailsvr = 6,
};
se... | nilq/small-lua-stack | null |
assets =
{
Asset("ANIM", "anim/cook_pot_food.zip"),
}
local function fn()
local inst = CreateEntity()
inst.entity:AddTransform()
inst.entity:AddAnimState()
MakeInventoryPhysics(inst)
inst.AnimState:SetBuild("cook_pot_food")
inst.AnimState:SetBank("food")
inst.AnimState:PlayAnimation("bonestew", false)
ins... | nilq/small-lua-stack | null |
---
--- Generated by MLN Team (https://www.immomo.com)
--- Created by MLN Team.
--- DateTime: 15-01-2020 17:35
---
---
--- 缓存策略
---
---@link https://www.immomo.comCachePolicy.html
---@class CachePolicy @parent class
---@public field name string
---@type CachePolicy
CachePolicy = {
---
--- 缓存策略
---
CACHE_ONLY =... | nilq/small-lua-stack | null |
if UseItem(186) == true then goto label0 end;
do return end;
::label0::
AddItem(186, -1);
Talk(73, "据说”飞雪连天射白鹿,笑书神侠倚碧鸳”这十四字各是那”十四天书”书名的第一个字.你可以此为线索去找.", "talkname73", 0);
Add3EventNum(-2, 0, 0, 701, -1)
do return end;
| nilq/small-lua-stack | null |
--[[
Copyright 2021 Manticore Games, Inc.
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, merge, publish, distrib... | nilq/small-lua-stack | null |
local nvim_lsp = require('lspconfig')
local cmp = require('cmp')
-- Set hidden https://github.com/neovim/nvim-lspconfig/issues/426
vim.opt.hidden = true
-- AutoComplete
-- Set completeopt to have a better completion experience
vim.o.completeopt = 'menuone,noselect'
cmp.setup({
snippet = {
expand = function(ar... | nilq/small-lua-stack | null |
local log = require 'utils.log'
local skynet = require 'skynet'
return function(target)
local ping_service = skynet.newservice('hwtest_ping')
local r, err = skynet.call(ping_service, 'lua', 'ping', target)
if r then
log.debug("PING "..target.." OK")
else
log.debug("PING "..target.." FAILED", err)
end
skyne... | nilq/small-lua-stack | null |
-- 3D Transport test with Vacuum and Incident-isotropic BC.
-- SDM: PWLD
-- Test: Nonce
num_procs = 4
--############################################### Check num_procs
if (check_num_procs==nil and chi_number_of_processes ~= num_procs) then
chiLog(LOG_0ERROR,"Incorrect amount of processors. " ..
... | nilq/small-lua-stack | null |
local THREAD_FILE_NAME = (...):gsub("%.", "/") .. "/thread.lua"
local current = (...)
local load
load = function(path)
local succ, loaded = pcall(require, path)
if not (succ) then
local LC_PATH = current .. '.' .. path
succ, loaded = pcall(require, LC_PATH)
if not (succ) then
LC_PATH = current:gsu... | nilq/small-lua-stack | null |
local MemAdmin = require "memadmin"
mem_user_admin = MemAdmin.new("tb_user", "id")
mem_player_admin = MemAdmin.new("tb_player", "playerid")
mem_deskplayer_admin = MemAdmin.new("tb_desk_player", "id")
mem_desk_admin = MemAdmin.new("tb_desk", "deskid")
mem_arena_admin = MemAdmin.new("tb_arena_template", "arenaid")
| nilq/small-lua-stack | null |
--This class acts as a pipe between the incoming messages and commands.
--It observes the content of the incoming messages, and, depending on the optional flags,
--executes specific commands
--Remember: there can only be one command handler and plugin handler
--per a server handler. Side effects of using multiple comma... | nilq/small-lua-stack | null |
--[=[
Utility functions primarily used to bind animations into update loops of the Roblox engine.
@class StepUtils
]=]
local HttpService = game:GetService("HttpService")
local RunService = game:GetService("RunService")
local StepUtils = {}
--[=[
Binds the given update function to render stepped.
```lua
local s... | nilq/small-lua-stack | null |
--- Generated XboxOneDark with Python
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))
local Spritesheet = require("Spritesheet")
local XboxOneDark = setmetatable({}, Spritesheet)
XboxOneDark.ClassName = "XboxOneDark"
XboxOneDark.__index = XboxOneDark
function XboxOneDark.new(... | nilq/small-lua-stack | null |
world =
{
entitys =
{
[0] = "scripts/test.lua",
[1] = "scripts/stickman.lua",
[2] = "scripts/ground.lua"
}
} | nilq/small-lua-stack | null |
return {
summary = 'Get the depth of the Texture.',
description = 'Returns the depth of the Texture, or the number of images stored in the Texture.',
arguments = {
{
name = 'mipmap',
type = 'number',
default = '1',
description = 'The mipmap level to get the depth of. This is only vali... | nilq/small-lua-stack | null |
--[[ only for debug
table_print = require('table_print')
table.print = table_print.print_r
--]]
-- 打印警告信息
function printWarn(text)
print("\nModerncv Warning!\n" .. text .. "\nPlease Check\n\n")
end
-- 获取一个table的所有text
function getText(content)
local newcontent = ""
if type(content) ~= "table" then
... | nilq/small-lua-stack | null |
--[[ Author: Firetoad
Date: 12.05.2017 ]]
if modifier_contributor_statue == nil then
modifier_contributor_statue = class({})
end
function modifier_contributor_statue:CheckState()
local state = {
[MODIFIER_STATE_INVULNERABLE] = true,
[MODIFIER_STATE_NOT_ON_MINIMAP] = true,
[MODIFIER_STATE_NO_HEALTH_BAR] = tr... | nilq/small-lua-stack | null |
internet = require("delayedLoad.dlua").new("internetCore.dlua");
Internet = internet;
return internet;
| nilq/small-lua-stack | null |
--[[
- util.lua
- Handy module containing various functions for game development in lua,
particularly with Love2D.
- Authored by Thomas Smallridge (sundowns)
- https://github.com/sundowns/lua-utils
MIT LICENSE
Copyright (c) 2019 Thomas Smallridge
Permission is hereby granted, free of charge, to any p... | nilq/small-lua-stack | null |
object_mobile_dressed_restuss_lt_wulf = object_mobile_shared_dressed_restuss_lt_wulf:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_restuss_lt_wulf, "object/mobile/dressed_restuss_lt_wulf.iff")
| nilq/small-lua-stack | null |
--[[
@file network.lua
@license The MIT License (MIT)
@author Alex <alex@maximum.guru>
@copyright 2016 Alex
--]]
--- @module network
local network = {}
local bit32 = require("bit32")
local bit128 = require("bit128")
local shell = require("lib.shell")
local shrunner = require("shrunner")
-- There are 3 different repr... | nilq/small-lua-stack | null |
local rR, rG, rB = 100, 250, 100
local function npack(...)
return {_n=select('#',...);...}
end
local function crun(commandstring)
outputChatBox("Executing client command:" .. commandstring, rR, rG, rB)
local results = npack( assert(loadstring(commandstring))() )
local resultsString = ""
local first = true
for... | nilq/small-lua-stack | null |
reaper.AddProjectMarker(0, false,
reaper.GetPlayState() & 1 == 1 and
reaper.GetPlayPosition() or
reaper.GetCursorPosition(), 0,
"Multicam - Switch to camera " ..
string.match(select(2, rea... | nilq/small-lua-stack | null |
require "config.settings"
local animations = {}
local defaults = {
file = "sprites",
size = {
height = 16,
width = 16
}
}
local crystal_animation = {
stand = {
fps = 1,
frames = { 0 }
},
walk = {
fps = 4,
frames = { 0, 1, 0, 1 }
},
attack = {
fps = 1,
frames = { 0 }
... | nilq/small-lua-stack | null |
local Vector3 = require("Scripts/Vector3")
function DeleteCoin(entity)
DeleteEntity(entity)
end
function PlayerLeft(entity, inputValue, deltaTime)
if inputValue > 0.2 then
local ComponentPhysics = GetComponentPhysics(entity)
local currentRotation = GetRotation(ComponentPhysics)
local y = currentRotation:getX(... | nilq/small-lua-stack | null |
function vehicleGui()
local screenW, screenH = guiGetScreenSize()
vehicleWindow = guiCreateGridList((screenW - 231) / 2, (screenH - 292) / 2, 231, 288, false)
guiSetAlpha(vehicleWindow, 0.90)
guiSetProperty(vehicleWindow, "AlwaysOnTop", "True")
guiSetVisible(vehicleWindow,false)
vehicleWindowButtonSpawn = guiCre... | nilq/small-lua-stack | null |
require("core.lsp").run("javascript")
| nilq/small-lua-stack | null |
--[[
GuildMemberNotifier
Author: @ChrisAnn
Thanks to SoulGemsCounter, Combat Log Statistics and XPNotifier for being inspiration
]]
GuildMemberNotifier = {}
GuildMemberNotifier.name = "GuildMemberNotifier"
GuildMemberNotifier.version = "1.1.2"
GuildMemberNotifier.debug = false
GuildMemberNotifier.guildTable = {
... | nilq/small-lua-stack | null |
--[[
CCScene:transition("cf",{"crossFade",1,CCOrientation.Left})
CCScene:add("firstScene",CCScene())
CCScene:run("firstScene","fadeIn")
CCScene:forward("firstScene","cf")
CCScene:back("crossFade")
CCScene:clearHistory()
--]]
local CCScene = require("CCScene")
local CCDirector = require("CCDirector")
local s... | nilq/small-lua-stack | null |
#!/usr/bin/env lua
local exec = require "tek.lib.exec"
local c = exec.run(function()
error "child error"
end)
print "parent done"
--[[
parent done
luatask: bin/task/test30.lua:4: child error
stack traceback:
[C]: in function 'error'
bin/task/test30.lua:4: in function <bin/task/test30.lua:3>
[C... | nilq/small-lua-stack | null |
require "/scripts/util.lua"
require "/scripts/vec2.lua"
require "/scripts/interp.lua"
require "/lib/stardust/color.lua"
function init()
script.setUpdateDelta(3) -- was 5
self.drawPath = "/startech/objects/power/"
self.dMeter = self.drawPath .. "battery.meter.png"
dPos = vec2.add(objectAnimator.position()... | nilq/small-lua-stack | null |
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local S = E:GetModule('Skins')
--Cache global variables
--Lua functions
local _G = _G
local pairs = pairs
--WoW API / Variables
--Global variables that we don't cache, list them here for mikk's FindGlobals script
-... | nilq/small-lua-stack | null |
#! /usr/bin/env texlua
local lfs = require("lfs")
local os = require("os")
local io = require("io")
local OS_TYPE = os["type"]
local OS_NAME = os["name"]
local IS_UNIX = OS_TYPE == "unix"
local VERSION = "1.0"
local print = print
local exit = os.exit
local execute = os.execute
local __FILE__ = arg[0]
local i = 1
... | nilq/small-lua-stack | null |
ESX = nil
local PlayerData = {}
CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
Citizen.Wait(5000)
PlayerData = ESX.GetPlayerData()
end)
RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', ... | nilq/small-lua-stack | null |
ITEM.name = "Mica"
ITEM.model ="models/lostsignalproject/items/artefacts/mica.mdl"
ITEM.description = "A hollowed out shell of stone, with a hard, slightly rubbery black mass coating the insides."
ITEM.longdesc = "This artifact seems to be a rarer variant of the 'Slug' artifact, however the conditions under which it is... | nilq/small-lua-stack | null |
minetest.register_entity("holoemitter:entity", {
initial_properties = {},
on_step = function(self, dtime)
-- sanity checks
if not self.data or not self.data.emitterpos then
self.object:remove()
return
end
if not self.dtime then
-- set dtime
self.dtime = dtime
else
-- increment
self.dtim... | nilq/small-lua-stack | null |
--[[
Copyright (c) 2010-2012 Matthias Richter
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, merge, publish, dis... | nilq/small-lua-stack | null |
--[[
Input: A length-2 table of length-K tables
Input[1]: K tables
Input[2]: K tables
Output: A length-K table of length-2 tables
Output[i]: {Input[1][i], input[2][i]}
--]]
local CrossMergeTable, parent = torch.class('nn.CrossMergeTable', 'nn.Module')
function CrossMergeTable:__init()
parent.... | nilq/small-lua-stack | null |
-- skynet.error output
local logfile
local function write_log(file, str)
file:write(str, "\n")
file:flush()
end
-- because log service error will not write right. use xpcall for debug log service
-- if no err_msg in log/wlua.log then set `daemon = nil` in `conf/wlua.conf` .
local ok, err_msg = xpcall(function(... | nilq/small-lua-stack | null |
function read(file)
local f = assert(io.open(file, "rb"))
local content = f:read("*all")
f:close()
return content
end
rules = read("engine/cfg/test-lang-rules.txt")
words = read("engine/cfg/test-lang-words.txt")
lang = Lang.new()
lang:init_rules(rules)
lang:init_words(words)
sentence = "eat a clean app... | nilq/small-lua-stack | null |
fbase_at_st = Creature:new {
objectName = "@mob/creature_names:fbase_at_st",
socialGroup = "imperial",
faction = "imperial",
level = 205,
chanceHit = 11.5,
damageMin = 1170,
damageMax = 2050,
baseXp = 20500,
baseHAM = 139000,
baseHAMmax = 200000,
armor = 3,
resists = {135,135,-1,200,200,15,15,200,-1},
meat... | nilq/small-lua-stack | null |
local _={}
_[1]={"error","function call \"fn\" is ambigous; may be at least either:\n\9function type dispatch ambigous.fn(a::number) (at test/tests/function type dispatch ambigous.ans:4)\n\9function type dispatch ambigous.fn(x::number) (at test/tests/function type dispatch ambigous.ans:1); at test/tests/function type d... | nilq/small-lua-stack | null |
-- helper.lua
local helper = {}
local _string_table = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c',
'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
'u', 'v', 'w', 'x', 'y', 'z'}
-- 获得随机字符串,包括字母和数字
function helper.random_string(byte)
local b... | nilq/small-lua-stack | null |
-- @file plugin/lua_repl.lua A tool Node for building a Lua REPL in-editor
-- This file is part of Godot Lua PluginScript: https://github.com/gilzoide/godot-lua-pluginscript
--
-- Copyright (C) 2021 Gil Barbosa Reis.
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this softwar... | nilq/small-lua-stack | null |
LinkLuaModifier( "arc_warden_tempest_double_modifier", "heroes/hero_arc_warden/arc_warden_tempest_double_lua.lua", LUA_MODIFIER_MOTION_NONE )
arc_warden_tempest_double = class({})
function arc_warden_tempest_double:OnSpellStart()
local caster = self:GetCaster()
local spawn_location = caster:GetOrigin()
local he... | nilq/small-lua-stack | null |
talus_aakuan_champion_camp_neutral_large_theater = Lair:new {
mobiles = {{"aakuan_champion",1},{"aakuan_anarchist",1},{"aakuan_assassin",1}},
spawnLimit = 15,
buildingsVeryEasy = {"object/building/poi/corellia_selonian_separatists_large1.iff","object/building/poi/corellia_selonian_separatists_large2.iff"},
building... | nilq/small-lua-stack | null |
---------------------------------------------------------------------------------------------
-- Requirement summary:
-- [Policies] External UCS: PTU without "external_consent_status_groups" struct
-- [Policies] External UCS: PreloadedPT without "external_consent_status_groups" struct
--
-- Description:
-- In case:
-- ... | nilq/small-lua-stack | null |
local colors = require 'onedark.colors'
vim.cmd('highlight clear')
if vim.g.syntax_on ~= nil then
vim.cmd('syntax reset')
end
vim.cmd('set t_Co=256')
vim.g.colors_name = 'onedark'
local terminal_italics = vim.g.onedark_terminal_italics or false
local red = colors.red
local dark_red = colors.dark_red
local green... | nilq/small-lua-stack | null |
local colouriser = require("arshamiser.colouriser")
local palette = require("arshamiser.palette")
colouriser.setup(palette.dark, "arshamiser_dark")
-- selene: allow(global_usage)
_G.CURRENT_PALETTE = palette.dark
| nilq/small-lua-stack | null |
local sickle = Action()
function sickle.onUse(player, item, fromPosition, target, toPosition, isHotkey)
return ActionsLib.useSickle(player, item, fromPosition, target, toPosition, isHotkey)
or ActionsLib.destroyItem(player, target, toPosition)
end
sickle:id(3293, 3306, 32595)
sickle:register()
| nilq/small-lua-stack | null |
--[[
********************************
* *
* The Moon Project *
* *
********************************
This software is provided as free and open source by the
staff of The Moon Project, in accordance with
the GPL license. This means we provide the so... | nilq/small-lua-stack | null |
-- Copyright (c) Sony Computer Entertainment America LLC.
-- All rights Reserved.
--
-- Master Premake configuration script, included by all solution scripts.
--
sdk = {}
--
-- Locate the top of the SDK source tree, making the hardcoded assumption
-- that it is two levels above the location of this script.
--
... | nilq/small-lua-stack | null |
function nut.char.create(data, callback)
local timeStamp = os.date("%Y-%m-%d %H:%M:%S", os.time())
data.money = data.money or nut.config.get("defMoney", 0)
nut.db.insertTable({
_name = data.name or "",
_desc = data.desc or "",
_model = data.model or "models/error.mdl",
_schema = SCHEMA and SCHEMA.folder or... | nilq/small-lua-stack | null |
game = {
positions = {{},{},{},{}}
}
Resources = {}
assets = {
SpriteBatches = {
cards = love.graphics.newSpriteBatch( love.graphics.newImage( "graphics/sprites.png" ), 100 )
}
}
Clickables = require("Clickables")
Sprite = require("Sprite")
SliderTile = require("entities/SliderTile")
game.changeState = function... | nilq/small-lua-stack | null |
local months={"JAN","MAR","MAY","JUL","AUG","OCT","DEC"}
local daysPerMonth={31+28,31+30,31+30,31,31+30,31+30,0}
function find5weMonths(year)
local list={}
local startday=((year-1)*365+math.floor((year-1)/4)-math.floor((year-1)/100)+math.floor((year-1)/400))%7
for i,v in ipairs(daysPerMonth) do
if startday=... | nilq/small-lua-stack | null |
description = [[
Determines which Security layer and Encryption level is supported by the
RDP service. It does so by cycling through all existing protocols and ciphers.
When run in debug mode, the script also returns the protocols and ciphers that
fail and any errors that were reported.
The script was inspired by MWR'... | nilq/small-lua-stack | null |
local formatting = require("modules.completion.formatting")
vim.cmd([[packadd cmp-nvim-lsp]])
if not packer_plugins["nvim-lsp-installer"].loaded then
vim.cmd([[packadd nvim-lsp-installer]])
end
if not packer_plugins["lsp_signature.nvim"].loaded then
vim.cmd([[packadd lsp_signature.nvim]])
end
if not packer_plugin... | nilq/small-lua-stack | null |
config = {
var0 = "true"
}
| nilq/small-lua-stack | null |
ITEM.name = "Glock 19"
ITEM.desc = "Пистолет американского производства, ценимый многими сталкерами за высокие боевые и эксплуатационные качества. Это отличное оружие, особенно в умелых руках и при должной сноровке. \n\nБоеприпасы 9x19"
ITEM.price = 16272
ITEM.model = "models/wick/weapons/stalker/stcopwep/w_glock_m... | nilq/small-lua-stack | null |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- CloneTrooper1019, 2020
-- Realism Server
----------------------------------------------------------------------------------------... | nilq/small-lua-stack | null |
--[[
Consume svg colors, generate a list of colors sorted by luminance
Change the order of l1 > l2 in the orderByBrightness function
to change from white/black to black/whate
]]
local spairs = require("spairs")
local svgcolors = require("svgcolors")
local coloring = require("coloring")
local luma = colori... | nilq/small-lua-stack | null |
module("luci.controller.oh3c", package.seeall)
function index()
entry({"admin", "network", "oh3c"}, cbi("oh3c/usermgr"), "OH3C", 30).dependent=false
end
| nilq/small-lua-stack | null |
local json = config.json
return {
handler = function(context)
context.response.headers["content-type"] = "application/json"
if config.empty_as_array then
if type(context.output) == 'table' and next(context.output) == nil then
return context.response.send('[]')
end
end
context.resp... | nilq/small-lua-stack | null |
dbcore = {}
dbcore.resultmappers={}
dbcore.insert_statements={}
dbcore.queries={}
function dbcore.init(db_path)
dbcore.dbpath = db_path
print("DB Path:", dbcore.dbpath)
local sqlite3 = require("lsqlite3")
dbcore.db = sqlite3.open_memory()
read_configs()
populate_db()
end
function read_configs()
... | nilq/small-lua-stack | null |
--- Defines reverse lookup table.
---
--- # Examples
---
--- ```lua
--- event.on_built_entity(function(e)
--- local player = game.get_player(e.player_index)
--- local controller_name = reverse_defines.controllers[player.controller_type]
--- end)
--- ```
local flib_reverse_defines = {}
-- TODO: Figure out how to do... | nilq/small-lua-stack | null |
function Collectionator.Utilities.GetRealmAndFaction()
local realm = Auctionator.Variables.GetConnectedRealmRoot()
local faction = UnitFactionGroup("player")
return realm .. "_" .. faction
end
| nilq/small-lua-stack | null |
blocFunctions = {}
function function_binding(toBind)
for k, v in pairs(toBind) do
blocFunctions[k] = function(position)
local newObjs = {};
for i in string.gmatch(v, "%S+") do
table.insert(newObjs, Engine.Scene:createGameObject(i)({position = position}));
... | 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.