content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
local brute = require "brute"
local creds = require "creds"
local membase = require "membase"
local shortport = require "shortport"
local stdnse = require "stdnse"
description = [[
Performs brute force password auditing against Couchbase Membase servers.
]]
---
-- @usage
-- nmap -p 11211 --script membase-brute
--
-- ... | nilq/small-lua-stack | null |
local floor, ceil = math.floor, math.ceil
local min, max = math.min, math.max
local util = require("util")
local base = require("layouts.base")
local simple = require("layouts.simple")
local grid_mt = require("grid_mt")
local mpp_util = require("mpp_util")
local coord_convert, coord_revert = mpp_util.coord_convert, mp... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Apollyon SE
-- Mob: Evil Armory
-----------------------------------
require("scripts/globals/limbus");
-----------------------------------
function onMobEngaged(mob,target)
GetMobByID(16933033):updateEnmity(target);
GetMobByID(16933034):updateEnmity(target);
Ge... | nilq/small-lua-stack | null |
Model2 = {
area,
length,
breadth,
}
function Model2:new(o, length, breadth)
o = o or {}
setmetatable(o, self)
self.__index = self
self.length = length or 0
self.breadth = breadth or 0
self.area = length*breadth
return o
end
function Model2:get()
return self.area;
end
retu... | nilq/small-lua-stack | null |
local config = {
[9017] = {
wallPositions = {
Position(33226, 31721, 11),
Position(33227, 31721, 11),
Position(33228, 31721, 11),
Position(33229, 31721, 11),
Position(33230, 31721, 11),
Position(33231, 31721, 11),
Position(33232, 31721, 11),
Position(33233, 31721, 11),
Position(33234, 3172... | nilq/small-lua-stack | null |
require "androidbutton"
local buttons = {}
local touchClicking = true --is clicking allowed (ex: it shouldn't be allowed during gameplay, because there's dedicated clicking buttons)
local controllingPlayer = 1
local androidSetPlayer
local resettools = function()
ANDROIDRIGHTCLICK = false
eyedroppertool = false
pa... | nilq/small-lua-stack | null |
local newInstance = Instance.new
local function build(modelData)
local model = newInstance("Model")
for _, partData in ipairs(modelData) do
local part = newInstance(partData.partType.instance)
part.Size = partData.size
part.CFrame = CFrame.lookAt(partData.position, partData.position + partData.lookAt)
part... | nilq/small-lua-stack | null |
-- Metal Melter for Minetest 0.5.0+
-- Copyright (c) 2018 Evert "Diamond" Prants <evert@lunasqu.ee>
local modpath = minetest.get_modpath("metal_melter")
metal_melter = {}
-- Melting database
dofile(modpath.."/meltable.lua")
-- Crafting components
dofile(modpath.."/components.lua")
-- Fluid bar for formspec
function... | nilq/small-lua-stack | null |
slot0 = class("GuildOfficeSelectTaskPage", import("...base.GuildBasePage"))
slot0.getTargetUI = function (slot0)
return "GuildTaskSelectBluePage", "GuildTaskSelectRedPage"
end
slot0.OnLoaded = function (slot0)
slot0.uilist = UIItemList.New(slot0:findTF("frame/bg/scrollrect/content"), slot0:findTF("frame/bg/scrollre... | nilq/small-lua-stack | null |
-----------------------------------
---- Mi MV Encounters ----
---- Written by Drafell 2007 ----
-----------------------------------
-- Start the script and leave it running.
enableAlerts(0); --don't change this
ships ={};
ships[430]={name="Legion Cruiser", path="ships\\mi\\cruiser\\legion\\sc_legion.prt"}; -- M... | nilq/small-lua-stack | null |
local Flags = {}
Flags.FIXED = 1
Flags.MATCHGRADE = 2
Flags.THREADED = 4
Flags.PORTED = 8
Flags.FOLDING = 16
Flags.EXTENDABLE = 32
return Flags
| nilq/small-lua-stack | null |
RE.viewpoint():setFOVy(45.000002)
RE.viewpoint().vpos:assign({5023.647316, 2305.585893, -1863.907754})
RE.viewpoint().vat:assign({1020.866260, -723.543574, 364.613501})
RE.viewpoint():update()
rootnode =RE.ogreRootSceneNode()
bgnode=RE.createChildSceneNode(rootnode , "Floor_layer1")
pNode=RE.createChildSceneNode(bgno... | nilq/small-lua-stack | null |
addEvent("giveMoney",true)
addEventHandler("giveMoney",getRootElement(),
function (amount, price)
exports.art_main:giveMoney(source, amount)
-- exports.art_main:takeArtPoint(playerSource, price)
end
)
function getMoney(playerSource)
return getElementData(playerSource, "char.bankMoney") or 0
end
addEv... | nilq/small-lua-stack | null |
local mod = get_mod("rwaon_talents")
PassiveAbilitySettings.rwaon_dr_3 = {
description = "career_passive_desc_dr_3a_2",
display_name = "career_passive_name_dr_3",
icon = "bardin_ranger_passive",
buffs = {
"bardin_ranger_passive",
"bardin_ranger_passive_increased_ammunition",
"ba... | nilq/small-lua-stack | null |
--[[
PUC-Rio
INF1405 - Construção de Sistemas 2015.2
Professor Edmundo Torreão
Gabriel de Quadros Ligneul 1212560
Exploradores de Andrômeda
LaserBeam.lua
--]]
local Class = require "Class"
local Rectangle = require "Rectangle"
local SpaceElement = require "SpaceElement"
local Vector = require ... | nilq/small-lua-stack | null |
local censor_config= create_setting("censor list", "censor_list.lua", {})
censor_config:load()
local censored_songs= censor_config:get_data()
function save_censored_list()
censor_config:save()
end
function add_to_censor_list(song)
if not song then return end
censor_config:set_dirty()
censored_songs[song_get_dir(s... | nilq/small-lua-stack | null |
Formation = "hexagon";
formationSlot({
0,
0,
0,
},{
0,
0,
1,
},{
0,
1,
0,
})
formationSlot({
0,
1.25,
0,
},{
0,
0,
1,
},{
0,
1,
0,
})
formationSlot({
1,
0.75,
0,
},{
0,
0,
1,
},{
0,
1,
0,
})
formationSlot({
1,
-0.75,
... | nilq/small-lua-stack | null |
local mock = require("luassert.mock")
local random = require("rubberduck.utils.random")
local file = require("rubberduck.utils.file")
local function assert_reads_correctly_when_content_is(contents)
io.open.returns({ read = function() return contents end, close = function() end })
local result = file.read("file.tx... | nilq/small-lua-stack | null |
--[[
TheNexusAvenger
Generates a base grass cell.
--]]
local RANDOM_SEED = 4302981239 --This number is completely random, but must be consistent accross clients for generation.
local Workspace = game:GetService("Workspace")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ReplicatedStorageProj... | nilq/small-lua-stack | null |
function moveTowardsTarget(gameObject)
offsetToTarget=gameObject.target-gameObject.pos
distToTarget=#offsetToTarget
speed=gameObject.speed
if (gameObject.speedMult!=nil) speed*=gameObject.speedMult
if distToTarget<speed then
gameObject.pos=gameObject.target
gameObject.vel=offsetToTar... | nilq/small-lua-stack | null |
local shinysName = {
"Blastoise", "Venusaur", "Butterfree", "Beedrill", "Pidgeot", "Rattata", "Raticate", "Raichu", "Golbat", "Paras", "Parasect", "Magmar", "Typhlosion", "Xatu", "Growlithe", "Arcanine", "Tentacruel", "Gengar", "Krabby", "Tauros",
"Kingler", "Cubone", "Horsea", "Seadra", "Weezing", "Scyther", "Pinsi... | nilq/small-lua-stack | null |
--------------------------------------------------------------------------------
-- Ящик с реле (ЯР-13A)
--------------------------------------------------------------------------------
Metrostroi.DefineSystem("YAR_13A")
function TRAIN_SYSTEM:Initialize()
-- Реле перегрузки (РПЛ)
self.Train:LoadSystem("RPL",... | nilq/small-lua-stack | null |
-- volume widget
local volume = {}
local io = io
local function get_volume ()
local fvol = io.popen("~/.config/awesome/bin/volume get")
local vol = fvol:read()
fvol:close()
return vol
end
function volume.closure ()
return function () return get_volume() end
end
return volume
| nilq/small-lua-stack | null |
require("mingw64")
workspace "WS_mkpixel"
configurations { "Debug", "Release" }
platforms { "l64" }
filter { "platforms:l64" }
system "linux"
architecture "x64"
project "mkpixel"
kind "ConsoleApp"
--kind "WindowedApp"
--kind "SharedLib"
language "C"
targetdir "bin/%{cfg... | nilq/small-lua-stack | null |
-- Constants
local ROUND_DURATION = 5000
local WHEEL_VISIBLE_SLOTS = 3
local EVENT_INTERVAl = 50
local EVENT_INTERVAl_FAST = 1
local SLOT_IDS = {}
SLOT_IDS.LEFTOVER = 1
SLOT_IDS.POKEBALL = 2
SLOT_IDS.GREATBALL = 3
SLOT_IDS.ULTRABALL = 4
SLOT_IDS.MASTERBALL = 5
SLOT_IDS.AMULETICON = 6
SLOT_IDS.LAST = SLOT_IDS.AMULETICO... | nilq/small-lua-stack | null |
function love.conf(t)
-- t.console = true
t.window.title = "Awesome Game v2"
end | nilq/small-lua-stack | null |
cfg.table("TestExLayout", function(tb)
tb.layout = ""; --避免循环嵌套,layout赋值为"",因为全局文件中设置了全局的layout
tb.sqls.Get2 = function (sk, tname)
return "select * from Person where name=@name"
end
end);
| nilq/small-lua-stack | null |
--Thanks rezecib!
local function CheckDlcEnabled(dlc)
-- if the constant doesn't even exist, then they can't have the DLC
if not GLOBAL.rawget(GLOBAL, dlc) then
return false
end
GLOBAL.assert(GLOBAL.rawget(GLOBAL, "IsDLCEnabled"), "Old version of game, please update (IsDLCEnabled function missin... | nilq/small-lua-stack | null |
--- The Peripheral API is for interacting with peripherals connected to the
-- computer, such as the Disk Drive, the Advanced Monitor and Monitor.
--
-- Each peripheral block has a name, either referring to the side the peripheral
-- can be found on, or a name on an adjacent wired network.
--
-- If the peripheral is ne... | nilq/small-lua-stack | null |
function initScore(score)
-- Make sure the score is a number
score = tonumber(score)
-- If the score is nil, set it to 0
if score == nil then
score = 0
end
-- Return the score
return score
end
| nilq/small-lua-stack | null |
-- Special thanks to JavaCafe01
local awful = require("awful")
local gears = require("gears")
local beautiful = require("beautiful")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local wibox = require("wibox")
local naughty = require("naughty")
local helpers = {}
function helper... | nilq/small-lua-stack | null |
-- ----------------------------------------------------------------------------
--
-- convert - convert a csv file to Lua's table format
--
-- ----------------------------------------------------------------------------
local trace = require("lib.trace") -- shortcut for tracing
local _frmt = string.format... | nilq/small-lua-stack | null |
mutant_bark_mite_queen = Creature:new {
objectName = "@mob/creature_names:mutant_bark_mite_queen",
socialGroup = "mite",
faction = "",
level = 38,
chanceHit = 0.39,
damageMin = 320,
damageMax = 350,
baseXp = 3824,
baseHAM = 8500,
baseHAMmax = 10300,
armor = 0,
resists = {165,165,20,155,155,-1,-1,-1,-1},
me... | nilq/small-lua-stack | null |
local thisFile = g.dir.library..'layer'
if (dbg) then dbg.file(thisFile) end
--------------------------------------------------------------------------------------------------
--****************************************************
function vchToTileWidth(vch)
local thisFunc = 'vchToTileWidth'
if (dbg) then dbg.func(... | nilq/small-lua-stack | null |
wrk.method = "POST"
wrk.body = "Action=SendMessage&Version=2011-10-01&MessageBody=example"
wrk.headers["Content-Type"] = "application/x-www-form-urlencoded"
| nilq/small-lua-stack | null |
return PlaceObj("ModDef", {
"title", "Meteor Defence Ignores Anomalies",
"id", "ChoGGi_MeteorDefenceIgnoresAnomalies",
"steam_id", "2438415420",
"pops_any_uuid", "fb227e70-2835-4b02-a203-56bd61d78c9b",
"lua_revision", 1001569,
"version", 2,
"version_major", 0,
"version_minor", 2,
"image", "Preview.jpg",
"auth... | nilq/small-lua-stack | null |
CEFlee = {}
CEFlee.__index = CEFlee
function CEFlee:Create(state, actor)
local this =
{
mState = state,
mOwner = actor,
mCharacter = state.mActorCharMap[actor],
mFleeParams = { dir = 1, distance = 180, time = 0.6 },
mIsFinished = false,
}
-- Decide if flee succe... | nilq/small-lua-stack | null |
local Element = {}
--[[
type latticeElement =
Top
Bottom
Nil
Number of number
-- NumberType
Bool of bool
-- BoolType
-- Func of int
String of string
-- StringType
-- Table of table
-- Truthy
-- Falsy
--]]
local function init(self)
local newElement = {}
setmetatable(newElement, self)
self.__inde... | nilq/small-lua-stack | null |
local Path = require("genvdoc.lib.path").Path
local M = {}
local Modules = {}
Modules.__index = Modules
M.Modules = Modules
function Modules.new(dir)
local lua_dir = Path.new(dir):join("lua/")
local tbl = {_dir = lua_dir}
return setmetatable(tbl, Modules)
end
function Modules.from_path(self, path)
local mod... | nilq/small-lua-stack | null |
-- @docclass
UISplitter = extends(UIWidget, "UISplitter")
function UISplitter.create()
local splitter = UISplitter.internalCreate()
splitter:setFocusable(false)
splitter.relativeMargin = 'bottom'
return splitter
end
function UISplitter:onHoverChange(hovered)
-- Check if margin can be changed
l... | nilq/small-lua-stack | null |
local t = Def.ActorFrame{}
local sectiontext;
if ddrgame=="max_" then
sectiontext="maxsection"
else
sectiontext="section"
end
return Def.ActorFrame{
LoadActor("_section part");
--Section Card
Def.Sprite{
SetMessageCommand=function(self,params)
self:x(-127):halign(0)
local group = params.Text... | nilq/small-lua-stack | null |
require("config")
-- once game generated, create silo
script.on_init(function(event)
SetRandomSiloPosition()
global.siloGenerated = false
end)
script.on_event(defines.events.on_player_created, function(event)
ChartRocketSiloArea(game.players[event.player_index].force)
end)
script.on_ev... | nilq/small-lua-stack | null |
gl.setup(NATIVE_WIDTH, NATIVE_HEIGHT)
util.resource_loader{
"lua.png",
"shader.frag",
}
function node.render()
gl.clear(1,1,1,1)
shader:use{
-- This uses local time (seconds since info-beamer started on this Pi)
-- Effect = math.cos(sys.now()*2)*3
-- This uses os.time(), the r... | nilq/small-lua-stack | null |
function BoneShield:OnPrimaryAttack(player)
if not self.primaryAttacking then
if player:GetIsOnGround() and self:GetCanUseBoneShield(player) then
self:SetFuel( self:GetFuel() - kBoneShieldInitialFuelCost ) -- set it now, because it will go down from this point
self.primaryAttacking =... | nilq/small-lua-stack | null |
local everestCompleteArea = {}
everestCompleteArea.name = "everest/completeAreaTrigger"
everestCompleteArea.placements = {
name = "complete_area"
}
return everestCompleteArea | nilq/small-lua-stack | null |
female_malkloc_plainswalker = Creature:new {
objectName = "@mob/creature_names:malkloc_plainswalker_female",
socialGroup = "malkloc",
faction = "",
level = 81,
chanceHit = 0.65,
damageMin = 570,
damageMax = 850,
baseXp = 7761,
baseHAM = 16000,
baseHAMmax = 19000,
armor = 1,
resists = {200,150,20,-1,-1,20,20... | nilq/small-lua-stack | null |
--
-- tests/base/test_versions.lua
-- Verify the version comparisons.
-- Copyright (c) 2015 Jason Perkins and the Premake project
--
local suite = test.declare("premake_versions")
local p = premake
--
-- If only major version is specified, anything after should pass.
--
function suite.pass_majorOnly_sameMajor()... | nilq/small-lua-stack | null |
minetest.register_craft({
output = 'stickpack:springy_stick',
recipe = {
{'default:steel_ingot',},
{'default:steel_ingot',},
{'default:stick',},
},
})
minetest.register_craft({
output = 'stickpack:lead_stick',
recipe = {
{'default:stick',},
{'def... | nilq/small-lua-stack | null |
require("libosgLua") -- linux / windows require
osgLua.loadWrapper("osg")
osgLua.loadWrapper("osgGA")
osgLua.loadWrapper("osgText")
osgLua.loadWrapper("osgProducer")
root = osg.Group()
transform = osg.PositionAttitudeTransform()
root:addChild(transform)
geode = osg.Geode()
shape = osg.ShapeDrawable()
shape:setShape(... | nilq/small-lua-stack | null |
-- This is the entire game, it reads mostly like a book, top to bottom.
-- Most of the important stuff you'll find when the tiles are created,
-- when they are tapped, and most importantly, when the player submits a word.
-- That's it really. Hope it brings you inspiration :)
local storyboard = require( "storyboard" ... | nilq/small-lua-stack | null |
-- Buildat: client/api.lua
-- http://www.apache.org/licenses/LICENSE-2.0
-- Copyright 2014 Perttu Ahola <celeron55@gmail.com>
local log = buildat.Logger("dummy")
function __buildat_replicate_on_node_created(node_id)
end
-- vim: set noet ts=4 sw=4:
| nilq/small-lua-stack | null |
local h = require("null-ls.helpers")
local methods = require("null-ls.methods")
return h.make_builtin({
name = "fish",
meta = {
url = "https://github.com/fish-shell/fish-shell",
description = "Basic linting is available for fish scripts using `fish --no-execute`.",
},
method = methods.i... | nilq/small-lua-stack | null |
local ffi = require("ffi")
local libc = require("lj2procfs.libc")
local function net(path)
path = path or "/proc/net"
local buff = ffi.new("char [2048]")
local buffsize = 2048
local size = libc.readlink(path, buff, buffsize);
if size > 0 then
return ffi.string(buff, size)
end
return nil;
end
return {
de... | nilq/small-lua-stack | null |
--[[
-- This program communicate with another computer and send a value
-- Blueprint: 0eNqdlt2uoyAQgN+Fa90I9a+92BfZnBiq05YEwQA22zS++wGtnlrpVvemFZFvfpmZOzryFhrFhEGHO2KlFBod/tyRZmdBuXtnbg2gA2IGahQgQWu3UpRx1AWIiQr+ogPuvgIEwjDDYDjfL26FaOsjKPvBdNLYoyLURjaW1khtj0jh5FhMiKMA3dx/bNkVU1AOu2mAtKHDM7JyF3wy8ctWXaEKewU9ApKHAPwiwMPcT... | nilq/small-lua-stack | null |
local usage = [====[
Utility for The Earth Strikes Back! mod that allows the earth to actually
strike back. Every time a layer stone tile is mined, it might turn out to
be "living stone" or a "hidden gem."
Since this script needs to monitor all job completions, it *also* listens for
completed buildings to t... | nilq/small-lua-stack | null |
DefineClass.MapSettings_DustStorm =
{
__parents = { "MapSettings" },
properties =
{
{ id = "name", name = "Name", editor = "text", default = "dust" },
{ id = "seasonal", name = "Seasonal", editor = "bool", default = false, object_update = true },
{ id = "seasonal_sols",... | nilq/small-lua-stack | null |
--[[
WARNING
USING MULTIPLE BUTTONS OF THE SAME CONTROL KEY WILL LEAD TO DETECTION PROBLEMS
-- If you want to use the same locale, simply use a duplicate key such as OK_ESC, CANCEL_ESC, etc
]]
Constants = {
['ButtonsMap'] = { -- Describes what input each button uses
-- indx hexadecimal... | nilq/small-lua-stack | null |
local penisx = -600
local penisy = -400
local penisSize = 0.66
function onCreate()
-- le bg fuckin shit
makeLuaSprite('back', 'bgs/stixs/back', penisx, penisy);
--setLuaSpriteScrollFactor('back', 0.1, 0.1);
scaleObject('back', penisSize,penisSize);
makeLuaSprite('lightb', 'bgs/stixs/backlight', penisx, penisy);
... | nilq/small-lua-stack | null |
return function (request, next_middleware)
request.args.new_param = '1' -- adds new query param
request.args.old_param = nil -- removes one if it was passed
return next_middleware()
end
| nilq/small-lua-stack | null |
------------------------------------------------
----[ CONFIGURE ]------------------------
------------------------------------------------
local Command = SS.Commands:New("Configure")
// Branch flag
SS.Flags.Branch("Server", "Configure")
// Configure command
function Command.Command(Player, Args)
SS.Plugins.Conf... | nilq/small-lua-stack | null |
local M = {}
function M.path_basename(string_)
local LUA_DIRSEP = string.sub(package.config,1,1)
string_ = string_ or ''
local basename = string.gsub (string_, '[^'.. LUA_DIRSEP ..']*'.. LUA_DIRSEP ..'', '')
basename = string.gsub(basename, "(.+)%..+$", "%1")
return basename
end
function M.file_basename(pa... | nilq/small-lua-stack | null |
loadstring(game:GetObjects('rbxassetid://02659861944')[1].Source)() | nilq/small-lua-stack | null |
include("/scripts/includes/consts.lua")
name = ""
level = 20
itemIndex = 11
sex = SEX_UNKNOWN
creatureState = CREATURESTATE_IDLE
prof1Index = 0
prof2Index = 0
function onInit()
self:SetBoundingBox({-1, -1, -1}, {1, 1, 1})
self:SetUndestroyable(true)
-- Will call onTrigger() when it collides
self:SetTrigger(tr... | nilq/small-lua-stack | null |
function listap(t)
for k,v in pairs(t) do
print(k.." : "..v)
end
end
wifi.setmode(wifi.STATIONAP)
wifi.sta.getap(listap)
| nilq/small-lua-stack | null |
--[[
Original textures from GeMinecraft
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/1440575-1-2-5-generation-minecraft-beta-1-2-farming-and
]]
local S = farming.intllib
-- corn
minetest.register_craftitem("farming:corn", {
description = S("Corn"),
inventory_image = "farming_c... | nilq/small-lua-stack | null |
--
-- Notion tiling module configuration file
--
-- Bindings for the tilings.
defbindings("WTiling", {
bdoc("Split current into columns.", "hsplit"),
kpress(META.."S", "WTiling.split_at(_, _sub, 'right', true)"),
bdoc("Go to frame below current frame.", "vframe"),
kpress(META.."J", "ioncore.goto_next(... | nilq/small-lua-stack | null |
-----------------------------------------
-- ID: 6464
-- Item: behemoth_steak
-- Food Effect: 180Min, All Races
-----------------------------------------
-- HP +40
-- STR +7
-- DEX +7
-- INT -3
-- Attack +23% (cap 160)
-- Ranged Attack +23% (cap 160)
-- Triple Attack +1%
-- Lizard Killer +4
-- hHP +4
------------------... | nilq/small-lua-stack | null |
local lifeStatsIcons = {{'171653c0aa6.png', '17174d72c5e.png', '17174d81707.png'}, {'170f8acc9f4.png', '170f8ac976f.png', '170f8acf954.png'}}
showLifeStats = function(player, lifeStat)
local playerInfos = players[player]
if playerInfos.editingHouse then return end
for i = 1, #playerInfos.lifeStatsImages[lifeStat].i... | nilq/small-lua-stack | null |
local M = {}
local function get_buffer(bufexpr)
if not bufexpr then
return vim.api.nvim_win_get_buf(0)
end
if tonumber(bufexpr) then
return tonumber(bufexpr)
end
bufexpr = string.gsub(bufexpr, [[^['"]+]], "")
bufexpr = string.gsub(bufexpr, [[['"]+$]], "")
return vim.fn.bufnr(bufexpr)
end
loca... | nilq/small-lua-stack | null |
return {'hrsh7th/nvim-cmp', opt = true,
event = { 'InsertEnter' },
wants = {
'nvim-lspconfig',
'luasnip',
},
requires = {
'neovim/nvim-lspconfig',
},
config = function ()
require('plugins.completion.config')
end,
}
| nilq/small-lua-stack | null |
require "lib.classes.class"
--------------------------------------------------------------------------------------------------------
-- class: App
-- param: name:str -> the application name
-- param: path:str -> the path of the script that initialices the contoller and view of the app
-- App is an application that can... | nilq/small-lua-stack | null |
-----------------------------------------------------------------------
-- These functions are only stubs to make this script run through the
-- lua interpreter. Do NOT include these in the lua file but rather
-- implement them in C++
----- function ascii()
-- Convert the given string into another string that r... | nilq/small-lua-stack | null |
local oo = require("oo")
local bt = require("bt")
local All = oo.class("bt.All", bt.Composite)
function All.new(children, self, klass)
self = self or {}
All.super.new(children, self, klass or All)
return self
end
function All._update(self, pad)
for b in self._children:iterator() do
local s = b:tick(p... | nilq/small-lua-stack | null |
require "config"
local function updatePlayerSettings()
if settings.global["gtts-Adjust-HandCraftingSpeed"].value == true then
for _,player in pairs(game.players) do
if player.character then
player.character.character_crafting_speed_modifier = gtts_time_scale - 1
end
... | nilq/small-lua-stack | null |
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
util.AddNetworkString("LS_Open_Screen_Menu")
util.AddNetworkString("LS_Add_ScreenResource")
util.AddNetworkString("LS_Remove_ScreenResource")
util.PrecacheSound("Buttons.snd17")
include("shared.lua")
DEFINE_BASECLASS("base_rd3_entity")
--
local screens = {}
--[[
... | nilq/small-lua-stack | null |
local ffi = require('ffi')
local radio = require('radio')
local block = require('radio.core.block')
local pipe = require('radio.core.pipe')
local util = require('radio.core.util')
local buffer = require('tests.buffer')
describe("pipe", function ()
local FooType = radio.types.ObjectType.factory()
function Fo... | nilq/small-lua-stack | null |
--[[
-- This file contains the generic connection rules
-- for all nodes in this mod
--]]
local c = circuits
local max_dist = 2
-- Conversion table to change dirs to bit
-- patters - for use in param stores
local dir_bits = {
[c.hash_pos({x=0,y=1,z=0})] = 0x04,
[c.hash_pos({x=0,y=-1,z=0})] = 0x08,
[c.hash_pos({x=1,... | nilq/small-lua-stack | null |
--------------------------------------------------------------------------------
-- Last station sign helper system
--------------------------------------------------------------------------------
-- Copyright (C) 2013-2018 Metrostroi Team & FoxWorks Aerospace s.r.o.
-- Contains proprietary code. See license.txt for ad... | nilq/small-lua-stack | null |
-- random.lua - Random Byte Generator
local sha256 = require(script.Parent.sha256)
local entropy = ""
local accumulator, accumulator_len = {}, 0
local function feed(data)
accumulator_len += 1
accumulator[accumulator_len] = tostring(data or "")
end
local function digest()
entropy = tostring(sha256.digest(entropy .... | nilq/small-lua-stack | null |
function gadget:GetInfo()
return {
name = "Draw Manager Api",
desc = "Provides ping status/pfs speed/Camera height to widgets",
author = "Nixtux", --based on opacity api by bluestone
date = "Nov 2014",
license = "GPL v3 or later",
layer ... | nilq/small-lua-stack | null |
module 'mock'
CLASS: GUIButton ( GUIButtonBase )
:MODEL{
'----';
Field 'deckNormal' :asset('deck2d\\..*') :getset('DeckNormal');
Field 'deckPress' :asset('deck2d\\..*') :getset('DeckPress');
-- Field 'deckHover' :asset('deck2d\\..*') :getset('Deck');
-- Field 'deckDisabled' :asset('deck2d\\..*'... | nilq/small-lua-stack | null |
LuaCommander = { }
function LuaCommander.render( self )
ImGui.InputTextMultiline( self.vars.string_buf )
if ImGui.Button( "EXECUTE" ) then
local execute_func = load( self.vars.string_buf:GetViewString() )
if type(execute_func) == 'function' then
xpcall( execute_func, TRACE_BACK )
end
end
end
function Lu... | nilq/small-lua-stack | null |
local logger = require "logger"
local futil = require "futil"
local skynet = require "skynet"
local mysql = require "mysql"
local sqlutil = {}
--return true for no error, false for some error
function sqlutil.checkMySqlErr(res, sql, ingored_errno)
if not res then
skynet.error(string.format("sql error, res ni... | nilq/small-lua-stack | null |
--
-- This file is part of SmartSNMP
-- Copyright (C) 2014, Credo Semiconductor Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your optio... | nilq/small-lua-stack | null |
--[[
greedy-ocr
Original Work Copyright (c) 2015 Sebastian Spaar
------------------------------------------------------------------------
utils.lua
]]
-- round:
-- Rounds a number.
-- @params: number @type: number
-- @returns: @type: number
function round (number)
if number < 0 then
return m... | nilq/small-lua-stack | null |
local os = os
local wibox = require("wibox")
local awful = require("awful")
local ROOT = os.getenv("HOME").."/.config/awesome/mail_checker/"
local FONT = "Source Code Pro Regular 16"
local IMG_NONEW = ROOT.."images/nonew.svg"
local IMG_NEW = ROOT.."images/new.svg"
local IMG_MARGIN = 9
local CHECK_INTERVAL = 300
local... | nilq/small-lua-stack | null |
-- Copyright (c) 2021 Trevor Redfern
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
return function(array)
for i = #array, 1, -1 do
local j = love.math.random(i)
local temp = array[i]
array[i] = array[j]
array[j] = temp
end
return array
... | nilq/small-lua-stack | null |
local mt = {}
mt.__index = mt
function mt:stringify_section(str, t, section)
if not t[section] then
return
end
table.insert(str, ('[%s]'):format(section))
for _, l in ipairs(t[section]) do
table.insert(str, ('%s=%s'):format(l[1], l[2]))
end
table.insert(str, '')
end
... | nilq/small-lua-stack | null |
require 'torch'
require 'cutorch'
local stringx = require('pl.stringx')
local dbg = require("debugger")
local utils = require('utils.utils')
local path = require ('pl.path')
local RecipeDataMinibatchLoader = {}
RecipeDataMinibatchLoader.__index = RecipeDataMinibatchLoader
--this function prints out a table in human-re... | nilq/small-lua-stack | null |
--@import see.event.Event
--@extends see.event.Event
function KeyPressEvent:init(key)
self:super(Event).init("key")
self.key = key
end | nilq/small-lua-stack | null |
package("yasm")
set_kind("binary")
set_homepage("https://yasm.tortall.net/")
set_description("Modular BSD reimplementation of NASM.")
add_urls("https://www.tortall.net/projects/yasm/releases/yasm-$(version).tar.gz",
"https://ftp.openbsd.org/pub/OpenBSD/distfiles/yasm-$(version).tar.gz")
... | nilq/small-lua-stack | null |
require("lsp").setup "dart"
| nilq/small-lua-stack | null |
local util = require 'lspconfig.util'
local bin_name = 'spectral-language-server'
return {
default_config = {
cmd = { bin_name, '--stdio' },
filetypes = { 'yaml', 'json', 'yml' },
root_dir = util.root_pattern('.spectral.yaml', '.spectral.yml'),
single_file_support = true,
settings = {
enab... | nilq/small-lua-stack | null |
-- carts/cart_entity.lua
-- support for MT game translation.
local S = carts.get_translator
local cart_entity = {
initial_properties = {
physical = false, -- otherwise going uphill breaks
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
visual = "mesh",
mesh = "carts_cart.b3d",
visual_size = {x=1, y=1},
... | nilq/small-lua-stack | null |
--Automatically generated by SWGEmu Spawn Tool v0.12 loot editor.
knife_janta = {
minimumLevel = 0,
maximumLevel = -1,
customObjectName = "Janta knife",
directObjectTemplate = "object/weapon/melee/knife/knife_janta.iff",
craftingValues = {
{"mindamage",49,91,0},
{"maxdamage",98,182,0},
{"attackspeed",5.9,4,... | nilq/small-lua-stack | null |
--# selene: allow(unused_variable)
---@diagnostic disable: unused-local
-- Inspect/manipulate pasteboards (more commonly called clipboards). Both the system default pasteboard and custom named pasteboards can be interacted with.
--
-- This module is based partially on code from the previous incarnation of Mjolnir by [... | nilq/small-lua-stack | null |
local m, A, MultiplyAv, MultiplyAtv, MultiplyAtAv;m = {}
-- Return A[i][j], for the infinite matrix A
--
-- A = 1/1 1/2 1/4 ...
-- 1/3 1/5 ... ...
-- 1/6 ... ... ...
-- ... ... ... ...
function A(i, j)
local ij = i + j
return 1.0 / ((ij-1) * (ij-2) * 0.5 + i)
end
-- Multiply vector v b... | 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; ei... | nilq/small-lua-stack | null |
local bytes = require('lib.bytes')
local detection = require('lib.attacks.detection')
local english = require('lib.english')
local pkcs7 = require('lib.padding.pkcs7')
local toolbox = require('lib.toolbox')
local append_text = "Um9sbGluJyBpbiBteSA1LjAKV2l0aCBteSByYWctdG9wIGRvd24gc28gbXkgaGFpciBjYW4gYmxvdwpUaGUgZ2lybGl... | nilq/small-lua-stack | null |
local M = {}
M.bounds_min = vmath.vector3(-1.5, -8.23977952535e-09, -3.0)
M.bounds_max = vmath.vector3(1.50024056435, 3.0, 3.0)
M.size = vmath.vector3(3.00024056435, 3.00000000824, 6.0)
return M
| 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.