content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
local Players = game:GetService("Players")
local CoreGuiService = game:GetService("CoreGui")
local RobloxReplicatedStorage = game:GetService("RobloxReplicatedStorage")
local RobloxGui = CoreGuiService:FindFirstChild("RobloxGui")
local CoreGuiModules = RobloxGui:FindFirstChild("Modules")
local CommonModules = CoreGuiMo... | nilq/small-lua-stack | null |
b = "hello world"
function test()
local a = b
return a
end
jit("compile", test)
local res = test()
assert(res == b)
--[[
function <../tests/6_OP_GETTABUP.lua:2,5> (3 instructions at 0x1bc9610)
0 params, 2 slots, 1 upvalue, 1 local, 1 constant, 0 functions
1 [3] GETTABUP 0 0 -1 ; _ENV "b"
2 [4] RETURN 0 ... | nilq/small-lua-stack | null |
require('mono.metadata.object-forward')
require('mono.metadata.object')
require('mono.metadata.image')
ffi.cdef [[
MonoException *
mono_exception_from_name (MonoImage *image,
const char* name_space,
const char *name);
MonoException *
mono_exception_from_token (MonoImage *image,... | nilq/small-lua-stack | null |
modifier_item_diffusal_custom= class({})
function modifier_item_diffusal_custom:OnCreated()
self.mana_per_tick = self:GetAbility():GetSpecialValueFor("mana_per_tick")
EmitSoundOn("DOTA_Item.DiffusalBlade.Target", self:GetCaster())
end
function modifier_item_diffusal_custom:OnDestroy()
StopSoundOn("DOTA_Item.Diffus... | nilq/small-lua-stack | null |
--[[
#part of the 3DreamEngine by Luke100000
shader.lua - loads the shaders
--]]
local lib = _3DreamEngine
local testForOpenES = true
--enables auto shader validator
if _DEBUGMODE then
love.graphics.newShader_old = love.graphics.newShader
function love.graphics.newShader(pixel, vertex, name)
local status, err = ... | nilq/small-lua-stack | null |
local ffi = require("cffi")
-- strings are convertible to char pointers
local foo = "hello world"
local foop = ffi.cast("const char *", foo)
assert(ffi.string(foop) == "hello world")
-- pointer<->number conversions
local up = ffi.cast("uintptr_t", foop)
local op = ffi.cast("const char *", up)
assert(ffi.string(op... | nilq/small-lua-stack | null |
local date = require('os').date
local success, parent = pcall(require, '../package')
local serverName = success and (parent.name .. " v" .. parent.version)
return function(req, res, go)
local isHead = false
if req.method == "HEAD" then
req.method = "GET"
isHead = true
end
local reques... | nilq/small-lua-stack | null |
local ssl = require "ngx.ssl"
local pl_file = require "pl.file"
local helpers = require "spec.helpers"
local utils = require "kong.tools.utils"
local constants = require "kong.constants"
local KONG_VERSION = require "kong.meta"._VERSION
local CLUSTERING_SYNC_STATUS = constants.CLUSTERING_SYNC_STATUS
local VNEG_END... | nilq/small-lua-stack | null |
--[[
Name: "sv_hooks.lua".
Product: "nexus".
--]]
local MOUNT = MOUNT;
-- Called when nexus has loaded all of the entities.
function MOUNT:NexusInitPostEntity() self:LoadAreaDisplays(); end;
-- Called when a player's data stream info should be sent.
function MOUNT:PlayerSendDataStreamInfo(player)
NEXUS:StartDataStr... | nilq/small-lua-stack | null |
objs = {}
function objs.update(dt)
for i,o in ipairs(objs) do
o:update(dt, i)
objs.globalUpdate(o, i)
end
end
function objs.draw()
for i,o in ipairs(objs) do
o:draw()
end
end
function objs.remove(i)
local o = objs[i]
table.remove(objs, i)
if o.physics ~= nil then
o.physics.body:destroy()
o.phy... | nilq/small-lua-stack | null |
Locales['es'] = {
['GPS_info'] = 'La central indicaba un bote de basura en su ~ y ~ GPS',
['cancel_mission'] = 'Has cancelado la misión.',
['pickup'] = '~INPUT_CONTEXT~ Para recoger la basura',
['end_service'] = 'Servicio final',
['take_service'] = 'Toma su servicio',
['end_service_notif'] = 'Fin de ~r~Service',
... | nilq/small-lua-stack | null |
ngx.say("hello suggestion")
| nilq/small-lua-stack | null |
local Model = require("lib.model")
local config = require("config.app")
local Tag = Model:new('post_tags')
return Tag | nilq/small-lua-stack | null |
data.raw['roboport-equipment']['personal-roboport-equipment'].charging_energy = "100MW"
data.raw['roboport-equipment']['personal-roboport-mk2-equipment'].charging_energy = "100MW"
| nilq/small-lua-stack | null |
local GlobalBaseStats = require(script:GetCustomProperty("GlobalBaseStats"))
function Activate()
GlobalBaseStats.currentStats.recoveryMul = GlobalBaseStats.currentStats.recoveryMul + 4
end
local Effect = {}
Effect.Activate = Activate
return Effect | nilq/small-lua-stack | null |
Locales['fr'] = {
['robbery_cancelled'] = 'Le braquage a été annulé, vous ne gagnerez rien!',
['robbery_successful'] = 'Braquage réussi, vous avez obtenu des! ~g~$',
['bank_robbery'] = 'Braquage de banque',
['press_to_rob'] = 'Appuyez sur ~INPUT_CONTEXT~ pour braquer ~b~',
['press_to_cancel'] = 'Appuyez sur ~INPU... | nilq/small-lua-stack | null |
-------------------------------------------------------------------------------
-- SF Editor
-- Originally created by Jazzelhawk
--
-- To do:
-- Find new icons
-------------------------------------------------------------------------------
SF.Editor = {}
local addon_path = nil
do
local tbl = debug.get... | nilq/small-lua-stack | null |
function _init(args)
sys.stepinterval(0)
snd = audio.new()
filename = args[1]
if not filename then
print("No filename was given!")
end
print("(press enter to stop recording)")
end
function _step()
audio.record(snd)
local inp = sys.read()
if inp == "\n" then
if audio.save(filename, snd) then
... | nilq/small-lua-stack | null |
ix.currency.Set("", "", "RU", "models/gmodz/misc/dollar.mdl")
ix.config.SetDefault("font", "Jura")
ix.config.SetDefault("genericFont", "Malgun Gothic")
ix.config.SetDefault("music", "music/hl2_song19.mp3")
ix.config.SetDefault("maxAttributes", 0)
ix.config.SetDefault("maxCharacters", 1)
ix.config.SetDefault("allowVoic... | nilq/small-lua-stack | null |
return function()
local CorePackages = game:GetService("CorePackages")
local AppDarkTheme = require(CorePackages.AppTempCommon.LuaApp.Style.Themes.DarkTheme)
local AppFont = require(CorePackages.AppTempCommon.LuaApp.Style.Fonts.Gotham)
local Roact = require(CorePackages.Roact)
local Rodux = require(CorePackages.... | nilq/small-lua-stack | null |
local FS = {}
FS["CSTM_SCARH"] = "weapons/scarh/scarh-1.wav"
FS["CSTM_MP9"] = "weapons/mp9/mp9_unsil.wav"
FS["CSTM_627"] = "weapons/627/627-1.wav"
FS["CSTM_Deagle"] = "weapons/deagles/deagle-1.wav"
FS["CSTM_Glock18"] = "weapons/glock18/glock18-1.wav"
FS["CSTM_92FS"] = "weapons/beretta92fs/fire.wav"
FS["CSTM_M1911"] = "... | nilq/small-lua-stack | null |
local require = require
local ej = require 'war3.enhanced_jass'
local Follower = require 'std.class'("Follower", require 'war3.unit')
local SetLifeTime
function Follower:_new(unit, owner)
local follower = self:super():_new(unit)
follower._owner_ = owner
return self
end
function Follower:__call(unit)
... | nilq/small-lua-stack | null |
local config = {}
function config.telescope()
if not packer_plugins['plenary.nvim'].loaded then
vim.cmd [[packadd plenary.nvim]]
vim.cmd [[packadd popup.nvim]]
end
require('telescope').setup {
defaults = {
file_ignore_patterns = { "target/.*", ".git/.*", "node_modules/*" },
layout_config = {
prompt... | nilq/small-lua-stack | null |
cc = cc or {}
cc.tweenfunc = cc.tweenfunc or BaseClass()
function cc.tweenfunc.easeIn(time, rate)
return math.pow(time, rate)
end
function cc.tweenfunc.easeOut(time, rate)
return math.pow(time, 1 / rate)
end
function cc.tweenfunc.easeInOut(time, rate)
time = time * 2
if (time < 1) then
r... | nilq/small-lua-stack | null |
--[[
********************************************************************************
Project owner: RageQuit community
Project name: GTW-RPG
Developers: Mr_Moose
Source code: https://github.com/404rq/GTW-RPG/
Bugtracker: https://discuss.404rq.com/t/issues
Suggestions: https://discuss.404rq.com/t/deve... | nilq/small-lua-stack | null |
return {'ikke'} | nilq/small-lua-stack | null |
line = 1
col = 1
function move_cursor(line,col)
svrSend(csi .. line .. ";" .. col .. "H")
end
function clear_screen()
svrSend(csi .. "2J")
end
function handle_up()
line = line - 1
if line < 1 then line = 1 end
move_cursor(line,col)
end
function handle_down()
line = line + 1
if line > 20 then line = ... | nilq/small-lua-stack | null |
local battle_defs = require "battle/battle_defs"
local CARD_FLAGS = battle_defs.CARD_FLAGS
local BATTLE_EVENT = battle_defs.BATTLE_EVENT
local attacks =
{
corrosive_goo =
{
name = "Corrosive Goo",
desc = "At the end of your turn take 3 damage.",
icon = "battle/status_lumin_burn... | nilq/small-lua-stack | null |
require('plugin_pre.plugin.requirement')
| nilq/small-lua-stack | null |
local log = {}
local function do_log(fn, msg, ...)
fn("[TcpExport] " .. string.format(msg, ...))
end
function log.debug(msg, ...)
do_log(env.debug, msg, ...)
end
function log.info(msg, ...)
do_log(env.info, msg, ...)
end
function log.warning(msg, ...)
do_log(env.warning, msg, ...)
en... | nilq/small-lua-stack | null |
function InitGameLogic()
LocationScript={}
local Folder="data/scripts/GameLogic/"
dofile(Folder.."InitGame.lua")
dofile(Folder.."Window_Minigame_Balls.lua")
local LoadWindow=WindowManager.LoadWindow
LoadWindow("Minigame_Balls")
InitGame()
WindowManager.OpenWindow("Minigame_Balls")
end
| nilq/small-lua-stack | null |
-- SilvervineUE4Lua / devCAT studio
-- Copyright 2016 - 2019. Nexon Korea Corporation. All rights reserved.
UE4 = {}
local PrimitiveType = Class()
PrimitiveType.isPrimitiveType = true
--=============================================================================================================================
-- P... | nilq/small-lua-stack | null |
Clockwork.hudclock = Clockwork.kernel:NewLibrary("HudClock");
if (CLIENT) then
-- A function to draw a clock on a player's HUD.
function Clockwork.hudclock.HUDPaint()
local player = LocalPlayer();
if player:GetNetworkedInt("hudclock") == 0 then
return
end
-- Box Rounding (has to be an even number).
... | nilq/small-lua-stack | null |
function love.conf(t)
t.window.title = "LOVE2D Boilerplate"
_G.conf = t -- Makes configuration options accessible later
end
| nilq/small-lua-stack | null |
function pt(t) -- print a table shallowly
local str = "{ "
for k, v in pairs(t) do
if (type(k) == "string") then
if (k:find("^[_%a]+[_%w]*$")) then -- valid variable name
str = str .. k
else
str = str .. "[\"" .. k .. "\"]"
end
... | nilq/small-lua-stack | null |
-- utilities
COPPER_PER_SILVER = 100;
SILVER_PER_GOLD = 100;
COPPER_PER_GOLD = COPPER_PER_SILVER * SILVER_PER_GOLD;
function GetMoneyStringPadded(money, separateThousands)
local goldString, silverString, copperString;
local gold = floor(money / (COPPER_PER_SILVER * SILVER_PER_GOLD));
local silver = floor((money - ... | nilq/small-lua-stack | null |
--[[------------------------------------------------
-- Love Frames - A GUI library for LOVE --
-- Copyright (c) 2012-2014 Kenny Shields --
--]]------------------------------------------------
-- get the current require path
local path = string.sub(..., 1, string.len(...) - string.len(".util"))
local loveframes = re... | nilq/small-lua-stack | null |
require("curses");
curses.initscr();
curses.keypad(curses.stdscr(), true);
s = curses.mvgetnstr(10, 10, 10);
curses.addstr(s);
curses.getch();
curses.endwin();
| nilq/small-lua-stack | null |
local Redis = require 'redis'
local FakeRedis = require 'fakeredis'
local params = {
host = os.getenv('REDIS_HOST') or '127.0.0.1',
port = tonumber(os.getenv('REDIS_PORT') or 6379)
}
local database = os.getenv('REDIS_DB')
local password = os.getenv('REDIS_PASSWORD')
-- Overwrite HGETALL
Redis.commands.hgetall = ... | nilq/small-lua-stack | null |
local awful = require "awful"
local hotkeys_popup = require "awful.hotkeys_popup"
local machi = require "../modules/layout-machi"
require "awful.hotkeys_popup.keys"
-- Mouse bindings
awful.mouse.append_global_mousebindings {
awful.button({}, 3, function()
Menu.main:toggle()
end),
}
-- Key bindings
-- Genera... | nilq/small-lua-stack | null |
-- Table (implementation-dependant, in practice array list) based stack
-- Worst-case linear time for basic operations, in practice amortized constant time and significantly less overhead
-- Merely a OOP wrapper for Lua's table library
local table_stack = {}
function table_stack.new()
return {}
end
function table_st... | nilq/small-lua-stack | null |
-- wget 'http://torch7.s3-website-us-east-1.amazonaws.com/data/mnist.t7.tgz'
-- tar -xf mnist.t7.tgz
function distortData(foo)
local res=torch.FloatTensor(foo:size(1), 1, 42, 42):fill(0)
for i=1,foo:size(1) do
baseImg=foo:select(1,i)
distImg=res:select(1,i)
r = image.rotate(baseImg, torc... | nilq/small-lua-stack | null |
require( "logapi" )
local comp = require( "component" )
local gpu = comp.gpu
local fs = require( "filesystem" )
local term = require( "term" )
local event = require( "event" )
local tdl = 17
local infl = 60
local pril = 16
local display_amount = 5
local curdisplay = 1
local whitecol = 0xFFFFFF
local blackcol = 0x00... | nilq/small-lua-stack | null |
# Test various properties of classes defined in separate modules
print("Testing the %import directive")
if string.sub(_VERSION,1,7)=='Lua 5.0' then
-- lua5.0 doesnt have a nice way to do this
function loadit(a)
lib=loadlib(a..'.dll','luaopen_'..a) or loadlib(a..'.so','luaopen_'..a)
assert(lib)()
end
loadit('b... | nilq/small-lua-stack | null |
local function score(word)
end
return { score = score }
| nilq/small-lua-stack | null |
#!/usr/bin/env luajit
-- not in the same vein as the other tests, just going to plot out a temp figure
require 'ext'
local env = setmetatable({}, {__index=_G})
if setfenv then setfenv(1, env) else _ENV = env end
require 'symmath'.setup{env=env, MathJax={title='tests/unit/plot'}}
local function header(s)
print('<h3>'.... | nilq/small-lua-stack | null |
-- vim : ft=lua ts=2 sw=2 et:
Rows = {cols={}, rows={}}
function Rows:clone()
return isa(Rows,{cols=cols(self.cols.hdr)})
end
function Rows:read(file)
for t in csv(file) do self:add(t) end
return self
end
function Rows:add(t)
t = t.cells and t.cells or t
if self.cols.ready
then self.rows[#self.r... | nilq/small-lua-stack | null |
local BASE = baseclass.Get("DMenu")
function BASE:Paint(w, h)
draw.RoundedBox(5, 0, 0, w, h, Color(42, 42, 42))
surface.SetDrawColor(Color(52, 52, 52))
surface.DrawOutlinedRect(0, 0, w, h)
end
function BASE:AddOption(strText, funcFunction)
local pnl = vgui.Create("DMenuOption", self)
pnl:SetMenu(self)
... | nilq/small-lua-stack | null |
PLUGIN.name = "Weapon Select"
PLUGIN.author = "Chessnut"
PLUGIN.description = "A replacement for the default weapon selection."
if (CLIENT) then
PLUGIN.index = PLUGIN.index or 1
PLUGIN.deltaIndex = PLUGIN.deltaIndex or PLUGIN.index
PLUGIN.infoAlpha = PLUGIN.infoAlpha or 0
PLUGIN.alpha = PLUGIN.alpha or 0
PLUGIN.... | nilq/small-lua-stack | null |
includes(path.join(os.scriptdir(), "versions.lua"))
package("libcurl")
set_homepage("https://curl.haxx.se/")
set_description("The multiprotocol file transfer library.")
set_license("MIT")
set_urls("https://curl.haxx.se/download/curl-$(version).tar.bz2",
"http://curl.mirror.anstey.ca/curl... | nilq/small-lua-stack | null |
-- colors.lua
-- Coltrane Willsey
-- 2022-03-03 [14:16]
local _color_enums = {
-- attributes
reset = 0,
clear = 0,
bright = 1,
dim = 2,
underscore = 4,
blink = 5,
reverse = 7,
hidden = 8,
-- foreground
black = 30,
red = 31,
green = 32,
yellow = 33,
blue = 34... | nilq/small-lua-stack | null |
--
-- static file server
--
local Table = require('table')
local UV = require('uv')
local Fs = require('fs')
local get_type = require('mime').get_type
local date = require('os').date
local resolve = require('path').resolve
--
-- open file `path`, seek to `offset` octets from beginning and
-- read `size` subsequent oc... | nilq/small-lua-stack | null |
local t =
Def.Model {
Meshes = NOTESKIN:GetPath("", "model/note.txt"),
Materials = NOTESKIN:GetPath("", "model/grey.txt"),
Bones = NOTESKIN:GetPath("", "model/note.txt")
}
return t
| nilq/small-lua-stack | null |
-- KEYS[1]: the scheduled jobs set
-- KEYS[2]: the active job list
-- KEYS[3]: the signal list
-- ARGV[1]: the current timestamp
-- ARGV[2]: the max number of jobs to schedule
-- Returns: nil
-- Get the jobs out of the scheduled set
local job_ids = redis.call("zrangebyscore", KEYS[1], 0, ARGV[1], "LIMIT", 0, ARGV[2]... | nilq/small-lua-stack | null |
--[[
MailSlurp API
MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - ... | nilq/small-lua-stack | null |
set_project("libcroco")
add_rules("mode.debug", "mode.release")
add_requires("glib", "libxml2")
option("installprefix")
set_default("")
set_showmenu(true)
option_end()
if has_config("installprefix") then
local prefix = get_config("installprefix")
set_configvar("prefix", prefix)
set_configvar("CROC... | nilq/small-lua-stack | null |
api={inner={},loader={},blocks={}}
mods={data={}}
api.inner.mod_directory="mods"
api.graphics=love.graphics
api.player={health={}}
function api.player.teleport(x,y,cx,cy)
local function movp(x,y)
phy.world:update(phy.player,px,py)
end
if x and y then
x2,y2 = px or x*world.tile.w , py or y*wo... | nilq/small-lua-stack | null |
PLUGIN.name = "아이템 저장 (Save Items)"
PLUGIN.desc = "월드에 존재하는 아이템을 저장해 줍니다."
PLUGIN.author = "Chessnut / 번역자 : Tensa"
PLUGIN.base = true;
if (SERVER) then
function PLUGIN:LoadData()
local restored = nut.util.ReadTable("saveditems")
if (restored) then
for k, v in pairs(restored) do
local position = v.positio... | nilq/small-lua-stack | null |
C_ClassColor = {}
---[Documentation](https://wowpedia.fandom.com/wiki/API_C_ClassColor.GetClassColor)
---@param className string
---@return ColorMixin classColor
function C_ClassColor.GetClassColor(className) end
| nilq/small-lua-stack | null |
game.Players.Regium:remove() | nilq/small-lua-stack | null |
--[[
jungleTilde.lua
Copyright (C) 2016 Kano Computing Ltd.
License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2
This is the dialogue you can have with Mr Info in Overworld on the Beach.
]]--
return {
type = "decision",
dialogues = {
--- 1) Welcome dialogue - explore Port Ether --------------... | nilq/small-lua-stack | null |
return {
LrSdkVersion = 3.0,
LrSdkMinimumVersion = 3.0,
LrPluginName = 'Photos',
LrToolkitIdentifier = 'at.homebrew.lrphotos',
VERSION = { major = 1, minor = 0, revision = 0, build = 2, },
LrInitPlugin = "InitProvider.lua",
-- Add the Metadata Definition File
LrMetadataProvider = 'PhotosMetadataDefinit... | nilq/small-lua-stack | null |
local struct = require("struct")
function string.unpack(s, mode)
return struct.unpack(mode, s)
end
function string.split(s, re)
local i1, ls = 1, { }
if not re then re = '%s+' end
if re == '' then return { s } end
while true do
local i2, i3 = s:find(re, i1)
if not i2 then
local la... | nilq/small-lua-stack | null |
local _, L = ...;
L["Heart"] = "Heart of Azeroth"
L["Abbreviate"] = "Abbreviate numbers"
L["ShowLevel"] = "Show level"
L["ShowCurrent"] = "Show current"
L["ShowPercent"] = "Show percentage"
L["HideMax"] = "Hide maximum"
if GetLocale() == "ptBR" then
L["Heart"] = "Coração de Azeroth"
L["ShowLevel"] = "Mostrar nível"... | nilq/small-lua-stack | null |
enum({
"MD_OK",
"MD_OK_CANCEL",
"MD_YES_NO",
"MD_YES_NO_CANCEL"
})
enum({
"MD_ERROR",
"MD_WARNING",
"MD_QUESTION",
"MD_INFO",
"MD_PLAIN"
})
local gs = {}
gs.ratio = 3/2
gs.w = 400
gs.mrg = 10
gs.btn = {}
gs.btn.w = 80
gs.btn.h = 20
gs.img = {}
gs.img.w = 42
gs.img.h = 42
gs.headers = {
[MD_ERROR] = "Error"... | nilq/small-lua-stack | null |
package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;"
require("wx")
wxID_USER_Index = 1000
-------------------------------------------------------------------------------
-- Event Table
------------------------------------------------------------... | nilq/small-lua-stack | null |
--[[
© CloudSixteen.com do not share, re-distribute or modify
without permission of its author (kurozael@gmail.com).
Clockwork was created by Conna Wiles (also known as kurozael.)
http://cloudsixteen.com/license/clockwork.html
--]]
CW_FRENCH = Clockwork.lang:GetTable("French");
CW_FRENCH["StaticToolAddText"] = "... | nilq/small-lua-stack | null |
require "sys"
require "filesystem"
require "util"
cjass = {}
cjass.path = fs.ydwe_path() / "plugin" / "AdicHelper"
cjass.exe_path = cjass.path / "AdicHelper.exe"
-- 使用cJass编译地图
-- map_path - 地图路径,fs.path对象
-- option - 附加编译选项, table,支持选项为:
-- enable_jasshelper_debug - 启用Debug模式,true/false
-- runtime_... | nilq/small-lua-stack | null |
function Command_Mobs_Add(Client_ID, Command, Text_0, Text_1, Arg_0, Arg_1, Arg_2, Arg_3, Arg_4)
local Entity_ID = Client_Get_Entity(Client_ID)
local Player_Number = Entity_Get_Player(Entity_ID)
local Map_ID = Entity_Get_Map_ID(Entity_ID)
local Map_Size_X, Map_Size_Y, Map_Size_Z = Map_Get_Dimensions(Map_ID)
lo... | nilq/small-lua-stack | null |
-----------------------------------------
-- ID: 5985
-- Item: Sprig of Hemlock
-- Food Effect: 5 Min, All Races
-- Paralysis
-----------------------------------------
require("scripts/globals/status")
require("scripts/globals/msg")
function onItemCheck(target)
return 0
end
function onItemUse(target)
if (not ... | nilq/small-lua-stack | null |
local socket = require('socket')
local ssl = require('ssl')
local ltn12 = require('ltn12')
local http = require('socket.http')
local url = require('socket.url')
local https = {
['try'] = socket.try,
['configuration'] = {
['protocol'] = 'any',
['options'] = {
'all',
'no_s... | nilq/small-lua-stack | null |
project "lua_cmsgpack"
language "C"
files { "lua_cmsgpack.c" }
links { "lib_lua" }
includedirs { "." }
KIND{lua="cmsgpack"}
| nilq/small-lua-stack | null |
ITEM.name = "Voss Pattern Grenade Launcher"
ITEM.description = "A grenade launcher pattern used commonly by the Imperial Guard."
ITEM.model = "models/weapons/w_ig_grenade.mdl"
ITEM.class = "tfa_glaunche"
ITEM.weaponCategory = "primary"
ITEM.width = 6
ITEM.height = 4
ITEM.price = 900
ITEM.weight = 12.5
ITEM.iconCam = {
... | nilq/small-lua-stack | null |
local WorldTooltipper = {
TooltipMode = 2, -- World and Hover
UpdateDelay = 2000
}
if Ext.IsClient() then
--Unused since setting RootTemplate.Tooltip on the server makes the client update as well.
if Vars.DebugMode then
function WorldTooltipper.OnUpdate(ui, event, removeNotUpdated)
if Input.IsPressed(Data.Inp... | nilq/small-lua-stack | null |
local Files = require('orgmode.parser.files')
local config = require('orgmode.config')
local utils = require('orgmode.utils')
local diagnostic_ns = vim.api.nvim_create_namespace('org_diagnostics')
---@return table[]|nil|boolean
local function get_errors()
if not config.diagnostics then
return false
end
loca... | nilq/small-lua-stack | null |
local webplot = require 'webplot'
local data = torch.Tensor(3,3):fill(1)
webplot.dojob(
function()
app.get('/', function(req, res)
res.send(tostring(data))
end)
end
)
-- do some computation ...
webplot.takeover() -- takeover control of main thread to keep webplot running
| nilq/small-lua-stack | null |
-- pandoc.utils.make_sections exists since pandoc 2.8
PANDOC_VERSION:must_be_at_least {2,8}
local List = require 'pandoc.List'
pandoc.utils = require 'pandoc.utils'
-- Filter images with this function if the target format is LaTeX.
function Div (elem)
if FORMAT:match 'latex' then
if elem.classes:includes('che... | nilq/small-lua-stack | null |
--- ================ LSP UNIFIED SERVER SETTINGS REPOSITORY ================
---
--- The name of this subsystem abbreviates to USSR, trololo.
local M = require('dotfiles.autoload')('dotfiles.lsp.unified_settings_repository')
-- TODO: https://microsoft.github.io/language-server-protocol/specifications/specification-3-1... | nilq/small-lua-stack | null |
local Enum = require("api.Enum")
local TileRole = Enum.TileRole
local tiles = {
{
_id = "world_grass",
elona_id = 0,
elona_atlas = 0,
},
{
_id = "world_small_trees_1",
elona_id = 1,
elona_atlas = 0,
},
{
_id = "world_small_trees_2",
elona_id = 2,
elo... | nilq/small-lua-stack | null |
-- IMPORTANT -- the name of any action bar must be the prefix of its buttons, e.g. "BonusAction" -> BonusActionButton1 to allow for purging by prefix
local ABD_ActionBars = {
["DEFAULT_UI"] = {
["Action"] = {
ActionButton1,
ActionButton2,
ActionButton3,
ActionButton4,
ActionButton5,
ActionButton6,
... | nilq/small-lua-stack | null |
local KUI, E, L, V, P, G = unpack(select(2, ...))
local KS = KUI:GetModule("KuiSkins")
local S = E:GetModule("Skins")
if not IsAddOnLoaded("XIV_Databar") then return end
-- Cache global variables
-- Lua functions
local _G = _G
-- WoW API / Variables
-- GLOBALS:
local function styleXIV_Databar()
if E.private.KlixUI.s... | nilq/small-lua-stack | null |
slot0 = class("HaloAttachmentView", import(".StaticCellView"))
slot0.Ctor = function (slot0, slot1, slot2, slot3)
slot0.super.Ctor(slot0, slot1)
slot0.line = {
row = slot2,
column = slot3
}
end
slot0.GetOrder = function (slot0)
return ChapterConst.CellPriorityUpperEffect
end
slot0.Update = function (slot0)
... | nilq/small-lua-stack | null |
valorFixo = perc = 0
io.write("Digite seu nome: ")
nome = io.read()
io.write("Digite o salario de ", nome, ": ")
salario = io.read("*n")
if salario < 300 then
perc = 0.70
valorFixo = 500
elseif salario < 1000 then
perc = 0.50
valorFixo = 200
else
perc = 0.30
valorFixo = 0
end
plBruto = valorFi... | nilq/small-lua-stack | null |
local Class = require "libs.class"
local HC = require "libs.HC"
local rocket = require "entidades.rocket"
local Base = require "nivel.Base"
local Entity= require "entidades.Entity"
local circlelaser = Class{
__includes = Entity
}
function circlelaser:init(x,y,r)
self.type="laser"
self.id="enemy"
self.x,self.y=x,y... | nilq/small-lua-stack | null |
---@class VoiceConnection
---@field channel GuildVoiceChannel|nil
local VoiceConnection = {
-- [[VoiceConnection Methods]] --
---Stops the audio stream for this connection (if one is active), disconnects from the voice server, and leaves the corresponding voice channel.
---This method must be called insid... | nilq/small-lua-stack | null |
local theme={colors={normal={blue={0.50980392156863,0.66666666666667,1.0,1},green={0.76470588235294,0.90980392156863,0.55294117647059,1},cyan={0.53725490196078,0.86666666666667,1.0,1},white={0.93333333333333,1.0,1.0,1},red={0.94117647058824,0.44313725490196,0.47058823529412,1},magenta={0.78039215686275,0.57254901960784... | nilq/small-lua-stack | null |
-- Copyright (C) 2018-2021 by KittenOS NEO contributors
--
-- Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
--
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTI... | nilq/small-lua-stack | null |
ElvCharacterDB = {
["ChatEditHistory"] = {
},
["ChatHistoryLog"] = {
{
"WTS Headmaster/Headmistress Title cheap and fast on all realms!", -- [1]
"Velia-Kazzak", -- [2]
"", -- [3]
"2. Trade - City", -- [4]
"Velia", -- [5]
"", -- [6]
2, -- [7]
2, -- [8]
"Trade - City", -- [9]
0, -- [10... | nilq/small-lua-stack | null |
Citizen.CreateThread(function()
repeat
Wait(0)
until permissions
permissions["devtools_coords"] = false
permissions["devtools_noclip"] = false
permissions["devtools_vanish"] = false
permissions["devtools_tpm"] = false
end)
| nilq/small-lua-stack | null |
-- Edit the properties of the standard shader
namespace "standard"
local flat = require "engine.flat"
local ui2 = require "ent.ui2"
local ModelDrawer = require "app.debug.modelView.modelDrawer"
local ModelEditShaderUi = classNamed("ModelEditShaderUi", ModelDrawer)
function ModelEditShaderUi:onLoad()
local function... | nilq/small-lua-stack | null |
LinkLuaModifier("modifier_kill", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_ward_invisibility", "modifiers/modifier_ward_invisibility.lua", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_scan_true_sight_thinker", "modifiers/modifier_scan_true_sight.lua", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifie... | nilq/small-lua-stack | null |
local random_bytes = require("resty.random").bytes
-- Seed math.randomseed based on random bytes from openssl. This is better than
-- relying on something like os.time(), since that can result in identical
-- seeds for multiple workers started up at the same time.
--
-- Based on https://github.com/bungle/lua-resty-ran... | nilq/small-lua-stack | null |
function create(class)
if class then
if class.init then
class:init()
end
end
end
require "Assets.LuaScripts.Modulus.LuaStart.__init" | nilq/small-lua-stack | null |
return {
methods = {
onEnter = {
function(self, args, ret)
args[1] = oppdirs[args[1]] or args[1]
end,
function(self, args ,ret)
local message = self:getMessage("enters", {dir=args[1]}) or (self.name.." enters from the "..args[1])
self.room:broadcast(message, self)
e... | nilq/small-lua-stack | null |
-- Created by Elfansoer
--[[
Ability checklist (erase if done/checked):
- Scepter Upgrade
- Break behavior
- Linken/Reflect behavior
- Spell Immune/Invulnerable/Invisible behavior
- Illusion behavior
- Stolen behavior
]]
--------------------------------------------------------------------------------
modifier_magnus_sk... | nilq/small-lua-stack | null |
local cmd = vim.cmd
local o_s = vim.o
local map_key = vim.api.nvim_set_keymap
local function opt(o, v, scopes)
scopes = scopes or {o_s}
for _, s in ipairs(scopes) do s[o] = v end
end
local function autocmd(group, cmds, clear)
clear = clear == nil and false or clear
if type(cmds) == 'string' then cmds = {cmds}... | nilq/small-lua-stack | null |
local super = require "system.object"
local util = require "system.util"
local door = util.kind(super)
function door.created(payload)
if super.created(payload) then
orisa.set_attr(orisa.self, "name", payload.direction)
local destination = payload.destination
if not destination then
destination = ... | nilq/small-lua-stack | null |
local action = _ACTION or ""
local examples = { "example1" }
solution "cobj"
location ( "build" )
configurations { "Debug", "Release" }
platforms {"native", "x64", "x32"}
startproject "example4"
for k,v in ipairs(examples) do
project(tostring(v))
kind "ConsoleApp"
language "C++"
files ... | nilq/small-lua-stack | null |
local celesteRender = require("celeste_render")
local utils = require("utils")
local matrix = require("matrix")
local fakeTilesHelper = {}
function fakeTilesHelper.generateFakeTilesMatrix(room, x, y, material, layer)
local typ = utils.typeof(material)
local tilesMatrix = nil
local width, height = 5, 5
... | nilq/small-lua-stack | null |
-- mod-version:2 -- lite-xl 2.0
local core = require "core"
local command = require "core.command"
local common = require "core.common"
local config = require "core.config"
local View = require "core.view"
local style = require "core.style"
config.plugins.equationgrapher = {
point_size = 3,
steps = 10000,
backgrou... | 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.