content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
-- -- Created by IntelliJ IDEA. -- User: nander -- Date: 22-4-2017 -- Time: 19:56 -- To change this template use File | Settings | File Templates. -- notes = {} for j=1,3 do notes[j] = {} for i=1,10 do notes[j][i] = love.audio.newSource("music/"..i..".ogg",true) if j == 2 then notes[...
nilq/small-lua-stack
null
-- This is an example room, with some basic stuff in it -- you should replace things with your own content -------------------------------------------------------------------------------- room = { short = "itemtest", name = "Item test room.", description = [[ This room was created to experiment with item t...
nilq/small-lua-stack
null
AddCSLuaFile() local DbgPrint = GetLogging("MapScript") local MAPSCRIPT = {} MAPSCRIPT.PlayersLocked = false MAPSCRIPT.DefaultLoadout = { Weapons = { "weapon_lambda_medkit", "weapon_crowbar", "weapon_pistol", "weapon_smg1", }, Ammo = { ["Pistol"] = 18, ...
nilq/small-lua-stack
null
local key_map = vim.api.nvim_set_keymap -- TELESCOPE keymaps 🔭 -- -- command palette key_map( "n", "<space>k", [[<Cmd>lua require('telescope').extensions.command_palette.command_palette()<CR>]], { noremap = true, silent = true } ) -- Search through your Neovim related todos key_map("n", "<leader>st", ":lua re...
nilq/small-lua-stack
null
local Dialogue = {} local API = require(script:GetCustomProperty("APIDialoguesLibrary")) function Dialogue.RegisterDialogue() -- Conversation Starter local id = "GenericConversation1" API.RegisterDialogueId(id) API.AddText(id, "Hello!", "unarmed_wave") API.AddText(id, "How are you?") API.AddOp...
nilq/small-lua-stack
null
------------------------------------------------------------------------------ -- Require -- ------------------------------------------------------------------------------ require ("orm.class.global") require ("orm.tools.func") ----------------------...
nilq/small-lua-stack
null
project "vaultConvertCMD" --Settings kind "ConsoleApp" language "C++" staticruntime "On" --Files to include files { "src/**.cpp", "src/**.h" } files { "project.lua" } --This project includes includedirs { "src" } includedirs { "../3rdParty/udcore/Include" } links { "udCore" .. (projectSuffix or "") } in...
nilq/small-lua-stack
null
object_tangible_tcg_series8_combine_decorative_bespin_lamp_on = object_tangible_tcg_series8_shared_combine_decorative_bespin_lamp_on:new { } ObjectTemplates:addTemplate(object_tangible_tcg_series8_combine_decorative_bespin_lamp_on, "object/tangible/tcg/series8/combine_decorative_bespin_lamp_on.iff")
nilq/small-lua-stack
null
function mmpkg.isDead() mmpkg.isWalking = false mmpkg.myAffects = mmpkg.myAffects or {} mmpkg.myAffects.affects = {} mmpkg.updateMaxStats() mmpkg.updateVitals() end
nilq/small-lua-stack
null
-- -- lua-Silva : <https://fperrad.frama.io/lua-Silva/> -- local modname = string.gsub(..., '%.%w+$', '') local matcher = require(modname).matcher local pcall = pcall local require = require local sub = string.sub local _ENV = nil local match local r, ffi = pcall(require, 'ffi') if r then pcall(function () ...
nilq/small-lua-stack
null
--[[----------------- Doors Control By XanderWP from Ukraine with <3 ------------------------]]-- local doors = {} local LockHotkey = {0,108} RegisterNetEvent('vrpdoorsystem:load') AddEventHandler('vrpdoorsystem:load', function(list) doors = list end) RegisterNetEvent('vrpdoorsystem:statusSend') AddEventHandle...
nilq/small-lua-stack
null
local IsAOPanelEnabled = GetConfig( "EnableAOPanel" ) or GetConfig( "EnableAOPanel" ) == nil function onAOPanelStart( params ) if IsAOPanelEnabled then local SetVal = { val = userMods.ToWString( "MBR" ) } local params = { header = SetVal, ptype = "button", size = 54 } userMods.SendEvent( "AOPANEL_SEND_ADDON",...
nilq/small-lua-stack
null
--[[ Count data for each class and length Copyright 2016 Xiang Zhang Usage: th count_data.lua [input] [output] --]] local torch = require('torch') -- A Logic Named Joe local joe = {} function joe.main() local input = arg[1] or '../data/jd/sentiment/comment_sorted_nonull.csv' local output = arg[2] or '../data/...
nilq/small-lua-stack
null
------------------------------------------------------------ -- API.lua -- -- Abin -- 2012/3/08 ------------------------------------------------------------ -- API -- -- module = CompactRaid:FindModule("RaidDebuff") -- Get the "RaidDebuff" module reference -- valid = module:VerifyExpansion(id) -- Verify the expansion(M...
nilq/small-lua-stack
null
local config = {} -- Should be the root of our project if tests are run via `make test` config.cwd = os.getenv('PWD') or io.popen('cd'):read() config.root_dir = os.getenv('DISTANT_ROOT_DIR') or config.cwd config.bin = os.getenv('DISTANT_BIN') config.host = os.getenv('DISTANT_HOST') or 'localhost' config.port = tonumb...
nilq/small-lua-stack
null
if SERVER then AddCSLuaFile("shared.lua") SWEP.HoldType = "ar2" end if CLIENT then SWEP.PrintName = "Terrorist Gun" SWEP.Author = "Darkspider" SWEP.Slot = 1 SWEP.SlotPos = 1 end SWEP.Base = "darkland_base" SWEP.Spawnable = true SWEP.AdminSpawnable = true SWEP.ViewModel = "models/weapo...
nilq/small-lua-stack
null
local cnf = require "config.HTconfig" local upload = require "resty.upload" -- clone from https://github.com/openresty/lua-resty-upload local json = require "cjson" local s3_upload = require "resty.s3_upload" local base64_decode = ngx.decode_base64 local base64_encode = ngx.encode_base64 local string_len = str...
nilq/small-lua-stack
null
local t = require(script.t) local tPlus = {} function tPlus.Enumeration(Enumeration) assert(t.userdata(Enumeration)) return Enumeration.Cast end return setmetatable(tPlus, {__index = t})
nilq/small-lua-stack
null
local util = require("scripts.util") return function(recipe_book, dictionaries) for name, prototype in pairs(global.prototypes.item_group) do recipe_book.group[name] = { class = "group", enabled_at_start = true, fluids = util.unique_obj_array{}, items = util.unique_obj_array{}, prot...
nilq/small-lua-stack
null
require("production_handler") production_table = {} -- ** LOCAL UTIL ** -- Creates and places a single module button local function create_module_button(flow, module, type, button_name) local m = (module.amount == 1) and {"fp.module"} or {"fp.modules"} local tutorial_tooltip = ui_util.tutorial_tooltip(game.ge...
nilq/small-lua-stack
null
local iStream = require('core').iStream local exports = {} local LineEmitter = iStream:extend() function LineEmitter:initialize(initialBuffer) self._buffer = initialBuffer and initialBuffer or '' end function LineEmitter:write(chunk) local line self._buffer = self._buffer .. chunk line = self:_popLine() ...
nilq/small-lua-stack
null
--- Module which is responsible for all heartbeat emulation activities and provides HeartBeatMonitor type -- -- *Dependencies:* `events`, `protocol_handler.ford_protocol_constants`, `qt`, `timers` -- -- *Globals:* `xmlReporter`, `AnyNumber()`, `qt`, `timers` -- @module services.heartbeat_monitor -- @copyright [Ford Mot...
nilq/small-lua-stack
null
-- -- For more information on config.lua see the Project Configuration Guide at: -- https://docs.coronalabs.com/guide/basics/configSettings -- application = { content = { width = 320, height = 480, scale = 'letterbox', fps = 60, imageSuffix = { ['@2x'] = 1.1, ...
nilq/small-lua-stack
null
local crystal2 = scene:getInstances("crystal2"); local crystal1cpObjs = {}; local crystal2cpObjs = {}; local crystal1Lights = {}; local crystal2Lights = {}; local crystal1DoneLight = scene:getObjects("terrain0")[1]:findLightComponent():getLights("crystal1_done_light")[1]; local crystal2DoneLight = scene:getObjects("ter...
nilq/small-lua-stack
null
--====================================================================-- -- Imports --====================================================================-- local Objects = require( "dmc_objects" ) local inheritsFrom = Objects.inheritsFrom local CoronaBase = Objects.CoronaBase --===================================...
nilq/small-lua-stack
null
require('premake_options') local utils = require('utils') pathPrefix = "../Tests" if _OPTIONS["path_prefix"] then pathPrefix = _OPTIONS["path_prefix"] end projectName = "Dummy" if _OPTIONS["project_name"] then projectName = _OPTIONS["project_name"] end testType = "all" if _OPTIONS["tests"] then testType = _OPTION...
nilq/small-lua-stack
null
--test for lua Socket print("Lua UDP Started") local socket = require("socket") udp = socket.udp() udp:setpeername("127.0.0.1", 9876) udp:settimeout(100) udp:send("I see you ") data = udp:receive() if data then print("Received: ", data) end
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- --! @file CharaTppEquipment.lua --! @brief キャラ生成スクリプト / Primary, Secondary 武器 -------------------------------------------------------------------------------- CharaTppEquipment = { ---------------------------------------- --各システムとの依存関係の定...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- -- Handler.......... : onQueryWorkshop -- Author........... : -- Description...... : Results will be posted in onQueryWorkshopUserContent -------------------------------------------------------------------------------- ---------------...
nilq/small-lua-stack
null
-- SPDX-License-Identifier: MIT hexchat.register('Twitch', '1', 'Better integration with twitch.tv') local function is_twitch () local server = hexchat.get_info('server') if hexchat.nickcmp(hexchat.get_info('network'), 'Twitch') == 0 then return true elseif server and server:find('twitch.tv$') then return true ...
nilq/small-lua-stack
null
local M = {} function M.get(cp) local delimeters = cp.gray1 local operators = cp.sky local cl = cp.mauve -- conditionals, loops local keywords = cp.red local math_logic = cp.peach return { -- These groups are for the neovim tree-sitter highlights. -- As of writing, tree-sitter support is a WIP, group names ...
nilq/small-lua-stack
null
data:extend({ { type = "item", name = "underground-belt-mr", icon = modname.."/graphics/icons/underground-belt-20.png", icon_size = 32, subgroup = "belt", order = "b[underground-belt]-a[underground-belt]-a", place_result = "underground-belt-mr", stack_size = 50 }, { type = "item...
nilq/small-lua-stack
null
function onCreate() -- background shit makeLuaSprite('stageback_HS', 'stageback_HS', -400, -100); setScrollFactor('stageback_HS', 0.9, 0.9) scaleObject('stageback_HS', 1.1, 1.1); makeLuaSprite('stagefront_HS', 'stagefront_HS', -500, 560); setScrollFactor('stagefront_HS', 1.0, 1.0) scaleObject('stagefro...
nilq/small-lua-stack
null
print('hello world')
nilq/small-lua-stack
null
-- -- Created by IntelliJ IDEA. -- User: crzang -- Date: 12.01.15 -- Time: 0:01 -- To change this template use File | Settings | File Templates. -- local setmetatable = setmetatable local fs_widget = { mt = {} } local indicator = require("crzang.widget.indicator") local io = { popen = io.popen } local tonumber = tonum...
nilq/small-lua-stack
null
local AnimatedSprite = Component:extend("AnimatedSprite") function AnimatedSprite:initialize(image, framewidth, frameheight, delay, frames) self.width = framewidth self.height = frameheight self.image = assert(image:type() == "Image" and image, "first argument must be an image") self.quads = {} ...
nilq/small-lua-stack
null
--[[ Copyright (c) 2009-2017, Hendrik "Nevcairiel" Leppkes < h.leppkes at gmail dot com > All rights reserved. ]] local _, Bartender4 = ... local StateBar = Bartender4.StateBar.prototype local ActionBar = setmetatable({}, {__index = StateBar}) Bartender4.ActionBar = ActionBar local LAB10 = LibStub("LibActionButton-1...
nilq/small-lua-stack
null
-- Global counter (preserved across invocations) if not count then count = 0 else count = count + 1 end -- Get the writer local Chat_writer = CONTAINER.WRITER['_pub::Chat_writer'] Chat_writer.instance['id'] = "Rajive Lua" -- key field Chat_writer.instance['content'] = "Hello from Lua " .. count Chat_writer:wr...
nilq/small-lua-stack
null
local BaseInstance = import("./BaseInstance") local json = import("../json") local HttpService = BaseInstance:extend("HttpService") function HttpService.prototype:JSONEncode(input) return json.encode(input) end function HttpService.prototype:JSONDecode(input) return json.decode(input) end return Http...
nilq/small-lua-stack
null
local util = require "gumbo.dom.util" local Node = require "gumbo.dom.Node" local ChildNode = require "gumbo.dom.ChildNode" local rawget, setmetatable = rawget, setmetatable local _ENV = nil local DocumentType = util.merge(Node, ChildNode, { type = "doctype", nodeType = 10, publicId = "", systemId = ""...
nilq/small-lua-stack
null
-- import local UIWidgetRenderer = require 'candy.ui.light.UIWidgetRenderer' local UIButtonBaseModule = require 'candy.ui.light.widgets.UIButtonBase' local UIButtonBase = UIButtonBaseModule.UIButtonBase local UIWidgetElementImage = require 'candy.ui.light.renderers.UIWidgetElementImage' local DeckComponent = require 'c...
nilq/small-lua-stack
null
return {'genesis','gent','gentenaar','gents','gentse','gen','genaakbaar','genaamd','genade','genadebeeld','genadebrood','genadegift','genadeklap','genadeleer','genadeloos','genadeloosheid','genademiddel','genadeoord','genadeschot','genadeslag','genadestoot','genadetroon','genadeverbond','genadig','genageld','genaken','...
nilq/small-lua-stack
null
local Status = require('bt.task.task_status') local Decorator = require('bt.decorator.decorator') local mt = {} mt.__index = mt function mt.new(cls) local self = Decorator.new(cls) self.interrput_status = Status.failure self.execution_status = Status.inactive return self end function mt:can_execute() local st...
nilq/small-lua-stack
null
describe('cranberry', function() local cb = require 'cranberry' local t = { 1, { 'apple', 7 }, sayHello = function() return 'hello' end } local s = { 'a', 'b', 'c', 'd' } local a = { 1, 2, 3, 4 } test('shift_ should destructively remove the first element of an array '.. 'a and return it', function(...
nilq/small-lua-stack
null
-- JUMP CHARGER OBJECT -- -- Create the Jump Charger base Object -- JC = { ent = nil, player = "", MF = nil, entID = 0, lightID = 0, updateTick = 240, lastUpdate = 0 } -- Constructor -- function JC:new(object) if object == nil then return end local t = {} local mt = {} setmetatable(t, mt) mt.__index = JC ...
nilq/small-lua-stack
null
function CMyrmidon_OnEnterCombat(Unit,Event) Unit:RegisterEvent("CMyrmidon_Spell", 120000, 0) end function CMyrmidon_Spell(Unit,Event) Unit:FullCastSpellOnTarget(38027,Unit:GetClosestPlayer()) end function CMyrmidon_OnLeaveCombat(Unit,Event) Unit:RemoveEvents() end function CMyrmidon_OnDied(Unit,Event) Unit:Remo...
nilq/small-lua-stack
null
SEA_HARE_TAIL = { addr = ITEMS_BASE_ADDR + 0x29, checks = { [0x00] = "tail", } } GOLD_KEY = { addr = ITEMS_BASE_ADDR + 0x37, checks = { [0x00] = "key", } } MIDGE_MALLET = { addr = ITEMS_BASE_ADDR + 0x5C, checks = { [0x00] = "mallet", } } MOOGLE_BELT = { ad...
nilq/small-lua-stack
null
---------------------------------------- -- Sassilization -- http://sassilization.com -- By Sassafrass / Spacetech ---------------------------------------- local mt = {} local WALL = {} mt.__index = WALL mt.__tostring = function( self ) return "Wall"; end net.Receive( "wall.SetWallTowers", functio...
nilq/small-lua-stack
null
EBP.SOVIET = { BARRACKS = BP_GetEntityBlueprint("barracks"), BARRACKS_MP = BP_GetEntityBlueprint("barracks_mp"), MOTORPOOL = BP_GetEntityBlueprint("motorpool"), MOTORPOOL_MP = BP_GetEntityBlueprint("motorpool_mp"), SOVIET_BASE_STAMPER = BP_GetEntityBlueprint("soviet_base_stamper"), TANK_DEPOT = BP_GetEntityBl...
nilq/small-lua-stack
null
local INCREMENT_VALUE = 2 local currentNumber = 0 print(currentNumber) currentNumber += INCREMENT_VALUE print(currentNumber) currentNumber += INCREMENT_VALUE print(currentNumber) currentNumber += INCREMENT_VALUE print(currentNumber) currentNumber += INCREMENT_VALUE print(currentNumber) currentNumber += INCREMENT_VALUE...
nilq/small-lua-stack
null
local _M = {} function _M.filter(args,sign) local cjson = require "cjson" local util = require("util") local RedisManager = require("RedisManager") local rurl = ngx.var.url local jsonbody = args.jsonbody local urlStr = args.urlMapStr if urlStr == nil or urlStr == "" then ngx.log...
nilq/small-lua-stack
null
local res = ngx.location.capture('/lua/uri_test', { method = ngx.HTTP_POST, args = ngx.encode_args({ a = 1, b = '2&' }), body = ngx.encode_args({ c = 3, d = '4&' }) }) ngx.say(res.body) ngx.log(ngx.ERR, "failed to create timer: ", '232323')
nilq/small-lua-stack
null
local nonil = require 'without-check-nil' local util = require 'utility' local lang = require 'language' local m = {} function m.client() nonil.enable() local name = m.info.clientInfo.name nonil.disable() return name end function m.init(t) log.debug('Client init', util.dump(t)) m.info = t ...
nilq/small-lua-stack
null
local Class = require("facto.class") local Event = require("facto.event") local Carriage = require("facto.train.carriage") local exchangerFactory = require("facto.exchanger.exchangerfactory").getInstance() --- Cargo wagon implementation. -- @classmod CargoWagon local CargoWagon = Class.extend({}, Carriage) -- @propert...
nilq/small-lua-stack
null
local EventEmitter = require('event_emitter') local WebSocketInterface = EventEmitter:new() function WebSocketInterface:send(data) self:emit('_send', data) end function WebSocketInterface:_receive(message) self:emit('message', message) end return WebSocketInterface
nilq/small-lua-stack
null
-- Sets the crafting grid minetest.register_on_joinplayer(function(player) local inv = player:get_inventory() inv:set_width("craft", 2) inv:set_size("craft", 4) end) minetest.register_on_player_receive_fields(function(player, formname, fields) bobutil.move_items_outta(player, "craft") -- move the items out of the...
nilq/small-lua-stack
null
local tonumber = tonumber local require = require local sys = require "luci.sys" local uci = require "luci.model.uci" local utl = require "luci.util" local nfs = require "nixio.fs" local io = require "io" local bus = require "ubus" module "luci.model.ports" _uci_real = cursor or _uci_real or uci.cursor() function ...
nilq/small-lua-stack
null
local root = getRootElement() function import ( resource, cmd, resourceString ) if type(resource) == "string" then resource = getResourceFromName(resource) end if type(resourceString) == "string" then resource = getResourceFromName(resourceString) end if not resource then outputDebugString("editor: Bad argum...
nilq/small-lua-stack
null
local Coroutines = {} Coroutines.__index = Coroutines function create() local coro = coroutine.create(function() local i = 0 while true do i = i + 1 coroutine.yield(i) end end) local test = { coro = coro } setmetatable(test, Coroutines) return test end function Coroutines:dr...
nilq/small-lua-stack
null
Sprint = RaceGamemode:subclass "Sprint" function Sprint:init(...) self.super:init(...) end function Sprint:raceFinished(timeout) if timeout then for _, player in ipairs(self.race:getPlayers()) do self:playerFinished(player, timeout) end end end function Sprint:playerFinished(play...
nilq/small-lua-stack
null
----------------------------------------------------------------------------- -- Localization (l10n) for the Lua language. -- Author: Fernando Paredes Garcia (fernando@develcuy.com) ----------------------------------------------------------------------------- -- Storage for all available translations on runtime local ...
nilq/small-lua-stack
null
local util = require 'xlua.util' local yield_return = (require 'xlua.cs_coroutine').yield_return local BREAKINFOFUNC, XPCALLFUNC = require("LuaDebug")("localhost", 7003) local co = coroutine.create( function() while true do yield_return(CS.UnityEngine.WaitForSeconds(0.1)) BREAKINFOFUNC() end end...
nilq/small-lua-stack
null
--Copyright 2021 The casbin Authors. All Rights Reserved. -- --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 applicab...
nilq/small-lua-stack
null
return Def.ActorFrame{ Def.Sprite{ Texture="roulette 1x4.png", InitCommand=function(self) self:SetAllStateDelays(0.1) end, SetMessageCommand=function(self,params) if params.HasFocus then self:x(2); self:y(-6.4); else self:x(0); self:y(-6.4) end; e...
nilq/small-lua-stack
null
local md local reminderLastSentWhen = {} local Plugin = {} function Plugin:SendVoicecommReminder(sourceClient, targetPlayer) if targetPlayer ~= nil then local targetClient = TGNS.GetClient(targetPlayer) local sourcePlayer = TGNS.GetPlayer(sourceClient) if Shared.GetTime() - (reminderLastSentWhen[targetClient] ...
nilq/small-lua-stack
null
AddCSLuaFile() ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.PrintName = "ZigPrint Base" ENT.Category = "ZigPrint" ENT.Spawnable = true ENT.Model = "models/props_c17/consolebox01a.mdl" ENT.Print = ENT.Print or {} ENT.Print.Max = ENT.Print.Max or {} ENT.Display = ENT.Display or {} ENT.Print.Amount = ENT.Print.Amo...
nilq/small-lua-stack
null
-- Copyright 2016-2021 Gabriel Dubatti. See LICENSE. -- -- This module shows the tags of the current file using the "lists" toolbar -- -- ** This module is used when USE_LISTS_PANEL is true ** -- if toolbar then local itemsgrp, firsttag local Proj = Proj local Util = Util local data= Proj.data local function...
nilq/small-lua-stack
null
--ZFUNC-readargsfile-v1 local function readargsfile( filepath ) --> args, err --ZFUNC-appendall-v1 local function appendall( arr, oth ) --> arr for _, v in ipairs( oth ) do table.insert( arr, v ) end return arr end --ZFUNC-readlines-v1 local function readlines( filepath ) ...
nilq/small-lua-stack
null
local socket = require("ljsocket") local host = "www.freebsd.no" local socket = assert(socket.create("inet", "stream", "tcp")) assert(socket:set_blocking(false)) assert(socket:connect(host, "http")) while true do if socket:is_connected() then assert(socket:send( "GET / HTTP/1.1\r\n".. ...
nilq/small-lua-stack
null
-- -- Created by IntelliJ IDEA. -- User: nander -- Date: 02/03/2019 -- Time: 11:25 -- To change this template use File | Settings | File Templates. -- local function draw(x,y,character) local img = RESOURCES.roles['police'] love.graphics.draw(img, x, y, 0, 8, 8, img:getWidth()/2, img:getHeight()/2 ) end return...
nilq/small-lua-stack
null
local LSTM, parent = torch.class('cudnn.LSTM', 'cudnn.RNN') function LSTM:__init(inputSize, hiddenSize, numLayers, batchFirst, dropout, rememberStates) parent.__init(self,inputSize, hiddenSize, numLayers, batchFirst, dropout, rememberStates) self.mode = 'CUDNN_LSTM' self:reset() end
nilq/small-lua-stack
null
local Workspace = game:GetService("Workspace") local Packages = script:FindFirstAncestor("CmdrAdditions").Packages local UI = script:FindFirstAncestor("UI") local Components = UI.Components local Roact = require(Packages.Roact) local Flipper = require(Packages.Flipper) local RoactFlipper = require(Packages.RoactFlipp...
nilq/small-lua-stack
null
object_mobile_wod_reanimated_witch_03 = object_mobile_shared_wod_reanimated_witch_03:new { } ObjectTemplates:addTemplate(object_mobile_wod_reanimated_witch_03, "object/mobile/wod_reanimated_witch_03.iff")
nilq/small-lua-stack
null
local M = {} local skynet = require("skynet") local udpdAddr local function getUdpdAddr() if udpdAddr == nil then udpdAddr = skynet.queryservice("game/kcpudp/udpd") end return udpdAddr end function M.pushMsg(pid,sMsg,tMsg) skynet.send(getUdpdAddr(),"lua","pushMsg","",pid,sMsg,tMsg) end function M.updatePidFr...
nilq/small-lua-stack
null
return function() local splitPath = require(script.Parent.splitPath) it("should return an array of each part of the path", function() local root = Instance.new("Folder") local parts = splitPath("foo/bar/baz", root) expect(#parts).to.equal(3) expect(parts[1]).to.equal("foo") expect(parts[2]).to.equal("bar...
nilq/small-lua-stack
null
--[[by KGHX 2019.11]]-- local fs = require "nixio.fs" local state = (luci.sys.call("pidof rsync > /dev/null") == 0) if state then state_msg = "<b><font color=\"green\">" .. translate("Running") .. "</font></b>" else state_msg = "<b><font color=\"red\">" .. translate("Not running") .. "</font></b>" end m = Map("rsyn...
nilq/small-lua-stack
null
local API = { script:GetCustomProperty("Team1"), script:GetCustomProperty("Team2"), script:GetCustomProperty("Team3"), script:GetCustomProperty("Team4"), nil } return API
nilq/small-lua-stack
null
local helpers = require('test.functional.helpers')(after_each) local eq, neq, call = helpers.eq, helpers.neq, helpers.call local eval, feed, clear = helpers.eval, helpers.feed, helpers.clear local command, insert, expect = helpers.command, helpers.insert, helpers.expect local feed_command = helpers.feed_command local ...
nilq/small-lua-stack
null
-- Routine for NPC "Royalguard (I)" loadRoutine = function(R, W) if (W:isConditionFulfilled("boss","BossRoyalguards")) then R:setDisposed() return end if (not W:isConditionFulfilled("default", "king_open")) then R:setTilePosition(13, 20) R:setReloadEnabled(true) R:setLooped(fal...
nilq/small-lua-stack
null
-- Main Mechanic window wMechanic, bMechanicOne, bMechanicOne, bMechanicThree, bMechanicFour, bMechanicFive, bMechanicSix, bMechanicClose = nil -- Tyre change window wTyre, bTyreOne, bTyreTwo, bTyreThree, bTyreFour, bTyreClose = nil -- Paint window wPaint, iColour1, iColour2, iColour3, iColour4, colourChart, b...
nilq/small-lua-stack
null
object_tangible_furniture_all_frn_all_couch_lg_hue_s2 = object_tangible_furniture_all_shared_frn_all_couch_lg_hue_s2:new { } ObjectTemplates:addTemplate(object_tangible_furniture_all_frn_all_couch_lg_hue_s2, "object/tangible/furniture/all/frn_all_couch_lg_hue_s2.iff")
nilq/small-lua-stack
null
-- 删除锁的时候,找到 key 对应的 value,跟自己传过去的 value 做比较,如果是一样的才删除。 local temp = redis.call("get",KEYS[1]) if temp then if temp == ARGV[1] then return redis.call("del",KEYS[1]) else return 0 end else return 1 end
nilq/small-lua-stack
null
--numbers --1 minetest.register_node('mrblock:1', { tile_images = {'1.png'}, inventory_image = '1.png', sunlight_propagates = true, paramtype = 'light', walkable = true, climbable = false, diggable = true, drawtype = "nodebox", groups = { choppy = 3, oddly_breakable_by_hand = 1}, material = minetest.digprop_c...
nilq/small-lua-stack
null
----------------------------------- -- Area: Behemoth's Dominion -- NPC: Cermet Headstone -- Involved in Mission: ZM5 Headstone Pilgrimage (Lightning Headstone) -- !pos -74 -4 -87 127 ----------------------------------- local ID = require("scripts/zones/Behemoths_Dominion/IDs"); require("scripts/globals/keyitems"); re...
nilq/small-lua-stack
null
#!/usr/bin/env luajit local xmlua = require("xmlua") local xml = [[ <root> <sub1>text1</sub1> <sub2>text2</sub2> <sub3>text3</sub3> </root> ]] local document = xmlua.XML.parse(xml) -- Searches the <root> element local root_node_set = document:search("/root") -- You can use "#" for getting the number of match...
nilq/small-lua-stack
null
sptbl["timer"] = { files = { module = "timer.c", header = "timer.h", example = "ex_timer.c", }, func = { create = "sp_timer_create", destroy = "sp_timer_destroy", init = "sp_timer_init", compute = "sp_timer_compute", }, params = { }, ...
nilq/small-lua-stack
null
tile_to_screen = function(config, x_tile, y_tile) local x_screen = config.x_offset + (x_tile - 1) * config.width local y_screen = config.y_offset + (y_tile - 1) * config.height return { x = x_screen, y = y_screen } end screen_to_tile = function(config, x_screen, y_screen) local x_tile = 1 + math.floor...
nilq/small-lua-stack
null
AtlasLootDB = { }
nilq/small-lua-stack
null
--package.path = "../?.lua;"..package.path; --[[ This is an example of a startup for bestdesk.exe The general idea is, you want to specify how the desktop looks upon starting the application. So, this is part configuration, part app playground. Really there should be specifically named desktop co...
nilq/small-lua-stack
null
local desc = fs.read(path.expand("$sd/../../dump.desc.json")) local instance = Instance.new("BoolValue") T.Pass(instance[sym.Desc] == nil , "initializes with nil") T.Pass(function() instance[sym.Desc] = desc end , "can be set to RootDesc") T.Pass(instance[sym.Desc] == desc , "retur...
nilq/small-lua-stack
null
return {'gonade','gondel','gondelier','gondellied','gondellift','gondelvaart','gondola','gong','gongslag','goniometer','goniometrie','goniometrisch','gonje','gonjezak','gonorroe','gons','gonzen','gondelbaan','gonneke','gonnie','gontrode','gonggrijp','gonda','gonzalez','gondeliers','gondels','gondeltje','gondeltjes','go...
nilq/small-lua-stack
null
Constants = require("game.Constants") GameData = require("game.GameData") Fonts = require("game.Fonts") Controller = require("game.Controller") MapManager = require("game.MapManager") BallController = require("game.BallController") require("game.entities.init") require("game.screens.init") require("game.input.init")
nilq/small-lua-stack
null
local ftcsv = require 'ftcsv' local utils_sort = require 'hj212.utils.sort' local tpl_dir = 'tpl/' local NAME_CHECKING = {} local function valid_prop(prop, err_cb) local log_cb = function(...) if err_cb then err_cb(...) end return false end if string.len(prop.sn or '') == 0 then return log_cb('Invalid...
nilq/small-lua-stack
null
return PlaceObj("ModDef", { "title", "Fix Safari No Green Planet", "id", "ChoGGi_FixSafariNoGPDLC", "steam_id", "2428296255", "pops_any_uuid", "7349ec08-42ae-4601-8de9-22c1b2650e93", "lua_revision", 1001569, "version", 1, "version_major", 0, "version_minor", 1, "image", "Preview.png", "author", "ChoGGi", "co...
nilq/small-lua-stack
null
return { Convolution = { "../src/Convolution/**", }, LensFlare_ScreenSpace = { "../src/LensFlare_ScreenSpace/**", }, Tutorial = { "../src/Tutorial/**", }, ParallelReduction = { "../src/ParallelReduction/**", }, }
nilq/small-lua-stack
null
ix.randomitems.tables["event_anomaly_redrazor"] = { {500, {"value_statue_cat"}}, {500, {"value_statue_horse"}}, {500, {"value_statue_lion"}}, {100, {"artifact_mementomori"}}, }
nilq/small-lua-stack
null
require 'Underscript' require 'Forge' require 'luaonlua' quickinject = {} quickinject.opt_shellurl = 'quickinject.shell.php.url' quickinject.opt_shelloutput = 'quickinject.shell.php.out' quickinject.xss = { alert = [[<script>alert('XSS');</script>]], alertcharcode = [[alert(String.fromCharCode(88,83,83)...
nilq/small-lua-stack
null
local _, private = ... -- Lua Globals -- -- luacheck: globals -- RealUI -- local RealUI = private.RealUI local MODNAME = "GridLayout" local GridLayout = RealUI:NewModule(MODNAME, "AceConsole-3.0") function GridLayout:Grid2ChatCommand() _G.Grid2:OnChatCommand("") end function GridLayout:OnInitialize() self:S...
nilq/small-lua-stack
null
--add_property( "lmod", "sticky") load("nixpkgs/16.09") load("intel/2016.4") --load("openmpi/2.1.1")
nilq/small-lua-stack
null
--[[ # Element: Alternative Power Bar Handles the visibility and updating of a status bar that displays encounter- or quest-related power information, such as the number of hour glass charges during the Murozond encounter in the dungeon End Time. ## Widget AlternativePower - A `StatusBar` used to represent the unit'...
nilq/small-lua-stack
null