content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
local type = type local print = print local pairs = pairs local tostring = tostring local assert = assert local format = string.format local rep = string.rep local io_open = io.open local io_write = io.write local os_date = os.date local os_time = os.time local mz = require 'minizip_ffi' -- loca...
nilq/small-lua-stack
null
-- water.lua -- adding a water block via lua module water_block_id = 0; function startup() io.write("adding a 'water' block\n"); water_block_id = api.add_block_type('water', {31, 31, 31, 31, 31, 31, 0}, false, false, true, false); end function shutdown() io.write("water module shutting down\n"); end function af...
nilq/small-lua-stack
null
---@class Unit Unit = {} Unit.__index = Unit ---@param id player|integer ---@param unitid integer|string ---@param x real ---@param y real ---@param face real ---@return Unit function Unit.create(id, unitid, x, y, face) local self = setmetatable({}, Unit) if type(id) == 'number' then id = Player(id) end if ...
nilq/small-lua-stack
null
#!/usr/bin/env lua package.path = package.path..";../?.lua" local gl = require("moongl") local glfw = require("moonglfw") local glmath = require("moonglmath") local new_camera = require("common.camera") -- A few shortcuts: local vec3, mat4 = glmath.vec3, glmath.mat4 local rotate, translate, scale = glmath.rotate, glma...
nilq/small-lua-stack
null
require 'nn' require 'cunn' require 'cudnn' require 'optim' require 'xlua' require 'torch' require 'hdf5' opt_string = [[ --model (default "logs/model.net") torch model file path --h5_list_path (default "data/volume_data0.h5") h5 data path --gpu_index (default 0) ...
nilq/small-lua-stack
null
------------------------ --- 2011 -03 -15 Terry@bf -- 迁移一些UI相关的功能到这里 -- UI的独立控件也会放到这里 ------------------------ --框体保存功能 local function roundUpFrameLocations(_id) local _val = BF_Frames_Config[_id] if _val then ----------这里修改一个报错。point 为string 如何 floor---------------------- BF_Frames_Config[_id].point...
nilq/small-lua-stack
null
-- Copyright 2008 Steven Barth <steven@midlink.org> -- Copyright 2011-2018 Jo-Philipp Wich <jo@mein.io> -- Licensed to the public under the Apache License 2.0. module("luci.controller.admin.network", package.seeall) function index() local page -- if page.inreq then page = entry({"admin", "system", "wireless"}, vi...
nilq/small-lua-stack
null
--[[ Adapted from PolyBool (github.com/voidqk/polybooljs) under the MIT license. (c) 2016 Sean Connelly (@voidqk) Original Lua port by EgoMoose. Refactor and optimisations by Elttob. ]] --[[ Provides the raw computation functions that take epsilon into account. Zero is defined to be between (-epsilon, epsilon)...
nilq/small-lua-stack
null
fx_version 'bodacious' game 'gta5' ui_page { 'html/ui.html', } shared_scripts { 'config.lua', } client_scripts { 'client/client.lua', } server_scripts { '@async/async.lua', '@mysql-async/lib/MySQL.lua', 'server/server.lua', 'config.lua' } files { 'html/ui.html', ...
nilq/small-lua-stack
null
-- -- Hello World server -- Connects REP socket to tcp://*:5560 -- Expects "Hello" from client, replies with "World" -- -- Author: Robert G. Jakabosky <bobby@sharedrealm.com> -- require"zmq" require"zhelpers" local context = zmq.init(1) -- Socket to talk to clients local responder = context:socket(zmq.REP) respo...
nilq/small-lua-stack
null
local error = error local pairs = pairs local setmetatable = setmetatable local Card = {} Card.__index = Card Card.__eq = function (c1, c2) return c1:tostring() == c2:tostring() end Card.SUIT_TO_STRING = { "S", "H", "D", "C" } Card.RANK_TO_STRING = { [2] = "2", [3] = "3", [4] = "4", [5] = "5", ...
nilq/small-lua-stack
null
local CATEGORY_NAME = "TTT" function ulx.cc_credits( ply, targs ) for _, v in ipairs( targs ) do ply:AddCredits(100) end SendFullStateUpdate() ulx.fancyLogAdmin( ply, true, "#A gave #T credits", targs ) end local credits = ulx.command( CATEGORY_NAME, "ulx credits", ulx.cc_credits, "!credits", true ) credits:add...
nilq/small-lua-stack
null
local Timer = require 'vendor/timer' local sound = require 'vendor/TEsound' return{ name = 'humbug', die_sound = 'acorn_crush', position_offset = { x = 0, y = -1 }, height = 40, width = 58, bb_width = 44, bb_height = 26, bb_offset = {x=2, y=7}, damage = 10, hp = 1, velocity = { x = 60, y = 30 }, ...
nilq/small-lua-stack
null
-------------------------------- -- @module WebView -- @extend Widget -- @parent_module ccui ---@class ccui.WebView:ccui.Widget local WebView = {} ccui.WebView = WebView -------------------------------- --- SetOpacity of webview. ---@param opacity number ---@return ccui.WebView function WebView:setOpacityWebView(opa...
nilq/small-lua-stack
null
----------------------------------- -- -- tpz.effect.VISITANT -- ----------------------------------- function onEffectGain(target, effect) end function onEffectTick(target, effect) --[[ local duration = effect:getDuration() if (target:getCharVar("Abyssea_Time") >= 3) then target:setCharVar("Abysse...
nilq/small-lua-stack
null
object_tangible_quest_avatar_cold_storage = object_tangible_quest_shared_avatar_cold_storage:new { } ObjectTemplates:addTemplate(object_tangible_quest_avatar_cold_storage, "object/tangible/quest/avatar_cold_storage.iff")
nilq/small-lua-stack
null
-- Utility functions for calculating the Intersection over Union for evaluation -- By: Kiana Ehsani function clean_mask_output(result) if torch.sum(result) == 0 then return result:float() end local thr = 0.5 return torch.ge(result,thr):float() end function calc_iou(gt, result) local output = clean_mas...
nilq/small-lua-stack
null
local tap = require('util/tap') local test = tap.test test("Get all local http addresses", function(expect, uv) assert(uv.getaddrinfo(nil, "http", nil, expect(function(err, res) console.log(#res, res[1]) assert(not err, err) assert(res[1].port == 80) end))) end) test("Get all local htt...
nilq/small-lua-stack
null
PLUGIN = PLUGIN Clockwork.kernel:IncludePrefixed("sv_plugin.lua");
nilq/small-lua-stack
null
-- Created by Elfansoer --[[ Ability checklist (erase if done/checked): - Scepter Upgrade - Break behavior - Linken/Reflect behavior - Spell Immune/Invulnerable/Invisible behavior - Illusion behavior - Stolen behavior ]] -------------------------------------------------------------------------------- modifier_razor_eye...
nilq/small-lua-stack
null
local tonumber = tonumber local debug = debug function IsNull(ptr) return ptr == nil end function NotNull(ptr) return ptr ~= nil end local ffi = require("ffi") local uint_t = ffi.typeof("unsigned int") function PtrToNum(ptr) return tonumber(ffi.cast(uint_t, ptr)) end require("luaextensions.math") require("luaex...
nilq/small-lua-stack
null
local Concord = require("lib.concord") local Animation = Concord.component(function(e, animations, initialState) e.animations = animations e.current = initialState end) function Animation:switch(newState) local animation = self.animations[newState] animation.currentTime = 0 animation.currentF...
nilq/small-lua-stack
null
function GM:PlayerNoClip(client) return client:IsAdmin() end -- luacheck: globals HOLDTYPE_TRANSLATOR HOLDTYPE_TRANSLATOR = {} HOLDTYPE_TRANSLATOR[""] = "normal" HOLDTYPE_TRANSLATOR["physgun"] = "smg" HOLDTYPE_TRANSLATOR["ar2"] = "smg" HOLDTYPE_TRANSLATOR["crossbow"] = "shotgun" HOLDTYPE_TRANSLATOR["rpg"] = "shotgun...
nilq/small-lua-stack
null
local libd = _G.library_directory local class = require(libd .. "middleclass") local Timer = class("Timer") function Timer:initialize(max) self.time = 0 self.max = max end function Timer:update(dt, callback) self.time = self.time + dt if self.time > self.max then callback() self.time = 0 end e...
nilq/small-lua-stack
null
Config = {} Config.Locations = { [1] = { ["model"] = { ["coords"] = vector3(-1070.1, -279.26, 36.74), ["h"] = 252.18, ["hash"] = "g_f_y_lost_01", }, }, [2] = { ["model"] = { ["coords"] = vector3(-1070.53, -280.57, 36.74), ...
nilq/small-lua-stack
null
local t = require('luatest') local g = t.group() local utils = require('test.utils') local Average = require('metrics.collectors.average') g.test_collect = function() local instance = Average:new('latency') instance:observe(1) instance:observe(2) instance:observe(3, {tag = 'a'}) instance:observe(...
nilq/small-lua-stack
null
-- luyi7338 汉化 -- Sharak@BigFoot 增加繁体版数据 if (GetLocale() == "zhCN") then TrinketMenu.CheckOptInfo = { {"ShowIcon","ON","迷你地图按钮","显示或隐藏小地图按钮."}, {"SquareMinimap","OFF","方形迷你地图","如果迷你地图是方形移动迷你地图按钮.","ShowIcon"}, {"CooldownCount","OFF","冷却计时","在按钮上显示剩余冷却时间."}, {"TooltipFollow","OFF","跟随鼠标","提示信息跟随鼠标."...
nilq/small-lua-stack
null
SWEP.Base = "tfa_nmrimelee_base" SWEP.Category = "TFA NMRIH - CotZ" SWEP.Spawnable = true SWEP.AdminSpawnable = true SWEP.PrintName = "Fire Axe" SWEP.ViewModel = "models/weapons/tfa_nmrih/v_me_axe_fire.mdl" --Viewmodel path SWEP.ViewModelFOV = 50 SWEP.Slot = 3 SWEP.WorldModel = "models/weapons/tfa_nmrih/w_me_ax...
nilq/small-lua-stack
null
model.dlg={} function model.dlg.updateEnabledDisabledItems() if model.dlg.ui then local simStopped=sim.getSimulationState()==sim.simulation_stopped local config=model.readInfo() simUI.setEnabled(model.dlg.ui,1365,simStopped,true) simUI.setEnabled(model.dlg.ui,30,simStopped,true) ...
nilq/small-lua-stack
null
Citizen.CreateThread(function() while true do Citizen.Wait(100) if IsControlPressed(0, 22) then SendNUIMessage("dismiss") end end end)
nilq/small-lua-stack
null
object_tangible_holiday_love_day_love_day_ewok_cupid_familiar_deed = object_tangible_holiday_love_day_shared_love_day_ewok_cupid_familiar_deed:new { } ObjectTemplates:addTemplate(object_tangible_holiday_love_day_love_day_ewok_cupid_familiar_deed, "object/tangible/holiday/love_day/love_day_ewok_cupid_familiar_deed.iff...
nilq/small-lua-stack
null
require "objc" require "cocoa" local Hoge = objc.runtime.createClass("Hoge",cocoa.NSObject,{}) objc.runtime.class_addMethod(Hoge,"test1:",function(self,_cmd,a) print("Hoge -test1:",a) end,"v0@0:0i0") objc.runtime.class_addMethod(Hoge,"test2:",function(self,_cmd,a) print("Hoge -test2:",a) end,"v0@0:0i0") objc.runti...
nilq/small-lua-stack
null
--Beetrooper Landing --Scripted by: XGlitchy30 function c101106090.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e1:SetDescription(aux.Stringid(101106090,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(c1...
nilq/small-lua-stack
null
-- -- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License"); you may ...
nilq/small-lua-stack
null
data:extend( { { type = "technology", name = "iron-oxide", icon = "__MiningStation__/graphics/icons/adv-iron.png", prerequisites = { "steel-processing" }, effects = { { type = "unlock-recipe", recipe = "iron-oxide" }, { type = "unlock-recip...
nilq/small-lua-stack
null
spawnpoint 'a_m_y_hipster_01' { x = -1045.18, y = -2751.07, z = 21.31 } spawnpoint 'a_m_y_hipster_02' { x = -1045.18, y = -2751.07, z = 21.31 }
nilq/small-lua-stack
null
-- $Id: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/GameObject/Demo_Land_Controller_R.lua#2 $ --///////////////////////////////////////////////////////////////////////////////////////////////// -- -- (C) Petroglyph Games, Inc. -- -- -- ***** ** * * -- * ...
nilq/small-lua-stack
null
--[[ module:LimitSupport author:DylanYang time:2021-02-11 17:38:27 ]]local super = require("patterns.behavioral.chainOfResponsibility.Support") local _M = Class("LimitSupport", super) _M.limit = nil function _M:ctor(name, limit) self.super:ctor(name) self.limit = limit end function _M.protected:R...
nilq/small-lua-stack
null
local json = GLOBAL.json local pcall = GLOBAL.pcall local RADIUS = GetModConfigData("RADIUS") local CHESTERON = GetModConfigData("CHESTERON") function GetOverflowContainers(player) --[[if GLOBAL.TheNet:GetIsClient() then --apparently this check is not needed because clients have access to TheSim and their own Transf...
nilq/small-lua-stack
null
output_dir = '%{cfg.buildcfg}_%{cfg.architecture}_%{cfg.system}' workspace 'Roman' architecture 'x64' configurations { 'Debug', 'Release' } flags { 'MultiProcessorCompile' } startproject 'Roman' language 'C++' cppdialect 'C++latest' warnings 'Extra' conformancemode 'On' staticruntim...
nilq/small-lua-stack
null
local TestCase = {} function TestCase.run(...) print('Core/Helper/GUIDHelper test:') local gen_count = 100 print('Generate 100 GUIDs...') for i = 1,gen_count do print(tostring(i) .. ': ' .. llbc.GUID.generate()) end print('GUID test success!') end return TestCase
nilq/small-lua-stack
null
LinkLuaModifier("modifier_item_bottle_arena_heal", "items/item_bottle.lua", LUA_MODIFIER_MOTION_NONE) item_bottle_arena = class({}) function item_bottle_arena:GetAbilityTextureName() return self:GetNetworkableEntityInfo("ability_texture") or "item_arena/bottle_3" end if IsServer() then function item_bottle_arena:On...
nilq/small-lua-stack
null
do ---Represents the server; only one instance in the global variable `server`. ---@class Server ---@field class string 🔒 "Server" ---@field TPS integer 🔒 How many ticks are in 1 second according to in-game timers (60). ---@field port integer 🔒 ---@field name string Name shown on the server list, max length of...
nilq/small-lua-stack
null
require('./b.lua') local function test(hey) return hey end
nilq/small-lua-stack
null
Config = {} Config.DrawDistance = 100.0 Config.MarkerType = 31 Config.MarkerSize = { x = 1.5, y = 1.5, z = 1.0 } Config.MarkerColor = { r = 50, g = 50, b = 204 } Config.Locale = 'es' Config.CustomPeds = { Cus...
nilq/small-lua-stack
null
players = {} local playerCount = 0 function getPlayers() if (players) then return players else return false end end function refreshTable() players = {} --empty the table for k,v in ipairs(getElementsByType("player")) do name = getPlayerName(v) occupation = getElementData(v,"Occupation") if (occupation...
nilq/small-lua-stack
null
pfDatabase = {} local loc = GetLocale() local dbs = { "items", "quests", "objects", "units", "zones", "professions" } -- detect localized databases pfDatabase.dbstring = "" for id, db in pairs(dbs) do -- assign existing locale pfDB[db]["loc"] = pfDB[db][loc] or pfDB[db]["enUS"] pfDatabase.dbstring = pfDatabase....
nilq/small-lua-stack
null
return { {"wbthomason/packer.nvim", disable = false}, {"nvim-lua/plenary.nvim", disable = false}, {"norcalli/nvim-colorizer.lua", disable = false}, {"folke/twilight.nvim", disable = false}, {"folke/zen-mode.nvim", disable = false}, {"b3nj5m1n/kommentary", disable = false}, {"chrisbra/Coloriz...
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 /////// ///////////////// ]] GangAreas = {} GangwarUnderAttack = false CGangArea = {} fun...
nilq/small-lua-stack
null
Locales['pl'] = { ['actions'] = 'menu', ['boss_menu'] = 'menu zarządzania', ['money_generic'] = '$%s', ['deposit_amount'] = 'ilość wpłaty', ['deposit_society_money'] = 'wpłać pieniądze na konto firmy', ['do_you_want_to_recruit'] = 'czy chcesz zrekrutować %s?', ...
nilq/small-lua-stack
null
local commandHandlers = {} commandHandlers["start"] = function (player, resourceName) if type(resourceName) ~= "string" then outputDebugString("Bad resource name '" .. tostring(resourceName) .. "'") return end if hasObjectPermissionTo(player, "command.start", false) then local resource = getResourceFromName(r...
nilq/small-lua-stack
null
StaffChat = {} local c = {} -- Config file -- You can add multiple chat rooms with different chat commands and permissions -- Please keep numbers in [] ordered (1, 2, 3...) or it won't work properly -- Example: --[[ c[2] = { cmds = {"/staff", "/staffchat"}, -- List of commands that can be used to write to this chat...
nilq/small-lua-stack
null
function switchWaterRef( wrOn ) if (wrOn) then enableWaterRef() else disableWaterRef() end end addEvent( "switchWaterRef", true ) addEventHandler( "switchWaterRef", root, switchWaterRef )
nilq/small-lua-stack
null
Inventory = classExtends(Controller, function(user, xsize, ysize, style, align, x, y) self.user = user self.xsize = xsize self.ysize = ysize self.style = style self.align = align self.data = InventoryData.new(user, xsize, ysize) self.window = user:newWindow(style, align, x, y) end)
nilq/small-lua-stack
null
signs_lib.unicode_install({195,128,"00c0"}) signs_lib.unicode_install({195,134,"00c6"}) signs_lib.unicode_install({195,135,"00c7"}) signs_lib.unicode_install({195,136,"00c8"}) signs_lib.unicode_install({195,137,"00c9"}) signs_lib.unicode_install({195,138,"00ca"}) signs_lib.unicode_install({195,148,"00d4"}) signs_lib.un...
nilq/small-lua-stack
null
------------------------------------------------ -- Copyright © 2013-2014 Hugula: Arpg game Engine -- asset -- author pu ------------------------------------------------ local CUtils=CUtils local LuaHelper=LuaHelper local GAMEOBJECT_ATLAS = GAMEOBJECT_ATLAS Asset = class(function(self,url,names) self.base = fal...
nilq/small-lua-stack
null
return { legend = { { "SocketFile", "SocketGroup", "SocketPerms" }, { }, { } }, label = _("UnixSock"), category = "output" }
nilq/small-lua-stack
null
-- -- A wrapper for inspect.lua. It discards metatables and supports multiple -- arguments. -- local inspect = require("inspect") local remove_all_metatables = function(item, path) if path[#path] ~= inspect.METATABLE then return item end end function repr(...) local args = table.pack(...) -- Don't touch single...
nilq/small-lua-stack
null
local playsession = { {"mewmew", {1005687}}, {"snoetje", {976867}}, {"Akhrem", {1000228}}, {"morcup", {163826}}, {"Dr.MoonShine", {665165}}, {"flooxy", {537698}}, {"Danzou", {270732}}, {"dpoba", {560297}}, {"TiTaN", {191312}}, {"squishp", {3683}} } return playsession
nilq/small-lua-stack
null
function onCreate() makeLuaSprite('theWall','sanctum/wall',-1000,-300) addLuaSprite('theWall',false) setLuaSpriteScrollFactor('theWall',.8,.8) makeLuaSprite('p1','sanctum/painting 1',-200,50) addLuaSprite('p1',false) setLuaSpriteScrollFactor('p1',.8,.8) makeLuaSprite('p2','sanctum/painting 2',700,0) addLuaS...
nilq/small-lua-stack
null
local core = require "sys.core" local testaux = require "testaux" local context = {} local total = 30 local WAIT local function gen_closure(n) local now = core.now() return function (s) assert(context[s] == n) local delta = core.now() - now delta = math.abs(delta - 100 - n) --precise is 50ms testaux.asser...
nilq/small-lua-stack
null
vehicles = { --{vehicleID,"VEHICLE NAME",engine,tires,tankpart,fuel,MAXSLOTS} {470,"Patriot",1,4,1,0,1,80,100}, {468,"Sanchez",1,2,1,0,1,80,100}, {433,"Barracks",1,6,1,0,1,80,100}, }
nilq/small-lua-stack
null
ITEM.name = "Płyta pancerza" ITEM.model = Model("models/gibs/metal_gib4.mdl") ITEM.description = "chuj" ITEM.protectionlevel = 2 ITEM.hitgroup = HITGROUP_CHEST
nilq/small-lua-stack
null
-- Challenge class for island value cChallengeValues = {} cChallengeValues.__index = cChallengeValues function cChallengeValues.new() local self = setmetatable({}, cChallengeValues) setmetatable(cChallengeValues, {__index = cChallengeInfo}) self.m_Calculations = {} -- self.m_BlocksCounted = {} return self end ...
nilq/small-lua-stack
null
#!/usr/bin/env lua -- MoonODE space_collide() tests -- Derived from ode/demo/demo_space.cpp local ode = require("moonode") local glmath = require("moonglmath") ode.glmath_compat(true) -- testing procedure: -- create a bunch of random boxes -- test for intersections directly, put results in n^2 array -- get space to rep...
nilq/small-lua-stack
null
local tBotNameList = { --"npc_dota_hero_abaddon",// 不会放技能,只会物品和A人 --"npc_dota_hero_antimage",// 不会放技能,只会物品和A人 --"npc_dota_hero_spirit_breaker",// 不会放技能,只会物品和A人 --"npc_dota_hero_silencer",// 不会放技能,只会物品和A人 "npc_dota_hero_axe", "npc_dota_hero_bane", "npc_dota_hero_bounty_hunter", "npc_dota_hero_bloodseeker", "npc...
nilq/small-lua-stack
null
---@class LuaInterface.InjectType : System.Enum ---@field value__ int ---@field None LuaInterface.InjectType ---@field After LuaInterface.InjectType ---@field Before LuaInterface.InjectType ---@field Replace LuaInterface.InjectType ---@field ReplaceWithPreInvokeBase LuaInterface.InjectType ---@field ReplaceWithPostInvo...
nilq/small-lua-stack
null
local event = require 'utils.event' local coin_yield = { ["rock-big"] = 3, ["rock-huge"] = 6, ["sand-rock-big"] = 3 } local function on_player_mined_entity(event) if coin_yield[event.entity.name] then event.entity.surface.spill_item_stack(event.entity.position,{name = "coin", count = math.random(math.ceil(coi...
nilq/small-lua-stack
null
-- -- cmake vim.g['cmake_link_compile_commands'] = 1 -- vim.g['cmake_generate_options'] = {'-GNinja', '-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain.cmake'} vim.g['cmake_generate_options'] = {'-GNinja'} vim.g['cmake_root_markers'] = {'.'}
nilq/small-lua-stack
null
--[[ Copyright (c) 2016 Calvin Rose 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, distribute, su...
nilq/small-lua-stack
null
local jass = require 'jass.common' local dbg = require 'jass.debug' local Point = require 'war3library.libraries.ac.point' local Destructable = {} setmetatable(Destructable, Destructable) local mt = {} Destructable.__index = mt mt.type = 'destructable' --现存的所有可破坏物 Destructable.all_destrucables = nil --根据handle创...
nilq/small-lua-stack
null
local awful = require('awful') local wibox = require('wibox') local beautiful = require('beautiful') local gears = require('gears') local clickable_container = require('widget.clickable-container') local dpi = require('beautiful').xresources.apply_dpi local colors = require('themes.dracula.colors') local modkey = requi...
nilq/small-lua-stack
null
TOOL.Category = "Lite Tools" TOOL.Name = "#tool.lite_push_pull.name" TOOL.Information = { {name = "left"}, {name = "right"} } TOOL.ClientConVar["power"] = "5" TOOL.ClientConVar["undo"] = "1" if CLIENT then language.Add("tool.lite_push_pull.name", "Push/Pull") language.Add("tool.lite_push_pull.desc", "Push/Pull ...
nilq/small-lua-stack
null
addEvent("gra.cPersonalSettings.set", true, true) local playersSettings = {} cPersonalSettings = {} addEventHandler("onResourceStart", resourceRoot, function() for i, player in ipairs(getElementsByType("player")) do playersSettings[player] = {} end end ) addEventHandler("onPlayerJoin", root, function() ...
nilq/small-lua-stack
null
-- MasterMerchant Russian Localization File -- Last Updated September 6, 2014 -- Written July 2014 by Dan Stone (@khaibit) - dankitymao@gmail.com -- Extended February 2015 by Chris Lasswell (@Philgo68) - Philgo68@gmail.com -- Released under terms in license accompanying this file. -- Distribution without license is pr...
nilq/small-lua-stack
null
MultiBarRight:ClearAllPoints(); MultiBarRight:SetPoint("RIGHT", 510, 390); MultiBarRight.SetPoint = function() end
nilq/small-lua-stack
null
local key = KEYS[1] local capacity = tonumber(ARGV[1]) local timestamp = tonumber(ARGV[2]) local id = ARGV[3] local count = redis.call("zcard", key) local allowed = count < capacity if allowed then redis.call("zadd", key, timestamp, id) end redis.call("setex", key, timestamp) return { allowed, count }
nilq/small-lua-stack
null
-- This is an OOP-style class system module local assert, pairs, type, tostring, setmetatable = assert, pairs, type, tostring, setmetatable local baseMt, _instances, _classes, _class = {}, setmetatable({},{__mode='k'}), setmetatable({},{__mode='k'}) local function assert_class(class, method) assert(_classes[class], ('...
nilq/small-lua-stack
null
SceneManager = require("SceneManager") ArchiveManager = require("ArchiveManager") FailureScene = {} FailureScene.name = "FailureScene" local _FONT_ = nil local _TEXT_ = "别灰心,你还有机会……" local _COLOR_TEXT_ = {r = 226, g = 4, b = 27, a = 255} local _TEXT_SHOW_DELAY_ = 120 local _RECT_TEXT_ = nil local _window_width,...
nilq/small-lua-stack
null
object_tangible_jedi_jedi_holocron_generic = object_tangible_jedi_shared_jedi_holocron_generic:new { noTrade = 1, objectMenuComponent = "LightJediMenuComponent", } ObjectTemplates:addTemplate(object_tangible_jedi_jedi_holocron_generic, "object/tangible/jedi/jedi_holocron_generic.iff")
nilq/small-lua-stack
null
-- package.path = package.path .. ";D:/www/_nneesshh_git/ZeroBraneStudio53/lualibs/?/?.lua;D:/www/_nneesshh_git/ZeroBraneStudio53/lualibs/?.lua" package.cpath = package.cpath .. ";D:/www/_nneesshh_git/ZeroBraneStudio53/bin/?.dll;D:/www/_nneesshh_git/ZeroBraneStudio53/bin/clibs/?.dll" require('mobdebug'...
nilq/small-lua-stack
null
--[[ LuCI - Lua Configuration Interface Copyright 2008 Steven Barth <steven@midlink.org> Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net> 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 ...
nilq/small-lua-stack
null
vim.g.gutentags_file_list_command = 'rg --files --follow --ignore-file "/home/ayo/.vimignore"'
nilq/small-lua-stack
null
return { { ref = "physgun", name = "physgun", trait = "physgun", amount = 1, tier = 2, alwaysUnlocked = true }, { { { ref = "fr1", name = "fire_rate", trait = "towerFireRate", amount = 1, parent = "physgun", links = "parent", pos = {4,4}, }, { ref = "fr2", n...
nilq/small-lua-stack
null
local colors = { black = {gui = '#fbfbfb', cterm = '236'}, blue = {gui = '#94aadb', cterm = '39'}, cyan = { gui = '#89bdff', cterm = '38'}, green = {gui = '#babb63', cterm = '113'}, grey_comment = {gui = "#a8a8a8", cterm = "59"}, grey_cursor = {gui = "#bdbdbd", cterm = "236"}, grey_menu = {gui = "#d5d5d5"...
nilq/small-lua-stack
null
script = {} function script.Initialize() script.maxSpeed = 2 script.updateTime = 0 script.panicDistance = 100 end function script.DoUpdate(delta) script.updateTime = script.updateTime - delta if script.updateTime <= 0 then local enemies = entity:GetNearbyEnemies() if enemies then local targetEntity ...
nilq/small-lua-stack
null
--[[ # `the` = globals --]] local the= { cocomo = {lo=1,hi=1}, dec1list= {max = 1024, min=4}, divnum = { min = 0.5, cohen = 0.3, better = 1.05}, data = '../test/data/raw/' } return the
nilq/small-lua-stack
null
--[[----------------------------------------------------------------------------- * Infected Wars, an open source Garry's Mod game-mode. * * Infected Wars is the work of multiple authors, * a full list can be found in CONTRIBUTORS.md. * For more information, visit https://github.com/JarnoVgr/InfectedWars * * Inf...
nilq/small-lua-stack
null
module('love.sound') function newDecoder() end function newSoundData() end
nilq/small-lua-stack
null
-- Invalid module (syntax error) for utils.load_module_if_exists unit tests. -- Assert that load_module_if_exists throws an error helps for development, where one could -- be confused as to the reason why his or her plugin doesn't load. (not implemented or has an error) local a = "hello",
nilq/small-lua-stack
null
COLOR_HALFLIFE = Color(251,126,20)
nilq/small-lua-stack
null
local ls = require('luasnip') ls.snippets = { -- When trying to expand a snippet, luasnip first searches the tables for -- each filetype specified in 'filetype' followed by 'all'. -- If ie. the filetype is 'lua.c' -- - luasnip.lua -- - luasnip.c -- - luasnip.all -- are searched in that order. all =...
nilq/small-lua-stack
null
-- lite-xl 1.16 local core = require "core" local command = require "core.command" local translate = require "core.doc.translate" local function gmatch_to_array(text, ptn) local res = {} for x in text:gmatch(ptn) do table.insert(res, x) end return res end local function tabularize_lines(lines, delim) ...
nilq/small-lua-stack
null
-- luacheck: globals audio display easing graphics lfs media native network Runtime system timer transition package.path = "./?.lua;" .. package.path local Composer = require "composer" -- hide the status bar display.setStatusBar (display.DefaultStatusBar) -- load menu screen Composer.gotoScene "vitesse.main"
nilq/small-lua-stack
null
bot_token = "239047385:AAEbPXGvm7Hs4mQS2CNx2AVOBLLa2Jo-Q_w" send_api = "https://api.telegram.org/bot"..bot_token bot_version = "1.7" sudo_name = "khajeh_amir" sudo_id = 216507730 sudo_user = "khajeh_amir" nerkh = "5"
nilq/small-lua-stack
null
-- User defined commands local commands = {} -- Use this template to add new commands. Replace XXXX and add the body: -- commands.XXXX = function (host, user, args) -- if args then -- -- What to do if called with format "!XXXX args" -- send_to_chat(host, "add a message to be posted to chat") -- else -- -- Wha...
nilq/small-lua-stack
null
--[==[ - Author: ezhex1991@outlook.com - CreateTime: 2017-11-15 16:07:58 - Orgnization: #ORGNIZATION# - Description: --]==] local M = require("ezlua.module"):module() ----- CODE ----- function M.LuaAwake(injector) local self = M:new() injector:Inject(self) self.gameObject = injector.gameObject ...
nilq/small-lua-stack
null
local __exports = LibStub:NewLibrary("ovale/scripts/ovale_trinkets_wod", 80300) if not __exports then return end __exports.registerWodTrinkets = function(OvaleScripts) local name = "ovale_trinkets_wod" local desc = "[6.2] Ovale: Trinkets (Warlords of Draenor)" local code = [[ # Trinkets from Warlords of Dra...
nilq/small-lua-stack
null
require "socket" math.randomseed(socket.gettime()*1000) math.random(); math.random(); math.random() local function recommend() local method = "GET" local path = "http://localhost:5000/recommendations?require=rate&lat=38.0235&lon=-122.095" local headers = {} -- headers["Content-Type"] = "application/x-www-for...
nilq/small-lua-stack
null
local MIN_X = -30000 local MAX_X = 30000 local MIN_Z = -30000 local MAX_Z = 30000 function generateRandomWalkVector(min, max, generateBreaks) local currentHeight = 0 local val = {} local mode = math.random(4); -- mode of random walking, shifts probability distribution local modeAge = 10; -- mode age,...
nilq/small-lua-stack
null