content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
object_mobile_azure_cabal_sb_slayer_01 = object_mobile_shared_azure_cabal_sb_slayer_01:new { } ObjectTemplates:addTemplate(object_mobile_azure_cabal_sb_slayer_01, "object/mobile/azure_cabal_sb_slayer_01.iff")
nilq/small-lua-stack
null
--Server Round Manager resource.AddFile("3_minutes_remain.wav") resource.AddFile("2_minutes_remain.wav") resource.AddFile("1_minute_remains.wav") util.AddNetworkString(ERoundEvents.R_STARTED) util.AddNetworkString(ERoundEvents.R_ENDED) util.AddNetworkString(ERoundEvents.R_WARNING) RoundManager = { InRound = false...
nilq/small-lua-stack
null
if SERVER then include( 'glayout/init.lua' ) else include( 'glayout/glayout.lua' ) include( 'glayout/cl_init.lua' ) end
nilq/small-lua-stack
null
-- lerror | 15.07.2018 -- By daelvn -- Lua Errors and Exceptions --# Namespace #-- local lerror = {} --# Functions #-- -- The reason for this is to allow lerror.exceptions to replace normal Lua errors with lerror Exceptions lerror.pcall = pcall -- .throw function lerror.throw (e) if e "type":match "[Ee]xception" th...
nilq/small-lua-stack
null
object_tangible_saga_system_saga_relic_generic = object_tangible_saga_system_shared_saga_relic_generic:new { } ObjectTemplates:addTemplate(object_tangible_saga_system_saga_relic_generic, "object/tangible/saga_system/saga_relic_generic.iff")
nilq/small-lua-stack
null
return function() local Symbol = require(script.Parent.Symbol) describe("named", function() it("should give an opaque object", function() local symbol = Symbol.named("foo") expect(symbol).to.be.a("userdata") end) it("should coerce to the given name", function() local symbol = Symbol.named("foo") ...
nilq/small-lua-stack
null
testMipmap = function() local f = {0} local g = {} local h = {6} local k = {0} f[1] = f[1] + 1 k[1] = h[1] - f[1]; g[1] = k[1]^2 print (g[1]) end testMipmap()
nilq/small-lua-stack
null
local mType = Game.createMonsterType("Ancient Lion Knight") local monster = {} monster.description = "an ancient lion knight" monster.experience = 8100 monster.outfit = { lookType = 1071, lookHead = 57, lookBody = 78, lookLegs = 76, lookFeet = 76, lookAddons = 1, lookMount = 0 } monster.health = 9100 monster.m...
nilq/small-lua-stack
null
Button = Class('Button') function Button.new(x, y, w, h, value) local self = inherit(Component.new("button", x, y, w, h), Button) self.value = value or "" self.color = tocolor(39, 174, 95, 255) return self end function Button:draw() if self.mouseDown and self.mouseOver then dxDrawRectangle(self.x, self.y, sel...
nilq/small-lua-stack
null
local marker_lookup = {}; -- Format marker ids to allow their use as formspec element ids. -- We're mostly concerned with guarding against the : character because it is -- common for ids and has an alternate meaning in formspecs. -- -- id: The id to format -- -- Returns the formatted id local function format_marker_id...
nilq/small-lua-stack
null
print("nav-testbed-launcher.lua starting up...") require("nav-app-skeleton") print("Parsing arguments") -- Override the stock initScene with one to load the provided script. script = arg[1] do local oldInitScene = osgnav.initScene function osgnav:initScene() oldInitScene(self) dofile(script) end end for i = ...
nilq/small-lua-stack
null
-- power/ctrl.lua local me = microexpansion -- [register node] Controller me.register_node("ctrl", { description = "Power Controller", tiles = { "ctrl_sides", "ctrl_bottom", "ctrl_sides", "ctrl_sides", "ctrl_sides", "ctrl_sides" }, drawtype = "nodebox", paramtype = "light", node_box = { type =...
nilq/small-lua-stack
null
sptbl["vdelay"] = { files = { module = "vdelay.c", header = "vdelay.h", example = "ex_vdelay.c", }, func = { create = "sp_vdelay_create", destroy = "sp_vdelay_destroy", init = "sp_vdelay_init", compute = "sp_vdelay_compute", }, params = { ...
nilq/small-lua-stack
null
local w = require('tables').wrap local parser = clink.arg.new_parser local function trim (string_to_trim) return string_to_trim:match("^%s*(.-)%s*$") end local function get_command (line) return trim(line):match("^(%S+) ") end local function read_lines (command, start, stop) local lines = w({}) local f = i...
nilq/small-lua-stack
null
ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.Spawnable = false ENT.AdminOnly = false
nilq/small-lua-stack
null
---------------------------- -- Bunny Hop -- -- Created by Skeyler.com -- ---------------------------- function ENT:SetupDataTables() self:NetworkVar("Bool",0,"Spawn") end
nilq/small-lua-stack
null
SWEP.Base = "arccw_halo_subbase" SWEP.Spawnable = true -- this obviously has to be set to true SWEP.Category = "ArcCW - Halo 3" -- edit this if you like SWEP.AdminOnly = false SWEP.PrintName = "Plasma Rifle" SWEP.TrueName = "Type-25 Plasma Rifle" SWEP.Trivia_Class = "Rifle" SWEP.Trivia_Desc = "This is a Type-25 Direct...
nilq/small-lua-stack
null
--[[ Provides `Composite` for `Class`es. When the `combine` method is called, the subject is not yet fully initialized. Therefore, protocol methods can not be called immediately. A `Composite` can return a callback which gets executed _after_ the subject is initialized. This allows a composite to set state a...
nilq/small-lua-stack
null
function autologinRemember(username, password) local f if not fileExists("@autologin") then f = fileCreate("@autologin") else f = fileOpen("@autologin") end if not f then return end local fields = { username = username, password = password } ...
nilq/small-lua-stack
null
InputController = Class { init = function(self) --cargo doesnt cooperate with new cursor easy cause we cant :getData() in LOVE >11.0. self.isPlacingTower = false self.mouse = Mouse(Vector(love.mouse.getPosition())) end; update = function(self, dt) self.mouse:update(dt) e...
nilq/small-lua-stack
null
local class = require('lib.middleclass') local Mixin = class('mixin.shoot') function Mixin:initialize(shoot) self.shoot = shoot or false end return Mixin
nilq/small-lua-stack
null
function onCreate() -- background shit makeLuaSprite('boxingnight1', 'boxingnight1', -450, -250); setScrollFactor('boxingnight1', 0.9, 0.9); makeLuaSprite('boxingnight2', 'boxingnight2', -450, -250); setScrollFactor('boxingnight2', 0.9, 0.9); -- sprites that only load if Low Quality is turned off if n...
nilq/small-lua-stack
null
data:extend( { { type = "technology", name = "robotics", icon = "__base__/graphics/technology/robotics.png", prerequisites = {"advanced-electronics-2", "electric-engine"}, unit = { count = 100, ingredients = { {"science-pack-1", 1}, {"science-pack-2", 1}, ...
nilq/small-lua-stack
null
--DEPRECATED local widget = require( "widget" ) local composer = require( "composer" ) local json = require ("json") local myData = require ("mydata") local videoLoadingScene = composer.newScene() --------------------------------------------------------------------------------- ----------------------------------------...
nilq/small-lua-stack
null
local Magic = require("mod.elona_sys.api.Magic") local Effect = require("mod.elona.api.Effect") local Rand = require("api.Rand") local Event = require("api.Event") local Gui = require("api.Gui") local DeferredEvent = require("mod.elona_sys.api.DeferredEvent") local Chara = require("api.Chara") local Input = require("ap...
nilq/small-lua-stack
null
local Tunnel = module("_core", "lib/Tunnel") local Proxy = module("_core", "lib/Proxy") API = Proxy.getInterface("API") cAPI = Tunnel.getInterface("API") RegisterServerEvent('FRP:TITLESWASH:washMoney') AddEventHandler('FRP:TITLESWASH:washMoney', function() local _source = source local User = API.getUserFromSo...
nilq/small-lua-stack
null
local metadata = { name = "Bulbous", description = "A simple lighting library.", version = "0.1.0", author = "Tachytaenius", license = [[ MIT License Copyright (c) 2018 Henry Fleminger Thomson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated d...
nilq/small-lua-stack
null
local MinigameController = class("MinigameController", Entity) local Transition = require("transition.CurtainsTransition") local Candle = require("scenes.minigame.Candle") local HintText = require("scenes.minigame.HintText") MinigameController.static.MAX_TIME = 5 function MinigameController:initialize(hint) Entity....
nilq/small-lua-stack
null
require("stategraphs/commonstates") local WALK_SPEED = 5 local actionhandlers = { ActionHandler(ACTIONS.GOHOME, "action"), ActionHandler(ACTIONS.POLLINATE, function(inst) if inst.sg:HasStateTag("landed") then return "pollinate" else return "land" end end), } local events= { EventHandler...
nilq/small-lua-stack
null
local Respones = require("Respones") local Stype = require("ServiceType") local CmdType = require("logic/const/CmdType") local config= require("GameConfig"); local MatchMgr=require("logic/MatchMgr"); local logicServerConfig=config.servers[Stype.Logic]; local LogicConfig=require("logic/LogicConfig"); local function lo...
nilq/small-lua-stack
null
--[[ s:UI Player Helper Functions Martin Karer / Sezz, 2014 http://www.sezz.at --]] local S = Apollo.GetPackage("Gemini:Addon-1.1").tPackage:GetAddon("SezzUI"); ----------------------------------------------------------------------------- -- Generic Player Data -------------------------------------...
nilq/small-lua-stack
null
local thisFile = 'joinRoom' if (dbg) then dbg.file(thisFile) end -------------------------------------------------------------------------------------------------- -- setup storyboard --**************************************************** local scene = sb.newScene() -- forward declarations local object1, object2 lo...
nilq/small-lua-stack
null
local event = require 'utils.event' local math_random = math.random local valid_entities = { ["rock-big"] = true, ["rock-huge"] = true, ["sand-rock-big"] = true } local rock_mining_chance_weights = { {"iron-ore", 25}, {"copper-ore",18}, {"coal",14}, {"stone",10}, {"uranium-ore",3} } local ore_raffle = {} ...
nilq/small-lua-stack
null
TestSingleton = {} function TestSingleton:test() local a = BasicSingle:New() local b = BasicSingle:New() lu.assertEquals( a, b ) a = nil b = nil collectgarbage( "collect" ) end function TestSingleton:testGCLeaks() local a = BasicSingle:New() local b = BasicSingle:New() local strID = tostring( a ) lu.asse...
nilq/small-lua-stack
null
require "warp" function mu(x, y, z) return 1.0 end function lam(x, y, z) return 2.0 end function force(x, y, z) return math.pi*(-3.0*math.pi*math.sin(math.pi*x)*math.sin(math.pi*z) + 5.0*math.pi*math.cos(math.pi*x)*math.cos(math.pi*y)), -3.0*math.pi^2*math.sin(math.pi*x)*math.sin(math.pi*y), 5.0*math.pi^...
nilq/small-lua-stack
null
--- HTTP response -- @classmod haproxy.embed.Response -- @pragma nostrip local class = require('pl.class') local tablex = require('pl.tablex') local http = require('haproxy.embed.http') --- A Response represents an API response. local Response = class() --- Construct an API response. -- @tparam[opt=200] int status...
nilq/small-lua-stack
null
player = { name = "Bob", isSpawned = false } function fib(number) if number < 2 then return 1 end return fib(number - 2) + fib(number -1) end My_Func()
nilq/small-lua-stack
null
class "job.mime" ("job") local mime = job.mime mime.title = "Mime" mime.access = { "theatre" } mime.total_positions = 1 mime.spawn_positions = 1 -- how many players can spawn in as this job? --[[ TODO change this value on map-load. Create a `player_spawn` entity which mutates this. ]] mim...
nilq/small-lua-stack
null
minetest.register_node("bt_core:wild_cotton", { description = "Wild Cotton", waving = "1", drawtype = "plantlike", drop = { max_items = 2, items = { { items = {"bt_core:cotton_ball 3"}, }, { items = {"bt_core:cotton_1 2"...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- -- 81-722 async inverter and motors -------------------------------------------------------------------------------- -- Copyright (C) 2013-2018 Metrostroi Team & FoxWorks Aerospace s.r.o. -- Contains proprietary code. See license.txt for a...
nilq/small-lua-stack
null
--[[ � CloudSixteen.com do not share, re-distribute or modify without permission of its author (kurozael@gmail.com). --]] local THEME = Clockwork.theme:Begin(true); local FONT_USED = "Mailart Rubberstamp"; -- "Accidental Presidency" -- Called when fonts should be created. function THEME:CreateFonts() surface.Crea...
nilq/small-lua-stack
null
return {'hepatitis','heptameter','heptaeder','heppen','heppener','hepkema','heppe','hepen','heptameters'}
nilq/small-lua-stack
null
bow = { checkEquip = function(player) local val = false local bow, quiver = player:getEquippedItem(EQ_WEAP), player:getEquippedItem(EQ_SHIELD) if bow ~= nil and bow.thrown then if quiver ~= nil and quiver.thrown then val = true end end return val end, thrown = function(player) local weap, qui...
nilq/small-lua-stack
null
--[[ Name: sv_drugs.lua For: TalosLife By: TalosLife ]]-- GM.Drugs = {} GM.Drugs.m_tblEffects = {} function GM.Drugs:RegisterEffect( tblEffect ) self.m_tblEffects[tblEffect.Name] = tblEffect if tblEffect.PacOutfit and tblEffect.PacOutfitSlot then GM.Inv:RegisterEquipSlot( tblEffect.PacOutfitSlot.Name, tblEffe...
nilq/small-lua-stack
null
workspace "Horizon" architecture "x64" startproject "Sandbox" language "C++" configurations { "Debug", "Release" } flags { "MultiProcessorCompile" } filter "system:windows" defines { "HRZ_PLATFORM_WINDOWS" } filter "configurations:Debug" defines "HRZ_DEBUG" runtime "Debug" symbols "o...
nilq/small-lua-stack
null
local Draw = require("api.Draw") local I18N = require("api.I18N") local Ui = require("api.Ui") local MapObjectBatch = require("api.draw.MapObjectBatch") local Gui = require("api.Gui") local ICharaElonaFlags = require("mod.elona.api.aspect.chara.ICharaElonaFlags") local IUiLayer = require("api.gui.IUiLayer") local Inpu...
nilq/small-lua-stack
null
------------------------------------------------------------------------------ -- -- This file is part of the Corona game engine. -- For overview and more information on licensing please refer to README.md -- Home page: https://github.com/coronalabs/corona -- Contact: support@coronalabs.com -- ------------------------...
nilq/small-lua-stack
null
object_building_player_construction_construction_player_guildhall_02 = object_building_player_construction_shared_construction_player_guildhall_02:new { } ObjectTemplates:addTemplate(object_building_player_construction_construction_player_guildhall_02, "object/building/player/construction/construction_player_guildhall_...
nilq/small-lua-stack
null
local time = require "util.time"; local distance = 0; local api = {}; local data = {} function api:set_distance(d) distance = d; end function api:incoming(id, callback) if not data[id] then data[id] = {}; end -- directly call callback() if the last call for this id was more than `distance` seconds away if not da...
nilq/small-lua-stack
null
local Class = require("class") local M = Class() M.__index = M function M:_init() self._data = {} end function M:add(talk) talk.id = talk.id or "" --print("id: <" .. talk.id .. ">") if talk.id then if self._data[talk.id] == nil then self._data[talk.id] = {} end table.insert(self._data[ta...
nilq/small-lua-stack
null
acklibrary { name = "internal", hdrs = { "./*.h" } } local bdos_calls = { [ 0] = "cpm_exit", [ 1] = "cpm_conin", [ 2] = "cpm_conout", [ 3] = "cpm_auxin", [ 4] = "cpm_auxout", [ 5] = "cpm_lstout", [ 6] = "cpm_conio", [ 7] = "cpm_get_iobyte", [ 8] = "cpm_set_iobyte", [ 9] ...
nilq/small-lua-stack
null
-- Blip Class -- Created for: -- Easy blip creation. -- Usage: -- No intended usage outside of BlipHandler.lua Blip = function(x,y,z,sprite,color,text,scale,display,shortRange,highDetail) local blip = AddBlipForCoord((x or 0.0),(y or 0.0),(z or 0.0)) SetBlipSprite (blip, (sprite or 1)) SetBlipDis...
nilq/small-lua-stack
null
--Automatically generated by SWGEmu Spawn Tool v0.12 loot editor. nightsister_vibro_unit = { minimumLevel = 0, maximumLevel = -1, customObjectName = "", directObjectTemplate = "object/tangible/component/weapon/vibro_unit_nightsister.iff", craftingValues = { {"mindamage",34,75,0}, {"maxdamage",34,75,0}, {"at...
nilq/small-lua-stack
null
-- -- fuel -- nautilus.GAUGE_FUEL_POSITION = {x=0,y=-8.45,z=5.31} nautilus.MAX_FUEL = minetest.settings:get("nautilus_max_fuel") or 10 nautilus.FUEL_CONSUMPTION = minetest.settings:get("nautilus_fuel_consumption") or 6000 minetest.register_entity('nautilus:pointer',{ initial_properties = { physical = false, collide_...
nilq/small-lua-stack
null
local lsp = require('languages.lsp') local M = {} M.efm = { { formatCommand = 'black --quiet -', formatStdin = true, }, { lintCommand = 'flake8 --stdin-display-name ${INPUT} -', lintStdin = true, lintFormats = { '%f:%l:%c: %m', }, }, } M.all_...
nilq/small-lua-stack
null
include("HSE_utils") civDataCacheEDR = {} print("Loading LeaderIcon.lua from Better Leader Icon version "..GlobalParameters.BLI_VERSION_MAJOR.."."..GlobalParameters.BLI_VERSION_MINOR.." (compatibility with Hide Stats Evolved)"); -- =========================================================================== -- Better ...
nilq/small-lua-stack
null
local process = ... local misc = { help = { {"coinflip","","Flips a coin."}, {"diceroll","[sides]","Rolls an N-sided die."}, {"timer","[time]","Starts and stops a timer."}, {"server","","Returns information about the server."} } } function misc:init(process) process:registerCallback(self,"command",1,self.co...
nilq/small-lua-stack
null
local isMenuInitialized = false -- Update ragdoll fading speed/time net.Receive("NBC_UpdateFadingTime", function() RunConsoleCommand("g_ragdoll_fadespeed", net.ReadString()) end) -- Run commands os the server local function NBC_SendToServer(command, value) if not isMenuInitialized then return end net.Start("NBC_U...
nilq/small-lua-stack
null
local _E local hook if not tdBag2 then return end if not tdBag2.RegisterPlugin then return end local function pipe(item) local name = item:GetName() local slotFrame = _G[name] local itemLink = GetContainerItemLink(item.bag, item.slot) SyLevel:CallFilters("tdbag2", slotFrame, _E and itemLink, item.bag, item.slot) ...
nilq/small-lua-stack
null
--- File manipulation utilities local M = {} --- Fix a filename to ensure that it doesn't contain any illegal characters -- @param filename -- @return Filename with illegal characters replaced function M.fix(filename) filename = filename:gsub("([^0-9a-zA-Z%._ ])", function(c) return string.format("%%%02X", string.by...
nilq/small-lua-stack
null
local function GetBlockInfo(blockPos) print("Request data for "..blockPos) local bi = BlockInfo.new() bi.collides = true bi.blockstate = "" bi.variant = "" return bi end local function RegisterBlocks() AC.RegisterBlock(BlockId.new(1,0), true, "stone", "normal") AC.RegisterBlock(BlockId....
nilq/small-lua-stack
null
local skynet = require "skynet" local crypt = require "skynet.crypt" local httpc = require "http.httpc" local json = require 'cjson.safe' local setmetatable = setmetatable local tonumber = tonumber local byte = string.byte local type = type local null = nil local webclient local ok, new_tab = pcall(require, "table.ne...
nilq/small-lua-stack
null
local l = ClassE(); assert(l:methdA() == 0); assert(l:methdB() == 0); assert(l:methdC() == 0); assert(l:methdD() == 0); assert(l:methdE() == 0);
nilq/small-lua-stack
null
vim.cmd [[packadd packer.nvim]] return require('packer').startup(function() use 'wbthomason/packer.nvim' use 'gruvbox-community/gruvbox' use { 'nvim-telescope/telescope.nvim', requires = { {'nvim-lua/plenary.nvim'} } } use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' ...
nilq/small-lua-stack
null
local _M = { _VERSION = '0.09' } local mt = { __index = _M } function _M.new(size) return setmetatable({}, mt) end function _M.get(self, key) return nil end function _M.set(self, key, value, ttl) end function _M.flush_all(self) end package.loaded["resty.lrucache"] = _M local cjson_decode = require('cjson')....
nilq/small-lua-stack
null
local crud = require "kong.api.crud_helpers" return { ["/consumers/:username_or_id/acls/"] = { before = function(self, dao_factory, helpers) crud.find_consumer_by_username_or_id(self, dao_factory, helpers) self.params.consumer_id = self.consumer.id end, GET = function(self, dao_factory) ...
nilq/small-lua-stack
null
function greetPlayersAsTheyJoin(player) print("Hello, " .. player.name .. "!") end Game.playerJoinedEvent:Connect(greetPlayersAsTheyJoin) Game.playerJoinedEvent:Connect(function (player) print("Hello2, " .. player.name .. "!")end) local card01 = World.FindObjectById('AD0C7E624EDE6418:card') loca...
nilq/small-lua-stack
null
--[[ Adds a button to the Shrine of Solace's Offer page to lock selected traits before rerolling. This way you are guaranteed to get an item with desired traits. Author: UnShame ]] -- local mod = {} local mod_name = "LockTraits" -- Returns index of object o in table t or nil if t doesn't have o mod.table_...
nilq/small-lua-stack
null
measure = {"length", "mass", "volume", "time"} name = {"a metre", "a gram", "a litre", "a second"}
nilq/small-lua-stack
null
local origGetMaterialXYOffset = GetMaterialXYOffset function GetMaterialXYOffset(techId) if techId == kTechId.HealingField then techId = kTechId.MedPack end return origGetMaterialXYOffset(techId) end
nilq/small-lua-stack
null
return { corshock = { acceleration = 0.16, activatewhenbuilt = true, airsightdistance = 1000, bankscale = 0.5, blocking = false, brakerate = 0.375, buildcostenergy = 415057, buildcostmetal = 14269, builder = false, buildpic = "corshock.dds", buildtime = 350000, canattack = true, canfly = true...
nilq/small-lua-stack
null
local fs = require 'bee.filesystem' local pf = require 'bee.platform' print(package.cpath) local function getExtensionDirName(packageDir) local publisher,name,version for line in io.lines(packageDir .. '/package.json') do if not publisher then publisher = line:match('"publisher": "([^"]+)"...
nilq/small-lua-stack
null
local skynet = require "skynet" local socketManager = require("byprotobuf/socketManager") local socketCmd = require("logic/common/socketCmd") local queue = require("skynet.queue") local cs = queue() local TAG = "HallAgent" HallAgent = class() function HallAgent:start(conf) self.m_pUserId = nil self.m_gamebale = n...
nilq/small-lua-stack
null
package.path = "/home/christian/devel/cadet/?.lua;" .. package.path local cadet = require("cadet") App = { index = function(env, headers, query) local res = cadet.response view = { title = "Test Application!", question = "What do we want?", answer = "I don't know, but we want it now!", ...
nilq/small-lua-stack
null
return Def.ActorFrame{ InitCommand=function(self) self:Center() end, LoadActor("usbicon.png")..{ InitCommand=function(self) self:shadowlength(1) end, OnCommand=function(self) self:zoom(0.6):glow(1,1,1,1): glowshift():diffusealpha(0):sleep(1.0):decelerate(2):diffusealpha(1):sleep(6):linear(0.75):diffusealpha(0...
nilq/small-lua-stack
null
--[[ bbbbbbbb b::::::b iiii lllllll lllllll )))))) b::::::b i::::i l:::::l l:::::l ...
nilq/small-lua-stack
null
local radius = variable("Radius") local pos = get_position() for radians = 0, math.pi * 2, 0.2 do x = pos.x + (radius * math.cos(radians)) y = pos.y + (radius * math.sin(radians)) move_absolute(x, y, pos.z, 50) end
nilq/small-lua-stack
null
-- See Copyright Notice in lal.lua local function class() local class class = { } class.__index = class class = setmetatable(class, { __call = function (_, ...) local instance = setmetatable({ }, class) if (class.init) then instance:init(...) end ...
nilq/small-lua-stack
null
require 'utils' local car = getCar() -- Positive cases. Can't print the result because the address may change -- from run to run. -- dbgscript.searchMemory(car:f('name').address-16, 100, 'FooCar', 1) dbgscript.searchMemory(car:f('name').address-16, 100, 'FooCar', 2) -- Negative cases. -- -- 4 is not a ...
nilq/small-lua-stack
null
local luatest = require('luatest') local tarantool = require('tarantool') -- Returns true if Tarantool build type is Debug. local function is_debug_build() return tarantool.build.target:endswith('-Debug') end -- Returns true if Tarantool package is Enterprise. local function is_enterprise_package() return tar...
nilq/small-lua-stack
null
-- This script tests some basic spherical harmonics functionality print("Harmonics test script") quad0_handle = chiCreateProductQuadrature(GAUSS_LEGENDRE_CHEBYSHEV,32,32) quad0 = chiGetProductQuadrature(quad0_handle) quad1_handle = chiCreateProductQuadrature(GAUSS_LEGENDRE_CHEBYSHEV,4,4) quad1 = chiGetProductQuadrat...
nilq/small-lua-stack
null
proc = "%" ind = math.random(2) denom = 10^ind enum = 2 + math.random(2*denom - 5); if (enum == denom) then enum = enum - math.random(5) end value = enum / denom per = math.floor(value * 100) number = 2 + math.random(27) result = lib.dec_to_str(lib.math.round_dec(value * number, ind)) ...
nilq/small-lua-stack
null
include "dependencies.lua" workspace "openGL" characterset "MBCS" architecture "x64" configurations {"Debug", "Release"} flags {"MultiProcessorCompile"} group "Dependencies" include "vendor/GLFW" include "vendor/glad33" include "vendor/ImGui" group "" include "0_window" include "01_opengl" include "02_eleme...
nilq/small-lua-stack
null
-- Copyright 2013 Arman Darini display.setStatusBar(display.HiddenStatusBar) -- these are used almost everywhere, so make they global _utils = require("lib.utils") _math = require("lib.math2") _helpers = require("lib.helpers") _widget = require("widget") _storyboard = require("storyboard") _storyboard.purgeOnSceneCha...
nilq/small-lua-stack
null
local lib = { default_repository = 'JawaskaTeamCC' } local token do local f = io.open('.github', 'r') if f ~= nil then token = f:read('*all') f:close() end end local KVFile do local _class_0 local _base_0 = { open = function(path, mode) local file = KVFile(path, mode) if file.handle ...
nilq/small-lua-stack
null
local AS = unpack(AddOnSkins) if not AS:CheckAddOn('Dresser') then return end function AS:Dresser() for i = 1, 4 do local Button = _G['DressUpFrameLegacyDresser'..i] AS:SkinButton(Button) Button:SetSize(38, 22) end DressUpFrameLegacyDresser1:SetPoint('RIGHT', DressUpFrameResetButton, 'LEFT', -2, 0) DressU...
nilq/small-lua-stack
null
local ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) math.randomseed(math.floor(os.time() + math.random(100))) -- Player loaded AddEventHandler('es:playerLoaded', function( source ) getIdentity(source, function(data) -- print(data.firstname) if data.firstname == '' or data.firstn...
nilq/small-lua-stack
null
object_tangible_tcg_series7_garage_display_vehicles_speederbike = object_tangible_tcg_series7_garage_display_vehicles_shared_speederbike:new { } ObjectTemplates:addTemplate(object_tangible_tcg_series7_garage_display_vehicles_speederbike, "object/tangible/tcg/series7/garage_display_vehicles/speederbike.iff")
nilq/small-lua-stack
null
local autopairs = require 'nvim-autopairs' local cmp_autopairs = require 'nvim-autopairs.completion.cmp' local cmp = require 'cmp' autopairs.setup { disable_filetype = { 'TelescopePrompt' }, } cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done { map_char = { tex = '' } })
nilq/small-lua-stack
null
data:extend({ { type = "item", name = "orbital-fabricator-component", icon = "__expanded-rocket-payloads__/graphic/space-fabricator-32.png", icon_size = 32, flags = {"goes-to-main-inventory"}, subgroup = "buildings", order = "n", stack_size = 1 }, {...
nilq/small-lua-stack
null
--[[ Copyright (C) 2006-2007 Nymbia Copyright (C) 2010-2017 Hendrik "Nevcairiel" Leppkes < h.leppkes@gmail.com > 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, ...
nilq/small-lua-stack
null
-- Copyright 2019 Xingwang Liao <kuoruan@gmail.com> -- Licensed to the public under the MIT License. local uci = require "luci.model.uci".cursor() local util = require "luci.util" local fs = require "nixio.fs" local sys = require "luci.sys" local m, s, o local server_table = { } uci:foreach("frpc", "server", functio...
nilq/small-lua-stack
null
--特定のアドレスに対する入金を監視する --watch payments into spcific address local address = "YOUR_ADDRESS" --txidを受け取ったトランザクションの中にaddress宛のtxoutがあればtableにそのモナの量と承認数を入れて返す関数 --If there are txouts for address in received txid's transaction, return table containing mona value and confirmation number. function SearchTransaction(txid) ...
nilq/small-lua-stack
null
--[[ s:UI Bag Opener Martin Karer / Sezz, 2014 http://www.sezz.at --]] local S = Apollo.GetPackage("Gemini:Addon-1.1").tPackage:GetAddon("SezzUI"); local AutomationCore = S:GetModule("AutomationCore"); local M = AutomationCore:CreateSubmodule("vendor"); local log; ---------------------------------...
nilq/small-lua-stack
null
local WIDGET, VERSION = 'BottomTabButton', 2 local GUI = LibStub('NetEaseGUI-2.0') local BottomTabButton = GUI:NewClass(WIDGET, GUI:GetClass('TabItemButton'), VERSION) if not BottomTabButton then return end function BottomTabButton:Constructor() self:SetSize(10, 32) self.tLeft = self:CreateTexture(nil, ...
nilq/small-lua-stack
null
--[[ This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:28' using the latest game version. NOTE: This file should only be used as IDE support; it should NOT be distributed with addons! **************************************************************************** CONTENTS OF THIS FILE IS COPYRI...
nilq/small-lua-stack
null
data:extend({ { --------- ramp entity ------------- type = "rail-signal", name = "RTTrainRamp", icon = "__RnD_Labs_Bridges__/graphics/TrainRamp/icon.png", icon_size = 64, flags = {"placeable-neutral", "player-creation", "filter-directions", "fast-replaceable-no-build-while-moving"}, minabl...
nilq/small-lua-stack
null
--- Androlua plot library. -- @module android.plot local G = luajava.package 'android.graphics' local L = luajava.package 'java.lang' local V = luajava.package 'android.view' local array = require 'android.array' local append = table.insert local Plot = { array = array } -- OOP support local function make_object (obj...
nilq/small-lua-stack
null
function GM:ShowHelp() local h = self:CreateFrame( "Help", 300, 400 ); h:DockPadding( 10, 34, 10, 10 ); h:SetBackgroundBlur( true ); local t = self:CreateLabel( h, FILL, "COI 18", I18( "help_text" ), 7 ); t:SetWrap( true ); end
nilq/small-lua-stack
null
----------------------------------- -- -- tpz.effect.SPONTANEITY -- ----------------------------------- require("scripts/globals/status") ----------------------------------- function onEffectGain(target, effect) target:addMod(tpz.mod.UFASTCAST, 150) effect:setFlag(tpz.effectFlag.MAGIC_BEGIN) end function ...
nilq/small-lua-stack
null