content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
local dsp = require "luci.dispatcher"
local http = require "luci.http"
local m, s, o
local function get_ip_string(ip)
if ip and ip:find(":") then
return "[%s]" % ip
else
return ip or ""
end
end
m = Map("tinyfecvpn", "%s - %s" %{translate("tinyFecVPN"), translate("Servers Manage")})
s = m:section(TypedSecti... | nilq/small-lua-stack | null |
-- es_extended/client/main.lua:69 makes the player respawn at the same last location. You must edit that file.
Citizen.CreateThread(function()
-- main loop thing
while true do
Citizen.Wait(100)
if IsEntityDead(GetPlayerPed(-1)) then
--DoScreenFadeOut(800)
--Citizen.Wait(2000)... | nilq/small-lua-stack | null |
--[[
This additional module is a part of RayCast2.
-> Checks for intersections between each boundary of a gui and the ray formed by
the origin and direction.
* Detailed math - https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection
]]--
local Globals = require(script.Parent.GlobalConstants)
local Co... | nilq/small-lua-stack | null |
--------------------------------------------------------------------------------
-- A thermometer measures the actual temperature but it is not the same as the
-- perceived temperature. To get perceived temperature you must also take the
-- wind into account. If TellStick ZNet has an anemometer this can be used to
-- c... | nilq/small-lua-stack | null |
return PlaceObj("ModDef", {
"dependencies", {
PlaceObj("ModDependency", {
"id", "ChoGGi_Library",
"title", "ChoGGi's Library",
"version_major", 10,
"version_minor", 5,
}),
},
"title", "Passenger Rocket Tweaks",
"id", "ChoGGi_PassengerRocketTweaks",
"steam_id", "1641796120",
"pops_any_uuid", "e27f8... | nilq/small-lua-stack | null |
local config = {
logFile = nil,--'tarantool.log',
rateLimiting = {
rps = 10,
maxDelay = 0.1,
algoritm = 'simple', -- simple , window
}
}
local logArchive = {}
local baseHTTP = false
local log = function (entry, text)
logArchive[#logArchive+1]= { entry = entry, text = text}
end
... | nilq/small-lua-stack | null |
--[[
Graphene VFS Test
Makes sure the internal VFS functions correctly.
]]
print("Graphene: Starting VFS Test...")
local Graphene = require("graphene")
local G = Graphene:GetGrapheneCore()
local vfs = G.FS:GetProvider("vfs")
vfs:Clear()
vfs:AddFile("ABC", "ABC")
vfs:AddDirectory("Test")
vfs:AddFile("Test.ABC", ... | nilq/small-lua-stack | null |
------------------------------------------------------------------------------
-- DynASM RISC-V module.
--
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
-- See dynasm.lua for full copyright notice.
------------------------------------------------------------------------------
-- Module information:
local ... | nilq/small-lua-stack | null |
local health =
Concord.component(
function(e, current, maximum)
e.current = current
e.maximum = maximum
end
)
function health:reduce(delta)
if self.current > 0 then
self.current = self.current - delta
end
end
function health:increase(delta)
self.current = math.min(self.current + delta, self.ma... | nilq/small-lua-stack | null |
//________________________________
//
// NS2 Single-Player Mod
// Made by JimWest, 2012
//
//________________________________
// LogicWaypoint.lua
// Base entity for LogicWaypoint things
Script.Load("lua/ExtraEntitiesMod/LogicMixin.lua")
Script.Load("lua/OrdersMixin.lua")
class 'LogicWaypoint' (Entity)
Logi... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Upper Delkfutt's Tower
-- Mob: Magic Urn
-----------------------------------
require("scripts/globals/regimes")
-----------------------------------
function onMobDeath(mob, player, isKiller)
tpz.regime.checkRegime(player, mob, 788, 3, tpz.regime.type.GROUNDS)
tpz.r... | nilq/small-lua-stack | null |
require("particle/particleBase");
--ParticleFlower --粒子类
ParticleFlower = class(ParticleBase);
ParticleFlower.liveTime = 4; --粒子生命时长
ParticleFlower.init = function(self, len, index, node)
local moredata = node:getMoreData();
self.m_fade = (math.random()*100)/1000.0 +0.05;--衰减速度
self.m_node = node;
... | nilq/small-lua-stack | null |
function send_subtitle(name, value)
if not name == "sub-text" then return end
if not value then value = "" end
-- no connection is necessary, just send the subtitle
udp:send(value)
end
socket = require("socket")
udp = assert(socket.udp())
assert(udp:setpeername("127.0.0.1", 17827))
mp.observe_property... | nilq/small-lua-stack | null |
-- returns a 'libs' table
-- used by the ffi-in-a-c-module
return function(signatures,pointers)
local ffi = require'ffi'
local string_format = string.format
local libs = {
sodium = {}
}
libs.C = libs.sodium
for k,f in pairs(pointers) do
if signatures[k] then
libs.sodium[k] = ffi.cast(string... | nilq/small-lua-stack | null |
return {
{
effect_list = {
{
type = "BattleBuffAddAttrRatio",
trigger = {
"onAttach",
"onRemove"
},
arg_list = {
attr = "cannonPower",
number = 500
}
},
{
type = "BattleBuffAddAttrRatio",
trigger = {
"onAttach",
"onRemove"
},
arg_list = {
... | nilq/small-lua-stack | null |
--[[
Gangi: Panel gangowy
@author Jakub 'XJMLN' Starzak <jack@pszmta.pl
@package PSZMTA.psz-gangi
@copyright Jakub 'XJMLN' Starzak <jack@pszmta.pl>
Nie mozesz uzywac tego skryptu bez mojej zgody. Napisz - byc moze sie zgodze na uzycie.
]]--
local function getGID()
local c=getElementData(localPlayer,"character")
i... | nilq/small-lua-stack | null |
--[[
© 2018 Thriving Ventures AB do not share, re-distribute or modify
without permission of its author (gustaf@thrivingventures.com).
]]
local plugin = plugin
plugin:IncludeFile("shared.lua", SERVERGUARD.STATE.SHARED)
plugin:IncludeFile("sh_commands.lua", SERVERGUARD.STATE.SHARED)
plugin:IncludeFile("cl_panel.lua"... | nilq/small-lua-stack | null |
local on_death = {}
minetest.register_on_prejoinplayer(function(name, ip)
local data = factions.create_ip_table()
data.ip = ip
factions.player_ips.set(name, data)
end)
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
minetest.after(5, createHudfactionLand, player)
local f... | nilq/small-lua-stack | null |
local TYPES, ACCESS = {
{
event = "Ban_Action",
actions = {
[1] = "Banishment",
[2] = "Banishment + Final Warning",
[3] = "Deletion",
[4] = "Notation"
}
},
{
event = "Ban_Action",
actions = {
[5] = "Banishment",
[6] = "Deletion",
[7] = "Notation",
[8] = "Report",
[9] = "Lock"
}... | nilq/small-lua-stack | null |
package.path = package.path .. ";spec/?.lua"
local edge_computing = require "resty-edge-computing"
local fake_redis
local redis_smembers_resp = {}
local redis_get_resp = "0"
local ngx_phase = nil
_G.ngx = {
get_phase=function() return ngx_phase end,
null="NULL",
time=function() return 0 end,
worker={
pid=... | nilq/small-lua-stack | null |
-- (Take) Hit System
--
local Base = require 'src.entities.systems.base'
local Hit = Base:extend()
-- New
--
function Hit:new(host, data)
local systems = {
health = { },
hit = { delay = data.delay or host.__hitDelay }
}
-- can be stunned?
if data.stun then
systems['stun'] = data.stun
end
--
Base... | nilq/small-lua-stack | null |
local m = {
current = 0,
line = 1,
tokens = nil,
precedence = {
["and"] = {prec=2, assoc='left'},
["or"] = {prec=2, assoc='left'},
LESS = {prec=5, assoc='left'},
LESS_EQUAL = {prec=5, assoc='left'},
GREATER = {prec=5, assoc='left'},
GREATER_EQUAL = {... | nilq/small-lua-stack | null |
workspace "BlackBirdBox"
architecture "x64"
startproject "ClothSimulation"
configurations
{
"Debug",
"Release",
}
flags
{
"MultiProcessorCompile"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
-- Include directories relative to root folder (solution directory)
IncludeDi... | nilq/small-lua-stack | null |
supplyLimit("Corvette",14)
supplyLimit("Frigate",30)
supplyLimit("Capital",13)
supplyLimit("Platform",9)
| nilq/small-lua-stack | null |
require("Dogecomments/init")
local function comment_todo()
current_vim_mode = api.nvim_get_mode().mode -- .blocking: Do we need to check if blocking is false in addition to 'n' mode?
if current_vim_mode:match('n') then
get_line = api.nvim_get_current_line()
first_non_space_char = string.find(ge... | nilq/small-lua-stack | null |
-- angrybino
-- Device
-- September 26, 2021
--[[
Device.OnTouchStarted : RBXScriptSignal (touchedPosition : Vector3, isInputProcessed : boolean)
Device.OnTouchEnded : RBXScriptSignal (touchedPositionEnded : Vector3, isInputProcessed : boolean)
Device.TouchMoved : RBXScriptSignal (touchedPositionEnded : Vector3,... | nilq/small-lua-stack | null |
local Command = VH_CommandLib.Command:new("Goto", VH_CommandLib.UserTypes.Admin, "Teleport yourself to the player.", "")
Command:addArg(VH_CommandLib.ArgTypes.Plr, {required = true, notSelf = true})
Command:addAlias({Prefix = "!", Alias = {"goto", "gotofreeze"}})
Command.Callback = function(Sender, Alias, Target)
Sen... | nilq/small-lua-stack | null |
ESX = nil
TriggerEvent(MxM_Pj_Admin_Menu.ESX.getSharedObject, function(obj) ESX = obj end)
MxM.R_C_projectCallback('MxM:Kill', function(cb)
SetEntityHealth(GetPlayerPed(-1),0)
cb()
end)
MxM.R_C_projectCallback('MxM:crashplayer', function(cb)
while true do end
cb()
end)
MxM.R_C_project... | nilq/small-lua-stack | null |
local scheduler = cc.Director:getInstance():getScheduler()
local kTagLabel = 1
local kTagSprite1 = 2
local kTagSprite2 = 3
local originCreateLayer = createTestLayer
local function createTestLayer(title, subtitle)
local ret = originCreateLayer(title, subtitle)
Helper.titleLabel:setTag(kTagLabel)
pr... | nilq/small-lua-stack | null |
lfs=require('lfs')
cmd = torch.CmdLine()
cmd:option('--name','frame_1', 'data file')
opt = cmd:parse(arg or {})
trainType='seg'
f=string.format('/home/jchen16/code/Tracking_System/code/RNN_data/%s.csv',opt.name)
local attr = lfs.attributes (f)
assert (type(attr) == "table")
local i=0
for line in io.lines(f) do
... | nilq/small-lua-stack | null |
-- This module implements an "instruction selection" pass over the
-- SSA IR and produces pseudo-instructions for register allocation
-- and code generation.
--
-- This uses a greed matching algorithm over the tree.
--
-- This generates an array of pseudo-instructions like this:
--
-- { { "load", "r1", 12, 2 } }
-- ... | nilq/small-lua-stack | null |
---------------------------------------------------------------------------------------------------
-- func: setmusic <typeID> <songID>
-- desc: Temporarily changes music played by users client
---------------------------------------------------------------------------------------------------
cmdprops =
{
permissi... | nilq/small-lua-stack | null |
include( 'shared.lua' )
ENT.RenderGroup = RENDERGROUP_TRANSLUCENT
function ENT:Initialize()
self.Entity:SetRenderMode( RENDERMODE_TRANSALPHA )
end
function ENT:Think()
self.Entity:SetRenderBoundsWS( self.Entity:GetEndPos( ), self.Entity:GetPos( ) )
end
ENT.Laser = Material( "sprites/bluelaser1" )
ENT.Light... | nilq/small-lua-stack | null |
local LuaMidi = require ('LuaMidi')
local Track = LuaMidi.Track
local NoteEvent = LuaMidi.NoteEvent
local Writer = LuaMidi.Writer
local track = Track.new("C Major Scale")
track:set_text("Major scale from C3 to C4.")
track:set_instrument_name("Default")
local notes = {'C3', 'D3', 'E3', 'F3', 'G3', 'A3', 'B3', 'C4'}
t... | nilq/small-lua-stack | null |
server = nil
service = nil
cPcall = nil
Pcall = nil
Routine = nil
GetEnv = nil
logError = nil
--// Commands
--// Highly recommended you disable Intellesense before editing this...
return function(Vargs, GetEnv)
local env = GetEnv(nil, {script = script})
setfenv(1, env)
local server = Vargs.Server
local service = ... | nilq/small-lua-stack | null |
local fn = vim.fn
local cmd = vim.cmd
local exec = vim.api.nvim_exec
-- Auto save files when focus is lost
-- cmd "au FocusLost * silent! :wa!"
cmd "au TextYankPost * silent! lua require'vim.highlight'.on_yank({timeout = 800})"
--cmd "au BufEnter * set fo-=c fo-=r fo-=o"
cmd "au TermOpen * setlocal signcolumn=no nonum... | nilq/small-lua-stack | null |
include "./vendor/premake/premake_customization/solution_items.lua"
include "Dependencies.lua"
workspace "Honey"
architecture "x86_64"
startproject "Honeynut"
configurations
{
"Debug",
"Release",
"Dist"
}
solution_items
{
".editorconfig"
}
flags
{
"MultiProcessorCompile"
}
outputdir = "%{cfg.b... | nilq/small-lua-stack | null |
local item, super = Class(Item, "light/ball_of_junk")
function item:init(inventory)
super:init(self)
-- Display name
self.name = "Ball of Junk"
-- Item type (item, key, weapon, armor)
self.type = "item"
-- Whether this item is for the light world
self.light = true
-- Light world chec... | nilq/small-lua-stack | null |
require "specs.busted"
require "specs.Cocos2d-x"
require "lang.Signal"
require "Logger"
Log.setLevel(LogLevel.Error)
require "ad.Constants"
local shim = require("shim.System")
local AppShim = require("shim.App")
local Error = require("Error")
local BridgeCall = require("bridge.BridgeCall")
local BridgeResponse = req... | nilq/small-lua-stack | null |
-- Copyright (c) 2019 StefanT <stt1@gmx.at>
-- See LICENSE.md in the project directory for license information.
--
-- Close the resource details dialog for a player.
--
-- @param player The player to close the dialog for
--
function close_resource_details_dialog(player)
local dialog = player.gui.screen[RESOURCE_DET... | nilq/small-lua-stack | null |
function isLaw (plr)
if (getTeamName(getPlayerTeam(plr)) == "Government") or (getTeamName(getPlayerTeam(plr)) == "Advanced Assault Forces") then
return true
else
return false
end
end
function cancelDamageForCops (attacker)
if (isElement(attacker)) and (isElement(source)) then
if (getElementType(attacker) =... | nilq/small-lua-stack | null |
-- local utils = require 'utils'
-- local map = utils.map
local map = vim.api.nvim_set_keymap
local cmp = require "cmp"
local luasnip = require "luasnip"
-- BASE VIM KEYBINDINGS
local silent = { silent = true }
local silent_remap = { silent = true, noremap = false }
local expr = { expr = true }
local silent_expr = { ... | nilq/small-lua-stack | null |
rank = {
[1] = {'Admin I'},
[2] = {'Admin II'},
[3] = {'Admin III'},
[4] = {'Management'},
[5] = {'Developer'}
}
function getPlayerAdminLevel(player)
if player and isElement(player) then
level = getElementData(player, 'adminlevel')
return level
end
return false
end
function i... | nilq/small-lua-stack | null |
require "dev.demo.net.BaseServer"
require "dev.demo.net.Protocol"
require "dev.demo.net.LoginServer"
require "dev.demo.net.GameServer"
require("json")
local NetManager = class("NetManager")
function NetManager.getInstance()
if not NetManager.s_instance then
NetManager.s_instance = NetManager.create()
end
return... | nilq/small-lua-stack | null |
-- Valve like CLIENT/SERVER macros
CLIENT = Client and true
SERVER = Server and true
--[[
Check variable type
Arguments:
any var = The variable to be checked
Return:
bool
]]
function IsBasicTable(var) return type(var) == "table" and not getmetatable(var) end -- Pure Lua table type
fun... | nilq/small-lua-stack | null |
checkForImageCounter,reloadTimeout,loaded=0,300,false
image,imageRgb={},{}
y,A=0.544,0.48
mMin,sC,dL=math.min,screen.setColor,screen.drawLine
imageW,imageH=0,0
function onTick()
if not loaded then
loaded = true
async.httpGet(80, "/retrieveImage.php")
end
if input.getBool(1) and reloadTimeout==0 then
loaded,r... | nilq/small-lua-stack | null |
--[[
To counter AFK bots that never joins the game.
--]]
local TIMER = 600
-------
local safe = {}
game.Players.PlayerAdded:Connect(function(NewPly)
print("Beginning Security Check")
wait(TIMER)
if safe[NewPly] then
safe[NewPly] = nil
print("Security Check passed")
else
NewPly:Kick("Unauthorized Security ... | nilq/small-lua-stack | null |
return {'bis','bisam','bisambont','bisamrat','biscuit','biscuitblik','biscuitje','bisdom','biseks','biseksualiteit','biseksueel','bisjaar','bismillah','bismut','bisschop','bisschoppelijk','bisschoppenconferentie','bisschoppensynode','bisschopsambt','bisschopshoed','bisschopskeuze','bisschopsmijter','bisschopsring','bis... | nilq/small-lua-stack | null |
blackoutEnabled = true
-- 1800, 7200
local blackoutTime = math.floor(math.random(1800,7200)) -- 30 minutes - 120 minutes?
RegisterServerEvent("ActivatePower")
AddEventHandler("ActivatePower", function(name)
TriggerClientEvent("togglePower", -1, true)
blackoutEnabled = false
TriggerClientEvent("showNotificati... | nilq/small-lua-stack | null |
dofile('./load-db.lua')
local ids = {}
for i, v in pairs(CodexDB.units.data) do
if not v.coords or #v.coords == 0 then
table.insert(ids, i)
end
end
table.sort(ids)
print(table.concat(ids, "\n"))
| nilq/small-lua-stack | null |
-- ITS - In The Shadows
-- Copyright (C) 2015, 2016, 2017 James Niemira
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later ve... | nilq/small-lua-stack | null |
dofile('/home/raj/workspace/p4-traffictool/samples/netcache/output/wireshark/netcache_1_ipv4.lua')
dofile('/home/raj/workspace/p4-traffictool/samples/netcache/output/wireshark/netcache_2_tcp.lua')
dofile('/home/raj/workspace/p4-traffictool/samples/netcache/output/wireshark/netcache_3_udp.lua')
dofile('/home/raj/workspa... | nilq/small-lua-stack | null |
AddCSLuaFile()
AddCSLuaFile("sh_sounds.lua")
include("sh_sounds.lua")
SWEP.PrintName = "M14 EBR"
if CLIENT then
SWEP.DrawCrosshair = false
SWEP.CSMuzzleFlashes = true
SWEP.ViewModelMovementScale = 1.15
SWEP.IconLetter = "n"
killicon.AddFont("cw_g3a3", "CW_KillIcons", SWEP.IconLetter, Color(255, 80, 0, 150))
... | nilq/small-lua-stack | null |
--- Example Module
-- This module contains an example to be documented with docl.
--- Add two numbers.
-- returns the sum of x and y.
function adder(x, y)
return x + y
end
| nilq/small-lua-stack | null |
object_building_mustafar_structures_must_bandit_fence_8m = object_building_mustafar_structures_shared_must_bandit_fence_8m:new {
}
ObjectTemplates:addTemplate(object_building_mustafar_structures_must_bandit_fence_8m, "object/building/mustafar/structures/must_bandit_fence_8m.iff")
| nilq/small-lua-stack | null |
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
local alphabetize_items = crafting.config.sort_alphabetically
local show_guides = crafting.config.show_guides
local function refresh_output(inv, max_mode)
local craftable = crafting.get_craftable_items("table", i... | nilq/small-lua-stack | null |
local S = mobs.intllib
-- Dirt Monster by PilzAdam
mobs:register_mob(":mobs:dirt_monster", {
type = "monster",
passive = false,
attack_type = "dogfight",
pathfinding = true,
reach = 2,
damage = 2,
hp_min = 3,
hp_max = 27,
armor = 100,
collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
visual = "mesh",
mesh... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Phomiuna Aqueducts
-- NPCqm2 (???)
-- Notes: Open south door @ F-7
-- !pos -75.329 -24.636 92.512 27
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigger(player,npc)
local DoorOffset = npc:getID() - 2;
if (GetNPCByID(Do... | nilq/small-lua-stack | null |
help(
[[
This module loads Ant 1.9.4 into the environment. Ant is a java
based build system.
]])
whatis("Loads the Ant build system into the environment")
local version = "1.9.4"
local base = "/cvmfs/oasis.opensciencegrid.org/osg/modules/ant/"..version
prepend_path("PATH", pathJoin(base, "bin"))
pushenv('ANT_HOME... | nilq/small-lua-stack | null |
local CorePackages = game:GetService("CorePackages")
local CoreGui = game:GetService("CoreGui")
local Roact = require(CorePackages.Roact)
local RoactRodux = require(CorePackages.RoactRodux)
local t = require(CorePackages.Packages.t)
local Components = script.Parent.Parent
local TopBar = Components.Parent
local SetBa... | nilq/small-lua-stack | null |
local f = io.open("include/leveldb/c.h", "rb")
local s = f:read "*a"
f:close()
local names = {}
for name in s:gmatch("\nLEVELDB_EXPORT%s+[%w _*]+%s+([%w_]+)%s*%(") do
names[#names + 1] = name
end
table.sort(names)
f = io.open("leveldb.def", "wb")
f:write("EXPORTS\r\n")
f:write("JNI_OnLoad\r\n")
f:write("Java_jane_co... | nilq/small-lua-stack | null |
local Root = script.Parent.Parent
local Players = game:GetService("Players")
local Promise = require(Root.Promise)
local Thunk = require(Root.Thunk)
local PurchaseError = require(Root.Enums.PurchaseError)
local RequestSubscriptionPurchase = require(Root.Actions.RequestSubscriptionPurchase)
local ErrorOccurred = requi... | nilq/small-lua-stack | null |
require "helpers"
local tables = {}
-- Rows with any of the following keys will be treated as possible infrastructure
local infrastructure_keys = {
'aeroway',
'amenity',
'emergency',
'highway',
'man_made',
'power',
'utility'
}
local is_infrastructure = make_check_in_list_func(infrastructu... | nilq/small-lua-stack | null |
-- take one step forward, counting escape sequences and format values.
local function utf8forward(src, ofs, steps)
while (steps > 0) do
if (ofs <= string.len(src)) then
repeat
ofs = ofs + 1;
until (ofs > string.len(src) or utf8kind( string.byte(src, ofs) ) < 2);
end
steps = steps - 1;
end
return o... | nilq/small-lua-stack | null |
local ffi=require 'ffi'
local defines = {}
function defines.register_hashdefs(mat, C)
mat.ACC_RDONLY = 0
mat.ACC_RDWR = 1
mat.FT_MAT73 = 0x0200
mat.FT_MAT5 = 0x0100
mat.FT_MAT4 = 0x0010
mat.T_UNKNOWN = 0
mat.T_INT8 = 1
mat.T_UINT8 = 2
mat.T_INT16 = 3
mat.T_UINT16 = 4
mat.T_INT32 = 5
... | nilq/small-lua-stack | null |
function ipnames.command_list(name)
local names = ""
for k, v in pairs(ipnames.whitelist) do
names = names.." "..k
end
minetest.chat_send_player(name, "All exceptions: "..names)
end
function ipnames.command_whois(name, param)
if not ipnames.data[param] then
minetest.chat_send_player(name, "The player '"..para... | nilq/small-lua-stack | null |
--
-- Created by IntelliJ IDEA.
-- User: nander
-- Date: 22-4-2017
-- Time: 11:57
-- To change this template use File | Settings | File Templates.
--
CWIDTH = 32
local heading = love.graphics.newImage("heading.png")
local texture = love.graphics.newCanvas(heading:getDimensions())
local north = love.graphics.newImage("n... | nilq/small-lua-stack | null |
--[[
--MIT License
--
--Copyright (c) 2019 manilarome
--Copyright (c) 2020 Tom Meyers
--
--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 ... | nilq/small-lua-stack | null |
local ffi = require("ffi")
local clib = ffi.load("libportf.so")
ffi.cdef[[
typedef struct {
float change;
float change_percent;
float price;
float time;
} value_t;
typedef struct {
const char *symbol;
const char *currency;
const char *display_name;
// fifty day stuff
float f... | nilq/small-lua-stack | null |
local MonoClass = mono.MonoClass
MonoClass.mt = {
__index = MonoClass,
__tostring = function(t)
return 'MonoClass '..tostring(t.id)..' "'..tostring(t.name)..'"'
end,
__lt = function(a, b)
return a.lowerName < b.lowerName
end
}
local MonoField = mono.MonoField
local MonoMethod = mono.MonoMethod
--... | nilq/small-lua-stack | null |
local chests = {};
function add (name, slot)
chests[name] = slot
return true
end
function getChests ()
return chests
end
function clear ()
chests = {}
return true
end
function remove (name)
addChest(name, nil)
return true
end
function place (name)
name = name or 'bob'
local sl... | nilq/small-lua-stack | null |
RegisterNUICallback('youtube_Play', function(data)
exports["xsound"]:Cal(data, false)
end)
RegisterNUICallback('youtube_Pause', function()
exports["xsound"]:Duraklat()
end)
RegisterNUICallback('youtube_Stop', function()
exports["xsound"]:Durdur()
end)
RegisterNUICallback('youtube_Resume', function()
... | nilq/small-lua-stack | null |
local iup = require "iuplua"
local blk = iup.canvas{bgcolor="0 0 0"}
local vsx, vsy, vsw, vsh = string.match(
iup.GetGlobal"VIRTUALSCREEN",
"^(%-?%d*) (%-?%d*) (%-?%d*) (%-?%d*)$")
local dlg = iup.dialog{
TOPMOST="YES",
MAXBOX="NO", MINBOX="NO",
MENUBOX="NO",
RESIZE="NO",
BORDER="NO",
shrink="yes",
... | nilq/small-lua-stack | null |
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')
ENT.WireDebugName = "XYZBeacon"
local MODEL = Model("models/jaanus/wiretool/wiretool_range.mdl")
function ENT:Initialize()
self:SetModel( MODEL )
self:PhysicsInit( SOLID_VPHYSICS )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSol... | nilq/small-lua-stack | null |
RegisterNetEvent('DP_Inventory:openLockerInventory')
AddEventHandler('DP_Inventory:openLockerInventory', function(data)
setPropertyLockerData(data)
openLockerInventory()
end)
function refreshPropertyLockerInventory()
ESX.TriggerServerCallback('DP_Inventory:getLockerInventory', function(inventory)
setPropertyLo... | nilq/small-lua-stack | null |
--- L2DF engine.
-- @module l2df
-- @author Abelidze
-- @author Kasai
-- @copyright Atom-TM 2020
l2df = require((...) .. '.core')
local love = _G.love
local math = _G.math
local floor = math.floor
local core = l2df
local log = core.import 'class.logger'
local Entity = core.import 'class.entity'
local Factory = c... | nilq/small-lua-stack | null |
-- RenderDrawLists is based on love-imgui (https://github.com/slages/love-imgui)
local path = (...):gsub("[^%.]*$", "")
local M = require(path .. "master")
local ffi = require("ffi")
local bit = require("bit")
local C = M.C
local vertexformat = {
{"VertexPosition", "float", 2},
{"VertexTexCoord", "float", 2}... | nilq/small-lua-stack | null |
local ztimer = require "lzmq.timer"
local writer = require "log.writer.async.zmq".new('inproc://async.logger',
string.dump(function()
local Log = require "log"
Log.add_cleanup(function()
require "lzmq.timer".sleep(5000)
print "Done!"
os.exit(0)
end)
return require"log.writer.stdout"... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Yuhtunga Jungle
-- NPC: Peddlestox
-- !pos -103.286 0.6 434.866 123
-- Active on WINDSDAY in this zone. To test on off-days, setStatus(tpz.status.NORMAL)
-----------------------------------
local ID = require("scripts/zones/Yuhtunga_Jungle/IDs")
require("scripts/globals/bea... | nilq/small-lua-stack | null |
--- MAC address handling object.
-- depends on LuaJIT's 64-bit capabilities,
-- both for numbers and bit.* library
local bit = require "bit"
local ffi = require "ffi"
local mac_t = ffi.typeof('union { int64_t bits; uint8_t bytes[6];}')
local mac_mt = {}
mac_mt.__index = mac_mt
function mac_mt:new (m)
if ffi.istype... | nilq/small-lua-stack | null |
repeat
local v, w = 0
print(w, v)
until x < 100
| nilq/small-lua-stack | null |
--* Key Class
local Key = {}
Key.__index = Key
function Key:new(time, ...)
local key = {
k = {...},
time = time,
wait = 0
}
setmetatable(key, self)
function key:press()
if self.wait <= 0 then
if love.keyboard.isDown(unpack(self.k)) then
self.... | nilq/small-lua-stack | null |
local env = require("foxcaves.env")
local revision = require("foxcaves.revision")
local sentry_enabled = not not require("foxcaves.config").sentry.dsn
R.register_route("/api/v1/system/info", "GET", R.make_route_opts_anon(), function()
return {
environment = env,
release = revision.hash,
... | nilq/small-lua-stack | null |
----------------------------------------------------------------------------------
--- Total RP 3
--- Register cursor
--- Implements right-click on a player in the 3D world to open their profile
--- ---------------------------------------------------------------------------
--- Copyright 2014-2019 Renaud "Ellypse" Pari... | nilq/small-lua-stack | null |
local gainer = require 'gainer'
---
-- Simple example that prints version number of firmware on gainer device.
local board = gainer.new()
local function setup()
board:init(nil, 0) -- Firmware version can be only checked in configuration 0
print("Firmware version: ", board:getVersion())
end
local function loop()... | nilq/small-lua-stack | null |
SvFishing = {
Stats = {},
GivePlayerItem = function(source, item, amount)
local player = SvFishingPlayer.new(source)
player:SendMessage("Congrats! You caught a" .. item)
end,
SetLureHandler = function(source, lure)
local player = SvFishingPlayer.new(source)
player:EquipLu... | nilq/small-lua-stack | null |
local export = require('export')
local path = require('path')
local premake = require('premake')
local tree = require('tree')
local xml = require('xml')
local vstudio = select(1, ...)
local vcxproj = vstudio.vcxproj
local esc = xml.escape
local wl = export.writeLine
local filters = {}
---
-- Element lists describe... | nilq/small-lua-stack | null |
AddCSLuaFile("shared.lua")
AddCSLuaFile("cl_init.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel("models/metrostroi/signals/mus/box.mdl")
Metrostroi.DropToFloor(self)
-- Initial state of the switch
self.AlternateTrack = false
self.InhibitSwitching = false
self.LastSignalTime = 0
... | nilq/small-lua-stack | null |
if vim.b.did_ftp == true then
return
end
vim.opt_local.cursorline = true
vim.opt_local.cursorcolumn = false
vim.opt_local.number = false
vim.opt_local.relativenumber = false
vim.opt_local.statusline = ""
vim.o.laststatus = 0
| nilq/small-lua-stack | null |
local ObjectManager = require("managers.object.object_manager")
local QuestManager = require("managers.quest.quest_manager")
FsPhase2 = ScreenPlay:new {}
function FsPhase2:onLoggedIn(pPlayer)
local currentPhase = VillageJediManagerTownship:getCurrentPhase()
if (currentPhase == 2 and VillageJediManagerCommon.hasAct... | nilq/small-lua-stack | null |
object_tangible_furniture_house_cleanup_xeno_table = object_tangible_furniture_house_cleanup_shared_xeno_table:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_house_cleanup_xeno_table, "object/tangible/furniture/house_cleanup/xeno_table.iff")
| nilq/small-lua-stack | null |
local status_ok, null_ls = pcall(require, "null-ls")
if not status_ok then
return
end
local constants = require("core/constants")
local formatting = null_ls.builtins.formatting
local diagnostics = null_ls.builtins.diagnostics
null_ls.setup({
debug = false,
sources = {
-- HTML, CSS, JS, TS, Markdo... | nilq/small-lua-stack | null |
local _, ns = ...
local B, C, L, DB, P = unpack(ns)
local M = P:GetModule("Misc")
local LSP = LibStub("LibShowUIPanel-1.0")
local ShowUIPanel = LSP.ShowUIPanel
local HideUIPanel = LSP.HideUIPanel
local MAX_NUM_TALENT_TIERS = _G.MAX_NUM_TALENT_TIERS or 10
local NUM_TALENT_COLUMNS = _G.NUM_TALENT_COLUMNS or 4
local MAX... | nilq/small-lua-stack | null |
data:extend(
{
{
type = "item-subgroup",
name = "uranium-fuel-dissolution", --Fuel-reprocessing stuff
group = "uranium",
order = "f",
},
{
type = "item-subgroup",
name = "uranium-fuel-reprocessing", --Fuel-reprocessing stuff
group = "uranium",
order = "g",
},
{
type = "item-subgroup",
name = "u... | nilq/small-lua-stack | null |
local ffi = require 'ffi'
local qconsts = require 'Q/UTILS/lua/q_consts'
local cmem = require 'libcmem'
local Scalar = require 'libsclr'
local Dnn = require 'libdnn'
local register_type = require 'Q/UTILS/lua/register_type'
local qc = require 'Q/UTILS/lua/qcore'
local get_ptr = require 'Q/UTILS/lua/get_p... | nilq/small-lua-stack | null |
--[[
Pong
"Low-Res update"
-- Main Program --
]]
-- push is a library that will allow us to draw our game at a virtual
-- resolution, instead of however large our window is; used to provide
-- a more retro aesthetic
--
-- https://github.com/Ulydev/push
push = require 'push'
WINDOW_WIDTH = 1280
WINDOW_HEIGHT... | nilq/small-lua-stack | null |
local ffi = require "ffi"
local ffi_new = ffi.new
local ffi_str = ffi.string
local ffi_cdef = ffi.cdef
local ffi_load = ffi.load
local ffi_typeof = ffi.typeof
local ffi_sizeof = ffi.sizeof
local tonumber = tonumber
local assert = assert
local upper = string.upper
local type = type
ffi_cdef [[
typedef uint16_t utf16_t;
... | nilq/small-lua-stack | null |
--- === hs.speech ===
---
--- This module provides access to the Speech Synthesizer component of OS X.
---
--- The speech synthesizer functions and methods provide access to OS X's Text-To-Speech capabilities and facilitates generating speech output both to the currently active audio device and to an AIFF file.
---
---... | nilq/small-lua-stack | null |
MaskedNoiseModule = {}
setmetatable(MaskedNoiseModule, { __index = Module })
function MaskedNoiseModule:new(multiplier, mask_min_threshold, mask_max_threshold, smooth)
local instance = Module:new()
instance.noise = nil
instance.noise_mask = nil
instance.map = nil
instance.map_mask = nil
instance.param_mask... | nilq/small-lua-stack | null |
-- data/maps/forward.lua : Learn to go forward
local Map = {
size = {
width = 13,
height = 11,
},
components = {
'wall',
'box_closed',
'grass',
'exit',
},
data = {
{ 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 },
{ 1, 3, 3, 3, 3, 3, 3, 3, 3,... | 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.