content
stringlengths
5
1.05M
local name, addon = ...; addon.inCombat=false; addon.currentSegment=0; --[[---------------------------------------------------------------------------- Combat Start ------------------------------------------------------------------------------]] function addon.hsw:PLAYER_REGEN_DISABLED() addon:StartFight(nil); en...
require "utils" local server = require "lua-grpc.server" local s = server:new() s:load([[ syntax = "proto3"; service Greeter { rpc SayHello(HelloRequest) returns (HelloReply); rpc SayHelloAgain(HelloRequest) returns (HelloReply); } message HelloRequest { string name = 1; } message HelloRep...
--[[ This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:26' using the latest game version. NOTE: This file should only be used as IDE support; it should NOT be distributed with addons! **************************************************************************** CONTENTS OF THIS FILE IS COPYRI...
msg_1 = "За колико би се променила површина кутије ако би се све димензије кутије" msg_2 = " увећале за " msg_3 = " Површина би се увећала за " msg_4 = " умањиле за " msg_5 = " Површина би се умањила за " msg_6 = "Колико пута би се променила површина кутије ако би се све димензије кутије" msg_7 = " увећале " m...
--[[ $Id$ Copyright © 2010 VideoLAN and AUTHORS Authors: Fabio Ritrovato <sephiroth87 at videolan dot org> 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 ...
AddCSLuaFile() AddCSLuaFile("sh_sounds.lua") include("sh_sounds.lua") CustomizableWeaponry:registerAmmo("9x18MM", "9x18MM Rounds", 9, 18) SWEP.PrintName = "P99" if CLIENT then SWEP.DrawCrosshair = false SWEP.IconLetter = "a" killicon.AddFont("cw_p99", "CW_KillIcons", SWEP.IconLetter, Color(255, 80, 0, 150)) ...
local constants = require("constants") local main_gui = require("scripts.gui.main.base") local remote_interface = {} function remote_interface.open_page(player_index, class, name) if not class then return false, "Did not provide a class" end local int_class = constants.interface_classes[class] if not int_class ...
--- Internal state management for Gradle. local M = {} local callbacks = {} --- Register a new callback function. function M.registerCallback(id, event, callback) callbacks[id] = callbacks[id] or {} callbacks[id][event] = callback end --- Call a stashed event callback for the given ID and event -- -- Looks up a ca...
--===================================================================== -- -- zm.lua - z.sh implementation for lua -- -- Created by skywind on 2018/03/19 -- Last Modified: 2018/03/19 11:11:47 -- --===================================================================== local string = string local table = table ...
object_tangible_terminal_planning_table_dearic_reb = object_tangible_terminal_shared_planning_table_dearic_reb:new { } ObjectTemplates:addTemplate(object_tangible_terminal_planning_table_dearic_reb, "object/tangible/terminal/planning_table_dearic_reb.iff")
local naughty = require('naughty') local beautiful = require('beautiful') local gears = require('gears') local dpi = require('beautiful').xresources.apply_dpi -- Naughty presets naughty.config.padding = 8 naughty.config.spacing = 8 naughty.config.defaults.timeout = 5 naughty.config.defaults.screen = 1 naughty.config....
local choose = {} local element = require("citeproc.citeproc-element") local util = require("citeproc.citeproc-util") local Choose = element.Element:new() function Choose:render (item, context) self:debug_info(context) context = self:process_context(context) for i, child in ipairs(self:get_children()) do ...
Locales['fr'] = { ['document_deleted'] = "Le document a été ~g~supprimé~w~.", ['document_delete_failed'] = "~r~Erreur~w~ lors de la suppression du document .", ['copy_from_player'] = "Vous avez ~g~reçu~w~ la copie d'un formulaire d'un autre citoyen.", ['from_copied_player'] = "Copie du formulaire ~g~env...
-- npm i -g pyright require'lspconfig'.pyright.setup{}
local _, ns = ... local B, C, L, DB, P = unpack(ns) local S = P:GetModule("Skins") local _G = getfenv(0) local select, ipairs = select, ipairs local r, g, b = DB.r, DB.g, DB.b local function expandOnEnter(self) if self:IsEnabled() then self.bg:SetBackdropColor(r, g, b, .25) end end local function expandOnLeave(s...
-------------------------------- -- @module Effect3DOutline -- @extend Effect3D -- @parent_module cc -------------------------------- -- -- @function [parent=#Effect3DOutline] setOutlineWidth -- @param self -- @param #float width -------------------------------- -- -- @function [parent=#Effect3DOutline] s...
player = nil status = false RegisterCommand("emote", function(source, args) player = GetPlayerPed(-1); local emoteToPlay = args[1] if GetVehiclePedIsIn(player, false) ~= 0 then return end; -- wont play emotes in any vehicle startEmote(emoteToPlay) end) function startEmote(anim) if emotes[anim] and...
local Stream = require("stream") local DEBUG = false local MIN_MATCH = 4 local function debug(...) if DEBUG then print(...) end end local function decompress(inputStream, decompressedSize) local outputStream = Stream() -- sequences local lastWrittenByte = 0 while outputStream.getLeng...
local postgres = require("pgmoon") local type = type local setmetatable = setmetatable local concat_tab = table.concat local _M = { VERSION = "0.1.0" } local mt = {__index = _M} local function connect(self) local pg = postgres.new { database = self.database, user = self.user, h...
-- Define the sock_send/recv functions to use the -- asynchronous actor sockets. -- if _G.sock_recv == nil and _G.sock_send == nil and _G.asock then function sock_recv(skt, pattern, part, partial_ok) return asock.recv(ambox.self_addr(), skt, pattern, part, partial_ok) end function sock_send(skt, data, ...
return function() local Packages = script.Parent.Parent.Parent.Parent local Roact = require(Packages.Roact) local Toggle = require(script.Parent.Toggle) local mockStyleComponent = require(Packages.UIBlox.Utility.mockStyleComponent) describe("lifecycle", function() it("should mount and unmount without issue", fu...
return require("magick.init")
--[[ Array ===== Dedicated class for index-based tables. Lua does not make a distinction between arrays and dictionaries. A table can be both. This class is used to solidify the concept of an array, and comes with some helpful methods. Constructors ------------ Array.new(table items={}) Create...
local TuningScene = Scene:extend() TuningScene.title = "Tuning Settings" require 'load.save' require 'libs.simple-slider' TuningScene.options = { -- Serves as a reference for the options available in the menu. Format: {name in config, name as displayed if applicable, slider name} {"das", "DAS", "dasSlider"}, {"ar...
--[[ Desc: Timer, a util class. Author: SerDing Since: 2019-08-24 21:45 Alter: 2019-11-5 ]] local _MATH = require("engine.math") ---@class Utils.Timer ---@field protected _time milli ---@field protected _count milli ---@field protected _action function ---@field protected isRunning boolean local _Timer = require(...
require("socket") require("class") json = require("dkjson") require("stridx") require("gen_panels") local byte = string.byte local char = string.char local pairs = pairs local ipairs = ipairs local random = math.random local lobby_changed = false local time = os.time local floor = math.floor local TIMEOUT = 10 local...
local x if test then print("guard") x = a or b -- redirect (5.4) else print("guard") x = c or d end
local IItemMusicDisc = require("mod.elona.api.aspect.IItemMusicDisc") local Rand = require("api.Rand") local ItemMusicDiscAspect = class.class("ItemMusicDiscAspect", { IItemMusicDisc }) local function can_generate(music) return data["base.music"]:ext(music._id, "elona.music_disc").can_randomly_generate end functi...
local walls = {} walls.wall_thickness = 10 walls.walls = {} function walls.new_wall(x, y, width, height) return ({x=x, y=y, width=width, height=height}) end function walls.construct_walls() walls.walls["left"] = walls.new_wall(0,0,walls.wall_thickness, love.graphics.getHeight()) walls.walls["right"] = walls.new...
-- https://www.codewars.com/kata/lua-is-easy-lesson-5-arrays-1/train/lua -- My solution luaarrys = {} function luaarrys.solve(arr) table.sort(arr) for i = #arr - 2, #arr do if arr[i] == arr[i+1] then table.remove(arr, arr[i]) end end return #arr >= 2 and #arr - 2 or 0 end re...
target_triple = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" project "glfw" kind "StaticLib" language "C" targetdir ("bin/"..target_triple.."/%{prj.name}") objdir ("bin/obj/"..target_triple.."/%{prj.name}") defines { "_CRT_SECURE_NO_WARNINGS", } files { "include/GL...
--<< SERVICES >> local DataStoreService = game:GetService("DataStoreService") local HttpService = game:GetService("HttpService") --<< CONSTANTS >> local MAX_PER_KEY = 3999950 -- Up from 256kB, to 4MB! Leave suitable buffer. local SCOPE_PREFIX = script.Name local SAVE_META_DATA_KEY = "SaveKey" local START_INDEX = 1 loc...
local class = require("heart.class") local heartMath = require("heart.math") local M = class.newClass() function M:init(game, config) self.game = assert(game) self.physicsDomain = assert(self.game.domains.physics) self.boneComponents = assert(self.game.componentManagers.bone) end function M:createComponent(ent...
-- simple serializer adapted from the one on the pil book, for our humble needs. -- converts a table to a storable string. local function serialize(o) local str = "" local append = function(...) for _, val in ipairs{...} do str = str .. tostring(val) end end if type(o) == "number" or type(o) == "boolean" ...
#!/usr/bin/lua -- This is simple script for creating tokens. local dirname = string.gsub(arg[0], "(.*)/(.*)", "%1"); package.path = package.path .. ";" .. dirname .. "/../src/?.lua"; -- bootstrap application (to have database), bot not run require "application".bootstrap(dirname .. "/../src"); local Token = require...
local assertEq = test.assertEq local function log(x) test.log(tostring(x) .. "\n") end local vi_regex = require('regex.regex') local compile = vi_regex.compile local pat pat = compile('([A-Z]+)[a-z]*\\1') assertEq(pat:match('ABCfooDEF'), nil) assertEq(pat:match('ABCfooABC'), {_start=1, _end=9, groups={{1,3}}}) asser...
SILE.registerCommand("verbatim:font", function(options, content) SILE.settings.set("font.family", "Monaco") SILE.settings.set("font.size", SILE.settings.get("font.size") - 3) end, "The font chosen for the verbatim environment") SILE.registerCommand("verbatim", function(options, content) SILE.typesetter:pushV...
require "nn" require "image" require "InstanceNormalization" require "src/utils" local cmd = torch.CmdLine() cmd:option("-input_image", "", "Image to stylize.") cmd:option("-image_size", 0, "Resize input image to. Do not resize if 0.") cmd:option("-model_t7", "", "Path to trained model.") cmd:option("-save_path", "st...
----------------------------------- -- -- -- ----------------------------------- require("scripts/globals/status") ----------------------------------- function onEffectGain(target, effect) target:addMod(tpz.mod.ENSPELL, 16) target:addMod(tpz.mod.ENSPELL_DMG, 1) end function onEffectTick(target, effect) end f...
--[[ ___ ________ ________ ________ _____ ______ _______ ________ ________ ________ ________ ___ ________ |\ \|\ ___ \ |\ ____\|\ __ \|\ _ \ _ \|\ ___ \ |\ ____\|\ __ \|\ ___ \|\ _____\\ \|\ ____\ \ \ \ \ \\ \ \ ____________\ \ ...
require 'game' box = require 'box' require 'game.Player' function game.load(arg) game.graphics.setBackgroundColor(64, 64, 64) game.manager = box.Manager() game.platform = box.Moving(100, 130, 50, 9) game.platform.blocks.down = false game.platform.blocks.right = false game.platform.blocks.lef...
function GetSettings() if Mods.LeaderLib ~= nil then local settings = Mods.LeaderLib.SettingsManager.GetMod(ModuleUUID, false) if settings then return settings end end return nil end
-- FIFA Edition FIFA = "19" -- PROCESS BASE ADDRESS - Updated after attach BASE_ADDRESS = nil -- Size of FIFA module FIFA_MODULE_SIZE = nil -- CHEAT TABLE ADDRESS LIST ADDR_LIST = getAddressList() -- SOME CHEAT TABLE MEMORY RECORDS CT_MEMORY_RECORDS = { HEADTYPECODE = 37, BIRTHDATE = 45, PLAYERID = 93, ...
--[[ Copyright (C) 2018 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 hope th...
----------------------------------- -- Ability: Sneak Attack -- Deals critical damage when striking from behind. -- Obtained: Thief Level 15 -- Recast Time: 1:00 -- Duration: 1:00 ----------------------------------- require("scripts/globals/settings") require("scripts/globals/status") ----------------------------------...
-- code adapted from shakesoda's optical local Width, Height, Color = ... assert(Width); assert(Height); local corner = "_corner"; -- graphic file local DefaultColor = color("0,0,0,1"); -- black box omg magic -- Color is optional. if not Color then Color = DefaultColor end; --[[ How it's drawn: c----c OOOOOO c-...
local t = require('luatest') local g = t.group('unit_sample') -- create your space here g.before_all(function() end) -- drop your space here g.after_all(function() end) g.test_sample = function() t.assert_equals(type(box.cfg), 'table') end
----------------------------------- -- Area: Castle Oztroja -- NPC: _47d -- !pos 20.000 24.168 -25.000 151 ----------------------------------- local ID = require("scripts/zones/Castle_Oztroja/IDs") require("scripts/globals/keyitems") require("scripts/globals/status") ----------------------------------- function onTri...
--[[ Author: Dennis Werner Garske (DWG) License: MIT License ]] local _G = _G or getfenv(0) local Roids = _G.Roids or {} -- Validates that the given target is either friend (if [help]) or foe (if [harm]) -- target: The unit id to check -- help: Optional. If set to 1 then the target must be friendly. If set to 0 it m...
ITEM.name = "Battery" ITEM.model ="models/nasca/etherealsrp_artifacts/battery.mdl" ITEM.description = "An electric artifact." ITEM.longdesc = "It comprises electrostatic elements, but scientists have yet to determine the exact physical conditions required for its formation. The artifact is quite popular in the Zone and...
local url_count = 0 local tries = 0 local item_type = os.getenv('item_type') local item_value = os.getenv('item_value') local escaped_item_name = os.getenv('escaped_item_name') local item_dir = os.getenv('item_dir') local got_initial_redirect = false read_file = function(file) if file then local f = assert(io.o...
--Copyright (c) 2013~2016, 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 ...
local List = script.Parent local Llama = List.Parent local t = require(Llama.t) local indexType = t.optional(t.integer) local validate = t.tuple(t.table, indexType, indexType) local function splice(list, from, to, ...) assert(validate(list, from, to)) local len = #list from = from or 1 to = to or len + 1 if...
local highlight = require('lualine.highlight') local Tab = require('lualine.utils.class'):extend() ---intialize a new tab from opts ---@param opts table function Tab:init(opts) assert(opts.tabnr, 'Cannot create Tab without tabnr') self.tabnr = opts.tabnr self.options = opts.options self.highlights = opts.highl...
--- --- Properties Request rate limiting dao -- Copyright (c) GoGo Easy Team & Jacobs Lei -- Author: Jacobs Lei -- Date: 2018/4/3 -- Time: 下午6:40 local cjson = require("core.utils.json") local dynamicd_build = require("core.dao.dynamicd_build_sql") local dao_config = require("core.dao.config") local co_parameter_dao =...
function Suicide(keys) local caster = keys.caster local caster_location = caster:GetAbsOrigin() local ability = keys.ability local ability_level = ability:GetLevel() - 1 -- Ability variables local respawn_time_percentage = ability:GetLevelSpecialValueFor("respawn_time_percentage", ability_level...
--[[ Call Robot Framework Author: Native Instruments Written by: Yaron Eshkar Modified: April 23, 2021 --]] -- Script os.execute("robot --help")
local TopoRuntime = {} local Stack = {} local Length = 0 local function NewStackFrame(Node) return { AccessedKeys = {}, Node = Node, } end local function Cleanup() local CurrentFrame = Stack[Length] local AccessedKeys = CurrentFrame.AccessedKeys for BaseKey, State in pairs(CurrentFrame.Node.System) do loc...
vim.g.qs_highlight_on_keys = {'f', 'F', 't', 'T'} vim.cmd [[ augroup MyQuickScope autocmd! autocmd FileType nvimtree,buffergator,tagbar,qf let b:qs_local_disable=1 augroup END ]]
local function saveToFile(fileName,data) local r = file.open(fileName, "w") and data if r then file.write(data) file.close() end return r end local function auth(arg) local access = (arg.login == _s.login and arg.pass == _s.pass) return access and _s.token end local function listap(list) stat...
--[[ Airplanedealer • v1.0 This script was made by Pablo1610 Twitch: https://twitch.tv/pablo_1610) Discord: https://discord.gg/Ksyc97N ]] -- ESX getter trigger = "esx:getSharedObject" -- Discord webhook webhook = "putYourWebhookHere" -- CHANGE ME -- Locales menu_garage_separator_owned_v...
-- Displays some species data in the console about all the active units. for _,unit in ipairs(df.global.world.units.active) do race_lookup = unit.race racey = df.global.world.raws.creatures.all[race_lookup] caste_lookup = unit.caste castey = racey.caste[caste_lookup] if unit.name.has_nam...
local playsession = { {"everLord", {2086218}}, {"Menander", {2146641}}, {"greencheetah100", {359481}}, {"InphinitePhractals", {396523}}, {"Sgt_kupcake", {20748}}, {"rocifier", {983994}}, {"Lestibornes", {508921}}, {"010110", {215699}}, {"dragon6373", {744}}, {"Tordren", {94176}}, {"thederpyloco", {89861}}, ...
local common = ... local global = _G local io = io local math = math local minetest = minetest local string = string local table = table local chat_send_player = minetest.chat_send_player local get_player_by_name = minetest.get_player_by_name local error = error local find ...
return function() local NodeHandlers = {} -- Map( HandlerName -> Handler ) local Handlers = {} -- Map( EntityName - > HandlerName ) local EntityToHandlerMap = {} -- AddHandler( NodeHandler ) :: void -- Adds a node handler function NodeHandlers.AddHandler(handler) Handlers[handl...
-- Convert MIDI Note On/Off to Control Change events local version = "0.1.0" print("Loading note2cc filter version " .. version .. " ...") -- define URI prefix for state parameters local urn = Mapper('urn:uuid:b5dc6500-f459-11ea-a971-3c970e9a9ec9#') -- for storing which notes are currently "on" local note_state = {}...
local ffi = require('ffi'); ffi.cdef[[ typedef struct lacItemOrder_t { uint8_t Name[32]; int32_t Quantity; int32_t AugPath; int32_t AugRank; int32_t AugTrial; int32_t AugCount; uint8_t AugString[5][100]; } lacItemOrder_t; ]]; ffi.cdef[[ typedef struct ...
package.path = package.path .. ";data/scripts/lib/?.lua" package.path = package.path .. ";data/scripts/?.lua" require ("utility") require ("stringutility") require ("cargotransportlicenseutility") local next, ceil = next, math.ceil local lyr_burstCheck = 2 local iconColor = ColorRGB(0.5, 0.5, 0.5) local fadedIconCo...
-- Vector Math with lua by mark2e -- update by nnimar (direct input and output, more functions) local vec = require("vec") local VEC = vec -- -- Vectors -- function Vdot(x, y, z, s, r, t) local v1 = {x, y, z} local v2 = {s, r, t} res = vec3.dot(v1, v2) outlet(0, res) end function Vcross(x, y, z, s, r, t) loc...
require 'xlua' require 'optim' require 'cunn' dofile './provider.lua' local c = require 'trepl.colorize' print("loading testing data...") t = torch.load('provider_full.t7') test.data = t.valData.data test.label = t.valData.labels t = nil print("loading model...") model = torch.load('logs/model.net') function testi...
local a, b a = (-1) ^ b a = (-0.0) ^ b a = 2 ^ b
#! /usr/bin/env lua -- -- modload.lua -- Copyright (C) 2015 Adrian Perez <aperez@igalia.com> -- -- Distributed under terms of the MIT license. -- local eol = require "eol" assert(eol, "could not load 'eol' module") assert.Field(eol, "load")
local Gui = {} Gui.tex = love.graphics.newImage("res/img/gui/gui.png") Gui.texW = Gui.tex:getWidth() Gui.texH = Gui.tex:getHeight() Gui.food = love.graphics.newQuad(0, 0, 32, 32, Gui.texW, Gui.texH) Gui.fuel = love.graphics.newQuad(32, 0, 32, 32, Gui.texW, Gui.texH) Gui.pop = love.graphics.newQuad(64, 0, 32, ...
-- The Legend of Zelda - Twilight Princess Wii (NTSC v1.0) local core = require("games.core") return core.newGame(0x804C2F08)
data:extend({ --Item { type = "item-with-entity-data", name = "5d-fluid-wagon-2", icon = "__5dim_trains__/graphics/fluid-wagon2.png", flags = {"goes-to-quickbar"}, icon_size = 32, subgroup = "trains-liquids", order = "b", place_result = "5d-fluid-wagon-2", stack_siz...
local gears = require("gears") local awful = require("awful") local wibox = require("wibox") local _screens = {} local function set_screens(screens) _screens = {} for _,screen in ipairs(screens) do table.insert(_screens, screen) end end local function apply_wallpaper(screen_index, wallpaper) gears.wallpa...
lst = { "goldget", "dif", } return lst
local BasePlugin = require "kong.plugins.base_plugin" local WithMigrationHandler = BasePlugin:extend() WithMigrationHandler.PRIORITY = 1000 function WithMigrationHandler:new() WithMigrationHandler.super.new(self, "with-migration") end return WithMigrationHandler
-- check for compatible engine if not core.global_exists("cmer") and not core.global_exists("creatures") then error("A compatible API was not found, please install \"cmer\" or \"creatures\"") end cmer_skeleton = {} cmer_skeleton.modname = core.get_current_modname() cmer_skeleton.modpath = core.get_modpath(cmer_skele...
--[[ ================================================================================ ProjectNukeCoreConfigurationHandler Provides computer configuration handling for ProjectNuke core/applications ================================================================================ Author: stuntguy3000 --]] lo...
--- BaseCombo is a base class for combos. -- @classmod invokation.combos.BaseCombo local moses = require("moses") local class = require("pl.class") local Logger = require("invokation.Logger") local M = class() local LOGGER_PROGNAME = "combo" Logger.Extend(M) M.ERR_NOT_IMPLEMENTED = "Not implemented" --- Combo spec...
-- ############################### -- ## Project: MTA:Speedrace ## -- ## Name: CVehicle.lua ## -- ## Author: Noneatme ## -- ## Version: 1.0 ## -- ## License: See top Folder ## -- ############################### -- FUNCTIONS / METHODS -- local cFunc = {}; -- Local Functions local cSetting = {}; -- Local Settin...
local binser = require("thirdparty.binser") -- OOP wrapper. Based on 30log (https://github.com/Yonaba/30log) -- -- TODOs: -- + Delegation is far too complex and confusing. It should not be -- possible to delegate non-function fields and they should be -- functions instead. Delegating function fields should be the ...
--[[ /////// ////////////////// /////// PROJECT: MTA iLife - German Fun Reallife Gamemode /////// VERSION: 1.7.2 /////// DEVELOPERS: See DEVELOPERS.md in the top folder /////// LICENSE: See LICENSE.md in the top folder /////// ///////////////// ]] CSubUrban = inherit(CShop) function CSubUrban:constructor(iDim...
---@class Configuration Configuration = { ---@type string ---The neutral faction alias in capital letters. NEUTRAL_PLAYER = "NEUTRAL", ---@type table[] ---A map of anonymous objects that define the mapping between the category mask and (a subset of) bones of the `LAYER_DUMMY_TYPE`. CATEGORY_MAP ...
---@class GarrisonFollowerAbilityTemplate : Frame ---@field Icon Texture ---@field Name FontString ---@field Description FontString ---@field CounterIcon Texture ---@field Details FontString ---@field CounterIconBorder Texture ---@field Border Texture ---@class GarrisonFollowerTooltipContentsTemplate : Frame ---@field...
--[[ Project: SA Memory (Available from https://blast.hk/) Developers: LUCHARE, FYP Special thanks: plugin-sdk (https://github.com/DK22Pac/plugin-sdk) for the structures and addresses. Copyright (c) 2018 BlastHack. ]] local mt = require 'SAMemory.metatype' local ffi = require 'ffi' ffi.cdef[[ typedef struct ...
-- Author: Divran local Obj = EGP:NewObject( "Box" ) Obj.angle = 0 Obj.CanTopLeft = true Obj.Draw = function( self ) if (self.a>0) then surface.SetDrawColor( self.r, self.g, self.b, self.a ) surface.DrawTexturedRectRotated( self.x, self.y, self.w, self.h, self.angle ) end end Obj.Transmit = function( self ) net....
-- Copyright (c) 2022 nya.works <bug@nya.works> -- -- Permission to use, copy, modify, and distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTH...
-- Vehicle example. -- This sample demonstrates: -- - Creating a heightmap terrain with collision -- - Constructing a physical vehicle with rigid bodies for the hull and the wheels, joined with constraints -- - Saving and loading the variables of a script object, including node & component references requi...
function gadget:GetInfo() return { name = "Unit Auto Builder", desc = "simulates the building of a unit without using builders", author = "petturtle", date = "2020", layer = -10, enabled = true } end if not gadgetHandler:IsSyncedCode() then return false end ...
local Vector=require("vector") require("objects") local moonOrbit=3.84e8 --m local screenPixels=703 local screenSize=2*moonOrbit+2*3e9 scale=1/(screenSize/screenPixels) --pixels/metre drawScale=false highlightSmallObjects=false function computeForces(o) for _,o2 in pairs(objects) do if o2~=o then ...
-- "c"hannel "g"eneral keymap("cg", function() err = Pick("Test Team", "general") if err then error(err) end end) -- "c"hannel "r"eneral keymap("cr", function() err = Pick("Test Team", "random") if err then error(err) end end)
#!/usr/bin/env wsapi.cgi module(..., package.seeall) ABOUT = { NAME = "backup.sh", VERSION = "2016.12.10", DESCRIPTION = "user_data backup script /etc/cmh-ludl/cgi-bin/cmh/backup.sh", AUTHOR = "@akbooer", COPYRIGHT = "(c) 2013-2016 AKBooer", DOCUMENTATION = "https://github.com/...
---@meta ---@class resty.lrucache.pureffi : resty.lrucache local lrucache_pureffi = { _VERSION = "0.11", } --- Creates a new cache instance. --- --- Upon failure, returns nil and a string describing the error. --- ---@param max_items number specifies the maximal number of items this cache can hold. ---@param loa...
-- definitions used for testing Kailua (should not be used for other purpose!) --# assume global kailua_test: const { --# gen_tvar: const [`internal kailua_gen_tvar`] function() --> any; --# assert_tvar: const [`internal kailua_assert_tvar`] function(any); --# }
local RunService = game:GetService("RunService") RunService.RenderStepped:Connect(function() -- check if the script is in the players character if script.Parent:IsA("Model") and script.Parent:FindFirstChild("Humanoid") then for _,v in ipairs(script.Parent.Head:GetChildren()) do if v:IsA("Decal") and v.Texture =...
--------------------------------------------------------------------------------------------------- --===============================================================================================-- --filename: bag_table.lua --data:2022.2.22 --author:pu --desc:背包 --=====================================================...
local function close_redis(red) if not red then return end --释放连接(连接池实现) local pool_max_idle_time = 10000 --毫秒 local pool_size = 100 --连接池大小 local ok, err = red:set_keepalive(pool_max_idle_time, pool_size) if not ok then ngx.say("set keepalive error : ", err) end end loc...
local class = require 'middleclass' local pdu = require 'modbus.pdu.init' local data_pack = require 'modbus.data.pack' local data_unpack = require 'modbus.data.unpack' local date = require 'date' local ioe = require 'ioe' local retry = require 'utils.retry' local worker = class("CODcr_1001.worker") local SF = string....