content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
local vlua = require("vlua.vlua")
local Binder = require("vlua.binder")
local HookIds = Binder.HookIds
local Generic = {}
Generic.install = function()
end
return Generic
| nilq/small-lua-stack | null |
ITEM.name = "Pulse-Rifle"
ITEM.description = "A dark energy powered assault rifle."
ITEM.model = "models/weapons/w_irifle.mdl"
ITEM.class = "weapon_ar2"
ITEM.weaponCategory = "primary"
ITEM.classes = {CLASS_EOW}
ITEM.width = 4
ITEM.height = 2
ITEM.iconCam = {
ang = Angle(-0.70499622821808, 268.25439453125, 0),
fov = ... | nilq/small-lua-stack | null |
util = {}
do
local serialize_any, serialize_table
serialize_table = function( val, bck )
if bck[val] then
return "nil"
end
bck[val] = true
local entries = {}
for k, v in pairs( val ) do
entries[#entries + 1] = string.format( "[%s] = %s", serialize_any( k, bck ), serialize_any( v, bck ) )
end
ret... | nilq/small-lua-stack | null |
local mod = get_mod("Pause") -- luacheck: ignore get_mod
-- luacheck: globals Managers
mod.do_pause = function()
if not Managers.player.is_server then
mod:echo_localized("not_server")
return
end
if Managers.state.debug.time_paused then
Managers.state.debug:set_time_scale(Managers.state.debug.time_scale_inde... | nilq/small-lua-stack | null |
------------------------------------------------------------------------------
-- DynASM ARM64 module.
--
-- Copyright (C) 2005-2016 Mike Pall. All rights reserved.
-- See dynasm.lua for full copyright notice.
------------------------------------------------------------------------------
-- Module information:
... | nilq/small-lua-stack | null |
--***********************************************************
--** THE INDIE STONE **
--***********************************************************
---@class ISRainPanel : ISPanel
ISRainPanel = ISPanel:derive("ISRainPanel")
function ISRainPanel:createChildren()
local label = ISL... | nilq/small-lua-stack | null |
-- TODO Add Lua Websocket client
| nilq/small-lua-stack | null |
--------------------------------
-- @module PhysicsSprite3D
-- @extend Sprite3D
-- @parent_module cc
---@class cc.PhysicsSprite3D:cc.Sprite3D
local PhysicsSprite3D = {}
cc.PhysicsSprite3D = PhysicsSprite3D
--------------------------------
--- synchronize node transformation to physics.
---@return cc.PhysicsSprite3... | nilq/small-lua-stack | null |
local InCombat = {
}
local OutCombat = {
}
XB.CR:Add(65, '[XB] Paladin - Holy', inCombat, outCombat)
| nilq/small-lua-stack | null |
function Rot(keys)
local caster = keys.caster
local ability = keys.ability
local damage = ability:GetLevelSpecialValueFor("rot_damage", ability:GetLevel() - 1) * ability:GetLevelSpecialValueFor("rot_tick", ability:GetLevel() - 1)
local radius = ability:GetAbilitySpecial("rot_radius")
local passive_stacks = caster:... | nilq/small-lua-stack | null |
--光と闇の洗礼
function c69542932.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c69542932.cost)
e1:SetTarget(c69542932.target)
e1:SetOperation(c69542932.activate)
c:RegisterEffect... | nilq/small-lua-stack | null |
require "lib.classes.class"
--------------------------------------------------------------------------------------------------------
-- class: State
-- The state of an automaton that executes functions when it makes a transition.
local State = class(function(self)
self.transitions = {}
self.transition_actions ... | nilq/small-lua-stack | null |
---@type Config
local Config = ECSLoader:ImportModule("Config")
local _Config = Config.private
---@type Stats
local Stats = ECSLoader:ImportModule("Stats")
---@type i18n
local i18n = ECSLoader:ImportModule("i18n")
function _Config:LoadDefenseSection()
return {
type = "group",
order = 4,
in... | nilq/small-lua-stack | null |
--[[
Pudge AI
]]
require("ai/ai_core_new")
behaviorSystem = {} -- create the global so we can assign to it
function Spawn(entityKeyValues)
thisEntity:SetContextThink("AIThink", AIThink, 1)
behaviorSystem = AICore:CreateBehaviorSystem({BehaviorNone, BehaviorPurification})
end
function AIThink() -- For some re... | nilq/small-lua-stack | null |
---
-- @module RxValueBaseUtils
-- @author Quenty
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))
local RxInstanceUtils = require("RxInstanceUtils")
local RxBrioUtils = require("RxBrioUtils")
local RxValueBaseUtils = {}
-- TODO: Handle default value/nothing there, instead of ... | nilq/small-lua-stack | null |
function Auctionator.ReagentSearch.DoTradeSkillReagentsSearch()
local recipeIndex = TradeSkillFrame.RecipeList:GetSelectedRecipeID()
local items = { C_TradeSkillUI.GetRecipeInfo(recipeIndex).name }
for reagentIndex = 1, C_TradeSkillUI.GetRecipeNumReagents(recipeIndex) do
local reagentName = C_TradeSkillUI.... | nilq/small-lua-stack | null |
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local AvatarEditorService = game:GetService("AvatarEditorService")
local Modules = script.Parent.Parent
local GrantAsset = require(Modules.AvatarExperience.AvatarEditor.Thunks.GrantAsset)
local GrantOutfit = re... | nilq/small-lua-stack | null |
function NethermineRavager_OnEnterCombat(Unit,Event)
Unit:RegisterEvent("NethermineRavager_Rend", 15000, 0)
Unit:RegisterEvent("NethermineRavager_RockShell", 18000, 0)
end
function NethermineRavager_Rend(Unit,Event)
Unit:FullCastSpellOnTarget(13443,Unit:GetClosestPlayer())
end
function NethermineRavager_RockShell(... | nilq/small-lua-stack | null |
function descriptor()
return {
title = "Smart Playlist Extender";
description = "Extends the playlist by files in last item's directory";
version = "0.2.1";
author = "thebamby/Tcc100";
capabilities = {}
}
end
function activate()
local playlistItems = vlc.playlist.get... | nilq/small-lua-stack | null |
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
RegisterNetEvent("esx:spyroktvogs")
AddEventHandler("esx:spyroktvogs", function()
local xPlayer = ESX.GetPlayerFromId(source)
local nome = xPlayer.getName()
local gruppo = xPlayer.getGroup()
local lavoro = xPlayer.job.name
local grado = xPla... | nilq/small-lua-stack | null |
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
dependency "vrp"
ui_page "NUI/panel.html"
files {
"NUI/panel.js",
"NUI/panel.html",
"NUI/panel.css",
"NUI/iphone.png",
"NUI/robinhood-logo.png",
}
client_scripts {
"lib/Tunnel.lua",
"lib/Proxy.lua",
"config.lua",
"clie... | nilq/small-lua-stack | null |
local spath = vmplugin.temp_dir
print ('Listing items of directory',spath)
local i = 0
for file in lfs.dir(spath) do
print ('-',file)
i = i + 1
end
return i
| nilq/small-lua-stack | null |
-----------------------------------------------
-- Example for normalizing IP addresses
-----------------------------------------------
-- code copied from Kong `utils` module
-- see http://github.com/Kong/kong and from
-- Penlight see https://github.com/stevedonovan/Penlight
local _M = {}
local gsub = string.gsub
l... | nilq/small-lua-stack | null |
AI_trace("LOADING KUSHAN UPGRADE INFO")
function DoResearchTechDemand_Kushan()
ResearchDemandSet( FIGHTERDRIVE, 10 )
ResearchDemandSet( SUPERCAPITALSHIPDRIVE, 4 )
ResearchDemandSet( IONCANNONS, 1 )
ResearchDemandSet( HEAVYGUNS, 1 )
if (Util_CheckResearch(FIGHTERCHASSIS)) and (GetRU() > 200) then
local demand ... | nilq/small-lua-stack | null |
return {
desc_get = "BOSS每20秒获得吸血buff所有攻击伤害都会转为自身血量持续10秒",
name = "BOSS每20秒获得吸血buff所有攻击伤害都会转为自身血量持续10秒",
init_effect = "",
time = 0,
color = "blue",
picture = "",
desc = "BOSS每20秒获得吸血buff所有攻击伤害都会转为自身血量持续10秒",
stack = 1,
id = 8511,
icon = 8511,
last_effect = "",
effect_list = {
{
type = "BattleBuffCastS... | nilq/small-lua-stack | null |
-- luacheck: globals vim
local sessions = require("impromptu.sessions")
local proxy = function(session)
local obj = {
session_id = session,
_debug = function(this)
print(vim.inspect(sessions[this.session_id]))
end
}
setmetatable(obj, {
__index = function(_, key)
local s = sessions[se... | nilq/small-lua-stack | null |
local status_ok, scrollbar = pcall(require, "scrollbar")
if not status_ok then
return
end
local colors = require("tokyonight.colors").setup()
scrollbar.setup({
handle = {
color = colors.bg_highlight,
},
marks = {
Search = { color = colors.orange },
Error = { color = colors.error },
Warn = { color = colors... | nilq/small-lua-stack | null |
function foo()
end
function add(a, b)
return a + b
end
function sum_and_difference(a, b)
return (a+b), (a-b)
end
function bar()
return 4, true, "hi"
end
function execute()
return cadd(5, 6);
end
function doozy(a)
x, y = doozy_c(a, 2 * a)
return x * y
end
mytable = {}
function mytable.foo()
re... | nilq/small-lua-stack | null |
local _M = {}
function _M.bind(func, ...)
local args = {...}
return function(...)
func(table.unpack(args), ...)
end
end
function _M.dump(value, dep)
dep = dep or ""
local ret = ""
if type(value) == "table" then
ret = ret .. "{\n"
for k, v in pairs(value) do
ret = string.format("%s%s\t[%s] = %s\n", ret,... | nilq/small-lua-stack | null |
local Guidance = ACF.RegisterGuidance("Infrared", "Anti-radiation")
if CLIENT then
Guidance.Description = "This guidance package will detect a contraption in front of itself and guide the munition towards it."
else
function Guidance:UpdateTarget(Missile)
local Position = Missile.Position
local Targets = AC... | nilq/small-lua-stack | null |
AuctionatorConfigShoppingFrameMixin = CreateFromMixins(AuctionatorPanelConfigMixin)
function AuctionatorConfigShoppingFrameMixin:OnLoad()
Auctionator.Debug.Message("AuctionatorConfigShoppingFrameMixin:OnLoad()")
self.name = AUCTIONATOR_L_CONFIG_SHOPPING_CATEGORY
self.parent = "Auctionator"
self:SetupPanel()
... | nilq/small-lua-stack | null |
object_mobile_dressed_bestinejobs_jasha = object_mobile_shared_dressed_bestinejobs_jasha:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_bestinejobs_jasha, "object/mobile/dressed_bestinejobs_jasha.iff")
| nilq/small-lua-stack | null |
pfUI:RegisterSkin("Battlefield", "vanilla:tbc", function ()
local rawborder, border = GetBorderSize()
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
StripTextures(BattlefieldFrame)
CreateBackdrop(BattlefieldFrame, nil, nil, .75)
CreateBackdropShadow(BattlefieldFrame)
Battle... | nilq/small-lua-stack | null |
insulate("Order:attack()", function()
require "init"
require "spec.mocks"
require "spec.asserts"
require "spec.orders.helper"
testSignature(Order.attack, {CpuShip():setFactionId(2)}, it, assert)
testHappyShipCase(Order.attack, function()
local enemy = CpuShip():setFactionId(2)
... | nilq/small-lua-stack | null |
-- Load config
local modules = {
'options',
'mappings',
'commands',
'plugins',
'looks',
'autocmd'
}
for i = 1, #modules, 1 do
pcall(require, modules[i])
end
| nilq/small-lua-stack | null |
local msgpack = require('colyseus.messagepack.MessagePack')
local Connection = require('colyseus.connection')
local protocol = require('colyseus.protocol')
local EventEmitter = require('colyseus.eventemitter')
local utils = require('colyseus.utils')
local decode = require('colyseus.serialization.schema.schema')
local... | nilq/small-lua-stack | null |
dofile("table_show.lua")
dofile("urlcode.lua")
JSON = (loadfile "JSON.lua")()
local urlparse = require("socket.url")
local http = require("socket.http")
local item_value = os.getenv('item_value')
local item_type = os.getenv('item_type')
local item_dir = os.getenv('item_dir')
local warc_file_base = os.getenv('warc_file... | nilq/small-lua-stack | null |
Klappa2 = LibStub("AceAddon-3.0"):NewAddon("Klappa2", "AceConsole-3.0") --"LibFuBarPlugin-3.0",
local _G = getfenv(0)
local L = LibStub("AceLocale-3.0"):GetLocale("Klappa2")
-- LDB
local ldb = LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("Klappa", {
type = "launcher",
icon = "Interface\\Icon... | nilq/small-lua-stack | null |
function Client_SaveConfigureUI(alert)
Mod.Settings.WastelandsPerTurn = numberInputField1.GetValue();
end
| nilq/small-lua-stack | null |
-- 20151026 mvh Created; based on nh_queryseries for table colors etc
-- 20151027 mvh Firefox compat
-- 20151206 mvh fix 1.4.17d compatibility
-- 20160124 mvh Added anonymize option; passed to all WADO text display and heading of table
-- 20160319 mvh Small fix in slope default
-- 20160717 mvh F... | nilq/small-lua-stack | null |
return function (db, limit, max)
local hashCache = {}
local count = 0
local realLoad = db.load
function db.load(hash)
local raw = hashCache[hash]
if raw then return raw end
raw = realLoad(hash)
local size = #raw
if size < limit then
count = count + size
if count > max then
... | nilq/small-lua-stack | null |
require("common/commonScene")
require("hall/activity/activityScene");
require("hall/activity/activityController");
require("common/messageBox");
local activity = require(ActivityViewPath .. "activity")
ActivityState = class(CommonState)
ActivityState.ctor = function(self)
self.m_controller = nil;
end
... | nilq/small-lua-stack | null |
-- @module table
module ("table", package.seeall)
--require "list" FIXME: allow require loops
-- FIXME: use consistent name for result table: t_? (currently r and
-- u)
-- @func sort: Make table.sort return its result
-- @param t: table
-- @param c: comparator function
-- @returns
-- @param t: sorted table
l... | nilq/small-lua-stack | null |
--[[
moneyFrame.lua
A money frame object
--]]
local ADDON, Addon = ...
local Cache = LibStub('LibItemCache-2.0')
local L = LibStub('AceLocale-3.0'):GetLocale(ADDON)
local MoneyFrame = Addon:NewClass('MoneyFrame', 'Frame')
MoneyFrame.Type = 'PLAYER'
--[[ Constructor ]]--
function MoneyFrame:New(parent)
local f =... | nilq/small-lua-stack | null |
-- inculdes
return {
width = 32,
height = 48,
greeting = 'Hello and welcome to {{teal}}The Test Level{{white}}!',
animations = {
default = {
'loop',{'1,1','11,1'},.5,
},
walking = {
'loop',{'1,1','2,1','3,1'},.2,
},
},
stare = true,
talk_items = {
{ ['text']='i am done ... | nilq/small-lua-stack | null |
require("iuplua")
counter = 0
function addCount()
counter = counter + 1
end
function getCount()
return counter
end
--********************************** Main *****************************************
txt_count = iup.text{value = getCount(), readonly = "YES", size = "60"}
btn_count = iup.button{title = "Count", s... | nilq/small-lua-stack | null |
object_ship_kimogilla_s01_tier10 = object_ship_shared_kimogilla_s01_tier10:new {
}
ObjectTemplates:addTemplate(object_ship_kimogilla_s01_tier10, "object/ship/kimogilla_s01_tier10.iff")
| nilq/small-lua-stack | null |
local utils = require ("data/scripts/libs/Utils")
require("data/scripts/libs/Context")
utils.enable_debug()
context:inst():put_state('scene', {})
context:inst():enable_dummy()
require ("data/scripts/inst/charas/Player")
local w = {}
p = player:ret(w)
print(p)
| nilq/small-lua-stack | null |
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by ttwings.
--- DateTime: 2018/11/1 10:14
---
town = {}
town[1] = {x = 0, y = 0, links = {2}}
town[2] = {x = 48, y = 0, opts = {name = "小镇1"},stats = {'4% Increased HP', 'hp_multiplier', 0.04}, links = {3}}
town[3] = {x = 96, y = 0, opts = {name = "小... | nilq/small-lua-stack | null |
local luaunit = require("luaunit")
local types = require("lualife.types")
local Point = require("lualife.models.point")
-- luacheck: globals TestPoint
TestPoint = {}
function TestPoint.test_new()
local point = Point:new(23, 42)
luaunit.assert_true(types.is_instance(point, Point))
luaunit.assert_is_number(poin... | nilq/small-lua-stack | null |
AddCSLuaFile()
local VehicleName = "FCV 12 Impala"
local EMV = {}
---CUSTOM COLORS---
local B = "BLUE"
local R = "RED"
local A = "AMBER"
local W = "WHITE"
local G = "GREEN"
local DR = "D_RED"
local CW = "C_WHITE"
local SW = "S_WHITE"
--------------------
local PA = "A"
local PB = "B"
local PCA = "CA"
local PTT =... | nilq/small-lua-stack | null |
-- This system should load/save data (using the appropriate system according to the configs)
-- Use a table/column-row system, each system/plugin can create a table and make it synchronizable/savable
-- Use types (similar to uac.command) to tell the type of each column and check the values being placed there
-- Mark a ... | nilq/small-lua-stack | null |
computed_vertexes = {}
computed_segments = {}
computed_colors = {}
local index1 = 0
local index2 = 1
local index3 = 2
local index4 = 3
for i=0,100 do
local x = math.random(0, 200)
local y = math.random(0, 100)
table.insert(computed_vertexes, {x-1,y-1,0})
table.insert(computed_vertexes, {x-1,y+1,0})
table.i... | nilq/small-lua-stack | null |
function onCreate()
-- background shit
makeLuaSprite('bg1', 'flowey/images/BGs/bg1', -600, -300);
setScrollFactor('bg1', 0.9, 0.9);
scaleObject('bg1', 1.2, 1.2);
makeLuaSprite('bg2', 'flowey/images/BGs/bg2', -600, -300);
setScrollFactor('bg2', 0.9, 0.9);
scaleObject('bg2', 1, 1);
makeLuaSprite('bg... | nilq/small-lua-stack | null |
test_run = require('test_run').new()
require('console').listen(os.getenv('ADMIN'))
local fio = require('fio')
local NAME = fio.basename(arg[0], '.lua')
-- Call a configuration provider
cfg = require('localcfg')
cfg.sharding['cbf06940-0790-498b-948d-042b62cf3d29'].replicas['3de2e3e1-9ebe-4d0d-abb1-26d301b84633'] = nil... | nilq/small-lua-stack | null |
-- init.lua
uart.setup(0,115200,8,0,1)
-- ls()
l = file.list()
for k,v in pairs(l) do
print("name: "..k..",size: "..v)
end
-- cat()
local f=...
print(args: ..f)
file.open(f, r)
print(file.read(EOF))
file.close()
-- list nearby APs
function listap(t)
for k,v in pairs(t) do
print(k.. : ..v)
end
end
wifi.sta... | nilq/small-lua-stack | null |
--[[
-- Orca, a free and open-source Roblox script hub.
-- This script was generated by ci/bundle.lua, and is not intended to be modified.
-- To view the source code, see the 'src' folder on GitHub!
--
-- Author: 0866
-- License: MIT
-- Version: __VERSION__
-- GitHub: https://github.com/richie0866/orca
--]]
-- Runtime... | nilq/small-lua-stack | null |
temp = 0
humid = 0
err = 0
timeFromBoot = 0
lastReadTime = 0
dofile("conf.lua")
tmr.alarm(0, 2000, 1, function()
timeFromBoot = tmr.time()
t,h = dofile("dht22.lua").read(4, true)
if t and h then
temp = t
humid = h
err = 0
else
err = 1
end
if err == 0 then
lastReadTime = timeFromBoot
end
end)... | nilq/small-lua-stack | null |
local Array2d = require "array2d"
local Graph = Object:extend()
function Graph:new()
self.matrix = Array2d()
self.vertices = {}
self.size = 0
end
function Graph:addVertice(id)
self.size = self.size + 1
self.vertices[self.size] = id
for i = 1, self.size do
self.matrix:set(self.size, i,... | nilq/small-lua-stack | null |
--[[--
key = -- key to be used with tempstore.pop(...) to regain the stored string
tempstore.save(
blob -- string to be stored
)
This function stores data temporarily. It is used to restore slot information after a 303 HTTP redirect. It returns a key, which can be passed to tempstore.pop(...) to... | nilq/small-lua-stack | null |
local M = {}
local config = require("core.utils").user_settings()
local opts = { noremap = true, silent = true }
local map = vim.api.nvim_set_keymap
-- Remap space as leader key
map("", "<Space>", "<Nop>", opts)
vim.g.mapleader = " "
vim.g.maplocalleader = " "
-- Normal --
-- Better window navigation
map("n", "<C-h... | nilq/small-lua-stack | null |
local g = vim.g
local utils = require 'utils'
local map = utils.map
map('n', '<leader>', "<cmd>WhichKey '<space>'<cr>", {silent = true})
map('n', '<localleader>', "<cmd>WhichKey '<,>'<cr>", {silent = true})
| nilq/small-lua-stack | null |
return NOTESKIN:LoadActor("DownLeft", "Ready Receptor") .. {}
| nilq/small-lua-stack | null |
SWEP.Base = "weapon_maw_base"
SWEP.Slot = 3
SWEP.PrintName = "P90"
SWEP.HoldType = "ar2"
SWEP.ViewModel = "models/weapons/v_smg_p90.mdl"
SWEP.WorldModel = "models/weapons/w_smg_p90.mdl"
SWEP.Primary.Sound = "Weapon.Fire_P90"
SWEP.Primary.Recoil = 0.6
SWEP.Primary.Damage = 17
SWEP.Primary.D... | nilq/small-lua-stack | null |
require 'torch'
require 'optim'
require 'rosenbrock'
require 'l2'
x = torch.Tensor(2):fill(0)
x,fx,i=optim.cg(rosenbrock,x,{maxIter=50})
print()
print('Rosenbrock test: compare with http://www.gatsby.ucl.ac.uk/~edward/code/minimize/example.html')
print()
print('Number of function evals = ',i)
print('x=');print(x)
p... | nilq/small-lua-stack | null |
local function printBits(x) print(string.format("%X", x)) end
printBits (bit32.bnot(0))
printBits (bit32.bnot(bit32.bnot(0)))
print (bit32.btest())
print (bit32.btest(0x10,0x20))
printBits (bit32.band())
printBits (bit32.band(0x11, 0x12, 0x13, 0x14))
printBits (bit32.bor())
printBits (bit32.bor(0x101, 0x202, 0x303... | nilq/small-lua-stack | null |
-- @Author:pandayu
-- @Version:1.0
-- @DateTime:2018-09-09
-- @Project:pandaCardServer CardGame
-- @Contact: QQ:815099602
local roleMgr = require "manager.roleMgr"
local CFriend = require "game.model.role.friend"
local _M = function(role,data)
if not data.id or type(data.id) ~= "number" then return 2 end
if not data... | nilq/small-lua-stack | null |
-- httpserver-init.lua
-- Part of nodemcu-httpserver, launches the server.
-- Author: Marcos Kirsch
-- Function for starting the server.
-- If you compiled the mdns module, then it will also register with mDNS.
local startServer = function(ip)
local conf = dofile('httpserver-conf.lua')
if (dofile("httpserver.lc"... | nilq/small-lua-stack | null |
#!/usr/bin/env lua
_RUNTESTS = true
dofile 'pak.lua'
math.randomseed(os.time())
T = nil
STATS = {
count = 0,
mem = 0,
trails = 0,
bytes = 0,
}
function check (mod)
assert(T[mod]==nil or T[mod]==false or type(T[mod])=='string')
local ok, msg = pcall(dofile, mod..'.lua')
if T[mod... | nilq/small-lua-stack | null |
slot0 = class("LotteryMediator", import("..base.ContextMediator"))
slot0.ON_LAUNCH = "LotteryMediator:ON_LAUNCH"
slot0.ON_SWITCH = "LotteryMediator:ON_SWITCH"
slot0.OPEN = "LotteryMediator:OPEN"
slot0.register = function (slot0)
slot0:bind(slot0.ON_LAUNCH, function (slot0, slot1, slot2, slot3, slot4)
if not slot0:g... | nilq/small-lua-stack | null |
function gadget:GetInfo()
-- loaded by default?
return {
name = "Com Counter",
desc = "Tells each team the total number of commanders alive in enemy allyteams",
author = "Bluestone",
date = "08/03/2014",
license = "Horses",
layer = 0,
enabled = true
}
end
--------------------------------... | nilq/small-lua-stack | null |
local _M = {}
local tablex = require "pl.tablex"
local data = {}
function _M.push(key)
data[key] = (data[key] or 0) + 1
end
function _M.pop()
local copy = tablex.copy(data)
data = {}
return copy
end
return _M
| nilq/small-lua-stack | null |
local vim = vim
local global=require('jw.global')
local lspconfig = require'lspconfig'
local lsp_status = require('lsp-status')
local log = require 'vim.lsp.log'
local util = require'jw.util'
local path = require'lspconfig/util'.path
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocu... | nilq/small-lua-stack | null |
-----------------------------------
-- Area: Southern SandOria [S]
-- NPC: Geltpix
-- !pos 154 -2 103 80
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigger(player,npc)
player:showText(npc, 7043); -- Don't hurt poor Geltpix! Geltpix's just a merchant from Boodlix's Empo... | nilq/small-lua-stack | null |
local redis = require "resty.redis"
local red = redis:new()
red:set_timeout(1000)
local ok, err = red:connect("127.0.0.1", 6379)
if not ok then
ngx.say("failed to connect: ", err)
return
end
ok, err = red:set("dog", "an animal")
if not ok then
ngx.say("failed to set dog: ", err)
end
ngx.say("set resu... | nilq/small-lua-stack | null |
-- Place this file into your %FARPROFILE%\Macros\scripts
-- Note! This is just an example of calling GuiMacro from Far Manager
-- Note! Ctrl+Wheel may be already binded in ConEmu Keys&Macro settings
-- Increase/decrease font size in ConEmu window with Ctrl+Wheel
local ConEmu = "4b675d80-1d4a-4ea9-8436-... | nilq/small-lua-stack | null |
local sceneManager = require 'sceneManager'
function love.load( ... )
sceneManager.changeScene(require 'game')
end
function love.update(dt)
sceneManager.currentScene.update(dt)
end
function love.draw()
sceneManager.draw()
end
function love.keypressed(key)
sceneManager.currentScene.keypressed(key)
end
funct... | nilq/small-lua-stack | null |
MSD.Language["tr"] = {
-- UI
lang_name = "Türkçe",
ok = "OK",
map = "Harita",
off = "Kapalı",
on = "Açık",
time_add = "Eklenecek zaman",
type = "Tür",
delay = "Gecikme",
cancel = "İptal",
enable = "Aktif Et",
model = "Model",
name = "İsim",
settings = "Ayarlar",
editor = "Düzenleyici... | nilq/small-lua-stack | null |
--[[
roblox script object on server
simple automated example of a single perceptron calculating a binary result using linear regression
first is a simple single control calculation showcasing learning
secondly runs a new perceptron with a larger control set reusing same training data to showcase
the amount of errors... | nilq/small-lua-stack | null |
--[[------------------------------------------------------------------
They Hunger theme
]]--------------------------------------------------------------------
-- create theme
local THEME = GSRCHUD.theme.create()
--[[ Colour ]]--
THEME:setColour(Color(255, 0, 0))
--[[ Custom element parameters ]]--
THEME:addPreDra... | nilq/small-lua-stack | null |
for k, v in next, lang do
if k ~= "en" then
table.merge(v, lang.en)
end
end | nilq/small-lua-stack | null |
--[[
################################################################################
#
# Copyright (c) 2014-2019 Ultraschall (http://ultraschall.fm)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), t... | nilq/small-lua-stack | null |
turret = class("turret")
local turretSheet = love.graphics.newImage("assets/gfx/images/turret.png")
function turret:initialize(x, y)
self.x = x
self.y = y
self.base = love.graphics.newQuad(0, 0, 15, 15, turretSheet:getWidth(), turretSheet:getHeight())
self.head = love.graphics.newQuad(15, 0, 15, 15, turretSheet:g... | nilq/small-lua-stack | null |
local L = LibStub:GetLibrary("AceLocale-3.0"):NewLocale("Grid2", "itIT")
if not L then return end
L["?"] = "?"
L["AFK"] = "AFK"
L["Beast"] = "Bestia"
L["Border"] = "Bordo"
L["By Class"] = "Per Classe"
L["By Class 1 x 25 Wide"] = "Per Classe 1 x 25"
L["By Class 25"] = "Per Classe 25"
L["By Class 2 x 15 Wide"... | nilq/small-lua-stack | null |
local isDebug=arg[#arg] == "-debug"
if isDebug then require("mobdebug").start() end
_traceback=debug.traceback
LG=love.graphics
LK=love.keyboard
Pow=require "lib/powlov/pow"
Gamera=require "lib/gamera/gamera"
Allen=Pow.allen
TSerial=require "lib/TSerial"
Serpent=require "lib/serpent/src/serpent"
Lume=Pow.lume
Moses=... | nilq/small-lua-stack | null |
--
-- Created by IntelliJ IDEA.
-- User: nander
-- Date: 21/04/2018
-- Time: 14:09
-- To change this template use File | Settings | File Templates.
--
local menu = {} -- previously: Gamestate.new()
menu.name = "shuffleDiscardPile"
function menu:enter(prev)
menu.prev = prev
-- setup entities here
menu.anima... | nilq/small-lua-stack | null |
-- Debug backend to show what the VFS is doing.
local abspath = vfs.abspath
return {
debug = function() -- stubs, not actually usable
local cwd = "/"
return {
write = function(loc, str) print("Write to "..abspath(loc, cwd).." with content: "..str) return true end,
read = function(loc) print("Reading "..abspa... | nilq/small-lua-stack | null |
fx_version "bodacious"
games {"gta5"}
lua54 'yes'
client_scripts {
"config.lua",
"client.lua"
}
server_scripts {
"config.lua",
"server.lua"
}
| nilq/small-lua-stack | null |
object_tangible_tcg_series8_decorative_bespin_sconce_on = object_tangible_tcg_series8_shared_decorative_bespin_sconce_on:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series8_decorative_bespin_sconce_on, "object/tangible/tcg/series8/decorative_bespin_sconce_on.iff") | nilq/small-lua-stack | null |
return {
file_os_conflict = {
aesfileencrypt = {
["0.1.3-1"] = {
current_os = "OSX",
from = "/Users/sp/PrjLocal/x86/luarockstree/lib/lua/5.1/AesFileEncrypt.so",
to = "/Users/sp/Dropbox/Prj/upkg/luarocksorg/package/aesfileencrypt/0.1.3-103/AesFileEncrypt/OSX/x86/-AesFileEncrypt.so"
... | nilq/small-lua-stack | null |
local subprocess = require'xcq.subprocess'
local Promise = require'cqueues.promise'.new
local utils = require'live-share.utils'
local image_processor = require'live-share.media.image_processor'
local thumbnail_config = require'live-share.config'.thumbnail
assert(image_processor.init(arg[0]))
assert(utils.program_is_a... | nilq/small-lua-stack | null |
-- Gkyl ------------------------------------------------------------------------
local Plasma = require "App.PlasmaOnCartGrid"
local prng = require "sci.prng"
local Mpi = require "Comm.Mpi"
local rank = Mpi.Comm_rank(Mpi.COMM_WORLD)
local rng = prng.mrg32k3a(rank+1234)
-- Constants
epsilon0 = 1.0
mu0 = 1.0
lightSpeed... | nilq/small-lua-stack | null |
--[[
TheNexusAvenger
Tests the FileSelectionFrame class.
--]]
local NexusUnitTesting = require("NexusUnitTesting")
local NexusGit = require(game:GetService("ServerStorage"):WaitForChild("NexusGit"))
local Directory = NexusGit:GetResource("NexusGitRequest.File.Directory")
local File = NexusGit:GetResource("NexusGitRe... | nilq/small-lua-stack | null |
--- src/terralib.lua.orig 2017-10-17 06:05:35 UTC
+++ src/terralib.lua
@@ -3366,12 +3366,12 @@ function terra.includecstring(code,cargs
local args = terra.newlist {"-O3","-Wno-deprecated","-resource-dir",clangresourcedirectory}
target = target or terra.nativetarget
- if (target == terra.nativetarget and ... | nilq/small-lua-stack | null |
-- CLIENTSIDE:
local frame
net.Receive( "f4menu", function()
if not IsValid( frame ) then
local frame = vgui.Create( "DFrame" )
frame:SetTitle( "DarkRP Menu" )
frame:SetSize( ScrW() * 0.75, ScrH() * 0.75 )
frame:Center()
frame:MakePopup()
end
end )
-- SERVERSIDE:
util.A... | nilq/small-lua-stack | null |
vim.g.floaterm_autoclose = 1
vim.g.floaterm_height = 0.25
vim.g.floaterm_wintype = 'float'
vim.g.floaterm_position = 'bottom'
vim.cmd('let g:floaterm_width=1.0')
| nilq/small-lua-stack | null |
local function isVowel(char)
local vowels = {"a", "e", "i", "o", "u"}
for index, vowel in pairs(vowels) do
if string.lower(char) == vowel then
return true
end
end
return false
end
local vowelsCount = 0
local consonantsCount = 0
local str = "abcdefghijklmnopqrstuvwxyz"
fo... | nilq/small-lua-stack | null |
---
-- @author wesen
-- @copyright 2019-2020 wesen <wesen-ac@web.de>
-- @release 0.1
-- @license MIT
--
local TestCase = require "wLuaUnit.TestCase"
local tablex = require "pl.tablex"
---
-- Checks that the StringRenderer works as expected.
--
-- @type TestStringRenderer
--
local TestStringRenderer = TestCase:extend(... | nilq/small-lua-stack | null |
local GLayer = require("graphic.core.GLayer");
local ProtocolLayer = class("ProtocolLayer", GLayer)
function ProtocolLayer:ctor()
GLayer.ctor(self)
end
function ProtocolLayer:init()
GLayer.init(self)
local go = self:loadUiPrefab("Sandbox/Prefabs/UI/gm.prefab")
local t = self:getInfo()
local btn =... | nilq/small-lua-stack | null |
local dap = require('dap')
dap.adapters.lldb = {
type = 'executable',
command = '/usr/local/bin/lldb-vscode', -- adjust as needed
name = "lldb"
}
dap.configurations.cpp = {
{
name = "Launch",
type = "lldb",
request = "launch",
--[[ program = function()
return vim.... | nilq/small-lua-stack | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.