content
stringlengths
5
1.05M
-- system.lua local server local client = {} local n_success = 0 local n_failure = 0 local n_tests = 1 local ncli = 0 local params local T = sdl.timer(.001,"T") local function Start(nclients, ip, port, npings, ping_int, timeout) n_tests = nclients or n_tests params = { ip, port, npings, ping_int, timeout } --...
local component = require("component") local computer = require("computer") local fs = require("filesystem") local shell = require("shell") local term = require("term") if not require("auth").isRoot() then io.stderr:write("not authorized") return end local args, options = shell.parse(...) if not component.isAvai...
MOAISim.setStep ( 1 / 60 ) MOAISim.clearLoopFlags () MOAISim.setLoopFlags ( MOAISim.SIM_LOOP_ALLOW_BOOST ) MOAISim.setLoopFlags ( MOAISim.SIM_LOOP_LONG_DELAY ) MOAISim.setBoostThreshold ( 0 ) local config = { title = "Hanappe", screenWidth = 480, screenHeight = 320, mainScene = "main_scene", } return ...
-- -- target.lua -- Target = {} Target.__index = Target Target.instances = {} --------------------------------------------------------------------------- -- -- Target:create() -- -- -- --------------------------------------------------------------------------- function Target:create(player,key,name) local id = #Tar...
require("__5dim_core__.lib.logistic.generation-roboport") local speed = 1000 local modules = 5 local energy = 50 local emisions = 100 local logistic = 25 local constructions = 55 local botSlot = 7 local recharges = 40 local slots = 4 local techCount = 500 -- Electric furnace 01 genRoboports { number = "01", s...
local Class = require("hamsterTank.Class") local Sprite = require("hamsterTank.Sprite") local utils = require("hamsterTank.utils") local M = Class.new() function M:init(tank, config) self.tank = tank self.game = self.tank.game local x, y, angle = utils.decompose2(config.transform) self.body = love.physics.n...
return (function(addons, addon, field) local toc = addons[addon] return toc and toc.attrs[field] or nil end)(...)
-- Copywrite 2020 -- Scott Smith -- local export = export export. hal = {conf = hal_conf} hal.debug = {} export. keys2 = require "keys2" --{{{populate hal_conf.AG do local game_config = "game.cfg" local data = require"utils.io".open("./"..game_config, "r") if data then local idat = require"ini".parse(data:read("*...
#!/usr/bin/env lua5.3 --[[ Copyright 2019 Valeri Ochinski 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 appli...
-------------------------------- -- @module EaseCircleActionIn -- @extend ActionEase -- @parent_module cc ---@class cc.EaseCircleActionIn:cc.ActionEase local EaseCircleActionIn = {} cc.EaseCircleActionIn = EaseCircleActionIn -------------------------------- --- ---@param action cc.ActionInterval ---@return cc.EaseC...
local _, T = ... local L = T.L -- Default settings T.defaults = { ["AddonEnabled"] = true, ["EquippableOnly"] = true, } -- Create the frame and register events local frame = CreateFrame("FRAME", "RequiresLevelXFrame") frame:RegisterEvent("VARIABLES_LOADED") -- Function to add information to item tooltips local f...
-- slb_teleport trigger ENT.Base = "base_entity" ENT.Type = "brush" ENT.AlreadyTeleported = 0 /*--------------------------------------------------------- Name: Initialize ---------------------------------------------------------*/ function ENT:Initialize() end /*-----------------------------------------...
data:extend({ { type = "item", name = "5d-personal-roboport-mk2-equipment", icon = "__5dim_equipment__/graphics/icons/personal-roboport2-equipment.png", placed_as_equipment_result = "5d-personal-roboport-mk2-equipment", flags = {"goes-to-main-inventory"}, subgroup = "armor-roboport", order...
--!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...
L = LANG.GetLanguageTableReference("deutsch") -- GENERAL ROLE LANGUAGE STRINGS L[NECROMANCER.name] = "Geisterbeschwörer" L[NECROMANCER.defaultTeam] = "TEAM Geisterbeschwörer" L["hilite_win_" .. NECROMANCER.defaultTeam] = "THE NECRO WON" L["win_" .. NECROMANCER.defaultTeam] = "Der Geisterbeschwörer hat gewonnen!" L["in...
local BMSPF = "[B] %-12s%-15s%dms" function inspect(t) if type(t) == 'string' then return '"' .. tostring(t) .. '"' end if type(t) ~= 'table' then return tostring(t) end local s = {} for k,v in pairs(t) do if k ~= #s+1 then s[#s+1] = "[" .. inspect(k) .. "] = " .. inspect(v) else s[#s+1] =...
ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) function GenerateAccountNumber() local running = true local account = nil while running do local rand = '' .. math.random(11111,99999) local count = MySQL.Sync.fetchScalar("SELECT COUNT(account_number) FROM...
local parser_config = require("nvim-treesitter.parsers").get_parser_configs() parser_config.crystal = { install_info = { url = "https://github.com/will/tree-sitter-crystal", -- local path or git repo files = {"src/parser.c"} } }
local extractStatus = require("ExtractStatus") local taskManager = require("TaskManager") local Task = {} Task.__index = Task Task.TaskStatus = require("StatusEnum") Task.sleep = require("Sleep") function Task.new(fn) local self = setmetatable({}, Task) if type(fn) == "function" then self.Coroutine = coroutine.c...
moduleName = "[GameOverScreen]" local mouseSens = 0.01 --this var has to be global on main.lua local rating = "??" local scoreRecv = nil local precisionRecv = nil local backButtonPos = {} local backButtonSize = {} local backButtonBoundaries = {} local backMult = 1 local backX = 0 local sizeBack = 1 function gameOver...
-- =========================================================================== -- -- Slideout panel for selecting a new destination for a spy unit -- -- =========================================================================== include("InstanceManager"); include("AnimSidePanelSupport"); include("SupportFunctions"); i...
return Polygon.new({ 6, 555, 244, 565, 478, 555, 517, 398, 631, 408, 638, 558, 840, 549, 893, 507, 983, 514, 993, 572, 1264, 583, 1264, 699, 12, 711, }).points
object_tangible_loot_npc_loot_electro_polearm_generic = object_tangible_loot_npc_loot_shared_electro_polearm_generic:new { } ObjectTemplates:addTemplate(object_tangible_loot_npc_loot_electro_polearm_generic, "object/tangible/loot/npc/loot/electro_polearm_generic.iff")
lightning_storm = { cast = function(player) -- dmg 6802 to 90 ac local damage = 3600 local aethers = 87000 local magicCost = 1200 if (not player:canCast(1, 1, 0)) then return end if (player.magic < magicCost) then player:sendMinitext("Your will is too weak.") return end player:sendAction(...
local cal = require("common.cal") local simple = require("common.simple") local th_mod_flow = require("sync.th.mod_flow") local filters = require("sync.th.mod_flow_filters") local global = require("q.global") local main = global.daom.Get("main") local ret = main.Keys("def", "", "*", nil) return ret
return { name = "dnsforge.de", label = _("DNS Forge - DE"), resolver_url = "https://dnsforge.de/dns-query", bootstrap_dns = "176.9.93.198,176.9.1.117,2a01:4f8:151:34aa::198,2a01:4f8:141:316d::117", help_link = "https://dnsforge.de/", help_link_text = "DNSForge.de" }
slot2 = "config.globalDefine" FishingJoyRequireLua(slot1) slot2 = "config.remoteConfig.FishingJoy_Proto" FishingJoyRequireLua(slot1) slot0 = FishingJoyRequireLua(slot1) slot1 = FishingJoyRequireLua("config.localConfig.FishingJoy_Fish") slot2 = FishingJoyRequireLua("config.localConfig.FishingJoy_Cannon") slot3 = Fis...
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' description 'ESX UteKnark by DemmyDemon Modified for QBCore by Terranzin#5119' shared_scripts { '@qb-core/shared/locale.lua', --'locales/*.lua', 'config.lua', 'lib/octree.lua', 'lib/growth.lua', 'lib/cropstate.lua', } client_scrip...
local flavours = {"PCRE", "POSIX", "oniguruma", "TRE", "GNU"} -- Rockspec data -- Variables to be interpolated: -- -- flavour: regex library -- version -- md5sum: checksum of distribution tarball -- When Lua 5.1 support is dropped, use an env argument with loadfile -- instead of wrapping in a table return { default...
--[[ examine_c "Public/Game/GUI/examine_c.swf" Show tooltip event: "showFormattedTooltip" tooltipArray ExternalInterface.call events: switch(this.type) { case 0: ExternalInterface.call("selectNone",id); break; case 1: ExternalInterface.call("selectStat",id); break; case 2: ExternalInterface.call("select...
require 'torch' require 'nn' require 'mon_LanguageModel' require 'util.DataLoader' local utils = require 'util.utils' local cmd = torch.CmdLine() cmd:option('-checkpoint', '') cmd:option('-split', 'test') cmd:option('-gpu', 0) cmd:option('-gpu_backend', 'cuda') local opt = cmd:parse(arg) -- Set up GPU stuff loca...
#!/usr/bin/lua path = arg[1] file = io.open(path, 'r') -- Determine if the file exists if file == nil then return end for value in file:lines() do print(value) end os.execute("awk '{print $2}' ./test") io.close(file)
--[[ --MIT License -- --Copyright (c) 2019 manilarome --Copyright (c) 2020 Tom Meyers -- --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 ...
data:extend ({ { type = "recipe", name = "sell-chest-proxy-wars", enabled = true, ingredients = { {"iron-chest", 1}, {"electronic-circuit", 4} }, result = "sell-chest-proxy-wars", energy_required = 4 }, { type = "item", name = "sell-chest-proxy-wars", icon = "__Proxy_Wars__/graphics/sell_...
-- A collection of individual operations that will be tested with other components -- Importing modules local elasticsearch = require "elasticsearch" local util = require "lib.util" -- Setting up environment local _ENV = lunit.TEST_CASE "tests.integration.operations" -- Declaring module local operations = {} local ...
local M = {} M.game_width = 1250 M.game_height = 1500 M.gui_order = {BACKGROUND = 0, DEFAULT = 1, TRANSITION = 14, DEBUG = 15} return M
require("items/item_refresher") function OnDealDamage(keys) local caster = keys.caster local target = keys.unit local ability = keys.ability if RollPercentage(ability:GetLevelSpecialValueFor("bash_chance", ability:GetLevel() - 1)) and not caster:HasModifier("modifier_item_refresher_core_bash_cooldown") then targ...
local horizontalRoomWrapController = {} horizontalRoomWrapController.name = "MaxHelpingHand/HorizontalRoomWrapController" horizontalRoomWrapController.depth = 0 horizontalRoomWrapController.placements = { name = "controller" } horizontalRoomWrapController.texture = "ahorn/MaxHelpingHand/horizontal_room_wrap" ret...
return require("lapis.flow")
--[[ Copyright (C) 2017-2019 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the ho...
--[[ Created by Sharkringan kthx --]] wait(1/60) plr = game:service'Players'.LocalPlayer char = plr.Character root = char:FindFirstChild'HumanoidRootPart' hum = char:FindFirstChildOfClass'Humanoid' mouse = plr:GetMouse() clones = {} if char.Head:FindFirstChild'face' then char.Head.face:Destroy() end for _, a in p...
-- Copyright (c) Jérémie N'gadi -- -- All rights reserved. -- -- Even if 'All rights reserved' is very clear : -- -- You shall not use any piece of this software in a commercial product / service -- You shall not resell this software -- You shall not provide any facility to install this particular software in a c...
-- luacheck: globals hs powerSource batteryWatcher sessionWatcher local function mainsPower() print("AC Power") -- Nothing currently end local function killApp(name) local app = hs.application.get(name) if app ~= nil then app:kill() print("killed " .. name) end end local function...
local interiors_ = {} local interiorMarkers = {} local resourceFromInterior = {} --format interior = { [resource_] = { [id] = { return= { [element],[element] }, entry=[element] } } addEvent ( "NGCbank_int.doTriggerServerEvents", true ) addEvent ( "NGCbank_int.onPlayerInteriorHit" ) addEvent ( "NGCbank_int.onPlayerInt...
local self = {} GLib.Lua.StringConstant = GLib.MakeConstructor (self, GLib.Lua.GarbageCollectedConstant) function self:ctor (str) self.Type = GLib.Lua.GarbageCollectedConstantType.String self.Length = 0 self.Value = str or "" end function self:Deserialize (type, inBuffer) self.Length = type - GLib.Lua.GarbageColl...
local _, addon = ... -- Index is from the first argument of DungeonInfoFunc. -- This data table is needed as there's no way to find out how many encounters are in each part of the same raid (to my knowledge). addon.raidData = { -- MoP Raid finder as of 5.4 [527] = { numEncounters = 3, startFrom = 1 }, -- Guardian...
--[[---------------------------------------------------------------------------- Showing distance, intensity and confidence images in separate views. ------------------------------------------------------------------------------]] local deco = View.ImageDecoration.create() deco:setRange(0, 10000) -- Create the cam...
id = 'V-38688' severity = 'medium' weight = 10.0 title = 'A login banner must be displayed immediately prior to, or as part of, graphical desktop environment login prompts.' description = 'An appropriate warning message reinforces policy awareness during the logon process and facilitates possible legal action against a...
--[[ Netherstorm -- Arcanist Ardonis.lua This script was written and is protected by the GPL v2. This script was released by BlackHer0 of the BLUA Scripting Project. Please give proper accredidations when re-releasing or sharing this script with others in the emulation community. ~~End of License Agreement -- BlackHe...
Weapon.PrettyName = "MP5K" Weapon.WeaponID = "fas2_mp5k" Weapon.DamageMultiplier = 2.1 Weapon.WeaponType = WEAPON_PRIMARY
---------------------------------------------------------------------------------------------------- -- A resource management system that caches loaded resources to maximize performance. -- -- @author Makoto -- @release V3.0.0 ---------------------------------------------------------------------------------------------...
--[[ --=====================================================================================================-- Script Name: One In The Chamber, for SAPP (PC & CE) Description: GAME MECHANICS: 1). Spawn with a pistol that has no ammo. 2). Melee someone to receive 1 bullet 3). Killing someone results in recieving 1 more...
----------------------- -- NO: A game of numbers -- Created: 23.08.08 by Michael Enger -- Version: 0.2 -- Website: http://www.facemeandscream.com -- Licence: ZLIB ----------------------- -- Handles buttons and such. ----------------------- Hint = {} Hint.__index = Hint function Hint.create(type,text,x,y)...
local class = require "class" local Entity = require "entity" local M = class.Class(Entity) function M.new() return setmetatable({},M) end function M:init(id, kind, x, y) self._super(self,id,"item",kind,x,y) self.isStatic = false self.isFromChest = false end function M:handleDespawn(params) s...
print('Initial heap', node.heap()) node.setcpufreq(node.CPU160MHZ) local secrets = require 'secrets' local WIFI_INDICATOR_PIN = 4 gpio.mode(WIFI_INDICATOR_PIN, gpio.OUTPUT, gpio.FLOAT) pwm.setup(WIFI_INDICATOR_PIN, 3, 512) pwm.start(WIFI_INDICATOR_PIN) wifi.setphymode(wifi.PHYMODE_B) wifi.setmode(wifi.STATION) --wif...
local mod = {} local document = {} document.lines = [] document.text = "" document.pos = 0 document.length = function () return #document.text end document.insert = function (text, pos) for i=1, #document.lines do if pos < document.lines[i] then break end pos = pos - document.lines[i] end ...
--[[ Copyright 2011-2018 João Cardoso Poncho is distributed under the terms of the GNU General Public License (Version 3). As a special exception, the copyright holders of this library give you permission to embed it with independent modules to produce an addon, regardless of the license terms of these independent mod...
Config = {} Config.Locale = 'nl' Config.DrawDistance = 10 Config.CurrancySymbol = '€' Config.CanProcessInVehicle = false -- when `true` players are allowed to sit in their vehicle and use the circle Config.Marker = { ['harvest'] = { x = 10.0, y = 10.0, ...
dofile("table_show.lua") dofile("urlcode.lua") local urlparse = require("socket.url") local http = require("socket.http") JSON = (loadfile "JSON.lua")() local item_dir = os.getenv('item_dir') local warc_file_base = os.getenv('warc_file_base') local item_type = nil local item_name = nil local item_value = nil local ur...
--[[ main.lua Constant specifics for the addon --]] local ADDON, Addon = ... Addon.FrameTemplate = BackdropTemplateMixin and 'BackdropTemplate' Addon.Slash = 'bgn'
require("mod.titles.event.save") require("mod.titles.event.title")
----------------------------------- -- Gust Slash -- Dagger weapon skill -- Skill level: 40 -- Deals wind elemental damage. Damage varies with TP. -- Will not stack with Sneak Attack. -- Aligned with the Breeze Gorget. -- Aligned with the Breeze Belt. -- Element: Wind -- Modifiers: DEX:20% INT:20% -- 100%TP 200%TP ...
require 'qt' qt.require 'libqtsvg' local qt = qt local type = type qtsvg = qtsvg or {} function qtsvg.loadsvg(filename) return qt.QSvgRenderer(filename) end function qtsvg.paintsvg(port,svg,...) if type(port) == "table" then port = port.port end if not qt.isa(port, "QtLuaPainter") then erro...
local utils = {} function utils.copy(tab) local t = {} for k, v in pairs(tab) do t[k] = v end return t end return utils
local vertex_motion = include('lib/3d/utils/vertex_motion') local draw_3d = include('lib/3d/utils/draw_3d') -- ------------------------------------------------------------------------ local Point = {} Point.__index = Point -- ------------------------------------------------------------------------ -- CONSTRUCTOR...
require 'lib/util' local Ant = {} Ant.__index = Ant -- simple constructor with coordinates and reference to the board object function Ant.new(x, y, board) local a = {} setmetatable(a, Ant) a.board = board a.path = { {x, y} } a.status = 'search' a.pheromone = 0 return a end -- move this...
return { ["id"]=10005, ["name"]="夜晚城市", ["groupName"]="Demo测试关卡", ["playStartAnimation"]=true, ["sceneName"]="Demo02.unity", ["sceneFile"]="Assets/Scenes/Demo02.unity", ["desc"]="", ["borns"]={ }, ["props"]={ }, ["triggers"]={ [1]={ ["id"]=3001, ["enable"]=true, ["unlimited"]=false, ["desc"]="...
minetest.register_node("factory:sieve_stack", { drawtype = "nodebox", tiles = {"factory_brick.png"}, paramtype = "light", description = factory.S("stack sieve"), groups = {cracky=3}, node_box = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0.5, -0.3}, {-0.5, -0.5, 0.5, 0.5, 0.5, 0.3}, {-0...
return function(props) props = props or {} props.canvasOffset = vector2(0, 0) props.canvasSize = guiCoord(1, 0, 1, 200) props.scrollBarAlpha = 1 props.scrollBarColour = colour(1,1,1) props.scrollBarWidth = 8 props.scrollBarPadding = 1 local self = {} self.container = core.construct("guiFrame", {parent = props...
return function() local liter = require(game:GetService('ReplicatedStorage').liter) it('should increment the counter after each step in the iteration', function() local count = 0 local iter = liter.array({ 1, 5 }):inspect(function() count += 1 end) iter:after() expect(count).to.equal(1) it...
return LoadActor(THEME:GetPathG("","_grade"),"Tier02");
--[[ © 2015 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 --]] CW_SPANISH = Clockwork.lang:GetTable("Spanish"); CW_SPANISH["YouSetContainerP...
entitylist = {} entitylist.__index = entitylist entitylist.__metatable = "None of your business" function entitylist:new() local t = { count = 0, data = {} } return setmetatable(t,entitylist) end function entitylist.addentity(self,e) self.count = self.count + 1 self.data[self.count] = e end funct...
args = {...} if #args > 0 then require = nil if fs.exists("/usr/apis/require") then require = fs.open("/usr/apis/require", "r") elseif shell.resolveProgram("require") and fs.exists(shell.resolveProgram("require")) then require = fs.open(shell.resolveProgram("require"), "r") end if r...
return function() local ReplicatedStorage = game:GetService("ReplicatedStorage") local Packages = ReplicatedStorage.Packages local Llama = require(Packages.Llama) local List = Llama.List local first = List.first it("should return the first element of a list", function() local a = { "foo", "bar" } expect(f...
dofile("server.lua")dofile("getSensors.lua")dofile("initwifi.lua")dofile("file_s.lua")sD={}function controller()node.egc.setmode(node.egc.ALWAYS)local a={c='cache.cache',ssnc='ssn.cache',pwdc='pass.cache',apc='ap.cache',prd=15000,cDrtn=31536000,ssnDrtn=1}wifi_ap_launch(a.apc)local b=tmr.create()b:register(100,tmr.ALARM...
st_targs = T{'<st>', '<stpc>', '<stpt>', '<stal>', '<stnpc>'} st_actions = T{'/attack', '/a', '/assist', '/as', '/magic', '/ma', '/ninjutsu', '/nin', '/song', '/so', '/jobability', '/ja', '/pet', '/bstpet', '/weaponskill', '/ws', '/monsterskill', '/ms', '/shoot', '/range', '/ra', '/throw', '/check', '/c', '/c...
local array = include( "modules/array" ) local util = include( "modules/util" ) local cdefs = include( "client_defs" ) local simdefs = include("sim/simdefs") local simquery = include("sim/simquery") local abilityutil = include( "sim/abilities/abilityutil" ) local recharge = { name = STRINGS.ABILITIES.RECHARGE, cr...
function init() g_keyboard.bindKeyDown('Ctrl+I', toggle) inventoryButton = modules.client_topmenu.addRightGameToggleButton('inventoryButton', tr('Inventory') .. ' (Ctrl+I)', '/images/topbuttons/inventory', toggle) inventoryButton:setVisible(false) connect(g_game, { onGameStart = online, onGameEnd = offl...
return function(player) if not global.players[player.index].settings.show_research then return end local string = global.research_progress_strings[player.force.index] if string then return { "", { "statsgui.research-finished" }, " = ", string } end end
laptop.register_theme("Green Shell", { desktop_background = "laptop_theme_greenshell_desktop_background.png", app_background = "laptop_theme_greenshell_app_background.png", major_button = "laptop_theme_greenshell_major_button.png", major_textcolor = "#00FF33", minor_button = "laptop_theme_greenshell_minor_button.p...
gpio.write(4, gpio.LOW) gpio.mode(4, gpio.OUTPUT)
--[[ TheNexusAvenger Generates a house cell. --]] local Workspace = game:GetService("Workspace") local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local TweenService = game:GetService("TweenService") local ReplicatedStorageProject = require(ReplicatedStorage:Wa...
--!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...
local image = require('../image') return { name = "Crystal Ball", description = "You figure a wizard might want this.", image = image.crystalBall }
------------------------------------------------------------------------------- -- Delleren -- External CD caller. -- (C) 2015 Mukunda Johnson (mukunda@mukunda.com) -- -- See LICENSE-DELLEREN.TXT ------------------------------------------------------------------------------- local Delleren = DellerenAddon local L = De...
--[==[ * 返回的状态码说明: * `OK`: 请求成功. * `auth:method_not_allowed`: 请求方法不被允许. * `auth:auth_failed`: 鉴权失败. * `validate:url_not_found`: 请求的URL不存在. * `validate:url_arg_error`: 参数错误. * `validate:post_data_error`: 上传的数据错误. * `resource:not_found`: 查询的资源在系统中不存在. * `internal:db_error`: 内部错误之数据库错误. ...
local Deque = require('./Deque') local timer = require('timer') local yield = coroutine.yield local resume = coroutine.resume local running = coroutine.running local setTimeout = timer.setTimeout local Mutex = require('class')('Mutex', Deque) function Mutex:__init() Deque.__init(self) self._active = fa...
local errors = {} function system_error_msg(ec) if not ec then return "nil" end return errors[ec].desc end local function add(err) assert(errors[err.code] == nil, string.format("have the same error code[%x], msg[%s]", err.code, err.message)) errors[err.code] = {code = err.code, desc = err.desc} re...
--- -- The brute library is an attempt to create a common framework for performing -- password guessing against remote services. -- -- The library currently attempts to parallelize the guessing by starting -- a number of working threads and increasing that number gradually until -- brute.threads limit is reached. The s...
local mod = DBM:NewMod("NLTrash", "DBM-Party-Legion", 5) local L = mod:GetLocalizedStrings() mod:SetRevision(("$Revision: 17204 $"):sub(12, -3)) --mod:SetModelID(47785) mod:SetZone() mod.isTrashMod = true mod:RegisterEvents( "SPELL_CAST_START 183088", "SPELL_AURA_APPLIED 200154 183407" ) local warn...
require 'torch' require 'nn' require 'cudnn' require 'cunn' require 'image' require 'paths' require 'optim' require 'lib/ArtisticStyleLossCriterion' require 'lib/ImageLoaderAsync' require 'lib/TVLossModule' require 'lib/StyleINLossModule' require 'lib/AdaptiveInstanceNormalization'; require 'lib/utils' local cmd = tor...
local AddonName, AddonTable = ... -- BfA Reputation AddonTable.reputation = { 174518, }
local geometry = {} function geometry.pointInRect(rect, point) return point.x >= rect.x and point.y >= rect.y and point.x <= rect.x + rect.w and point.y <= rect.y + rect.h end function geometry.rectMidpoint(rect) return { x = rect.x + rect.w * .5, y = rect.y + ...
-- tolua: function class -- Written by Waldemar Celes -- TeCGraf/PUC-Rio -- Jul 1998 -- $Id: function.lua,v 1.4 2009/11/24 16:45:14 fabraham Exp $ -- This code is free software; you can redistribute it and/or modify it. -- The software provided hereunder is on an "as is" basis, and -- the author has no obligation to p...
local PRE_REC = 2 TimeWaver = { name = "time~waver", icon = "~", loop_quantization = {4,8,16,32,64,128}, -- 1bar, 2bar, 4bar, ... Wave = function (o,conf) return { steps = conf and conf["steps"] or {}, playing = conf and conf["playing"] or false, recording = false, star...
-- See LICENSE for terms SpiceHarvester = { -- Melanger colour Color = -11328253, -- shuttle colours Color1 = -12247037, Color2 = -11196403, Color3 = -13297406, Max_Shuttles = 50, } local DoneObject = DoneObject local Sleep = Sleep local IsValid = IsValid local PlaySound = PlaySound local GetSoundDuration = Ge...
local function luabundle() print("Give a star: https://github.com/Benjamin-Dobell/luabundle !") end return luabundle
function getRandomPoint(radius) local a = math.random() local b = math.random() return b*radius*math.cos(2*math.pi*a/b), b*radius*math.sin(2*math.pi*a/b) end
--[[ module evt Contains various helper functions and types for connecting events. --]] local tabutil = require 'tabutil' local util = require 'util' local oo = require 'oo' -- Compatibility function jd.connect(component, event, callback) -- When we get event="foo", we need to call the components onFoo f...