content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
local reconcileModule = require('reactor.reconcile')
local reconcile = reconcileModule()
describe('#reconcile', function()
describe('errors', function()
it('throws an error when called without a table as the first argument', function()
expect(function() reconcile(nil) end)
.to.fail()
expect(... | nilq/small-lua-stack | null |
--[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
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://w... | nilq/small-lua-stack | null |
local life_state = require 'src/ConwaysGameOfLife/life_state_enum'
describe('life state', function()
it('alive should equal 1 and dead should equal 0', function()
assert.are.equal(1, life_state.alive)
assert.are.equal(0, life_state.dead)
end)
end)
| nilq/small-lua-stack | null |
local playsession = {
{"Nate66873", {593861}},
{"doggycrap55", {2936}},
{"skatordude", {587024}},
{"Creep-Sama", {580383}},
{"Terarink", {580029}},
{"hyunbeen", {566756}},
{"Emera66208", {563977}},
{"sb22284", {563363}},
{"Morgan3rd", {389007}},
{"RashiNerha", {4487}},
{"PortalMaster555", {140435}},
{"Crazy... | nilq/small-lua-stack | null |
local PEG = require"Sisyphus.Compiler".Objects.Nested.PEG
local Vlpeg = require"Sisyphus.Vlpeg"
return {
Alpha = PEG.Range("az","AZ");
GetEnvironment = PEG.Pattern(Vlpeg.Args(1));
Whitespace = PEG.Select{PEG.Pattern"\r\n", PEG.Pattern"\n", PEG.Set" \t"};
}
| nilq/small-lua-stack | null |
local xr, yr = guiGetScreenSize()
local gymMarkers = {
{1954.63,2314.79,15, 0,0}, -- Gym in LV ID 1
{756.94,-47.69,999.78, 6,0}, -- Gym in SF ID 2
{2250.11,-1719.23,12, 0,0} -- Gym in LS ID 3
}
-- Creating the GUI
gymWindow = guiCreateWindow((xr / 2) - (250 / 2), (yr / 2) - (350 / 2),312,179,"AUR ~ Fighting style sho... | nilq/small-lua-stack | null |
function love.conf(t)
t.window.title = "EightyOneCells"
t.window.width = 32 * 9
t.window.height = 32 * 9
end
| nilq/small-lua-stack | null |
local awful = require("awful")
local beautiful = require("beautiful")
local wibox = require("wibox")
local gears = require("gears")
local icons = require("theme.icons")
local dpi = beautiful.xresources.apply_dpi
local clickable_container = require("widget.clickable-container")
local task_list = require("widget.task-lis... | nilq/small-lua-stack | null |
ESX = nil
local CopsConnected = 0
local PlayersHarvestingCoke = {}
local PlayersTransformingCoke = {}
local PlayersSellingCoke = {}
local PlayersHarvestingMeth = {}
local PlayersTransformingMeth = {}
local PlayersSellingMeth = {}
local PlayersHarvestingWeed = {}
local PlayersTr... | nilq/small-lua-stack | null |
Model = require 'model'
| nilq/small-lua-stack | null |
package("vtk")
set_homepage("https://vtk.org/")
set_description("The Visualization Toolkit (VTK) is open source software for manipulating and displaying scientific data.")
set_license("BSD-3-Clause")
add_urls("https://www.vtk.org/files/release/$(version).tar.gz", {version = function (version)
... | nilq/small-lua-stack | null |
--[[
Melee Ability - Client
v1.2
by: standardcombo
Handles spawning of VFX for a melee ability.
Calibration
===========
The VFX that appear when the weapon attacks can be adjusted so their
position and rotation better correlate with the player animations.
The idea behind calibration is to play in preview... | nilq/small-lua-stack | null |
AuctionatorScrollListLineRecentsMixin = CreateFromMixins(AuctionatorScrollListLineMixin)
function AuctionatorScrollListLineRecentsMixin:InitLine()
Auctionator.EventBus:RegisterSource(self, "Recents List Line Item")
Auctionator.EventBus:Register(self, {
Auctionator.ShoppingLists.Events.ListSearchStarted,
... | nilq/small-lua-stack | null |
local _M=
{
mContext=nil,
}
_M.new=function()
local p={}
setmetatable(p,_M)
_M.__index=_M
p.mContext=oTRandom_Create()
return p
end
_M.destory=function(t)
if t and t.mContext then
oTRandom_Destory(t.mContext)
t.mContext=nil
t=nil
end
end
_M.__gc=function(t)
... | nilq/small-lua-stack | null |
-- prepare predefined structure
dofile('/usr/local/bin/bamboo_handler')
module(..., package.seeall)
local json = require 'cjson'
local Form = require 'bamboo.form'
local borrowed = bamboo.EXPORT_FOR_TESTING
local CONFIG_FILE = "settings.lua"
local TEMPLATES = "views/"
-- These globals are used to implement fake st... | nilq/small-lua-stack | null |
Warlock_ActionTable = nil;
Warlock_SaveData = nil;
Warlock_Data = nil;
local Warlock_Buttons = {};
Warlock_PlayerTalentInfoDatas = {};
local info = GetInterfaceInfo();
local target_spellname = ""; -- 目标正在施法的法术名称
local target_count = 0; -- 目标个数
local target_table = {};
local dynamicMicroID = 72;
local pl... | nilq/small-lua-stack | null |
-- shows the actual (clock) end time of a file when played. So you have a definitive end time rather than calculating the time
function descriptor()
return {
title = "Show Real End Time",
version = "0.0.1",
author = "David Brown",
capabilities = { "playing-listener" }
}
end
function activate()
u... | nilq/small-lua-stack | null |
GUIEditor = {
window = {},
staticimage = {},
label = {}
}
bGuiOpen = false
addEvent("sb_showAchievements")
function toggleAchievementGUI(key, keyState)
local screenW, screenH = guiGetScreenSize()
if keyState ~= "down" then if keyState then return end end
if bGuiOpen == false then
bGuiOpen = true
tr... | nilq/small-lua-stack | null |
local KUI, E, L, V, P, G = unpack(select(2, ...))
local LP = KUI:GetModule("LocPanel")
local T = LibStub('LibTourist-3.0');
-- Credits: ElvUI_LocationPlus - Benik
local format, tonumber, pairs = string.format, tonumber, pairs
local GetBindLocation = GetBindLocation
local C_Map_GetBestMapForUnit = C_Map.GetBestMapFor... | nilq/small-lua-stack | null |
-- ============================= --
-- Copyright 2019 FiatAccompli --
-- ============================= --
print("****** toppanel_plugin2 is live! *******");
ContextPtr:SetSizeY(25);
ContextPtr:SetSizeX(Controls.Plugin:GetSizeX()); | nilq/small-lua-stack | null |
if not modules then modules = { } end modules ['mlib-ctx'] = {
version = 1.001,
comment = "companion to mlib-ctx.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files",
}
-- for the moment we h... | nilq/small-lua-stack | null |
--[[
Data class for Embedding Net
Copyright 2016 Xiang Zhang
--]]
local class = require('pl.class')
local torch = require('torch')
local parent = require('glyphnet/data')
local Data = class(parent)
-- Constructor for Data
-- config: configuration table
-- .file: file for data
-- .batch: batch of data
-- .repl... | nilq/small-lua-stack | null |
UTIL = UTIL or require "util"
Fonts = Fonts or require "fonts"
Enums = Enums or require "enums"
local Elements = Enums.Elements
Modules = Modules or require "modules"
local List = Modules.List
local Vec = Modules.Vec
local Key = Modules.Key
local function collisionResolve(obj, col)
if col == nil then
ret... | nilq/small-lua-stack | null |
--[[
Magic_ColorGrid v1.0.2
MIT License
Copyright 2020 Thomas Baumann
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... | nilq/small-lua-stack | null |
-- SYNTAX TEST "Packages/Lua/Lua.sublime-syntax"
--COMMENTS
-- Foo!
-- ^^^^^^^ comment.line
-- ^^ punctuation.definition.comment
--[[ Foo! ]]
-- ^^^^^^^^^^^^ comment.block
-- ^^^^ punctuation.definition.comment.begin
-- ^^ punctuation.definition.comment.end
--[=[ Foo! ]] ]=]
-- ^^^^^^^^... | nilq/small-lua-stack | null |
local baseTemp = 37.0 -- base body heat
local isLosingBlood = false
local curWeatherTemp = 37.0
local curWeather, curWeatherTemp = 0, 0
local weatherTemps = {
{weather = "CLEAR", temp = 37.0}, -- weather name and avg body temp
{weather = "EXTRASUNNY", temp = 37.3},
{weather = "CLOUDS", temp = 37.0},
{weather = "OV... | nilq/small-lua-stack | null |
object_tangible_item_publish_gift_magic_painting_8 = object_tangible_item_shared_publish_gift_magic_painting_8:new {
}
ObjectTemplates:addTemplate(object_tangible_item_publish_gift_magic_painting_8, "object/tangible/item/publish_gift_magic_painting_8.iff")
| nilq/small-lua-stack | null |
glasses = require("component").glasses
widget = glasses.addCustom2D()
widget.addAutoTranslation(50, 50)
widget.addScale(10, 10, 10)
widget.setCulling(false)
widget.setGLMODE("TRIANGLE_STRIP")
widget.addVertex(0.0, 0.0, 0.0)
widget.addVertex(0.0, 1.0, 0.0)
widget.addVertex(1.0, 1.0, 0.0)
widget.addVertex(1.0, 0.0, 0.0)... | nilq/small-lua-stack | null |
print("----------------------------------------")
local cosock = require "cosock"
assert(cosock, "require something")
assert(type(cosock) == "table", "cosock is table")
for k,v in pairs({}) do print(k,v) end
local socket = cosock.socket --[[
local socket = require "socket"
--]]
local function spawn_client(ip, port)... | nilq/small-lua-stack | null |
list.Set( "clothing_system", "drumpfhat", {
Developing = true,
Name = "Donald Trump hat",
Category = "Hats",
WireModel = "models/noble/drumpf/drumpfhat.mdl",
FoldedModel = "models/noble/drumpf/drumpfhat.mdl",
PlayerBase = "hl2_player",
EquipSound = {
"clothing_system/hat/1.wav",
... | nilq/small-lua-stack | null |
--[[
GD50
Angry Birds
Author: Colton Ogden
cogden@cs50.harvard.edu
]]
StartState = Class{__includes = BaseState}
function StartState:init()
self.background = Background()
self.world = love.physics.newWorld(0, 300)
-- ground
self.groundBody = love.physics.newBody(self.world, 0, VIRTUA... | nilq/small-lua-stack | null |
local _=require'leda'
local events={}
return _.stage{
handler=function(...)
local ev={...}
table.insert(events,ev)
if #events==self.size then
leda.push(events)
events={}
end
end,
serial=true,
init=function()
require 'table'
end,
name="Spatial window",
bind=function(self,out)
assert(out[1],"Ou... | nilq/small-lua-stack | null |
-- Copyright 2017-2018 Dirk Brenken (dev@brenken.org)
-- This is free software, licensed under the Apache License, Version 2.0
local fs = require("nixio.fs")
local uci = require("luci.model.uci").cursor()
local http = require("luci.http")
local trmiface = uci:get("travelmate", "global", "trm_iface") or ... | nilq/small-lua-stack | null |
local State = require('src.states.state')
local StateMenu = class("StateMenu", State)
function StateMenu:initialize()
States.State.initialize(self, 'Menu')
self.input = baton.new(Config.Controls)
end
return StateMenu
| nilq/small-lua-stack | null |
-- Copyright 2018 Magazino GmbH
--
-- 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 |
-------------------------------------------------------------------------------
--[Belt Brush]--
-------------------------------------------------------------------------------
local Event = require('__stdlib__/stdlib/event/event')
local Player = require('__stdlib__/stdlib/event/player')
local Position = require('__std... | nilq/small-lua-stack | null |
local M = {}
local last_results = {}
M.filter_request = function(method, opts)
local params = vim.lsp.util.make_position_params()
handler = opts.handler or vim.lsp.handlers[method]
if not handler then
vim.notify("No default handler for method " .. method, "error")
return
end
vim.... | nilq/small-lua-stack | null |
SILE.hyphenator.languages["en"] = {}
SILE.hyphenator.languages["en"].patterns = {".ach4", ".ad4der", ".af1t", ".al3t", ".am5at", ".an5c", ".ang4",
".ani5m", ".ant4", ".an3te", ".anti5s", ".ar5s", ".ar4tie", ".ar4ty",
".as3c", ".as1p", ".as1s", ".aster5", ".atom5", ".au1d", ".av4i",
".awn4", ".ba4g", ".ba5na", ".bas4e",... | nilq/small-lua-stack | null |
dofile("inputs/00_ret.lua")
dofile("inputs/01_mov.lua")
dofile("inputs/02_cbr_br.lua")
dofile("inputs/03_cbr_br.lua")
dofile("inputs/04_cbr_br.lua")
dofile("inputs/05_cbr_br.lua")
dofile("inputs/06_storeglobal.lua")
dofile("inputs/07_loadglobal.lua")
dofile("inputs/08_loadstoreglobal.lua")
dofile("inputs/09_call.lua")
... | nilq/small-lua-stack | null |
local MessageData = Classes.MessageData
Ext.RegisterConsoleCommand("adddeltamod", function(command, slot, deltamod)
if slot == nil then
slot = "Weapon"
end
if deltamod == nil then
deltamod = "Boost_Weapon_Status_Set_Petrify_Sword"
end
local target = CharacterGetHostCharacter()
local item = CharacterGetEquipp... | nilq/small-lua-stack | null |
require("__5dim_core__.lib.nuclear.generation-nuclear-reactor")
local speed = 1
local modules = 2
local energy = 40
local emisions = 10
local techCount = 500
-- Electric furnace 01
genNuclearReactors {
number = "01",
subgroup = "nuclear-reactor",
craftingSpeed = speed,
moduleSlots = modules,
energ... | nilq/small-lua-stack | null |
-- Creator:
-- EarthSalamander, October 3rd, 2019
-- AltiV, January 18th, 2020
-- Editors:
-- Shush, April 14th, 2020
---------------------
-- HELPER FUNCTION --
---------------------
function IsSpiderling(unit)
if unit:GetUnitName() == "npc_dota_broodmother_spiderking" or unit:GetUnitName() == "npc_dota... | nilq/small-lua-stack | null |
return function(scene, dt)
for event in pairs(scene:entities_with('event', 'death')) do
local entity = event.death.entity
if entity.drops and entity.position then
local drops = entity.drops
local total_weight = 0
local probabilities = {}
for _, weight in pairs(drops) do
total_... | nilq/small-lua-stack | null |
--[[
Copyright (C) 2013-2015 Draios inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without e... | nilq/small-lua-stack | null |
-- 2004 Bona et al "A symmetry-breaking mechanism for the Z4 general-covariant evolution system"
local class = require 'ext.class'
local table = require 'ext.table'
local range = require 'ext.range'
local symmath = require 'symmath'
local Tensor = symmath.Tensor
local Z4 = class()
function Z4:init(nrCodeGen, useShi... | nilq/small-lua-stack | null |
require("util/toolKit");
TimeHandler = class();
TimeHandler.Weekday = {
["Monday"] = "星期一",
["Tuesday"] = "星期二",
["Wednesday"] = "星期三",
["Thursday"] = "星期四",
["Friday"] = "星期五",
["Saturday"] ="星期六",
["Sunday"] = "星期天",
}
TimeHandler.handler = function(time1,time2)
time1 = tonumber(time1) or 0;
... | nilq/small-lua-stack | null |
local skynet = require "skynet"
require "skynet.manager"
local global_map = {}
local command = {}
function command.get(k)
skynet.trace("k -> "..k)
return global_map[k]
end
function command.set(k , v)
skynet.trace("k -> "..k..", v -> "..v)
global_map[k] = v
local last = global_map[k]
return ... | nilq/small-lua-stack | null |
local clog = require 'script.log'
local lpack = require 'lpack'
local clients = require 'method.clients'
local log = clog 'log/error.log'
local caches = {}
return function (token, stream)
local client = clients.getClient(token)
local name, errq = lpack.unpack('zz', stream)
if errq:sub(1, 1) ~= '"' th... | nilq/small-lua-stack | null |
--Tools
local _Util = {}
local socket = require("socket")
local http = require("socket.http")
local ltn12 = require("ltn12")
local cjson = require("cjson")
function _Util.post(url, appid, eventArrayJson, isDebug, debugOnly)
if not isDebug and #eventArrayJson == 0 then
return "", ""
end
local reque... | nilq/small-lua-stack | null |
-- Need a Math equivalent of this which can be optimized.
-- Need limits on this call
local max_key = KEYS[1]
local min_key = KEYS[2]
local query_start = tonumber(ARGV[1])
local query_end = tonumber(ARGV[2])
local result = {}
local minima = redis.call("ZRANGEBYSCORE",min_key,"-inf",query_end,"WITHSCORES")
local maxima... | nilq/small-lua-stack | null |
local trigger = script:GetCustomProperty("Trigger"):WaitForObject()
local ROOT = script:GetCustomProperty("RPGQuestGiver"):WaitForObject()
local NPCQuest = ROOT:GetCustomProperty("questID")
local Disappear = ROOT:GetCustomProperty("DisappearOnAccept") or false
local QuestDialog = script:GetCustomProperty("QuestGiverPa... | nilq/small-lua-stack | null |
local colors = {
bg = '#1B1C24',
fg = '#D4D2CF',
fg2 = '#c3c1be',
bg2 = '#14151b',
bg3 = '#262833',
bg4 = '#32343F',
cyan = '#9BC5AF',
green = '#bfd066',
}
require("bufferline").setup {
options = {
always_show_bufferline = true,
show_tab_indica... | nilq/small-lua-stack | null |
#!/usr/bin/env lua
local lpeg
if fengari then
lpeg = dofile('lulpeg.lua')
else
lpeg = require('lpeg')
local _inspect = require "inspect"
function inspect (e) print(_inspect(e)) end
end
-------------------------- [Parser] ----------------------------
lpeg.locale(lpeg)
local sp1 = lpeg.space
local space = (sp1^1 ... | nilq/small-lua-stack | null |
local BasePlugin = require "kong.plugins.base_plugin"
local URLRewriter = BasePlugin:extend()
URLRewriter.PRIORITY = 700
function URLRewriter:new()
URLRewriter.super.new(self, "url-rewriter")
end
function resolveUrlParams(requestParams, url)
for paramValue in requestParams do
local requestParamValue = ngx.c... | nilq/small-lua-stack | null |
function love.load()
--set default constants
love.graphics.setDefaultFilter('nearest', 'nearest')
StoneMoSScreen = require "libs.StoneMoSScreen"; StoneMoSScreen.new(true, 800, 600)
gameDirector = require "controllers.GameDirector":new()
love.graphics.setFont(gameDirector:getFonts().tovariSans)
s... | nilq/small-lua-stack | null |
project "Ashes"
currentSourceDir = path.join( sourceDir, "Ashes", "Ashes" )
currentBinaryDir = path.join( binaryDir, "Ashes", "Ashes" )
kind( "StaticLib" )
targetdir( path.join( outputDir, "%{cfg.architecture}", "%{cfg.buildcfg}", staticLibDir ) )
location( currentBinaryDir )
includedirs{
path.join( currentBinaryDi... | nilq/small-lua-stack | null |
-- local dbg = require("debugger")
-- dbg.auto_where = 2
local stack = require'tools.stack'
local subject
describe("empty", function()
before_each(function()
subject = stack.new()
end)
it("is empty", function()
assert.is_true(subject:is_empty())
end)
it("but that changes if we push", function()
s... | nilq/small-lua-stack | null |
replication_connect_timeout = box.cfg.replication_connect_timeout
replication_connect_quorum = box.cfg.replication_connect_quorum
box.cfg{replication="12345", replication_connect_timeout=0.1, replication_connect_quorum=1}
--
-- gh-3760: replication quorum 0 on reconfiguration should return
-- from box.cfg immediately.... | nilq/small-lua-stack | null |
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
local mod_storage = minetest.get_mod_storage()
local tardis_context = {}
-- Functions are fairly self explanitory, get or set the specified value.
function tardis.set_nav(pos, name)
local pos_string = (minetest.pos_to... | nilq/small-lua-stack | null |
local entity = {}
entity = {}
entity["2way"] = {}
entity["2way"]["LoversAeon"] = [[HangedMan]]
entity["2way"]["DeathMoon"] = [[Star]]
entity["2way"]["EmpressJustice"] = [[Emperor]]
entity["2way"]["MagicianTemperance"] = [[Death]]
entity["2way"]["TowerAeon"] = [[Moon]]
entity["2way"]["LoversStrength"] = [[Hierophant]]
e... | nilq/small-lua-stack | null |
local x = {
require "proto.ping"
}
return x
| nilq/small-lua-stack | null |
return {
config = {
menu = {
weight_graph = {
menu = {
name = "Weight Graph",
},
}
},
option = {
weight_graph = {
show_weight_graph = {
name = "Show Weight Graph",
variants = {
... | nilq/small-lua-stack | null |
local path = mod_loader.mods[modApi.currentMod].scriptPath
local achvApi = require(path .."achievements/api")
local modUtils = require(path .."modApiExt/modApiExt")
local switch = require(path .."libs/switch")
local this = {}
local bosses = {
"swarmer",
"roach",
"spitter",
"wyrm",
"crusher"
}
local toasts = {}
... | nilq/small-lua-stack | null |
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by shuieryin.
--- DateTime: 12/01/2018 10:17 PM
---
local Plot = require 'itorch.Plot'
local color = { 'red', 'green', 'blue' }
function runkMeans(X, initial_centroids, max_iters, isPlot)
--RUNKMEANS runs the K-Means algorithm on data matrix X, ... | nilq/small-lua-stack | null |
--[[
Look README.md for look the reserved action/unique
]]
CorpseAction = {
[20001] = {
itemId = false,
itemPos = {{x = xxxxx, y = xxxxx, z = xx}}
},
}
CorpseUnique = {
[20001] = {
itemId = xxxx,
itemPos = {x = xxxxx, y = xxxxx, z = xx}
},
}
| nilq/small-lua-stack | null |
-- Petit script pour envoyer quelque chose sur un serveur WEB
print("\n web_cli.lua zf190616.1519 \n")
function disp_send()
print("web_cli: ")
-- ztemp1=11 ztemp2=12 ztemp3=13
zurl=thingspeak_url_update.."field1="..tostring(ztemp1).."&field2="..tostring(ztemp2).."&field3="..tostring(ztemp3)
... | nilq/small-lua-stack | null |
-- 8-Speed Gearboxes
-- Weight
local Gear8SW = 100
local Gear8MW = 200
local Gear8LW = 400
local StWB = 0.75 --straight weight bonus mulitplier
-- Torque Rating
local Gear8ST = 340
local Gear8MT = 1000
local Gear8LT = 10000
local StTB = 1.25 --straight torque bonus multiplier
-- Inline
ACF_DefineGearbox( "8Gear-L-... | nilq/small-lua-stack | null |
-- Copyright (c) 2021 Kirazy
-- Part of Artisanal Reskins: Bob's Mods
--
-- See LICENSE in the project directory for license information.
-- Check to see if reskinning needs to be done.
if not (reskins.bobs and reskins.bobs.triggers.power.entities) then return end
-- Set input parameters
local inputs = {
type = "... | nilq/small-lua-stack | null |
local _ENV = TEST_CASE "test.addfile"
function test_from_file ()
local obj = Filter:new("md5")
obj:addfile("test/data/random1.dat")
is("a3f8e5cf50de466c81117093acace63a", bytes_to_hex(obj:result()),
"addfile() on random1.dat")
obj = Filter:new("md5")
obj:addfile("test/data/random1.dat")
... | nilq/small-lua-stack | null |
local server = require "nvim-lsp-installer.server"
local path = require "nvim-lsp-installer.path"
local Data = require "nvim-lsp-installer.data"
local std = require "nvim-lsp-installer.installers.std"
local platform = require "nvim-lsp-installer.platform"
local context = require "nvim-lsp-installer.installers.context"
... | nilq/small-lua-stack | null |
local K, C = unpack(select(2, ...))
local Module = K:GetModule("Skins")
local _G = _G
local table_insert = _G.table.insert
local GetInventoryItemQuality = _G.GetInventoryItemQuality
local GetInventoryItemTexture = _G.GetInventoryItemTexture
local GetItemQualityColor = _G.GetItemQualityColor
local hooksecuref... | nilq/small-lua-stack | null |
package("icu4c")
set_homepage("https://ssl.icu-project.org/")
set_description("C/C++ libraries for Unicode and globalization.")
add_urls("https://ssl.icu-project.org/files/icu4c/$(version)-src.tgz", {version = function (version)
return version .. "/icu4c-" .. (version:gsub("%.", "_"))
... | nilq/small-lua-stack | null |
-- Creates a proxy via rawset.
-- Credit goes to vrld: https://github.com/vrld/Princess/blob/master/main.lua
-- easier, faster access and caching of resources like images and sound
-- or on demand resource loading
local function Proxy(f)
return setmetatable({}, {__index = function(self, k)
local v = f(k)
rawset(se... | nilq/small-lua-stack | null |
local o = require("nvim-lsp-ts-utils.options")
local api = vim.api
local lsp = vim.lsp
local M = {}
M.severities = {
error = 1,
warning = 2,
information = 3,
hint = 4,
}
M.tsserver_fts = {
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"javascript.jsx",
"ty... | nilq/small-lua-stack | null |
TownTab = {}
TownTab.__index = TownTab
setmetatable(TownTab, {
__index = Tab,
__call = function (cls, ...)
local self = setmetatable({}, cls)
self:_init(...)
return self
end,
})
function TownTab:_init()
Tab._init(self)
end
function TownTab.draw(self)
Tab.draw(self)
end
function TownTab.processCo... | nilq/small-lua-stack | null |
--- add dependant job
-- @param {string} jid Job (parent) JID
-- @param {string} dependant_jid Dependant job JID
addDependantJob = function(jid, dependant_jid)
local key_jobs = 'bee:h:jobs:' .. jid
local parent_status = redis.call('hget', key_jobs, 'status')
if parent_status == false
or paren... | nilq/small-lua-stack | null |
local mod = {}
local aux = {}
mod.__index = mod
function mod.new(class)
return setmetatable({}, class)
end
function mod:add(func, ...)
table.insert(self, { func, ... })
end
function mod:match(str)
local from = 1
for i = 1, #self do
from = self[i][1](str, from, self[i])
if from == nil then
ret... | nilq/small-lua-stack | null |
return {
b = {
name = "Buffer",
w = { '<cmd>bw<CR>', 'Wipeout buffer' }
}
}
| nilq/small-lua-stack | null |
local SCREEN_W = 320
local SCREEN_H = 240
local BOOT_ANIM_W = 64
local BOOT_ANIM_H = 64
local SHEET_W = 8
local FRAMES = 32
local SPEED = 12
local SKIP_INTRO = true
local DEFAULT_APP = "apps/punkémon.nib"
function init()
-- Inicializa o serviço de terminal
--local tty, err = kernel.exec("apps/system/core/... | nilq/small-lua-stack | null |
-- lua-optparse [1]
-- Lua-based partial reimplementation of Python's optparse[2-3] command-line
-- parsing module.
--
-- Note: Python also supports getopt[4].
--
-- References
-- [1] http://lua-users.org/wiki/CommandLineParsing
-- [2] http://docs.python.org/lib/optparse-defining-options.html
-- [3] http://blog.doug... | nilq/small-lua-stack | null |
/*
* @package : rlib
* @module : hook
* @author : Richard [http://steamcommunity.com/profiles/76561198135875727]
* @copyright : (C) 2020 - 2020
* @since : 3.0.0
* @website : https://rlib.io
* @docs : https://docs.rlib.io
*
* MIT License
*
* THE SO... | 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 |
-- Handles almost everything server related in SLN
-- Sublivion
-- Services
local ServerStorage = game:GetService("ServerStorage")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local TweenService = game:GetServ... | nilq/small-lua-stack | null |
-[[
Commissioned By: Reverse
Produced By: Tasid
--]]
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel("models/humans/group01/male_04.mdl")
self:SetHullType(HULL_HUMAN)
self:SetHullSizeNormal()
self:SetNPCState(NPC_STATE_SCRIPT)
self:SetSolid(SO... | nilq/small-lua-stack | null |
--- 游戏客户端数据同步
--- @module Client Sync Data, Client-side
--- @copyright Lilith Games, Avatar Team
--- @author Yuancheng Zhang
local ClientDataSync = {}
-- Localize global vars
local FrameworkConfig, MetaData = FrameworkConfig, MetaData
-- 客户端私有数据
local rawDataGlobal = {}
local rawDataPlayer = {}
--- 打印数据同步日志
local Pr... | nilq/small-lua-stack | null |
return function()
local List = {
tag = "list";
width = 0;
}
local child
function List:append(node)
if node.width then
if not child then
child = {
tag = "sublist";
width = 0;
show = self.s... | nilq/small-lua-stack | null |
------------------------------------
-- ID: 5736
-- Lin. Purse (Alx.)
-- Breaks up a Linen Purse
-----------------------------------------
require("scripts/globals/msg")
-----------------------------------------
function onItemCheck(target)
local result = 0
if target:getFreeSlotsCount() == 0 then
resul... | nilq/small-lua-stack | null |
-- TODO:
-- Make all WG.SB stuff as a config so there's no direct dependency
-- Save/load user config
-- Make neat UI icons for the controls
-- Better toggle (On/Off) buttons
-- Put it on a repository, load it like other libs
-- Fix fontsize changing on select
-- Pop up on new warning (option)
-- Button to uplo... | nilq/small-lua-stack | null |
function item_blink_staff_blink(keys)
local ability = keys.ability
local caster = keys.caster
local target
if not ability:GetCursorTargetingNothing() then
target = ability:GetCursorTarget()
end
local point = ability:GetCursorPosition()
local MaxBlinkRange = keys.MaxBlinkRange
local SelectedUntiModifierName = ... | nilq/small-lua-stack | null |
do -- Ricochet/Penetration materials
local Materials = {}
local MatCache = {}
local Lookup = {}
local Count = 0
local function GetMaterial(Path)
if not Path then return end
if MatCache[Path] then return MatCache[Path] end
local Object = Material(Path)
MatCache[Path] = Object
return Object
end
loca... | nilq/small-lua-stack | null |
-- connection of server/client
local connection = {}
connectedClients = {}
local maxPlayers = 0
local numOfPlayers = 0
function connection.initServer(host, port, maxConnections)
local tcpServer = socket.bind(host, port)
maxPlayers = maxConnections
if tcpServer == nil then
print(err)
else
local addr, p = tcp... | nilq/small-lua-stack | null |
coins = {}
-- создадим монетку ---
function spawnCoin(x, y)
--- создаем монетку в заданных координатах
local coin = {}
coin.x = x
coin.y = y
coin.collected = false
--- добавляем размеры решетки, которые будут аннимироваться
--- размер png-файла с монетками coin_sheet.png 123 на 126 pix,
--- та... | nilq/small-lua-stack | null |
if (mode() == "load" or mode() == "show" ) then
if ( not (isloaded("noweb") ) ) then
load("noweb")
end
if ( not (isloaded("git") ) ) then
load("git")
end
end
| nilq/small-lua-stack | null |
require('os')
local path_sep = vim.loop.os_uname().sysname == "Windows" and "\\" or "/"
local function path_join(...)
return table.concat(vim.tbl_flatten {...}, path_sep)
end
vim.cmd('filetype plugin indent on')
if vim.fn.has('vim_starting') == 1 then vim.cmd('syntax enable') end
vim.o.nu = true
vim.o.mouse = 'a'
... | nilq/small-lua-stack | null |
object_tangible_furniture_decorative_wod_pro_sm_tree_08 = object_tangible_furniture_decorative_shared_wod_pro_sm_tree_08:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_decorative_wod_pro_sm_tree_08, "object/tangible/furniture/decorative/wod_pro_sm_tree_08.iff")
| nilq/small-lua-stack | null |
-- engine bustedhelper equivalent for game project
-- it adds stage_intro common module, since the original bustedhelper.lua
-- is part of engine and therefore cannot reference game modules
-- it also adds visual stage_intro add-on to simulate main providing it to any stage_intro scripts
-- this is useful even when t... | nilq/small-lua-stack | null |
local wibox = require('wibox')
local awful = require('awful')
local gears = require('gears')
local beautiful = require('beautiful')
local watch = awful.widget.watch
local dpi = beautiful.xresources.apply_dpi
local icons = require('theme.icons')
local meter_name = wibox.widget {
text = 'Temperature',
font = 'Hack Ner... | nilq/small-lua-stack | null |
local Client = require("client")
local Server = require("server")
local luatika = {}
local metatable = {}
local methods = {}
local VERSION = "0.0.1"
local TIKA_PATH = os.getenv("APACHE_TIKA_SERVER_PATH")
local DEFAULT_HOST = "127.0.0.1"
local DEFAULT_PORT = "9998"
function metatable.__index(tika, key)
return m... | nilq/small-lua-stack | null |
--------------------------------
-- @module PixelFormat
-- @parent_module ccb
--- Enum ccb.PixelFormat
---@class ccb.PixelFormat
local PixelFormat = {}
ccb.PixelFormat = PixelFormat
---@type number
PixelFormat.AUTO = 0
---@type number
PixelFormat.BGRA8888 = 1
---@type number
PixelFormat.RGBA8888 = 2
---@type number
... | nilq/small-lua-stack | null |
-- Vlasov-Maxwell solver
----------------------------------
-- Problem dependent parameters --
----------------------------------
log = Lucee.logInfo
polyOrder = 2 -- polynomial order
epsilon0 = 1.0 -- permittivity of free space
mu0 = 1.0 -- permiability of free space
lightSpeed = 1/math.sqrt(mu0*epsilon0) -- speed... | 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.