content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
---@diagnostic disable: undefined-global -- lush_jsx settings handler local utils = require("lush_jsx.utils") local settings = { contrast_dark = "soft", contrast_light = "hard", bold = true, italic = true, undercurl = true, underline = true, inverse = true, improved_strings = true, improved_warnings = true, ...
nilq/small-lua-stack
null
object_draft_schematic_vehicle_civilian_hoverlifter_speeder_crafted = object_draft_schematic_vehicle_civilian_shared_hoverlifter_speeder_crafted:new { } ObjectTemplates:addTemplate(object_draft_schematic_vehicle_civilian_hoverlifter_speeder_crafted, "object/draft_schematic/vehicle/civilian/hoverlifter_speeder_crafted...
nilq/small-lua-stack
null
-- -- Based heavily on MiddleClick, https://github.com/artginzburg/MiddleClick-Catalina -- -- -- leaving here because linked to in https://github.com/Hammerspoon/hammerspoon/issues/2057 -- further work, cleanup, etc. being done at https://github.com/asmagill/hs._asm.undocumented.touchdevice/blob/master/Examples/middle...
nilq/small-lua-stack
null
--local variables local binds = {} local call_translate_position = false local cursor_start_x, cursor_start_y local cursor_translate_x, cursor_translate_y local moving = false local PANEL = {PecanEditor = true} local speed = 1 local translate_position = vector_origin local think_time = RealTime() local thinking_binds =...
nilq/small-lua-stack
null
return [[ #81-717 [cz] #Cameras: Train.717.Breakers = Jističe Train.717.VB = Baterie a OŘO Train.717.VBD = VBD a UPPS Train.717.VRD = VRD Train.717.SOSD = SOSD Train.717.PUAV = PUAV (RAV) Train.717.PA = PA (Vlaková aparatura) Train.717.PAScreen = Obrazovka PA Train.714.Shunt ...
nilq/small-lua-stack
null
nadmin:RegisterPerm({ title = "Manage Server Settings" }) if CLIENT then nadmin.serverConfig = nadmin.serverConfig or {} nadmin.serverConfig.options = nadmin.serverConfig.options or {} function nadmin.serverConfig:RegisterOption(cfg) end local content nadmin.menu:Regis...
nilq/small-lua-stack
null
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB local S = E:GetModule('Skins') --Cache global variables --Lua functions local _G = _G --WoW API / Variables --Global variables that we don't cache, list them here for mikk's FindGlobals script -- GLOBALS: local fu...
nilq/small-lua-stack
null
-- Announce Scaleform to every players local announce_title = "Flash Info" -- Set the title of the announcement here. local AnnouncementScaleform Scaleform = {} local scaleform = {} scaleform.__index = scaleform function StartDraw(time) Citizen.CreateThread(function() local fading = false while not Announcement...
nilq/small-lua-stack
null
--[[ swords.register_sword("swords:sword", { description = "A basic sword", texture = "swords_sword.png", damage = {fleshy = 3}, base_speed = 1.5, glow = 1 }) ]]-- function swords.register_sword(name, def) minetest.register_tool(name, { description = def.description, inventory_image = def.texture, g...
nilq/small-lua-stack
null
local E = require "luevt" local dispatcher1 = E.new() dispatcher1:add_listener("TEST_DISPATCH_FUNC", function(args) print("listener is fucntion, args =", args) end) dispatcher1:add_listener("TEST_DISPATH_CO", coroutine.create(function(args) while true do print("listener is coroutine, args =", args) coroutine.yie...
nilq/small-lua-stack
null
----------------------------------------------------------------------------------------------------------------------------------------- -- VRP ----------------------------------------------------------------------------------------------------------------------------------------- local Tunnel = module("vrp","lib/Tunn...
nilq/small-lua-stack
null
local class = require("pl.class") local ChannelAudience = require("core.ChannelAudience") ---@class AreaAudience : ChannelAudience local M = class(ChannelAudience) ---@return Character[] function M:getBroadcastTargets() if not self.sender.room then return {} end local area = self.sender.roo...
nilq/small-lua-stack
null
--[[ RD2 BeamVars Extension ]] AddCSLuaFile("BeamVarsExtensions/rd2.lua") local meta = FindMetaTable( "Entity" ) -- Return if there's nothing to add on to if (!meta) then return end -- SetOOO (3 cap o's) -- sets off/on/overdrive if (SERVER) then meta[ "SetOOO" ] = function ( self, value ) ...
nilq/small-lua-stack
null
--[[ LuCI - Network model - 6to4 & 6in4 protocol extension Copyright 2011 Jo-Philipp Wich <xm@subsignal.org> 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...
nilq/small-lua-stack
null
addIcon("dancing", {outfit={mount=0,feet=0,legs=0,body=176,type=128,auxType=0,addons=3,head=48}, hotkey=nil, text="dance"}, macro(80, "", function() turn(0) schedule(20, function() turn(1) end) schedule(40, function() turn(2) end) schedule(60, function() turn(3) end) end)) addIcon("Random Outfit", {outfit={mo...
nilq/small-lua-stack
null
local register = 1 local constant = 2 local register_or_constant = 3 local upval = 4 local bool = 5 local floating_byte = 6 local jump_pc_offset = 7 local other = 8 local param_types = { register = register, constant = constant, register_or_constant = register_or_constant, upval = upval, bool = bool, floa...
nilq/small-lua-stack
null
if (SERVER) then AddCSLuaFile( "shared.lua" ) SWEP.Weight = 5 SWEP.AutoSwitchTo = false SWEP.AutoSwitchFrom = false end if ( CLIENT ) then SWEP.DrawAmmo = true SWEP.DrawCrosshair = false SWEP.ViewModelFOV = 82 SWEP.ViewModelFlip = false SWEP.CSMuzzleFlashes = fals...
nilq/small-lua-stack
null
return PlaceObj("ModDef", { "title", "Disable Achievements", "id", "ChoGGi_DisableAchievements", "steam_id", "1461207873", "pops_any_uuid", "28dfa6d1-4f1f-460d-b2db-676a56bafb13", "lua_revision", 1007000, -- Picard "version", 2, "version_major", 0, "version_minor", 2, "author", "ChoGGi", "code", { "Code/Scr...
nilq/small-lua-stack
null
Config = {} Config.DrawDistance = 100.0 --language currently available EN and SV Config.Locale = 'en' Config.Zones = { PoliceDuty = { Pos = { x = 442.5, y = -982.1, z = 29.600 }, Size = { x = 1.5, y = 1.5, z = 1.5 }, Color = { r =...
nilq/small-lua-stack
null
print '-- basics' -- reused in following tests _G.simple = { ['nil'] = nil, ['boolean'] = true, ['number'] = 253, ['string'] = 'and my head is my only house unless it rains.', ['empty-table'] = {}, ['simple-array'] = {1, 2, 3, 4, 5}, ['simple-dict'] = {a=1, b=2, c=3}, ['function'] = fun...
nilq/small-lua-stack
null
if pcall(require, 'lldebugger') then require('lldebugger').start() end local rect = {0, 0, 64, 64} function love.update(dt) rect[1] = rect[1] + 10 * dt rect[2] = rect[2] + 10 * dt end function love.draw() love.graphics.rectangle('fill', rect[1], rect[2], rect[3], rect[4]) end function love.keypressed() ...
nilq/small-lua-stack
null
animationguiline = class:new() animationlist = {} local toenter = {} --TRIGGERS: table.insert(toenter, {name = "mapload", t = { t="trigger", nicename="on map load", entries={ } } }) table.insert(toenter, {name = "animationtrigger", t = { t="trigger", nicename="animation trigger", entries={ {...
nilq/small-lua-stack
null
module 'mock' -------------------------------------------------------------------- CLASS: AnimatorValueTrack ( AnimatorTrack ) :MODEL{} CLASS: AnimatorValueKey ( AnimatorKey ) :MODEL{} -------------------------------------------------------------------- CLASS: AnimatorKeyNumber ( AnimatorValueKey ) :MODEL{ Fiel...
nilq/small-lua-stack
null
return { short_music_name = "song10", bpm = 752, offset_time = 0, music_name = "bgm-song10", left_track = { { begin_time = "1.196808", key_flag = "K_LEFT", end_time = "1.196808" }, { begin_time = "3.909575", key_flag = "K_LEFT", end_time = "3.909575" }, { begin_time = "6.462766", ...
nilq/small-lua-stack
null
--[===[DOC = intersecationtab [source,lua] ---- function intersecationtab( firstTab, secondTab, selectFunc ) --> intersecationTab ---- Creates the `intersecationTab` table that contain the keys shared by the `firstTab` and `secondTab` tables. By default, the value of the first table will be used as value in the resu...
nilq/small-lua-stack
null
-- Arrays are call be ref, therefore assignment of array members work without write-back -- I assume that _G members are different from global and just represent a runtime variable(maybe it is _G.global) -- also _G.global somehow does not survive saving the map, it seems factorio doc is wrong -- remember this when inv...
nilq/small-lua-stack
null
local decoderNet = {} function decoderNet.model(params, enc) local optionLSTM = nn.SeqLSTM(params.embedSize, params.rnnHiddenSize) optionLSTM.batchfirst = true local optionEnc = {} local numOptions = 100 for i = 1, numOptions do optionEnc[i] = nn.Sequential() optionEnc[i]:add(nn.Se...
nilq/small-lua-stack
null
function onPre(v) vee.putreg(v, ESP, 32, 40000000) vee.putreg(v, EAX, 32, 80808080) for i=0,4096 do vee.putmem(v, 80808080+i, 8, 20) end end function onPost(v) esp = vee.getreg(v, ESP, 32) if esp ~= nil and esp > 80808080-16 and esp < 80808080+16 then if vee.getexit(v) == ...
nilq/small-lua-stack
null
local UnsubAck = require "lumina.protocol.packet.unsuback" local test_utils = require "spec.test_utils" local function round_trip_encode(v) local source = test_utils.generate_source(assert(v:encode_packet())) local back = assert(UnsubAck.decode_packet(source)) assert.are.same(v, back) end describe("UnsubAc...
nilq/small-lua-stack
null
-------------------------------- -- @module TableView -- @extend ScrollView,ScrollViewDelegate -- @parent_module cc -------------------------------- -- @function [parent=#TableView] updateCellAtIndex -- @param self -- @param #long long -------------------------------- -- @function [parent=#TableView] setVer...
nilq/small-lua-stack
null
BaseEntity = require("entities.core.baseentity") NPCBullet = class("NPCBullet", BaseEntity) NPCBullet.image = loadImage("sprites/bullet.gif") function NPCBullet:initialize() BaseEntity.initialize(self) self.type = "BULLET" self.nextDie = 5 playSound("smash.wav") -- fuck yo sound end function NPCBul...
nilq/small-lua-stack
null
-- Copyright (c) 2010 Aleksey Yeschenko <aleksey@yeschenko.com> -- -- 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, c...
nilq/small-lua-stack
null
require 'nngraph' require 'nn'; -- Part (a) a = nn.Linear(4,2)() a1 = nn.Power(2)(a) a2 = nn.Tanh()(a1) b = nn.Linear(5,2)() b1 = nn.Power(2)(b) b2 = nn.Sigmoid()(b1) c = nn.CMulTable()({a2,b2}) d = nn.Identity()() e = nn.CAddTable()({c,d}) q1 = nn.gModule({a,b,d},{e}) --Part (b) x = torch.randn(4) y = torch.randn(5) ...
nilq/small-lua-stack
null
local redis = require 'vendor.redis-lua.redis' RedisClient = {} -- RedisClient constructor function RedisClient.new() local self = {} local client = redis.connect('127.0.0.1', 6379) function self.load() end function self.ping() return client:ping() end function self.insert_score(score) time = ...
nilq/small-lua-stack
null
intcore_improve_autoattack_lua = class({}) LinkLuaModifier( "intcore_improve_autoattack_modifier", LUA_MODIFIER_MOTION_NONE ) function intcore_improve_autoattack_lua:OnUpgrade() if IsServer() then if self:GetToggleState() then self:GetCaster():RemoveModifierByName("intcore_improve_autoattack_modifier") self:A...
nilq/small-lua-stack
null
fx_version 'cerulean' game 'gta5' author 'MiiMii1205' description 'A simple script for enabling/disabling ragdolls on any aimed ped' version '1.0.0' repository 'https://github.com/MiiMii1205/ragdoller' client_scripts { 'Scripts/rag.lua', 'Scripts/pedTag.lua' } export 'CheckRagdoller'
nilq/small-lua-stack
null
local path = (...):match('(.-)[^%./]+$') return { name = 'timer', description = 'Provides an interface to the user\'s clock.', types = { }, functions = { { name = 'getAverageDelta', description = 'Returns the average delta time (seconds per frame) over the last secon...
nilq/small-lua-stack
null
local status_ok, neogen = pcall(require, "neogen") if not status_ok then return end neogen.setup({ snippet_engine = "luasnip", languages = { cs = { template = { annotation_convention = "xmldoc", } } } }) local wk = require("which-key") wk.register({ n = { name = "Generate documentation", f = { ...
nilq/small-lua-stack
null
local QuickAuctions = select(2, ...) local Manage = QuickAuctions:NewModule("Manage", "AceEvent-3.0") local L = QuickAuctions.L local status = QuickAuctions.status local reverseLookup, postQueue, scanList, tempList, stats = {}, {}, {}, {}, {} local totalToCancel, totalCancelled = 0, 0 Manage.reverseLookup = reverseLoo...
nilq/small-lua-stack
null
-- 官方模块 local ngx = require "ngx" -- 自定义库模块 local http = require "http" local urlencode = require "utils".urlencode -- 应用模块 local config = require "config" local response = require "response" -- 将函数缓存下来 local ngx_encode_base64 = ngx.encode_base64 local _M = {} _M._VERSION = "0.1" _M.name = "orientdb" local host ...
nilq/small-lua-stack
null
green = Color.new(0, 255, 0) yellow = Color.new(255, 255, 0) cyan = Color.new(0, 255, 255) monoSpaced = Font.createMonoSpaced() proportional = Font.createProportional() proportionalBig = Font.createProportional() proportional:setPixelSizes(0, 32) proportionalBig:setPixelSizes(0, 64) monoSpaced:setPixelSizes(0, 14) t = ...
nilq/small-lua-stack
null
return function(utf8) local cl = utf8.regex.compiletime.charclass.builder return function(str, c, bs, ctx) return cl.new():with_codes(c), utf8.next(str, bs) - bs end end
nilq/small-lua-stack
null
-- Theme is based on https://github.com/lcpz/awesome-copycats.git Powerarrow-dardk local theme_assets = require("beautiful.theme_assets") local xresources = require("beautiful.xresources") local dpi = xresources.apply_dpi local gfs = require("gears.filesystem") local gcol = require("gears.color") local surface = requi...
nilq/small-lua-stack
null
-- scaffolding entry point for zlib return dofile("zlib.lua")
nilq/small-lua-stack
null
local math = require("math") local os = require("os") local random = {} math.randomseed(os.time()) function random.string(length, allowed_chars) length = length or 16 allowed_chars = allowed_chars or "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" local randomString = '' for _ = 1, length do...
nilq/small-lua-stack
null
--[[ /////// ////////////////// /////// PROJECT: MTA iLife - German Fun Reallife Gamemode /////// VERSION: 1.7.2 /////// DEVELOPERS: See DEVELOPERS.md in the top folder /////// LICENSE: See LICENSE.md in the top folder /////// ///////////////// ]] -- ####################################### -- ## Project: MTA i...
nilq/small-lua-stack
null
--settings.lua local enable_connect_particles = { type = "bool-setting", name = "ret-enable-connect-particles", setting_type = "runtime-global", default_value = true, order = "a-a" } local enable_failure_text = { type = "bool-setting", name = "ret-enable-failure-text", setting_type = "runtime-global", defaul...
nilq/small-lua-stack
null
local BodyMetadata = require("octo.model.body-metadata").BodyMetadata local TitleMetadata = require("octo.model.title-metadata").TitleMetadata local autocmds = require "octo.autocmds" local config = require "octo.config" local constants = require "octo.constants" local folds = require "octo.folds" local gh = require "o...
nilq/small-lua-stack
null
module("luci.controller.dect", package.seeall) function index() if not nixio.fs.access("/usr/sbin/dectmngr2") then return end local users = { "admin", "support", "user" } local page for k, user in pairs(users) do page = node(user, "services", "dect") page.target = template("dect_status") page.title = ...
nilq/small-lua-stack
null
-- The MIT License (MIT) -- Copyright (c) 2016 Colin Hall-Coates <yo@oka.io> -- 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 righ...
nilq/small-lua-stack
null
local cqs = require"cqueues" local api = require"lacord.api" local shard = require"lacord.shard" local logger = require"lacord.util.logger" local util = require"lacord.util" local mutex = require"lacord.util.mutex" local promise = require"cqueues.promise" local signal = require"cqueues.signal" local emitter = r...
nilq/small-lua-stack
null
return function (ipt) local transf = _G.Flags.Transformations local x, y, z = ipt.x, ipt.y, ipt.z --scale local tr_sc = transf.Scale x, y, z = x*tr_sc.x, y*tr_sc.y, z*tr_sc.z --rotate local ang = transf.Rotate if ang ~= 0 then x, y = ...
nilq/small-lua-stack
null
function create() entity = getNewEntity("baseLuaEntity") sizeMultiplier = getGlobalValue("sizeMultiplier") setEntityLabel(entity, "student") destinations = {{555, 566, 663}, {580, 654, 782}} heights = {432, 266} floor = rand() % 2 + 1 spawn = rand() % 3 + 1 door = rand() % 3 + 1 addE...
nilq/small-lua-stack
null
local which_key_ok, which_key = pcall(require, "which-key") if not which_key_ok then vim.notify("which-key not found. Custom keybinds are disabled.", "warn") return end -- Remap space as leader key vim.api.nvim_set_keymap("", "<Space>", "<Nop>", { noremap = true, silent = true }) vim.g.mapleader = " " vim.g.mapl...
nilq/small-lua-stack
null
local function init() require 'TheAltF4Stream.vim'.init() require 'TheAltF4Stream.packer'.init() end return { init = init, }
nilq/small-lua-stack
null
--------------------------------------------------------------------------- --- Rules for clients. -- -- This module applies @{rules} to clients during startup (via @{client.manage}, -- but its functions can be used for client matching in general. -- -- All existing `client` properties can be used in rules. It is also ...
nilq/small-lua-stack
null
commun = {} commun.server = "spectre" commun.setup = function(ssid, password) wifi.sta.config(ssid, password) end commun.post = function(data) http.put('http://'..commun.server..':3000/api/v1/devices', 'Content-Type: text/plain\r\nuid: 2zCpe4HRSho78T3\r\niv: ivivivivivivivi', data, fu...
nilq/small-lua-stack
null
packs = {{ name = "First pack", levels = 15 }, { name = "Second pack", levels = 15 }}
nilq/small-lua-stack
null
CONTOUR = { Sharp = 101, Glamour = 102, Nose = 103, Highlight = 104, Round = 105, Square = 106, Long = 107 } BLUSH = { Light1 = 101, Light2 = 102, Edge1 = 103, Edge2 = 104, Edge3 = 105, Edge4 = 106, Apple1 = 107, Apple2 = 108, Apple3 = 109, Apple4 = 110 } EYE_COLOR = { Oasis = 1, Moist = 2, Cryst...
nilq/small-lua-stack
null
slot0 = class("ActivityMediator", import("..base.ContextMediator")) slot0.register = function (slot0) slot0.contextData.singleActivity = true slot0:bind(ActivityMediator.EVENT_OPERATION, function (slot0, slot1) slot0:sendNotification(GAME.ACTIVITY_OPERATION, slot1) end) slot0.bind(slot0, ActivityMediator.EVENT_...
nilq/small-lua-stack
null
-- Decompiled using luadec 2.2 rev: for Lua 5.2 from https://github.com/viruscamp/luadec -- Command line: A:\Steam\twd-definitive\scripteditor-10-31-20\s1_lighting_improvements\WDC_pc_WalkingDead101_data\env_clementineHouseExterior_temp.lua -- params : ... -- function num : 0 , upvalues : _ENV require("Relighting.l...
nilq/small-lua-stack
null
require('init'); require('gnuplot'); --[[ Plot Relative Error Criterion --]] function main() local criterion = nnst.ErrorCriterionRelative(0.8, 0.16) local e = 10 local xs = torch.linspace(e-12, e+12, 200) local f = xs:clone() f:apply(function (x) return criterion:forward(torch.Tensor...
nilq/small-lua-stack
null
function px(amount) return amount.."px" end Lucene.ui = {} Lucene.ui.sides = {} -- Holds all the different UI sides Lucene.window = {} Lucene.window.width, Lucene.window.height = getMainWindowSize() -- Import them files Lucene.import("ui/containers") Lucene.import("ui/styles") Lucene.import("ui/sides/left") Luce...
nilq/small-lua-stack
null
------------------------------------------------------------------ -- common.lua -- Author : ChenJM -- Version : 1.15 -- Date : -- Description: 通用类,包含字体,颜色,适配位置等, ------------------------------------------------------------------ require("lib.ZyImage") pWinSize=CCDirector:sharedDirecto...
nilq/small-lua-stack
null
function onUse(cid, item, fromPosition, itemEx, toPosition) if getGlobalStorageValue(22549) ~= -1 then s = string.explode(getGlobalStorageValue(22549), ",") for i = 1, #s do if getCreatureName(cid) == s[i] then doPlayerSendTextMessage(cid, 20, "You are already registered in the Golden Aren...
nilq/small-lua-stack
null
-- Read gpio pin gpio.mode(3, gpio.INPUT); level = gpio.read(3); -- read gpio level print(level);
nilq/small-lua-stack
null
--行动前 阿尔 function onStart(target, buff) if GetFightData().fight_id == 10100103 then target[1211] = 200 target[1723] = 40 --初始能量 end end --大回合开始前 function afterAllEnter(target, buff) if GetFightData().fight_id == 10100402 and GetFightData().round == 1 and target.side == 2 then AddBat...
nilq/small-lua-stack
null
local w = {} w.Timer = 0 w.Drawing = {} w.Size = 360/12 w.Scale = 20 w.Height = 50 function w:Init(n) self.Music = love.audio.newSource(n, "static") self.Music:setLooping(true) self.Data = love.sound.newSoundData(n) self.SampleRate = self.Data:getSampleRate() end function w:Update(dt) self.Ti...
nilq/small-lua-stack
null
local M = {} -- define vars -- assets dir -- ---------------------------------------------------------------------------- -- private functions -- ---------------------------------------------------------------------------- -- ---------------------------------------------------------------------------- -- public...
nilq/small-lua-stack
null
local SwiftNode = require 'swiftnode' local table = require 'table' describe('Test Swift code generator.', function() it('should work', function() local result = 42 assert.is.equals(42, result) end) end)
nilq/small-lua-stack
null
--[[ Cops and Robbers: Vehicle Resource Created by RhapidFyre Contributors: - Created 12/29/2019 --]] resource_manifest_version '05cfa83c-a124-4cfa-a768-c24a5811d8f9' ui_page "nui/ui.html" dependency 'cnrobbers' files { "nui/ui.html", "nui/ui.js", "nui/ui.css" } client_scripts { "cl_config.lu...
nilq/small-lua-stack
null
--パワー・ツール・ブレイバー・ドラゴン -- --Script by Trishula9 function c100427005.initial_effect(c) --synchro summon aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) c:EnableReviveLimit() --equip local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(100427005,0)) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE...
nilq/small-lua-stack
null
local block = [[ Extract lines started with tags > or < line 1 >line 2 line 3 > line 4 line 5 < line 6 < line 7 line > 8 line < 9 line <10> I need to extract lines 2, 4, 6 and 7 ]] for tag, line in block:gmatch('\n([><])%s?(%C+)') do print(tag, line) end
nilq/small-lua-stack
null
--[[ Copyright (c) 2009 Peter "Corsix" Cawley 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, dis...
nilq/small-lua-stack
null
function on_activate(parent, ability) local targets = parent:targets():hostile():attackable() local targeter = parent:create_targeter(ability) targeter:set_selection_attackable() targeter:add_all_selectable(targets) targeter:add_all_effectable(targets) targeter:activate() end function on_targe...
nilq/small-lua-stack
null
local wibox = require("wibox") local dpi = require("beautiful").xresources.apply_dpi local clickableContainer = require("widgets.general.clickable-container") -- Return function to create a widget group return function(widgets, margins, height, spacing, clickable, vertical, bgColor) -- Create layout widget which con...
nilq/small-lua-stack
null
module(..., package.seeall) NODE = { fields = [[ -- Think twice before editing this ------------------------ fields = {0.0, proto="concat", activate="lua"} title = {0.1 } category = {0.2 } actions = {0.3, proto="concat", activate="lua"} action_hooks = {0.31, proto="concat", activ...
nilq/small-lua-stack
null
local kong = kong local find = string.find local fmt = string.format local CONTENT_TYPE = "Content-Type" local ACCEPT = "Accept" local TYPE_JSON = "application/json" local TYPE_GRPC = "application/grpc" local TYPE_HTML = "text/html" local TYPE_XML = "application/xml" local JS...
nilq/small-lua-stack
null
local math = require_relative("math") local Math = {} Math.min = math.min Math.max = math.max Math.sqrt = math.sqrt Math.modf = math.modf function Math.clamp(n, min, max) return Math.min(Math.max(n, min), max) end return Math
nilq/small-lua-stack
null
-------------------------------- -- @module EaseBounceOut -- @extend ActionEase -- @parent_module cc ---@class cc.EaseBounceOut:cc.ActionEase local EaseBounceOut = {} cc.EaseBounceOut = EaseBounceOut -------------------------------- --- ---@param action cc.ActionInterval ---@return cc.EaseBounceOut function EaseBou...
nilq/small-lua-stack
null
object_mobile_hologram_moncal_male = object_mobile_hologram_shared_moncal_male:new { } ObjectTemplates:addTemplate(object_mobile_hologram_moncal_male, "object/mobile/hologram/moncal_male.iff")
nilq/small-lua-stack
null
class 'RacingCheckpoint' function RacingCheckpoint:__init(number, transform, start, finish, blueprint) self.number = number self.transform = transform self.start = start self.finish = finish self.effect = nil if SharedUtils:IsClientModule() then self.effect = EntityManager:CreateEntity...
nilq/small-lua-stack
null
-------------------------------- -- @module TransitionFlipX -- @extend TransitionSceneOriented -- @parent_module cc ---@class cc.TransitionFlipX:cc.TransitionSceneOriented local TransitionFlipX = {} cc.TransitionFlipX = TransitionFlipX -------------------------------- --- Creates a transition with duration and inco...
nilq/small-lua-stack
null
#!/usr/bin/env lua function myfunction () print(debug.traceback("Stack trace")) print(debug.getinfo(1)) print("Stack trace end") return 10 end myfunction () print(debug.getinfo(1)) function newCounter () local n = 0 local k = 0 return function () k = n n = n + 1 re...
nilq/small-lua-stack
null
--Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf.protobuf" local PBVector3_pb = require("Protol.PBVector3_pb") module('Protol.SyncPlayerPosReq_pb') SYNCPLAYERPOSREQ = protobuf.Descriptor(); SYNCPLAYERPOSREQ_PLAYERID_FIELD = protobuf.FieldDescriptor(); SYNCPLAYERPOSREQ_POS_FIELD = protobuf.F...
nilq/small-lua-stack
null
--[[ Copyright (c) 2019, Vsevolod Stakhov <vsevolod@highsecure.ru> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law ...
nilq/small-lua-stack
null
local Panel = { } Panel.x = 0 Panel.y = 0 Panel.width = 100 Panel.height = 100 Panel.backgroundColor = lui.theme.color.paneBackground Panel.borderColor = lui.theme.color.borderInactive Panel.borderWidth = 1 Panel.cornerRadius = 2 ---------------------------------------------------------...
nilq/small-lua-stack
null
local M = {} -- Should we send commands to terminal buffers that we can't currently see? M.get_term_use_current_tab = function () if vim.g.CompileMe_term_use_current_tab == nil then return true end return vim.g.CompileMe_term_use_current_tab end -- Should we spawn a new cmd.exe window on Windows? M.get_term...
nilq/small-lua-stack
null
require 'nn' require 'cunn' local backend_name = opt.backend local backend if backend_name == 'cudnn' then require 'cudnn' backend = cudnn else backend = nn end local net = nn.Sequential() net = nn.Sequential() net:add(backend.SpatialConvolution(im_channel, 20, 5, 5)) net:add(nn.SpatialBatchNormalization(20,1...
nilq/small-lua-stack
null
object_tangible_collection_rare_pistol_sr_combat = object_tangible_collection_shared_rare_pistol_sr_combat:new { gameObjectType = 8211,} ObjectTemplates:addTemplate(object_tangible_collection_rare_pistol_sr_combat, "object/tangible/collection/rare_pistol_sr_combat.iff")
nilq/small-lua-stack
null
if spawners == nil then _G.spawners = class({}) -- put spawners in the global scope end require('spawner_tables') spawners.dire_unit_count = -1 --thinker that triggers dire spawns, it's called under function GameMode:OnGameRulesStateChange(keys) under events function dire_thinker() Timers:CreateTimer( functio...
nilq/small-lua-stack
null
local ran,err = ypcall(function() plr = game:service'Players'.LocalPlayer char = plr.Character mouse = plr:GetMouse() humanoid = char:findFirstChild("Humanoid") torso = char:findFirstChild("Torso") head = char.Head ra = char:findFirstChild("Right Arm") la = char:findFirstChild("Left Arm") rl = char:findFirstChild("Righ...
nilq/small-lua-stack
null
--------------------------------------------------------------------------------------------------- -- User story: TBD -- Use case: TBD -- -- Requirement summary: -- [SDL_RC] TBD -- -- Description: SDL shall not send OnRCStatus notifications to rc registered apps -- by allocation module via GetInteriorVehicleData -- In...
nilq/small-lua-stack
null
function loadthings() local txd = engineLoadTXD ( "speeds.txd" ) engineImportTXD ( txd, 1444 ) end local dxlabel = { {1692.41, -683.77, 45.4,"120 KM/H"}, {1723.19, -876.78, 57.81 ,"120 KM/H"}, {1671.93, -65.04, 35.92 ,"150 KM/H"}, {1595.1, 92.6, 37.79 ,"180 KM/H"}, {1732.59, 1632.17, 9.16 ,"90 KM/H"}, {457.93, 75...
nilq/small-lua-stack
null
return {'kadaster','kadasterkaarten','kadastraal','kadastreren','kadastrering','kadaver','kadaverdiscipline','kaddisj','kade','kadee','kadegeld','kademuur','kaden','kader','kaderakkoord','kaderbrief','kadercursus','kaderen','kaderfunctie','kaderlid','kaderlijnen','kadernota','kaderopleiding','kaderovereenkomst','kaderp...
nilq/small-lua-stack
null
Character = {} Character.__index = Character function Character:Create(def, map) -- Look up the entity local entityDef = gEntities[def.entity] assert(entityDef) -- The entity should always exist! local this = { mDef = def, mEntity = Entity:Create(entityDef), m...
nilq/small-lua-stack
null
local AddonName = ... local L = LibStub("AceLocale-3.0"):NewLocale(AddonName, "deDE") if not L then return end L.Updated = "Aktualisiert auf v%s" L.Pulse = "Pulse" L.Shine = "Shine"
nilq/small-lua-stack
null
local rcvboxes = { { -3/16, -3/16, -8/16 , 3/16, 3/16 , -13/32 }, -- the smaller bump { -1/32, -1/32, -3/2 , 1/32, 1/32 , -1/2 }, -- the wire through the block { -2/32, -1/2 , -.5 , 2/32, 0 , -.5002+3/32 }, -- the vertical wire bit { -2/32, -1/2 , -7/16+0.002 , 2/32, -1...
nilq/small-lua-stack
null
-- Intents for plot/endgame factions. -- appease ram checker -- ns:joinFaction() local log = require 'log' local fc = require 'intent.faction-common' local factions = table.List { -- TODO take into account how long it'll take to grind up these stats based on -- character multipliers and stuff { name = "The Cov...
nilq/small-lua-stack
null
--!strict --[=[ @class Draw ]=] local Draw = {} local thickness = 0.5 local abs = math.abs local function factorial(n : number) : number if n == 0 then return 1 end return n * factorial(n - 1) end local function binomial(n : number, i : number) : number local x : number = nil x = (factorial(n)) / (factorial(n...
nilq/small-lua-stack
null