content
stringlengths
5
1.05M
return {'ipenburg','ipek'}
--------------------------------------------------------------------------- --- Firefox hotkeys for awful.hotkeys_widget -- -- @author Jonathan <jonathan@tinypulse.com> -- @copyright 2017 Jonathan -- @submodule awful.hotkeys_popup --------------------------------------------------------------------------- local ...
local tablex = require("pl.tablex") local sfmt = string.format local wrapper = require("core.lib.wrapper") local Damage = require("core.Damage") local Logger = require("core.Logger") local CombatErrors = wrapper.loadBundleScript("lib/CombatErrors", ...
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB local NP = E:GetModule('NamePlates') local oUF = E.oUF -- Cache global variables -- Lua functions local pairs = pairs local unpack = unpack -- WoW API / Variables local UnitPlayerControlled = UnitPlayerControlled lo...
mutant_bark_mite_soldier = Creature:new { objectName = "@mob/creature_names:mutant_bark_mite_soldier", socialGroup = "mite", faction = "", level = 24, chanceHit = 0.33, damageMin = 230, damageMax = 240, baseXp = 2543, baseHAM = 5900, baseHAMmax = 7200, armor = 0, resists = {130,130,-1,120,120,-1,-1,-1,-1}, ...
--- Check and update retries count for given job -- @param jid Job JID -- @returns boolean Whether Job has completely failed incrementRetries = function(jid) hivelog({ message = 'incrementRetries', jid = jid }) local key_jobs = 'bee:h:jobs:' .. jid -- get job options local optio...
object_static_item_item_component_encryption_module = object_static_item_shared_item_component_encryption_module:new { } ObjectTemplates:addTemplate(object_static_item_item_component_encryption_module, "object/static/item/item_component_encryption_module.iff")
local Callisto = (...) local Compiler = Callisto.Compiler local TestUtil = {} function TestUtil.ACopy(t) local o = {} for key, value in ipairs(t) do o[key] = value end return o end function TestUtil.Compare(a, b, path) path = path or {"output"} if (type(a) ~= type(b)) then return false, ("failure at %s: g...
-- Copyright (C) 2018-2021 by KittenOS NEO contributors -- -- Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTI...
------------------------------------------------------------------------------- -- Adds a new text box. -- -- @param name (String) Name of the new text box (e.g. "text1"). -- @param fontname (String) Filename of the font to use for the text. -- The filename is relative to the...
local K, C, L, _ = select(2, ...):unpack() if C["ActionBar"].Enable ~= true then return end local _G = _G local CreateFrame = CreateFrame -- Setup MultiBarRight as bar #4 by Tukz local bar = CreateFrame("Frame", "Bar4Holder", RightActionBarAnchor) bar:SetAllPoints(RightActionBarAnchor) MultiBarRight:SetParent(bar) f...
--[[ - SKYNET SIMPLE ( https://github.com/viticm/skynet-simple ) - $Id manager.lua - @link https://github.com/viticm/skynet-simple for the canonical source repository - @copyright Copyright (c) 2020 viticm( viticm.ti@gmail.com ) - @license - @user viticm( viticm.ti@gmail.com ) - @date 2020/09/07 19:28 - @uses T...
local PolygonNode = class("PolygonNode",cc.Node) function PolygonNode:ctor(color, rect) end function PolygonNode:setRectangle(rect) end return PolygonNode
local composer = require( "composer" ) local screen = require( "spyric.screen" ) local snowParams = require( "data.snowParams" ) local fireParams = require( "data.fireParams" ) local physics = require( "physics" ) physics.start() -- physics.setDrawMode( "hybrid" ) local sheetInfo = require( "data.walkAnimation" ) loca...
--- Performance tests for `properset`. -- -- Requires `luaunit` and assumes that `luarocks` is installed. -- -- @author Odin Kroeger -- @copyright 2018 Odin Kroeger -- @license MIT -- @release 0.3-a0 -- Constants -- ========= -- How many measurements to calculate the average of? local RUNS = 5 -- Up to what size te...
local API = {} local playerStateHelperGroup = nil function API.SetPlayerStateHelperGroup(group) playerStateHelperGroup = group end function API.GetPlayerStateHelperName(player) return player.id end function API.GetPlayerStateHelper(player) if playerStateHelperGroup then return playerStateHelperGroup:FindChildB...
local path = minetest.get_modpath("terrain").."/" dofile(path.."tile_builder.lua") dofile(path.."3d_tile_registration.lua") dofile(path.."road_registration.lua") dofile(path.."blank_map_builder.lua") dofile(path.."spawning.lua")
----------------------------------- -- Area: Sauromugue Champaign [S] -- NPC: Bulwark Gate -- !pos -445 0 342 -- Quest NPC ----------------------------------- require("scripts/globals/campaign"); require("scripts/globals/titles"); require("scripts/globals/quests"); require("scripts/globals/settings"); ----------------...
object_mobile_smuggler_fence_fenton = object_mobile_shared_smuggler_fence_fenton:new { } ObjectTemplates:addTemplate(object_mobile_smuggler_fence_fenton, "object/mobile/smuggler_fence_fenton.iff")
require("luci.sys") --mod by wulishui 20200908 m=Map("rebootschedule",translate("计划重启"),translate("<font color=\"green\"><b>让计划任务更加易用的插件,可以使用-表示连续的时间范围,使用,表示不连续的多个时间点,使用*/表示循环执行。可以使用“添加”来添加多条计划任务命令。可使用“--自定义--”来自行添加其它参数。</b></font></br>* 所有时间参数都是指该自然单位中的时间点,而非累积计数,比如月份只能是1~12,日期只能是1~31,星期只能是0~6,小时只能是0~23,分钟只能是0~59,不能使...
function pack(...) return {n = select("#", ...), ...} end local resolve_func; local lazy_test_val = "Test" local promise = async.promise(function (resolve) lazy_test_val = "NotTest" resolve_func = resolve end) assert(not promise:isResolved()) -- Check the expected behavior that the function is evaluate...
--[[ Copyright (c) 2015, Robert 'Bobby' Zenz All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the fo...
-- function spiralMine() -- Spiral mine will dig a square area out using the starting point as the center of the spiral. -- The code will mine in a spiarl until the inventory is full. -- Code Setup Area local fillSlot=1 local dist=1 local sqSize=10 -- Utility Functions function clear(direction) cont=true if dire...
TestReduceEnd = { ["test: Should return nil when an array is empty"] = function () luaunit.assertNil(array():reduceend(function () return 1 end)) end; ["test: Should return the initial element when an array is empty and the initial element is provided"] = function () luaunit.assertEquals(array():reduceend(funct...
vim.o.shiftwidth = 4 vim.o.softtabstop = 4 vim.o.expandtab = true
local m, s, o local openclash = "openclash" local NXFS = require "nixio.fs" local SYS = require "luci.sys" local HTTP = require "luci.http" local DISP = require "luci.dispatcher" local UTIL = require "luci.util" local fs = require "luci.openclash" local uci = require "luci.model.uci".cursor() m = Map(openclash, tra...
#!/usr/bin/env th -- -- Outputs the number of parameters in a network for a single image -- in evaluation mode. require 'torch' require 'nn' require 'dpnn' torch.setdefaulttensortype('torch.FloatTensor') local cmd = torch.CmdLine() cmd:text() cmd:text('Network Size.') cmd:text() cmd:text('Options:') ...
local os = love.system.getOS() local isSimulatingMobile = false local isRealMobile = os == "Android" or os == "iOS" utils = { vh = love.graphics.getHeight() / 100, vw = love.graphics.getWidth() / 100, isMobile = isSimulatingMobile or isRealMobile, isRealMobile = isRealMobile, isSimulatingMobile = i...
-- Internal LSP configuration mapper. -- -- This module handles configuring LSP the easy way. -- -- # Configuration -- -- { -- "diagnostics": { -- "underline": <true>, -- "virtual_text": <true>, -- "signs": <true>, -- "update_in_insert": <false>, -- "severity_sort": <false> -- }, -- -- "capabi...
local db = exports.sqlite:getConnection() addEventHandler('onPlayerJoin',root,function() local account_Crends = determinePlayerAccount(getPlayerSerial(source)) triggerClientEvent('redirect:server', source, account_Crends) end) addEvent('login:attempt',true) addEventHandler('login:attempt',root,function(username, pa...
-- AUTHOR: Stephen McGill, 2017 -- Usage: luajit test_pcap.lua FILENAME.pcap -- Description: Parse PCAP files from tcpdump local lib = {} --------------- -- Dependencies local ffi = require'ffi' local mmap = require'mmap' --------------- ------------------ -- PCAP file format: http://wiki.wireshark.org/Development/L...
-- 先这样判断是不是Windows if package.config:sub(1, 1) == "\\" then package.cpath = package.cpath .. ";../colib/?.dll" else package.cpath = package.cpath .. ";../colib/?.so" end package.path = package.path ..";../colib/?.lua" local coseri = require "seri" local dbg = require "dbg" local data = coseri.pack({ ...
--= Melon minetest.register_craftitem("farming:melon_slice", { description = "Melon Slice", inventory_image = "farming_melon_slice.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:melon_1") end, on_use = minetest.item_eat(2), }) m...
-- Add torpedo auto-targeting support to every ship -- (it'll only do something for player ships) local entity = Entity() if entity.isShip then entity:addScriptOnce("entity/utility/torpedoautotargeter.lua") end
local lrucache = require "resty.lrucache" local c = lrucache.new(200) -- allow up to 200 items in the cache if not c then return error("failed to create the cache: " .. (err or "unknown")) end _G.cache = c
NTYPE_WOOD = 1 NTYPE_ORE = 2 NTYPE_HERB = 3 CNode = class( function(self, copyfrom) self.Name = "<NODE>"; self.Id = 0; self.Type = NTYPE_WOOD; if( type(copyfrom) == "table" ) then self.Name = copyfrom.Name; self.Id = copyfrom.Id; self.Type = copyfrom.Type; end end );
events.trigger{ collision = function(self, event) local collider = event:getCollider() -- Player reached end, prepare for end. if common.isPlayer(collider) and self:getBool("girl-arrived") then local em = jvgslua.EffectManager_getInstance() local fe = jvgslua.FadeEff...
local function AccelerometerMainLayer() local function title() return "AccelerometerTest" end local pLayer = CCLayer:create() pLayer:setAccelerometerEnabled(true) local pLabel = CCLabelTTF:create(title(), "Arial", 32) pLayer:addChild(pLabel, 1) pLabel:setPosition( ccp(VisibleRect:center().x, Visible...
function deepcopy(orig) local orig_type = type(orig) local copy if orig_type == 'table' then copy = {} for orig_key, orig_value in next, orig, nil do copy[deepcopy(orig_key)] = deepcopy(orig_value) end setmetatable(copy, deepcopy(getmetatable(orig))) else -- n...
--[[ © CloudSixteen.com do not share, re-distribute or modify without permission of its author (kurozael@gmail.com). Clockwork was created by Conna Wiles (also known as kurozael.) http://cloudsixteen.com/license/clockwork.html --]] -- Called when the local player should be drawn. function cwEmoteAnims:ShouldDrawL...
local dungeonID, creatureID, creatureID2 if UnitFactionGroup("player") == "Alliance" then dungeonID, creatureID, creatureID2 = 2323, 144691, 144692--Ma'ra Grimfang and Anathos Firecaller else--Horde dungeonID, creatureID, creatureID2 = 2341, 144693, 144690--Manceroy Flamefist and the Mestrah <the Illuminated> end loc...
-- Upstream Connection Policy --- This policy exposes some parameters related with the connection to the --- upstream. local tonumber = tonumber local _M = require('apicast.policy').new('Upstream connection policy') local new = _M.new function _M.new(config) local self = new(config) self.connect_timeout = tonu...
--=========================================================================== -- Blizzard.j ( define Jass2 functions that need to be in every map script ) --=========================================================================== ------------------------------------------------------------------------- ...
AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) include( "shared.lua" ) SWEP.Weight = 5 SWEP.AutoSwitchTo = false SWEP.AutoSwitchFrom = false util.AddNetworkString("StormFox_Tool") net.Receive("StormFox_Tool",function(len,ply) local msg = net.ReadInt(3) if msg == 0 then -- Add Material local str ...
-- ====================================================================== -- Conway Cubes -- Advent of Code 2020 Day 17 -- Eric Wastl -- https://adventofcode.com -- -- lua implementation by Dr. Dean Earl Wright III -- ====================================================================== -- =========================...
print "testing closures and coroutines" --[[ local A,B = 0,{g=10} function f(x) local a = {} for i=1,1000 do local y = 0 do a[i] = function () B.g = B.g+1; y = y+x; return y+A end end end local dummy = function () return a[A] end collectgarbage() A = 1; assert(dummy() == a[1...
local trigger = script.parent local coursenum = script:GetCustomProperty("coursenum") function OnBeginOverlap(whichTrigger, other) if other:IsA("Player") then print(whichTrigger.name .. ": Begin Trigger Overlap with " .. other.name) end end function OnEndOverlap(whichTrigger, other) if other:IsA("Player") then ...
local wtonumber = require 'w3xparser'.tonumber local w2l local marks local metadata local function txt_to_type(tp, value) if tp == 0 then if not value then return 0 end return math.floor(wtonumber(value)) elseif tp == 1 or tp == 2 then if not value then...
--[[ Copyright 2012 The Luvit Authors. All Rights Reserved. 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 or agre...
_author="LuaSTG User" _mod_version=4096 _allow_practice=true _allow_sc_practice=true stage.group.New('menu',{},"Normal",{},true,1) stage.group.AddStage('Normal','Stage 1@Normal',{},true) stage.group.DefStageFunc('Stage 1@Normal','init',function(self) task.New(self,function() while true do task.Wait(100) end ...
local LoginSceneBgView = {} function LoginSceneBgView:SetActive( isActive ) self.isActive = isActive if not self.is_inited then self.is_inited = true self:Init() end if self.scene_obj then self.scene_obj:SetActive(self.isActive) end if self.login_camera then self:SwitchLoginCamera(self.isActive) end if...
local config = require "core.configmanager"; local log = require "util.logger".init("stats"); local timer = require "util.timer"; local fire_event = prosody.events.fire_event; local stats_interval_config = config.get("*", "statistics_interval"); local stats_interval = tonumber(stats_interval_config); if stats_interva...
#!/usr/bin/env lua --[[------------------------------------------------------------------------------- # build.lua Build script for mirroring markdown directory to html directory, appending reference links to markdown files, and converting markdown source files to html. ## Requirements: - Lua 5.1 - LuaFileSystem 1...
local m = require'lualdap' assert(type(m) == 'table') assert(m == package.loaded.lualdap) assert(m._COPYRIGHT:match'Kepler Project') assert(m._DESCRIPTION:match'LDAP client') assert(m._VERSION:match'^LuaLDAP %d%.%d%.%d') if not os.getenv('OS') then assert(type(m.initialize) == 'function') end assert(type(m.open_...
SceneParams = {} function SceneParams:ToString () end function SceneParams:Equals (obj) end function SceneParams:GetHashCode () end function SceneParams:GetType () end
Weapon.PrettyName = "Steyr Scout" Weapon.WeaponID = "swb_css_scout" Weapon.DamageMultiplier = 2.4 Weapon.WeaponType = WEAPON_PRIMARY
-- shows how a script can get a private file path -- the output on my Windows machine is: -- C:\Documents and Settings\steve\.testapp\test.txt require 'pl' print(app.appfile 'test.txt')
-- Copyright (c) 2016 John Schember <john@nachtimwald.com> -- -- Permission is hereby granted, free of charge, to any person obtaining -- a copy of this software and associated documentation files (the "Software"), -- to deal in the Software without restriction, including without limitation -- the rights to use, copy, ...
function init(args) if not args then storage.zeroAngle = math.pi / 2 end end function main() local timeOfDay = world.timeOfDay() local theta = storage.zeroAngle - (math.pi * 2 * timeOfDay) entity.rotateGroup("hand", theta) entity.setOutboundNodeLevel(0, (timeOfDay <= 0.5)) end
--- Build back-end for CMake-based modules. local cmake = {} local fs = require("luarocks.fs") local util = require("luarocks.util") local cfg = require("luarocks.core.cfg") --- Driver function for the "cmake" build back-end. -- @param rockspec table: the loaded rockspec. -- @return boolean or (nil, string): true if...
-- Pseudo-random number generator. Requires LuaJIT. -- This implements the 32-bit version of Mersenne Twister (mt19937). -- Reference: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html local floor, tonumber = math.floor, tonumber local bit = require("bit") local tobit, bxor, rshift, lshift, band =...
-- ===================================================================== -- -- comment.lua - -- -- Created by liubang on 2021/08/31 22:41 -- Last Modified: 2021/08/31 22:41 -- -- ===================================================================== require('Comment').setup { ignore = nil, ---LHS of toggle mapping...
Log = {} isWarnOn = nil isInfoOn = nil isDebugOn = nil isErrorOn = nil isWriteToFile = nil deep = nil function Log.Init () end function Log.SetDebugLevel (level) end function Log.SetWriteToFile (isOn) end function Log.SetInnerLogShown (isShow) end function Log.Debug (...) end function Log.Error (...) end f...
------------------------------------------------ ----[ REQUEST MOD ]------------------- ------------------------------------------------ local Request = SS.Commands:New("Request") // Request command function Request.Command(Player, Args) local ID = Args[1] table.remove(Args, 1) local Reason = table.concat(Arg...
local HSK = { COMMON = 99, UNIT_TOKEN = 101, UNIT_TOKEN_LEAP = 102, UNIT_TOKEN_ALERT_CIRCLE = 103, UNIT_TREE = 104, SKILL_ITEM_SEPARATE = 105, SKILL_BREAK = 106, SKILL_SWIM_UNLIMIT = 107, SKILL_INVISIBLE = 108, SKILL_HERO_TAVERN_SELECTION = 109, UNIT_HERO_TAVERN = 110, UN...
Locales['en'] = { -- Cloakroom ['cloakroom'] = 'Съблекалня', ['citizen_wear'] = 'Цивилни дрехи', ['police_wear'] = 'Полицейска униформа', ['gilet_wear'] = 'Оранжево светлоотразително елече', ['bullet_wear'] = 'Бронежилетка', ['no_outfit'] = 'Няма униформа, която да ви подхожда!', ['open_cloackroom'] = '...
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' dependency "vrp" -- Tell FiveM's NUI system what the main html file is for this resource ui_page "nui/ui.html" -- Add the files that need to be used/loaded files { "nui/ui.html", "nui/ui.js", "nui/ui.css", "nui/Roboto.ttf", "nui/Captain.ttf" } ...
repeat wait() until game.Players.LocalPlayer.Character wait(0.5) --// Variables local L_1_ = script.Parent local L_2_ = game.Players.LocalPlayer local L_3_ = L_2_.Character local L_4_ = L_2_:GetMouse() local L_5_ = workspace.CurrentCamera local L_6_ = L_3_:WaitForChild('Torso') local L_7_ = L_3_:WaitForChild('Head'...
-- Place clientside variables in different categories to decide how they are synchronized, -- saved and loaded -- -- Note: Currently, only global variables are handled, not local or member variables -- -- Descriptions: -- * "ignored" is where you place variables that clients should not send packets about, -- either b...
local Region = require(script.Parent.Region) --[=[ @within ComplexRegions @function createRegion Helper function that will create a Region, set its whitelist, and also listen for instances entering and leaving. Usage: ```lua local region = ComplexRegions.createRegion(workspace.Region, { Players.LocalPlayer...
--this is the default config to load for the map --there will be others like easy, hard, endless, and more in the future but for now it is just normal.lua --this file will be written to with a in game config tool return { meta = { spawn_groups = {"generic"} }, --this is an enemy spawn definition, squads are not ...
--set PWM pin pwmPinA = 5 pwmPinB = 6 pwmPinC = 7 pwmPinD = 8 --set Temperature Pin tempPinA = 1 tempPinB = 2 --define Temperature int tempNumA = 0 tempNumB = 0 --setting PWM config, will be a file pwmTempValue = {45,60,70,80} pwmFanValue = {0,100,300,600,1023} pwmConstValue = {0,61,61,1000} wifiConf = {} wifiConf...
M = {} -- unsepcifc commands vim.cmd("command! Mappings enew|pu=execute('map')") vim.cmd("command! Cd2This lcd %:p:h") -- vim.cmd([[command! Words2String :s/\(\w\+\)/'\1'/g]]) vim.cmd([[command! -range Words2String :'<,'>s/\%V\(\h\+\)/'\1'/g]]) vim.cmd([[ command! KeyMaps :call utils#KeyMaps() " save and quit ...
local M = {} function M.join(...) local items = {} local slash = false for _, item in ipairs({ ... }) do item = M.adjust_sep(item) if vim.endswith(item, "/") then item = item:sub(1, #item - 1) slash = true else slash = false end table.insert(items, item) end local path =...
function main() --[[ Global Vars ]] --[[ Import Profile Learning Thresholds [resource.min_traffic_threshold] Set the resource.min_traffic_threshold as the minimum number of "clean" transactions to profile/inspect before enforcement of the profile begins. [resource.min_pattern_threshold] resource.min_pattern_t...
deathspeaker_xunra_deathly_scythe_modifier = class({}) function deathspeaker_xunra_deathly_scythe_modifier:OnCreated( kv ) self.move_speed_percentage = self:GetAbility():GetSpecialValueFor("move_speed_percentage") self.magic_resist_percentage = self:GetAbility():GetSpecialValueFor("magic_resist_percentag...
--[[ Jigsaw for Masque ]] local MSQ = LibStub("Masque", true) if not MSQ then return end MSQ:AddSkin("Jigsaw: Plain",{ Author = "Kallieen", Version = "6.2.0", Shape = "Square", Masque_Version = 60200, -- Skin data start. Backdrop = { Width = 32, Height = 32, Texture = [[Interface\Addons\Masque_Jigsaw\Te...
local PLUGIN = PLUGIN or { }; nut.command.Register({ adminOnly = true, syntax = nut.lang.Get("syntax_faction")..nut.lang.Get("syntax_class"), onRun = function(client, arguments) local faction = arguments[1] or "" local class = arguments[2] or "" local factionIndex local factionTable local classID local ...
--!A cross-platform build utility based on Lua -- -- 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...
a = nil local b = {} local k = false local g = nil Citizen.CreateThread(function() while a == nil do TriggerEvent('esx:getSharedObject', function(obj) a = obj end) Citizen.Wait(0) end while b.job == nil do Citizen.Wait(1000) b = a.GetPlayerData() end end) ...
local type = type local next = next local math_random = math.random local table_remove = table.remove local table_Random = table.Random -- function table.isArray(t) local past_value_type for key, value in next, t do if type(key) ~= 'number' then return false end local value_type = type(value) if past_value_t...
local Text = {} local Item = require("lib/item") function Text.new(x, y, fontsize) local text = Item.new(x, y) function text:draw() love.graphics.setColor(self.color.r, self.color.g, self.color.b, self.color.a) love.graphics.setFont(self.font) love.graphics.print(self.text, self....
--------------------------------------------------Diable JAmble V 0.5------------------------ wait(); local ta1 = 5; Plrs = game:GetService("Players") me = Plrs.LocalPlayer char = me.Character Modelname = "Edit" dmgs = {Pdmg = {30, 30, "Punch"}, Kdmg = {20, 25, "Kick"}, K2dmg = {25, 30, "Doublekick"}, Rdmg = {20, 20, ...
-- Minimalist couchdb client for lua resty -- Author: Jeffry L. <paragasu@gmail.com> -- Website: github.com/paragasu/lua-resty-couchdb -- Licence: MIT local http = require 'resty.http' local json = json or require 'cjson' local _M = { __VERSION = '4.2-2' } local mt = { __index = _M } local i = require 'inspect' loca...
-- assume that eid is some existing entity id function example_factory_add() uuid = scene.components.uuid.add(eid) end function example_factory_get() uuid, found = scene.components.uuid.get(eid) end function example_factory_remove() scene.components.uuid.remove(eid) end function example_component_usage(...
local metric_train_count = monitoring.gauge("advtrains_active_train_count", "count of active trains") -- list of active trains local active_trains = {} local timer = 0 minetest.register_globalstep(function(dtime) timer = timer + dtime -- every 10 seconds if timer < 10 then return end timer = 0 for _, train i...
local gate_config = require("app.public.config.gate_config") local gate_manager = class("gate_manager") local _instance = nil function gate_manager.get_instance() if not _instance then _instance = gate_manager.new() end return _instance end function gate_manager:ctor() --TODO解析关卡信息 self....
local S = core.get_translator(pbmarks.modname) local ui_handlers = { "sfinv_buttons", } if not core.global_exists("sfinv_buttons") then pbmarks.log("warning", "compatible UI handler not available, please install one of " .. core.serialize(ui_handlers):gsub("return ", "")) return end sfinv_buttons.register_but...
----------------------------------------- -- ID: 5478 -- Monk Die -- Teaches the job ability Monk's Roll ----------------------------------------- function onItemCheck(target) return target:canLearnAbility(tpz.jobAbility.MONKS_ROLL) end function onItemUse(target) target:addLearnedAbility(tpz.jobAbility.MONKS_...
-- defines the outward screen transition for every screen -- this is a full screen fade into black return Def.Quad { InitCommand = function(self) self:xy(SCREEN_CENTER_X, SCREEN_CENTER_Y):zoomto(SCREEN_WIDTH, SCREEN_HEIGHT) end, OnCommand = function(self) self:diffuse(color("0,0,0,0")):sleep(0.1):linear(0.1):dif...
local constants = require 'constants' return { computeRebound = function(obj, rectangle) if obj.x >= rectangle.right then obj.x = rectangle.right obj.speedX = obj.speedX * -1 elseif obj.x <= rectangle.left then obj.x = rectangle.left obj.speedX = obj.speedX * -1 end if obj.y ...
local helpers = require "spec.helpers" describe("oidc plugin", function() local proxy_client local admin_client local timeout = 6000 setup(function() local api1 = assert(helpers.dao.apis:insert { name = "mock", upstream_url = "http://mockbin.com", uris = { "/mock" } }) print("Ap...
local parent = require 'actor' local Bullet = require 'bullet' local Jelly = require 'jelly' local Shake = require 'shake' local Turret = require 'turret' local Upgrade = require 'upgrade' local controls = { upleft = { dir = 3 }, up = { dir = 4 }, upright = { dir = 5 }, downright = { dir = 0 }, do...
local function create_ps_node(ps, node_data) local ps_node = PSNode(node_data.name) if node_data.pos then ps_node:set_translate(node_data.pos) end return ps_node end local function create_ps_camera(ps, camera_data) local ps_camera = PSCamera(camera_data.name) if camera_data.pos then ps_camera:set_...
-- Local instances of Global tables -- local PA = PersonalAssistant -- ===================================================================================================================== local PAIntegrationMenuDefaults = { name = table.concat({GetString(SI_PA_PROFILE), " ", 1}), -- ------------------------...
---------------------------------------------------------------------------- --Matrix4x4 ---------------------------------------------------------------------------- Matrix4x4= {Ma00 = 1.0, Ma01 = 0.0, Ma02 = 0.0, Ma03 = 0.0, Ma10 = 0.0, Ma11 = 1.0, Ma12 = 0.0, Ma13 = 0.0, Ma20 = 0.0, Ma21 = ...
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB local NP = E:GetModule('NamePlates_v1') local ACD = E.Libs.AceConfigDialog local next = next local ipairs = ipairs local tremove = tremove local tinsert = tinsert local tsort = table.sort local tonumber = tonumber local tcon...
-- Copyright 2011-2012 Nils Nordman <nino at nordman.org> -- Copyright 2012-2013 Robert Gieseke <robert.gieseke@gmail.com> -- Copyright 2012-2014 Robert Gieseke <rob.g@web.de> -- Copyright 2017 Stephen Gaito <stephen@perceptisys.co.uk> -- -- License: MIT -- -- Permission is hereby granted, free of charge, to any person...
local Game = require("Game") function love.load() Game = Game:new() end function love.draw() Game:draw() end function love.update(dt) Game:update(dt) end function love.keypressed(key, unicode) Game:keypressed(key, unicode) if key == "escape" then love.event.quit() end end
-- Gets the UpdateId (Unix Timestamp of the date the game was last updated) of the game you are currently in, useful for checking if game has updated and a script needs to be updated return(tostring(DateTime.fromIsoDate(game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId).Updated).UnixTimestamp))