content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
#! /usr/bin/env lua
require 'example'
require 'hooks'
local EVENT = require 'event'
local function main()
local trigger = EVENT.trigger
local npc = Creature("leo", 40, 40, 100);
trigger(EventType.kCreatureBorn, npc);
local player = Player("jax", 40, 70, 100, 10, 20);
trigger(EventType.kPlayerLo... | nilq/small-lua-stack | null |
local Prefs = {};
ThemePrefs.InitAll(Prefs)
function InitUserPrefs()
local Prefs = {
UserPrefScoringMode = 'DDR Extreme',
UserPrefSoundPack = 'default',
UserPrefProtimingP1 = false,
UserPrefProtimingP2 = false,
UserPrefAllowW1 = 'CoursesOnly',
}
for k, v in pairs(Prefs) do
-- kind ... | nilq/small-lua-stack | null |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('StoryBit', {
ActivationEffects = {
PlaceObj('KillColonist', nil),
},
Category = "Tick_FounderStageDone",
Effects = {},
Enabled = true,
Image = "UI/Messages/Events/10_protest.tga",
Prerequisites = {
PlaceObj('PickFromLabel', {
'La... | nilq/small-lua-stack | null |
function model.setSphereSize(h,diameter)
local r,mmin=sim.getObjectFloatParameter(h,sim.objfloatparam_objbbox_min_x)
local r,mmax=sim.getObjectFloatParameter(h,sim.objfloatparam_objbbox_max_x)
local sx=mmax-mmin
local r,mmin=sim.getObjectFloatParameter(h,sim.objfloatparam_objbbox_min_y)
local r,mmax... | nilq/small-lua-stack | null |
--[[
TheNexusAvenger
Text button that disables auto button colors when disabled.
--]]
local CLASS_NAME = "NexusTextButton"
local NexusPluginFramework = require(script.Parent.Parent.Parent:WaitForChild("NexusPluginFrameworkProject")):GetContext(script)
local NexusGuiButton = NexusPluginFramework:GetResource("UI.Inp... | nilq/small-lua-stack | null |
--
-- from src/grBMP.c
--
-- void putbytes(FILE *, int, unsigned long) to NBWriter
-- void gr_dot(int, int, long) to BMP; :dot
-- void gr_clear(long) to BMP; :clear
-- void gr_BMP(char *) to BMP; :write
--
-- from src/circle.c
--
-- void gr_circle(int, int, int, long) to BMP; :circle
--
-- from src/ellips... | nilq/small-lua-stack | null |
-- tools/init.lua
local path = microexpansion.get_module_path("tools")
-- Load In Xtremo Tools
dofile(path.."/xtremo.lua")
| nilq/small-lua-stack | null |
-- return directly when the required module cannot be loaded
local ok, gitsigns = pcall(require, "gitsigns")
if not ok then
return
end
-- configurations
-- --------------------------------------
gitsigns.setup({
signs = {
add = {hl = "GitSignsAdd" , text = "+"},
change = {hl = ... | nilq/small-lua-stack | null |
local utils = require("csharpls_extended.utils")
--local lsp_util = require 'vim.lsp.util'
--local pickers = require("telescope.pickers")
--local finders = require("telescope.finders")
--local conf = require("telescope.config").values
local M = {}
M.defolderize = function(str)
-- private static string Folderize(... | nilq/small-lua-stack | null |
-- Inofficial Nimiq Extension for MoneyMoney
-- Fetches Nimiq quantity for addresses via blockexplorer API
-- Fetches Nimiq price in EUR via coingecko API
-- Returns cryptoassets as securities
--
-- Username: Nimiq Adresses comma separated
-- MIT License
-- Copyright (c) 2018 Pascal Berrang
-- Permission is hereby g... | nilq/small-lua-stack | null |
workspace "SurvivalVoxelGame"
location "build"
configurations {
"Debug",
"Release"
}
startproject "SurvivalVoxel"
flags {
"MultiProcessorCompile"
}
filter "configurations:Debug"
defines {
"DEBUG",
"DEBUG_SHADER"
}
sym... | nilq/small-lua-stack | null |
-- Physics example.
-- This sample demonstrates:
-- - Creating both static and moving physics objects to a scene
-- - Displaying physics debug geometry
-- - Using the Skybox component for setting up an unmoving sky
-- - Saving a scene to a file and loading it to restore a previous state
require "LuaScr... | nilq/small-lua-stack | null |
testfiledir = "testfiles-dvips"
-- resultdir = builddir .. "/result/dvips"
checkengines = {"latexdvips"}
stdengine = "latexdvips"
-- ps2pdfopt = " -sDocumentUUID=DocumentUUID -sInstanceUUID=InstanceUUID -dCompressStreams=false -dCompressPages=false -dNOSAFER "
ps2pdfopt = " -dNOSAFER "
| nilq/small-lua-stack | null |
angleScale = 0.5
max_fov = 360
max_vfov = 360
onload = "f_fov 180"
function lens_inverse(x,y)
local r = sqrt(x*x+y*y)
local theta = atan(r)/angleScale
local s = sin(theta)
return x/r*s, y/r*s, cos(theta)
end
function lens_forward(x,y,z)
local theta = acos(z)
local r = tan(theta*angleScale)
l... | nilq/small-lua-stack | null |
return {
{
effect_list = {
{
type = "BattleBuffAddAttr",
trigger = {
"onAttach",
"onRemove"
},
arg_list = {
attr = "damageRatioBullet",
number = 0.15
}
}
}
},
{
effect_list = {
{
type = "BattleBuffAddAttr",
trigger = {
"onAttach",
"onRemove"
... | nilq/small-lua-stack | null |
--
-- a simple mainMenu
--
local mainMenu = {}
local Slab = require 'lib.slab'
local movieState = require("state.movie")
local nyiState = require("state.nyi")
function mainMenu:init()
print("mainMenu:init()")
love.graphics.setBackgroundColor(0, 0, 0)
Slab.SetINIStatePath(nil)
Slab.Initialize()
sel... | nilq/small-lua-stack | null |
-- "Nametag" [nametag]
-- Copyright (c) 2015 BlockMen <blockmen2015@gmail.com>
--
-- init.lua
--
-- This software is provided 'as-is', without any express or implied warranty. In no
-- event will the authors be held liable for any damages arising from the use of
-- this software.
--
-- Permission is granted to anyone t... | nilq/small-lua-stack | null |
local collision_mask_util_extended = require("__Constructron-Continued__.data.collision-mask-util-extended")
local pathing_collision_mask = {
"water-tile",
"colliding-with-tiles-only",
"not-colliding-with-itself"
}
if mods["space-exploration"] then
local spaceship_collision_layer = collision_mask_util_extended.... | nilq/small-lua-stack | null |
local http = require "http"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local openssl = require "openssl"
local ls = require "ls"
description = [[
Shows the content of an "index" Web page.
TODO:
- add support for more page formats
]]
author = "Pierre Lalet"... | nilq/small-lua-stack | null |
-----------------------------------------
-- ID: 5067
-- Scroll of Water Threnody
-- Teaches the song Water Threnody
-----------------------------------------
function onItemCheck(target)
return target:canLearnSpell(459)
end
function onItemUse(target)
target:addSpell(459)
end | nilq/small-lua-stack | null |
--Avatar frames which also includes current additive %score, mods, and the song stepsttype/difficulty.
local t = Def.ActorFrame{
Name="Avatars";
};
local bareBone = isBareBone()
local profileP1
local profileP2
local profileNameP1 = "No Profile"
local profileNameP2 = "No Profile"
local AvatarXP1 = 0
local AvatarY... | nilq/small-lua-stack | null |
local BaseService = require "kong.cli.services.base_service"
local logger = require "kong.cli.utils.logger"
local IO = require "kong.tools.io"
local Dnsmasq = BaseService:extend()
local SERVICE_NAME = "dnsmasq"
function Dnsmasq:new(configuration)
self._configuration = configuration
Dnsmasq.super.new(self, SERVIC... | nilq/small-lua-stack | null |
--接受nginx变量
local var = ngx.var
ngx.say("ngx.var.a : ", var.a, "<br/>")
ngx.say("ngx.var.b : ", var.b, "<br/>")
ngx.say("ngx.var[2] : ", var[2], "<br/>")
ngx.var.b = 2;
ngx.say("<br/>")
--请求头
local headers = ngx.req.get_headers()
ngx.say("headers begin", "<br/>")
ngx.say("Host : ", headers["Host"], "<br/>")
ngx.say(... | nilq/small-lua-stack | null |
if SERVER then
AddCSLuaFile("shared.lua")
end
if CLIENT then
SWEP.Slot = 0
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.PrintName = "Position Utility"
SWEP.DrawCrosshair = true
end
SWEP.PrintName = "Position Utility"
SWEP.AdminSpawnable = true
SWEP.Spawnable = true
SWEP.Author = "Azzen"
SWEP.In... | nilq/small-lua-stack | null |
------------
--- HTTP NG module
-- Implements HTTP client.
-- @module http_ng
--- HTTP Client
-- @type HTTP
local type = type
local unpack = unpack
local assert = assert
local tostring = tostring
local setmetatable = setmetatable
local getmetatable = getmetatable
local rawset = rawset
local upper = string.upper
local... | nilq/small-lua-stack | null |
local M = {}
local name = require("game.db.keyNameCfg")
local build_level = require("game.config.build_level")
local function getSqrtV(base,max,cv,v,vb)
if cv > max then return v+vb end
local tw = max-base
local w = cv-base
local ev = w/tw
local er = math.sqrt(ev)
return math.floor(er * v + vb)
end
function M... | nilq/small-lua-stack | null |
-- A very simple table formatting class
-- Calling conventions:
-- myClass:loadPackage("simpletable", {
-- tableTag = "a",
-- trTag = "b",
-- tdTag = "c"
-- })
-- Defines commands \a, \b and \c equivalent to HTML
-- <table>, <tr> and <td> tags.
-- Todo: Set a maximum width for the whole table and ensure
-- vbox w... | nilq/small-lua-stack | null |
core:remove_listener('pj_unit_upgrades_on_mouse_over_LandUnit111')
core:add_listener(
'pj_unit_upgrades_on_mouse_over_LandUnit111',
'ComponentMouseOn',
function(context)
return context.string
end,
function(context)
end,
true
)
core:remove_listener('pj_unit_upgrades_on_clicked_retrain_button111')
core:add_list... | nilq/small-lua-stack | null |
function build(depth)
if depth == 0 then
return nil
end
local tree = {}
tree.left = build(depth - 1)
tree.right = build(depth - 1)
--print(tree)
return tree
end
function find(tree)
if not tree then
return
end
if tree.left then
tree.left.parent = tree
find(tree.left)
end
if tree.right then
tree.r... | nilq/small-lua-stack | null |
---
-- @module CameraTouchInputUtils
-- @author Quenty
local CameraTouchInputUtils = {}
-- Note: DotProduct check in CoordinateFrame::lookAt() prevents using values within about
-- 8.11 degrees of the +/- Y axis, that's why these limits are currently 80 degrees
local MIN_Y = math.rad(-80)
local MAX_Y = math.rad(80)
... | nilq/small-lua-stack | null |
local playsession = {
{"Gerkiz", {6902}},
{"exabyte", {14996}},
{"Menander", {244243}},
{"cawsey21", {238275}},
{"D0pex", {225399}},
{"CommanderFrog", {225226}},
{"foggyliziouz", {214313}},
{"4yBAK", {187667}},
{"Thuro", {162453}},
{"arisgr", {160145}},
{"orgen101", {43348}},
{"Cesare", {86690}},
{"okey83"... | nilq/small-lua-stack | null |
Skada.versions = {
{
id = "1.6.7",
title = "Skada 1.6.7",
message = "Added new Buffs and Debuffs overview modes, showing spells used. Clicking a spell shows the corresponding players.<br/>"
},
{
id = "1.6.4",
title = "Skada 1.6.4",
message = "Added a new updat... | nilq/small-lua-stack | null |
--- Turbo Web Cryto module
-- C defs for LuaJIT FFI and wrappers.
--
-- Copyright 2011, 2012, 2013 John Abrahamsen
--
-- 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.... | nilq/small-lua-stack | null |
-- original code from Baked Clay mod by TenPlus1
---Licensed: MIT Copyright (c) 2016 TenPlus1
local clay = {
{"white", "White"},
{"grey", "Grey"},
{"black", "Black"},
{"red", "Red"},
{"yellow", "Yellow"},
{"green", "Green"},
{"cyan", "Cyan"},
{"blue", "Blue"},
{"magenta", "Magenta"},
{"orange", "Orange"... | nilq/small-lua-stack | null |
------------------------------------------------------------------------------------------------------------
ffi = require( "ffi" )
ENV_PATH = "/"
package.cpath = ENV_PATH.."lib/?.so;"..ENV_PATH.."lib64/?.so;/?.so;"..ENV_PATH.."lua/uv/lib/?.so"
package.path = ENV_PATH.."?.lua;"..ENV_PATH.."lua/?.lua;"..ENV_PATH.."li... | nilq/small-lua-stack | null |
-- golib not cpu safe
runtime.callcontext({kill={cpu=10000}}, function()
local ctx = runtime.context()
print(pcall(double, 2))
--> ~false\t.*: missing flags: cpusafe
print(pcall(function() return polly.Age end))
--> ~false\t.*: missing flags: cpusafe
print(pcall(golib.import, "fmt"))
--... | nilq/small-lua-stack | null |
local Gui = require("api.Gui")
local Input = require("api.Input")
local Item = require("api.Item")
local Skill = require("mod.elona_sys.api.Skill")
local ElonaItem = require("mod.elona.api.ElonaItem")
local Enum = require("api.Enum")
local Rand = require("api.Rand")
local Calc = require("mod.elona.api.Calc")
local Effe... | nilq/small-lua-stack | null |
----------------------------------------------------------------
-- File : Assets\BIZ_Scr\Core\functions.lua
-- Author : www.loywong.com
-- COPYRIGHT : (C)
-- Date : 2019/09
-- Description : Lua全局通用方法
-- Version : 1.0
-- Maintain : //[date] desc
----------------------------------------------------------------
-... | nilq/small-lua-stack | null |
-- Copyright (C) Miracle
-- Copyright (C) OpenWAF
local _M = {
_VERSION = "1.0.5"
}
local http_cache = require "http_cache"
local twaf_func = require "lib.twaf.inc.twaf_func"
local ngx_log = ngx.log
local ngx_WARN = ngx.WARN
local string_upper = string.upper
local table_insert = table.insert
local... | nilq/small-lua-stack | null |
-- This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild
--
-- This file is compatible with Lua 5.3
local class = require("class")
require("kaitaistruct")
local str_decode = require("string_decode")
ExprStrOps = class.class(KaitaiStruct)
function ExprStrOps:_init(io, parent... | nilq/small-lua-stack | null |
testfiledir = "testfiles/08-notation-nomencl"
testsuppdir = testfiledir .. "/support"
includetests = {"*"}
excludetests = {}
checkruns = 2
function runtest_tasks(name, run)
if run == 1 then
return "makeindex -s nomencl.ist -o " .. name .. ".nls " .. name .. ".nlo"
else
return ""
end
end
| nilq/small-lua-stack | null |
local playsession = {
{"pomabroad", {460152}},
{"Menander", {573436}},
{"rlidwka", {322479}},
{"Hitman451", {540966}},
{"InphinitePhractals", {126753}},
{"mad58max", {315753}},
{"MuddledBox", {99252}},
{"eyepex", {194249}}
}
return playsession | nilq/small-lua-stack | null |
--
-- Track indicators from F3705 gadget.
--
------------------------------------------------------------------------------
-- "THE BEER-WARE LICENSE" (Revision 42):
-- <philip@paeps.cx> wrote this file. As long as you retain this notice you
-- can do whatever you want with this stuff. If we meet some day, and you
-- ... | nilq/small-lua-stack | null |
--
-- This is fun64 code, you can copy paste it into https://xriss.github.io/fun64/pad/ to run it.
--
hardware,main=system.configurator({
mode="fun64", -- select the standard 320x240 screen using the swanky32 palette.
update=function() update() end, -- called repeatedly to update
draw=function() draw() end, -- calle... | nilq/small-lua-stack | null |
---
-- @classmod ScoredActionPickerProvider
-- @author Quenty
local require = require(script.Parent.loader).load(script)
local BaseObject = require("BaseObject")
local ScoredActionPicker = require("ScoredActionPicker")
local Table = require("Table")
local TouchButtonScoredActionPicker = require("TouchButtonScoredActi... | nilq/small-lua-stack | null |
OUTFIT_DATA = {
/*
EXTENDED ENHANCED CITIZEN - FEMALE
strong default model packs for the casuals!
http://steamcommunity.com/sharedfiles/filedetails/?id=677125227
https://steamcommunity.com/sharedfiles/filedetails/?id=677129372
*/
["models/player/zelpa/female_01_extended.mdl"] = {uid = "efemale", skins = 18... | nilq/small-lua-stack | null |
-- 23.5 瞬表
require("Tools.utils")
local mem = {}
setmetatable(mem, {__mode = "k"})
function Factory(o)
local res = mem[o]
if res == nil then
res = function() return o end
mem[o] = res -- 表的值指向表的键
end
return res
end
local object = {
name = "edwardchen",
age = 24,
job = "col... | nilq/small-lua-stack | null |
local native = _ENV.native
-- Parse format and returns fomattable object or error.
-- local parse_fmt = native.i18n.parse_fmt
-- TODO
local parse_fmt = function(f)
return {f}
end
local rnd = require("random").rnd
--- Functions for localization.
-- See the i18n section for more information.
-- @usage local i18n =... | nilq/small-lua-stack | null |
--[[
Copyright (c) 2021, TU Delft
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, softwar... | nilq/small-lua-stack | null |
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
use {
"ellisonleao/gruvbox.nvim",
requires = {"rktjmp/lush.nvim"}
}
use 'glepnir/zephyr-nvim'
-- use {
-- 'glepnir/galaxyline.nvim',
-- branch = 'main',
-- }
use {
'kyazdani42/nvim-t... | nilq/small-lua-stack | null |
--[[----------------------------------------------------------------------------
Application Name:
ParticleFilter
Summary:
Applying particle filter on scans read from a file
... | nilq/small-lua-stack | null |
local waffles = ...
local COOK_TIME = 6
local MODNAME = minetest.get_current_modname()
local S = minetest.get_translator(MODNAME)
-- Batter visual
local batters = {}
minetest.register_entity(MODNAME .. ":batter", {
visual = "mesh",
mesh = "waffles_waffle.obj",
textures = {"waffles_waffle_batter.png"},
... | nilq/small-lua-stack | null |
return {
apps = require("config.apps"),
layouts = require("config.layouts")
}
| nilq/small-lua-stack | null |
--[[
https://github.com/RedXi/vatsimbrief-helper
--]]
--[[
MIT License
Copyright (c) 2020 RedXi
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 wi... | nilq/small-lua-stack | null |
return {'zadel','zadelboog','zadeldak','zadeldaktoren','zadeldek','zadelen','zadelgewricht','zadelknop','zadelkussen','zadelmaker','zadelmakerij','zadelpaard','zadelpijn','zadelpunt','zadelriem','zadelrob','zadelrug','zadeltas','zadeltje','zadelvast','zaden','zadelpen','zadenlijst','zadelboom','zadelhoogte','zadelkamer... | nilq/small-lua-stack | null |
Config = {}
Config.DrawDistance = 100.0
Config.MaxInService = -1
Config.EnablePlayerManagement = true
Config.EnableSocietyOwnedVehicles = false
Config.EnableLicenses = false
Config.EnableESXIdentity = false
Config.Locale ... | nilq/small-lua-stack | null |
depends_on("A")
load("B")
depends_on("C")
| nilq/small-lua-stack | null |
#@ SimpleGraphic
-- Path of Building
--
-- Module: Launch Install
-- Installation bootstrap
--
local basicFiles = { "UpdateCheck.lua", "UpdateApply.lua", "Launch.lua" }
local xml = require("xml")
local curl = require("lcurl.safe")
ConClear()
ConPrintf("Preparing to complete installation...\n")
local localBranch, lo... | nilq/small-lua-stack | null |
local moon = require("moon")
local msg_handler = require("msg_handler")
local M = setmetatable({}, msg_handler)
--注册要监听的消息
function M.init()
msg_handler.init()
M.register(msgid.LOGIN_REQUEST, M.login_request)
M.register(msgid.BATTLE_BEGIN_REQUEST, M.battle_begin_request)
end
--重写ondispatch方法
function M.ond... | nilq/small-lua-stack | null |
require'lspconfig'
local configs = require 'lspconfig/configs'
local uv = vim.loop
local _schemas_dir = os.getenv('PWD') .. '/schemas'
local function require_all_configs()
local fin = false
-- Configs are lazy-loaded, tickle them to populate the `configs` singleton.
for _,v in ipairs(vim.fn.glob('nvim-lspconfi... | nilq/small-lua-stack | null |
WireToolSetup.setCategory("Input, Output")
WireToolSetup.open("friendslist", "Friends List", "gmod_wire_friendslist", nil, "Friends Lists")
if CLIENT then
language.Add("tool.wire_friendslist.name", "Friends List Tool (Wire)")
language.Add("tool.wire_friendslist.desc", "Spawns a friends list entity for use wit... | nilq/small-lua-stack | null |
-- script to create a annotation file for Torch7 for ImageNet VID
package.path = package.path .. ';../?.lua'
require 'torch'
require 'paths'
local myutils = require 'myutils'
-- re-organize data
local anno = {}
local json_dir = '/data/fanyi-data/ILSVRC2015/Annotations/VID/val/json'
local t7_file = '/data/fanyi-data/... | nilq/small-lua-stack | null |
return function(UrlBuilder)
local function isQQ()
return string.find(UrlBuilder.fromString("corp:")(), "qq.com")
end
return {
catalog = UrlBuilder.fromString("www:catalog"),
buildersClub = UrlBuilder.fromString("www:mobile-app-upgrades/native-ios/bc"),
trades = UrlBuilder.fromString("www:trades"),
profil... | nilq/small-lua-stack | null |
require('quest')
-- Thengil is looking for the Cosmos Stone...
local function thengil_cosmos_start_fn()
add_message_with_pause("THENGIL_COSMOS_QUEST_START_SID")
add_message_with_pause("THENGIL_COSMOS_QUEST_START2_SID")
clear_and_add_message("THENGIL_COSMOS_QUEST_START3_SID")
end
-- Quest ends when the player ha... | nilq/small-lua-stack | null |
-- Base16 {{ scheme-name }} color
-- Author: {{ scheme-author }}
-- to be use in your theme.lua
-- symlink or copy to config folder `local color = require('color')`
local M = {}
M.base00 = "#1e1e3f" -- ----
M.base01 = "#43d426" -- ---
M.base02 = "#f1d000" -- --
M.base03 = "#808080" -- -
M.base04 = "#6871ff" -- +
M.b... | nilq/small-lua-stack | null |
local json = require "json"
local parse = require "parse"
local property = require "property"
local localization = require "localization"
local database = require "database"
local exception = require "exception"
local exceptionHandler = require "exceptionHandler"
local util = require "util"
local localeService ... | nilq/small-lua-stack | null |
function CreateYourHouseMap()
return {
version = "1.1",
luaversion = "5.1",
tiledversion = "0.16.1",
orientation = "orthogonal",
renderorder = "right-down",
width = 40,
height = 20,
tilewidth = 16,
tileheight = 16,
nextobjectid = 1,
properties = {},
tilesets = {
{
name = "town",
... | nilq/small-lua-stack | null |
TatooineImperialOasisBaseScreenPlay = ScreenPlay:new {
numberOfActs = 1,
}
registerScreenPlay("TatooineImperialOasisBaseScreenPlay", true)
function TatooineImperialOasisBaseScreenPlay:start()
if (isZoneEnabled("tatooine")) then
self:spawnMobiles()
end
end
function TatooineImperialOasisBaseScreenPlay:spawnMobil... | nilq/small-lua-stack | null |
local SCREEN_MODIFIER = {"cmd", "alt", "ctrl"}
local WINDOW_MODIFIER = {"cmd", "ctrl"}
hs.hotkey.bind(SCREEN_MODIFIER, "Left", function()
hs.window.focusedWindow():moveOneScreenWest()
end)
hs.hotkey.bind(SCREEN_MODIFIER, "Right", function()
hs.window.focusedWindow():moveOneScreenEast()
end)
local function resize... | nilq/small-lua-stack | null |
--[[
MIT License
Copyright (c) 2019 nasso <nassomails ~ at ~ gmail {dot} 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
to use, ... | nilq/small-lua-stack | null |
-- Copyright 2016-2021 Gabriel Dubatti. See LICENSE.
------- PROJECT -------
Proj = {}
local events, events_connect = events, events.connect
--project views
Proj.PRJV_DEFAULT = 0 -- default view (no active project)
Proj.PRJV_PROJECT = 1 -- project view
Proj.PRJV_FILES = 2 -- project files view
Pro... | nilq/small-lua-stack | null |
local t =
Def.ActorFrame {
NOTESKIN:LoadActor(Var "Button", "Hold Explosion") ..
{
HoldingOnCommand = NOTESKIN:GetMetricA("HoldGhostArrow", "HoldingOnCommand"),
HoldingOffCommand = NOTESKIN:GetMetricA("HoldGhostArrow", "HoldingOffCommand"),
InitCommand = function(self)
self:playcommand("HoldingOff"):fi... | nilq/small-lua-stack | null |
-- For examples, see https://github.com/Hammerspoon/hammerspoon/wiki/Sample-Configurations
-- Password manager
-- Alternative binding? Interferes with Evernote strikethrough
hs.hotkey.bind({"ctrl", "option", "cmd"}, "K", function()
hs.application.launchOrFocus("KeePassXC")
end)
-- Lock screen
-- Built-ins: CTRL+C... | nilq/small-lua-stack | null |
Option.g({
--[[
#------------------------------------------------------------------------------#
# EDITOR #
#------------------------------------------------------------------------------#
--]]
-- set the tab size to length of 4 spaces
-- shif... | nilq/small-lua-stack | null |
--[[
-- Copyright (c) 2016 Adam Dodd
--
-- 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, publis... | nilq/small-lua-stack | null |
local configuration = require 'apicast.configuration'
local env = require 'resty.env'
describe('Configuration object', function()
describe('provides information from the config file', function()
local config = configuration.new({services = { 'a' }})
it('returns services', function()
assert.truthy(con... | nilq/small-lua-stack | null |
import 'game/entity/entity'
Bombaka = class(Entity)
function Bombaka:init()
Entity.init(self, 'chars/bombaka.png', 32, 30, 30)
self.rotation_speed = 20
self.movement_speed = 2
self.anims = {
down = make_anim(0, 12, 5, 10),
left = make_anim(3, 17, 5, 10),
up = make_anim... | nilq/small-lua-stack | null |
--[[
Copyright 2012 The Luvit Authors. All Rights Reserved.
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 agr... | nilq/small-lua-stack | null |
if GetObjectName(GetMyHero()) ~= "Thresh" then return end
require('Inspired')
require('DeftLib')
require('IPrediction')
local ThreshMenu = MenuConfig("Thresh", "Thresh")
ThreshMenu:Menu("Combo", "Combo")
ThreshMenu.Combo:Boolean("Q", "Use Q", true)
ThreshMenu.Combo:Boolean("Q2", "Use Q2", true)
ThreshMenu.Combo:KeyB... | nilq/small-lua-stack | null |
local L = ShadowUF.L
local playerClass = select(2, UnitClass("player"))
local function finalizeData(config, useMerge)
local self = ShadowUF
-- Merges all of the parentUnit options into the child if they weren't set.
-- if it's a table, it recurses inside the table and copies any nil values in too
local function me... | nilq/small-lua-stack | null |
-- remove spaces from string (invalid in rules except as separator)
local function strip_spaces(str)
return string.gsub(str, ' ', '')
end
-- sanitise value if empty or blank
local function value_or_NONE(value)
if value == nil or value == '' then
return 'NONE'
end
return strip_spaces(tostring(value))
end
... | nilq/small-lua-stack | null |
--
-- ParseLua.lua
--
-- The main lua parser and lexer.
-- LexLua returns a Lua token stream, with tokens that preserve
-- all whitespace formatting information.
-- ParseLua returns an AST, internally relying on LexLua.
--
local luaPath = debug.getinfo(1).source:match("@?(.*/)")
require(luaPath..'strict')
local util... | nilq/small-lua-stack | null |
padding = 2
mithralConstraints = {
InTileRange(
{padding, gir("GroundLine") + padding},
{gir("TileWidth") - padding, gir("TileHeight") - padding}
),
HasAllTags("ground"),
HasAttributes("open", Equal, 0),
}
mithralSolver = ConstraintSolver(mithralConstraints)
mithralSolver:Solve()
base = mithralSolver.... | nilq/small-lua-stack | null |
slot0 = class("PlayerSecondSummaryInfoScene", import("...base.BaseUI"))
slot0.getUIName = function (slot0)
return "PlayerSecondSummaryUI"
end
slot0.setActivity = function (slot0, slot1)
slot0.activityVO = slot1
end
slot0.setPlayer = function (slot0, slot1)
slot0.palyerVO = slot1
end
slot0.setSummaryInfo = functi... | nilq/small-lua-stack | null |
------------------------------------------------------------------------------
-- LuaSOAP support to WSDL semi-automatic generation.
-- See Copyright Notice in license.html
------------------------------------------------------------------------------
local assert, error, ipairs, pairs = assert, error, ipairs, pairs
... | nilq/small-lua-stack | null |
-- =============================================================
-- Copyright Roaming Gamer, LLC. 2008-2018 (All Rights Reserved)
-- =============================================================
-- Collision Calculator
-- =============================================================
local function rpad(str, len, char)... | nilq/small-lua-stack | null |
local dependencies = {
proptypes = {
git = "https://github.com/AmaranthineCodices/rbx-prop-types.git",
version = "master"
}
}
local lfs = require("lfs")
lfs.mkdir("lib")
assert(lfs.chdir("lib"))
for name, dependency in pairs(dependencies) do
os.execute(("git clone --depth=1 %s %s"):format(
dependency.git,
... | nilq/small-lua-stack | null |
local t = require( "taptest" )
local readlines = require( "readlines" )
local same = require( "same" )
f = io.open( "ReadLinesXmpl.txt", "w" )
f:write( "a ", "long ", "text\n\n", "is ", 1337 )
f:close()
strlst, err = readlines( "ReadLinesXmpl.txt" )
t( same( strlst, { "a long text", "", "is 1337" } ), true )
os.remo... | nilq/small-lua-stack | null |
---
-- PostProcessor.lua - Appearance modification post processor
--
local PostProcessor = {}
local kDialogueParts = {
Rika = "HeadNipah",
Sekibanki = "headFX",
}
function PostProcessor.optionChanged(app, option, prev, new)
if option == "Dialogue" then
local needsSave = false
-- Auto-detach
if kDialo... | nilq/small-lua-stack | null |
local chooseGoodsLayer=
{
name="chooseGoodsLayer",type=0,typeName="View",time=0,report=0,x=0,y=0,width=0,height=0,visible=1,fillParentWidth=1,fillParentHeight=1,nodeAlign=kAlignTopLeft,
{
name="bgImage",type=1,typeName="Image",time=65255603,report=0,x=-1,y=-109,width=1280,height=800,visible=1,fillParentWidth=1,fill... | nilq/small-lua-stack | null |
local entergameWindow
local characterGroup
local outfitGroup
local protocol
local infoBox
local loadingBox
function init()
if not USE_NEW_ENERGAME then return end
entergameWindow = g_ui.displayUI('entergamev2')
entergameWindow.news:hide()
entergameWindow.quick:hide()
entergameWindow.registration:hide()
... | 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.ui.screen_title", function()
require "game.ui"
it("uses the title property to set the name of the view", function()
local t = moonpie.ui.components.screen_... | nilq/small-lua-stack | null |
object_tangible_loot_npc_loot_elect_module_simple_generic = object_tangible_loot_npc_loot_shared_elect_module_simple_generic:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_npc_loot_elect_module_simple_generic, "object/tangible/loot/npc/loot/elect_module_simple_generic.iff")
| nilq/small-lua-stack | null |
Import("mod1.lua")
Import("mod2/mod2.lua")
| nilq/small-lua-stack | null |
print("Before the big 10 loop")
i = 0
--print everything
while i < 10 do
print("Inside: ", i+1)
i = i + 1
end
print("Afer the big 10 loop") | nilq/small-lua-stack | null |
local PLUGIN = PLUGIN
PLUGIN.name = "Stackable Items"
PLUGIN.author = "gm1003 ツ"
PLUGIN.description = "Adds stackable items."
ix.util.Include("sv_hooks.lua") | nilq/small-lua-stack | null |
slot0 = class("WeekTaskProgress", import("..BaseVO"))
slot0.Ctor = function (slot0)
return
end
slot0.Init = function (slot0, slot1)
slot0.targets = {}
slot0.dropData = {}
slot0.index = 0
slot0.target = 0
slot0.progress = 0
slot0.drops = {}
slot0.subTasks = {}
slot0.targets = pg.gameset.weekly_target.descript... | nilq/small-lua-stack | null |
jawa_beads = {
minimumLevel = 0,
maximumLevel = -1,
customObjectName = "",
directObjectTemplate = "object/tangible/loot/misc/jawa_beads.iff",
craftingValues = {
},
customizationStringNames = {},
customizationValues = {},
junkDealerTypeNeeded = JUNKJAWA,
junkMinValue = 35,
junkMaxValue = 70
}
addLootItemTem... | nilq/small-lua-stack | null |
-- bitmasks
local struct = require "vstruct"
local io = require "vstruct.io"
local unpack = table.unpack or unpack
local m = {}
function m.read(_, buf, size)
local mask = {}
local e = io("endianness", "get")
local sof,eof,step
if e == "big" then
sof,eof,step = #buf,1,-1
else
sof,eof,step = 1,#b... | nilq/small-lua-stack | null |
modifier_vengefulspirit_command_aura_lua = class({})
--------------------------------------------------------------------------------
function modifier_vengefulspirit_command_aura_lua:IsHidden()
return true
end
--------------------------------------------------------------------------------
function modifier_venge... | 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.