content stringlengths 0 1.05M | origin stringclasses 2
values | type stringclasses 2
values |
|---|---|---|
local qconsts = require 'Q/UTILS/lua/q_consts'
local qc = require 'Q/UTILS/lua/q_core'
local lVector = require 'Q/RUNTIME/VCTR/lua/lVector'
local cmem = require 'libcmem'
local get_ptr = require 'Q/UTILS/lua/get_ptr'
local ffi = require 'ffi'
local record_time = require 'Q/UTILS/lua/record_time'
local func... | nilq/small-lua-stack | null |
primes = {2, 3}
m = 5
function isPrime(a)
local b = 1
while a % primes[b] > 0 do
if primes[b] * primes[b] > a then
primes[#primes + 1] = a
return true
end
b = b + 1
end
return false
end
function primeSeq()
local p0, i = 1, 0
return function()
if p0 <= #primes then
... | nilq/small-lua-stack | null |
local fs = require('efmls-configs.fs')
-- TODO: Not properly implemented yet
local linter = 'reek'
local args = 'exec reek --format txt --force-exclusion --stdin-filename ${INPUT}'
local command = string.format('%s %s', fs.executable('bundle', fs.Scope.BUNDLE), args)
return {
prefix = linter,
lintCommand = comman... | nilq/small-lua-stack | null |
local MathEx = {}
---@param value number
---@param min number
---@param max number
---@return number
function MathEx.clamp(value, min, max)
if value < min then
return min
end
if value > max then
return max
end
return value
end
---@param value number
---@return number
function Mat... | nilq/small-lua-stack | null |
require "utils.NumberUtils"
require "view.CocosView"
require "scene.MainScene"
require "scene.DemoScene"
require "scene.TerisScene"
local _scene = nil
local function updateScene()
if _scene then
_scene:update(0.04)
end
end
local updateSchedule = cc.Director:getInstance():getSchedule... | nilq/small-lua-stack | null |
BrushManagers = LCS.class{}
function BrushManagers:init()
self.brushNameMapping = {}
end
function BrushManagers:GetBrushManager(brushName)
if not self.brushNameMapping[brushName] then
self.brushNameMapping[brushName] = BrushManager()
end
return self.brushNameMapping[brushName]
end
function Br... | nilq/small-lua-stack | null |
--[[-----------------------------------------------------------------------
Categories
---------------------------------------------------------------------------
The categories of the default F4 menu.
Please read this page for more information:
https://darkrp.miraheze.org/wiki/DarkRP:Categories
In case that page can... | nilq/small-lua-stack | null |
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)
combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_PVP)
local area = createCombatArea(AREA_W... | nilq/small-lua-stack | null |
local K = unpack(KkthnxUI)
local Module = K:GetModule("AurasTable")
if K.Class ~= "HUNTER" then
return
end
local list = {
["Player Aura"] = { -- 玩家光环组
{ AuraID = 136, UnitID = "pet" }, -- 治疗宠物
{ AuraID = 19577, UnitID = "pet" }, -- 胁迫
{ AuraID = 160058, UnitID = "pet" }, -- 厚皮
{ AuraID = 90361, UnitID = "pl... | nilq/small-lua-stack | null |
local L = BigWigs:NewBossLocale("Yan-Zhu the Uncasked", "deDE")
if not L then return end
if L then
L.summon_desc = "Warnen wenn Yan-Zhu einen Hefigen Braubierlementar beschwört. Diese können |cff71d5ffFermentierung|r wirken, um den Boss zu heilen."
end
| nilq/small-lua-stack | null |
-- Copyright (c) 2016 Luke San Antonio
-- All rights reserved.
local ffi = require("ffi")
local rc = require("redcrane")
local scene = {}
function scene.make_scene()
local eng = rc.engine
local sc = {}
sc._scene_ptr = ffi.gc(ffi.C.redc_make_scene(eng), ffi.C.redc_unmake_scene)
function sc:add_ca... | nilq/small-lua-stack | null |
local mod = DBM:NewMod("Brew", "DBM-WorldEvents", 1)
local L = mod:GetLocalizedStrings()
mod:SetRevision(("$Revision: 15084 $"):sub(12, -3))
--mod:SetCreatureID(15467)
--mod:SetModelID(15879)
mod:SetReCombatTime(10)
mod:SetZone(DBM_DISABLE_ZONE_DETECTION)
mod:RegisterCombat("combat")
mod:RegisterEvents(
... | nilq/small-lua-stack | null |
-- Play DSM segment (desmume 0.9.5 or later)
-- * mic and reset are NOT supported.
-- * movie playback always starts from NOW, not reset or snapshot.
-- This script might help to merge an existing movie with slight timing changes.
require("dsmlib")
local kmv_path = "input.dsm"
local kmv_framecount = 1 -- 1 = firs... | nilq/small-lua-stack | null |
return {
Name = 4,
Number = 4,
Reserved = 4,
Shebang = 4,
Skip = 4,
String = 4,
kw = 4,
report_error = 1,
symb = 4,
syntaxerror = 1,
token = 4,
}
| nilq/small-lua-stack | null |
--[[
MIT License
Copyright (c) 2020 Ryan Ward
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, di... | nilq/small-lua-stack | null |
util.AddNetworkString( "UpdateTheClient" )
util.AddNetworkString( "UpdateTheClient2" )
local round = {}
team.SetUp( 1, "ALIVE", Color( 255, 255, 0 ) )
team.SetUp( 2, "DEAD", Color( 255, 0, 0 ) )
roundBreak = 10
roundTime = 600
roundTimeLeft = 9999999
roundBreaking = false
roundtext = "Waiting"
players = 0
GodModeText... | nilq/small-lua-stack | null |
--[[
The Rave It Out Season 2 group select
Written by Rhythm Lunatic
How to put this in your theme:
1. Do not attempt. This is not for beginners. It is very compilicated.
2. It requires either SM-RIO or the latest SM nightly. No, 5.1-new beta 3 won't work. Compile from source.
3. Copy this file, add item_scroll... | nilq/small-lua-stack | null |
--------------------------------------------------------------------------------
--- Head: Require
--
-- Standard awesome library
local gears = require('gears')
local awful = require('awful')
require("awful.autofocus")
-- Widget and layout library
local wibox = require('wibox')
--
-- Tail: Require
----------------... | nilq/small-lua-stack | null |
local sX, sY = guiGetScreenSize()
local bar = {}
--bar[0] = {t = "Press Z: House Info", r = 255, g = 255, b = 0}
--bar[1] = {t = "Press N: House Rob", r = 255, g = 0, b = 0}
function add(key, text, red, green, blue, ind)
if (not text or not red or not green or not blue) then return end
for i, v in pairs(bar) do
i... | nilq/small-lua-stack | null |
require 'oop'
local Animal = class(function(cls)
local staticText = 'Creature'
local getStaticText = function()
return staticText
end
-- static
cls.getStaticText = getStaticText
return {
init = function(inner, self, params)
--REQUIRED: params
--REQUIRED: params.name
--REQUIRED: params.color
... | nilq/small-lua-stack | null |
NPC = Class{__includes = Entity}
function NPC:init(def)
Entity.init(self, def)
self.text = "Hi, I'm an NPC, demonstrating some dialogue! Isn't that cool??"
end
--[[
Function that will get called when we try to interact with this entity.
]]
function NPC:onInteract()
stateStack:push(DialogueState(self.t... | nilq/small-lua-stack | null |
vim.wo.spell = true
vim.wo.number = false
vim.wo.relativenumber = false
| nilq/small-lua-stack | null |
help(
[[
This module loads Mono 4.2.1 into the environment. Mono is a software platform
designed to allow developers to easily create cross platform applications. It is
an open source implementation of Microsoft's .NET Framework based on the ECMA
standards for C# and the Common Language Runtime.
]])
whatis("Loads the... | nilq/small-lua-stack | null |
---------------------------------------------------------------------------
--
-- Settings
--
--
--
---------------------------------------------------------------------------
-- Get option updates from the server
addEvent ( "race_ghost.updateOptions", true )
addEventHandler('race_ghost.updateOptions', resourceRoot,
... | nilq/small-lua-stack | null |
--
-- moonson
--
-- Copyright (c) 2016-2017, Florian Keßeler
--
-- This library is free software; you can redistribute it and/or modify it
-- under the terms of the MIT license. See LICENSE for details.
--
package.path = "../?.lua"
local json = require "moonson"
local console = {
}
console.reset = "\27[0m"
console.re... | nilq/small-lua-stack | null |
local md5 = require "md5"
local socket = require "socket"
utils = {}
function utils.get_normal_authenticator(clientip, nasip, macaddr, timestamp, secretkey)
return string.upper(md5.sumhexa(clientip .. nasip .. macaddr .. timestamp .. secretkey))
end
function utils.get_vcode_authenticator(version, clientip, nasip, ... | nilq/small-lua-stack | null |
--// Initialization
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local CollectionService = game:GetService("CollectionService")
local __Alarms = CollectionService:GetTagged("Panic_Alarms")
local __Terminals = CollectionService:GetTagged("Panic Terminals")
local Alert_System = workspace:WaitForChild... | nilq/small-lua-stack | null |
local mvm = require 'arken.mvm'
local cookie = require 'arken.net.cookie'
local test = {}
test['should return __gads'] = function()
local buffer = os.read(mvm.path() .. "/tests/lib/arken/net/cookie/1-example.cookie")
local result = cookie.parse(buffer)
assert(result.__gads == "ID=65db397af496b42f:T=14597845... | nilq/small-lua-stack | null |
local skynet = require "skynet"
local runconf = require(skynet.getenv("runconfig"))
local servconf = runconf.service
local M = {}
local agentpool = {}
local agentpool_num = 0
local function init()
local node = skynet.getenv("nodename")
for i,v in pairs(servconf.agentpool) do
if node == v.node then
table.ins... | nilq/small-lua-stack | null |
workspace "Notepad"
architecture "x86_64"
startproject "Main"
configurations { "Debug", "Release" }
flags { "MultiProcessorCompile" }
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
group "Tools"
include "vendor/premake"
group ""
include "Main"
include "Arithmetic" | nilq/small-lua-stack | null |
-- title: RLE Demo
-- author: @josefnpat
-- desc: Runtime Length Encoding Demo
-- script: lua
rle = {}
rle.plookup = "abcdefghijklmnop"
rle.clookup = [[-!"#$%()*,./:;?[^_{}+<=>0123456789qrstuvwxyz]]
rle.indexof = function(s,c)
local ret=-1
for i=1,#s do
if (string.sub(s,i,i)==c) then
return i
end
... | nilq/small-lua-stack | null |
--***********************************************************
--** THE INDIE STONE **
--** Author: turbotutone **
--***********************************************************
---@class ISInventoryMenuElements
ISInventoryMenuElements = ISInventoryMenuElements or {};
fu... | nilq/small-lua-stack | null |
project "cppsharp-quickjs-runtime"
files { "" } | nilq/small-lua-stack | null |
------------------ Object Functions ------------------
function GetClosestObject(filter, coords)
local objects = GetObjects()
local closestDistance = -1
local closestObject = -1
local filter = filter
local coords = coords
if type(filter) == 'string' then
if filter ~= ''... | nilq/small-lua-stack | null |
return {'fameus','familiaal','familiaar','familiair','familiale','familiariseren','familiariteit','familie','familieaangelegenheid','familiealbum','familiearchief','familieband','familiebedrijf','familieberaad','familiebericht','familieberichten','familiebescheiden','familiebetrekking','familiebezit','familiebezoek','f... | nilq/small-lua-stack | null |
LAnimSystem = SimpleClass(LSystem)
function LAnimSystem:__init_self()
self.subscibe = LCompType.Animator
end
function LAnimSystem:__init()
end
function LAnimSystem:onUpdate(lst)
for k,v in pairs(lst) do
local isNeed = v:isNeedUpdate()
if isNeed then
local entity =... | nilq/small-lua-stack | null |
--SnowArea = GetEntireMapRect()
NP = true --新手保护
InGame = true --游戏环境(不在录像模式中)
IO = true --物品唯一
MH = {} --MH检测点
MH.temp = GetRectCenter(gg_rct_MH)
JC = {} --节操
JC[2] = 100
JC[3] = 100
SI = {} --是否显示队友头像
for i = 0,11 do
SI[i] = true
end
Her... | nilq/small-lua-stack | null |
--[[
------------------------------------
Description: HPC Status Timer, Phasor V2+
Copyright (c) 2016-2018
* Author: Jericho Crosby
* IGN: Chalwk
* Written and Created by Jericho Crosby
-----------------------------------
]]--
function GetRequiredVersion()
return 200
end
function OnScriptLoad(processid, game, per... | nilq/small-lua-stack | null |
local uv = require("uv")
local SOCK = "/tmp/echo.sock"
local server = uv.new_pipe(false)
local ret, err, code = server:bind(SOCK)
-- if file already exists, remove it first and try again
if not ret and code == "EADDRINUSE" then
local fs = require("fs")
fs.unlinkSync(SOCK)
_, err, _ = server:bind(SOCK)
assert... | nilq/small-lua-stack | null |
DEFINE_BASECLASS("ma2_proj")
AddCSLuaFile()
ENT.Base = "ma2_proj"
ENT.TurnRate = 45
function ENT:SetupDataTables()
BaseClass.SetupDataTables(self)
self:NetworkVar("Entity", 0, "Tracked")
self:NetworkVar("Vector", 1, "TargetPos")
end
function ENT:Process(delta)
local ent = self:GetTracked()
if IsVali... | nilq/small-lua-stack | null |
--[[
Name: LibTourist-3.0
Revision: $Rev: 211 $
Author(s): Odica (maintainer), originally created by ckknight and Arrowmaster
Documentation: https://www.wowace.com/projects/libtourist-3-0/pages/api-reference
SVN: svn://svn.wowace.com/wow/libtourist-3-0/mainline/trunk
Description: A library to provide information about ... | nilq/small-lua-stack | null |
local mod = get_mod("show_potion_type")
--[[
Show Potion Type, by Grundlid.
--]]
mod:hook(_G, "Localize", function (func, id, ...)
if string.find(id, "DONT_LOCALIZE_") == 1 then
return string.sub(id, 15)
end
return func(id, ...)
end)
mod:hook(GenericUnitInteractorExtension, "interaction_description", function ... | nilq/small-lua-stack | null |
local writeProfile = function (profile)
local hfile = love.filesystem.newFile("profile.lua", "w")
if hfile == nil then return end
hfile:write(profile)
hfile:close()
end
local findProfile = function ()
return love.filesystem.isFile("profile.lua")
end
local recoverProfile = function ()
local c... | nilq/small-lua-stack | null |
SCREEN_WIDTH, SCREEN_HEIGHT = guiGetScreenSize()
DEBUG = true
DxElements = {}
DxHostedElements = {}
DxInfo = {
draggingElement = false
}
DxTypes = {
"DxElement",
"DxBlank",
"DxCheckbox",
"DxCircle",
"DxImage",
"DxInput",
"DxRadioButton",
"DxSlider",
"DxText",
"DxWindow",
"DxButton"
}
DxMethods = {}
Dx... | nilq/small-lua-stack | null |
--[[
Tower Defense AI
These are the valid orders, in case you want to use them (easier here than to find them in the C code):
DOTA_UNIT_ORDER_NONE
DOTA_UNIT_ORDER_MOVE_TO_POSITION
DOTA_UNIT_ORDER_MOVE_TO_TARGET
DOTA_UNIT_ORDER_ATTACK_MOVE
DOTA_UNIT_ORDER_ATTACK_TARGET
DOTA_UNIT_ORDER_CAST_POSITION
DOTA_UNIT_ORDER_CAS... | nilq/small-lua-stack | null |
local Maph = require('maph')
local floor, min, max = math.floor, math.min, math.max
local Map = {}
Map.__index = Map
local function new_array(size, value)
local arr = {}
for i = 1, size do arr[i] = value end
return arr
end
--- Returns a new `Map` with the specified size.
function Map.new(assets, width, h... | nilq/small-lua-stack | null |
local lush = require('lush')
local colors = {
black = "#282c34",
black_dark = "#22262e",
red = "#e06c75",
green = "#98c379",
yellow = "#e5c07b",
yellow_dark = "#d19a66",
blue = "#61afef",
magenta = "#c678dd",
cyan = "#56b6c2",
white = "#c0c0c0",
gray = "#4c4f55",
comment_gray = "#5c6370",
sel... | nilq/small-lua-stack | null |
---
-- @description Driver for 4-digit 7-segment displays controlled by TM1637 chip
-- @date September 08, 2016
-- @author ovoronin
---
--------------------------------------------------------------------------------
local M = {}
local I2C_COMM1 = 0x40
local I2C_COMM2 = 0xC0
local I2C_COMM3 = 0x80
local cmd_power_on... | nilq/small-lua-stack | null |
ys = ys or {}
slot1 = ys.Battle.BattleDataFunction
slot2 = class("BattleScoreBarView")
ys.Battle.BattleScoreBarView = slot2
slot2.__name = "BattleScoreBarView"
slot2.Ctor = function (slot0, slot1)
slot0._go = slot1
slot0._tf = slot1.transform
slot0:init()
end
slot2.init = function (slot0)
slot0._scoreTF = slot0.... | nilq/small-lua-stack | null |
--- A fancy looking input with a new read function, which includes a limit for the size.
-- @module[kind=component] input
local args = { ... }
local path = fs.combine(args[2], "../../")
local input = {}
local common = require("/" .. fs.combine(path, "lib", "common"))
local inputs = {}
local activeInput
--- Basicly,... | nilq/small-lua-stack | null |
translations.en = {
welcome = "<br><N><p align='center'>Welcome to <b><D>#castle</D></b> - King`s living lounge and lab<br>Report any bugs or new features to <b><O>King_seniru</O><G><font size='8'>#5890</font></G></b><br><br>Type <b><BV>!modes</BV></b> to check out submodes of this module</p></N><br>",
modestit... | nilq/small-lua-stack | null |
-- TÖVE Demo: Zoom.
-- (C) 2018 Bernhard Liebl, MIT license.
local tove = require "tove"
require "assets/tovedemo"
local rabbit = love.filesystem.read("assets/monster_by_mike_mac.svg")
local function newRabbit()
-- make a new rabbit graphics, prescaled to 200 px
local graphics = tove.newGraphics(rabbit)
graphics:... | nilq/small-lua-stack | null |
--Credtis: PINGGIN AND DavKat, Shulepin
--Incluindo Files do Yasuo
IncludeFile("Lib\\TOIR_SDK.lua")
IncludeFile("Lib\\DamageLib")
--Classes
Yasuo = class()
function Yasuo:__init()
SetLuaCombo(true)
SetLuaLaneClear(true)
W_SPELLS = { -- Yea boiz and grillz its all right here.......
... | nilq/small-lua-stack | null |
local garageMarker
addEvent("dpMarkers.use", false)
local function updateGarageMarker()
local houseLocation = getPlayerHouseLocation(localPlayer)
if not houseLocation then
return
end
garageMarker.position = houseLocation.garage.position - Vector3(0, 0, 0.4)
end
-- Перемещение маркера гаража при покупке/продаже ... | nilq/small-lua-stack | null |
local Class = require('./utils/class')
local VK = require('./vk')
local Queue = require('./queue')
local APIWrapper = require('./api_wrapper')
local LongPoll = require('./longpoll')
local Router = require('./router')
local logger = require('./utils/logger')
local Bot = Class{}
function Bot:init(options)
if typ... | nilq/small-lua-stack | null |
-- ============================================================================================== --
--- ## layout.lua
-- A simple but powerful device and display-size independent layout manager for the Corona SDK.
-- **OVERVIEW**
-- The layout manager makes it easy to create *regions*, rectangular areas
-- ... | nilq/small-lua-stack | null |
#!/usr/bin/env tarantool
test = require("sqltester")
test:plan(25)
--!./tcltestrunner.lua
-- 2010 August 27
--
-- The author disclaims copyright to this source code. In place of
-- a legal notice, here is a blessing:
--
-- May you do good and not evil.
-- May you find forgiveness for yourself and forgive others... | nilq/small-lua-stack | null |
local _G=_G
local unpack=unpack
local AddOn, Engine = ...
local Resolution = select(1, GetPhysicalScreenSize()).."x"..select(2, GetPhysicalScreenSize())
local Windowed = Display_DisplayModeDropDown:windowedmode()
local Fullscreen = Display_DisplayModeDropDown:fullscreenmode()
Engine[1] = CreateFrame("Frame")
Engine[2... | nilq/small-lua-stack | null |
--Explosive
function explosivesmall(data)
return {
type = "projectile",
ammo_category = "explosive-rocket",
cooldown = data.cooldown,
range = data.range,
projectile_creation_distance = 0.5,
damage_modifier = data.damage_modifier,
warmup = 5,
ammo_type ... | nilq/small-lua-stack | null |
local fstore = require('nle.func-store')
--[[
-- Example spec:
-- {
-- fn = ...,
-- args = ...
-- }
--
--
--]]
local function args_to_vim(fargs)
local out = ""
for ak, av in pairs(fargs) do
if ak == 'complete' and type(av) == 'function' then
local info = debug.getinfo(av)
out ... | nilq/small-lua-stack | null |
process_version = "v1.0.1"
local Action_project = {
{"[1],[SLEEP],[3],[],[]"},
{"[1],[TOUCH],[home,0,2],[],[<业务输入_P>]"},
}
local Action_ject = {
{"[1],[input],[业务逻辑处理],[],[检查输入是否丢失_J]"},
} | nilq/small-lua-stack | null |
package.path = package.path .. ";data/scripts/lib/?.lua"
local config = include("data/config/trade_manager_config")
if config.debug then
function execute(playerIndex, commandName)
local player = Player(playerIndex)
broadcastInvokeClientFunction("reloadTradeManager")
return 0, "executed", ""
end
functi... | nilq/small-lua-stack | null |
-- Project class
-- services
local CollectionService = game:GetService("CollectionService")
-- constants
local TAG_PREFIX = ".Rofresh_"
local CONTAINER_NAME = "init"
-- utility functions
local function existsIn(array, value)
for i = 1, #array do
if value == array[i] then
return true
end
end
return false
en... | nilq/small-lua-stack | null |
return {
name = "doh.dns.sb",
label = _("DNS.SB"),
resolver_url = "https://doh.dns.sb/dns-query",
bootstrap_dns = "185.222.222.222,185.184.222.222",
http2_only = true,
help_link = "https://dns.sb/doh/",
help_link_text = "DNS.sb"
}
| nilq/small-lua-stack | null |
-- -*- coding:utf-8 -*-
--- mysql 辅助函数.
-- 使用 pl.class 封装了 mysql 数据库的连接和释放。
-- @classmod mysql_helper
-- @author:phenix3443@gmail.com
local cjson = require("cjson.safe")
local mysql = require("resty.mysql")
local class = require("pl.class")
local M = class()
--- mysql 实例初始化函数.
-- 与 mysql 数据库建立连接,该函数不需要手动调用。
-- @para... | nilq/small-lua-stack | null |
--deadlock loaders integration
if deadlock_loaders then
deadlock_loaders.create({
tier = 4,
transport_belt = "nuclear-transport-belt",
underground_belt = "nuclear-underground-belt",
splitter = "nuclear-splitter",
colour = {r = 0, g = 255, b = 0},
ingredients = {
{"nuclear-metal", 2},
{"iron-gear-whee... | nilq/small-lua-stack | null |
local i18n = require 'core.i18n'
local json = require 'cjson'
local pretty = require 'core.pretty'
local testcases_path = 'spec/validation/rules/'
local testcases = {
'bytes.json',
'compare.json',
'email.json',
'empty.json',
'fields.json',
'length.json',
'nilable.json',
'nonempty.json',... | nilq/small-lua-stack | null |
local M = { }
TurtleTool=M
function M.warnning()--warnning function
print("Error!!!")
end
--basic movement function--start
function M.moveForwardByDig()
turtle.dig()
turtle.forward()
turtle.suck()
end
function M.moveBackByDig()
turtle.turnLeft()
turtle.turnLeft()
turtle.dig()
... | nilq/small-lua-stack | null |
--
-- PERFTEST.LUA Copyright (c) 2007-08, Asko Kauppi <akauppi@gmail.com>
--
-- Performance comparison of multithreaded Lua (= how much ballast does using
-- Lua Lanes introduce)
--
-- Usage:
-- [time] lua -lstrict perftest.lua [threads] [-plain|-single[=2..n]] [-time] [-prio[=-2..+2[,-2..+2]]]
--
-- ... | nilq/small-lua-stack | null |
local staffService = false
local NoClip = false
local ShowName = false
local invisible = false
local staffRank = nil
local colorVar = nil
local selected = nil
local isSubMenu = {[false] = { RightLabel = "~b~Éxecuter ~s~→→" },[true] = { RightLabel = "~s~→→" }}
local stringText = {[true] = "~g~ON~s~",[false] = "~r~OFF~s~... | nilq/small-lua-stack | null |
local Mob = require('mob')
local max = math.max
local Particle = {}
Particle.__index = Particle
setmetatable(Particle, {__index = Mob})
function Particle.new(alive_time)
local self = setmetatable(Mob.new(), Particle)
self.tags.particle = true
--- How many seconds the particle is alive for.
self.alive_... | nilq/small-lua-stack | null |
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel("models/gmodz/misc/backpack.mdl")
self:SetSolid(SOLID_VPHYSICS)
self:PhysicsInit(SOLID_VPHYSICS)
self:SetCollisionGroup(COLLISION_GROUP_WEAPON)
self:SetUseType(SIMPLE_USE)
local physObj = self:Ge... | nilq/small-lua-stack | null |
local led = {}
led.pin_red = nil
led.pin_green = nil
led.pin_blue = nil
led.tick = 600
led.blink_pin = nil
led.freq = nil
led.freq_cnt = 0
led.timer_loop = nil
led.timer = tmr.create()
led.init = function()
if (led.pin_green) then gpio.mode(led.pin_green,gpio.OUTPUT) end
if (led.pin_blue) then gpio.mode(led.pin... | nilq/small-lua-stack | null |
-- menu 菜单
local Api = require("coreApi")
local json = require("json")
local http = require("http")
function ReceiveFriendMsg(CurrentQQ, data)
return 1
end
function ReceiveGroupMsg(CurrentQQ, data)
local menu = [[{
"app": "com.tencent.miniapp",
"desc": "",
"view": "notification",
"ver": "0.0.0.1",
"p... | nilq/small-lua-stack | null |
-- two
-- two example application
--function uses_examples()
-- includedirs {
-- path.join(TWO_DIR, "example"),
-- }
--end
--two.examples = {}
--two.examples.all = module(nil, "example", TWO_DIR, "example", nil, uses_examples, false, {}, true)
if _OPTIONS["renderer-bgfx"] then
--two_binary("... | nilq/small-lua-stack | null |
--[[
Copyright 2012-2020 João Cardoso
PetTracker is distributed under the terms of the GNU General Public License (Version 3).
As a special exception, the copyright holders of this addon do not give permission to
redistribute and/or modify it.
This addon is distributed in the hope that it will be useful,
but WITHOUT A... | nilq/small-lua-stack | null |
local titleScene = class("titleScene", function()
return display.newScene("titleScene")
end)
function titleScene:ctor()
display.newSprite("bg.png")
:pos(display.cx,display.cy)
:addTo(self)
cc.ui.UIPushButton.new({normal = "btn_start.png",pressed = "btn_start.png"})
:onButtonClicked(... | nilq/small-lua-stack | null |
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include('shared.lua')
function ENT:Initialize()
self.Entity:SetModel("models/weapons/w_snowball_thrown.mdl");
//self.Entity:PhysicsInit(SOLID_VPHYSICS);
self.Entity:SetMoveType(MOVETYPE_VPHYSICS);
self.Entity:SetSolid(SOLID_VPHYSICS);
self.Entity:SetCollision... | nilq/small-lua-stack | null |
-- // Information
--[[
This can be used to identify fellow exploiters in your game. Make sure your message is secure or regular users may be false flagged.
The way this works is whenever you execute this script, you chat out the secret.
If another user picks up on that secret, they also chat the secret.
... | nilq/small-lua-stack | null |
-- Code based on https://github.com/lipp/lua-websockets
local bit = require'pegasus.plugins.websocket.bit'
local function prequire(m)
local ok, err = pcall(require, m)
if ok then return err, m end
return nil, err
end
local function orequire(...)
for _, name in ipairs{...} do
local mod = prequire(name)
... | nilq/small-lua-stack | null |
local playerService = game.Players
local dataStore = game:GetService("DataStoreService"):GetDataStore("person person is")
local playerData = require(script.Data)
local compression = require(script.Compression)
local clockService = require(game.ReplicatedStorage.Modules.Util.ClockService)
local autoSave = 60
local ses... | nilq/small-lua-stack | null |
local animx={
animObjs={} --the animation objects that were created
}
local LIB_PATH=...
local function lastIndexOf(str,char)
for i=str:len(),1,-1 do if str:sub(i,i)==char then return i end end
end
local function fileExists(url)
return love.filesystem.getInfo(url) and
love.filesystem.getInfo(url).ty... | nilq/small-lua-stack | null |
---@class SpeedControlsHandler
SpeedControlsHandler = {};
SpeedControlsHandler.previousSpeed = 1;
SpeedControlsHandler.onKeyPressed = function(key)
if isClient() then
return;
end
if not MainScreen.instance or not MainScreen.instance.inGame or MainScreen.instance:getIsVisible() then
return
end
if... | nilq/small-lua-stack | null |
return {
postgres = {
up = [[
CREATE INDEX IF NOT EXISTS sessions_ttl_idx ON sessions (ttl);
]],
},
cassandra = {
up = [[]],
},
}
| nilq/small-lua-stack | null |
-- This file is automatically generated, do not edit!
-- Path of Building
--
-- Dexterity support gems
-- Skill data (c) Grinding Gear Games
--
local skills, mod, flag, skill = ...
skills["SupportAddedColdDamage"] = {
name = "Added Cold Damage",
description = "Supports any skill that hits enemies.",
color = 2,
bas... | nilq/small-lua-stack | null |
------------------------------------------------
-- Copyright © 2013-2020 Hugula: Arpg game Engine
--
-- author pu
------------------------------------------------
local table = table
local pairs = pairs
local ipairs = ipairs
local string_format = string.format
local table_insert = table.insert
local table_remove =... | nilq/small-lua-stack | null |
-- map search
local worldSearchModule = {}
local screenWidth = love.graphics.getWidth()
local screenHeight = love.graphics.getHeight()
local utf8 = require("utf8")
local importUI = require("UI")
function worldSearchModule.createWorldDirectoryIfNil()
local info = love.filesystem.getInfo( "worldData", info )
if in... | nilq/small-lua-stack | null |
local settings = {
flib_dictionary_levels_per_batch = {
name = "flib-dictionary-levels-per-batch",
default_value = 15,
minimum_value = 1,
maximum_value = 15,
},
flib_translations_per_tick = {
name = "flib-translations-per-tick",
default_value = 50,
minimum_value = 1,
},
}
return set... | nilq/small-lua-stack | null |
local sadotaLoaded = false
-- Events
-- RegisterNetEvent("ped_sadot:createPED")
-- AddEventHandler("ped_sadot:createPED", function()
-- create_ped_sadot()
-- end)
-- Fonction principale
-- function create_ped_sadot()
------------------------------------------------------
-- Modèle pour spawn NPC avec animation SA... | nilq/small-lua-stack | null |
local MotionSpecifier = require(script.MotionSpecifier)
local SimpleMotion = require(script.SimpleMotion)
local RoactMotion = {}
RoactMotion.spring = MotionSpecifier.spring
RoactMotion.SimpleMotion = SimpleMotion
return RoactMotion | nilq/small-lua-stack | null |
local commandHandler = require("commandHandler")
local pp = require("pretty-print")
local http = require("coro-http")
local json = require("json")
local utils = require("miscUtils")
local discordia = require("discordia")
local timer = require("timer")
local function printLine(...)
local ret = {}
for i = 1,... | nilq/small-lua-stack | null |
vim.cmd [[cab Wq wq]]
vim.cmd [[cab Q! q!]]
vim.cmd [[cab Q!! q!]]
vim.cmd [[cab q!! q!]]
vim.cmd [[cab WQ up]]
vim.cmd [[cab Q1 q!]]
vim.cmd [[cab W1 updatee!]]
vim.cmd [[cab W! update!]]
vim.cmd [[cab w; update!]]
vim.cmd [[cab W; update!]]
vim.cmd [[cab W update]]
vim.cmd [[cab Q q]]
vim.cmd [[cab w@ update!]]
vim.c... | nilq/small-lua-stack | null |
-- crossing -- by mewmew --
local event = require 'utils.event'
local math_random = math.random
local insert = table.insert
local map_functions = require "maps.tools.map_functions"
local simplex_noise = require 'utils.simplex_noise'
local simplex_noise = simplex_noise.d2
local function on_player_joined_game(event)
l... | nilq/small-lua-stack | null |
ys = ys or {}
slot1 = class("BattleBuffDiva", ys.Battle.BattleBuffEffect)
ys.Battle.BattleBuffDiva = slot1
slot1.__name = "BattleBuffDiva"
slot1.Ctor = function (slot0, slot1)
slot0.super.Ctor(slot0, slot1)
end
slot1.onInitGame = function (slot0, slot1, slot2)
playBGM(slot0.Battle.BattleDataProxy.GetInstance():GetB... | nilq/small-lua-stack | null |
local E, C, L, ET, _ = select(2, shCore()):unpack()
if C.main.restyleUI ~= true then return end
local _G = _G
local unpack, select = unpack, select
local CreateFrame = CreateFrame
local hooksecurefunc = hooksecurefunc
local GetItemInfo = GetItemInfo
local GetItemQualityColor = GetItemQualityColor
local Get... | nilq/small-lua-stack | null |
local playsession = {
{"matam666", {414}},
{"Jaskarox", {703}},
{"chrisisthebe", {721}},
{"aledeludx", {25937}},
{"wot_tak", {39306}},
{"Hoob", {19465}},
{"nik12111", {1023}}
}
return playsession | nilq/small-lua-stack | null |
object_building_kashyyyk_kash_dead_forest_cliff_corner = object_building_kashyyyk_shared_kash_dead_forest_cliff_corner:new {
}
ObjectTemplates:addTemplate(object_building_kashyyyk_kash_dead_forest_cliff_corner, "object/building/kashyyyk/kash_dead_forest_cliff_corner.iff")
| nilq/small-lua-stack | null |
local platform = require 'bee.platform'
local fs = require 'bee.filesystem'
local lt = require 'ltest'
local shell = require 'shell'
local C
local D
if platform.OS == 'Windows' then
C = 'c:/'
D = 'd:/'
else
C = '/mnt/c/'
D = '/mnt/d/'
end
local function create_file(filename, content)
if type(filen... | nilq/small-lua-stack | null |
-- install following packages:
-- yarn global add cspell vscode-langservers-extracted eslint_d rustywind @tailwindcss/language-server typescript-language-server
-- brew install ripgrep fd
require('impatient')
local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim'
if vim.fn.empty(vim.fn.g... | nilq/small-lua-stack | null |
local metric_leave = monitoring.counter("player_leave_count", "number of players that left")
local metric_leave_timeout = monitoring.counter("player_leave_timeout_count", "number of players left due to timeout")
minetest.register_on_leaveplayer(function(_, timed_out)
metric_leave.inc()
if timed_out then
metric_lea... | 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.