content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
local MUSIC_FOLDER = script:GetCustomProperty("MUSIC_FOLDER"):WaitForObject()
local musicList = MUSIC_FOLDER:GetChildren()
function OnPlayTrack(track)
for i = 1, #musicList do
musicList[i]:Stop()
end
if track > #musicList and #musicList > 0 then
musicList[#musicList]:Play()
elseif #musi... | nilq/small-lua-stack | null |
-- usage: (use instead of ant)
-- tolua++ "-L" "basic.lua" "-o" "../../scripting/lua/cocos2dx_support/LuaCocos2d.cpp" "Cocos2d.pkg"
_is_functions = _is_functions or {}
_to_functions = _to_functions or {}
_push_functions = _push_functions or {}
local CCObjectTypes = {
"CCObject",
"CCAction",
"CCImage",
... | nilq/small-lua-stack | null |
function gadget:GetInfo()
return {
name = "Area Attack",
desc = "Give area attack commands to ground units",
author = "KDR_11k (David Becker)",
date = "2008-01-20",
license = "Public domain",
layer = 1,
enabled = true
}
end
local CMD_AREAATTACK = 39954
local SpGiveOrderToUnit = Spring.Give... | nilq/small-lua-stack | null |
-- For training loop and learning rate scheduling.
-- DiscoGAN.
-- last modified : 2017.09.14, nashory
require 'sys'
require 'optim'
require 'image'
require 'math'
local optimizer = require '__3_discogan.script.optimizer'
local DiscoGAN = torch.class('DiscoGAN')
function DiscoGAN:__init(model, criterion, opt, opt... | nilq/small-lua-stack | null |
package.path = package.path ..";?.lua;test/?.lua;app/?.lua;"
function setting(arg_pkt_size)
pktgen.set_range('all', 'on')
print('Setting Traffic Configuraton...')
print('[+] set range mode on')
sip_sta = '10.0.0.1'
sip_min = '10.0.0.1'
sip_max = '10.0.255.255'
sip_inc = '0.0.0.1'
pktgen.src_ip('all', 'start',... | nilq/small-lua-stack | null |
-- Requesting end of a harness.
-- TODO sending end, so i actually have something.
local http = require "socket.http"
local ltn12 = require "ltn12"
local This = {
__constant=true,
__which_not_constant = { under_path=true, memoize_constant=true, require=true, },
}
This.__index = This
This.store = require "stor... | nilq/small-lua-stack | null |
---- -*- Mode: Lua; -*-
----
---- common.lua Functions common to many parts of Rosie
----
---- © Copyright IBM Corporation 2016.
---- LICENSE: MIT License (https://opensource.org/licenses/mit-license.html)
---- AUTHOR: Jamie A. Jennings
... | nilq/small-lua-stack | null |
local commandHandler = require("commandHandler")
local discordia = require("discordia")
local fs = require("fs")
local timer = require("timer")
local function sendChangelog(channel, prefix, latestOnly)
local changelog=fs.readFileSync("changelog.txt")
changelog=changelog:gsub("%&prefix%;", prefix)
if latestO... | nilq/small-lua-stack | null |
local Utils = require "Utils"
local roethlin = require "Persist.roethlin"
local function legacyDeserialize(data)
local env = setmetatable({}, {
__index = function(t, k)
return t
end,
__call = function(t, ...)
error("cannot call functions")
end
})
local f, res = load('retur... | nilq/small-lua-stack | null |
--[[
LICENSE
cargBags: An inventory framework addon for World of Warcraft
Copyright (C) 2010 Constantin "Cargor" Schomburg <xconstruct@gmail.com>
cargBags 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; e... | nilq/small-lua-stack | null |
include( "RDx/manifest.lua" ) | nilq/small-lua-stack | null |
local BasePlugin = require "kong.plugins.base_plugin"
local access = require "kong.plugins.lauthz.access"
local LauthzHandler = BasePlugin:extend()
LauthzHandler.PRIORITY = 5
function LauthzHandler:new()
LauthzHandler.super.new(self, "lauthz")
end
function LauthzHandler:access(conf)
LauthzHandler.super.access(s... | nilq/small-lua-stack | null |
#!/usr/bin/env lua
--- Tests on dumocks.DetectionZoneUnit.
-- @see dumocks.DetectionZoneUnit
-- set search path to include src directory
package.path = "src/?.lua;" .. package.path
local lu = require("luaunit")
local mdzu = require("dumocks.DetectionZoneUnit")
require("test.Utilities")
_G.TestDetectionZoneUnit = {}... | nilq/small-lua-stack | null |
#!/usr/bin/env lua
--- Tests on dumocks.IndustryUnit.
-- @see dumocks.IndustryUnit
-- set search path to include src directory
package.path = "src/?.lua;" .. package.path
local lu = require("luaunit")
local miu = require("dumocks.IndustryUnit")
require("test.Utilities")
TestIndustryUnit = {}
--- Verify element cla... | nilq/small-lua-stack | null |
local huaweiIAP = require "plugin.huaweiIAP"
local widget = require( "widget" )
local json = require("json")
local publicKey = "XXXXXXXXX"
-- priceType: 0: consumable; 1: non-consumable; 2: subscription
local consumableProductList = {}
local nonconsumableProductList = {}
local subscriptionProductList = {}
local obta... | nilq/small-lua-stack | null |
local Harpoon = {}
Harpoon.config = function()
require("harpoon").setup {
global_settings = {
-- sets the marks upon calling `toggle` on the ui, instead of require `:w`.
save_on_toggle = true,
-- saves the harpoon file upon every change. disabling is unrecommended.
save_on_change = true,... | nilq/small-lua-stack | null |
------------------------------------------------------------------------------------
-- a register center for debug/demo only
------------------------------------------------------------------------------------
local Promise = require('lib.Promise')
local MD5 = require('lib.MD5').sumhexa
local dbg_storage = {};
return... | nilq/small-lua-stack | null |
local GUIStyle = require("guistyle")
local function app(params)
local win1 = WMCreateWindow(params)
local styler = GUIStyle:new()
function win1.drawForeground(self, ctx)
styler:DrawSunkenRect(ctx, 10, 40, 200, 40)
styler:DrawRaisedRect(ctx, 240, 40, 200, 40)
--styler:DrawFrame(ct... | nilq/small-lua-stack | null |
describe("resolve", function()
local dns = require("util.dns")
local dns_helper = require("test/dns_helper")
it("sets correct nameservers", function()
dns_helper.mock_new(function(self, options)
assert.are.same({ nameservers = { "1.2.3.4", "4.5.6.7" }, retrans = 5, timeout = 2000 }, options)
retu... | nilq/small-lua-stack | null |
-- Copyright (C) 2017 josephzeng <josephzeng36@gmail.com>
--
-- Distributed under terms of the MIT license.
--
local skynet = require "skynet"
local M = {}
function M:init()
self.game_server_list = {}
end
function M:create_game_server_list()
local ip = skynet.getenv "server_listen_ip"
local port = skynet.gete... | nilq/small-lua-stack | null |
-- This file is part of the SAMP.Lua project.
-- Licensed under the MIT License.
-- Copyright (c) 2016, FYP @ BlastHack Team <blast.hk>
-- https://github.com/THE-FYP/SAMP.Lua
local MODULE =
{
MODULEINFO = {
name = 'samp.events',
version = 1
},
INTERFACE = {
OUTCOMING_RPCS = {},
OUTCOMING_PACKETS = {},
... | nilq/small-lua-stack | null |
--- === hotkey.modal ===
---
--- For conveniently binding modal hotkeys.
---
--- This would be a simple example usage:
---
--- k = hotkey.modal.new({"cmd", "shift"}, "d")
---
--- function k:entered() hydra.alert('Entered mode') end
--- function k:exited() hydra.alert('Exited mode') end
---
--- k:bind(... | nilq/small-lua-stack | null |
LinkLuaModifier("modifier_ramza_ninja_reflexes", "heroes/ramza/ramza_ninja_modifiers.lua", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_ramza_ninja_dual_wield", "heroes/ramza/ramza_ninja_modifiers.lua", LUA_MODIFIER_MOTION_NONE)
RmazaNinjaDualWieldApply = function (keys)
keys.caster:AddNewModifier(keys.caster, ... | nilq/small-lua-stack | null |
----
----
---- File: modbus_addr_lookup.lua
----
----
----
----
----
local temp
click_reg_address = {}
click_bit_address = {}
local integer_to_click = {}
integer_to_click["satellite_1"] =
{
"Y001","Y002","Y003","Y004", -- 1-4
"Y101","Y102","Y103","Y104","Y105","Y106","Y107","Y108", -- 5 -12
"Y201","Y202... | nilq/small-lua-stack | null |
local utils = {}
-- uncomment line below for dev logging
-- local dev = require("nvim-biscuits.dev")
utils.console_log = function (the_string)
-- uncomment line below for dev logging
-- dev.console_log(the_string)
end
utils.merge_arrays = function(a, b)
local result = {unpack(a)}
table.move(b, 1, #b, #resul... | nilq/small-lua-stack | null |
#!lua
EXE='flexiblebody'
local f=io.open('../make.lua','r')
if f then
f:close()
dofile('../make.lua')
else
dofile('../../make.lua')
end
| nilq/small-lua-stack | null |
--[[
© 2020 TERRANOVA do not share, re-distribute or modify
without permission of its author.
--]]
ITEM.name = "Tekel Cigarette"
ITEM.model = Model("models/phycinnew.mdl")
ITEM.width = 1
ITEM.height = 1
ITEM.description = "Delicious, authentic lung-killing addiction sticks. There's a little branding on the filter of ... | nilq/small-lua-stack | null |
GlobalFunction = function(event, data)
local options = {
event = event,
data = data
}
TriggerServerEvent("bankrobberies:globalEvent", options)
end
TryHackingDevice = function(bank)
ESX.TriggerServerCallback("bankrobberies:fetchCops", function(enough)
if enough then
StartHackingDevice... | nilq/small-lua-stack | null |
slot0 = class("ChatBubblePublic")
slot0.Ctor = function (slot0, slot1)
slot0.tf = tf(slot1)
slot0.richText = findTF(slot0.tf, "text"):GetComponent("RichText")
if not IsNil(findTF(slot0.tf, "channel")) then
slot0.channel = slot2:GetComponent("Image")
end
end
slot0.update = function (slot0, slot1)
if slot0.data... | nilq/small-lua-stack | null |
local utils = require 'utils'
local names = require 'names'
local raw = data.raw
local name = 'inf-gun'
local gun = utils.deepcopy(raw['gun']['submachine-gun'])
gun.name = name
local ap = gun.attack_parameters
ap.ammo_category = nil
ap.ammo_type = {
category = 'bullet',
action = {
type = 'direct',
... | nilq/small-lua-stack | null |
local Maid = {}
Maid.__index = Maid
function Maid.New()
return setmetatable({}, Maid)
end
function Maid:Add(obj)
self[#self+1] = obj
end
function Maid:Clean()
for i,v in ipairs(self) do
if typeof(v) == "RBXScriptConnection" then
v:Disconnect()
elseif type(v) == "function" then
v()
elseif v.Destroy th... | nilq/small-lua-stack | null |
function reduce(col, acc, fn)
--> i can't make this recursive cuz idk how to do "[head, ...tail]" = arr in lua
--> note: with something like "spread" function this is easy, but performance poor
for _, curr in ipairs(col) do
acc = fn(acc, curr)
end
return acc
end
function sum_all(arr)
return reduce(arr, 0, func... | nilq/small-lua-stack | null |
local c = { }
local dream = _3DreamEngine
local I = mat4:getIdentity()
local Z = vec3()
--get the vec3 offset of a transform object (which can be a mat4 or vec3)
local function getTranslate(s)
return s.type == "vec3" and s or vec3(s[4], s[8], s[12])
end
local function getTransform(x, y, z)
if x then
return y and... | nilq/small-lua-stack | null |
class("Group", DisplayObject) {
resetTransform = false,
addChild = function(self, child)
DisplayObject.addChild(self, child)
if instanceOf(child, "DisplayObject") then
self.innerView:insert(child.view, self.resetTransform)
end
end,
removeChild = function(self, child)
... | nilq/small-lua-stack | null |
ESX = nil
local blips = {}
local discord_webhook = "https://discord.com/api/webhooks/817996809392619530/jvpAYVlEatUz2U813bNTaJoYnME1D0aiWcGkUEWCd0y3UXpobgx-h6WBGnixcxpP5TCi" -- paste your discord webhook between the quotes if you want to enable discord logs.
local bancache,namecache = {},{}
local open_assists,activ... | nilq/small-lua-stack | null |
-- credit to atom0s for help with decompiling
-- Decompiled using luadec 2.2 rev: for Lua 5.1 from https://github.com/viruscamp/luadec
return {
Const = {
IMG_DAY = { IValue = 7, Id = "IMG_DAY" },
TIPS = {
Id = "TIPS",
SValue = "#w10#s24#c000000Sharing Event Rules#n#r#r #r#r#... | nilq/small-lua-stack | null |
slot0 = class(slot1)
slot3 = "dntglk.fishConfig.init"
requireLuaFromModule("DntglkModule")
slot3 = "dntglk.model.DntglkModel"
requireLuaFromModule("DntglkModule")
slot3 = "dntglk.model.DntglkModel+Cannon"
requireLuaFromModule("DntglkModule")
slot3 = "dntglk.model.DntglkModel+Player"
requireLuaFromModule("DntglkM... | nilq/small-lua-stack | null |
print("We got somewhere with the server")
createPprint().pprint(exports)
createPprint().pprint(exports.ChaosCollection)
-- register feature
if exports.ChaosCollection and exports.ChaosCollection.AvailableFeatures then
if exports.ChaosCollection.AvailableFeatures.Essentials == nil then
exports.ChaosCollection.Av... | nilq/small-lua-stack | null |
local VorpCore = {}
TriggerEvent("getCore",function(core)
VorpCore = core
end)
VorpInv = exports.vorp_inventory:vorp_inventoryApi()
RegisterServerEvent('AT_bountyhunting:AddSomeMoney')
AddEventHandler('AT_bountyhunting:AddSomeMoney', function()
local _source = source
local price = Config.Price
local xp = C... | nilq/small-lua-stack | null |
local messageSize = tonumber(redis.call('get', KEYS[1])) or 0;
if messageSize <= 0 then
messageSize = redis.call('lLen', KEYS[2]) or 0;
if messageSize > 0 then
redis.call('set', KEYS[1], messageSize);
end
return messageSize;
else
return messageSize;
end | nilq/small-lua-stack | null |
local Overlay = require "Overlay"
local busyThread = app.Busy()
busyThread:start()
local log = false
local refCount = 0
local function start(...)
local text
if ... == nil then
text = "Working..."
else
text = string.format(...)
end
if log then
app.logInfo("Busy(%d):start: %s", re... | nilq/small-lua-stack | null |
BAE_SRC_DIR = path.join(BAE_DIR, "src")
BAE_INCLUDE_DIR = path.join(BAE_DIR, "include", "bae")
TINYGLTF_DIR = path.join(EXTERNAL_DIR, "tinygltf/")
MIKKTSPACE_DIR = path.join(EXTERNAL_DIR, "mikktspace")
project("bae")
uuid(os.uuid("bae"))
kind "StaticLib"
files {
path.join(BAE_SRC_DIR, "**.cpp"),
path.join(BAE_IN... | nilq/small-lua-stack | null |
-- spawn megajelly on top of player using absolute coordinates on level start
set_callback(function()
local x, y, layer = get_position(players[1].uid)
spawn_entity(ENT_TYPE.MONS_MEGAJELLYFISH, x, y+3, layer, 0, 0)
end, ON.LEVEL)
-- spawn clover next to player using player-relative coordinates
set_callback(func... | nilq/small-lua-stack | null |
object_building_kashyyyk_frn_all_cyborg_parts_rack = object_building_kashyyyk_shared_frn_all_cyborg_parts_rack:new {
}
ObjectTemplates:addTemplate(object_building_kashyyyk_frn_all_cyborg_parts_rack, "object/building/kashyyyk/frn_all_cyborg_parts_rack.iff")
| nilq/small-lua-stack | null |
$debug
a = @()
i=0
while i<10 do
a[i] = i*i
i=i+1
end
r,v = next(a,nil)
while r ~= nil do
print ("array["..r.."] = "..v)
r,v = next(a,r)
end
| nilq/small-lua-stack | null |
local represent_operand_oneline =
function(self, node)
local printer = self.printer
if node.un_ops then
local cur_un_op, prev_un_op
for i = 1, #node.un_ops do
cur_un_op = node.un_ops[i]
if (prev_un_op == '-') and (cur_un_op == '-') then
printer:add_curline(' -')
e... | nilq/small-lua-stack | null |
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local Promise = require(ReplicatedStorage.Packages.Promise)
local Stitch = require(script.Parent.Parent.Parent.Paren... | nilq/small-lua-stack | null |
local s = require "stronger"
local ffi = require "ffi"
s.class "Array<T>" {
items = "T*",
length = s.int32
}
function s.Array:init(size)
self.length = size or 0
if self.length > 0 then
self:resize(self.length)
end
end
function s.Array:set(idx, value)
assert(idx >= 0 and idx < self.length)
self.items[idx] = ... | nilq/small-lua-stack | null |
return function (util, connection, wifiConfig, valuetable, badvalues)
local getRadioChecked = util.getRadioChecked
local getTextFilledValue = util.getTextFilledValue
local getRadioValue = util.getRadioValue
local getTextColor = util.getTextColor
local getInputTypeTextString = util.getInputTypeTextSt... | nilq/small-lua-stack | null |
project "lua_sec"
language "C++"
files { "src/**.c" , "src/**.cpp" , "src/**.h" }
links { "lib_lua" }
includedirs "../lib_openssl/include"
-- this is all just copies of lua socket, so we do not really need?
excludes("src/usocket.*")
excludes("src/wsocket.*")
excludes("src/timeout.*")
excludes("src/buffer.*"... | nilq/small-lua-stack | null |
-- normal net.writeTable is very large, these functions reduce the size by 75% or more
function net.writeTable(tbl)
local compressedData = fastlz.compress(json.encode(tbl))
net.writeInt(#compressedData, 32)
net.writeData(compressedData, #compressedData)
end
function net.readTable()
local data = net.rea... | nilq/small-lua-stack | null |
---
--- xclass.lua
---
--- Copyright (C) 2018-2020 Xrysnow. All rights reserved.
---
local type = type
local pairs = pairs
local RawNew = lstg.RawNew
local callbacks = {
init = true,
del = true,
frame = true,
render = true,
colli = true,
kill = true,
}
--- Create extended game object... | nilq/small-lua-stack | null |
files {
'index.html',
'css/bootstrap.min.css',
'css/ionicons.min.css',
'css/style.css',
'fonts/fontawesome-webfont.woff2',
'fonts/ionicons.ttf',
'img/discord.png',
'img/logo.png',
'img/cursor.png',
'img/overlay.svg',
'js/bootstrap.min.js',
'js/jquery.easings.min.... | nilq/small-lua-stack | null |
local msg = require('mp.msg')
local assdraw = require('mp.assdraw')
local script_name = "easycrop"
-- Number of crop points currently chosen (0 to 2)
local points = {}
-- True if in cropping selection mode
local cropping = false
-- Original value of osc property
local osc_prop = false
-- Helper that converts two poi... | nilq/small-lua-stack | null |
Controller = {
events = nil,
externalEvents = nil,
widgets = nil,
keyboardEvents = nil,
attributes = nil,
opcodes = nil
}
function Controller:new()
local obj = {events = {}, externalEvents = {}, widgets = {}, keyboardEvents = {}, attributes = {}, opcodes = {}}
setmetatable(obj, self)
self.__index = self
retu... | nilq/small-lua-stack | null |
local M = {}
-- need to call that to check when search pattern failed
M.cmdl_search_leave = function()
-- need to wait cmd finish search to get last search pattern
vim.defer_fn(function()
local pattern = vim.fn.getreg('/')
vim.fn.searchcount({ pattern = pattern })
end, 10)
end
M.cmdl_searc... | nilq/small-lua-stack | null |
M = {}
function M.foobar()
return "bar"
end
return M
| nilq/small-lua-stack | null |
local mod = DBM:NewMod(1485, "DBM-Party-Legion", 4, 721)
local L = mod:GetLocalizedStrings()
mod:SetRevision(("$Revision: 17448 $"):sub(12, -3))
mod:SetCreatureID(94960)
mod:SetEncounterID(1805)
mod:SetZone()
mod:RegisterCombat("combat")
mod:RegisterEventsInCombat(
"SPELL_CAST_START 191284 193235 188404",
"SPELL_... | nilq/small-lua-stack | null |
-- local function data(file, tag, names, stripFunc, postFunc)
local parser = require "otherData.featParser"
local names =
{
"Fashionista",
"Dashing Makeover",
"Style is Eternal",
"Accessorize",
"Parfumier",
"Versatile Wardrobe",
"Dress to Impress"
}
local m = string.match
local secParser = require "otherData.u... | nilq/small-lua-stack | null |
local helpers = require "spec.helpers"
local pl_utils = require "pl.utils"
local utils = require "kong.tools.utils"
local DB = require "kong.db.init"
local tb_clone = require "table.clone"
-- Current number of migrations to execute in a new install
local nr_migrations = 1 -- 11
local lua_path = [[ KONG_LUA_PATH_OVE... | nilq/small-lua-stack | null |
------------------------------------------------------------------------------
-- GLCanvas class
------------------------------------------------------------------------------
local ctrl = {
nick = "glcanvas",
parent = iup.WIDGET,
creation = "-",
funcname = "GLCanvas",
include = "iupgl.h",
callback = {
... | nilq/small-lua-stack | null |
local Pipeline = require("refactoring.pipeline")
local Point = require("refactoring.point")
local Region = require("refactoring.region")
local refactor_setup = require("refactoring.tasks.refactor_setup")
local post_refactor = require("refactoring.tasks.post_refactor")
local lsp_utils = require("refactoring.lsp_utils")
... | nilq/small-lua-stack | null |
local U = {}
function U.map(mode, lhs, rhs, opts)
local options = {noremap = true, silent = true}
if opts then
options = vim.tbl_extend("force", options, opts)
end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end
function U.ensure_packer_installed()
local fn = vim.fn
local install_... | nilq/small-lua-stack | null |
local L = LibStub("AceLocale-3.0"):NewLocale("EPGP", "koKR")
if not L then return end
-- L["Alts"] = ""
-- L["A member is awarded EP"] = ""
-- L["A member is credited GP"] = ""
-- L["An item was disenchanted or deposited into the guild bank"] = ""
-- L["Announce"] = ""
-- L["Announce medium"] = ""
-- L["Announcement o... | nilq/small-lua-stack | null |
-- example on unpacking all in alpha order
-- analogous to "from cc import *"
local fun1,fun2,fun3,fun4,fun5=require("my")"cc"
fun5()
| nilq/small-lua-stack | null |
local skynet = require "skynet"
require "skynet.manager" -- import manager apis
local util = require "util/util"
local pp = pp
local LOG = LOG
----------------------------------------------------------------------------------------
-- 服务名。
local _console_name = "console"
local _debug_console_name = "debug_console"
... | nilq/small-lua-stack | null |
local ItemHelper = require "utils.ItemHelper"
local ShowPreFinishTip = {}
function ShowPreFinishTip:Start(data)
self:initData(data)
self:initUi(data)
module.guideModule.PlayByType(1300, 0.2)
end
function ShowPreFinishTip:initData(data)
self.itemTab = {}
self.fun = nil
if data then
self... | nilq/small-lua-stack | null |
-- Copyright (C) Miracle
-- Copyright (C) OpenWAF
local _M = {
_VERSION = "0.0.2"
}
local twaf_func = require "lib.twaf.inc.twaf_func"
_M.api = {}
_M.help = {}
_M.api.stat = {}
-- get stat, e.g: GET /api/stat
-- get stat, e.g: GET /api/stat/{policy_uuid}
-- get stat, e.g: GET /api/stat/policy_all
_M.api.stat.g... | nilq/small-lua-stack | null |
-- #######################################
-- ## Project: MTA iLife ##
-- ## Name: RadioGui.lua ##
-- ## Author: Noneatme ##
-- ## Version: 1.0 ##
-- ## License: See top Folder ##
-- #######################################
-- FUNCTIONS / METHODS --
local cFunc = {}; -- Local Functions
local cSetting ... | nilq/small-lua-stack | null |
-- Authored by Jam, December 2019
-- Temperature pattern is a sine wave, this is all configured in celsius, but will output to fahrenheit by default
-- VARIABLES:
-- a: Amplitude, variance in temp (max temp is d + a, min temp is d - a)
-- b: Time period, shouldn't change this as it ensures continuity of temperature ... | nilq/small-lua-stack | null |
-- For music entry: codename, filename, author, length(sec)
MusicList = {
[1] = {"Before the Aftermath", "music.background_1", "RyanAKrause", 312},
[2] = {"Call to Battle", "music.background_2", "ChrisJCozzi", 312},
[3] = {"Counter Strategy", "music.background_3", "RyanAKrause", 311},
[4] = {"Requiem", "music.... | nilq/small-lua-stack | null |
-- Luigi's Mansion (PAL v1.1)
local core = require("games.core")
local game = {
memorymap = {}
}
core.loadGenericControllerMap(0x804B8590, game)
return game | nilq/small-lua-stack | null |
--waf core lib
require 'config'
--Get the client IP
function get_client_ip()
CLIENT_IP = ngx.req.get_headers()["X_real_ip"]
if CLIENT_IP == nil then
CLIENT_IP = ngx.req.get_headers()["X_Forwarded_For"]
end
if CLIENT_IP == nil then
CLIENT_IP = ngx.var.remote_addr
end
if CLIENT_I... | nilq/small-lua-stack | null |
function onCreate()
makeLuaSprite('place', 'place', -600, -300);
addLuaSprite('place', false);
makeAnimatedLuaSprite('glitchattack','glitchattack',700,30)
addAnimationByPrefix('glitchattack','blank','nonglitch',24,false)
addAnimationByPrefix('glitchattack','gattack','glitchattack',24,false)
addLuaSprite... | nilq/small-lua-stack | null |
workspace "Hazel"
architecture "x64"
configurations
{
"Debug",
"Release",
"Dist"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
project "Hazel"
location "Hazel"
kind "SharedLib"
language "C++"
targetdir ("bin/" .. outputdir .. "/%{prj.name}" )
objdir ("bin-int/" .. outputdir .. "/%{... | nilq/small-lua-stack | null |
vim.cmd[[packadd formatter.nvim]]
local global = require('global')
local remap = vim.api.nvim_set_keymap
local fn = vim.fn
local is_cfg_present = require('global').is_cfg_present
local prettier = function()
if is_cfg_present("/.prettierrc") then
return {
exe = "prettier",
args = {
string.for... | nilq/small-lua-stack | null |
local kong_helpers = require "spec.helpers"
local test_helpers = require "kong_client.spec.test_helpers"
local uuid = require "kong.tools.utils".uuid
local function get_easy_crypto()
local EasyCrypto = require("resty.easy-crypto")
local ecrypto = EasyCrypto:new({
saltSize = 12,
ivSize = 16,
... | nilq/small-lua-stack | null |
object_tangible_loot_mustafar_cube_loot_cube_loot_1v = object_tangible_loot_mustafar_cube_loot_shared_cube_loot_1v:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_mustafar_cube_loot_cube_loot_1v, "object/tangible/loot/mustafar/cube/loot/cube_loot_1v.iff")
| nilq/small-lua-stack | null |
return Def.ActorFrame {
NOTESKIN:LoadActor(Var "Button", "Ready Receptor")..{
Name="Base";
InitCommand=cmd(animate,0;setstate,0);
};
NOTESKIN:LoadActor(Var "Button", "Ready Receptor")..{
Name="Glow";
InitCommand=cmd(animate,0;setstate,1);
OnCommand=cmd(effectclock,"bgm";diffuseshift;effectcolor1,color("#F... | nilq/small-lua-stack | null |
local setting_pin_map = require("qnFiles/qnPlist/hall/setting_pin");
local setting=
{
name="setting",type=0,typeName="View",time=0,report=0,x=0,y=0,width=1280,height=720,visible=1,fillParentWidth=1,fillParentHeight=1,nodeAlign=kAlignTopLeft,
{
name="main_bg",type=1,typeName="Image",time=58526259,report=0,x=0,y=0,wi... | nilq/small-lua-stack | null |
local Codegen = require("kotaro.parser.codegen")
local base = {}
function base:new(field, to_field)
return setmetatable({field=field,to_field=to_field}, {__index=base})
end
function base:applies_to(node)
if node:type() ~= "constructor_expression" then
return false
end
return node:index("_id")
end
... | nilq/small-lua-stack | null |
-- Copyright (c) 2016, prpl Foundation
--
-- Permission to use, copy, modify, and/or distribute this software for any purpose with or without
-- fee is hereby granted, provided that the above copyright notice and this permission notice appear
-- in all copies.
--
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCL... | nilq/small-lua-stack | null |
local M = {}
-- Highlight a group configured by a table or link it if a string is given.
-- If an option is left it it is set to NONE (transparent) not left unchanged.
function M.highlight(group, colour)
if type(colour) == "table" then
vim.cmd(
string.format(
"highlight %s guifg=%s guibg=%s gui=%s ... | nilq/small-lua-stack | null |
--- Simple shell parsing
-- A 'option-defaults' table is a table of shell options where "-" is substituted
-- for "_" as keys, and any other value as a default as values where opt.empty
-- means no default.
--
-- Example:
--[[
opt = require "parseopt"
defaults = {
_v = opt.empty,
_h = opt.empty,
_q = opt.empty,
... | nilq/small-lua-stack | null |
-- Replaces the Lua module searcher with a function that loads the lua
-- code with a proxy of the global environment that doesn't permit
-- modifications.
local assert = assert
local V = assert( _VERSION )
local _G = assert( _G )
local error = assert( error )
local next = assert( next )
local type = assert( type )
lo... | nilq/small-lua-stack | null |
local fun = require('fun')
--
-- Checks that argument is a callable, i.e. a function or a table
-- with __call metamethod.
--
local function is_callable(arg)
if type(arg) == 'function' then
return true
elseif type(arg) == 'table' then
local mt = getmetatable(arg)
if mt ~= nil and type(m... | nilq/small-lua-stack | null |
local previous = 0 -- Most recent value of page offset
local velocity = 0 -- Starting velocity of current page swipe
return function(page, offset)
local delta = offset - previous
local halfpage = 0.5 * page.width
local change = math.abs(delta) - page.width
if (previous == 0) or (math.abs(cha... | nilq/small-lua-stack | null |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:25' using the latest game version.
NOTE: This file should only be used as IDE support; it should NOT be distributed with addons!
****************************************************************************
CONTENTS OF THIS FILE IS COPYRI... | nilq/small-lua-stack | null |
digiline_send("monitor1", {"set_pixel",5,5,15}) | nilq/small-lua-stack | null |
local EditorScene = require("core.EditorScene")
---------------------------------------------------------------------------------
--
-- @type BaseEditorScene
--
---------------------------------------------------------------------------------
local BaseEditorScene = Class( EditorScene, "BaseEditorScene" ):FIELDS{
F... | nilq/small-lua-stack | null |
local LINE_HEIGHT = 12.65
local PADDING = 4
local env16 = Inspect.System.Secure ~= nil
-- Helper Functions
local function countLines(text)
local count = 1
for n in text:gmatch("[\r\n]") do
count = count + 1
end
return count
end
local function resizeToText(frame, text)
local lineCount = countLines(text... | nilq/small-lua-stack | null |
return {
add = {
description = "Add two values together",
parameters = { "number", "number" },
result = "number",
parse = function(params, logic)
local param1 = params[1]
local param2 = params[2]
return function(entity, current)
return logic.resolve(param1, entity, current) +... | nilq/small-lua-stack | null |
local t = require( "taptest" )
local isxdigit = require( "isxdigit" )
t( isxdigit( "0123456789abcdefABCDEF" ), true )
res, pos = isxdigit( "" )
t( res, false )
t( 0, pos, 0 )
res, pos = isxdigit( "abcdefghABCDEFGH" )
t( res, false )
t( pos, 7 )
res, pos = isxdigit( "ABCDEFGHabcdefgh" )
t( res, false )
t( pos, 7 )
... | nilq/small-lua-stack | null |
----
-- Upload tcpdump to the CDR Server
----
uuid = argv[1];
duration = argv[2];
filters = argv[3];
if filters==nil then filters = "udp" end
api = freeswitch.API();
dump_file = "/recordings/"..uuid..".pcap";
cdr_url = freeswitch.getGlobalVariable("cdr_url").."/sys/tcp_dump";
freeswitch.consoleLog("info", "[DumpUploa... | nilq/small-lua-stack | null |
local Data = require('__stdlib__/stdlib/data/data')
-- (( No Artillery Reveal ))--
--[[
"name": "NoArtilleryMapReveal",
"title": "NoArtilleryMapReveal",
"author": "JohnTheCF",
"description": "Make artillery projectiles to not reveal map."
--]] --
if settings.startup['picker-no-artillery-reveal'].value ... | nilq/small-lua-stack | null |
return {
name = "ControlD-Malware",
label = _("ControlD (Block Malware)"),
resolver_url = "https://freedns.controld.com/p1",
bootstrap_dns = "76.76.2.1,2606:1a40::1",
help_link = "https://kb.controld.com/tutorials",
help_link_text = "ControlD"
}
| nilq/small-lua-stack | null |
local util = require 'util'
local function create(x, y)
local obj = {x = x; y = y}
obj.interface = 'fire'
obj.visible = true
obj.lengths = {}
obj.length = 10
obj.dt = 0
obj.id = util.gen_id()
for i = 1, obj.length do
obj.lengths[i] = { 0, 0, 0 }
end
function obj:u... | nilq/small-lua-stack | null |
local path = require "nvim-lsp-installer.path"
local fs = require "nvim-lsp-installer.fs"
local Data = require "nvim-lsp-installer.data"
local installers = require "nvim-lsp-installer.installers"
local std = require "nvim-lsp-installer.installers.std"
local platform = require "nvim-lsp-installer.platform"
local process... | nilq/small-lua-stack | null |
--[[
Name: LibDogTag-3.0
Revision: $Rev$
Author: Cameron Kenneth Knight (ckknight@gmail.com)
Website: http://www.wowace.com/
Description: A library to provide a markup syntax
]]
local MAJOR_VERSION = "LibDogTag-Unit-3.0"
local MINOR_VERSION = 90000 + (tonumber(("20160527051845"):match("%d+")) or 3333333333333... | nilq/small-lua-stack | null |
mapping = { bar = "wrong type of mapping" }
| 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.