content
stringlengths
5
1.05M
-- Unit test for frame class -- Author: Clark Li <clark.li86@gmail.com> -- Test data generated from zroc.breitbandkatze.de/crc.html - ccitt require "lunit.lunit" require "ccitt_16" module("ccitt_16_test", lunit.testcase, package.seeall) function test_success() assert_true(true, "always success") end fu...
/************************************************************************* Полный исходный код этого скрипта можно найти на GitHub Full source code of this script you can find in this GitHub Repo Скрипт распостраняется под свободной лицензией Apache 2.0 Одним из требований лицензии является уведомление автора при ...
----------------------------------------------------------- -- PROJECT: MTA:TD - Test and Debug Framework -- -- LICENSE: See LICENSE in top level directory -- PURPOSE: Shared global variables across the module ------------------------------------------------------------ -- Namespace for the MTADebug library MTATD.MTAD...
Atom = require "atom"; AtomParticle = Atom:__construct(); hydrogen = AtomParticle:__construct{proton = 1, electron = 1}; print("Hydrogen:\n"); hydrogen:__toString(); helium = hydrogen:addProton(1):addNeutron(2):addElectron(1); print("Helium:\n"); helium:__toString();
#! /usr/bin/lua local M = {} M.spheroid = {} M.spheroid.a = 6378100 -- axis local sin = math.sin local cos = math.cos local asin = math.asin local atan2 = math.atan2 function M.haversin(theta) local theta2 = theta / 2 local sin_theta2 = sin(theta2) return sin_theta2 * sin_theta2 end -- Functions to com...
local _ENV = _ENV local getmetatable = getmetatable local nonempty = next local next = next local pairs = pairs local select = select local setmetatable = setmetatable local type = type local unpack = table.unpack or unpack local table_concat = table.concat local table_pack = table.pack or false local table_sor...
function parent_string(level) local ats = { '@' } local parents = { } while level > 0 do table.insert(ats, '@') if level == 1 then table.insert(parents, 'parent') elseif level == 2 then table.insert(parents, 'grand') elseif level > 2 then table.insert(parents, 'great') end ...
-- -- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved. -- xlvoicemail_vbutton_layout = { -- yTop = 10, ySpacing = 5, width = 510, font = gMenuButtonFont, buttonlist = { { tag = "record", string = "ifs.xvoicemail.record" }, { tag = "play", string = "ifs.xvoicemail.play" }, { tag = ...
local L = (...) local score score = { fields = { "endless_most_kills", "endless_most_time", "minute_most_kills", "minute_most_accuracy" }, save = function(self) local values = {} for index, key in ipairs(self.fields) do table.insert(values, self[key]) end local text = ("%s "):rep(#self.fields...
local fuel = {} local component = require('component') local robot = require('robot') fuel_slot = 1 inventory_size = robot.inventorySize() function fuel.refuel() local counter = 0 while (not (component.generator.count() > 10)) and (counter < inventory_size) do counter = counter + 1 robot.selec...
local easing = require("easing") local SUMMER_BLOOM_BASE = 0.15 -- base amount of bloom applied during the day local SUMMER_BLOOM_TEMP_MODIFIER = 0.10 / TUNING.DAY_HEAT -- amount that the daily temp. variation factors into the overall bloom local SUMMER_BLOOM_PERIOD_MIN = 5 -- min length of the bloom fluctuation p...
-- -- actions/vstudio/vs2017.lua -- Extend the existing exporters with support for Visual Studio 2017. -- Copyright (c) 2017-2017 Jason Perkins and the Premake project -- local p = premake local vstudio = p.vstudio --- -- Define the Visual Studio 2017 export action. --- newaction { -- Metadata for the command l...
----------------------------------- -- Ability: Mug -- Steal gil from enemy. -- Obtained: Thief Level 35 -- Recast Time: 5:00 ----------------------------------- require("scripts/globals/settings") require("scripts/globals/status") require("scripts/globals/msg") ----------------------------------- function onAbilityCh...
local Station = require('motras_station') local t = require('motras_types') local c = require('motras_types') local Slot = require('motras_slot') local HallRoofUtils = require('motras_hallroofutils') describe('HallRoofUtils', function () describe('buildHallRoof', function () it('cannot build roof...
--[[ Copyright 2019 by ofunc This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to al...
#!/opt/fmadio/bin/fmadiolua local Input = io.stdin local Tmp = "/mnt/store1/tmp/scrach.json" IsExit = false while (IsExit != true) do -- read 1K lines and push local T = io.open(Tmp, "w") for l=1,10000 do local Line = Input:read("*line") if (Line == nil) then IsExit = true; break end T:write(Line.."...
--[[ Copyright 2019 Manticore Games, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distr...
-- smtp.lua -- -- Uses BitMaul to Extract SMTP messages as well as all Attachments -- local SB=require'sweepbuf' local SMTPDissector = { -- What delimiter are we looking for at what state -- what_next = function( tbl, pdur, swbuf) if tbl.state == "init" then pdur:want_to_pattern("DATA\r\n") ...
object_tangible_loot_creature_loot_collections_dejarik_klorslug = object_tangible_loot_creature_loot_collections_shared_dejarik_klorslug:new { } ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_dejarik_klorslug, "object/tangible/loot/creature/loot/collections/dejarik_klorslug.iff")
--arg[1] == path to REPORT.txt --arg[2] == path to MODBUILDER if gVerbose == nil then dofile(arg[2]..[[LoadHelpers.lua]]) end pv(">>> In StartTime.lua") gfilePATH = arg[1] --for Report() THIS = "In StartTime: " local startTime = os.time() WriteToFile(startTime.."\n",arg[2]..[[Times.txt]]) Report("","Started MODBU...
local transform = Concord.component( function(e, position, velocity, rotation) assert(position and position.x and position.y, "Transform component received a non-vector position on creation") assert(velocity and velocity.x and velocity.y, "Transform component received a non-vector velocity on creation") ...
local WTypes = require("WTypes") DEFINE_GUID("GUID_DEVCLASS_1394", 0x6bdd1fc1, 0x810f, 0x11d0, 0xbe, 0xc7, 0x08, 0x00, 0x2b, 0xe2, 0x09, 0x2f ); DEFINE_GUID("GUID_DEVCLASS_1394DEBUG", 0x66f250d6, 0x7801, 0x4a64, 0xb1, 0x39, 0xee, 0xa8, 0x0a, 0x45, 0x0b, 0x24 ); DEFINE_GUID("GUID_DEVCLASS_61883...
-- See LICENSE for terms -- list of entities we're going to be adding local entity_list = { "water_texture_replacement", "water_icy_texture_replacement", } -- getting called a bunch, so make them local local path_loc_str = CurrentModPath .. "Entities/" local def = CurrentModDef -- no sense in making a new one for ...
return { -- Nomes e Descrições --heist_arm_for = "Transport: Train Heist",--Transport: Train Heist --heist_arm_for_hl = "Transport: Train Heist",--Transport: Train Heist heist_arm_for_crimenet = "Aquele projeto que vocês encontraram no último trabalho era para um protótipo de uma arma de infantaria, um novo tipo de...
local Spell = { } Spell.LearnTime = 180 Spell.Description = [[ Spawns magic arrows from the tip of your wand. ]] Spell.Category = HpwRewrite.CategoryNames.Fight Spell.CanSelfCast = false Spell.AccuracyDecreaseVal = 0.05 Spell.ForceAnim = { ACT_VM_PRIMARYATTACK_7 } Spell.ApplyFireDelay = 0.2 Spell.AnimSpeedCoef = 1....
net.Receive("CashRegister:UI", function() local cashRegister = net.ReadEntity() local holding = net.ReadUInt(32) local totalProcessed = net.ReadUInt(32) local transactionsMade = net.ReadUInt(32) local open = net.ReadBool() local itemsListed = net.ReadTable() CashRegister.Core.OpenMenu(cashRegister, holding, tot...
----------------------------------- -- Area: Kazham -- NPC: Thali Mhobrum -- Standard Info NPC ----------------------------------- local path = { 55.816410, -11.000000, -43.992680, 54.761787, -11.000000, -44.046181, 51.805824, -11.000000, -44.200321, 52.922001, -11.000000, -44.186420, 51.890709, -11.000000, -44.22431...
--[[ TheNexusAvenger Action representing a git commit. --]] local NexusGit = require(script.Parent.Parent):GetContext(script) local NexusInstance = NexusGit:GetResource("NexusPluginFramework.NexusInstance.NexusInstance") local LocalPush = NexusGit:GetResource("Action.LocalPush") local Settings = NexusGit:GetResource(...
require('nvim-gps').setup({ icons = { ['class-name'] = ' ', -- Classes and class-like objects ['function-name'] = ' ', -- Functions ['method-name'] = ' ' -- Methods (functions inside class-like objects) }, separator = ' > ', })
---@class Utils local Utils = ECSLoader:CreateModule("Utils") string.startsWith = function(str, start) return string.sub(str, 1, str.len(start)) == start end Utils.CHAR_EQUIP_SLOTS = { ["Head"] = "HeadSlot", ["Neck"] = "NeckSlot", ["Shoulder"] = "ShoulderSlot", ["Back"] = "BackSlot", ["Chest"]...
-- This function returns a new "Triangle" object, which is a table -- with a few closures and values in it (not a class!) The Triangle -- object contains position, size, and color data. The constructor -- takes an additional callback - add_child() - which allows the Triangle -- constructor to tessellate the currently c...
local ADDON_NAME, Addon = ... local ThreatPlates = Addon.ThreatPlates --------------------------------------------------------------------------------------------------- -- Imported functions and constants --------------------------------------------------------------------------------------------------- -- Lua APIs ...
function Photon:SetupCar( ent, index ) // whether car headlights are on or off function ent:CAR_Headlights( val ) if not IsValid( self ) then return false end if (val!=nil) then self:SetNW2Bool( "PhotonLE.CAR_HEADLIGHTS", val ) end return self:GetNW2Bool("PhotonLE.CAR_HEADLIGHTS") end -- if car is braking ...
nut.command = nut.command or {} nut.command.list = nut.command.list or {} local COMMAND_PREFIX = "/" -- Adds a new command to the list of commands. function nut.command.add(command, data) -- For showing users the arguments of the command. data.syntax = data.syntax or "[none]" -- Why bother adding a command if it ...
-- Set Shelf-WLEDs brightness to 100 whenever my desktop PC appears -- on the network and turn off lights again when it disappears. -- (Requires: https://github.com/shagu/mqtt-helpers [device-tracker]) Subscribe("openwrt/device-tracker", function(payload, cache) if payload and payload.online then local state=nil ...
local unpack = table.unpack or _G.unpack util.seed() local function randtable(n, a, b) local t = {} for i=1, n do t[i] = util.randab(a, b) end return t end local function randomsphere() local pos = vec3.new(unpack(randtable(3, -2, 2))) local radius = util.randab(0, 0.5) local emission...
XYZShit = XYZShit or {} XYZShit.EcoBreakdown = {} XYZShit.EcoBreakdown.Systems = {} function XYZShit.EcoBreakdown.RegisterSystem(systemName) if XYZShit.EcoBreakdown.Systems[systemName] then print("[Eco Breakdown]", "Trying to register '"..systemName.."', which has already been registered.") return ...
local PropertySupport = require("hs/lang/PropertySupport") local EventListener = require("hs/core/EventListener") ---------------------------------------------------------------- -- イベント処理を行うための基本クラスです. -- イベントの発出した結果を、登録したイベントリスナがキャッチして -- イベント処理を行います. -- @class table -- @name EventDispatcher ------------------------...
----------------------------------- -- Area: Dynamis-Jeuno ----------------------------------- require("scripts/globals/keyitems") require("scripts/globals/dynamis") require("scripts/globals/zone") ----------------------------------- zones = zones or {} zones[tpz.zone.DYNAMIS_JEUNO] = { text = { ITEM_...
local cmd = vim.cmd local Theme = {} --> AVAILABLE COLORSCHEMES FOR THE RANDOM THEME local themes = { 'tokyonight', 'tokyodark', 'gruvbox-flat', 'monokaipro', 'dracula_pro', 'nord' } --> DEFINE THEME FUNCTIONS WHICH CAN BE APPLIED IN 'init.lua' function Theme.random() math.randomseed(os.cloc...
phoenix_flames = { -- tested with Harue Shaman, 141 will. 3080 dmg against rabbit AC = 100. Our damage matches 100%. cast = function(player) local magicCost = 880 local anim = 8 local aethers = 1000 local damage = 1030 + (player.level * 3) + math.floor(((player.will + 1) / 2) * 3) if (not player:canCast(1...
local status_ok, cheatsheet = pcall(require, "cheatsheet") if not status_ok then return end cheatsheet.setup({ -- Whether to show bundled cheatsheets -- For generic cheatsheets like default, unicode, nerd-fonts, etc -- bundled_cheatsheets = { -- enabled = {}, -- disabled = {}, -- }, ...
-- 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...
local isPreferredCache = {} local preferredCacheWasPreloaded = false TGNSPlayerPreferredRepository = {} function TGNSPlayerPreferredRepository.Create(preferredTypeName) assert(preferredTypeName ~= nil and preferredTypeName ~= "") local dr = TGNSDataRepository.Create("preferred", function(data) data.preferr...
function onProjectileDeath(star, proj) local angle = 0.0 for i = 0, 8 do local p = Projectile.new("LASER"); p:setPos(proj:getPos()) p:setRotation(angle) p:setAllegiance(proj:getAllegiance()) angle = angle + 45.0 star:addProjectile(p) end end
local log = require('utils.log') local utils = {} function mergeItemPositionsLists(item_positions_list) local merged_list = {} function areRemainingItems() for i,item_positions in ipairs(item_positions_list) do if #item_positions_list[i] ~= 0 then return true end end return false ...
---@class Moveable : zombie.inventory.types.Moveable ---@field protected worldSprite String ---@field private isLight boolean ---@field private lightUseBattery boolean ---@field private lightHasBattery boolean ---@field private lightBulbItem String ---@field private lightPower float ---@field private lightDelta float -...
local popout = {} local padding = 10 local animSpeed = 15 local floor, ceil = math.floor, math.ceil local scrnWidth = gpu.width local function round(n) if n % 1 >= 0.5 then return ceil(n) else return floor(n) end end function popout.new(width, height, bg) local self = { width = width + 2, he...
-- Copyright 2004-present Facebook. All Rights Reserved. local Stats = { DEFAULT_DECAY_FACTOR = 2 } function Stats.new(name, decay_factor) local self = { name = name or nil, last_value = 0, avg = 0, stddevsqr = 0, n = 0, min = math.huge, max = -math.huge, total = 0, decay_facto...
local moon = require("moon") local aoi = require("aoi") local AOI_WATCHER = 1 local AOI_MARHER = 2 local event_cache = {} local function print_aoi_event(space) local count = space:update_event(event_cache) for i=1,count,3 do local watcher = event_cache[i] local marker = event_cache[i+1] local even...
local registeredAreas = {} local areasPlayerIsInside = {} RegisterNetEvent("FRP:AREA:PlayerEnteredArea") RegisterNetEvent("FRP:AREA:PlayerLeftArea") function cAPI.RegisterAreas(areas) for areaId, _ in pairs(areas) do cAPI.RegisterArea(areaId, _) end end function cAPI.RegisterArea(areaId, ...) lo...
--[[ ******************************************************************************** Project owner: RageQuit community Project name: GTW-RPG Developers: Mr_Moose Source code: https://github.com/404rq/GTW-RPG/ Bugtracker: https://discuss.404rq.com/t/issues Suggestions: https://discuss.404rq.com/t/deve...
local AddonName, Addon = ... local L = Addon:GetLocale() -- This registers all of the commands in this file. function Addon:SetupConsoleCommands() self:RegisterConsoleCommandName(AddonName, "/vendor", "/ven") self:AddConsoleCommand(nil, nil, "OpenConfigDialog_Cmd") -- Override the defaul...
--[[ ******************************************************************************** Project owner: RageQuit community Project name: GTW-RPG Developers: Mr_Moose Source code: https://github.com/404rq/GTW-RPG/ Bugtracker: https://discuss.404rq.com/t/issues Suggestions: https://discuss.404rq.com/t/deve...
local time = 7000 RegisterCommand('me', function(source, args) local text = '' for i = 1,#args do text = text .. ' ' .. args[i] end text = text .. ' ' TriggerServerEvent('3dme:shareDisplay', text) end) RegisterNetEvent('3dme:triggerDisplay') AddEventHandler('3dme:triggerDisplay...
local menu = {} local alpha = {} alpha.alpha = 0 function menu:init() end ---@diagnostic disable-next-line: redundant-parameter function menu:enter() Timer.tween(1, alpha, {alpha = 1}, 'in-out-quad') end function menu:update(dt) end function menu:keypressed(key, code) if key == 'return' then startGame...
local ClosestVehicle, ClosestShopIndex = 1, 1 local inMenu = false local modelLoaded = true local testritveh = 0 local fakecar = {model = '', car = nil} local PlayerJob = {} local isLoggedIn = false local buySure = false local Categories = {} Citizen.CreateThread(function() Wait(1500) for i = 1, #QB.VehicleSho...
-- https://github.com/ImagicTheCat/MGL -- MIT license (see LICENSE or MGL.lua) local xtype = require("xtype") -- load return function(mgl) mgl.initmfs("translate", "rotate", "scale", "orthographic", "perspective") local vec2 = mgl.require_vec(2) local vec3 = mgl.require_vec(3) local mat3 = mgl.require_mat(3) ...
-- -- Author: Dubpub -- Date: 10/16/2015 -- Time: 10:44 PM -- function Create() local prisoner = Object.Spawn("Prisoner", this.Pos.x, this.Pos.y); prisoner.Category = math.random(1, 6); this.Delete(); end
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local TweenService = require(ReplicatedStorage:WaitForChild("TweenService")) local RenderStepped = RunService.RenderStepped local USE_ROBLOX_CIRCLE = true local RIPPLE_IMAGE = USE_ROBLOX_CIRCLE and script.Ri...
local pool = MenuPool.New() local animEnabled = true -- to handle controls and inputs to the menu Citizen.CreateThread(function() while true do Wait(0) pool:ProcessControl() end end) -- to draw the menu... since the controls await response from the Scaleform.. -- drawing in the same thread of the controls would...
----------------------------------------------------------------------------------- local ADDONNAME, THIS = ...; ----------------------------------------------------------------------------------- -- localize local SetCVar = SetCVar local GetInventoryItemCooldown = GetInventoryItemCooldown local GetTime, print = Get...
require("runtime-dom/src/modules/events") require("@vue/runtime-dom") function triggerEvent(target, event, process) local e = document:createEvent('HTMLEvents') e:initEvent(event, true, true) if event == 'click' then e.button = 0 end if process then process(e) end target:dispatchEvent(e) r...
local jarowinkler = require("kernel.ush.jarowinkler") local parse = require("kernel.ush.parse") local _did_you_mean_threshold = 0.8 local function _normalize_command_name(s) return s:lower():gsub("-", "_") end local Executor = {} function Executor.new(env) local self = { _env = env, } setm...
object_mobile_skeleton_bm_elephant_bantha = object_mobile_skeleton_shared_bm_elephant_bantha:new { } ObjectTemplates:addTemplate(object_mobile_skeleton_bm_elephant_bantha, "object/mobile/skeleton/bm_elephant_bantha.iff")
-- -- Autogenerated by Thrift -- -- DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -- @generated -- require 'Thrift' require 'shared_constants' SharedStruct = __TObject:new{ key, value } function SharedStruct:read(iprot) iprot:readStructBegin() while true do local fname, ftype, fid = i...
--!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...
--DATAPATH is set during Lua initialization is C++ normally. This is for the testsuites. if not DATAPATH then _G.DATAPATH = "model/data/" end --JSON and state itself are both accessed in every possible call made to the GSV, --so I set them as global variables. _G.json = require('json') _G.state = {} --TODO rewrite fun...
local function LoadList(listName) local path = ('%sconfig\\addons\\%s\\lists\\%s.lua'):fmt(AshitaCore:GetInstallPath(), addon.name, listName); if not ashita.fs.exists(path) then path = ('%sconfig\\addons\\%s\\lists\\%s'):fmt(AshitaCore:GetInstallPath(), addon.name, listName); end if not ashita....
fx_version 'cerulean' game 'gta5' author 'Uğur "XARON" Pekesen' description 'Synced elevator script for FiveM' version '1.0.0' resource_type 'gametype' { name = 'RPG' } ui_page "ui/ui.html" files({ "ui/ui.html", "ui/ui.css" }) client_script {"client.js"} server_script {"server.js"}
local L = BigWigs:NewBossLocale("Halls of Lightning Trash", "esES") or BigWigs:NewBossLocale("Halls of Lightning Trash", "esMX") if not L then return end if L then L.runeshaper = "Creador de runas Tronaforjado" L.sentinel = "Centinela Tronaforjado" end
--[[ Integrating the library into your scripts 1. Download the statcollection from github and merge the scripts folder into your game/YOUR_ADDON/ folder. 2. In your addon_game_mode.lua file, copy this line at the top: require('statcollection/init') 3. Go into the scripts/vscripts/statcollection folder and inside the `...
NewShipType = StartShipConfig() NewShipType.displayedName="$10024" NewShipType.sobDescription="$10025" NewShipType.maxhealth=getShipNum(NewShipType, "maxhealth", 27500) NewShipType.regentime=2500 NewShipType.minRegenTime=2500 NewShipType.sideArmourDamage = getShipNum(NewShipType, "sideArmourDamage", 1.2) NewShipType.re...
function OnWorldPostUpdate() if _cheat_gui_main then _cheat_gui_main() end end function OnPlayerSpawned( player_entity ) print("OnPlayerSpawned require check:") if not require then print("NO require.") else print("YES require.") end dofile("data/hax/cheatgui.lua") end
function PLUGIN:LoadData() self:LoadUnionLocks() end function PLUGIN:SaveData() self:SaveUnionLocks() end
local ffi = require('ffi') local loaded, lib = pcall(ffi.load, 'opus') if not loaded then return nil, lib end local new, typeof, gc = ffi.new, ffi.typeof, ffi.gc ffi.cdef[[ typedef int16_t opus_int16; typedef int32_t opus_int32; typedef uint16_t opus_uint16; typedef uint32_t opus_uint32; typedef str...
--- The dumb_walk node inherits from the @{action} base node class and applies a velocity toward a target position -- and setting a walking animation. The action will either succeed on timeout or when the mob reaches -- the target position. -- @action dumb_walk local action = behaviors.action local dumb_walk = behavio...
buffer = "" function readint() if buffer == "" then buffer = io.read("*line") end local num, buffer0 = string.match(buffer, '^([%-%d]*)(.*)') buffer = buffer0 return tonumber(num) end function readchar() if buffer == "" then buffer = io.read("*line") end local c = string.byte(buffer) buffer...
--- LUALIB 'common functions for processing strings' ---------------------------------------------------------- --- Exports: --- StartsWith(str, find) --- Split(str, split) --- RTrim(str) --- UnpackArgs(str, delim) --- FromTable(tbl, delim) ---------------------------------------------------------- module("s...
local miniMap = require("minimap") local clean = require("clean") local drops = require("drops") local player = {} local maxBarWidth = 1200 local invulnerable = false local function addPhysics() local offsetRectParams = { halfWidth=20, halfHeight=35, x=0, y=0} physics.addBody(ship, "dynamic", {box=offsetRectPa...
-- -- prints a "hierarchial" view of the element and it's children -- -- this can be extremely slow and produce a *lot* of output for elements with a lot of descendants -- for Safari with one window displaying the DuckDuckGo search page, it took 134 seconds and -- output 88,375 lines -- -- h = dofile("axh.lua") -...
local redis = require("guan.lib.redis_util") local utils = require("guan.utils.utils") local json = require "guan.utils.json" local BasePlugin = require("guan.plugins.base") local ngx_log = ngx.log local pairs = pairs local tostring = tostring local fmt = string.format local ngx_timer_at = ngx.timer.at local EXPIRATI...
-- LUA HTML parser class 'HTMLParser' local empty_tags = { br = true, hr = true, img = true, embed = true, param = true, area = true, col = true, input = true, meta = true, link = true, base = true, basefont = true, frame = true, isindex = true } -- omittable tags siblings -- if an open t...
------------------------------------------------------------------------------- -- AdiBags - Nilganihmaht By Crackpot (US, Arthas) ------------------------------------------------------------------------------- local addonName, addon = ... local AdiBags = LibStub("AceAddon-3.0"):GetAddon("AdiBags") local L = addon.L l...
--------------------------------------------------------------- -- Copyright 2021 Deviap (https://deviap.com/) -- --------------------------------------------------------------- -- Made available under the MIT License: -- -- https://github.com/deviap/deviap-main/blob/master/LICENSE -- ...
NarrativeModule = NarrativeModule or BeardLib:ModuleClass("narrative", ItemModuleBase) NarrativeModule._loose = true local TEXTURE = Idstring("texture") function NarrativeModule:init(...) self.clean_table = table.add(clone(self.clean_table), { {param = "chain", action = {"number_indexes", "remove_metas"}},...
Citizen.CreateThread(function() OnEnterMp() -- required to load heist ipl? RequestAllIpls() end) Citizen.CreateThread(function() for k,ipl in pairs(allIpls) do loadInterior(ipl.coords, ipl.interiorsProps, ipl.interiorsPropColors) end end) function loadInterior(coords, interiorProps, interiorsPropColors) for k,...
local validVehicleModels = {} local invalidVehicleModels = {435, 449, 450, 537, 538, 569, 570, 584, 590, 591, 606, 607, 608} for model = 400, 609 do if not table.index(invalidVehicleModels, model) then table.insert(validVehicleModels, model) end end local compatibleVehiclePaintjobs = { [483] = {0}, -- camper [...
#!/usr/bin/lua --This is our subroutine at the beggining of script function check_length(value) if string.len(value) > 30 then --if the string was bigger than 30 chars, FAIL print("You didn't follow the rules, enter a line that is less than 30 characters:\n") return "FAIL" end end print("Welcome to our example ...
local client = require('shared.client') local entities = require('entities') local event = require('core.event') local data, ftype = client.new('action_service') ftype.fields.action.type.fields.target = { get = function(data) return entities:by_id(data.target_id) end, } local get_event = function(ser...
if vim.b.did_ftp == true then return end vim.bo.cindent = false vim.bo.suffixesadd = ".js,.jsx" vim.opt_local.cursorline = false vim.opt_local.cursorcolumn = false
------------ -- Uncomplicated Testing for OpenComputers. -- - [Homepage](https://github.com/quentinrossetti/unprograms/tree/master/untest) -- - [API documentation](https://quentinrossetti.github.io/unprograms/modules/untest.html) -- @module untest -- @license ICS -- @copyright 2020-2021 Quentin Rossetti <code@bleu.gdn...
print("Hmm"); function Test1(a) print("Test1 Called"); print(a); end function Test2(a,b) print("Test2 Called"); print(a,b); end function Test3(a,b,c) print("Test3 Called"); print(a,b,c); end function Test4(a,b,c,d) print("Test4 Called"); print(a,b,c,d); end
--credit: KrystalTeam local twerksrc = [[ function clerp(a,b,t) local qa = {QuaternionFromCFrame(a)} local qb = {QuaternionFromCFrame(b)} local ax, ay, az = a.x, a.y, a.z local bx, by, bz = b.x, b.y, b.z local _t = 1-t return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa...
require "gui.gui" if not cssa_gui then cssa_gui = {} end function cssa_gui.log(message) if false then for i, p in pairs(game.players) do local complete_message = "There was an error: " for k, msg in pairs(message) do complete_message = complete_message .. " " .. k ....
require 'image' local draw = {} function draw.drawBox(img, x, y, w, h, lineWidth, color) print('Drawing Box') if color == nil then color = {1, 0, 0} end local imsize = #img local imC, imW, imH = imsize[1], imsize[3], imsize[2] local topleft, bottomright = {}, {} topleft.x = (x - h/2) * imH topleft...
--[[ Copyright 2014 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 agr...
function Test() local pattern = [[ Together - targeta targetc targete targetf Together - targetb Together - targetd (2 max) - targeta targetc (2 max) - targetb (2 max) - targetd (2 max) - targete targetf *** found 1 target(s)... ]] TestPattern(pattern, RunJam()) end
local MachineManager ={ Machines = {}; CurrentMachineAmount = 0; MachineUpdateTime = 0.5; AvailableList = {}; CurrentAvailableLevel = 2; } function MachineManager:UpdateMachines() if MachineManager.Machines == nil then return end for key, value in pairs(MachineManager.Machines...
local function reql_error_formatter(err) if type(err) ~= 'table' then return end if err.ReQLError then return err.message() end end describe('array limits', function() local r setup(function() assert:add_formatter(reql_error_formatter) r = require('rethinkdb') function r.run(query, array_li...