content
stringlengths
5
1.05M
local u = require "resty.utf8rewind" local validation = require "resty.validation" local validators = validation.validators local factory = getmetatable(validators) local type = type function factory.utf8upper() return function(value) local t = type(value) if t == "string" then ...
-- Helper for more efficient collision checks in 2D space (using 3D coordinates) __source 'lua/api_extras_hashspace.cpp' ffi.cdef [[ typedef struct { int* _iterate_cur; int* _iterate_end; } hashspace; ]] ---@class ac.HashSpaceItem local HashSpaceItem = class('HashSpaceItem') function HashSpaceItem.allocate(h, i...
local Usbcdc = {} function Usbcdc:init(device) self.vstruct = require("vstruct") if device == "" then device = "/dev/ttyACM0" end os.execute('stty -F ' .. device .. ' 115200 raw -iexten -echo -echoe -echok -echoctl') self.tty = io.open(device, "w") self.tty:setvbuf("no"); print("Usbcdc rgbw backend...
local API = { NAME = "setPiston", FLAG = { icon = true, -- (TRUE) Use icons for arguments erro = true, -- (TRUE) Generate an error on dupe or no docs extr = false, -- (TRUE) Use the external wiremod types remv = false, -- (TRUE) Replace void type with empty string quot = true, -- (TRUE) Place...
-- split.lua -- Coltrane Willsey -- 2022-03-07 [23:24] function split(str, sep) if not (sep) then sep = "%s" end local t = {} for str in string.gmatch(str,"([^"..sep.."]+)") do table.insert(t,str) end return t end return split
--lns/httpd/lnsservlet.lns local _moduleObj = {} local __mod__ = '@lns.@httpd.@lnsservlet' local _lune = {} if _lune6 then _lune = _lune6 end function _lune.__isInstanceOf( obj, class ) while obj do local meta = getmetatable( obj ) if not meta then return false end local indexTbl = meta....
-- -- Syntax Highlighting for markdown / text. -- -- This mode only does two things: -- -- * Highlights URLS. -- -- * Highlights trailing whitespace. -- -- Steve -- -- -- -- This file is a Lua module. -- local mymodule = {} -- -- The string we return. -- local retval = "" -- -- Helper to add the colour. -- functio...
--[[ author: jie123108@163.com date: 20151120 ]] local cjson = require "cjson" local _M = {} function _M.loads(str) local ok, jso = pcall(function() return cjson.decode(str) end) if ok then return jso else return nil, jso end end function _M.dumps(tab) if tab and type(tab) == 'table'...
local F, G = unpack(select(2, ...)) local function noop() end VehicleSeatIndicator:ClearAllPoints() VehicleSeatIndicator:SetPoint("TOPRIGHT", G.frame, "TOPRIGHT", -290, -300) VehicleSeatIndicator.ClearAllPoints = noop VehicleSeatIndicator.SetPoint = noop VehicleSeatIndicator:SetHeight(476)
local Mod = RegisterMod("The D2",1) local game = Game() Mod.COLLECTIBLE_D2 = Isaac.GetItemIdByName("The D2") --[[ The main function for the item. This gets called when the player uses the item --]] function Mod:ActivateD2(_Type, RNG) -- get the player local player = Isaac.GetPlayer(0) local playerType = player:Ge...
-------------------------------- ---COPYRIGHT © Centurion#0457--- -------------------------------- ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) RegisterServerEvent('CenturionFarmerJob:giveItem') AddEventHandler('CenturionFarmerJob:giveItem', function(itemName, qnt) local xPlayer = ESX....
--idek what qualifies as util really -- useless streamlining function util.MultiNetworkStrings(header, ...) local args = {...} for k, v in pairs(args) do util.AddNetworkString(header .. v) end end
-- 版本号 require("version") -- 状态码 require("code") -- 基础 require("base.luaext") cjson = require("cjson")
---@class cmp.Event ---@field private events table<string, function[]> local event = {} ---Create vents event.new = function() local self = setmetatable({}, { __index = event }) self.events = {} return self end ---Add event listener ---@param name string ---@param callback function ---@return function event.on ...
if (event.type=="on") then digiline_send("rtc", "GET") end if (event.type=="digiline" and event.channel=="rtc") then time = {} time.hour = math.floor(event.msg * 24) time.hour1 = math.floor(time.hour / 10) time.hour2 = math.floor(time.hour - time.hour1 * 10) time.minute = math.floor((event.msg * 24...
function setOption(scope, key, value) local scopes = {global = vim.o, buffer = vim.bo, window = vim.wo} scopes[scope][key] = value if scope ~= 'global' then scopes['global'][key] = value end end
project "freeimage-core" kind "StaticLib" language "C++" cppdialect "C++11" systemversion "latest" targetdir (binLocationOverride.."bin/" .. outputdir .. "/%{prj.name}") objdir (binLocationOverride.."bin-int/" .. outputdir .. "/%{prj.name}") files { "*.cpp", "*.h", } defines { "FREEIMAGE_LIB", "...
jester.action_map.get_digits = { mod = "get_digits", func = "get_digits", } jester.action_map.flush_digits = { mod = "get_digits", func = "flush_digits", }
local uci = require "uci" local M = {} local RPC_OUI_MENU_FILES = "/usr/share/oui/menu.d/*.json" local function menu_files(files) for _, file in ipairs(files) do local f = io.open(file) if not f then return false end f:close() end return true end function M.get_lang() local ...
local Native = require('lib.native.native') ---@class BlendMode local BlendMode = { None = Native.ConvertBlendMode(0), --BLEND_MODE_NONE DontCare = Native.ConvertBlendMode(0), --BLEND_MODE_DONT_CARE Keyalpha = Native.ConvertBlendMode(1), --BLEND_MODE_KEYALPHA Blend = Native.ConvertBlendMode(2), --BLEND...
object_tangible_component_weapon_core_weapon_core_melee_standard = object_tangible_component_weapon_core_shared_weapon_core_melee_standard:new { } ObjectTemplates:addTemplate(object_tangible_component_weapon_core_weapon_core_melee_standard, "object/tangible/component/weapon/core/weapon_core_melee_standard.iff")
-- 合约初始化 function on_deploy() local all_data = contract.get_data() all_data.created_table_count = 0 all_data.finish_table_count = 0 all_data.unfinish_table_count = 0 all_data.last_table_id = 0 all_data.is_active = true all_data.tables = {} -- 正在进行中的牌桌 all_data.table_creators = {} print("on_deploy") contract....
--Modified by Ransom players = getElementsByType ( "player" ) root = getRootElement () scoreboardRes = getResourceFromName("scoreboard") addEventHandler("onResourceStop",getResourceRootElement(getThisResource()), function() call(scoreboardRes,"removeScoreboardColumn","Current level") call(scoreboardRes,"removeScoreb...
local Job = require('plenary.job') local helpers = require('gmni.helpers') local spinner = require('gmni.spinner') local log = require('gmni.log') local links = require('gmni.links') local api = vim.api local function request(url, kwargs) kwargs = kwargs or {} local args = { '-iN' } local bufnr = api.nvim_get_cur...
----------------------------------- -- Area: Vunkerl Inlet (S) (F-5) -- NPC: Leafy Patch -- Involved in Quests -- !pos -418 -33 576 ----------------------------------- local ID = require("scripts/zones/Vunkerl_Inlet_[S]/IDs") require("scripts/globals/quests") ----------------------------------- function onTrade(playe...
local af = LoadActor(THEME:GetPathB("ScreenProfileSave", "decorations")) af[#af+1] = Def.Actor{ OnCommand=function(self) PROFILEMAN:SaveMachineProfile() self:queuecommand("Load") end, LoadCommand=function() SCREENMAN:GetTopScreen():Continue() end } return af
INFINITY = require "infinity" table = require("table") json = require "json" PageProperty = {type = "PageProperty"} function PageProperty:new(value) o = {} setmetatable(o, self) o.type = "PageProperty" o.values = {{-65535, value}} return o end function PageProperty:find_index(target_...
local commands = {} local customSpawnTable = false local allowedStyles = { [4] = true, [5] = true, [6] = true, [7] = true, [15] = true, [16] = true, } local internallyBannedWeapons = -- Fix for some debug warnings { [19] = true, [20] = true, [21] = true, } local server = setmetatable( {}, { __index = fu...
local lsp = require('lspconfig') local functions = require "utils.functions" local luaformat = require "lsp.servers.formatters.lua-format" -- local prettier = require "lsp.servers.formatters.prettier" local prettier_d = require "lsp.servers.formatters.prettier_d" local eslint_d = require "lsp.servers.linters.eslint_d"...
workspace "JobsGamez" architecture "x64" configurations { "Debug", "Release", "Dist" } outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" project "JobsGamez" location "JobsGamez" kind "SharedLib" language "C++" targetdir ("bin/" .. outputdir .. "/%{prj.name}") objdir ("bin-int/" .. outp...
local _ = [[----------------------------------------------------------------- -- muun - moonscript compatible class implementation -- Copyright 2019, 2021 megagrump@pm.me -- License: MIT. See LICENSE for details -----------------------------------------------------------------]] local wrap wrap = function(any, key) ...
--[[ This file is part of halimede. It is subject to the licence terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/pallene/halimede/master/COPYRIGHT. No part of halimede, including this file, may be copied, modified, propagated, or distributed exc...
-------------------------------------------------------------------------------- --<[ Общие события ]>----------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------------------------------------------------...
ENT.Type = "anim" ENT.PrintName = "Talker" ENT.Category = "NutScript" ENT.Spawnable = true ENT.AdminOnly = true function ENT:Initialize() if (SERVER) then self:SetModel("models/humans/groupm1/male_07.mdl") self:SetUseType(SIMPLE_USE) self:SetMoveType(MOVETYPE_NONE) self:DrawShadow(true) self:SetSolid(SOLID_...
local SOCKET = require 'socket' local utils = { enableTcpNoDelay = function(socket) socket:setoption("tcp-nodelay", true) return socket end, setNonBlocking = function(socket) socket:settimeout(0.0) return socket end, createServerSocket = function(port) ret...
local findSource = require 'core.find_source' local Mode local function parseValueSimily(callback, vm, source) local key = source[1] if not key then return nil end vm:eachSource(function (other) if other == source then goto CONTINUE end if other[1] == ke...
--[[ --------------------------------------------- Fool Job a game by hubert ronald --------------------------------------------- a game of liquid puzzle Gideros SDK Power and Lua coding. Artwork: Kenney Game Assets Platform Pack Industrial http://kenney.nl/assets/platformer-pack-industrial Design & ...
ITEM.name = "Hand Cannon" ITEM.description = "Makeshift weapon utilizing a flintlock system. On close range it is very effective." ITEM.model = "models/weapons/yurie_rustalpha/wm-handcannon.mdl" ITEM.class = "tfa_rustalpha_handcannon" ITEM.weaponCategory = "secondary" ITEM.width = 1 ITEM.height = 1 ITEM.chance = 27
SWEP.Base = "arccw_base" SWEP.Spawnable = true -- this obviously has to be set to true SWEP.Category = "ArcCW - World at War" -- edit this if you like SWEP.AdminOnly = false SWEP.PrintName = "S&W Model 27" SWEP.Trivia_Class = "Revolver" SWEP.Trivia_Desc = "Magnum revolver with a one hell of a kick. One was carried by...
-- require('core_x.ext.RenderMode') require('core_x.ext.ResTexture') require('core_x.ext.ResRenderTarget') require('core_x.ext.Random') require('core_x.ext.Color')
local targs = {...} local computer = require("computer") print(...) if not targs[1] then computer.shutdown() elseif targs[1]:sub(1,1) == "s" then computer.shutdown() elseif targs[1]:sub(1,1) == "r" then computer.shutdown(true) elseif targs[1] then print("Bad Argument: " .. targs[1] .. "\nTry 'r' or 's' or no argument")...
---------------------------------------------------------------------- -- -- put lines below into /etc/xdg/awesome/rc.lua -- ---------------------------------------------------------------------- local arnan_tagbox = require("arnan_tagbox") ---------------------------------------------------------------------- do ...
return { { desc = "鱼雷暴击率提高20.0%,暴击伤害提高65.0%", addition = { "20.0%(+2.2%)" }, effect_list = { { type = "BattleBuffAddBulletAttr", trigger = { "onTorpedoWeaponBulletCreate" }, arg_list = { attr = "cri", number = 0.2 } }, { type = "BattleBuffAddBulletAttr", t...
require "EasyConfigChucked1_Main" require "OptionScreens/ServerSettingsScreen" require "OptionScreens/SandBoxOptions" cndSpeechConfig = cndSpeechConfig or {} cndSpeechConfig.config = { --NPCsDontTalk = true, SpeechCanAttractsZombies = true, ShowOnlyAudibleSpeech = false, } cndSpeechConfig.modId = "Conditional-Spe...
-- Copyright (c) 2021 Trevor Redfern -- -- This software is released under the MIT License. -- https://opensource.org/licenses/MIT describe("moonpie.ui.find_by_component", function() local findByComponent = require "moonpie.ui.find_by_component" local Node = require "moonpie.ui.node" it("finds a node i...
--test.lua import("kernel.lua") quanta.startup(function()--初始化test --[[ import("test/buffer_test.lua") import("test/etcd_test.lua") import("test/json_test.lua") import("test/pack_test.lua") import("test/mongo_test.lua") import("test/router_test.lua") import("test/protobuf_test.lua") ...
require('gitsigns').setup{ signs = { add = {hl = 'GitSignsAdd' , text = '│', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'}, change = {hl = 'GitSignsChange', text = '│', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, delete = {hl = 'GitSignsDelete', text = '│', numhl='GitSignsDel...
local number = {} -------------------------------------------------------------------------------- function number.round(num) if num >= 0 then return math.floor(num + 0.5) else return math.ceil(num - 0.5) end end function number.roundToDecimalPlaces(num, decimalPlaces) local mult = 10 ^ (decimalPlaces or 0...
local silph_1_0 = DoorSlot("silph_1","0") local silph_1_0_hub = DoorSlotHub("silph_1","0",silph_1_0) silph_1_0:setHubIcon(silph_1_0_hub) local silph_1_1 = DoorSlot("silph_1","1") local silph_1_1_hub = DoorSlotHub("silph_1","1",silph_1_1) silph_1_1:setHubIcon(silph_1_1_hub) local silph_1_2 = DoorSlot("silph_1","2") loca...
#!/usr/bin/env lua -- -- tek/app/gendoc.lua - Document generator -- Written by Timm S. Mueller <tmueller at schulze-mueller.de> -- See copyright notice in COPYRIGHT -- -- Markers the source code parser reacts on are: -- -- module("foo.bar.class", foo.bar.superclass) -- [module directive to extract a module's class and...
--Copyright (c) 2013, Byrthnoth --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 t...
--- Library for accesing a mouse. -- This library allows to read data from a mouse, -- such as it's coordinates and button presses. -- The device will be named "mice", module "mice". -- @module mice -- @alias device local M = {} --- Initialize and starts the module. -- This is called automatically by toribio if the ...
local skins = {1, 2, 7, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 57, 58, 59, 60, 61, 62, 66, 67, 68, 70, 71, 72, 73, 78, 79, 80, 81, 82, 83, 84, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, ...
local export = {} local bit32 = require('bit32') local m_table = require('table') local m_tag = require('hit-translit/tag') local sign_list = mw.loadData('Module:hit-translit/data') local ulen = mw.ustring.len local usub = mw.ustring.sub local segments = { -- vowels ['a'] = 'a', ['á'] = 'a', ['à'] = 'a', ['e'] ...
return function(player) if not global.players[player.index].settings.show_evolution then return end local evolution = game.forces.enemy.evolution_factor * 100 return { "", {"statsgui.evolution"}, string.format(" = %.2f", evolution), "%" } end
local create_hunk = require("gitsigns.hunks").create_hunk local Hunk = require('gitsigns.hunks').Hunk local ffi = require("ffi") ffi.cdef([[ typedef struct s_mmbuffer { const char *ptr; long size; } mmbuffer_t; typedef struct s_xpparam { unsigned long flags; // See Documentation/diff-options.txt. ch...
dofile(THEME:GetPathO("", "art_helpers.lua")) return Def.ActorFrame{ StartTransitioningCommand= function(self) update_player_stats_after_song() end, random_grow_circle( "", _screen.cx, _screen.cy, adjust_luma(Alpha(fetch_color("gameplay.failed"), .75), .25), adjust_luma(Alpha(fetch_color("gameplay.failed"), ...
local networkVars = { lastNutrientMist = "time" } Shared.LinkClassToMap("Alien", Alien.kMapName, networkVars, true) local oldOnCreate = Alien.OnCreate function Alien:OnCreate() oldOnCreate(self) self.lastNutrientMist = 0 end
local EntityManager = ECS.BaseClass(ECS.ScriptBehaviourManager) ECS.EntityManager = EntityManager ECS.EntityManager.Name = "ECS.EntityManager" ECS.TypeManager.RegisterScriptMgr(ECS.EntityManager.Name, EntityManager) local table_insert = table.insert function EntityManager:Constructor( ) self.entities_free_id = 0 end...
local export = {} local conv = { -- finals (U+A980 - U+A983): ["ꦀ"] = "m", ["ꦁ"] = "ng", ["ꦂ"] = "r", ["ꦃ"] = "h", -- independent vowels (U+A984 - U+A98E): ["ꦄ"] = "a", ["ꦄꦴ"] = "a", ["ꦅ"] = "i", ["ꦆ"] = "i", ["ꦇ"] = "i", ["ꦈ"] = "u", ["ꦈꦴ"] = "u", ["ꦉ"] = "re", ["ꦉꦴ"] = "reu", ["ꦊ"] = "le", [...
old_rules_with = {} function clearRules() local temp = {} if timeless and full_rules then addUndo({"timeless_rules", rules_with, full_rules}) if rules_with["za warudo"] then for _,text in ipairs(getAllText()) do if hasProperty(text, "za warudo") then text.zawarudo = true els...
addEvent ( "VDBGJobs->Module->Job->Pilot->OnClientRequestF5Data", true ) addEventHandler ( "VDBGJobs->Module->Job->Pilot->OnClientRequestF5Data", root, function ( ) local data = { } local flights = getJobColumnData ( getAccountName ( getPlayerAccount ( source ) ), getDatabaseColumnTypeFromJob ( "pilot" ) ) data.flig...
local config = { [50011] = Position(32636, 31881, 2), [50012] = Position(32636, 31881, 7) } function onUse(player, item, fromPosition, target, toPosition, isHotkey) local targetPosition = config[item.actionid] if not targetPosition then return true end item:transform(item.itemid == 1945 and 1946 or 1945) to...
object_mobile_dressed_myyydril_old_warris = object_mobile_shared_dressed_myyydril_old_warris:new { } ObjectTemplates:addTemplate(object_mobile_dressed_myyydril_old_warris, "object/mobile/dressed_myyydril_old_warris.iff")
require "SyMini.Console" ctk = require "Catalunya" cs, arg, hasarg = ctk.cs, ctk.utils.getarg, ctk.utils.hasarg pfcondreported = false print(string.format('SYHUNT URLSCAN %s %s %s', symini.info.version, string.upper(symini.info.modename), symini.info.copyright)) function printhelp() cs.printwhite('Type scanurl ...
return {'cbb'}
local tableDump = require "luaTableDump" --[[string or number test]] local num = 1 local str = "asdf" local _nil = nil print(tableDump(num)) print(tableDump(str)) print(_nil) --[[table test]] function tt() end local t1 = {} local t2 = {1,2,3} local t3 = {"asdf","cccc"} local t4 = {123,23,"sdf",} local t5 = {[123]=1,[...
local version = "5.20150219" local prefix = "/home/pcolberg/usr/centos6-x86_64/git-annex-" .. version prepend_path("PATH", pathJoin(prefix, "bin")) prepend_path("MANPATH", pathJoin(prefix, "share/man"))
--new function DIALOG() --Trigger --50 Dialog --6, 66 Kill Multiple ----------------------------------------------------------------- --Resource officer NODE(0) SAY("Father Manus was not able to find out anything new about those relics of yours. Unfortunately we only have a limited library right here, that...
local y = ScrW() - 273 local x = ScrH() - 50 local fuel = 0 local fuelmax = 0 local health = 0 local mphtext, speed local speedometericon = Material( "golden_hud_v3/speedometer.png" ) local fuelicon = Material( "golden_hud_v3/fuel.png" ) local engineicon = Material( "golden_hud_v3/engine.png" ) local car...
local masterRecipeList = {} MasterRecipeList = {} MasterRecipeList.name = "MasterRecipeList" local function trace(obj) d(obj) end function MasterRecipeList:GetEntryByFoodName(foodName) for key, masterEntry in pairs(masterRecipeList) do local foodResultName = masterEntry:GetFoodResultName() ...
return { [10000] = {id=10000,x1=true,x5=10,x6=1.28,x8=3,x10="huang",x13=1,x14={ _name='DemoD2',x1=1,x2=2,},v2={x=1,y=2},t1=935460549,k1={1,2,3,},k8={[1]=2,[3]=4,},k9={{y1=1,y2=true,},{y1=2,y2=false,},},}, [10001] = {id=10001,x1=true,x5=10,x6=1.28,x8=5,x10="huang",x13=1,x14={ _name='DemoD2',x1=1,x2=2,},v2={x=1,y=2},t1=...
local L, this = ... this.title = "Lua Vanilla Core" this.version = "1.0" this.status = "production" this.desc = "Provides useful interfaces for using lcore with vanilla Lua." local vanilla_core = L:get("lcore.service.nop"):new() vanilla_core.__platform_name = "vanilla" vanilla_core.__platform_version = "1.0" vanilla...
--[[ # Copyright 2001-2014 Cisco Systems, Inc. and/or its affiliates. All rights # reserved. # # This file contains proprietary Detector Content created by Cisco Systems, # Inc. or its affiliates ("Cisco") and is distributed under the GNU General # Public License, v2 (the "GPL"). This file may also include Detector Co...
local http_request = require "http.request" local rapidjson = require('rapidjson') local FLAG_TYPE_TOGGLE = "toggle" local FLAG_TYPE_GRADUAL = "gradual" Client = {} function Client:new(environment, base_url, custom_instance_hash) local instance = setmetatable({}, { __index = Client }) instance.environment = env...
module ('mapgenerator', package.seeall) do local empty_block = { ' ', ' ', ' ', ' ', rarity = 0.5 } function load_grid_from_file(tileset, path) if not love.filesystem.exists(path) then return end local data, size = love.filesystem.read(path) local function splt_lines(str) local t =...
----------------------------- -- Levak ©2014 -------------- -- http://levak.free.fr/ ---- -- levak92@gmail.com -------- ----------------------------- ---------- AnimIt : Animable Object class Object = class() ----- Simply give a table that indicates ----- the animatedvariables and their initial values function Object...
createObject(1211,1057.5128173828,1281.6378173828,10.181122779846,0,0,268.68997192383) createObject(2886,1061.3218994141,1361.7497558594,11.451313018799,0,0,131.55505371094) createObject(3594,1082.8725585938,1237.5202636719,10.451489448547) createObject(3594,1073.9377441406,1237.5197753906,10.451489448547) createOb...
-- misc.lua: various useful stuff -- This file is a part of lua-nucleo library -- Copyright (c) lua-nucleo authors (see file `COPYRIGHT` for the license) local unique_object = function() -- newproxy() would be faster, but it is undocumented. -- Note that table is not acceptable, since its contents are not constant...
local ffi = require 'ffi' ffi.cdef[[ int MultiByteToWideChar(unsigned int CodePage, unsigned long dwFlags, const char* lpMultiByteStr, int cbMultiByte, wchar_t* lpWideCharStr, int cchWideChar); int WideCharToMultiByte(unsigned int CodePage, unsigned long dwFlags, const wchar_t* lpWideCharStr, int cchWideChar, c...
-- local dbg = require("debugger") -- -- Consider enabling auto_where to make stepping through code easier to follow. -- dbg.auto_where = 2 local renumber = require'filters.iex_renumber' local input describe("IEX Renumber", function() context("no iex doctests" , function() input = {"line 1", "line 2"} it("d...
require 'torch' require 'image' require 'cunn' require 'cudnn' require 'stn' require 'nn' print("Loading network...") local model_path = "pretrained/gtsrb_cnn3st_model.t7" local mean_std_path = "pretrained/gtsrb_cnn3st_mean_std.t7" local network = torch.load(model_path) local mean_std = torch.load(mean_std_path) print...
-- ITS - In The Shadows -- Copyright (C) 2015, 2016, 2017 James Niemira -- -- 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 3 of the License, or -- (at your option) any later ve...
local players = 0 deadWindow = nil function init() connect(g_game, { onGameEnd = onGameEnd }) ProtocolGame.registerExtendedOpcode(136, function(protocol, opcode, buffer) getPlayersOn(buffer) end) deadWindow = g_ui.displayUI('online') g_keyboard.bindKeyDown('Ctrl+U', doRequestPlayers) deadWindow:hi...
--this script handles saving for the standalone version of mod config menu --create the mod local mod = RegisterMod("Mod Config Menu Standalone", 1) ModConfigMenu = {} ModConfigMenu.StandaloneMod = mod --load mod config menu require("scripts.modconfig")
data:extend({ { type = "recipe-category", name = "hw-farm" }, { type = "item-subgroup", name = "hw-farm", group = "intermediate-products", order = "b[homeworld]", }, { type = "assembling-machine", name = "hw-farm", icon = "__hom...
local class = require('opus.class') local UI = require('opus.ui') UI.FlatButton = class(UI.Button) UI.FlatButton.defaults = { UIElement = 'FlatButton', textColor = 'black', textFocusColor = 'white', noPadding = true, } function UI.FlatButton:setParent() self.backgroundColor = self.parent:getProperty('backgroun...
function start (song) print("Song: " .. song .. " @ " .. bpm .. " donwscroll: " .. downscroll) setActorAlpha(0, 'yoMamaBG') setActorAlpha(0, 'brody') end local lastStep = 0 function update (elapsed) local currentBeat = (songPos / 1000)*(bpm/60) end function beatHit (beat) end --default positions-- --...
--*************************************************************************** -- [RKL Library] LUAT 第三方开源库 -- [RKL Library] LUAT Third-party open source library --=========================================================================== -- -- [Unit name]:RKL_ping.lua ...
-- load opengm require 'opengm' -- args op = xlua.OptionParser('%prog [options]') op:option{'-d', '--display', action='store_true', dest='display', help='display optimized graph (energies + states)'} op:option{'-m', '--method', action='store', dest='method', help='optimization method: a* | bp | tr...
--[[ Functions ]] function getDocuments(type, data) if not type or not data then return {} end local documents = MySQL.query.await([[ SELECT * FROM documents WHERE ?? = ? ]], { type, data }) for i, v in ipairs(documents) do v["data"] = json.decode(v["data"]) ...
plot=function() return coroutine.create( function(...) if imdeveloper then if p.test() then -- return ; end end local args={...}; if args[1]=="spot" then local spot=arg...
---------------------------------------------------------- -- Load RayUI Environment ---------------------------------------------------------- RayUI:LoadEnv("Skins") local S = _Skins local function LoadSkin() S:Reskin(RaidFrameRaidInfoButton) S:Reskin(RaidFrameConvertToRaidButton) S:Reskin(RaidInfoExtendButton) ...
local DilliDalliBeginSession = import('/mods/DilliDalli/lua/AI/DilliDalli/Mapping.lua').BeginSession local DilliDalliYeOldeBeginSession = BeginSession function BeginSession() DilliDalliYeOldeBeginSession() DilliDalliBeginSession() end DilliDalliYeOldeCreateResourceDeposit = CreateResourceDeposit local DilliDa...
-- > this allow you to call « gsql( ... ) » instead of « gsql:new( ... ) » Gsql = Gsql or {} setmetatable( Gsql, { __call = function( self, ... ) return self:new( ... ) end } )
local ffi = require("ffi") local dis = import("discordutil") local bot = import("botutil") local CMD_HIDEFROMHELP, CMD_FILTERISBLACKLIST, CMD_RAWCONTENT = 1, 2, 4 local function PermAll() return true end local PermAdmins do local disIsAdmin = dis.IsAdmin function PermAdmins(m) return disIsAdmin(m) end end lo...
return { id = 15, title = "测试5", sender = "系统", content = "测试内容5", award = { 1, }, }
--------------------------------------------- -- Roth_UI - panel --------------------------------------------- -- The config panel --------------------------------------------- --get the addon namespace local addon, ns = ... local oUF = ns.oUF local db = ns.db local unpack = unpack local gs...
answ = {"=", "<", ">"} measure = {"mm\(^3\)","cm\(^3\)","dm\(^3\)","m\(^3\)"} index = {1,2,3,4} ind = lib.math.random_shuffle(index) if(ind[1] < ind[2]) then inddif = ind[2] - ind[1] else inddif = ind[1] - ind[2] end temp = 1000^inddif if (ind[1] < ind[2]) then factleft = 1 factright = temp numl...
-- makefds Lua script by freem --============================================================================-- -- Create a .fds image (with or without header) from various files. --============================================================================-- local params = {...} local VERSION = "0.0" -- program vars...