content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
local prettier = function()
return {
exe = 'prettier',
args = {'--stdin-filepath', vim.fn.fnameescape(vim.api.nvim_buf_get_name(0)), '--single-quote'},
stdin = true
}
end
local black = function()
return {
exe = 'black',
args = { '-' },
stdin = true,
}
end
require('formatter').setup({
... | nilq/small-lua-stack | null |
Config = {}
Config.MaxItemCount = 50
Config.MaxDifferentItems = 5
| nilq/small-lua-stack | null |
return "hello"
| nilq/small-lua-stack | null |
function Damage(keys)
local caster = keys.caster
local ability = keys.ability
ApplyDamage({
attacker = caster,
victim = keys.target,
damage = math.max(0, (caster:GetAgility() + caster:GetIntellect() + caster:GetStrength()) * keys.debuff_stats_multiplier) + keys.debuff_damage_base,
damage_type = ability:GetA... | nilq/small-lua-stack | null |
--=============================================================================--
-- ___ ___ _ _ _ __ _ ___ ___ __ __
-- |_ _|| __| / \ | \_/ | / _| / \ | o \ o \\ V /
-- | | | _| | o || \_/ | ( |_n| o || / / \ /
-- |_| |___||_n_||_| |_| \__/|_n_||_|\\_|\\ |_| 2007
--
--=============... | nilq/small-lua-stack | null |
solution "gga"
configurations {"Release", "Debug" }
location (_OPTIONS["to"])
-------------------------------------
-- glfw static lib
-------------------------------------
project "glfw_proj"
language "C"
kind "StaticLib"
defines {
"_CRT_SECURE_NO_WARNINGS"
}
includedirs {
"... | nilq/small-lua-stack | null |
slot0 = class("AutoBotCommand", pm.SimpleCommand)
slot0.execute = function (slot0, slot1)
slot2 = slot1:getBody()
slot3 = slot2.isActiveBot
slot4 = slot2.toggle
slot6 = slot0.GetAutoBotMark(slot5)
if slot0.autoBotSatisfied() then
if PlayerPrefs.GetInt("autoBotIsAcitve" .. slot6, 0) == not slot3 then
else
... | nilq/small-lua-stack | null |
local DropMenu = LibStub:NewLibrary('NetEaseGUI-2.0.DropMenu', 1)
if not DropMenu then
return
end
local GUI = LibStub('NetEaseGUI-2.0')
if DropMenu.PublicDropMenu then
DropMenu.PublicDropMenu:Hide()
end
DropMenu.PublicDropMenu = GUI:GetClass('DropMenu'):New(nil, 'MENU')
function GUI:OpenMenu(owner, menuTab... | nilq/small-lua-stack | null |
--Start of Global Scope---------------------------------------------------------
-- Setting global values
-- luacheck: globals gCAM_IP gRECORD_FOLDER gConfig gCam gViewer
gCAM_IP = '192.168.1.100' -- Must be adapted to match the actual device
gRECORD_FOLDER = 'private/LastRecord' -- App private folder on device memor... | nilq/small-lua-stack | null |
class 'BetterIngameChat'
function BetterIngameChat:__init()
self.m_IsEndScreen = false
self.m_AdminList = {}
-- Subscribe to events.
self.m_ServerRoundOverEvent = Events:Subscribe('Server:RoundOver', self, self.OnServerRoundOver)
self.m_PlayerChatEvent = Events:Subscribe('Player:Chat', self, self.On... | nilq/small-lua-stack | null |
print("[LuaBuildEvents] Starting LuaBuildEvents.MySql PostBuild\n")
require("lua.io")
function execute(configuration, solution_folder, target_folder)
if configuration == "Debug" then
print("[LuaBuildEvents] Running in Debug Mode\n")
outputDirectory = Path.combine(solution_folder, [[LuaBuildEvents/bin/x64/Re... | nilq/small-lua-stack | null |
local parsers = require "nvim-treesitter.parsers"
local tsrainbow_enabled_list = { "lua", "supercollider", "json" }
require("nvim-treesitter.configs").setup {
ensure_installed = "all",
ignore_install = { "elm", "foam", "fortran", "hack", "help", "slint", "todotxt", "verilog" },
highlight = {
enable = true,
... | nilq/small-lua-stack | null |
local TestScene = class("TestScene", function(params)
return mw.GameScene:createWithParams(params)
end)
local TestViewController = Import("..controllers.TestViewController")
function TestScene:onEnter()
local testVc = TestViewController.new()
self:loadViewController(testVc, "TEST_VIEW_CONTROLLER")
end
function T... | nilq/small-lua-stack | null |
gel = class:new()
function gel:init(x, y, id)
self.id = id
--PHYSICS STUFF
self.x = x-14/16
self.y = y-12/16
self.speedy = 0
self.speedx = 0
self.width = 12/16
self.height = 12/16
self.static = false
self.active = true
self.category = 8
self.mask = {false, false, true, true, true, true, true, true, false... | nilq/small-lua-stack | null |
local Promise = require(script.Parent.Parent.Promise)
local Types = require(script.Parent.Parent.Types)
type Promise<T...> = Types.Promise<T...>
local function promiseSoundLoaded(sound: Sound): Promise<Sound>
return if sound.IsLoaded
then Promise.resolve(sound)
else Promise.fromEvent(sound.Loaded, function()
... | nilq/small-lua-stack | null |
ai = {}
local ais = {}
local nextId = 1
function ai.reset()
ais = {}
end
function ai.new(x, y, pattern, start)
if not start then
start = math.random(1, #pattern)
end
ais[nextId] = {
id=nextId,
x=x,
y=y,
pattern=pattern,
start=start
}
nextId = nextId + 1
end
function updateTile(aiTile, isProjectile)
en... | nilq/small-lua-stack | null |
local Observer = require('utils.observer')
---@class PlayerMgr: Observer
PlayerMgr = Observer:new()
function PlayerMgr:init()
self.validPlayers = {}
self.outSidePlayers = {}
self.inSidePlayers = {}
self.emptyPlayers = {}
self.birthPlayer = Player:get(10)
self.birthPlayer:setColor(PlayerColor.... | nilq/small-lua-stack | null |
return Def.Sprite {
Texture=NOTESKIN:GetPath('_Middle','tap note');
Frames = Sprite.LinearFrames( 1, 1 );
};
| nilq/small-lua-stack | null |
-- Generated by github.com/davyxu/tabtoy
-- Version: 2.8.10
local tab = {
TTurntableNew = {
{ Id = 1, Nums = "0;1;2;3;4;5;6;1;2;0", Max = 6 },
{ Id = 2, Nums = "0;1;2;3;4;5;6;7;8;9", Max = 9 }
}
}
-- Id
tab.TTurntableNewById = {}
for _, rec in pairs(tab.TTurntableNew) do
tab.TTurntableNewById[rec.Id] = rec... | nilq/small-lua-stack | null |
--###########################
--###| Made by Jonas |###
--###| Date: 12-08-2020 |###
--###| Github: dokjons |###
--###| Discord: |###
--###| squiggles#0856 |###
--###########################
dependency 'vrp'
server_scripts {
'@vrp/lib/utils.lua',
'server.lua',
'@mysql-async... | nilq/small-lua-stack | null |
pg = pg or {}
pg.item_data_template = {
{
other_resource_cost = "[]",
display_effect = "",
limit = "[]",
usage = "usage_undefined",
other_item_cost = "[]",
usage_arg = "[]",
id = 1,
compose_number = 0,
target_id = 0
},
{
other_resource_cost = "[]",
display_effect = "",
limit = "[]",
usage =... | nilq/small-lua-stack | null |
-- Copyright (C) 2018 DBot
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
-- http://www.apache.org/licenses/LICENSE-2.0
-- Unless required by applicable law or agreed to in writing,... | nilq/small-lua-stack | null |
---------------------------------------------------
-- Licensed under the GNU General Public License v2
-- * (c) 2010, Adrian C. <anrxc@sysphere.org>
-- * (c) 2009, Lucas de Vries <lucas@glacicle.com>
---------------------------------------------------
-- {{{ Grab environment
local io = { lines = io.lines }
local se... | nilq/small-lua-stack | null |
rweapons_player_dmg_multiplier = 1.0
rweapons_mob_dmg_multiplier = 1.0
rweapons_headshot_dmg_multiplier = 1.75
rweapons_max_gun_efficiency = 300
rweapons_min_gun_efficiency = 40
rweapons_bloodyness = 10
rweapons_gun_crafting = "true"
rweapons_gun_durability = "true"
rweapons_shurikens = "true"
rweapons_handguns = "tr... | nilq/small-lua-stack | null |
-- Deprecated, This file will be removed in a future release
-- File has been moved to stdlib/event/trains
-- Update all stdlib.gui requires to stdlib.event.trains
return require 'stdlib.event.trains'
| nilq/small-lua-stack | null |
disruptor_glimpse_nb2017 = class({})
LinkLuaModifier( "modifier_disruptor_glimpse_nb2017", "modifiers/modifier_disruptor_glimpse_nb2017", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_disruptor_glimpse_thinker_nb2017", "modifiers/modifier_disruptor_glimpse_thinker_nb2017", LUA_MODIFIER_MOTION_NONE )
----------... | nilq/small-lua-stack | null |
-- logind.lua
-- pigybug
local login = require "loginserverx"
local crypt = require "skynet.crypt"
local skynet = require "skynet"
local snax = require "skynet.snax"
local cluster = require "skynet.cluster"
local msgserver = require 'snax.msgserver'
local server = {
host = "0.0.0.0",
port = tonumber(skynet.get... | nilq/small-lua-stack | null |
E2Helper.Descriptions["wsCreateConnection"] = "Creates a Websocket connection with the specified ID to the specified URL (Optionally, ws headers and cookies can be included.)."
E2Helper.Descriptions["wsCanCreate()"] = "Returns 1 if you can create a Websocket connection at the moment, 0 if not."
E2Helper.Descriptions[... | nilq/small-lua-stack | null |
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
DarkRP.ValidatedPhysicsInit(self, SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self:SetUseType(SIMPLE_USE)
local phys = self:GetPhysicsObject()
if phys:IsValid() then
phys:... | nilq/small-lua-stack | null |
Player = game:GetService("Players").LocalPlayer
Character = Player.Character
PlayerGui = Player.PlayerGui
Backpack = Player.Backpack
Torso = Character.Torso
Head = Character.Head
Humanoid = Character.Humanoid
LeftArm = Character["Left Arm"]
LeftLeg = Character["Left Leg"]
RightArm = Character["Right Arm"]
RightLeg = Ch... | nilq/small-lua-stack | null |
--[[
Contains minor help functions to improve on lua
]]--
-- add startswith function to string object
startsWith = function(self, piece)
return string.sub(self, 1, string.len(piece)) == piece
end
rawset(_G.string, "startsWith", startsWith) | nilq/small-lua-stack | null |
if SERVER then return end
local tips = {}
local localAng = Angle(0,-90,90)
local AddWorldTip_orig
timer.Simple(0,function()
AddWorldTip_orig = AddWorldTip
end)
hook.Add("VRMod_Start","worldtips",function(ply)
if ply ~= LocalPlayer() then return end
AddWorldTip = function(entindex, text, dietime, pos, ... | nilq/small-lua-stack | null |
BulletSystem = {}
BulletSystem.new = function()
local self = self or {}
self.bullets = {}
self.insert = function(bullet)
self.bullets[bullet] = bullet
end
self.remove = function(bullet)
self.bullets[bullet] = nil
end
self.clear = function()
for bullet,_ in pairs(self.bullets) do
s... | nilq/small-lua-stack | null |
local pipes = require("pipes")
local blinkState = false
local args = {...}
--local screen = component.list('screen')()
--for address in component.list('screen') do
-- if #component.invoke(address, 'getKeyboards') > 0 then
-- screen = address
-- end
--end
local gpu = args[1] --component.list("gpu", true)(... | nilq/small-lua-stack | null |
local CommonDefine = require("common.CommonDefine")
local Dispatcher = require("common.Dispatcher")
local PacketID = require("common.PacketID")
local Msg = require("common.Msg")
--[[
local _ObjEnterScene = _ObjEnterScene
local _GetObjType = _GetObjType
local _GetPosition = _GetPosition
local _GetDistance = _GetDistance... | nilq/small-lua-stack | null |
--[[
Copyright 2016 Stefano Mazzucco
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writin... | nilq/small-lua-stack | null |
-- Attempts to fully heal the selected unit
--author Kurik Amudnil, Urist DaVinci
--edited by expwnent and AtomicChicken
--[====[
full-heal
=========
Attempts to fully heal the selected unit from anything, optionally
including death. Usage:
:full-heal:
Completely heal the currently selected unit.
:full-heal -un... | nilq/small-lua-stack | null |
--
-- Apps autostarted by Awesome WM
--
local awful = require("awful")
-- common
local apps = {
"unclutter",
"parcellite",
"tresorit --hidden",
"redshift-gtk",
}
if not os.getenv("VNCDESKTOP") then
apps = awful.util.table.join(apps, {
-- vsync fix, test with: https://www.youtube.com/watch?... | nilq/small-lua-stack | null |
local Threshold, parent = torch.class('nn.Threshold','nn.Module')
function Threshold:__init(th,v)
parent.__init(self)
self.threshold = th or 1e-6
self.val = v or 0
if (th and type(th) ~= 'number') or (v and type(v) ~= 'number') then
error('nn.Threshold(threshold, value)')
end
end
function Thresho... | nilq/small-lua-stack | null |
local path = ... and (...):match("(.-)[^%.]+$") or ""
local utf8Tools = require(path .. "utf8_tools")
local errTest = require(path .. "test.lib.err_test")
local strict = require(path .. "test.lib.strict")
local samples = {
-- Thanks: https://www.utf8-chartable.de/unicode-utf8-table.pl
-- ONE BYTE
-- U+0000 - U+... | nilq/small-lua-stack | null |
require('lib/windows')
require('lib/outlook')
require('lib/tabs')
hs.alert.show("Config loaded") | nilq/small-lua-stack | null |
if SERVER then
AddCSLuaFile()
end
ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.PrintName = ""
ENT.Author = "RedMist"
ENT.Contact = ""
ENT.Purpose = ""
ENT.Instructions = ""
if CLIENT then return end
function ENT:Initialize()
self:SetModel( "models/props_junk/garbage_glassbottle003a.mdl" )
self:PhysicsInit... | nilq/small-lua-stack | null |
-- This is an example room, with some basic stuff in it
-- you should replace things with your own content
room = {
short = "win",
name = "Stone circle in the woods",
description = [[
You have escaped from the lodge!
You are standing in the middle of a small circle of rocks
in the middle of a lush fore... | nilq/small-lua-stack | null |
local state = require "state"
local rotate = love.system.getOS() == "Android" or love.system.getOS() == "iOS"
love.graphics.setBackgroundColor( 240 / 255, 240 / 255, 240 / 255 )
function getScreenWidth()
local width, height = love.graphics.getWidth(), love.graphics.getHeight()
return rotate and height or width
end... | nilq/small-lua-stack | null |
CNR = {
spawnpoints = {
{x = 435.76, y = -644.29, z = 28.74},
{x = 169.24, y = -993.29, z = 30.10},
{x = 126.007, y = -1732.17, z = 30.11},
{x = -1341.36, y = -1300.10, z = 4.84},
},
points = {
mostWanted = 100,
felony = 40,
},
timer = {
nextZone = Config.Min... | nilq/small-lua-stack | null |
local bw = {}
function bw.endTime()
local bwTime = getElementData(source, 'player:bw')
local x, y, z = getElementPosition( source )
spawnPlayer( source, x, y, z, 0, getElementModel( source ), getElementInterior( source ), getElementDimension( source ) )
setElementHealth( source, 20 )
setElementData( source, "play... | nilq/small-lua-stack | null |
--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may ... | nilq/small-lua-stack | null |
--[[
]]
--------------------------------
local Adapt = class("Adapt")
function Adapt:ctor()
self._size_screen = cc.Director:getInstance():getOpenGLView():getFrameSize()
self._aspect_screen = self._size_screen.width/self._size_screen.height
-- ZQLogD("_aspect_screen = %f", self._aspect_screen)
self._s... | nilq/small-lua-stack | null |
-- Copyright (c) 2021 wzhengsen
-- 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, distr... | nilq/small-lua-stack | null |
return {
bpm = 120,
short_music_name = "song01",
music_name = "bgm-song01",
left_track = {
{
begin_time = "1",
key_flag = "K_LEFT",
end_time = "1"
},
{
begin_time = "2.5",
key_flag = "K_BOTH",
end_time = "7"
}
},
right_track = {
{
begin_time = "1.5",
key_flag = "K_RIGHT",
end_... | nilq/small-lua-stack | null |
--[[-----------------------------------------------------------------------------
* Infected Wars, an open source Garry's Mod game-mode.
*
* Infected Wars is the work of multiple authors,
* a full list can be found in CONTRIBUTORS.md.
* For more information, visit https://github.com/JarnoVgr/InfectedWars
*
* Inf... | nilq/small-lua-stack | null |
local M
do
local id = 0
local sda = 4 -- GPIO0
local scl = 3 -- GPIO2
local dev = 0x3F -- I2C Address
local reg = 0x00 -- write
i2c.setup(id, sda, scl, i2c.SLOW)
local bl = 0x08 -- 0x08 = back light on
local function send(data)
local value = {}
for i = 1, #data do
table.insert(value, da... | nilq/small-lua-stack | null |
-- Importing modules
local Stats = require "elasticsearch.endpoints.Nodes.Stats"
local MockTransport = require "lib.MockTransport"
local getmetatable = getmetatable
-- Setting up environment
local _ENV = lunit.TEST_CASE "tests.endpoints.NodesTest.StatsTest"
-- Declaring local variables
local endpoint
local mockTransp... | nilq/small-lua-stack | null |
ITEM.name = "Ushanka"
ITEM.desc = "A fur cap to protect your head and ears from the cold"
ITEM.model = "models/maver1k_xvii/metro_ushanka.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.outfitCategory = "hat"
ITEM.price = 10
ITEM.pacData = {
[1] = {
["children"] = {
[1] = {
["children"] = {
},
... | nilq/small-lua-stack | null |
local ABOUT = {
NAME = "openLuup.compression",
VERSION = "2016.06.30",
DESCRIPTION = "Data compression using LZAP",
AUTHOR = "@akbooer",
COPYRIGHT = "(c) 2013-2016 AKBooer",
DOCUMENTATION = "http://read.pudn.com/downloads167/ebook/769449/dataCompress.pdf",
LICENSE = [[
... | nilq/small-lua-stack | null |
local worker = cc.class("worker")
local gbc = cc.import("#gbc")
-- local ngx_timer_at = ngx.timer.at
function worker:ctor()
end
function worker:runapp()
--math.newrandomseed()
cc.printf("worker runapp:"..ngx.worker.id())
local nginxWorkerBootstrap = gbc.NginxWorkerBootstrap:new(cc.GAppKeys, cc.GConfi... | nilq/small-lua-stack | null |
--[[ A plain implementation of RPROP
ARGS:
- `opfunc` : a function that takes a single input (X), the point of
evaluation, and returns f(X) and df/dX
- `x` : the initial point
- `state` : a table describing the state of the optimizer; after each
call the state is modified
- `state.steps... | nilq/small-lua-stack | null |
local Loc = Apollo.GetPackage("Gemini:Locale-1.0").tPackage:NewLocale("Interruptor", "enUS", true)
Loc["Never use alternatives!"] = true
Loc["Icons"] = true
Loc["Icon Distribution Value (0-255)"] = true
Loc["Interrupt Armor locked to Castbar"] = true
Loc["Big Icon"] = true
Loc["Hide default target castbar"] = true
Loc[... | nilq/small-lua-stack | null |
local CrossEntropyCriterion, Criterion = torch.class('nn.CrossEntropyCriterion', 'nn.Criterion')
function CrossEntropyCriterion:__init(weights, sizeAverage)
Criterion.__init(self)
self.lsm = nn.LogSoftMax()
self.nll = nn.ClassNLLCriterion(weights, sizeAverage)
self.sizeAverage = self.nll.sizeAverage
sel... | nilq/small-lua-stack | null |
#!/usr/bin/env tarantool
--
-- gh-5632, gh-6050, gh-6259: Lua code should not use any global buffers or
-- objects without proper ownership protection. Otherwise these items might be
-- suddenly reused during Lua GC which happens almost at any moment. That might
-- lead to data corruption.
--
local tap = require('tap... | nilq/small-lua-stack | null |
require("tests/testsuite")
local filename = os.tmpname()
GlobalSettings = {
intValue = 1,
stringValue = "one",
floatValue = 1.0,
tableValue = { 1, 2, 3, foo="bar" }
}
FireEvent(Event.RegisterAddons)
SaveGlobalSettings(filename)
local want = GlobalSettings
GlobalSettings = {}
LoadGlobalSettings(filename)
Asser... | nilq/small-lua-stack | null |
require "lib.classes.class"
local guards = require("Battle.model.guard.guard_dict")
local NullEntity = require("Battle.model.entities.NullEntity")
local ActionFactory = require("Battle.init.actions.ActionFactory")
--------------------------------------------------------------------------------------------------------
... | nilq/small-lua-stack | null |
local lm = require "luamake"
local platform = require "bee.platform"
lm.gcc = 'clang'
lm.gxx = 'clang++'
lm.arch = ARGUMENTS.arch or 'x64'
lm.bindir = ("build/%s/bin/%s"):format(lm.plat, lm.arch)
lm.objdir = ("build/%s/obj/%s"):format(lm.plat, lm.arch)
local BUILD_BIN = platform.OS ~= "Windows" or lm.arch ~= "x64"
... | nilq/small-lua-stack | null |
require "classes.constants.screen"
Polylynes={}
function Polylynes:new()
local this = display.newGroup()
local public = this
local private = {}
local background = display.newImageRect("img/backgroundPolylynes.png", 360, 570)
local stars = {}
function private.Polylynes()
background.x ... | nilq/small-lua-stack | null |
--Compiler args. Sort of...
local memLimit = (2^8) - 1
local memBlocks = 17
local dbgSleep = .005
local dbg = false
local printMem = false
local args = { ... }
local w, h = term.getSize()
local x, y = 0, 0;
local instCnt = 0
local semStr = " "
local memBlockStr = ""
local function interpet(code)
print("Creating memo... | nilq/small-lua-stack | null |
local _
local LAM = LibStub:GetLibrary("LibAddonMenu-2.0")
function BUI.Helper.GamePadBuddy.GetItemStatusIndicator(bagId, slotIndex)
if GamePadBuddy then
local itemFlagStatus = GamePadBuddy:GetItemFlagStatus(bagId, slotIndex)
local iconTextureName
if itemFlagStatus == GamePadBuddy.CONST.ItemFlags.ITEM_FLAG_NO... | nilq/small-lua-stack | null |
return {
Image = 1,
TShirt = 2,
Audio = 3,
Mesh = 4,
Lua = 5,
Hat = 8,
Place = 9,
Model = 10,
Shirt = 11,
Pants = 12,
Decal = 13,
Head = 17,
Face = 18,
Gear = 19,
Badge = 21,
Animation = 24,
Torso = 27,
RightArm = 28,
LeftArm = 29,
LeftLeg ... | nilq/small-lua-stack | null |
local parser = require("moocscript.parser")
local compile = require("moocscript.compile")
describe("test success #call", function()
local mnstr=[[
c = fn () {
t = {}
t.__index = t
t.f = fn() {
return { }
}
return t
}
... | nilq/small-lua-stack | null |
kernel.userspace.package.preload.pipes = {}
kernel.userspace.package.preload.pipes.setKernelOutput = function(sink)
kernel.io.println = function(str)
sink:setvbuf("line")
sink:write("[dmesg] ")
sink:write(tostring(str))
sink:write("\n")
sink:setvbuf("no")
sink:flush(... | nilq/small-lua-stack | null |
--[=[
@Author: Gavin "Mullets" Rosenthal
@Desc: Internal subscription functions
]=]
local Subscribe = {}
Subscribe._Cache = {}
Subscribe._All = {}
Subscribe._Remotes = {
["Download"] = "_DOWNLOAD",
["Upload"] = "_UPLOAD",
["Subscribe"] = "_SUBSCRIBE",
["Unsubscribe"] = "_UNSUBSCRIBE",
}
local require = require(... | nilq/small-lua-stack | null |
object_tangible_component_structure_mustafar_must_synth_creature_hide = object_tangible_component_structure_mustafar_shared_must_synth_creature_hide:new {
}
ObjectTemplates:addTemplate(object_tangible_component_structure_mustafar_must_synth_creature_hide, "object/tangible/component/structure/mustafar/must_synth_creat... | nilq/small-lua-stack | null |
function onCreate()
--Iterate over all notes
for i = 0, getProperty('unspawnNotes.length')-1 do
if getPropertyFromGroup('unspawnNotes', i, 'noteType') == 'AMONGUS LMAOO' then
setPropertyFromGroup('unspawnNotes', i, 'texture', 'staticNotes');
if getPropertyFromGroup('unspawnNotes', i, 'mustPress') then... | nilq/small-lua-stack | null |
--[[ Shattrath City -- Vindicator Kaan.lua
This script was written and is protected
by the GPL v2. This script was released
by BlackHer0 of the BLUA Scripting
Project. Please give proper accredidations
when re-releasing or sharing this script
with others in the emulation community.
~~End of License Agreement
-- Blac... | nilq/small-lua-stack | null |
---------------------------------------------------------------------------------------------------
-- User story: https://github.com/smartdevicelink/sdl_requirements/issues/5
-- Use case: https://github.com/smartdevicelink/sdl_requirements/blob/master/detailed_docs/unsubscribe_from_module_status_change_notification.md... | nilq/small-lua-stack | null |
require('lib.functions')
require('lib.gui.common')
require('lib.gui.tools')
require('PLoop')
PLoop(function(_ENV)
namespace "gui"
__Abstract__()
class "GObject" (function(_ENV)
__Sealed__()
enum "Relative" { Editor = 'editor', Win = 'win', Cursor = 'cursor' }
function GObject(sel... | nilq/small-lua-stack | null |
local M = {}
local draw = require 'draw'
local keyinput = require 'keyinput'
M.all_widgets = {} -- table of names
function M:new(name, x, y, symbol)
self.all_widgets[name] = {
name = name,
x = x or 0,
y = y or 0,
symbol = symbol or true, -- the display object that is passed to dra... | nilq/small-lua-stack | null |
stream:write("Content-Type: text/html\n\n");
stream:write("<title>FreeSWITCH Command Portal</title>");
stream:write("<h2>FreeSWITCH Command Portal</h2>");
stream:write("<form method=post><input name=command size=40> ");
stream:write("<input type=submit value=\"Execute\">");
stream:write("</form><hr noshade size=1><br>"... | nilq/small-lua-stack | null |
data:extend({
{ type = "electric-energy-interface",
name = "sl_pl1",
icon = "__Solar_Synthesis__/graphics/sl_synthesizer1.png",
icon_size = 192,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 10000, mining_time = 10000},
max_health = ... | nilq/small-lua-stack | null |
return LoadActor( THEME:GetPathB("ScreenTitleMenu", "underlay/Logo.lua"))..{
InitCommand=function(self) self:Center() end
}
| nilq/small-lua-stack | null |
--[[ _
( )
_| | __ _ __ ___ ___ _ _
/'_` | /'__`\( '__)/' _ ` _ `\ /'_` )
( (_| |( ___/| | | ( ) ( ) |( (_| |
`\__,_)`\____)(_) (_) (_) (_)`\__,_)
DSlider
--]]
local PANEL = {}
AccessorFunc( PANEL, "m_strName", "Name" )
Acc... | nilq/small-lua-stack | null |
local lspconfig = require('lspconfig')
local function on_attach(client, bufnr)
local function cmd(mode, key, cmd)
vim.api.nvim_buf_set_keymap(
bufnr,
mode,
key,
'<cmd>lua ' .. cmd .. '<CR>',
{noremap = true}
)
end
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.ls... | nilq/small-lua-stack | null |
function fooGlobalWithoutDecls()
return "foo from lua global without decls"
end
function barGlobalWithoutDecls(param)
return "bar from lua global without decls: " .. param
end | nilq/small-lua-stack | null |
--- Provides permissions for entities based on CPPI if present
local isentity = isentity
local owneraccess
if SERVER then
owneraccess = CreateConVar("sf_permissions_entity_owneraccess", "0", { FCVAR_ARCHIVE }, "Allows starfall chip's owner to access their player entity")
CreateConVar("sf_permissions_entity_ownerac... | nilq/small-lua-stack | null |
-- Copyright (c) 2010-2012 by Robert G. Jakabosky <bobby@sharedrealm.com>
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
--... | nilq/small-lua-stack | null |
local GUIEditor_Window = {}
local GUIEditor_Edit = {}
local GUIEditor_Label = {}
local GUIEditor_Button = {}
local GUIEditor_Memo = {}
local GUIEditor_Combo = {}
function openEditVehicleWindow(data)
closeEditVehicleWindow()
local existed = true
if not data or not data.id then
existed = false
end
local theVehi... | nilq/small-lua-stack | null |
-- luacheck: globals minetest rhynia nodecore
nodecore.register_limited_abm({
label = "rhynia plant tick",
nodenames = {"group:rhynia_plant_active"},
interval = 1,
chance = 1,
ignore_stasis = false,
action = function(pos, node)
local dat,switch_s = node.name and rhynia.f.nominate(node.n... | nilq/small-lua-stack | null |
a = {}
a..b = {}
a..b..c = function()
print "hello"
end
a..b..c()
ax = {}
ax..by = {}
ax..by..cz = function()
print "hello"
end
ax..by..cz()
.aX = function()
print "hello"
end
.aX.bY = function()
print "hello"
end
.aX.bY( = function()
print "hello"
end
.(aX.bY = function()
prin... | nilq/small-lua-stack | null |
--[[
TheNexusAvenger
Stores information about an appendage, such as
an arm or a leg.
--]]
local NexusVRCharacterModel = require(script.Parent.Parent)
local Limb = NexusVRCharacterModel:GetResource("Character.Limb")
local Appendage = Limb:Extend()
Appendage:SetClassName("Appendage")
--[[
Creates an appendage.
--]... | nilq/small-lua-stack | null |
local TeamComments = script:FindFirstAncestor("TeamComments")
local Roact = require(TeamComments.Packages.Roact)
local Hooks = require(TeamComments.Packages.Hooks)
local t = require(TeamComments.Packages.t)
local Llama = require(TeamComments.Packages.Llama)
local types = require(TeamComments.types)
local styles = requ... | nilq/small-lua-stack | null |
-- Prosody IM
-- Copyright (C) 2008-2010 Matthew Wild
-- Copyright (C) 2008-2010 Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
module:set_global();
local prosody = prosody;
local hosts = prosody.hosts;
local core_process_stanza = pr... | nilq/small-lua-stack | null |
local MainMenuSignedOut =
{
Properties =
{
},
}
function MainMenuSignedOut:OnActivate()
self.tickBusHandler = TickBus.Connect(self)
self.canvasNotificationHandler = nil
end
function MainMenuSignedOut:OnTick(deltaTime, timePoint)
--self.tickBusHandler:Disconnect()
self.CanvasEntityId = self.CanvasEntityI... | nilq/small-lua-stack | null |
--[[
This class represents a GuiParticleEmitter
A GuiParticleEmitter holds an Emitter and the properties
@author 4SHN (Steve)
]]
-- Constants
local MIN_LIFETIME, MAX_LIFETIME = 0, 20 --TODO, setup metamethods to enforce
-- Static Variables
local Emitter = require(script.Parent.Subclasses:WaitForChild("... | nilq/small-lua-stack | null |
require "prefabutil"
function MakeWallType(data)
local assets =
{
Asset("ANIM", "anim/wall.zip"),
Asset("ANIM", "anim/wall_".. data.name..".zip"),
}
local function ondeploywall(inst, pt, deployer)
--inst.SoundEmitter:PlaySound("dontstarve/creatures/spider/spider_egg_sack")
local wall = SpawnPrefab("wall_... | nilq/small-lua-stack | null |
function PlateText(thePlayer,commandName,text)
local Vehicle = getPedOccupiedVehicle(thePlayer)
if Vehicle then
if text then
setVehiclePlateText( Vehicle, text )
else
outputChatBox("You must enter a message.",thePlayer)
end
else
outputChatBox("You must be in a Vehicle.",thePlayer)
end
e... | nilq/small-lua-stack | null |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:25' 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 |
-----------------------------------
-- Area: Ru'Lude Gardens
-- NPC: Perisa-Neburusa
-- Type: Residence Renter
-- !pos 54.651 8.999 -74.372 243
--
-- Auto-Script: Requires Verification (Verfied by Brawndo)
-----------------------------------
function onTrade(player, npc, trade)
end
function onTrigger(player, npc)
... | nilq/small-lua-stack | null |
local mqtt_connect = require("envel.mqtt")
local dbus = require("envel.dbus")
local json = require("json")
local device = require("envel.device")
local hs1xx = require("envel.platform.tplink.hs1xx")
local owm = require("openweathermap")
local notify = dbus.notify
local config = require("config")
local new_pushover = re... | nilq/small-lua-stack | null |
local io, type, tostring, require = io, type, tostring, require
local TestCase, forms, fields, Model, html = require "luv.dev.unittest".TestCase, require "luv.forms", require "luv.fields", require "luv.db.models".Model, require "luv.utils.html"
local references = require "luv.fields.references"
module(...)
local Test... | nilq/small-lua-stack | null |
kHiveInfestationRadius = 30 -- was 20 | nilq/small-lua-stack | null |
COMMAND = Clockwork.command:New("PACEditor")
COMMAND.tip = "Opens the PAC editor."
-- Called when the command has been run.
function COMMAND:OnRun(player)
if !Clockwork.player:HasFlags(player, "W") then
Clockwork.player:Notify(player, "You don't have the permission to use PAC!")
else
player:ConCommand("pac_edito... | 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.