content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
HowToBeam = HowToBeam or {}
local HowToBeam = HowToBeam
HowToBeam.SkillNames = {
STRING_PULSE_UNMORPHED = zo_strformat(SI_ABILITY_NAME, GetAbilityName(46340)),
STRING_CRUSHING_SHOCK = zo_strformat(SI_ABILITY_NAME, GetAbilityName(46348)),
STRING_FORCE_PULSE = zo_strformat(SI_ABILITY_NAME, GetAbilityName(463... | nilq/small-lua-stack | null |
-- (c) 2009-2011 John MacFarlane. Released under MIT license.
-- See the file LICENSE in the source for details.
--- Utility functions for lunamark.
local M = {}
local cosmo = require("cosmo")
local rep = string.rep
-- Change lpeg to LuLPeg when applicable
lpeg = require"lunamark/lulpeg"
local Cs, P, S, lpegmatch ... | nilq/small-lua-stack | null |
object_tangible_quest_corellia_murmur_medical_cabinet = object_tangible_quest_shared_corellia_murmur_medical_cabinet:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_corellia_murmur_medical_cabinet, "object/tangible/quest/corellia_murmur_medical_cabinet.iff")
| nilq/small-lua-stack | null |
local test = {}
local ga = 3
function test.test()
ga = 8
local a = 4
print("hello", ga)
end
return test
| nilq/small-lua-stack | null |
-- standard compatibility switcher block.
local moditems = {} -- switcher
local mineclone_path = minetest.get_modpath("mcl_core") and mcl_core
if mineclone_path then -- means MineClone 2 is loaded
moditems.iron_item = "mcl_core:iron_ingot" -- MCL version of iron ingot
moditems.coal_item = "mcl_core:coalblock" -- ... | nilq/small-lua-stack | null |
--[[
chars v1.20131102
Copyright (c) 2013, Giuliano Riccio
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditio... | nilq/small-lua-stack | null |
local dap = require "dap"
dap.adapters.cpp = {
type = "executable",
name = "cppdbg",
command = vim.api.nvim_get_runtime_file("gadgets/linux/vscode-cpptools/debugAdapters/OpenDebugAD7", false)[1],
args = {},
attach = { pidProperty = "processId", pidSelect = "ask" },
}
local M = {}
local last_gdb_config
M.st... | nilq/small-lua-stack | null |
-- Simplified implementation of mw.title for running WikiMedia Scribunto
-- code under Python
--
-- Copyright (c) 2020-2021 Tatu Ylonen. See file LICENSE and https://ylonen.org
local mw_title_meta = {
}
function mw_title_meta:__index(key)
local v = rawget(mw_title_meta, key)
if v ~= nil then return v end
if... | nilq/small-lua-stack | null |
local frame = {}
local luamp = require 'luamp'
local table = require 'table'
frame.unit = 0.3
-- ruler --
local function longRuler(figs, i)
local x = i * frame.unit
local y = 0.1
table.insert(figs, luamp.line(luamp.point(x, 0), luamp.point(x, y)))
table.insert(figs, luamp.text(luamp.point(x, y), luamp.dir... | nilq/small-lua-stack | null |
local AlertRoot = script.Parent
local DialogRoot = AlertRoot.Parent
local AppRoot = DialogRoot.Parent
local UIBlox = AppRoot.Parent
local Packages = UIBlox.Parent
local Roact = require(Packages.Roact)
local t = require(Packages.t)
local Alert = require(AlertRoot.Alert)
local AlertType = require(AlertRoot.Enum.AlertTy... | nilq/small-lua-stack | null |
-- Compute the 1000th Fibonacci number
-- See https://en.wikipedia.org/wiki/Fibonacci_number
local bint = require 'bint'(768)
local function fibonacci(n)
local first, second = bint.zero(), bint.one()
for _=0,n-1 do
first, second = second, first
second = second + first
end
return first
end
local x = f... | nilq/small-lua-stack | null |
local lunit = lunit
local RUN = lunit and function()end or function ()
local res = lunit.run()
if res.errors + res.failed > 0 then
os.exit(-1)
end
return os.exit(0)
end
lunit = require "lunit"
local TEST_CASE = assert(lunit.TEST_CASE)
local skip = lunit.skip or function() end
local try = requir... | nilq/small-lua-stack | null |
local Proxy = module("vrp", "lib/Proxy")
local vRP = Proxy.getInterface("vRP")
async(function()
vRP.loadScript("cars", "s-cars")
end) | nilq/small-lua-stack | null |
local mod = DBM:NewMod(1228, "DBM-Party-WoD", 8, 559)
local L = mod:GetLocalizedStrings()
mod:SetRevision(("$Revision: 15007 $"):sub(12, -3))
mod:SetCreatureID(79912, 80098)--80098 is mount(Ironbarb Skyreaver), 79912 is boss
mod:SetEncounterID(1759)
mod:SetZone()
mod:SetBossHPInfoToHighest(false)
mod:Regist... | nilq/small-lua-stack | null |
-- charts
-- returns a table to be charted in the main display area
charts = {
current_chart = nil,
}
| nilq/small-lua-stack | null |
object_tangible_loot_creature_loot_collections_space_booster_mark_05_mandal = object_tangible_loot_creature_loot_collections_space_shared_booster_mark_05_mandal:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_space_booster_mark_05_mandal, "object/tangible/loot/creature/loot/collecti... | nilq/small-lua-stack | null |
local buffer = require('buffer')
local t = require('luatest')
local g = t.group()
local function fill_memory(memory, size)
for i = 0, size - 1 do
memory[i] = i
end
end
local function check_memory(memory, size)
for i = 0, size - 1 do
if memory[i] ~= i then return false end
end
retur... | nilq/small-lua-stack | null |
--[[---------------
Hex v0.4
-------------------
Hex conversion lib for lua.
How to use:
hex.to_hex(n) -- convert a number to a hex string
hex.to_dec(hex) -- convert a hex string(prefix with '0x' or '0X') to number
Part of LuaBit(http://luaforge.net/projects/bit/).
Under the MIT license.
copyright(c) 2006~2007 h... | nilq/small-lua-stack | null |
ITEM.name = "Pan"
ITEM.description = "A large standard iron fryin pan, heavy and durable."
ITEM.model = "models/weapons/hl2meleepack/w_pan.mdl"
ITEM.class = "arccw_pan_tn"
ITEM.category = "Melee"
ITEM.weaponCategory = "melee"
ITEM.flag = "V"
ITEM.width = 2
ITEM.height = 1
ITEM.bDropOnDeath = true
ITEM.noBusiness = true | nilq/small-lua-stack | null |
local numLootItems = GetNumLootItems()
for i=1,numLootItems do
local Link = GetLootSlotLink(i)
local _,name, lootQuantity ,Quality = GetLootSlotInfo(i)
if Link and Quality and name and lootQuantity then
_, _, id = string.find(Link, "item:(%d+):")
if Quality >= LootQuality then
if LootLe... | nilq/small-lua-stack | null |
--[[
Define new snippets in the config.snippets table. The first snippet defined, config.snippets.lua.f
defines the "f" snippet for files that have the ".lua" extension. If you want to define the "def"
snippet for Python files, you'd do "config.snippets.py.def", after initializing the py table.
Snippet insert position... | nilq/small-lua-stack | null |
object_tangible_collection_publish_gift_comlink_component_07 = object_tangible_collection_shared_publish_gift_comlink_component_07:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_publish_gift_comlink_component_07, "object/tangible/collection/publish_gift_comlink_component_07.iff") | nilq/small-lua-stack | null |
local image1 = love.graphics.newImage("/img/part/blood1.png")
image1:setFilter("nearest", "nearest")
local ps = love.graphics.newParticleSystem(image1, 1000)
ps:setColors(1, 0, 0, 0, 0.76893937587738, 0, 0, 1, 0.58712118864059, 0, 0, 0.87121212482452, 0, 0, 0, 0)
ps:setDirection(0)
ps:setEmissionArea("none", 0, 0, 0, ... | nilq/small-lua-stack | null |
txd = engineLoadTXD("wayfarer.txd")
engineImportTXD(txd, 586)
dff = engineLoadDFF("wayfarer.dff", 586)
engineReplaceModel(dff, 586)
| nilq/small-lua-stack | null |
PortalWhere = CreateFrame("Frame")
PortalWhere.matchWords = {
["Undercity"] = {
"Undercity",
"UC",
"Undershitty",
},
["Orgrimmar"] = {
"Orgrimmar",
"Orgrimar",
"Org",
"Orgri",
"Ogri",
"Ogr",
"Og",
},
["Thunderbluff"] = ... | nilq/small-lua-stack | null |
--- Provides the import() and reference constructs to the language via metalua.
-- ldoc fails to parse metalua correctly.
-{ extension 'match' }
-{ extension 'log' }
-{ block:
require "metalua.walk"
-----------------------------------------------------------------------------
;
local scope = { }
scope.__index = sco... | nilq/small-lua-stack | null |
util=class{}
function generatequads(atlas,tilewidth,tileheight)
sheetwidth=atlas:getWidth()/tilewidth
sheetheight=atlas:getHeight()/tileheight
spritesheet={}
spritecounter=1
for y=0,sheetheight -1 do
for x=0,sheetwidth-1 do
spritesheet[spritecounter]=love.graphics.newQuad(x*tilewidth,y*tileheight,tilewidth... | nilq/small-lua-stack | null |
minetest.register_craftitem("throwing:arrow", {
description = "Arrow",
inventory_image = "throwing_arrow.png",
})
minetest.register_node("throwing:arrow_box", {
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
-- Shaft
{-6.5/17, -1.5/17, -1.5/17, 6.5/17, 1.5/17, 1.5/17},
--Spitze
{-4.5/... | nilq/small-lua-stack | null |
--[[
@description Hackey-Patterns: An interface plugin for REAPER 5.x and up designed to mimick the sequencer in Jeskola Buzz.
@author: Joep Vanlier
@links
https://github.com/JoepVanlier/Hackey-Patterns
@license MIT
@version 0.51
@about
### Hackey-Patterns
#### What is it?
A lightweight sequencer plugin for RE... | nilq/small-lua-stack | null |
local _2afile_2a = "fnl/snap/view/view.fnl"
local _0_
do
local name_0_ = "snap.view.view"
local module_0_
do
local x_0_ = package.loaded[name_0_]
if ("table" == type(x_0_)) then
module_0_ = x_0_
else
module_0_ = {}
end
end
module_0_["aniseed/module"] = name_0_
module_0_["aniseed/... | nilq/small-lua-stack | null |
local T, C, L, G = unpack(select(2, ...))
local blankTex = C.media.blankTex
-- specific elements for mage class.
T.ClassElements["MAGE"] = function(self)
-- Arcane Charges
if C.unitframes.arcanecharges then
local ArcaneCharges = CreateFrame("Frame", self:GetName() .. "ArcaneCharges", self)
ArcaneCharges:SetPo... | nilq/small-lua-stack | null |
-- Apartment 3: -787.78050000 334.92320000 186.11340000
exports('GetExecApartment3Object', function()
return ExecApartment3
end)
ExecApartment3 = {
currentInteriorId = -1,
Style = {
Theme = {
modern = {interiorId = 227841, ipl = "apa_v_mp_h_01_c"},
moody = {inte... | nilq/small-lua-stack | null |
local throw
if _G._VERSION >= 'Lua 5.2' then
throw = error
else
throw = function(err, lvl)
return error(tostring(err), (lvl or 1)+1)
end
end
local function clone(t)
local o = {}
for k, v in pairs(t) do o[k] = v end
return o
end
local unpack = unpack or table.unpack
local function pack_n(...)
return... | nilq/small-lua-stack | null |
-- Builtins are represented by functions taking compilation environment, varible name and arguments
-- and returning nested arrays of strings representing statement and expression parts of result.
local builtins = {}
-- Returns a builtin for a prefix unary opator.
local function unop(op)
return function(env, var, a... | nilq/small-lua-stack | null |
local PANEL = {};
function PANEL:Init ( )
self.BankPlayerInventory = vgui.Create("perp_bank_", self);
self.BankPlayerInventory = vgui.Create("perp_bank_inv", self);
//self.ShopDescription = vgui.Create("perp2_shop_desc", self);
//self.ShopStoreInventory = vgui.Create("perp2_shop_store", self);
//self.ShopTitle... | nilq/small-lua-stack | null |
-- This module assigns a client_id to sessions if they are using a "Snikket.*"
-- resource identifier. We assume that a resource string in this format is
-- static for the same client instance across every session.
--
-- In the future it is anticipated that this "hack" will be replaced by SASL 2
-- (XEP-0388) and/or Bi... | nilq/small-lua-stack | null |
---
--- stat_dashboard api
--- Created by jacobs.
--- DateTime: 2018/4/26 上午11:32
---
local API = {}
local json = require("cjson")
local gateway_dao = require("core.dao.gateway_dao")
local function get_target(config,service_name)
local targets={}
local httpc = require("core.utils.http_client")({
time... | nilq/small-lua-stack | null |
require("base")
local tcp = require("tcp_connection")
function printtable(t)
for k,v in pairs(t) do
print(k,v)
end
end
x = EXPECT_CALL()
local mobile = tcp.Connection("localhost", 80)
c = mobile:Connect()
mobile:OnDataAvailable(function()
s = mobile:Recv(10000)
print(#s .. " bytes received successfull... | nilq/small-lua-stack | null |
-- enUS Localization.
local _, Addon = ...
Addon:AddLocale("enUS",
{
TITAN_BUTTON_LABEL = "Vendor: ",
TITAN_MENU_TEXT = "Vendor",
TITAN_TOOLTIP_TITLE = "Vendor",
TITAN_TOOLTIP_TOSELL = "To Sell",
TITAN_TOOLTIP_TODELETE = "To Destroy",
TITAN_TOOLTIP_VALUE = "Value",
TITAN_MENU_NEW_RULE = "New Rule",
TITAN_MENU_SETTINGS ... | nilq/small-lua-stack | null |
local LANDMARKS = {
["Outside the Main Gate"] = {"Southlands", 28, 10};
["Outside the Merchants' Gate"] = {"Southlands", 32, 10};
["Wave Dunes -- Ancient Platform"] = {"Southlands", 21, 2 };
}
local PORTS = {
["29,10"] = {"Allanak", 3, 26};
["31,10"] = {"Allanak", ... | nilq/small-lua-stack | null |
--- Utility methods for Region3
-- @module Region3Utils
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))
local BoundingBoxUtils = require("BoundingBoxUtils")
local Region3Utils = {}
function Region3Utils.fromPositionSize(position, size)
local halfSize = size/2
return Region3... | nilq/small-lua-stack | null |
require "luaClass.init"
require "test.containerTest.timeTest"
_ENV=namespace "test"
using_namespace "container"
local st=stack()
st:push(1)
print(st:empty())
print(st:pop())
print(st:empty())
print("---------------------")
st:push(998)
st:push(8877)
print(st:top())
print(st:pop())
print(st:top())
print("----性能测试-----... | nilq/small-lua-stack | null |
return {
name = "Chain Reaction",
author = "evilnote4d",
version = "0.10",
data = [[
#############
#####___#####
#### --- ####
#### ___ ####
#### #$# ##+#
# @ >>> #
# #&# #
# T # # T #
# T T #
#-T--#O#--T-#
#-g-g g-g-#
#-----------#
#######... | nilq/small-lua-stack | null |
--挽魂的影魔
local m=14060018
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(... | nilq/small-lua-stack | null |
local gpgs = require('plugin.gpgs.v2')
local json = require('json')
local isLegacy = require('settings').isLegacy
local gameNetwork
if isLegacy then
gameNetwork = require('gameNetwork')
end
local newButton = require('classes.button').newButton
local leaderboardId = 'CgkIlLro46MXEAIQBg'
local group = d... | nilq/small-lua-stack | null |
-- Adapted from ThePrimeagen
-- https://github.com/ThePrimeagen/harpoon/blob/abb717f174f9fdafe0867193f81558c1fd7d9b7b/lua/harpoon/term.lua
local M = {}
local terminals = {}
local function create_terminal()
vim.api.nvim_command("terminal")
local buf_id = vim.fn.bufnr()
local term_id = vim.b.terminal_job_... | nilq/small-lua-stack | null |
a,b = io.read("*number", "*number")
print(a+b)
| nilq/small-lua-stack | null |
--[[
- @type Library
- @name Test
- @brief This is a test file.
--]]
local m_test = {}
-- Method Test(s)
--[[
- @brief Does the thing. Seriously.
- @note If this does not do the thing, try again.
- @note Sometimes things just don't be like that when it do.
- @param `string` What are we gonna do?
--]]
function m_... | nilq/small-lua-stack | null |
require"iuplua"
-- Utilities
iup_console = {}
function iup_console.concat(str, info)
return str .. info .. "\n"
end
function iup_console.print_version_info()
iup_console.clear()
local str = ""
if (im) then str = iup_console.concat(str, "IM " .. im._VERSION .. " " .. im._COPYRIGHT) end
if (cd) then str = ... | nilq/small-lua-stack | null |
function start()
descriptifyPlayer()
end
function stop()
end
function update(step)
end
function activate(activator, activated)
end
function collide(id1, id2)
end
| nilq/small-lua-stack | null |
--------------------------------------------------------------------------------
-- Pierre L'Ecuyer MRG pseudo rngs module.
--
-- Copyright (C) 2011-2016 Stefano Peluchetti. All rights reserved.
--------------------------------------------------------------------------------
-- This specific implementation has b... | nilq/small-lua-stack | null |
--Ajustable ComputerCraft Display Format
local version = "ACCDF alpha"
local function checkArea(term, startX, startY, endX, endY)
local size = {term.getSize()}
return type(startX) == "number" and startX > 0 and type(startY) == "number" and startY > 0 and type(endX) == "number" and endX <= size[1] and startX <=... | nilq/small-lua-stack | null |
local THIS_DIR = (... or ''):match("(.-)[^%.]+$") or '.'
-- class.lua
-- Compatible with Lua 5.1 (not 5.0).
--
-- class() uses two tricks. It allows you to construct a class using the call
-- notation (like Dog('fido')) by giving the class itself a metatable
-- which defines __call. It handles inheritance by copying t... | nilq/small-lua-stack | null |
-- General purpose lua extension
local luap = {}
function luap.get_emulator_name()
if lsnes_features then
return 'lsnes'
elseif bizstring then
return 'BizHawk'
elseif snes9x then
return 'Snes9x'
else
return nil
end
end
function luap.file_exists(name)
local f = i... | nilq/small-lua-stack | null |
if SERVER then
AddCSLuaFile( "shared.lua" )
end
SWEP.HoldType = "crossbow"
if CLIENT then
SWEP.PrintName = "FN M-249 SAW"
SWEP.Author = "EraYaN"
SWEP.Slot = 2
SWEP.SlotPos = 0
SWEP.Icon = "vgui/ttt/icon_m249"
SWEP.ViewModelFlip = false
end
SWEP.Base = "... | nilq/small-lua-stack | null |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- OBJECTIVE OBJECT --
-------------------------------------------------------------------------------------------------------------... | nilq/small-lua-stack | null |
local NetworkService = require "utils.NetworkService"
local ItemHelper = require "utils.ItemHelper"
local TeamModule = require "module.TeamModule"
local Time = require "module.Time"
local SmallTeamDungeonConf = require "config.SmallTeamDungeonConf"
local View = {}
function View:Start(data)
self.root = CS.SGK.UIReferen... | nilq/small-lua-stack | null |
-- -*- mode: lua; tab-width: 2; indent-tabs-mode: 1; st-rulers: [70] -*-
-- vim: ts=4 sw=4 ft=lua noet
----------------------------------------------------------------------
-- @author Daniel Barney <daniel@pagodabox.com>
-- @copyright 2015, Pagoda Box, Inc.
-- @doc
--
-- @end
-- Created : 15 May 2015 by Daniel Barne... | nilq/small-lua-stack | null |
local coroutine_yield = coroutine.yield
local coroutine_wait = coroutine.wait
local coroutine_create = coroutine.create
local coroutine_resume = coroutine.resume
--
async = async or {}
function async.Add(id, func)
async.Remove(id)
local co, worked, value
hook.Add('Think', 'slib_async_' .. id, function()
if not c... | nilq/small-lua-stack | null |
local food = {}
function food.eat()
if not objectData[source].food or objectData[source].food['bite'] >= objectData[source].food['maxBite'] then return end
setPedAnimation( source, "food", "EAT_Burger", 0, false, true, true, true )
setElementHealth( source, getElementHealth( source ) + objectData[source].food['add... | nilq/small-lua-stack | null |
Game.ImportLibraryWithName("system/scripts/logiccallbacks.lua", "logiccallbacks")
guicallbacks = {
bAudioModified = false,
OnASyncLoadProfileFinishedCallback = nil
}
function guicallbacks.GoToStateItemSpecialAbilities()
Game.PlayCurrentEnvironmentMusic()
Game.GoToStateItemSpecialAbilities()
end
fu... | nilq/small-lua-stack | null |
if minetest.get_modpath("trm_farming") == nil then
treasurer.register_treasure("farming:hoe_wood",0.01,2,nil,nil,"tool")
treasurer.register_treasure("farming:hoe_stone",0.030,2.2,nil,nil,"tool")
treasurer.register_treasure("farming:hoe_steel",0.05,2.4,nil,nil,"tool")
treasurer.register_treasure("farming:hoe_br... | nilq/small-lua-stack | null |
-- Store original functions from the ones we modify
local orig_ElementAreaTrigger = {
project_amount_all = ElementAreaTrigger.project_amount_all
}
-- Capping the value to 4 for `criminals`/`local_criminals` instigators to avoid
-- some event comparisons that fail above expected max value of 4.
-- Start of Framing Fr... | nilq/small-lua-stack | null |
if ( SERVER ) then
AddCSLuaFile( "shared.lua" )
end
if ( CLIENT ) then
SWEP.PrintName = "EE-3"
SWEP.Author = "Servius"
SWEP.ViewModelFOV = 50
SWEP.Slot = 2
SWEP.SlotPos = 3
SWEP.WepSelectIcon = surface.GetTextureID("HUD/killicons/EE3")
killicon.Add( "weapon_752_ee3", "HUD/killicons... | nilq/small-lua-stack | null |
local function foldl(arr, f, acc, startindex)
if acc == nil then
return foldl(arr, f, arr[1], 2)
end
for i = startindex or 1, #arr do
local stop
acc, stop = f(acc, arr[i], i, arr)
if stop then
return acc
end
end
return acc
end
return foldl
| nilq/small-lua-stack | null |
local Types = require(script.Parent.Parent.Types)
type Record<K, V> = Types.Record<K, V>
type Array<T> = Types.Array<T>
local function keys<K>(source: Record<K, any>): Array<K>
local result = table.create(#source)
for key in source do
table.insert(result, key)
end
return result
end
return keys
| nilq/small-lua-stack | null |
--
-- Created by IntelliJ IDEA.
-- User: RJ
-- Date: 21/09/16
-- Time: 10:19
-- To change this template use File | Settings | File Templates.
--
--***********************************************************
--** ROBERT JOHNSON **
--************************************************... | nilq/small-lua-stack | null |
object_tangible_quest_talus_selonian_electronics_02 = object_tangible_quest_shared_talus_selonian_electronics_02:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_talus_selonian_electronics_02, "object/tangible/quest/talus_selonian_electronics_02.iff")
| nilq/small-lua-stack | null |
-- fast listbox optimized for fuzzy find
local core = require "core"
local common = require "core.common"
local config = require "core.config"
local style = require "core.style"
local Widget = require "widget"
local function noop()
end
local function compare_score(a, b)
return a.score < b.score
end
local MERGE_W... | nilq/small-lua-stack | null |
--[[
---------------------------------------------------------------------
Created by: V3N0M_Z
API: https://github.com/00xima/SimpleObject
---------------------------------------------------------------------
]]
local function Set(self, property, value, indexData)
if not indexData then
indexData = {1}
elseif #in... | nilq/small-lua-stack | null |
local class = require 'core.class'
local web = require 'web'
local WelcomeHandler = class {
get = function(self)
self.w:write('hi')
end
}
-- url mapping
local greetings_urls = {
{'hi', WelcomeHandler}
}
local all_urls = {
{'greetings/', greetings_urls}
}
-- config
local options = {
url... | nilq/small-lua-stack | null |
C_ArtifactUI = {}
---[Documentation](https://wowpedia.fandom.com/wiki/API_C_ArtifactUI.AddPower)
---@param powerID number
---@return boolean success
function C_ArtifactUI.AddPower(powerID) end
---[Documentation](https://wowpedia.fandom.com/wiki/API_C_ArtifactUI.ApplyCursorRelicToSlot)
---@param relicSlotIndex number
... | nilq/small-lua-stack | null |
---@type LevelTilesets
local TILESET
TILESET = json.decode(assert(sys.load_resource("/assets/bundle/common/levels/editor/result/tileset.json"), "no tileset"))
for k, v in pairs(TILESET.tilesets) do
v.properties = v.properties or {}
local meta = { __index = v.properties }
for i = v.first_gid, v.end_gid, 1 d... | nilq/small-lua-stack | null |
local bind = require("keymap.bind")
local map_cr = bind.map_cr
local map_cu = bind.map_cu
local map_cmd = bind.map_cmd
-- default map
local def_map = {
-- Vim map
["n|<C-x>k"] = map_cr("Bdelete"):with_noremap():with_silent(),
["n|<C-s>"] = map_cu("write"):with_noremap(),
["n|n"] = map_cmd("nzzzv"):with... | nilq/small-lua-stack | null |
local Users = require "models.users"
return function(self)
-- Prepare session names
self.session.names = self.session.names or {}
-- Verify Authorization
if self.session.name then
local user = Users:get_user(self.session.name)
if user then
user.password = nil
self.session.admin = user.admin
... | nilq/small-lua-stack | null |
--[[
SimpleGangs 1.1
Serverside MySQL configuration file.
This file houses all the settings relating to MySQL
for use with SimpleGangs.
You should NOT edit this file if you do not have a
MySQL Database that you wish to use with SimpleGangs.
A detailed guide explaining how to edit this
file can be found ... | nilq/small-lua-stack | null |
local p_layouts = require('telescope.pickers.layout_strategies')
local p_window = {}
function p_window.get_window_options(picker, max_columns, max_lines)
local layout_strategy = picker.layout_strategy
local getter = p_layouts[layout_strategy]
if not getter then
error("Not a valid layout strategy: " .. layo... | nilq/small-lua-stack | null |
modifier_spider_boss_rage = class( ModifierBaseClass )
--------------------------------------------------------------------------------
function modifier_spider_boss_rage:OnCreated( kv )
self.bonus_damage = self:GetAbility():GetSpecialValueFor( "bonus_damage" )
self.bonus_movespeed_pct = self:GetAbility():GetSpeci... | nilq/small-lua-stack | null |
local skynet = require "skynet"
local socket = require "skynet.socket"
local utils = require "utils"
local packer = require "packer"
local account_mgr = require "account_mgr"
local msg_define = require "msg_define"
local cjson = require "cjson"
local constants = require "constants"
local webclient
local sock_mgr = {}
... | nilq/small-lua-stack | null |
local spec = require 'spec.spec'
describe("yo-api", function()
local yo
before_each(function()
yo = spec.middleware("yo-api/yo.lua")
end)
describe("when the uri is /", function()
it("sends an email and a notification", function()
local request = spec.request({ method = 'GET', url = '/?us... | nilq/small-lua-stack | null |
local mkstr = ZO_CreateStringId
local SI = Teleporter.SI
mkstr(SI.TELEWELCOMEMSG, Teleporter.var.color.colArtifact .."Luminary" .. Teleporter.var.color.colTeal.." Teleporter geladen")
mkstr(SI.TELEREFRESH, "Aktualisieren")
mkstr(SI.TELECLOSE, "schließen")
---- Various messages
mkstr(SI.TELE_UNABLE_TO_PORTAL... | nilq/small-lua-stack | null |
-- Requirement summary:
-- [HMILevel Resumption]: Conditions to resume app to LIMITED after "unexpected disconnect" event.
--
-- Description:
-- Check that SDL resumes LIMITED level of media App and it's data
-- after transport unexpected disconnect
-- 1. Used precondition
-- App in LIMITED on HMI.
-- App has... | nilq/small-lua-stack | null |
----------------------
-- A simple external API for LuaRocks.
-- This allows you to query the existing packages (@{show} and @{list}) and
-- packages on a remote repository (@{search}). Like the luarocks command-line
-- tool, you can specify the flags `from` and `only_from` for this function.
--
-- Local information is... | nilq/small-lua-stack | null |
-- Code created by Kwik - Copyright: kwiksher.com {{year}}
-- Version: {{vers}}
-- Project: {{ProjName}}
--
local _Command = {}
-----------------------------
-----------------------------
function _Command:new()
local command = {}
--
function command:execute(params)
local event = params.event
if event=="... | nilq/small-lua-stack | null |
object_building_mustafar_terrain_must_rock_spire_skinny_03 = object_building_mustafar_terrain_shared_must_rock_spire_skinny_03:new {
}
ObjectTemplates:addTemplate(object_building_mustafar_terrain_must_rock_spire_skinny_03, "object/building/mustafar/terrain/must_rock_spire_skinny_03.iff")
| nilq/small-lua-stack | null |
package = "blunty666.nodes.gui.events"
imports = "aloof.TypeChecker"
class = "CoordEvent"
extends = "BaseEvent"
variables = {
x = NIL,
y = NIL,
abs_x = NIL,
abs_y = NIL,
}
local function checkPosition(pos, varName)
return (TypeChecker.integer(pos) and pos) or error(varName..": integer expected, got - <"..type(... | nilq/small-lua-stack | null |
local helper = require 'arken.Helper'
local test = {}
test.return_yes = function()
assert( helper:boolFormat(true) == "yes" )
end
test.return_no = function()
assert( helper:boolFormat(false) == "no" )
end
test.return_sim = function()
assert( helper:boolFormat(true, 'sim') == "sim" )
end
test.return_no = fun... | nilq/small-lua-stack | null |
return {
name = "Nix",
language_server = {
name = "rnix",
},
null_language_servers = {
"nixfmt",
},
}
| nilq/small-lua-stack | null |
---=====================================
---fancy2d 颜色包装
---作者:Xiliusha
---邮箱:Xiliusha@outlook.com
---=====================================
----------------------------------------
---lstg.Color
---@class lstg.Color
local f2dcolor = {
---alpha channel [[0~255]]
a = 0,
---red channel [[0~255]]
r = 0,... | nilq/small-lua-stack | null |
--- @class FsAttributes
--- device the file resides on
--- @field dev number
--- inode of the file
--- @field ino number
--- type of the file (possible values are: file, directory, link, socket, named
--- pipe, char device, block device or other)
--- @field mode string
--- count of hard links to the file
--- @field nli... | nilq/small-lua-stack | null |
local S = mobs.intllib
local dirt_types = {
{ nodes = {"default:dirt"},
skins = {"alchemy_earth_mob.png"},
drops = {
{name = "alchemy:eye_of_earth", chance = 10, min = 0, max = 2},
{name = "default:diamond", chance = 10, min = 0, max = 3},
{name = "alchemy:earth_essence", chance = 20, min = 0, max =1}
... | nilq/small-lua-stack | null |
description = [[
Retrieves POP3 email server capabilities.
POP3 capabilities are defined in RFC 2449. The CAPA command allows a client to
ask a server what commands it supports and possibly any site-specific policy.
Besides the list of supported commands, the IMPLEMENTATION string giving the
server version may be avai... | nilq/small-lua-stack | null |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf/protobuf"
local ITEM_PB = require("Item_pb")
local BAGEXPANDDATA_PB = require("BagExpandData_pb")
module('BagContent_pb')
BAGCONTENT = protobuf.Descriptor();
local BAGCONTENT_EQUIPS_FIELD = protobuf.FieldDescriptor();
local BAGCONTENT_EMBLE... | nilq/small-lua-stack | null |
local CoreGui = game:GetService("StarterGui")
CoreGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
CoreGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
CoreGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
| nilq/small-lua-stack | null |
-- local function data(file, tag, names, stripFunc, postFunc)
local parser = require "otherData.featParser"
local names =
{
"Cheerleader",
"Moment of Action",
"Cheers",
"Inspirational Support",
"Bring It On!",
"Go, Fight, Win!",
"Keep Fighting!"
}
local m = string.match
local function strip(parser, str)
-- l... | nilq/small-lua-stack | null |
local Util = require('opus.util')
local colors = _G.colors
local term = _G.term
local w = term.getSize()
local x, y = 1, 2
local filler = string.rep(' ', w)
term.clear()
local colorTable = Util.filter(colors, function(c)
return type(c) == 'number'
end)
term.setTextColor(colors.black)
for k,v in Util.spairs(colo... | nilq/small-lua-stack | null |
local PhysicsObject = require "engine.physics.physics_object"
local Box =
Class {
init = function(self, x, y, width, height, PhysicsProcessor)
self.collider = PhysicsProcessor.HC:rectangle(x, y, width, height)
PhysicsProcessor:registerObject( self, x, y, 'terrain', 'SolidBody')
end
}
function ... | nilq/small-lua-stack | null |
--[[
forager
farmer
crafter
guards (need weapons)
fix lumberjack stuck on tall trees
torches
moat
walls (need perimeter fn)
stairs, positional
find node far away from
flee function
make mobs open doors
make mobs climb ladders
approach with timeout/stuck fn
]]
local forager = function()
local food_items ... | nilq/small-lua-stack | null |
-- LuaTools需要PROJECT和VERSION这两个信息
PROJECT = "lowpower"
VERSION = "1.0.0"
-- sys库是标配
_G.sys = require("sys")
local NETLED = gpio.setup(19, 1) -- 输出模式,休眠后就熄灭了
sys.taskInit(function()
while 1 do
if socket.isReady() then
http.get("http://site0.cn/api/httptest/simple/date", nil, function(code,hea... | nilq/small-lua-stack | null |
function isHexColor(hex)
return nil ~= hex:find("^#%x%x%x%x%x%x$")
end
function hex2rgb(hex)
hex = hex:gsub("#", "")
return tonumber("0x" .. hex:sub(1, 2)), tonumber("0x" .. hex:sub(3, 4)), tonumber("0x" .. hex:sub(5, 6))
end
function rgb2hex(r, g, b)
return string.format("#%02X%02X%02X", r, g, b)
... | 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.