content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ========== PlaceObj('XTemplate', { __is_kind_of = "XPropControl", group = "PreGame", id = "PropTrait", PlaceObj('XTemplateWindow', { '__class', "XPropControl", 'RolloverOnFocus', true, 'MouseCursor', "UI/Cursors/Rollover.tga", 'FXMouseIn', "MenuItemHov...
nilq/small-lua-stack
null
local StringBuffer = require("string_buffer") local Command = require("uci.command") local M = {} local options = { "btime", "wtime", "binc", "winc", } function M.parse(list) local data = {} assert(list[1] == "go") data.command = Command.GO local index = 2 while index <= #list do for _, v in ipair...
nilq/small-lua-stack
null
Weapon.PrettyName = "M16A4 ACOG" Weapon.WeaponID = "m9k_m16a4_acog" Weapon.DamageMultiplier = 0.6 Weapon.WeaponType = WEAPON_PRIMARY
nilq/small-lua-stack
null
local function getEncoder() local model = nn.Sequential() local ct = 0 function _bottleneck(internal_scale, use_relu, asymetric, dilated, input, output, downsample) local internal = output / internal_scale local input_stride = downsample and 2 or 1 local sum = nn.ConcatTable() local ...
nilq/small-lua-stack
null
local diamondShop_pin_map = require("qnFiles/qnPlist/hall/diamondShop_pin"); local gameHelpTabListItem= { name="gameHelpTabListItem",type=0,typeName="View",time=0,report=0,x=0,y=0,width=330,height=120,visible=1,fillParentWidth=0,fillParentHeight=0,nodeAlign=kAlignTopLeft, { name="left_tab_btn",type=2,typeName="Butt...
nilq/small-lua-stack
null
-- Lua bindings for /Volumes/Brume/Celedev CodeFlow/CodeFlow Sample Applications/LuaNavController/LuaNavController/DetailViewController.h -- Generated by Celedev® LuaBindingsGenerator on 2015-09-16 09:03:14 +0000 -- Objective C interface: @interface DetailViewController local DetailViewController = objc.classInterfa...
nilq/small-lua-stack
null
local a,b,c,d,e,f,g,h,i,j,k,l,m,n={"/init.lua","/OS.lua","/boot.lua"},{},{},unicode,computer;local function o(p)local q={e.pullSignal(p or math.huge)}q[1]=q[1]or""if#q>0 and h.n>0 and(q[1]:match"key"and not h[q[5]]or q[1]:match"cl"and not h[q[4]])then return{""}end;c[q[4]or""]=q[1]=="key_down"and 1;if c[29]and(c[56]and...
nilq/small-lua-stack
null
function onCreate() -- background shit makeLuaSprite('ChamberBG', 'ChamberBG', -600, -300); setScrollFactor('ChamberBG', 0.9, 0.9); makeLuaSprite('ChamberFloor', 'ChamberFloor', -650, -200); setScrollFactor('ChamberFloor', 0.9, 0.9); scaleObject('ChamberFloor', 1.1, 1.1); addLuaSprite('ChamberBG', false); ...
nilq/small-lua-stack
null
local lVector = require 'Q/RUNTIME/VCTR/lua/lVector' local ffi = require 'ffi' local qconsts = require 'Q/UTILS/lua/q_consts' local qc = require 'Q/UTILS/lua/q_core' local get_ptr = require 'Q/UTILS/lua/get_ptr' local cmem = require 'libcmem' local function eigen(X, stand_alone_test) local stand_alone = ...
nilq/small-lua-stack
null
-- "modifier_wisp_spirit_invulnerable", -- "modifier_wisp_spirits", -- "modifier_wisp_spirits_slow", -- //================================================================================================================= -- // Wisp: Spirits -- //===========================================================...
nilq/small-lua-stack
null
----------------------------------------------- -- Digital Instruments -- -- Uses imgui for the UI element. See imgui_demo.lua -- for documentation. ----------------------------------------------- if not SUPPORTS_FLOATING_WINDOWS then logMsg('Please update your FlyWithLua to the latest version') return end re...
nilq/small-lua-stack
null
-- local _HYPER = {'cmd,ctrl,alt,shift'} -- hs.hotkey.bind(_HYPER, "k", function() -- hs.osascript.applescript([[ -- tell application "Calendar" -- switch view to day view -- view calendar at current date -- end tell -- ]]) -- end) -- hs.grid.HINTS = { -- { "Q", "W", "E", "R", "T", "Y", "U", "...
nilq/small-lua-stack
null
-- Setup function host extangels = {} extangels.triggers = {} -- Create function to check whether the new number function is live function extangels.validate_numeral_function() return angelsmods.functions.add_number_icon_layer({}, 1, angelsmods["smelting"].number_tint) end -- Append angel numerals and return an i...
nilq/small-lua-stack
null
return {'rayon','rayonchef','rayondirecteur','rayongericht','rayonhoofd','rayonkantoor','rayonleider','rayonmanager','rayonverband','rayonarchitect','rayonbestuur','raymond','rays','raya','raymon','raymakers','ray','rayonchefs','rayonhoofden','rayonleiders','rayonmanagers','rayons','rays','rayas','raymons','raymonds'}
nilq/small-lua-stack
null
local function scatter(view, percent, height) local oldp = percent if percent < 0 then percent = -percent end local i = 0 while true do i = i + 1 local v = view[i] if v == nil then break end local mult = 1 if (i % 2 == 0) then mult = -1 end v:translate(0...
nilq/small-lua-stack
null
-- simplified config for saving an loading lua tables local Config = {} function Config:init(appname,vendorname) local config = wx.wxFileConfig(appname, vendorname,lua2scpath.."optionsfile") if config then config:SetRecordDefaults() self.config = config else error("Could not create config") end end function ...
nilq/small-lua-stack
null
local sh = { } sh.type = "light" sh.func = "sampleShadowSun" function sh:constructDefinesGlobal(dream) return [[ float sampleShadowSun2(Image tex, vec2 shadowUV, float depth) { float ox = float(fract(love_PixelCoord.x * 0.5) > 0.25); float oy = float(fract(love_PixelCoord.y * 0.5) > 0.25) + ox; if (oy > 1.1)...
nilq/small-lua-stack
null
local widget = require("widget") local sounds = require('libraries.sounds') local slide_menu = {} local group = display.newGroup() local onTouch local _W = display.contentWidth local _H = display.contentHeight local real_H = display.actualContentHeight local real_x0 = (_H - real_H) * 0.5 function slide_menu:new(para...
nilq/small-lua-stack
null
local tvm = require('tvm') local parser = require('shine.lang.parser') local translator = require('shine.lang.translator') local magic = string.char(0x1b, 0x4c, 0x4a, 0x01) local function loadchunk(code, name, opts) if string.sub(code, 1, #magic) ~= magic then local srctree = parser.parse(code, na...
nilq/small-lua-stack
null
local isActive = true local AWSBehaviorAPITest = { } function AWSBehaviorAPITest:OnActivate() local runTestEventId = GameplayNotificationId(self.entityId, "Run Tests") self.gamePlayHandler = GameplayNotificationBus.Connect(self, runTestEventId) self.apiHandler = AWSBehaviorAPINotificationsBus.Connect(sel...
nilq/small-lua-stack
null
--[[ GD50 Breakout Remake -- ServeState Class -- Author: Colton Ogden cogden@cs50.harvard.edu The state in which we are waiting to serve the ball; here, we are basically just moving the paddle left and right with the ball until we press Enter, though everything in the actual game now should render in prepar...
nilq/small-lua-stack
null
-- Sort petrochem buildings into more rows local petrochem_buildings = { ["angels-air-filter"] = "petrochem-buildings-air-filter", ["angels-air-filter-2"] = "petrochem-buildings-air-filter", ["angels-air-filter-3"] = "petrochem-buildings-air-filter", ["angels-air-filter-4"] = "petrochem-buildings-air-fi...
nilq/small-lua-stack
null
local addonName, addon, _ = ... local plugin = addon:NewModule('Tracker', 'AceEvent-3.0') local defaults = { char = { trackProfession = { [1] = true, -- primary (first) [2] = true, -- primary (second) [3] = true, -- archaeology [4] = true, -- fishing [5] = true, -- cooking [6] = true, -- first aid...
nilq/small-lua-stack
null
--- --- Created by dhh. --- -- Load the shdict shared_conf = ngx.shared.ct_shared_dict
nilq/small-lua-stack
null
return function( s, is_text, path ) if is_text then local chunk = assert( (loadstring or load)( s, '@' .. path ) ) return string.dump( chunk, true ), false else return s, false end end
nilq/small-lua-stack
null
local function config() require("trouble").setup {use_lsp_diagnostic_signs = true} end local function setup() vim.api.nvim_set_keymap("n", "<leader>xx", "<cmd>TroubleToggle<cr>", {silent = true, noremap = true}) vim.api.nvim_set_keymap( "n", "<leader>ew", "<cmd>Trouble lsp_workspace_diagnostics<cr>...
nilq/small-lua-stack
null
--[[ Copyright (c) 2021 LeonAirRC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribut...
nilq/small-lua-stack
null
-- vim: ts=2 sw=2 sts=2 et : -- # Sym.lua -- Summarizing symbolic columns. -- (c) 2021 Tim Menzies (timm@ieee.org) unlicense.org local r=require local Lib,Col,Count = r("lib"),r("col"),r("count") local Sym = Lib.class(Col) function Sym:_init(at,txt) self:super(at,txt) self.seen,self.most,self.mode = {},0,nil ...
nilq/small-lua-stack
null
print("Hello from Lua, ", system.version) do local t = 0 local f function f() print("timer demo ", t, ", cur time: ", system.time) t = t + 1 if t <= 5 then setTimeout(f, 1000) end end f() end function bindings.exit() print("Good Bye from Lua") end function bindings.serverStart() print("Lua: server start...
nilq/small-lua-stack
null
class('GS_Software','GS_Class',{ ReadSuper = function(this,fin) fin:read(5) end; Read = function() end; SaveSuper = function(this,fout) fwrite(fout,5,0) end; Save = function() end; })
nilq/small-lua-stack
null
local luawa = require('luawa.core'):init() luawa:run()
nilq/small-lua-stack
null
--Script Name : insert MS track --Author : Jean Loup Pecquais --Description : insert MS track --v1.0.0 local libPath = reaper.GetExtState("Reaper Evolution", "libPath") if not libPath or libPath == "" then reaper.MB("Reaper Evolution library is not found. Please refer to user guide", "Library not found", 0) re...
nilq/small-lua-stack
null
-- /////////////////////////////////////////////////////////////////// -- // Name: inifile.lua -- // Purpose: Inifile parser 1.0 -- // Created: 2018/10/09 -- // Copyright: (c) 2018 Hernan Dario Cano [dcanohdev[at]gmail.com] -- // License: GNU GENERAL PUBLIC LICENSE -- ////////////////////////////////////////...
nilq/small-lua-stack
null
local options = { frames = { {x=0,y=0,width=16,height=16,}, -- frame 1 {x=16,y=0,width=16,height=16,}, -- frame 2 {x=32,y=0,width=16,height=16,}, -- frame 3 {x=48,y=0,width=16,height=16,}, -- frame 4 {x=64,y=0,width=16,height=16,}, -- frame 5 {x=80,y=0,width=16,height=16,}, -- frame 6 ...
nilq/small-lua-stack
null
-- See LICENSE for terms return { PlaceObj("ModItemOptionToggle", { "name", "EnableMod", "DisplayName", T(302535920011303, "<color ChoGGi_yellow>Enable Mod</color>"), "Help", T(302535920011793, "Disable mod without having to see missing mod msg."), "DefaultValue", true, }), PlaceObj("ModItemOptionToggle", {...
nilq/small-lua-stack
null
endor_gondula_loremaster_neutral_small_theater = Lair:new { mobiles = { {"gondula_loremaster",1}, {"gifted_gondula_shaman",1}, {"gondula_shaman",1}, {"gondula_tribesman",1} }, spawnLimit = 9, buildingsVeryEasy = {"object/building/poi/endor_ewok_small1.iff","object/building/poi/endor_ewok_small2.iff","object...
nilq/small-lua-stack
null
return { [1] = {x4=1,x1=true,x2=3,x3=128,x5=11223344,x6=1.2,x7=1.23432,x8_0=12312,x8=112233,x9=223344,x10="hq",x12={x1=10,},x13=2,x14={ _name='DemoD2',x1=1,x2=2,},s1={key='/asfa',text="aabbcc"},v2={x=1,y=2},v3={x=1.1,y=2.2,z=3.4},v4={x=10.1,y=11.2,z=12.3,w=13.4},t1=-28800,k1={1,2,},k2={2,3,},k5={1,6,},k8={[2]=2,[4]=10...
nilq/small-lua-stack
null
function Exec() -- Initialize local modem = peripheral.find("modem") if modem == nil then print("Please attach an ender modem to the extra_internal_core computer") return end local modemName = peripheral.getName(modem) rednet.open(modemName) rednet.host...
nilq/small-lua-stack
null
-- Capsaicin Dependencies VULKAN_SDK = os.getenv("VULKAN_SDK") IncludeDir = {} IncludeDir["stb"] = "%{wks.location}/Capsaicin/vendor/stb" IncludeDir["GLFW"] = "%{wks.location}/Capsaicin/vendor/GLFW/include" IncludeDir["Glad"] = "%{wks.location}/Capsaicin/vendor/Glad/include" IncludeDir["glm"] = "%{wks.location}/Caps...
nilq/small-lua-stack
null
--[[ --------------------------------------------------------------------------- Name: SimpleUnitFrames Author: Pneumatus About: An extension to the default WoW Unit Frames. Rather than a complete unitframe replacement, this addon adds further information and features to the existing frames and allows a greater deg...
nilq/small-lua-stack
null
local res = ngx.location.capture('/fetch_api', { method = ngx.HTTP_GET, args = {} }); ngx.log(ngx.ERR, res.status); if res.status == ngx.HTTP_OK then ngx.var.api_result = res.body; else ngx.exit(403); end
nilq/small-lua-stack
null
data.raw["gui-style"]["default"]["ca_frame"] = { type = "frame_style", font = "default-frame", font_color = {r=1, g=1, b=1}, top_padding = 3, right_padding = 3, bottom_padding = 3, left_padding = 3, graphical_set = { type = "composition", filename = "__core__/graphics/gui.png", priority = "extra-high-no-s...
nilq/small-lua-stack
null
#!/usr/bin/env tarantool -- -- gh-5632: Lua code should not use any global buffers or objects without -- proper ownership protection. Otherwise these items might be suddenly reused -- during Lua GC which happens almost at any moment. That might lead to data -- corruption. -- local tap = require('tap') local ffi = req...
nilq/small-lua-stack
null
function OnInit() print("Gametype: Starting galaxy map level!") Rule_AddInterval("Rule_Init", 0) end function Rule_Init() StartMission() Rule_Remove("Rule_Init") end Events = {}
nilq/small-lua-stack
null
object_ship_nova_orion_smuggler_light_tier7 = object_ship_shared_nova_orion_smuggler_light_tier7:new { } ObjectTemplates:addTemplate(object_ship_nova_orion_smuggler_light_tier7, "object/ship/nova_orion_smuggler_light_tier7.iff")
nilq/small-lua-stack
null
local uv = require('luv') local channel = require('coro-channel') local wrapRead = channel.wrapRead local wrapWrite = channel.wrapWrite return function(path, options) local stdin, stdout, stderr local stdio = options.stdio -- If no custom stdio is passed in, create pipes for stdin, stdout, stderr. if ...
nilq/small-lua-stack
null
--[[ Play message options to the user. ]] -- Message data. message_number = storage("counter", "message_number") deleted = storage("message", "deleted_" .. message_number) total_messages = storage("message", "__count") prev_message = "" next_message = "" delete_undelete_message = "delete" -- Build the initial optio...
nilq/small-lua-stack
null
local nvim_lsp = require("lspconfig") --[[ local utils = require("utils") local global = utils.global ]] -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer local on_attach = function(client, bufnr) local function buf_set_keymap(...) vim.api.nvim_b...
nilq/small-lua-stack
null
tusken_death_hunter = Creature:new { objectName = "@mob/creature_names:tusken_death_hunter", socialGroup = "tusken_raider", faction = "tusken_raider", level = 300, chanceHit = 25.0, damageMin = 1450, damageMax = 1850, baseXp = 25000, baseHAM = 100000, baseHAMmax = 110000, armor = 2, resists = {115,115,115,1...
nilq/small-lua-stack
null
ccs = ccs or {} ---RotationFrame object ---@class RotationFrame : Frame local RotationFrame = {} ccs.RotationFrame = RotationFrame -------------------------------- -- ---@param rotation float ---@return RotationFrame function RotationFrame:setRotation(rotation) end -------------------------------- -- ---@return float...
nilq/small-lua-stack
null
-- * Metronome IM * -- -- This file is part of the Metronome XMPP server and is released under the -- ISC License, please see the LICENSE file in this source package for more -- information about copyright and licensing. -- -- As per the sublicensing clause, this file is also MIT/X11 Licensed. -- ** Copyright (c) 2012,...
nilq/small-lua-stack
null
local rotate_torch_rules = function (rules, param2) if param2 == 5 then return mesecon.rotate_rules_right(rules) elseif param2 == 2 then return mesecon.rotate_rules_right(mesecon.rotate_rules_right(rules)) --180 degrees elseif param2 == 4 then return mesecon.rotate_rules_left(rules) elseif param2 == 1 then ...
nilq/small-lua-stack
null
module 'mock' local function buildGammaShader() local vsh = [[ attribute vec4 position; attribute vec2 uv; attribute vec4 color; varying LOWP vec4 colorVarying; varying MEDP vec2 uvVarying; void main () { gl_Position = position; uvVarying = uv; colorVarying = color; } ]] local fsh = [[ ...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- -- Радиостанция типа "Моторола" -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Metrostroi.DefineSystem("Motorola") TRAI...
nilq/small-lua-stack
null
local helpers = require('test.functional.helpers')(after_each) local eq = helpers.eq local eval = helpers.eval local feed = helpers.feed local clear = helpers.clear local expect = helpers.expect local command = helpers.command local funcs = helpers.funcs local meths = helpers.meths local insert = helpers.insert local ...
nilq/small-lua-stack
null
local Class = require 'lib.hump.class' local Frame = getClass 'wyx.ui.Frame' local CheckButton = getClass 'wyx.ui.CheckButton' local Button = getClass 'wyx.ui.Button' local Text = getClass 'wyx.ui.Text' local TextEntry = getClass 'wyx.ui.TextEntry' local property = require 'wyx.component.property' local command = requi...
nilq/small-lua-stack
null
--[[- Mechanical and ammunition malfuctions. @module RFF.Malfuctions @author Fenris_Wolf @release 1.0-alpha @copyright 2018 ]] --[[ Checking malfunctions depends on a variety of factors: over all condition of the firearm how many rounds have been shot since the last time the firearm was cleaned. For some...
nilq/small-lua-stack
null
--Dylang140 --January 29, 2022 --CC Tewaked GUI Prorgam --Intended for CC Tweaked and Immersive Engineering for Minecraft 1.18 --Feel free to change or copy this code for other mods, versions, or projects --======CONFIG SECTION======-- local speaker = peripheral.find("speaker") local bundledConnection = "bottom" loc...
nilq/small-lua-stack
null
-- --Rockmonster -- ccmobs2 = {} minetest.register_node("ccmobs2:rockmonster_block", { drawtype = "nodebox", node_box = { type = "fixed", fixed = { {0.0625, -0.5, -0.125, 0.3125, -0.375, 0.125}, {-0.3125, -0.5, -0.125, -0.0625, -0.375, 0.125}, {0.0625, -0.375, -0.125, 0.25, -0.1875, 0.0625}, {-0.25...
nilq/small-lua-stack
null
-- "Test cases" for Statlist-fullevo local s = require('Statlist-fullevo') print(s.statlist())
nilq/small-lua-stack
null
---Module responsible for running a single test class; -- can be used stand-alone from LuaUnit if desired. --'absolute reference' for setter local DEFAULT_VERBOSITY = 1 local stringbuffer = require 'lua_stringbuffer' ---- CLASSRUNNER RESULTS CLASS ----------------------------------------------- local Result = {} ...
nilq/small-lua-stack
null
DoorSlotSelection = CustomItem:extend() DoorSlotSelection.Types = { [1] = "unknown", [2] = "one_way", [3] = "dead_end", [4] = "event", [5] = "trainer", [6] = "coal_badge", [7] = "forest_badge", [8] = "cobble_badge", [9] = "fen_badge", [10] = "relic_badge", [11] = "mine_badge"...
nilq/small-lua-stack
null
local example = {} example.title = "Textinput" example.category = "Object Demonstrations" function example.func(loveframes, centerarea) local frame = loveframes.Create("frame") frame:SetName("Text Input") frame:SetSize(500, 90) frame:CenterWithinArea(unpack(centerarea)) local textinput = loveframes.Create("te...
nilq/small-lua-stack
null
--@name Fog Controller --@author Name --@client local distance = 0 local density = 0 local function setupFog(scale) -- distances have to be corrected according to skybox's scale local skybox_mul = scale or 1 -- only calculate fog properties once, in SetupWorldFog hook if not scale then lo...
nilq/small-lua-stack
null
module 'mock' require 'mock.ui.light' require 'mock.ui.tb'
nilq/small-lua-stack
null
-- See LICENSE for terms local mod_EnableMod -- fired when settings are changed/init local function ModOptions() mod_EnableMod = CurrentModOptions:GetProperty("EnableMod") end -- load default/saved settings OnMsg.ModsReloaded = ModOptions -- fired when option is changed function OnMsg.ApplyModOptions(id) if id ==...
nilq/small-lua-stack
null
require("common.classType") require("common.container") require("common.definitions") local _xpcall = xpcall local _debug_traceback = debug.traceback local function msg_hander(msg) return _debug_traceback(msg, 2) end function TRACEBACK_PCALL(func, ...) return _xpcall(func, msg_hander, ...) end function TRACE_...
nilq/small-lua-stack
null
project "FastLZ" SetupNativeDependencyProject() local version = "0.1.0" local repo = "http://fastlz.googlecode.com/svn/trunk/" local license = "MIT" kind "StaticLib" files { "src/*.c" } includedirs { "include" }
nilq/small-lua-stack
null
minetest.register_biome({ name = "warm_crystal", node_top = "default:stone", depth_top = 1, node_filler = "default:stone", depth_filler = 1, node_stone = "default:stone", node_riverbed = "default:sand", depth_riverbed = 2, y_min = 1, y_max = weird_biomes.max.y, heat_point = 8...
nilq/small-lua-stack
null
PartyFrameModule = classes.class(Module) local function modifyPartyFrameUI() for i = 1, 4 do _G["PartyMemberFrame"..i]:SetScale(1.6) end end function PartyFrameModule:init() self.super:init() self:addEvent("PLAYER_ENTERING_WORLD") end function PartyFrameModule:eventHandler(event, ...) if ...
nilq/small-lua-stack
null
local M = {} local memory = _G.memory local luap = require 'luap' local config = require 'config' local draw = require 'draw' local widget = require 'widget' local smw = require 'game.smw' local empty = luap.empty_array local OPTIONS = config.OPTIONS local COLOUR = config.COLOUR -- Private methods local function ch...
nilq/small-lua-stack
null
--------------------------------------------------------------------------------------------------- ---view3d.lua ---date: 2021.8.13 ---references: -x/src/core/view.lua, -x/src/core/screen.lua ---desc: Defines View3d, storing parameters for the 3d camera -----------------------------------------------------------------...
nilq/small-lua-stack
null
#showtooltip Evocation /equip Soulkeeper /cast Evocation /equip Rod of the Ogre Magi
nilq/small-lua-stack
null
--[[ � CloudSixteen.com do not share, re-distribute or modify without permission of its author (kurozael@gmail.com). --]] local CLASS = Clockwork.class:New("Vortigaunt"); CLASS.color = Color(255, 200, 100, 255); CLASS.factions = {FACTION_VORTIGAUNT}; CLASS.isDefault = true; CLASS.wagesName = "Supplies"; CLASS.d...
nilq/small-lua-stack
null
local PANEL = {} function PANEL:Init() self:SetWide(300) self:SetKeyboardInputEnabled(true) self.F1Down = true self:SetFont("DarkRPHUD2") -- This will eventually be gone when placeholder support is added to GMod self.lblSearch = vgui.Create("DLabel", self) self.lblSearch:SetFont("DarkRPHUD...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- -- Handler.......... : onDlcItemConfirmation -- Author........... : -- Description...... : -------------------------------------------------------------------------------- -------------------------------------------------------------...
nilq/small-lua-stack
null
object_draft_schematic_clothing_clothing_backpack_treasure_map_s01 = object_draft_schematic_clothing_shared_clothing_backpack_treasure_map_s01:new { } ObjectTemplates:addTemplate(object_draft_schematic_clothing_clothing_backpack_treasure_map_s01, "object/draft_schematic/clothing/clothing_backpack_treasure_map_s01.iff...
nilq/small-lua-stack
null
data.raw["accumulator"]["basic-accumulator"].fast_replaceable_group = "accumulator" data.raw["solar-panel"]["solar-panel"].fast_replaceable_group = "solar-panel" data.raw["generator"]["steam-engine"].fast_replaceable_group = "steam-engine"
nilq/small-lua-stack
null
local lpeg = require("lpeg") local json = require("json") local lunit = require("lunit") local math = require("math") local testutil = require("testutil") local encode = json.encode -- DECODE NOT 'local' due to requirement for testutil to access it decode = json.decode.getDecoder(false) module("lunit-calls", lunit.te...
nilq/small-lua-stack
null
-- webapi.lua v0.1 -- Copyright (c) 2017 Ulysse Ramage -- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, ...
nilq/small-lua-stack
null
local test = {} local json = require('arken.json') local Class = require('arken.oop.Class') local ActiveRecord = require('arken.ActiveRecord') local Adapter = require('arken.ActiveRecord.PostgresAdapter') test.beforeAll = function() ActiveRecord.reset() ActiveRecord.config = "util/config/active_record_postgre...
nilq/small-lua-stack
null
AddCSLuaFile("shared.lua") AddCSLuaFile("cl_init.lua") include("shared.lua") --------------------------------------------------------- -- --------------------------------------------------------- function ENT:Initialize() self:SetModel("models/sassafrass/icecube.mdl") self:PhysicsInit(SOLID_VPHYSICS) self:SetSoli...
nilq/small-lua-stack
null
mtbench.register("get_node", function(executeCondition) local count = 0 while executeCondition() do local pos = { x = math.random(10000), y = math.random(10000), z = math.random(10000) } minetest.get_node(pos) count = count + 1 end return count end) mtbench.register("get_node_or_nil", functio...
nilq/small-lua-stack
null
require("src/State") --local M_lrandom = require("random") Util = Util or {} local M = Util --[[M.data = M.data or { rng = nil }--]] function M.init() --M.data.rng = M_lrandom.new(os.time()) math.randomseed(os.time()) end function ternary(cond, x, y) return (cond) and x or y end function optional(value,...
nilq/small-lua-stack
null
--[[ ########################################################################## ## ## ## Project: 'Taser' - resource for MTA: San Andreas ## ## ## #####...
nilq/small-lua-stack
null
if select(1,...) == "-?" then printUsage( "lua","Starts Lua interpreter" ) return end print("LuaJIT ".._VERSION) print("Type 'exit' to exit") pushColor() while true do color(7) print("> ",false) local code = input(); print("") if not code or code == "exit" then break end local chunk, err = loadstring...
nilq/small-lua-stack
null
local spec_helper = require "spec.spec_helpers" local http_client = require "kong.tools.http_client" local cjson = require "cjson" local STUB_GET_URL = spec_helper.STUB_GET_URL describe("RateLimiting Plugin", function() setup(function() spec_helper.prepare_db() spec_helper.start_kong() end) teardown(f...
nilq/small-lua-stack
null
local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false) local ns = vim.api.nvim_create_namespace('test') -- print the namespace id so that we can call nvim_buf_clear_namespace manually to clear everything print('namespace', ns) for li, line in pairs(lines) do for col = 1, #line, 2 do vim.api.nvim_buf_set_extm...
nilq/small-lua-stack
null
if enableRemoteControl == true then --Send Command 3 local selected_machine = elements[selected_machine_index] for _,db in pairs(databanks) do if command_3:find("MAINTAIN") or command_3:find("BATCH") then craft_quantity = "" for _,digit in pairs(craft_quantity_digits) do ...
nilq/small-lua-stack
null
ESX = nil local doorState = {} TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) RegisterServerEvent('esx_doorlock:updateState') AddEventHandler('esx_doorlock:updateState', function(doorIndex, state) local xPlayer = ESX.GetPlayerFromId(source) if xPlayer and type(doorIndex) == 'number' and type(stat...
nilq/small-lua-stack
null
require('color') function Particle(x,y,color,accent) local part = {} part.tick = 0 part.color = color part.accent = accent addXYComponent(part,x,y) part.fragments = {} for i=1,7 do part.fragments[i] = {} addXYComponent(part.fragments[i],x,y) part.fragments[i].vel = {} addXYComponent(p...
nilq/small-lua-stack
null
local crypt = require "crypt" local md5 = crypt.md5 local pairs = pairs local ipairs = ipairs local sort = table.sort local concat = table.concat local __Version__ = 0.1 return function (mchid, key, map) map["mchid"] = mchid local keys = {} for key, value in pairs(map) do if value ~= '' then keys[#ke...
nilq/small-lua-stack
null
local addonName, addonTable = ... local Addon = _G[addonName] local S = LibStub:GetLibrary("ShockahUtils") local Class = { prototype = { isActionFrameType = true, }, } Addon.ActionFrameType = Class local Instance = Class.prototype local Private = {} Class["__Private"] = Private function Class:New(type, name) l...
nilq/small-lua-stack
null
function solve() local str = string.format("%.0f", 2 ^ 1000) local sum = 0 for i=1, #str do local char = str:sub(i, i) sum = sum + char end return math.floor(sum) end local result = solve() print(result)
nilq/small-lua-stack
null
function LoadDatabase(dataConfig, excluded_categories) ----------------------------------------------------------------- -- Reads the list of images in the videos from annotDir -- inputs: -- dataConfig: The data configuration to load from. Look at config.train -- and config.test. -- exclud...
nilq/small-lua-stack
null
local addonName = ... local function split(pString, pPattern) local Table = {} -- NOTE: use {n = 0} in Lua-5.0 local fpat = "(.-)" .. pPattern local last_end = 1 local s, e, cap = pString:find(fpat, 1) while s do if s ~= 1 or cap ~= "" then table.insert(Table,cap) end ...
nilq/small-lua-stack
null
require('modules.revised') local suit = require('modules.suit') local Button = class() function Button:createButton(tableTitleAxistableSizetable) local title = tableTitleAxistableSizetable[1] local axisx = tableTitleAxistableSizetable[2].axisx local axisy = tableTitleAxistableSizetable[2].axisy local w...
nilq/small-lua-stack
null
dofile"setup.lua" do print"test: decode ipv4" local n = net.init() n:udp{src=1, dst=2, payload=" "} n:ipv4{src="1.2.3.1", dst="1.2.3.2", protocol=17, options="AAAA"} local b0 = n:block() print"= constructed:" print(n:dump()) print("b0", h(b0)) n:clear() print(n:dump()) ...
nilq/small-lua-stack
null
ITEM.name = "23mm Shells" ITEM.model = "models/Items/BoxBuckshot.mdl" ITEM.width = 1 ITEM.height = 1 ITEM.ammo = "23mm Shell" ITEM.description = "A Box that contains 23mm Buckshot shells." ITEM.category = "Ammunition" ITEM.ammoAmount = 45 ITEM.isAmmo = true ITEM.ammoPerBox = 15 ITEM.price = 600 ITEM.weight = 0.2
nilq/small-lua-stack
null
fx_version 'cerulean' game 'gta5' lua54 'yes' files {'**.png', '**.jpg', '**.json', '**.txt'} server_script {'sv_*.lua'}
nilq/small-lua-stack
null