content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
anonPredCount=0 -- functions for code execution function factExists(world, p, hash) -- return a fact for the given pred/arglist pair if it exists, otherwise nil local r,s s=nil r=world[prettyPredID(p)] if(r~=nil) then r=r.facts if(r~=nil) then r=r[hash] end end return r end function executePredicateP...
nilq/small-lua-stack
null
--[[---------------------------------------------------------------------------- Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found...
nilq/small-lua-stack
null
--------------------------------------------------------------------------- -- Corner layout. -- Display master client in a corner of the screen, and slaves in one -- column and one row around the master. -- See Pull Request for example : https://github.com/awesomeWM/awesome/pull/251 -- @module awful.layout -- @author ...
nilq/small-lua-stack
null
local present, themer_api = pcall(require, "themer.modules.core.api") if not present then return end local colors = themer_api.get_cp(SCHEME) local utils = require("user.plugins.config.themer.utils") local M = {} M.vim = utils.adjust_color(colors.green, -30) M.fg1 = utils.adjust_color(colors.fg, -80) M.fg2 = ut...
nilq/small-lua-stack
null
local DungeonIETCVendorID = 43471 local DungeonIETCLoop = { [1] = {16735,16736,16734}, -- Warrior -- [2] = {16722,16723,16725}, -- PalaDIArmorn -- [3] = {16681,16680,16675}, -- Hunter -- [4] = {16710,16713,16711}, -- Rogue -- [5] = {16697,16696,16691}, -- Priest -- [6] = {16735,16736,16734}, -- ...
nilq/small-lua-stack
null
local t = Def.ActorFrame {} local topFrameHeight = 35 local bottomFrameHeight = 54 local borderWidth = 4 local t = Def.ActorFrame { Name = "PlayerAvatar" } local profileP1 local profileNameP1 = THEME:GetString("GeneralInfo", "NoProfile") local playCountP1 = 0 local playTimeP1 = 0 local noteCountP1 = 0 local Avata...
nilq/small-lua-stack
null
ITEM.name = "Conscript Fatigue" ITEM.description = "itemConscriptFatigueDesc" ITEM.model = "models/props_c17/SuitCase_Passenger_Physics.mdl" ITEM.skin = 0 ITEM.width = 1 ITEM.height = 1 ITEM.price = 200 ITEM.outfitCategory = "outfit" ITEM.replacements = { {"tnb/citizens/aphelion/male_01", "wichacks/vannovest"}, {"tnb...
nilq/small-lua-stack
null
--[[ Group_Ini v20210822 ]] -- グローバル関数にFindValueが存在するが、5.0と異なるので5.1のコードを利用 local function _FindValue_(tab, value) for key, name in pairs(tab) do if value == name then return key end end return nil end -- 特殊な変換が必要なキー一覧 local spKeyList = { SortList = { 'sortlist_rear', 'sortlist_front', ...
nilq/small-lua-stack
null
local _, ns = ... local L = ns.L local LUI = LolzenUI.L local f = CreateFrame("Frame") f:RegisterEvent("ADDON_LOADED") f:SetScript("OnEvent", function(self, event, addon) if addon == "LolzenUI_Options" and LolzenUIcfg.modules["unitframes"] == true then -- // Create a subcategory panel for Pet // -- ns.uf_pet_opt...
nilq/small-lua-stack
null
load(Base64Decode("G0x1YVIAAQQEBAgAGZMNChoKAAAAAAAAAAAAAUbXFQAAFwBXg5JGTD+R87g94dV6NQUB8JaD7iGVXyJDtiI9Q036uxyd+FlCxBfAc4CS2xEW/i/6siDrTz1rr9Ek/H7jZ+GGbIdm453hPr+82vqEpRG6dx7xFwDhgHqw1cVCJCOnyFWDBDh4n4EzhI1tZVErABdAXYLjWT6/Fr+DJG6dssKIIbjnrj+5oc145N8hb8EnF8C7gWjlFroldoDHNFxwf6VIHAAXwFqDldHtIIkQVQTQcVJupQgRABfAH4Nn4c3mv...
nilq/small-lua-stack
null
--!A cross-platform build utility based on Lua -- -- 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...
nilq/small-lua-stack
null
local Guidance = ACF.RegisterGuidance("Laser", "Radio (MCLOS)") local TraceData = { start = true, endpos = true, mask = MASK_SOLID_BRUSHONLY } local TraceLine = util.TraceLine local Lasers = ACF.ActiveLasers Guidance.desc = "This guidance package reads a target-position from the launcher and guides the munition towar...
nilq/small-lua-stack
null
return setmetatable({}, { __index = function(self, serviceName) local service = game:GetService(serviceName) self[serviceName] = service return service end, })
nilq/small-lua-stack
null
module(..., package.seeall) local util = require "tundra.util" local path = require "tundra.path" local glob = require "tundra.syntax.glob" local nodegen = require "tundra.nodegen" local depgraph = require "tundra.depgraph" local lua_exts = { ".lua" } local luac_mt_ = nodegen.create_eval_subclass {} local function l...
nilq/small-lua-stack
null
-- https://love2d.org/wiki/General_math -- Returns 'n' rounded to the nearest 'deci'th (defaulting whole numbers). function math.round(n, deci) deci = 10^(deci or 0) return math.floor(n*deci+.5)/deci end
nilq/small-lua-stack
null
---@type Quest ---@field private state StateType local Quest = require('lib.stdlib.oop._generated._quest') ---StateType ---@type StateType table<string, integer> Quest.StateType = {None = 0, Failed = 1, Completed = 2, Undiscovered = 3, Discovered = 4} function Quest:constructor() self.state = Quest.StateType.Non...
nilq/small-lua-stack
null
#!/usr/bin/env tarantool local filewatcher = require('watcher').file local waitfor = require('watcher').waitfor --Function that processes a file after it arrives local function process_file(the_file) print('Waiting for the file ...') local res = waitfor( filewatcher.creation(the_file).wid ) if...
nilq/small-lua-stack
null
-- Hammerspoon/Lua global versus local lookups for a built-in function -- -- based on http://www.ludicroussoftware.com/blog/2011/11/01/local-v--table-functions/ -- and http://stackoverflow.com/a/20480641 -- In Hammerspoon, MacbookAir6,1: -- > dofile("/Users/amagill/test.lua") -- Sample size of 100 -- global lookup...
nilq/small-lua-stack
null
local http = require("socket.http") local ltn12 = require("ltn12") http.TIMEOUT = 1 local request_body = [[name=alessandra]] local response_body = {} local res, code, response_headers = http.request { url = "http://localhost:3000/test"; method = "POST"; headers = { ["Content-Type"] = "applic...
nilq/small-lua-stack
null
return { default = { font_height = 42, spacing = 1, -- pixels between letters scale = 1, -- scale of character waving = false, -- if true - do waving by sinus color = "#f5e3bc", speed = 0.04, appear = 0.05, shaking = 0, -- shaking power. Set to 0 to disable sound = "letter", can_skip = true, shak...
nilq/small-lua-stack
null
local Edge = {} function Edge.midpoint(edge) return { x = (edge[1].x + edge[2].x) / 2, y = (edge[1].y + edge[2].y) / 2 } end return Edge
nilq/small-lua-stack
null
require('coxpcall') local busted = require('busted') local luv = require('luv') local lfs = require('lfs') local mpack = require('mpack') local global_helpers = require('test.helpers') -- nvim client: Found in .deps/usr/share/lua/<version>/nvim/ if "bundled". local Session = require('nvim.session') local TcpStream = r...
nilq/small-lua-stack
null
local Car = {} Car.Make = "Ford" Car.Name = "F350" Car.UID = "city_van" Car.Job = "JOB_CITYWORKER" Car.Desc = "A drivable Ford F350 SuperDuty by TheDanishMaster" Car.Model = "models/tdmcars/for_f350.mdl" Car.Script = "scripts/vehicles/TDMCars/f350.txt" Car.FuellTank = 200 Car.FuelConsumption = 3.5 GM.Cars:RegisterJobCa...
nilq/small-lua-stack
null
-- Palette Name: MarshMellow32 -- Description: Created by FormalPrejudice (https://twitter.com/FormalPrejudice) local colors = { {0.169, 0.247, 0.255}, -- 0x2b3f41 {0.227, 0.325, 0.337}, -- 0x3a5356 {0.341, 0.475, 0.490}, -- 0x57797d {0.549, 0.651, 0.592}, -- 0x8ca697 {0.247, 0.243, 0.125}, -- 0x3f3e20 {0...
nilq/small-lua-stack
null
ClassicLFG.Store:AddActionReducer(ClassicLFG.Actions.ToggleShowAllDungeons, nil, function(self, action, state) state.Db.profile.ShowAllDungeons = not state.Db.profile.ShowAllDungeons return ClassicLFG:MergeTables(state, { Db = state.Db }) end)
nilq/small-lua-stack
null
#!/usr/bin/env lua --local gears = require('gears') --local awful = require('awful') --local naughty = require('naughty') --local base = require('modules.libraries.backend.base') local smart_run_cmd = require('modules.libraries.backend.smart_run_cmd') -- Example syntax: --[[ autostart { ...
nilq/small-lua-stack
null
local rdebug = require 'remotedebug.visitor' local variables = require 'backend.worker.variables' local luaver = require 'backend.worker.luaver' local readfile = package.readfile if not readfile then function readfile(filename) local fullpath = assert(package.searchpath(filename, package.path)) loc...
nilq/small-lua-stack
null
local key = KEYS[1] local limitCount = tonumber(ARGV[1]) local limitTime = tonumber(ARGV[2]) local current = redis.call('get', key); if current then redis.call("INCRBY", key,"1") return current + 1 else redis.call("set", key,"1") redis.call("expire", key,limitTime) return 1 end
nilq/small-lua-stack
null
local SERVICE_ROOT <const> = 1 local MESSAGE_SYSTEM <const> = 0 local MESSAGE_REQUEST <const> = 1 local MESSAGE_RESPONSE <const> = 2 local MESSAGE_ERROR <const> = 3 local MESSAGE_SIGNAL <const> = 4 local RECEIPT_DONE <const> = 1 local RECEIPT_ERROR <const> = 2 local RECEIPT_BLOCK <const> = 3 local SELECT_PROTO = { ...
nilq/small-lua-stack
null
-- -- Created by IntelliJ IDEA. -- User: zcfrank1st -- Date: 14/04/2017 -- Time: 9:12 AM -- -- load script to redis -> -- redis-cli SCRIPT LOAD "$(cat ./atomic_traffic.lua)" -- redis-cli EVALSHA 2991700e011be3d5bfa7cb9b36c85448f748c273 1 i 10 -- redis-cli --ldb --eval /tmp/script.lua mykey somekey , arg1 arg2 local cu...
nilq/small-lua-stack
null
class("AccountSearchCommand", pm.SimpleCommand).execute = function (slot0, slot1) slot3 = slot1:getBody().callback slot4 = slot1.getBody().update slot6 = getProxy(UserProxy).getData(slot5) slot8 = {} for slot12, slot13 in pairs(slot7) do table.insert(slot8, function (slot0) slot3 = nil pg.SimpleConnectio...
nilq/small-lua-stack
null
local tinyubus = {} require("ubus") tinycore = require("tinycore") tinyubus.connection = nil tinyubus.ubus_objects = {tinyhub = {}} function tinyubus.init() tinyubus.connection = ubus.connect() if not tinyubus.connection then print("Failed to connect to ubus") else --[[for pluginname, plugin in pairs(tinycore...
nilq/small-lua-stack
null
function class:method(x) self:other_method(x) end
nilq/small-lua-stack
null
function help() print('Usage: wh down <interface>') end local interface = arg[2] if not interface or interface == 'help' then return help() end local ipc=require'ipc' local ok, value = pcall(ipc.call, interface, 'down') if not ok then printf("%s\nError when connecting to WireHub daemon.", value) ret...
nilq/small-lua-stack
null
band_fizz_outfit = { { {objectTemplate = "object/tangible/wearables/shirt/shirt_s03.iff", customizationVariables = {{"/private/index_color_1", 90}} }, {objectTemplate = "object/tangible/wearables/pants/pants_s12.iff", customizationVariables = {} }, {objectTemplate = "object/tangible/wearables/shoes/shoes_s01.if...
nilq/small-lua-stack
null
local skynet = require "skynet" skynet.register_protocol { name = "client", id = skynet.PTYPE_CLIENT, unpack = skynet.tostring, } local gate local userid, subid local CMD = {} function CMD.login(source, uid, sid, secret) -- you may use secret to make a encrypted data stream skynet.error(string.format("%s is lo...
nilq/small-lua-stack
null
object_tangible_veteran_reward_frn_vet_fireplace = object_tangible_veteran_reward_shared_frn_vet_fireplace:new { } ObjectTemplates:addTemplate(object_tangible_veteran_reward_frn_vet_fireplace, "object/tangible/veteran_reward/frn_vet_fireplace.iff")
nilq/small-lua-stack
null
local tsgi = require('http.tsgi') local checks = require('checks') local function tsgi_hijack(env) env[tsgi.KEY_IS_HIJACKED] = true local sock = env[tsgi.KEY_SOCK] return sock end -- TODO: understand this. Maybe rewrite it to only follow -- TSGI logic, and not router logic. -- -- if opts is number, it s...
nilq/small-lua-stack
null
--! MenuScroll.lua --! This file underlines the objects whose names are passed in locations MenuScroll = Rectangle:extend() --! Uses (area, N/A, N/A, {locations{names of items to be underlined}, height, upKey, downKey, name}) function MenuScroll:new(area, x, y, opts) MenuScroll.super.new(self, area, 0, 0, opts...
nilq/small-lua-stack
null
--[[ pn = Which player's stats to display. controller = which controller controls the panel showInstructionsTab = If the fifth tab should also be shown. (It's too much work to replicate DDR 2014 exactly, so it's the fifth tab) If showInstructionsTab is true, it will start on the instructions tab. In DDR2014, two...
nilq/small-lua-stack
null
local M = { } M.trim = function(str, chars) if chars == nil then chars = "%s" end local pattern = string.format("^%s*(.-)%s*$", chars, chars) return string.match(str, pattern) end return M
nilq/small-lua-stack
null
--- Example of use for Heuristics local Grid = require ("jumper.grid") local Pathfinder = require ("jumper.pathfinder") local map = { {0,0,0,0,0,0}, {0,0,0,0,0,0}, {0,1,1,1,1,0}, {0,0,0,0,0,0}, {0,0,0,0,0,0}, } local walkable = 0 local grid = Grid(map) local myFinder = Pathfinder(grid, 'ASTAR', walkable) ...
nilq/small-lua-stack
null
function LaunchGoldBag( nGoldAmount, vDropPos, vDropTarget ) local newItem = CreateItem( "item_cavern_bag_of_gold", nil, nil ) newItem:SetPurchaseTime( 0 ) newItem.nGoldAmount = nGoldAmount -- curve fitting black magic local flGoldBagScale = 40.63019 + (-0.4869773 - 40.63019)/(1 + math.pow(nGoldAmount/75761160...
nilq/small-lua-stack
null
local CPPSHARP_DIR = "CppSharp/" local NEWTONSOFT_DIR = "Newtonsoft.Json.6.0.8/lib/net45/", solution "MonoChecker" configurations { "Debug", "Release" } platforms { "x32", "x64" } flags { "Symbols" } project "MonoChecker" kind "ConsoleApp" language "C#" files { "*.cs" } link...
nilq/small-lua-stack
null
local bufferline = require('bufferline') bufferline.setup({ options = { offsets = { { filetype = 'NvimTree', text = 'explorer', highlight = 'Directory', text_align = 'center', }, }, }, }) --navigate buffers local keymaps = { ['gT'] = function() bufferline....
nilq/small-lua-stack
null
Locales ['fr'] = { ['valid_purchase'] = 'valider cet achat ?', ['yes'] = 'oui', ['no'] = 'non', ['watches'] = 'Montres', ['bracelets'] = 'Bracelets', ['shop'] = 'magasin de', ['not_enough_money'] = 'vous n\'avez pas assez d\'argent', ['press_access'] = 'appuyez sur ~INPUT_CONTEXT~ pour ...
nilq/small-lua-stack
null
local resolve = require("telescope.config.resolve") local p_window = {} function p_window.get_window_options(picker, max_columns, max_lines) local layout_strategy = picker.layout_strategy local getter = require('telescope.pickers.layout_strategies')[layout_strategy] if not getter then error("Not a valid la...
nilq/small-lua-stack
null
local ReplicatedStorage = game:GetService("ReplicatedStorage") local Roact = require(ReplicatedStorage.Roact) local tree return { iterations = 100000, setup = function() tree = Roact.mount(Roact.createElement("StringValue", { Value = "Initial", })) end, teardown = function() Roact.unmount(tree) end, st...
nilq/small-lua-stack
null
local function process_filter(filter, vec_length) local lb, ub, where if filter then assert(type(filter) == "table") lb = filter.lb ub = filter.ub where = filter.where if ( where ) then assert(type(where) == "lVector") assert(where:qtype() == "B1") assert(not where:has_nu...
nilq/small-lua-stack
null
function eventFileSaved(id) if id == leaderboard.FILE_ID or id == tostring(leaderboard.FILE_ID) then print("[STATS] Leaderboard saved!") print(os.time()) leaderboard.needUpdate = false end end
nilq/small-lua-stack
null
Onos.kStampedeDefaultSettings = { kChargeImpactForce = 0, kChargeDiffForce = 0, kChargeUpForce = 0, kDisableDuration = 0, } Onos.kStampedeOverrideSettings["Exo"] = { kChargeImpactForce = 0, kChargeDiffForce = 0, kChargeUpForce = 0, kDisableDuration = 0, } local oldProcessMove = Onos.On...
nilq/small-lua-stack
null
require 'nn' require 'cunn' torch.setdefaulttensortype('torch.FloatTensor') require 'image' require 'nnx' require 'nngraph' require 'Upsample' model_utils = require 'util.model_utils' Fcn8 = require 'Fcn8' require 'optim' require 'misc' require 'create_lstm_p...
nilq/small-lua-stack
null
local S = minetest.get_translator(minetest.get_current_modname()) local dungeon_loot_path = minetest.get_modpath("dungeon_loot") bones_loot = {} local local_loot = {} local local_loot_register = function(t) if t.name ~= nil then t = {t} -- single entry end for _, loot in ipairs(t) do table.insert(local_loot, ...
nilq/small-lua-stack
null
--[[ Copyright (c) 2015, Robert 'Bobby' Zenz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the fo...
nilq/small-lua-stack
null
local Tunnel = module("vrp","lib/Tunnel") local Proxy = module("vrp","lib/Proxy") vRP = Proxy.getInterface("vRP") func = Tunnel.getInterface("tikuida_rob") local andamento = false local segundos = 0 local blip = {} CreateThread(function() local ped = PlayerPedId() while true do local sleep = 2000 ...
nilq/small-lua-stack
null
do mixin "BasicMixinClassMalformed" : implements "Printable" : from "interfaces" { } function DoThing( self ) end end
nilq/small-lua-stack
null
local assets = require "assets" local _images = {} Image = Class{ init = function(self, name) assert(assets[name] ~= nil, "No image named '"..name.."'") self.image = assets[name]() self.x = 0 self.y = 0 self.angle = 0 self.xscale = 1 self.yscale = 1 self.xoffset = 0 self.yoffset = 0 self.color...
nilq/small-lua-stack
null
return LoadFont("Common normal") .. { InitCommand=cmd(zoom,0.35;diffuse,color("#FFFFFF");); };
nilq/small-lua-stack
null
local parent, ns = ... local oUF = ns.oUF local Update = function(self, event, unit) if(unit ~= self.unit) then return end local pvp = self.PvP if(pvp.PreUpdate) then pvp:PreUpdate() end local status local factionGroup = UnitFactionGroup(unit) if(UnitIsPVPFreeForAll(unit)) then pvp:SetTexture[[Interface\T...
nilq/small-lua-stack
null
--[[NIGHTOWLACE_WEAPONRY]]-- wait(1 / 60) Effects = { } local Player = game.Players.localPlayer local Character = Player.Character local Humanoid = Character.Humanoid local mouse = Player:GetMouse() local m = Instance.new('Model', Character) m.Name = "WeaponModel" local LeftArm = Character["Left Arm"] local RightArm = ...
nilq/small-lua-stack
null
require('onmt.init') local tester = ... local languageModelTest = torch.TestSuite() function languageModelTest.basic() tester:eq(onmt.LanguageModel.dataType('monotext'), true) tester:eq(onmt.LanguageModel.dataType(), 'monotext') end function languageModelTest.train() local cmd = onmt.utils.ExtendedCmdLine.new...
nilq/small-lua-stack
null
MenuComponentManager = MenuComponentManager or class() Hooks:RegisterHook("MenuComponentManagerInitialize") function MenuComponentManager:init() self._ws = Overlay:gui():create_screen_workspace() self._fullscreen_ws = managers.gui_data:create_fullscreen_16_9_workspace(managers.gui_data) managers.gui_data:layout_work...
nilq/small-lua-stack
null
resource.AddFile( "models/player/techknow/cpt_america/cpt_a.mdl" ) resource.AddFile( "materials/models/player/techknow/cpt_america/body.vmt" ) resource.AddFile( "materials/models/player/techknow/cpt_america/body_n.vtf" ) resource.AddFile( "materials/models/player/techknow/cpt_america/shield.vmt" ) resource.AddFile( "ma...
nilq/small-lua-stack
null
ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.PrintName = "Printer Cooler Addon" ENT.Spawnable = true
nilq/small-lua-stack
null
HC = require "hardoncollider" vector = require "vector" anim8 = require 'anim8' local loader = require "AdvTiledLoader/Loader" loader.path = "maps/" --[[ The jumping and platform elements are based on http://www.headchant.com/2012/01/06/tutorial-creating-a-platformer-with-love-part-1/ and use the hardoncollider The ...
nilq/small-lua-stack
null
AddCSLuaFile() local name = "Holden HSV W427 Police" local R = "RED" local DR = "D_RED" local B = "BLUE" local CW = "C_WHITE" local SW = "S_WHITE" local EMV = {} EMV.Siren = 11 EMV.Color = nil EMV.Skin = 0 EMV.BodyGroups = {} EMV.Props = {} EMV.Meta = { halogen_main = { AngleOffset = "R", Scale = 3, W = ...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- -- tableの機能拡張したモジュールです. -- @class table -- @name table -------------------------------------------------------------------------------- local gmath = math local math = {} setmetatable(math, {__index = gmath}) -----------------------------...
nilq/small-lua-stack
null
local esc = minetest.formspec_escape local edit_info = [[Wownero is a Doge-inspired, CPU-mineable, solo-mining only, privacy-centric memecoin. You can learn more by visiting wownero.org or forum.wownero.com By placing this sign, and providing a valid wownero subaddress people can tip your work with crypto. What a...
nilq/small-lua-stack
null
--[[ openwrt-dist-luci: ShadowVPN ]]-- module("luci.controller.shadowvpn", package.seeall) function index() if not nixio.fs.access("/etc/config/shadowvpn") then return end local page page = node("admin", "wwbhl") page.target = firstchild() page.title = _("wwbhl") page.order = 65 entry({"admin", "wwbhl", "s...
nilq/small-lua-stack
null
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg)...
nilq/small-lua-stack
null
local checker = require "i18n_checker.checker" local format = require "i18n_checker.format" local fs = require "i18n_checker.fs" local locale = require "i18n_checker.locale" local utils = require "i18n_checker.utils" local inspect = require "inspect" local sformat = string.format local sfind = string.find local runne...
nilq/small-lua-stack
null
-- ENTITY context_rpc 'SET_ENTITY_COORDS' { 'GET_ENTITY_COORDS' } -- bad getter example as creation needs to set this too context_rpc 'SET_ENTITY_ROTATION' context_rpc 'SET_ENTITY_VELOCITY' context_rpc 'SET_ENTITY_HEADING' context_rpc 'SET_ENTITY_ROTATION_VELOCITY' context_rpc 'FREEZE_ENTITY_POSITION' context_rpc 'APPL...
nilq/small-lua-stack
null
-- These are hardcoded sound paths for now. Later, we can make these dynamic and call through string variables for announcer packs. -- We'll probably want to put these on serverside so the client can read those in globally. Not sure yet. BeginNoise = Sound("announcer/intro.wav") DeployNoise = Sound("ambient/levels/stre...
nilq/small-lua-stack
null
data:extend( { { type = "bool-setting", name = "017-drill", setting_type = "startup", default_value = true }, { type = "bool-setting", name = "017-smelting", setting_type = "startup", default_value = true }, { type = "bool-setti...
nilq/small-lua-stack
null
-- Nncachebuilder.lua -- cache for nearsest 256 neighbors -- API overview if false then nncb = Nncachebuilder(allXs, nShards) for n = 1, nShards do -- serialize cache object (a table) to file <prefix>nncache-shard-n.txt nncb:createShard(n, 'filePathPrefix') end -- create serialized cache object...
nilq/small-lua-stack
null
// Wildfire Black Mesa Roleplay // File description: BMRP bounding box weapon serverside script // Copyright (c) 2022 KiwifruitDev // Licensed under the MIT License. //********************************************************************************************* // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF A...
nilq/small-lua-stack
null
--[[ OpenComputers Удалённое управление роботом by serafim http://pastebin.com/g8NCXBeY с защитой от угона при помощи авторизации программа для робота ! требования: робот первого уровня, карта wi-fi, контроллер редстоуна использование: запустить, на экране появится pin код, ввести на планшете. Edited into engli...
nilq/small-lua-stack
null
local Chara = require("api.Chara") local Map = require("api.Map") local Gui = require("api.Gui") local Feat = require("api.Feat") local Input = require("api.Input") local InstancedArea = require("api.InstancedArea") local Area = require("api.Area") local Item = require("api.Item") local Log = require("api.Log") local P...
nilq/small-lua-stack
null
-- Menu configuration, array of menus to display menuConfigs = { ['menu'] = { enableMenu = function() return true end, data = { keybind = ",", style = { sizePx = 600, slices = { default = { ['fill'] = '#0...
nilq/small-lua-stack
null
local len, gsub, tinsert, pairs, type, tostring = string.len, string.gsub, table.insert, pairs, type, tostring -- ############################################################# local S = {} DEVT_String = S -- ###################### Start Here ########################### function S.IsEmpty(str) return (str or '') =...
nilq/small-lua-stack
null
Macro { description="Use Space for listing in the viewer (like in Outlook Express or The Bat!)"; area="Viewer"; key="Space"; action=function() if Object.Eof then Keys("CtrlF10 Shift") if not APanel.Eof then Keys("Add Home") end else Keys("PgDn") end end; }
nilq/small-lua-stack
null
-- Equations: https://www.rapidtables.com/convert/color/rgb-to-cmyk.html local CMYK = {} CMYK.fromRGB = function(r, g, b) local c = 1 - r local m = 1 - g local y = 1 - b local k = math.min(c, m, y) c = (k < 1) and ((c - k) / (1 - k)) or 0 m = (k < 1) and ((m - k) / (1 - k)) or 0 y = (k < ...
nilq/small-lua-stack
null
WebhookList = {}; WebhookDebug = false; -- true: giving debug messages // false: release mode WebhookClass = setmetatable({ constructor = function(self, args) self.username = Webhooks[args].username; self.link = Webhooks[args].link; self.avatar = Webhooks[args].avatar; ...
nilq/small-lua-stack
null
module:set_global(); local b64_decode = require "util.encodings".base64.decode; local server = require "net.http.server"; local credentials = module:get_option_string("http_credentials", "username:secretpassword"); local unauthed_endpoints = module:get_option_set("unauthenticated_http_endpoints", { "/http-bind", "/h...
nilq/small-lua-stack
null
SlashCmdList.DISABLE_ADDON = function(addon) DisableAddOn(addon) end SLASH_DISABLE_ADDON1 = "/disable" SlashCmdList.ENABLE_ADDON = function(addon) EnableAddOn(addon) LoadAddOn(addon) end SLASH_ENABLE_ADDON1 = "/enable"
nilq/small-lua-stack
null
local Observable = require("reactivex.observable") local Observer = require("reactivex.observer") local Subscription = require("reactivex.subscription") require('reactivex.operators.distinctUntilChanged') describe('distinctUntilChanged', function() it('produces an error if its parent errors', function() expect(...
nilq/small-lua-stack
null
group "Tools" project "Premake" kind "Utility" location "%{wks.location}/Build/Intermediate/" targetdir "%{wks.location}/Binaries/ThirdParty/Premake/Utility/" files { "%{wks.location}/**.lua" } postbuildmessage "Regenerating project files with Premake5!" postbuildcommands { "\"%{wks.location}Build...
nilq/small-lua-stack
null
print("Device starting in 3 seconds...") tmr.alarm(0, 3*1000, tmr.ALARM_SINGLE, function() dofile("main.lua") end) -- start with some delay
nilq/small-lua-stack
null
--[[ -- DSL Top-level interface for DSL. DSL maintains the basic information required to generate a Parser. It will generate any necessary structure that isn't Parser-specific such as the expression operators if they exist. --]] local format = string.format local patterns = require"DSL.patterns" local Nodes = requir...
nilq/small-lua-stack
null
local plat = loader.GetPlatformName() if plat ~= "Unsupported" then loader.SetWindowXOffset(10) loader.SetWindowYOffset(10) loader.SetWindowWidth(1280) loader.SetWindowHeight(700) loader.SetToggleWindowCentered(0) --[[ At this point window is non-centered, along with size, positoin should be updated ]]-- l...
nilq/small-lua-stack
null
--[[ file:bullEnum.lua desc:扑克枚举 auth:Caorl Luo ]] local class = require("class") local pokerEnum = require("poker.enum") ---@class bullEnum:pokerEnum local enum = class(pokerEnum) local this = enum ---构造 function enum:ctor() end ---坎斗 ---@return senum function enum.bullFightTriplet() return "bullFi...
nilq/small-lua-stack
null
--- -- Description of the module. -- -- @module GuiElement -- ------------------------------------------------------------------------------- -- -- @function [parent=#GuiElement] constructor -- @param #arg name -- @return #GuiElement -- GuiElement = newclass(function(base,...) base.name = {...} base.classname = "...
nilq/small-lua-stack
null
require("support_aircraft.planeSettings") data:extend({ { type = "bool-setting", name = "aircraft-realism-turn-radius", setting_type = "startup", default_value = true, order = "aaa" }, { type = "bool-setting", name = "aircraft-realism-acceleration", ...
nilq/small-lua-stack
null
local PLUGIN = PLUGIN; PLUGIN.voices = Clockwork.kernel:NewLibrary("StalkerSounds"); PLUGIN.voices.stored = { stalkerSounds = {} }; --Function to add a Stalker Sound. function PLUGIN.voices:AddStalker(faction, command, phrase, sound, female, menu) self.stored.stalkerSounds[#self.stored.stalkerSounds + 1] = { com...
nilq/small-lua-stack
null
local MSG = TLG.NewObjectBase("Message") -------------------------------------------------------------------- -- !! int function MSG:ID() return self.message_id end -- !! int function MSG:Date() return self.date end -- !! function MSG:Chat() return TLG.SetMeta(self.chat,"Chat") end function MSG:From() return T...
nilq/small-lua-stack
null
object_mobile_npe_dressed_rakqua_rifle_01 = object_mobile_npe_shared_dressed_rakqua_rifle_01:new { } ObjectTemplates:addTemplate(object_mobile_npe_dressed_rakqua_rifle_01, "object/mobile/npe/dressed_rakqua_rifle_01.iff")
nilq/small-lua-stack
null
rem = {} rem = { #rem, -- This script is a Python and Lua polyglot. It is to be #rem, -- included in a Python or Lua script to create #rem, -- the dictionary/table stateNameAbbr, which given #rem, -- the name of the state (e.g. California), gives its #rem, -- 2-letter upper case abbrevi...
nilq/small-lua-stack
null
--[[ Boss - args.AKILZON.lua This script was written and is protected by the GPL v2. This script was released by Paroxysm of the Blua Scripting Project. Please give proper accredidations when re-releasing or sharing this script with others in the emulation commUnity. ~~End of License Agreement -- Paroxysm, August 27,...
nilq/small-lua-stack
null
if app.session then app.session:destroy() slot.put_into("notice", _"Logout successful") if config.etherpad then request.set_cookie{ path = config.etherpad.cookie_path, name = "sessionID", value = "invalid" } end end
nilq/small-lua-stack
null
local Tier10ArmorVendorID = 43506 local T10Loop = { [1] = {51227,51229,51225,51226,51228,51221,51224,51220,51222,51223}, [2] = {51272,51273,51274,51270,51271,51266,51269,51265,51267,51268,51277,51279,51275,51276,51278}, [3] = {51286,51288,51289,51285,51287}, [4] = {51252,51254,...
nilq/small-lua-stack
null