content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
--[[
MIT License
Copyright (c) 2020 DekuJuice
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, d... | nilq/small-lua-stack | null |
--------------------------------------------------------------------------
-- Moonshine - a Lua virtual machine.
--
-- Email: moonshine@gamesys.co.uk
-- http://moonshinejs.org
--
-- Copyright (c) 2013-2015 Gamesys Limited. All rights reserved.
--
-- Permission is hereby granted, free of charge, to any person obtaining
... | nilq/small-lua-stack | null |
----------------------------------------
--
-- Copyright (c) 2015, Hadriel Kaplan
--
-- author: Hadriel Kaplan <hadrielk@yahoo.com>
--
-- This code is licensed under the MIT license.
--
-- Version: 1.0
--
------------------------------------------
-- prevent wireshark loading this file as a plugin
if not _G['pcapng_te... | nilq/small-lua-stack | null |
local validateBoolean = require('reactor.propTypes.boolean')
describe('boolean', function()
describe('behaviour', function()
it('returns a validator function to use for validation', function()
expect(type(validateBoolean()))
.to.be('function')
end)
it('returns true if the supplied value to... | nilq/small-lua-stack | null |
local transform;
local gameObject;
GameWorldPanel = {};
local this = GameWorldPanel;
--启动事件--
function GameWorldPanel.Awake(obj)
gameObject = obj;
transform = obj.transform;
this.InitPanel();
logWarn("Awake lua--->>"..gameObject.name);
end
--初始化面板--
function GameWorldPanel.InitPanel()
this.btnSend = transform... | nilq/small-lua-stack | null |
local t = Def.ActorFrame {
LoadActor( "Yellow Go Receptor" )..{
InitCommand=NOTESKIN:GetMetricA('ReceptorArrow', 'InitCommand');
NoneCommand=NOTESKIN:GetMetricA('ReceptorArrow', 'NoneCommand');
};
LoadActor( "Yellow Go Receptor" )..{
InitCommand=NOTESKIN:GetMetricA('ReceptorOverlay', 'InitCommand');
PressCom... | nilq/small-lua-stack | null |
Particles = { }
-- private variables
local particlesWindow
local particlesButton
-- private functions
local function onExtendedParticles(protocol, opcode, buffer)
end
-- public functions
function Particles.init()
particlesWindow = g_ui.displayUI('particles.otui')
particlesButton = TopMenu.addLeftButton('particl... | nilq/small-lua-stack | null |
--[[
Logging Module
Writes logs to output and to the file stream
]]
local lib
local config
local logging
logging = {
history = {},
write = function(self, ...)
local out = table.concat({...}, " ")
if (config.history) then
self.history[#self.history + 1] = out
end
if (config.realtime) then
self:repor... | nilq/small-lua-stack | null |
function dgsCreateSVG(...)
local svg
if select("#",...) == 1 then
local pathOrRaw = ...
if not(type(pathOrRaw) == "number") then error(dgsGenAsrt(pathOrRaw,"dgsCreateSVG",1,"string")) end
svg = svgCreate(pathOrRaw)
else
local w,h = ...
if not(type(w) == "number") then error(dgsGenAsrt(w,"dgsCreateSVG",1,"n... | nilq/small-lua-stack | null |
--
-- Copyright (c) 2018 Milos Tosic. All rights reserved.
-- License: http://www.opensource.org/licenses/BSD-2-Clause
--
-- Based on Qt4 build script from Kyle Hendricks <kyle.hendricks@gentex.com>
-- and Josh Lareau <joshua.lareau@gentex.com>
--
qt = {}
qt.version = "6" -- default Qt version
RTM_QT_FILES_PATH_MOC ... | nilq/small-lua-stack | null |
-- #######################################
-- ## Project: MTA iLife ##
-- ## Name: ModelLoader.lua ##
-- ## Author: Noneatme ##
-- ## Version: 1.0 ##
-- ## License: See top Folder ##
-- #######################################
-- FUNCTIONS / METHODS --
local cFunc = {}; -- Local Functions
local cSetti... | nilq/small-lua-stack | null |
local M = {}
local options = {
size = 80,
type = 0
}
local function setup(opts, ifNotExists)
if not opts then
return
end
if type(opts) ~= "table" then
print("WARNING program.nvim - setup.terminal")
print("'terminal' needs to be a table")
return
end
if option... | nilq/small-lua-stack | null |
local PLUGIN = PLUGIN
PLUGIN.name = "World Item Spawner"
PLUGIN.author = "Black Tea (NS 1.0), Neon (NS 1.1)"
PLUGIN.desc = "World Item Spawner."
PLUGIN.itempoints = PLUGIN.itempoints or {}
PLUGIN.spawngroups = { -- Example is based on HL2RP items.
["ore"] = {
{"ore"},
}
}
PLUGIN.spawnrate = 30
PLUGIN.maxitems = 5... | nilq/small-lua-stack | null |
------------------------------------------------------------------------------
-- DynASM s390x module.
--
-- Copyright (C) 2005-2017 Mike Pall. All rights reserved.
-- See dynasm.lua for full copyright notice.
------------------------------------------------------------------------------
-- Module information:
local _... | nilq/small-lua-stack | null |
---@type Plugin
local mode = ...
mode.name = 'Raw Test'
mode.author = 'jdb'
mode.description = 'An empty world where anything is possible.'
local mapName
function mode.onEnable ()
mapName = 'versus2'
server:reset()
end
function mode.onDisable ()
mapName = nil
end
function mode.hooks.ResetGame ()
server.type = 2... | nilq/small-lua-stack | null |
require("Menu/settings.lua")
require("Menu/MainMenu/mainMenuStyle.lua")
require("Game/mapInfo.lua")
--this = SceneNode()
function destroy()
if form then
form:setVisible(false)
form:destroy()
form = nil
end
end
function hideForm()
run = false
end
function next(panel)
if tutorialIndex == #tut... | nilq/small-lua-stack | null |
local CudnnGetStatesWrapper, nnContainer = torch.class('znn.CudnnGetStatesWrapper', 'nn.Container')
function CudnnGetStatesWrapper:__init(rnn)
nnContainer.__init(self)
self.modules = {rnn}
self.output = {}
end
function CudnnGetStatesWrapper:updateOutput(input)
local rnn = self.modules[1]
local pr... | nilq/small-lua-stack | null |
local server = require "nvim-lsp-installer.server"
local path = require "nvim-lsp-installer.path"
local std = require "nvim-lsp-installer.installers.std"
local context = require "nvim-lsp-installer.installers.context"
return function(name, root_dir)
return server.Server:new {
name = name,
root_dir ... | nilq/small-lua-stack | null |
local conf = require "config"
local ssh = require "utils.ffi.ssh"
local mod = {}
mod.__index = mod
local session = nil
function mod.addInterfaceIP(interface, ip, pfx)
return mod.exec("ip addr add " .. ip .. "/" .. pfx .. " dev " .. interface)
end
function mod.delInterfaceIP(interface, ip, pfx)
return mo... | nilq/small-lua-stack | null |
local PANEL = {}
function PANEL:Init()
if (IsValid(nut.gui.stoveinv)) then
nut.gui.stoveinv:Remove()
end
nut.gui.stoveinv = self
self:SetSize(64, 64)
self:setGridSize(nut.config.get("invW"), nut.config.get("invH"))
self.panels = {}
local created = {}
if (LocalPlayer():getChar() and LocalPlayer():getCha... | nilq/small-lua-stack | null |
-----------------------------------------------------
--name : lib/qui.lua
--description: qui - quick user interface - create UIs from strings
--author : mpmxyz
--github page: https://github.com/mpmxyz/ocprograms
--forum page : http://oc.cil.li/index.php?/topic/
-----------------------------------------------... | nilq/small-lua-stack | null |
local gamera = require "libs/gamera"
local Camera = Point:extend()
function Camera:new(x, y, w, h)
Camera.super.new(self)
self.cam = gamera.new(x, y, w, h)
self.follow = Mouse
self.followLock = true
self.followSpeed = 5
self.basedOnDistance = true
self.velocity = Point()
self.rotate = false
self.rotateLo... | nilq/small-lua-stack | null |
if file.Exists('sv_resourcecontrol.json', 'DATA') then
local workshop = util.JSONToTable(file.Read('sv_resourcecontrol.json'))
for i,v in pairs(workshop) do
resource.AddWorkshop( v )
end
end
hook.Add('TTS:AuthServer', 'TTS.ResourceControl', function()
local srvId = TTS.Config.Server.id_name
Resource... | nilq/small-lua-stack | null |
if GetBot():IsInvulnerable() or not GetBot():IsHero() or not string.find(GetBot():GetUnitName(), "hero") or GetBot():IsIllusion() then
return;
end
local ability_item_usage_generic = dofile( GetScriptDirectory().."/ability_item_usage_generic" )
local utils = require(GetScriptDirectory() .. "/util")
local mutil = re... | nilq/small-lua-stack | null |
ngx.header.content_type='text/html'
ngx.status=404
ngx.print([[<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover">
<title>40... | nilq/small-lua-stack | null |
--[[
This file is part of cvetool. It is subject to the licence terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/libertine-linux/cvetool/master/COPYRIGHT. No part of cvetool, including this file, may be copied, modified, propagated, or distribute... | nilq/small-lua-stack | null |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf"
module('BseHallUserList_pb', package.seeall)
local BSEHALLUSERLIST = protobuf.Descriptor();
local BSEHALLUSERLIST_USERID_FIELD = protobuf.FieldDescriptor();
local BSEHALLUSERLIST_NAME_FIELD = protobuf.FieldDescriptor();
local BSEHALLUSERLI... | nilq/small-lua-stack | null |
local utils = require 'mp.utils'
local msg = require 'mp.msg'
local function exec(args)
local ret = utils.subprocess({args = args, cancellable=false})
return ret.status, ret.stdout, ret, ret.killed_by_us
end
mp.register_script_message("generate-pdf-page", function(url, density, quality)
local input = str... | nilq/small-lua-stack | null |
---------------------------------------------------------------------------
-- Tracking Noise channel volume peaks
-- by AnS, 2012
---------------------------------------------------------------------------
-- Showcases following functions:
-- * sound.get()
-- * taseditor.markedframe()
-- * taseditor.getmarker()... | nilq/small-lua-stack | null |
--[[
desc: Bullet, a basic bullet.
author: Musoucrow
since: 2018-8-7
alter: 2019-6-26
]]--
local _RESMGR = require("actor.resmgr")
---@class Actor.Component.Bullet
---@field attackData Actor.RESMGR.AttackData
---@field moveTweener Util.Gear.Tweener
---@field length int
---@field time milli
---@field attackValue A... | nilq/small-lua-stack | null |
#!/usr/bin/env lua
local gumbo = require "gumbo"
local serialize = require "gumbo.serialize.html"
local outfile = arg[2] and assert(io.open(arg[2], "a")) or io.stdout
local tree = assert(gumbo.parseFile(arg[1] ~= "-" and arg[1] or io.stdin))
serialize(tree, outfile)
| 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_SWEDISH = Clockwork.lang:GetTable("Swedish");
CW_SWEDISH["DynamicAdvertRemoved... | nilq/small-lua-stack | null |
require "import"
import "android.widget.*"
import "android.view.*"
import "android.app.*"
local classes=require "android"
import "clayout"
import "mlayout"
import "autotheme"
activity.Title="Java API浏览器"
activity.setTheme(autotheme())
function adapter(t)
local ls=ArrayList()
for k,v in ipairs(t) do
ls.add(v)
... | nilq/small-lua-stack | null |
-- Copyright 2019 - present Xlab
--
-- 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 ... | nilq/small-lua-stack | null |
local EnemyAISystem = class("EnemyAISystem", System)
local Actions = require "systems/ai/Actions"
local Prerequisites = require "systems/ai/Prerequisites"
function EnemyAISystem:update(dt)
local player = nil
-- get first player
for _, p in pairs(self.targets.Player) do
player = p
break
end
-- contin... | nilq/small-lua-stack | null |
--[[**********************************
*
* Multi Theft Auto - Admin Panel
*
* server/admin_storage.lua
*
* Original File by lil_Toady
*
**************************************]]
function aSetupStorage()
--local query = db.query ( "SELECT name FROM sqlite_master WHERE name='admin_alias'" )
db.exec("C... | nilq/small-lua-stack | null |
entitytooltip = class:new()
local theight = 64
local twidth = 64
local descwidth = 0
twidth = twidth + descwidth*8
function entitytooltip:init(ent)
self.ent = ent
if tooltipimages[self.ent] then
if not tooltipimages[self.ent].image then
tooltipimages[self.ent].image = love.graphics.newImage(tooltipimages[self.... | nilq/small-lua-stack | null |
---@type Rect
local Rect = require('lib.stdlib.oop._generated._rect')
local Vector = require('lib.stdlib.oop.vector')
local Native = require('lib.stdlib.native.native')
---<static> create
---@overload fun(min: Vector, max: Vector): Rect
---@param minx float
---@param miny float
---@param maxx float
---@param maxy floa... | nilq/small-lua-stack | null |
-----------------------------------------
-- INFORMATION
-----------------------------------------
--[[
These functions get added to all UiWidgets. Weee
Changing a font to bold doesn't update itself unless the size of the font is changed too.
So call SetBold before SetFontSize
--]]
----------------------... | nilq/small-lua-stack | null |
local CorePackages = game:GetService("CorePackages")
local Roact = require(CorePackages.Roact)
local RoactRodux = require(CorePackages.RoactRodux)
local Components = script.Parent
local EmotesMenu = Components.Parent
local Constants = require(EmotesMenu.Constants)
local SlotNumbers = Roact.PureComponent:extend("Slo... | nilq/small-lua-stack | null |
local server = require "nvim-lsp-installer.server"
local path = require "nvim-lsp-installer.path"
local shell = require "nvim-lsp-installer.installers.shell"
local root_dir = server.get_server_root_path "groovyls"
return server.Server:new {
name = "groovyls",
root_dir = root_dir,
pre_install_check = funct... | nilq/small-lua-stack | null |
local on_attach = require('lsp.on_attach')
local lspconfig = require('lspconfig')
local capabilities = require('cmp_nvim_lsp').update_capabilities(
vim.lsp.protocol.make_client_capabilities()
)
capabilities.textDocument.completion.completionItem.snippetSupport = true
capabilities.textDocument.completion.completionI... | nilq/small-lua-stack | null |
-- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008-2015 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local uci = require "luci.model.uci".cursor()
local bit = require "nixio".bit
local ip = require "luci.ip"
-------------------- Init -------------------... | nilq/small-lua-stack | null |
-- URI
-- RFC 3986
local lpeg = require "lpeg"
local P = lpeg.P
local S = lpeg.S
local C = lpeg.C
local Cc = lpeg.Cc
local Cg = lpeg.Cg
local Cs = lpeg.Cs
local Ct = lpeg.Ct
local util = require "lpeg_patterns.util"
local core = require "lpeg_patterns.core"
local ALPHA = core.ALPHA
local DIGIT = core.DIGIT
local HEX... | nilq/small-lua-stack | null |
--[[
Copyright (C) 2018 "IoT.bzh"
Author Arthur Guyader <arthur.guyader@iot.bzh>
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.... | nilq/small-lua-stack | null |
-- This file is automatically generated, do not edit!
-- Item data (c) Grinding Gear Games
return {
["ChaosResistJewelCorrupted"] = { type = "Corrupted", affix = "", "+(1-3)% to Chaos Resistance", statOrderKey = "1235", statOrder = { 1235 }, level = 1, group = "ChaosResistance", weightKey = { "jewel", "default", }, w... | nilq/small-lua-stack | null |
local m = require 'model_helpers'
local defaults = require 'models.default_middleware_specs'
-- local MiddlewareSpec = {}
-- local collection = 'middleware_specs'
local Model = require 'model'
local MiddlewareSpec = Model:new()
MiddlewareSpec.collection = 'middleware_specs'
MiddlewareSpec.excluded_fiels_to_in... | nilq/small-lua-stack | null |
if (SERVER) then
AddCSLuaFile()
end
--AKS-74U
sound.Add({
name="Weapon_AKS74U.Single",
volume = 1.0,
pitch = {100,105},
sound = "weapons/aks74u/AKS_fp.wav",
level = 160,
channel = CHAN_STATIC
})
sound.Add({
name="Weapon_AKS74U.SingleSilenced",
volume = 1.0,
pitch = {100,105},
sound = "weapons/aks74u/AKS_supp... | nilq/small-lua-stack | null |
#!/usr/local/bin/lua
--
--------------------------------------------------------------------------------
-- File: t_ex03.lua
--
-- Usage: src/t_ex03.lua
--
-- Description:
--
-- Options: ---
-- Requirements: ---
-- Bugs: ---
-- Notes: ---
-- Author: YOUR NAME (), <>
--... | nilq/small-lua-stack | null |
--------------------------------------------------------------------
---FSM
require 'mock.ai.FSMScheme'
require 'mock.ai.FSMController'
require 'mock.ai.ScriptedFSMController'
--------------------------------------------------------------------
---- Behaviour Tree
require 'mock.ai.BTScheme'
require 'mock.ai.BTScript'
... | nilq/small-lua-stack | null |
-- Including the Advanced NPC System
dofile('data/npc/lib/npcsystem/npcsystem.lua')
dofile('data/npc/lib/npcsystem/customModules.lua')
isPlayerPremiumCallback = Player.isPremium
function msgcontains(message, keyword)
local message, keyword = message:lower(), keyword:lower()
if message == keyword then
return true
... | nilq/small-lua-stack | null |
-- tests stdnet.apps.columnts.lua internal functions
local t = require("tabletools")
local stats = require("columnts/stats")
local function series_for_test ()
-- TEST MULTI SERIES AGGREGATION
local serie1 = {key='first',
times={1001,1002,1003,1004},
field_values=... | nilq/small-lua-stack | null |
local K, C, L = unpack(select(2, ...))
local Module = K:GetModule("Infobar")
local _G = _G
local math_max = _G.math.max
local string_format = _G.string.format
local GetAvailableBandwidth = _G.GetAvailableBandwidth
local GetBackgroundLoadingStatus = _G.GetBackgroundLoadingStatus
local GetCVarBool = _G.GetCVarBool
loca... | nilq/small-lua-stack | null |
function benchmark_median(path, samples, func)
local result = {}
for n=1, samples do
t1 = os.clock()
func()
t = os.clock() - t1
table.insert(result, n, t)
end
local median;
table.sort(result)
-- output results
f = io.open(path, "w")
for n=1, samples do
f:write(string.format("%f"... | nilq/small-lua-stack | null |
local awful = require("awful")
require("awful.autofocus")
local beautiful = require("beautiful")
local gears = require("gears")
beautiful.useless_gap = 7
beautiful.bg_normal = "#090A0F60"
beautiful.bg_focus = "#090A0F90"
beautiful.bg_urgent = "#090A0F00"
beautiful.bg_minimize = "#AAAAAA80"
beautiful.... | nilq/small-lua-stack | null |
local const = require("druid.const")
local component = require("druid.component")
local M = component.create("pin", { const.ON_INPUT })
local SCHEME = {
ROOT = "root",
PIN = "pin",
}
local function update_visual(self)
local rotation = vmath.vector3(0, 0, self.angle)
gui.set_rotation(self.node, rotation)
end
l... | nilq/small-lua-stack | null |
--[[
author:{JanRoid}
time:2018-12-04
Description: 自定义全局方法
]]
local funs = {}
--[[
@desc: 添加get,set方法
author:{JanRoid}
time:2018-12-04 11:21:47
--@object: 类 or 表
--@varName: 属性名称(自动生成getVerName,setVerName方法)
--@defaultValue: 默认值
--@createGetter: 创建get方法,默认创建
--@createSetter: 创建set方法,... | nilq/small-lua-stack | null |
function AddIntellect(keys)
local caster = keys.caster
local ability = keys.ability
if not ability.currentStacks then
ability.currentStacks = 0
end
ability.currentStacks = ability.currentStacks+1
caster:ModifyAgility(ability:GetSpecialValueFor("bonus_agi"))
caster:CalculateStatBonus()
caster:SetModifie... | nilq/small-lua-stack | null |
----------------------------------------------------------------------------------
--- Total RP 3
--- Target widget module
--- ---------------------------------------------------------------------------
--- Copyright 2014 Sylvain Cossement (telkostrasz@telkostrasz.be)
--- Copyright 2014-2019 Renaud "Ellypse" Parize <el... | nilq/small-lua-stack | null |
do
local table = table
local meta = { __index = table}
-- give tables metatable access to the table library
function table.new(t)
t = t or { }
setmetatable(t, meta)
return t
end
function table:imap(fn)
local iter, a, s = ipairs(self)
local closure = func... | nilq/small-lua-stack | null |
function initVariables()
w,h =term.getSize() -- 51, 19
shipYPos = 10
shipXPos = 24
shipFacingRight=true
pressedKey=0
killedState = false
lives=3
score =0
aliens=10
killedDelay=0
running=true
moveLeft=false
moveRight=true
moveUp=false
moveDown=false
human1x = 3
human1y = 18
human2x = 15
human2y = 18... | nilq/small-lua-stack | null |
require 'src/Dependencies'
-- current font being used
currFont = fonts["skia"]
velY = 0 -- scrolling text velocity
function love.load()
-- threas are used to isolate tasking things
thread = love.thread.newThread("save_thread.lua")
channel = love.thread.newChannel()
love.graphics.setDefaultFilter('ne... | nilq/small-lua-stack | null |
local Astar = require("astar")
local Snake
do
local _class_0
local _base_0 = {
generate_snake_from_map_image_data = function(self, mapImageData)
local snake = { }
local direction = { }
local w, h = mapImageData:getDimensions()
local startingPoint = { }
for i = 0, (w - 1) do
... | nilq/small-lua-stack | null |
require "turtle"
local f=0.5 -- how much shorter the next tree should be
local a=60 -- what angle to use to turn the branches
function tree(d, n) -- distance to grow, level for recursion
if n == 0 then return end
local width = pnsz(n) -- set pen size; save current value
local color = pncl(colr(127,(8-n)*32,0... | nilq/small-lua-stack | null |
--
local M = {}
---@class mx.attribute.AttrScope
local AttrScope = class('mx.attribute.AttrScope')
M.AttrScope = AttrScope
function AttrScope:ctor(kwargs)
kwargs = default(kwargs, {})
self._old_scope = nil
for _, value in ipairs(table.values(kwargs)) do
if not type(value) == 'string' then
... | nilq/small-lua-stack | null |
--[=[ scSuite
by SavageCore
]=]--
SCSuiteConfiguration = SCSuiteConfiguration or class()
require("SCSuite/Localisation.lua")
function SCSuiteConfiguration:init()
self.mute_bain_enabled = true
self.mute_bain_broadcast_toggle = true
self.mute_bain_blacklist = {
"alex_1", -- Rats Day 1
--"alex... | nilq/small-lua-stack | null |
local ffi = require("ffi")
require "lj2intelxed.xed-decoded-inst.h"
require "lj2intelxed.xed-error-enum.h"
require "lj2intelxed.xed-chip-features.h"
--[[
/// This is the main interface to the decoder.
/// @param xedd the decoded instruction of type #xed_decoded_inst_t . Mode/state sent in via xedd; See the #xed_st... | nilq/small-lua-stack | null |
local M = {}
local lib = {}
-- font {name = '', path = ''}
function M.register(font)
lib[#lib + 1] = font
end
function M.resolve(name)
if not name then
return assert(lib[1], 'no default font')
else
for _, font in ipairs(lib) do
if string.find(font.name, name) then
... | nilq/small-lua-stack | null |
-- Generated by CSharp.lua Compiler
local System = System
local SlipeServerAccounts
local SlipeServerPeds
local SlipeSharedElements
System.import(function (out)
SlipeServerAccounts = Slipe.Server.Accounts
SlipeServerPeds = Slipe.Server.Peds
SlipeSharedElements = Slipe.Shared.Elements
end)
System.namespace("Slipe.... | nilq/small-lua-stack | null |
local K, C, L, _ = select(2, ...):unpack()
local collectgarbage = collectgarbage
local UnitIsAFK = UnitIsAFK
local CreateFrame = CreateFrame
local InCombatLockdown = InCombatLockdown
local Garbage = CreateFrame("Frame")
local eventcount = 0
function Garbage:OnEvent(event, unit)
eventcount = eventcount + 1
if InCom... | nilq/small-lua-stack | null |
require('level')
local function gnome_stat_gain_fn(creature_id, level)
local is_pl = is_player(creature_id)
local stat = RNG_range(1, 3)
if level % 7 == 0 then
if stat == 1 then
incr_int(creature_id, is_pl)
elseif stat == 2 then
incr_wil(creature_id, is_pl)
else
incr_agi(creature_i... | nilq/small-lua-stack | null |
function love.load(args)
loveframes = require("lib.loveframes")
require('modules.images')
local Ship = require('modules.ship')
ship = Ship:new(love.window.getWidth() / 2, love.window.getHeight() / 2)
local Asteroid = require('modules.asteroid')
asteroid = Asteroid:new(512, 512, 16)
end
function love.update(... | nilq/small-lua-stack | null |
local Config = {}
local Camera = require("scripts.camera")
local Tracker = require("scripts.tracker")
--- (re)loads the mod settings and initializes player settings if needed
function Config.reload(event)
if event.player_index == nil then
-- The reload was not caused by a player (but a script)
ret... | nilq/small-lua-stack | null |
Locales['nl'] = {
['mechanic'] = 'monteur',
['drive_to_indicated'] = '~y~Rij~s~ naar de aangegeven locatie',
['mission_canceled'] = 'opdracht ~r~Geannuleerd~s~',
['vehicle_list'] = 'voertuigenlijst',
['work_wear'] = 'werk kleding',
['civ_wear'] ... | nilq/small-lua-stack | null |
--[[
A biome map (bm_*) collects a group of biomes from biome definition files (could be all from the
same or could be from different ones) and decides how to map them to the world surface.
A biome map provides a list of biomes, and a biome function that maps those biomes to the surface.
There are two primary biome ma... | nilq/small-lua-stack | null |
local class = require 'middleclass'
local Object = class.Object
describe('Object', function()
describe('name', function()
it('is correctly set', function()
assert.equal(Object.name, 'Object')
end)
end)
describe('tostring', function()
it('returns "class Object"', function()
assert.equal... | nilq/small-lua-stack | null |
Mesh = "mge/models/GenTile.obj" --Add path to the model.
Texture = "mge/textures/GenTile.png" --Add path to the texture.
--Specific Tile Coding will go here.
Textures = {
"mge/textures/GenTile-Darker.png",
"mge/textures/GenTile-Gradient.png",
"mge/textures/GenTile.png"
}
TileSize = 1 | nilq/small-lua-stack | null |
local light_detector_handler = {}
light_detector_handler.__index = light_detector_handler
setmetatable(light_detector_handler, {
__call = function (cls, ...)
return cls.new(...)
end,
})
function light_detector_handler.new(node, callback)
local self = setmetatable({}, light_detector_handler)
se... | nilq/small-lua-stack | null |
workspace "ETOD"
architecture "x64"
configurations
{
"Debug",
"Release",
"Dist"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
-- Include directories relative to root folder (solution directory)
IncludeDir = {}
IncludeDir["GLFW"] = "ETOD/vendor/GLFW/include"
IncludeDir["Gl... | nilq/small-lua-stack | null |
-----------------------------------------
-- ID: 15793
-- Item: Anniversary Ring
-- Experience point bonus
-----------------------------------------
-- Bonus: +100%
-- Duration: 720 min
-- Max bonus: 3000 exp
-----------------------------------------
require("scripts/globals/status")
-----------------------------------... | nilq/small-lua-stack | null |
return {'pfeiffer','pfeiffer','pfennings','pfeifer','pfeijffer'} | nilq/small-lua-stack | null |
local x, y
x, t[1], t.field, t[x], t[x + 4], y = 1, 2, 3, 4, 5, 6
| nilq/small-lua-stack | null |
--------------------------------------------------------------------------------
-- Handler.......... : onStatStore
-- Author........... :
-- Description...... : Commits all achievement and stat changes.
--------------------------------------------------------------------------------
------------------------------... | nilq/small-lua-stack | null |
ffi = require "ffi"
require "LDYOM.Scripts.baseNode"
class = require "LDYOM.Scripts.middleclass"
Node = bitser.registerClass(class("NodeAttachCamToCharLookChar", BaseNode));
Node.static.name = imgui.imnodes.getNodeIcon("func")..' '..ldyom.langt("CoreNodeAttachCamToCharLookChar");
Node.static.mission = true;
function... | nilq/small-lua-stack | null |
local diff = {
["keyDiffs"] = {
["d201pnilu202cdnilvdnilvpnilvunil"] = {
["name"] = "Aircraft Rudder Left",
["removed"] = {
[1] = {
["key"] = "Z",
},
},
},
["d203pnilu204cdnilvdnilvpnilvunil"] = {
["name"] = "Aircraft Rudder Right",
["removed"] = {
[1] = {
["key"] = "X",
... | nilq/small-lua-stack | null |
--[[
Multiple Line Text Input Manager
Handles input for a multiline textbox
]]
local lib, input
local text
text = {
init = function(self, engine)
lib = engine.lib
lib.oop:objectify(self)
end
}
return text | nilq/small-lua-stack | null |
--[[ Encounter - Kil'Jaeden's Death.lua
This script was written and is protected
by the GPL v2. This script was released
by BrantX 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
-- BrantX, Feb... | nilq/small-lua-stack | null |
-- Script for set teleport destination
-- /teleport xxxx, xxxx, x
local teleportSetDestination = TalkAction("/teleport")
function teleportSetDestination.onSay(player, words, param)
if not player:getGroup():getAccess() or player:getAccountType() < ACCOUNT_TYPE_GOD then
return true
end
if param == "" then
player... | nilq/small-lua-stack | null |
namespace('MemeBrowser')
local function htmlDecode(str)
local tbl = {
['lt'] = '<',
['gt'] = '>',
['quot'] = '"',
['apos'] = '\'',
['nbsp'] = ' ',
['amp'] = '&',
['oacute'] = 'ó',
}
return str:gsub('&([#%w]+);', function(s)
if (s:sub(1, 1) == '#') then
return string.char(s:sub(2))
... | nilq/small-lua-stack | null |
--====================================================================--
-- dmc_corona/dmc_websockets/exception.lua
--
-- Documentation: http://docs.davidmccuskey.com/
--====================================================================--
--[[
The MIT License (MIT)
Copyright (C) 2014-2015 David McCuskey. All Right... | nilq/small-lua-stack | null |
local ENCODER = require(script:GetCustomProperty("EncoderAPI"))
function Decode(message)
local result = ENCODER.DecodePosAndOffsetSigns(message)
for i, val in ipairs(result) do
print(tostring(i).." "..tostring(val))
end
end
Events.Connect("Message", Decode) | nilq/small-lua-stack | null |
if UseItem(127) == true then goto label0 end;
do return end;
::label0::
AddItemWithoutHint(127, -1);
Talk(35, "好一只翡翠杯!得此美酒佳器,人生更有何憾.我令狐冲先干为敬,谢谢兄弟赠酒之情.", "talkname35", 0);
PlayAnimation(3, 5722, 5748);
jyx2_PlayTimeline("[Timeline]ka238_悦来客栈_令狐冲喝酒", 0, false, "NPC/linghuchong");
jyx2_Wait(0.9);
... | nilq/small-lua-stack | null |
-- block interface
-- allows creation of block device objects
-- which are an abstraction on files
local block = {}
function block.new(image, blocksize, offset)
local bd = {}
offset = offset or 0
bd.bs = blocksize
bd.file = io.open(image, "rb+")
if not bd.file then return false end
bd.size = bd.file:seek(... | nilq/small-lua-stack | null |
-- Declare Constants
DoorOpen = 1
DoorClosed = 0
GearUp = 1
GearDown = 0
--enumerated state 'constants'
Retracted = 0
Opening = 1
Lowering = 2
ClosingDown = 3
Deployed = 4
OpeningDown = 5
Raising = 6
Closing = 7
--Output Channels
DoorChannelOut = 1
GearChannelOut = 2
-- Global Variables
--Input Channels
GearToggleCh... | nilq/small-lua-stack | null |
description = [[
Performs brute force password auditing against http form-based authentication.
]]
---
-- @usage
-- nmap --script http-form-brute -p 80 <host>
--
-- This script uses the unpwdb and brute libraries to perform password
-- guessing. Any successful guesses are stored in the nmap registry, under
-- the nmap... | nilq/small-lua-stack | null |
--- #
--- # SET USERGROUP
--- #
xAdmin.Core.RegisterCommand("setgroup", "Set a user's group", 93, function(admin, args)
if not args or not args[1] or not args[2] then return end
if not xAdmin.Groups[args[2]] then
xAdmin.Core.Msg({Color(46, 170, 200), "[xAdmin] ", Color(255, 255, 255), args[2].." is not a valid user... | nilq/small-lua-stack | null |
-- Copyright (c) 2020 Trevor Redfern
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
describe("game.rules.start_turn.pick_quests", function()
local quest = require "game.entities.quest"
local quest_db
local pick_quests = require "game.rules.start_turn.pick_qu... | nilq/small-lua-stack | null |
local au = require('au')
local u = require('util')
-- # Simple autocmd with one event: au.<event> = string | fn | { pattern: string, action: string | fn }
-- 1. If you want aucmd to fire on every buffer, you can use the style below
au.TextYankPost = function()
vim.highlight.on_yank()
end
au.BufWritePre = functi... | nilq/small-lua-stack | null |
workspace "DXR_SoftShadows"
architecture "x64"
configurations { "Debug", "Release", "Dist" }
startproject "Sandbox"
systemversion "latest"
project "BeLuEngine"
location "BeLuEngine"
kind "StaticLib"
language "C++"
pchheader "stdafx.h"
pchsource "%{prj.location}/src/Headers/stdaf... | nilq/small-lua-stack | null |
Import "Utils/FindRoute.lua"
local small_rooms = {
"A_Combat01",
"A_Combat03",
"A_Combat04",
"A_Combat05",
"A_Combat06",
"A_Combat07",
"A_Combat08A",
"A_Combat09",
"A_Combat10"
}
local c5_boon = {
ItemName = "AphroditeShoutTrait"
}
local requirements = {
Seed = { Min = 2323902, Max = 2323902 },... | 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.