content stringlengths 5 1.05M |
|---|
---@type Plugin
local plugin = ...
local shared = plugin:require('shared')
---@param input string
---@return ItemType?
local function getItemType(input)
local typeID = tonumber(input)
if typeID == nil then
for _, itemType in pairs(itemTypes.getAll()) do
if itemType.name:lower() == input:lower() then
retur... |
local F, G = unpack(select(2, ...))
local function noop() end
ObjectiveTrackerFrame:ClearAllPoints()
ObjectiveTrackerFrame:SetPoint("TOPRIGHT", G.frame, "TOPRIGHT", -52, -377)
ObjectiveTrackerFrame.ClearAllPoints = noop
ObjectiveTrackerFrame.SetPoint = noop
ObjectiveTrackerFrame:SetHeight(476)
|
while true do while false do end end
while false do
print("if \z
OK\z
ok\z
\z
")
end
while true do --fff
end --ffff
|
--- Import ComputerMod first
require("Computer/ComputerMod")
--- Create your addon and set a unique name
local addon = ComputerMod.CreateAddon("TemplateAddon")
--- Create new ComputerEvent
addon.ComputerEvents = {
----{ eventName:string, { "string", "number", "boolean", "table", "Computer", "IsoObject", "InventoryIte... |
--[[ Persistent Performance Profiler ]]
local ppp = {}
ppp.totalSamples = {}
ppp.totalDuration = {}
ppp.sampleLimit = 10000
ppp.useLove = true
function ppp.getTime()
if ppp.useLove then
return love.timer.getTime()
end
return os.clock()
end
function ppp.time(callback, iterations, decimals)
local power = math.pow... |
adaptResolution(750, 1334)
adaptOrientation(ORIENTATION_TYPE.PORTRAIT)
-- Classes
Pixel = {}
function Pixel.new(x, y, color)
local o = {}
o.x = x
o.y = y
o.color = color
return o
end
Pixels = {}
function Pixels.new(table, region)
local o = {}
o.table = table
o.region = region
retu... |
-- taken from github.com/cleopatradev
Service = {}
local Service_mt = setmetatable(Service, {
__call = function(cls, ...)
local self = {}
setmetatable(self, {
__index = cls
})
self:constructor(...)
return self
end
})
function Service:new(namespace)
return setmetatable({ namespace = namespace }, Servic... |
/*==============================================================================================
Expression Advanced: Component -> Core.
Creditors: Rusketh, Oskar94
==============================================================================================*/
local LEMON, API = LEMON, LEMON.API
local Core = API:Ge... |
item_imba_enchanted_mango = item_imba_enchanted_mango or class({})
LinkLuaModifier("modifier_imba_mango", "components/items/item_enchanted_mango", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_imba_ripe_mango_timer", "components/items/item_enchanted_mango", LUA_MODIFIER_MOTION_NONE)
---------------------
-- EN... |
--中毒buff,用n个定时HurtBuff实现就可以了 |
function count_buff(keys)
local caster = keys.caster
local ability = keys.ability
local attack_times = ability:GetSpecialValueFor("attack_times")
--如果没有嗜血buff
if not caster:HasModifier("modifier_bloodthirsty_apply") then
--如果有计数buff
if caster:HasModifier("modifier_bloodthirsty_count"... |
local command = vim.api.nvim_create_user_command
local packer_cmd = function(callback, args)
return function()
vim.cmd("packadd packer.nvim")
require("plugins")[callback](args)
end
end
-- Define packer commands since we're loading it on-demand
command("PackerSnapshot", function(param)
pack... |
include("shared.lua")
function ENT:Draw()
self:DrawModel()
local ang = self:GetAngles() --+ Angle(0, 180, 0)--LocalPlayer():EyeAngles()
local pos = self:GetPos() + (self:GetUp()*6) + (self:GetForward()*12.3)-- + (self:GetRight()*-1) + (self:GetForward()) --Vector(0, 0, 10)
if pos:Distance(LocalPlayer():GetPos()) ... |
--[[
Name: "cl_auto.lua".
Product: "nexus".
--]]
local MOUNT = MOUNT;
NEXUS:IncludePrefixed("sh_auto.lua");
-- A function to draw a weapon's information.
function MOUNT:DrawWeaponInformation(itemTable, weapon, x, y, alpha)
local informationColor = nexus.schema.GetColor("information");
local backgroundColor = nexus... |
function stepHit (step)
if step == 828 then
playActorAnimation("dad","fall",false,false)
end
end
function fadeOut()
tweenPos(0, 50, -555, 5)
tweenPos(1, 162, -555, 5)
tweenPos(2, 274, -555, 5)
tweenPos(3, 386, -555, 5)
for i=0,3 do
tweenFadeOut(i, 0, 5)
end
end
... |
-- $Id: testes/nextvar.lua $
-- See Copyright Notice in file all.lua
print('testing tables, next, and for')
local function checkerror (msg, f, ...)
local s, err = pcall(f, ...)
assert(not s and string.find(err, msg))
end
local a = {}
-- make sure table has lots of space in hash part
for i=1,100 do a[i.."+"] = ... |
local TeamComments = script:FindFirstAncestor("TeamComments")
local Roact = require(TeamComments.Packages.Roact)
local Hooks = require(TeamComments.Packages.Hooks)
local t = require(TeamComments.Packages.t)
local useAvatar = require(TeamComments.Hooks.useAvatar)
local validateProps = t.interface({
LayoutOrder = t.op... |
minetest.register_abm({
nodenames = {"oxygenerator:oxygenerator_active"}, --makes small particles emanate from the beginning of a beam
interval = 1,
chance = 2,
action = function(pos, node)
minetest.add_particlespawner(
12, --amount
4, --time
{x=pos.x-0.95, y=pos.y-0.95, z=... |
project "lua"
kind "StaticLib"
files { "*.c", "*.h" }
removefiles { "luac.c" }
|
-- OOP Bit
_G.Base = _G.Base or { new = function(s,...) local o = { } setmetatable(o,s) s.__index = s o:initialise(...) return o end,initialise = function() end }
local Controls = Base:new() -- create a Class or Prototype 'Controls' which inherits from 'Base'
function Controls:initialise(options) -- ... |
ability_drunken_brawler = class({})
LinkLuaModifier('modifier_ability_drunken_brawler_buff', 'heroes/brewmaster/drunken_brawler', LUA_MODIFIER_MOTION_NONE)
function ability_drunken_brawler:OnSpellStart()
self:GetCaster():EmitSound("Hero_Brewmaster.Brawler.Cast")
self:GetCaster():AddNewModifier(self:GetCaster(), self... |
data:extend(
{
{
type = "virtual-signal",
name = "counting-signal",
icon = "__UsefulCombinators__/graphics/icons/signal/counting-signal.png",
subgroup = "virtual-signal",
order = "u[counting]"
},
{
type = "virtual-signal",
name = "time-mod-signal",
icon = "__UsefulCombi... |
return Def.ActorFrame {
-- Speed
Def.Sprite {
OnCommand=function(self)
self:x(-85);
if GAMESTATE:PlayerIsUsingModifier(PLAYER_1,'1.5x') and SCREENMAN:GetTopScreen():GetScreenType() == "ScreenType_Gameplay" then
self:Load(THEME:GetPathB("","optionicon_P1/speed_x1_5_P1"));
elseif GAMESTATE:Pl... |
function Dmine_OnEnterCombat(Unit,Event)
Unit:GetMainTank()
Unit:CastSpell(5)
end
function Dmine_LeaveCombat(Unit,Event)
Unit:RemoveEvents()
end
function Dmine_OnDied(Unit,Event)
Unit:FullCastSpellOnTarget(38108,Unit:GetMainTank())
end
RegisterUnitEvent(22315, 2, "Dmine_OnEnterCombat")
RegisterUnitEvent(22315, 2... |
--[[Author: LearningDave
Date: 04.11.2015
Creates a dummy at the target location that acts as the Sandstorm
]]
function sandstorm( keys )
-- Variables
local caster = keys.caster
local ability = keys.ability
local target_point = keys.target_points[1]
-- Special Variables
local duration = ability:GetLevelSpecialV... |
local PID = KEYS[1]
local WL = tonumber(KEYS[2])
local WL_VECTOR = KEYS[3]
local RANGE = tonumber(KEYS[4])
local SEGMENT = KEYS[5]
local target_zset = 'rc:' .. SEGMENT
local target_player_position = redis.call('zrevrank', target_zset, PID)
if target_player_position then
local target_player_rating = redis.call('zs... |
darkfrs = {
minimumLevel = 0,
maximumLevel = -1,
customObjectName = "Dark FRS XP",
directObjectTemplate = "object/tangible/jedi/jedi_holocron_dark_generic.iff",
craftingValues = {
},
customizationStringNames = {},
customizationValues = {}
}
addLootItemTemplate("darkfrs", darkfrs)
|
function OronuTheElder_OnEnterCombat(Unit,Event)
Unit:RegisterEvent("OronuTheElder_GroundingTotem", 45000, 0)
Unit:RegisterEvent("OronuTheElder_HealingWave", 11000, 0)
Unit:RegisterEvent("OronuTheElder_LightningShield", 30000, 0)
end
function OronuTheElder_GroundingTotem(Unit,Event)
Unit:CastSpell(34079)
end
func... |
object_tangible_collection_deathtrooper_epsilon_holodisk_01 = object_tangible_collection_shared_deathtrooper_epsilon_holodisk_01:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_deathtrooper_epsilon_holodisk_01, "object/tangible/collection/deathtrooper_epsilon_holodisk_01.iff") |
--- 周期金币刷新模块
--- @module PeriodCoinMgr Module
--- @copyright Lilith Games, Avatar Team
--- @author Changoo Wu
local PeriodCoinMgr, this = ModuleUtil.New("PeriodCoinMgr", ServerBase)
local Config = Config
function PeriodCoinMgr:Init()
print("[Period] Init()")
this:NodeRef()
this:DataInit()
this:EventBind()
end
---... |
-- Copyright (c) 2020 Trevor Redfern
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
local quest = require "game.entities.quest"
return quest:new{
title = "Rats in the Guild!",
description = "There are rats in the guild! You need to clean them out to start yo... |
local php = {}
php.opts = {}
local contLangCode = 'zh'
local localLanguageNames = {
["aa"] = "Qafár af",
["ab"] = "Аҧсшәа",
["abs"] = "bahasa ambon",
["ace"] = "Acèh",
["ady"] = "адыгабзэ",
["ady-cyrl"] = "адыгабзэ",
["aeb"] = "تونسي/Tûnsî",
["aeb-arab"] = "تونسي",
["aeb-latn"] = "Tûnsî",
["af"] =... |
local bigestOne = cmd(stoptweening;zoom,0.65;diffusealpha,0.75;decelerate,0.15;zoom,0.60;diffusealpha,1;sleep,0.35;decelerate,0.3;diffusealpha,0;zoom,0.5;glowblink;effectperiod,0.05;effectcolor1,color("1,1,1,0");effectcolor2,color("1,1,1,0.15"));
local bigerOne = cmd(stoptweening;zoom,0.65;diffusealpha,0.75;decelerate,... |
require("advancedLua")
local component = require("component")
local buffer = require("doubleBuffering")
local fs = require("filesystem")
local unicode = require("unicode")
local image = require("image")
local color = require("color")
local MineOSPaths = require("MineOSPaths")
-----------------------------------------... |
--------------------------------------------------------------------------------
-- Module Declaration
--
local mod, CL = BigWigs:NewBoss("Queen Azshara WellOfEternity", 939, 291)
if not mod then return end
mod:RegisterEnableMob(54853, 54884, 54882, 54883) -- Queen Azshara, 3x Enchanted Magi
mod.engageId = 1273
mod.re... |
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Interface IInterfaceSubject
</title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Interface IInterfaceSubjec... |
local testing = require 'tests.testing'
local fn = require 'fn'
local M = {}
function M.test_less()
testing.forstats({count = 2, sum = 9},
fn.skipn(3, fn.fromto(1, 5)))
end
function M.test_more()
testing.forstats({count = 0, sum = 0},
fn.skipn(3, fn.fromto(1, 2)))
end
function M.test_none()
testing.fo... |
skydome_mat =
{
passes =
{
base =
{
shader="skydome",
frontFace="ccw",
cullface="front",
depthFunc="lequal",
--topology='lines'
}
},
resources =
{
[0] =
{
name="transmittanceTexture",
resType="texture2D",
},
[1] =
{
name="inscatterTexture",
resType="texture3D",
}
}
... |
-- Make it local
local Entity = Entity
if Entity == nil then
Entity = require("entity.lua")
end
local Player = {}
setmetatable(Player, {__index = Entity})
function Player.new()
local player = Entity.fromid(player_getEntity())
setmetatable(player, {__index = Player})
return player
end
-- Not cle... |
local lu = require("test.luaunit")
local string = require("base.string")
function _G.test_endswith()
lu.assertTrue(("aaaccc"):endswith("ccc"))
lu.assertTrue(("aaaccc"):endswith("aaaccc"))
lu.assertFalse(("rc"):endswith("xcadas"))
lu.assertFalse(("aaaccc "):endswith("%s"))
end
function _G.test_startsw... |
local constant_keys = {
'randombytes_SEEDBYTES'
}
return constant_keys
|
local M = require('xe.node_def._checker')
local CalcParamNum = M.CalcParamNum
local CheckName = M.CheckName
local CheckVName = M.CheckVName
local CheckExpr = M.CheckExpr
local CheckPos = M.CheckPos
local CheckExprOmit = M.CheckExprOmit
local CheckCode = M.CheckCode
local CheckParam = M.CheckParam
local CheckNonBlank = ... |
-- This file is part of SA MoonLoader package.
-- Licensed under the MIT License.
-- Copyright (c) 2016, BlastHack Team <blast.hk>
-- Matrix3X3 class
-- authors: MTA Team (original MTA's CMatrix), FYP (lua implementation)
local Vector3D = require "vector3d"
Matrix3X3 = function(rightX, rightY, rightZ, fro... |
local SubStruct = require "roomgen.SubStruct"
-- local ObjLeak = require "objects.ObjLeak"
local SSPipes = Class.create("SSPipes", SubStruct)
function SSPipes:makeStructure()
local xOffset = 2
if self.x + xOffset + 2> self.maxX then return end
self.room:setTile("fground",self.x,self.y,"pipe_corner")
while true do... |
-- https://tex.stackexchange.com/a/446431
local M = {}
function M.betterurl(text)
label = text:gsub(".", "%1\\allowbreak{}")
label = label:gsub("~", "\\textasciitilde")
label = label:gsub("&", "\\&")
label = label:gsub("/", "/")
label = label:gsub("-", "-")
url = text
tex.print("\\href{" .. url .. "}... |
--[[
/$$$$$$$$/$$
|__ $$__/__/
| $$ /$$ /$$$$$$/$$$$ /$$$$$$ /$$$$$$ /$$$$$$$
| $$ | $$| $$_ $$_ $$ /$$__ $$ /$$__ $$/$$_____/
| $$ | $$| $$ \ $$ \ $$| $$$$$$$$| $$ \__/ $$$$$$
| $$ | $$| $$ | $$ | $$| $... |
#!/usr/bin/lua
local states = {
"alabama", "alaska", "arizona", "arkansas",
"california", "colorado", "connecticut", "delaware",
"florida", "georgia", "hawaii", "idaho",
"illinois", "indiana", "iowa", "kansas",
... |
local namespace = require "luameta.src.namespace"
local trait = require "luameta.src.trait"
local class = require "luameta.src.class"
trait "exampleTraitStatic"
: static {
say = function (...)
print(...)
end
}
trait "exampleTraitMethod"
: method {
say = function (self)
... |
pg = pg or {}
pg.SystemGuideMgr = singletonClass("SystemGuideMgr")
slot1 = nil
pg.SystemGuideMgr.Init = function (slot0, slot1)
slot0 = require("GameCfg.guide.newguide.SSG001")
slot1()
end
function slot2(slot0)
if getProxy(PlayerProxy) then
return pg.NewStoryMgr.GetInstance():IsPlayed(slot0, noAgain)
end
ret... |
object_draft_schematic_food_beastfood_juicy_fruit_substitute = object_draft_schematic_food_shared_beastfood_juicy_fruit_substitute:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_food_beastfood_juicy_fruit_substitute, "object/draft_schematic/food/beastfood_juicy_fruit_substitute.iff")
|
local T, C, L = Tukui:unpack()
----------------------------------------------------------------
-- Achievement ScreenShot by Blamdarot
----------------------------------------------------------------
if (not C.ScreenShots.Enable) then return end
local EncounterDifficulty = {
-- Dungeon
[1] = false, ... |
#!/usr/bin/lua
print("Benchmark,Implementation,N,Time")
while true do
local line1 = io.read("*l")
if not line1 then break end
local line2 = assert(io.read("*l"))
local _ = assert(io.read("*l"))
local _ = assert(io.read("*l"))
local _ = assert(io.read("*l"))
local name, impl, i = string.mat... |
---@class Vector2f : org.joml.Vector2f
---@field private serialVersionUID long
---@field public x float
---@field public y float
Vector2f = {}
---@public
---@param arg0 Vector2fc
---@return Vector2f
---@overload fun(arg0:Vector2fc, arg1:Vector2f)
---@overload fun(arg0:float, arg1:float)
---@overload fun(arg0:float, ar... |
module(..., package.seeall)
-----------------------------------------------------------------------------
-- ReCaptcha (http://recaptcha.net/) is a free captcha web service that
-- shows the visitors words from old books helping digitize them. This,
-- module provides a Lua interface to recaptcha. You will need to g... |
local tablex = require("pl.tablex")
local Set = require("pl.Set")
local current_folder = (...):gsub('%.[^%.]+$', '')
local rooms = require(current_folder .. ".rooms")
local conditions = require(current_folder .. ".conditions")
local getConstraints = require(current_folder .. ".getConstraints")
local push = tabl... |
function event_spawn(e)
eq.set_timer("depop",300000);
end
function event_death(e)
if(math.random(100) < 75) then
e.self:CastSpell(1017, e.other:GetID()); -- fishnova
end
end
function event_trade(e)
local item_lib = require("items");
item_lib.return_items(e.self, e.other, e.trade)
end
function e... |
function origin_and_time(stream, orig, start, stop)
local function map_flight(record)
return record
end
local function origin(record, orig)
return record.ORIGIN == orig
end
local function period(record, start, stop)
return (record.DEP_TIME >= start and record.ARR_TIME <= stop)
en... |
local colour_stack = { {r=255,g=255,b=255,a=255} }
local font_stack = { "DermaDefault" }
local curtag = nil
local blocks = {}
local colourmap = {
["black"] = { r=0, g=0, b=0, a=255 },
["white"] = { r=255, g=255, b=255, a=255 },
["dkgrey"] = { r=64, g=64, b=64, a=255 },
["grey"] = { r=128, g=128, b=128, a=255 },... |
----------------------------------------------------------------------------------------------------
--
-- Copyright (c) Contributors to the Open 3D Engine Project.
-- For complete copyright and license terms please see the LICENSE at the root of this distribution.
--
-- SPDX-License-Identifier: Apache-2.0 OR MIT
--
--... |
--[[
Copyright (c) 2019, Vsevolod Stakhov <vsevolod@highsecure.ru>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law ... |
------------------------------
-- Area: The Sanctuary of ZiTah
-- NM: Bastet
------------------------------
require("scripts/globals/hunts")
------------------------------
function onMobDeath(mob, player, isKiller)
tpz.hunts.checkHunt(mob, player, 325)
end
|
-- Include luagcrypt for decrypting AES
gcrypt = require "luagcrypt"
-- Include json for parsing JSON to table
json = require "json"
-- Include our config, where decryption keys are stored
config = require "config"
-- Register our proto object
orvibo_proto = Proto("orvibo","Orvibo Protocol")
-- These fields allow f... |
local QuestSystem = QuestSystem
local quests = QuestSystem.Storage.Quests
local dialogues = QuestSystem.Storage.Dialogues
hook.Add('SetupPlayerVisibility', 'QSystem.Service.AlwaysPVS', function(pPlayer, pViewEntity)
for i = #quests, 1, -1 do
local eQuest = quests[i]
if IsValid(eQuest) then AddOriginToPVS(eQuest:G... |
return {
{
description = "An arm's-length, jagged metal sword discolored with red corrosion. The worn leather grip barely held on by fraying thread.",
id = "rustysword",
keywords = { "sword", "rusty", "metal", "rusted" },
metadata = {
itemLevel = 1,
level = 1,
maxD... |
local zset_key = KEYS[1]
local processed_key = KEYS[2]
local test = ARGV[1]
redis.call('zrem', zset_key, test)
return redis.call('sadd', processed_key, test)
|
local Tools = module("lib/Tools")
local menu_ids = Tools.newIDGenerator()
local client_menus = {}
local rclient_menus = {}
function vRP.openMenu(source,menudef)
local menudata = {}
menudata.choices = {}
for k,v in pairs(menudef) do
if k ~= "name" and k ~= "onclose" and k ~= "css" then
table.insert(menudata.c... |
local findlocal = require "findlocal.core"
local undump = require "undump"
local version
local function readall(filename)
local f = assert(io.open(filename))
local data = f:read "a"
f:close()
return data
end
local function getproto(source)
if source:sub(1,1) == "=" then
error "invalid sou... |
print("############################################### LuaTest")
--dofile(CHI_LIBRARY)
--############################################### Setup mesh
chiMeshHandlerCreate()
newSurfMesh = chiSurfaceMeshCreate();
chiSurfaceMeshImportFromOBJFile(newSurfMesh,
"ChiResources/TestObjects/TriangleMesh2x2.obj",true)
... |
--[[
module:ShapeFactory
author:DylanYang
time:2021-01-28 15:03:25
]]
local Circle = require("patterns.creational.factory.Circle")
local Rectangle = require("patterns.creational.factory.Rectangle")
local Square = require("patterns.creational.factory.Square")
local super = require("patterns.creational.abstr... |
function binary_search(array, value)
-- Lua arrays start with 1
local low, high = 1, #array
while low <= high do
local mid = math.floor((low + high) / 2)
local guess = array[mid]
if guess == value then
return mid
elseif guess > value then
... |
--[[
tetromino.lua
Contains functions for the Tetrimino Bag generator and draws Tetriminos
]]
local gfxopts = require 'gfxopts'
local floor = math.floor
local tetromino = {}
local defbag = {1,2,3,4,5,6,7}
-- 1:O, 2:I, 3:T, 4:L, 5:J, 6:S, 7:Z
-- 0:0, 1:R, 2:2, 3:L
-- mapped into 5x5 space
local tetriminoes = {
... |
-- Prosody IM
-- Copyright (C) 2008-2010 Matthew Wild
-- Copyright (C) 2008-2010 Waqas Hussain
-- Copyright (C) 2018 Kim Alvefur
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local getmetatable = getmetatable;
local next, type = next, type;
local ... |
local destroyService = {}
local destroyQueue = {}
function destroyService:AddItem(theobject, delay)
local now = os.time()
local destroyObject = {object = theobject, destroyTime = delay + now}
for i, storedObject in pairs(destroyQueue) do
if destroyQueue[i].destroyTime > destroyObject.destroyTime then
table.in... |
local utils = require("utils")
local map_item_utils = require("map_item_utils")
local loadedState = require("loaded_state")
local logger = require("logging")
local roomStruct = require("structs.room")
local script = {
name = "pasteRoom",
displayName = "Paste Room",
tooltip = "Paste a room from your clipboa... |
local tcp = require("tcp")
local conn, err = tcp.open(":12345")
if err then error(err) end
print("done: tcp:open()")
err = conn:write("ping")
if err then error(err) end
print("done: tcp_client_ud:write()")
local result, err = conn:read()
if err then error(err) end
if (result == "pong") then error("must be pong messa... |
package("libev")
set_homepage("http://software.schmorp.de/pkg/libev")
set_description("Full-featured high-performance event loop loosely modelled after libevent.")
add_urls("http://dist.schmorp.de/libev/libev-$(version).tar.gz", {alias = "home"})
add_urls("http://git.lighttpd.net/libev.git/snapshot/li... |
local A = AceLibrary("AceAddon-2.0"):new("AceDebug-2.0", "AceConsole-2.0",
"AceDB-2.0", "AceEvent-2.0", "AceHook-2.1", "FuBarPlugin-2.0")
FonzAppraiser = A
A:RegisterDB("FonzAppraiserDB", "FonzAppraiserCDB", "char")
local L = AceLibrary("AceLocale-2.2"):new("FonzAppraiser")
local _G = getfenv(0)
-- WoW ... |
require("runtime-test/src")
require("runtime-test/src/NodeTypes")
require("runtime-test/src/NodeOpTypes")
require("@vue/shared")
describe('test renderer', function()
mockWarn()
it('should work', function()
local root = nodeOps:createElement('div')
render(h('div', {id='test'}, 'hello'), root)
expect(#ro... |
return {
{
time = 5
},
{
time = 5.5
},
{
time = 6
},
{
time = 6.5
},
{
time = 7
},
{
time = 7.5
},
{
time = 8
},
{
time = 8.5
},
{
time = 9
},
{
time = 10
},
init_effect = "",
name = "",
time = 1,
color = "red",
picture = "",
desc = "",
stack = 1,
id = 19333,
icon = 1933... |
local sha1 = require("sha1")
local json = require("dkjson")
-- Encodes a character as a percent encoded string
local function char_to_pchar(c)
return string.format("%%%02X", c:byte(1,1))
end
-- encodeURIComponent escapes all characters except the following: alphabetic, decimal digits, - _ . ! ~ * ' ( )
local functi... |
local lspconfig = require("lspconfig")
lspconfig.texlab.setup {
settings = {
latex = {
build = {
onSave = true
}
}
}
}
|
--[[
获得敌对队伍
]]
local b3 = require("app.main.modules.behavior3.b3")
local Action = require("app.main.modules.behavior3.core.Action")
local EnemyTeam = class("EnemyTeam", Action)
--[[
Creates an instance of EnemyTeam.
properties
label 标签
team 队伍
]]
function EnemyTeam:ctor(config)
config = config or {}
config.n... |
local kong_helpers = require "spec.helpers"
local test_helpers = require "kong_client.spec.test_helpers"
describe("CacheWarmer #e2e", function()
local send_admin_request
local consumer
before_each(function()
kong_helpers.db:truncate()
consumer = kong_helpers.db.consumers:insert({
... |
script.on_event(defines.events.on_built_entity, function(event)
if string.match(event.created_entity.name, "pipe-") and
(string.match(event.created_entity.name, "elbow") or
string.match(event.created_entity.name, "junction") or
string.match(event.created_entity.name, "straight")) then
event.created_entity.o... |
local oop = require("diffview.oop")
local git = require("diffview.git.utils")
local Event = require("diffview.events").Event
local EventEmitter = require("diffview.events").EventEmitter
local StandardView = require("diffview.views.standard.standard_view").StandardView
local LayoutMode = require("diffview.views.view").L... |
local endpoints = require "kong.api.endpoints"
local integration_access_settings_schema = kong.db.integration_access_settings.schema
return {
["/integration-access-settings"] = {
schema = integration_access_settings_schema,
methods = {
POST = endpoints.post_collection_endpoint(integrat... |
-- "Not-Sorry"
adjustVar = 0.0;
multiVar = 1
showOnlyStrums = false
painBool = false
-- receptor.alpha = math.random(25, 50) / 50
function update(elapsed)
if adjustVar < 1 then
adjustVar = adjustVar + 0.001
end
camShenigans()
local currentBeat = (songPos / 1000) * (bpm/60)
for i=0,7 do
local receptor = _... |
-----------------------------------------------------------------
-- Info on the current group
local args = ...
local group_info = args[3]
-----------------------------------------------------------------
LoadActor("./BarGraph.lua", group_info)
local initializeBarGraph = CreateBarGraph(250,100)..{
OnCommand=function... |
local Events = require "scripts/toolkit/events"
local Utilities = require "scripts/toolkit/utilities"
local GameplayEventButton = {
Properties = {
Debug = false,
Event = { default = "", description = "Event name" },
Value = { default = "", description = "Event value" },
InputEvent = { default = "", descriptio... |
-- Helpers --
local g = vim.g -- Global variables
local w = vim.w -- Window variables
local b = vim.b -- Buffer variables
local map = vim.api.nvim_set_keymap -- Set map keys
g.mapleader = ','
-- Modes:
-- n normal
-- i insert
-- c command
-- s select
-- x visual
-- v visual and select
-- Enable spellchec... |
#!/usr/local/openresty/bin/resty
-- Copyright (C) 2017 by chrono
local data, err
local a, b = 1, 'lua'
local x, y = a, b, 'not_used'
local m, n = "only this"
do
local x = 10
print("x = ", x)
end
-- if-else
local x = nil
if x then
print("x is not nil")
else
print("x is nil")
end
-- while
local x = 3... |
--
-- DESCRIPTION
--
-- @COMPANY **
-- @AUTHOR **
-- @DATE ${date} ${time}
--
require "UnLua"
local BP_Actor1_C = Class()
--function BP_Actor1_C:Initialize(Initializer)
--end
--function BP_Actor1_C:UserConstructionScript()
--end
function BP_Actor1_C:PrintOnScreen(message)
UE4.UKismetSystemLibrary:PrintString(m... |
--~ // Licensed under the Apache License, Version 2.0. See LICENSE.txt in the project root for license information.
package.path = package.path..";"..".\\?.lua;"..".\\?.luac"
package.cpath = package.cpath..";"..'.\\clibs\\?.dll'
local util = require("qsutils")
local qscallbacks = {}
--- Мы сохраняем пропущенные зна... |
require "ISBaseObject"
---@class ISBaseTimedAction : ISBaseObject
ISBaseTimedAction = ISBaseObject:derive("ISBaseTimedAction");
ISBaseTimedAction.IDMax = 1;
function ISBaseTimedAction:isValid()
end
function ISBaseTimedAction:update()
end
function ISBaseTimedAction:forceComplete()
self.action:forceComplete(... |
local t = Def.ActorFrame {}
-- the Profile relevant children of the ScreenSelectMusic decorations actorframe
-- just using it for profile rating as an example
local profile = GetPlayerOrMachineProfile(PLAYER_1)
local wheelX = 15
local arbitraryWheelXThing = 17
local space = 20
local function makeSSes()
local ss =... |
hook.Add("PlayerHurt", "UseConfussion", function( ply, ent )
if ent:IsPlayer() then
if math.random( 1, 100 ) == 69 then
ent:Kick( "You have been GAC banned." ) -- Confuse the shit out of the attacker
end
end
end)
hook.Add("PlayerCanHearPlayersVoice", "Oops", function()
if math.r... |
local M = {}
---Get the highlight groups for the plugin
---@param theme table
---@return table
function M.get(theme)
return {
DebugBreakpoint = { fg = theme.colors.red },
DebugBreakpointLine = {
fg = theme.colors.red,
style = theme.options.underline
},
DebugH... |
#!/usr/bin/env lua
require 'Test.More'
plan(10)
if not require_ok 'Rotas' then
BAIL_OUT "no lib"
end
local m = require 'Rotas'
type_ok( m, 'table' )
is( m, package.loaded.Rotas )
is( m._NAME, 'Rotas', "_NAME" )
like( m._COPYRIGHT, 'Perrad', "_COPYRIGHT" )
like( m._DESCRIPTION, 'web server router', "_DESCRIPTIO... |
------------------------------------------------
-- This Source Was Developed By (ABS) @IQ_ABS.--
-- This Is The Source Channel @Dev_Prox . --
-- - DevProx - --
-- -- https://t.me/Dev_Prox -- --
------------------------------------------------
redis = require('redis')... |
item = require "item"
basket = require "basket"
Item = item.Item
Basket = basket.Basket
function round (x)
local f = math.floor(x)
if x == f then return f
else return math.floor(x + 0.5)
end
end
function make_item(name, category, price, imported)
return Item:new {
name = name,
category = ca... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.