content
stringlengths
5
1.05M
----------------------------------------------------------------------------------- -- The following methods are provided by PWM module: -- -- 1. pwm.setup(pin, freqency, duty, channel) -- pin: pin to set -- frequency: frequency to set -- duty: duty to set. range from 0 to 8192 -- channel: us...
local pairs = pairs local setmetatable = setmetatable local math_floor = math.floor local debug_getmetatable = debug.getmetatable function table.ShallowCopy(tbl, bOutsideMeta --[[= true]]) gs.CheckType(tbl, 1, TYPE_TABLE) if (gs.CheckType(bOutsideMeta, 2, {TYPE_BOOL, TYPE_NIL}) == TYPE_NIL) then bOuts...
object_tangible_wearables_cybernetic_s02_cybernetic_s02_torso = object_tangible_wearables_cybernetic_s02_shared_cybernetic_s02_torso:new { } ObjectTemplates:addTemplate(object_tangible_wearables_cybernetic_s02_cybernetic_s02_torso, "object/tangible/wearables/cybernetic/s02/cybernetic_s02_torso.iff")
-- A component to render a numerical value local Text = require "text" local Metric = { canvas = nil, style = { offset = 2, face = "Walle Digits" } } function Metric:new (canvas, value, max, format, size, color) local o = setmetatable ({}, self) self.__index = self o.canvas = canvas o.value = ...
ngx.req.set_header('Foo', {'Bar1', 'Bar2'}) ngx.req.set_header('Foo1_123', 'Bar3') ngx.req.set_header('user-agent', {}) local res = ngx.location.capture('/sub_request_header') if res.status == ngx.HTTP_OK then ngx.say(res.body) else ngx.exit(res.status) end
--- -- FDMM Airbase Module. -- @module FDMM_Airbase env.info("---FDMM_Airbase Start---") require('Territory/FDMM_Facility') --- FDMM airbase module. fdmm.airbase = {} do -- FDMMAirbase --- Airbase class that manages an airbase facility in a territory, which acts as a territory airstrip, respawn area, and supply p...
-- In init.lua or filetype.nvim's config file require("filetype").setup({ overrides = { extensions = { -- Set the filetype of *.pn files to potion pn = "potion" }, literal = { -- Set the filetype of files named "MyBackupFile" to lua MyBackupFil...
treeTeleportThreeConvoTemplate = ConvoTemplate:new { initialScreen = "first_screen", templateType = "Lua", luaClassHandler = "treeTeleportThreeConvoHandler", screens = {} } first_screen = ConvoScreen:new { id = "first_screen", leftDialog = "", customDialogText = "Greeting friend. Which level of the Great Tree w...
require("dotnet") dotnet.load("Tests")
response = ngx.location.capture ( '/backend/spots', { always_forward_body = true, copy_all_vars = true}) if response.status > 500 then ngx.exit(response.status) end local cjson = require("cjson") spots = cjson.decode(response.body)...
local function dir_match_generator_impl(text) -- Strip off any path components that may be on text. local prefix = "" local i = text:find("[\\/:][^\\/:]*$") if i then prefix = text:sub(1, i) end local include_dots = text:find("%.+$") ~= nil local matches = {} local mask = tex...
---@class Fixing : zombie.scripting.objects.Fixing ---@field private name String ---@field private require ArrayList|Unknown ---@field private fixers LinkedList|Unknown ---@field private globalItem Fixing.Fixer ---@field private conditionModifier float ---@field private s_PredicateRequired Fixing.PredicateRequired ---@...
function fib(n) if n < 2 then return n end return fib(n-2) + fib(n-1) end print(fib(39))
location_dir = "./" include(location_dir .. "conanbuildinfo.premake.lua") workspace("Robot") location(location_dir) conan_basic_setup() project("Robot") kind "StaticLib" language "C++" cppdialect "C++17" targetdir = location_dir .. "bin" files{ "robot/Source/*.h", "robot/Source/*.cc" } filte...
local Action = require(script.Parent.Action) return Action("StampIgnoreWaterSet", function(ignoreWater) return { ignoreWater = ignoreWater } end)
local path = (...):gsub(".main_loop", "") local frequency_counter = require('lib.ferris.frequency_counter') local class = require('lib.batteries.class') local main_loop = class({ name = "main_loop", }) function main_loop:new(interpolate_render) self.frametime = 1 / 60 self.ticks_per_second = frequency_counter() se...
--- ε››θˆδΊ”ε…₯ ---@param decimal number ---@return number math.round = function(decimal) if (decimal == nil) then return 0.00 end return math.floor((decimal * 100) + 0.5) * 0.01 end --- ζ•°ε­—ζ ΌεΌεŒ– ---@param value number ---@return string math.numberFormat = function(value) if (value > 1000...
wait(0.016666666666667) script.Name = "Chaos" local Player = game.Players.LocalPlayer local Character = Player.Character local Effects = {} local Humanoid = Character.Humanoid local mouse = Player:GetMouse() local m = Instance.new("Model", Character) m.Name = "WeaponModel" local LeftArm = Character["Left Arm"] l...
-- intel1g: Device driver app for Intel 1G and 10G network cards -- It supports -- - Intel1G i210 and i350 based 1G network cards -- - Intel82599 82599 based 10G network cards -- The driver supports multiple processes connecting to the same physical nic. -- Per process RX / TX queues are available via RSS. Statis...
ys = ys or {} ys.Battle.AttackLeftState = class("AttackLeftState", ys.Battle.IUnitState) ys.Battle.AttackLeftState.__name = "AttackLeftState" ys.Battle.AttackLeftState.Ctor = function (slot0) slot0.super.Ctor() end ys.Battle.AttackLeftState.AddIdleState = function (slot0, slot1, slot2) return end ys.Battle.AttackL...
local action_node = class("action_node") function action_node:initialize() end function action_node:proc(the_owner) return false end return action_node
local API_NPC = require(script:GetCustomProperty("API_NPC")) local API_RE = require(script:GetCustomProperty("APIReliableEvents")) local EFFECT_TEMPLATE = script:GetCustomProperty("EffectTemplate") local TELEGRAPH_TEMPLATE = script:GetCustomProperty("TelegraphTemplate") local VOLLEY_RADIUS = 140.0 local curr...
--AI local AI = display.newImageRect("graphics/AI/yellowsquare.png", 32, 32) -- set speed of the AI SPEED = 1 --AI physics physics.addBody( AI, "dynamic", {density = 1000000, friction=0, bounce=0 } ) AI.isFixedRotation = true AI.gravityScale = 0 AI.isBullet = false --AI position AI.x = 1000 AI.y = 1000 ...
local S = aurum.get_translator() local mod = "^[colorize:#FFFFFF:250" aurum.base.register_liquid("aurum_base:aether", { description = S"Aether", tiles = { { name = "default_lava_source_animated.png" .. mod, backface_culling = false, animation = { type = "vertical_frames", aspect_w = 16, aspec...
-- Natural Selection 2 Competitive Mod -- Source located at - https://github.com/xToken/CompMod -- lua\CompMod\Structures\Marine\ARC\shared.lua -- - Dragon local networkVars = { arc_upg1 = "boolean", arc_upg1 = "boolean", } local originalARCOnInitialized originalARCOnInitialized = Class_ReplaceMethod("ARC", "OnI...
return function(utf8) utf8.config.begins = utf8.config.begins or { utf8:require "begins.compiletime.vanilla" } function utf8.regex.compiletime.begins.parse(regex, c, bs, ctx) for _, m in ipairs(utf8.config.begins) do local functions, move = m.parse(regex, c, bs, ctx) utf8.debug("begins", _, c, bs, move, f...
m1 = mk_metavar("a") print(m1) m2 = mk_metavar("b", local_context(mk_inst(1, Const("a")), local_context())) print(m2)
local L = BigWigs:NewBossLocale("The Black Morass Trash", "zhCN") if not L then return end if L then L.wave = "ζ³’ζ•°θ­¦ζŠ₯" L.wave_desc = "ζ―ζ³’ηš„ε€§ζ¦‚θ­¦ζŠ₯。" L.medivh = "ιΊ¦θΏͺζ–‡" end
--- SDLImage library -- @module configure.modules.sdlimage local M = {} --- Build SDLImage library -- -- @param args -- @param args.build Build instance -- @param args.name Name of the project (defaults to 'SDLImage') -- @param args.version Version to use -- @param args.compiler -- @param args.install_directory -- @p...
print('hi!') send_data = function() http.get("http://192.168.10.53:8000/api/collect", nil, function (code, data) if code < 0 then print("http request failed") else print("http request successful: "..data) end end) tmr.create():alarm(5000, tmr.ALARM_SINGLE, send_data) end send_data() wh...
#!/usr/bin/env texlua -- Build script for LaTeX3 files -- No bundle or module here, but these have to be defined bundle = "LaTeX3" module = "" -- A couple of custom variables: the order here is set up for 'importance' bundles = {"l3kernel", "l3packages", "l3experimental", "l3trial"} checkbundles = { "l...
local a = {} a.w=202 a.h=102 a.centerX = a.w a.centerY = a.h / 2 a.animTable={{206,187},{0,187},{824,187},{618,187},{1030,187},{412,187}} a.animSpeed=8 return a
xpanes = {} local function rshift(x, by) return math.floor(x / 2 ^ by) end local directions = { {x = 1, y = 0, z = 0}, {x = 0, y = 0, z = 1}, {x = -1, y = 0, z = 0}, {x = 0, y = 0, z = -1}, } local function update_pane(pos, name) if not minetest.get_node(pos).name:find("^xpanes:"..name) then return end loc...
--[[-------------------------------------------------------------------------- * * Mello Trainer * (C) Michael Goodwin 2017 * http://github.com/thestonedturtle/mellotrainer/releases * * This menu used the Scorpion Trainer as a framework to build off of. * https://github.com/pongo1231/Scorpio...
function CreateMenu(identifier) local self = {} local _menuTitle = "RCORE" local _properties = { float = "right", position = "middle", } local items = {} -------------- self.SetMenuTitle = function(title) _menuTitle = title end self.GetMenuTitle = function() ...
local HttpService = game:GetService("HttpService") local Selection = game:GetService("Selection") local ServerStorage = game:GetService("ServerStorage") --- local root = script.Parent.Parent local PluginModules = root:FindFirstChild("PluginModules") local Style = require(PluginModules:FindFirstChild("Style")) local ...
local skynet = require "skynet" local sc = require "socketchannel" local name = ... or "" function _do() --εˆ›ε»ΊδΈ€δΈͺchannel local c = sc.channel{ host = skynet.getenv "app_server_ip", port = skynet.getenv "app_server_port", } --ζ‰§θ‘Œζ“δ½œ local msg = c:request("hello, "..name,...
local function isNode(input) local typename = torch.typename(input) return typename and typename == 'nngraph.Node' end local function isNonEmptyList(input) return type(input) == "table" and #input > 0 end local function _nest(input) if not isNode(input) and not isNonEmptyList(input) then error('wha...
--14.lua --string.gmatchη”¨ζ³•εœ¨20η«  function getfield(f) local v = _G for w in string.gmatch(f, "[%w_]+") do v = v[w] end return v end function setfield(f, v) local t = _G for w, d in string.gmatch(f, "([%w_]+)(%.?)") do print(w, d) if d=="." then t[w] = t[w] or {} t = t[w] else t[w] = v end end ...
--[[ WARP GATE LIST warp_gate(<warp_alias>, <gate_to>, <this_gate_id>, <map_id>, <min_x_pos>, <min_y_pos>, <min_z_pos>, <max_x_pos>, <max_y_pos>, <max_z_pos>); --]] warp_gate("", 54, 5093.42, 4824.61, 14.23, 55, 5834.839, 4693.9, 17.29603, 5841.652, 4700.604, 22.44576); warp_gate("", 51, 5084.68, 5344.79, 0.17, 55, 551...
require 'src/gen/surface' CHUNKSIZE = 80 function generateNewGameChunks(a,aX,aY) generateMapChunk(a,aX,aY) generateMapChunk(a,aX+1,aY) generateMapChunk(a,aX-1,aY) generateMapChunk(a,aX,aY+1) generateMapChunk(a,aX,aY-1) generateMapChunk(a,aX+1,aY+1) generateMapChunk(a,aX+1,aY-1) generateMapChunk(a,aX-1...
--proc/system/module: LoadLibrary API --Written by Cosmin Apreutesei. Public Domain. setfenv(1, require'winapi') require'winapi.winuser' ffi.cdef[[ HMODULE GetModuleHandleW( LPCWSTR lpModuleName ); BOOL GetModuleHandleExW( DWORD dwFlags, LPCWSTR lpModuleName, HMODULE* phModule ); ...
Queue = {} function Queue:new() local obj = {} setmetatable(obj, self) self.__index = self return obj end function Queue:add(item) self[#self+1] = item end function Queue:remove() table.remove(self, 1) end
if not modules then modules = { } end modules ['lxml-tex'] = { version = 1.001, comment = "companion to lxml-ini.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } -- Because we split and...
-- This resource is part of the default Cfx.re asset pack (cfx-server-data) -- Altering or recreating for local use only is strongly discouraged. version '1.0.0' author 'Cfx.re <root@cfx.re>' description 'Handles spawning a player in a unified fashion to prevent resources from having to implement custom spawn logic.' ...
require("busted.runner")() local Clock = require("norn.clock") describe("OS clock", function () local c before_each(function () c = Clock.os() end) it("should instantiate", function () assert.not_nil(c) end) it("should return current time", function () local t1 = c:now() assert.not_nil(t1) local t2...
local class = require("class") local stringstream = require("string_stream") local unpack = table.unpack or unpack KaitaiStruct = class.class() function KaitaiStruct:_init(io) self._io = io end function KaitaiStruct:close() self._io:close() end function KaitaiStruct:from_file(filename) local inp = asser...
---@type number local aNumber ---@return number local function returnsANumber() return math.random() end aNumber = returnsANumber() aNumber = 1 aNumber = 1 + 1 ---@type 1 local theNumberOne theNumberOne = 1 theNumberOne = 0x1 -- Hex representation theNumberOne = 1.0 -- All numbers are floats in Lua < 5.3. >= 5.3 th...
local cmd = "" local board = "rnbqkbnrpppppppp................................PPPPPPPPRNBQKBNR" local startpos = board enPassantSquare = 0 castlingRights = {true,true,true,true} --white O-O, white O-O-O, black O-O, black O-O-O print('LACE (Lua Alternative Chess Engine) 0.0.1alpha | Developed by WhakeNeD') print("...
require("mod-gui") function gui_init(player) -- if mod_gui.get_button_flow(player)["but-test1"] then -- return -- end -- mod_gui.get_button_flow(player).add -- { -- type = "sprite-button", -- name = "but-test1", -- sprite = "sprite_test1", -- style = mod_gui.button_style -- } -- mod_gui.get_button_flow(player)....
local entity = {} entity["arcana"] = [[Strength]] entity["spellDeck"] = {} entity["spellDeck"][1] = [[Deathbound]] entity["spellDeck"][2] = [[Power Charge]] entity["spellDeck"][3] = [[Auto-Masukukaja]] entity["spellDeck"][4] = [[]] entity["spellDeck"][5] = [[]] entity["spellDeck"][6] = [[]] entity["desc"] = [[Sir Lance...
#!/usr/bin/env lua ---------------------------------------------------------------------- -- This script presents SPECTATOR mode. In SPECTATOR mode you play and -- your agent can learn from it. -- Configuration is loaded from "../../examples/config/<SCENARIO_NAME>.cfg" file. -- -- To see the scenario description go to...
--[[ ****************************************************************** FlipIcons (Vertical) v1.1 by @supermamon (github.com/supermamon/cylinder-scripts/) v1.1 2014-02-16: Compatibility update for Cylinder v0.13.2.15 v1.0 2014-02-13: First release. *******************************************************************...
object_static_particle_holo_planet_hoth = object_static_particle_shared_holo_planet_hoth:new { } ObjectTemplates:addTemplate(object_static_particle_holo_planet_hoth, "object/static/particle/holo_planet_hoth.iff")
-- ResNet-1001 -- This is a re-implementation of the 1001-layer residual networks described in: -- [a] "Identity Mappings in Deep Residual Networks", arXiv:1603.05027, 2016, -- authored by Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. -- Acknowledgement: This code is contributed by Xiang Ming from Xi'an ...
-- See LICENSE for terms local T = T local table = table return { PlaceObj("ModItemOptionToggle", { "name", "LockMOXIEs", "DisplayName", T(302535920011964, "Lock MOXIEs"), "Help", T(302535920011965, "MOXIEs will be locked behind the Magnetic Filtering tech."), "DefaultValue", false, }), PlaceOb...
--sv_sandbox -- by Stickly Man! --Server-side code related to the sandbox menu. local function init() if ULib.isSandbox() then --Only execute the following code if it's a sandbox gamemode xgui.addDataType( "sboxlimits", function() return xgui.sboxLimits end, "xgui_gmsettings", 0, -20 ) ULib.replicatedWritableCva...
--[[ --]] ardb.call("del", "sorthash", "sortset", "sortzset", "sortlist", "weight_100", "weight_10", "weight_9", "weight_1000") ardb.call("mset2", "weight_100", "1000", "weight_10", "900", "weight_9", "800", "weight_1000", "700") ardb.call("hmset","sorthash","field_100","hash100","field_10","hash10","field_9","hash9"...
local SyncedClock = {} SyncedClock.ClassName = "SyncedClock" SyncedClock.__index = SyncedClock local function GetOptional(Options, Name, Default) if not Options or Options[Name] == nil then return Default else return Options[Name] end end function SyncedClock.new(Options: {ShouldLerp: boolean?}?) return setme...
LLINE = "long line aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" LLINE1 = "long line aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
local copas = require "copas" local lfs = require "lfs" local file = require "pl.file" local json = require "json" local shell = require "lib/shell" local unistd = require "posix.unistd" local LuacBuilder = {} LuacBuilder.__index = LuacBuilder LuacBuilder.__deps = { storage = "storage", cache = "cache" } ----...
--[[ ================================================= β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β•šβ•β•β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘ β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β•šβ•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆ...
return { id = "pizzabox", name = "Pizza Box", description = "New convenient way to take your food on the go!", type = "hat", rarity = 2, hidden = false, }
--[[ The MIT License (MIT) Copyright (c) 2015 Martin Felis Copyright (c) 2015 Matthias Richter 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 th...
-- -- tests/test_snc.lua -- Automated test suite for the SNC toolset interface. -- Copyright (c) 2012-2013 Jason Perkins and the Premake project -- local suite = test.declare("tools_snc") local snc = premake.tools.snc -- -- Setup/teardown -- local sln, prj, cfg function suite.setup() sln, prj = test.creates...
-- Adapted from https://github.com/itchyny/vim-gitbranch and https://github.com/mhinz/vim-signify local function get_path_dir(path) local dir = path local prev = '' while dir ~= prev do local git_dir = dir .. '/.git' local dir_info = vim.loop.fs_stat(git_dir) if dir_info and dir_info['type'] == 'direc...
-- -- Project: wiola -- User: Konstantin Burkalev -- Date: 16.03.14 -- ngx.header["Server"] = "wiola/Lua v0.9.0" local has = function(tab, val) for _, value in ipairs (tab) do if value == val then return true end end return false end local wiola_config = require "wiola.config...
-- -- -- admin_clientjoiner.lua -- -- See admin_joinerserver.lua -- ------------------------------------------------------ ------------------------------------------------------ -- -- Events -- ------------------------------------------------------ ------------------------------------------------------ addEventHandler...
local pack = {} local function _Decode(str, cache) local callback = pack.Decoders[string.Left(str, 1)] if not callback then error("No decode type for " .. string.Left(str, 1)) end return callback(string.sub(str, 2), cache) end pack.Pointers = { [TYPE_TABLE] = true, [TYPE_STRING] = true } pack.Encoders = { ...
--[[ LuCI - Lua Configuration Interface Copyright 2011 RA <ravageralpha@gmail.com> 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 ]]-- local map, sect...
local utf8 = require("utf8") TextBox = {} TextBox._index = TextBox function TextBox:Create(posX, posY, widthP, heightP, backColor, textColor, foreColor, textP, validationPatternP) local this = { x = posX, y = posY, width = widthP, height = heightP, text = textP, ...
--[[ Copyright (C) 2019 Google LLC 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 tha...
object_tangible_tcg_series6_decorative_house_lamp = object_tangible_tcg_series6_shared_decorative_house_lamp:new { } ObjectTemplates:addTemplate(object_tangible_tcg_series6_decorative_house_lamp, "object/tangible/tcg/series6/decorative_house_lamp.iff")
local PLUGIN = PLUGIN ITEM.name = "Medic Kit" ITEM.model = Model("models/kek1ch/dev_aptechka_mid.mdl") ITEM.description = "A military-grade medicine kit able to provide basic field aid to soldiers and denizens alike." ITEM.category = "Medical" ITEM.chance = 15 ITEM.rare = true ITEM.functions.Apply = { sound = "items/...
--dont even have a hooperbin yet lol --Gun Blade plyr = game.Players.LocalPlayer char = plyr.Character tol=Instance.new("HopperBin",plyr.Backpack) tol.Name="Gun_blade" hum = char.Humanoid torso = char.Torso limb = {char:findFirstChild("Right Arm")} handle = Instance.new("Part", workspace) handle.CanCollide =...
local params = {...} local Dataseries = params[1] local argcheck = require "argcheck" local doc = require "argcheck.doc" doc[[ ## Categorical functions Here are functions are used for converting to and from categorical type. The categorical series type is a hash table around a torch.IntTensor that maps numerical va...
local Children = game.Lighting.Customs.armyranger2172:GetChildren() for i = 1, #Children do Children[i]:Clone().Parent = game.Players.LocalPlayer.Backpack end -- Do not change armyranger2172
local save_to = require ('lua-to-bmp_v03') function my_serpent (tabl) local s = "{" for i, v in pairs (tabl) do local v2 = v if type (v) == 'table' then v2 = my_serpent (v) end -- s = s .. tostring(i) .. ' = ' .. v2 .. ', ' s = s .. v2 .. ', ' end s = string.sub(s, 1, -3) .. '}' return s end func...
--GDCW----------------------------------------------------------------------------------------------- -- Global autorun lua for any SWep which can use GDCW bullets local GDCWSettings = {} CreateClientConVar( "gdcwbulletimpact", "1", FCVAR_REPLICATED + FCVAR_NOTIFY + FCVAR_ARCHIVE ) function GDCWSettings.Panel(CPanel...
onEvent("Loop", function() timersLoop() if room.started then room.currentGameHour = room.currentGameHour + 1 checkWorkingTimer() for name, data in next, ROOM.playerList do player = players[name] if not player then break end if player.holdingItem and not mainAssets.__furnitures[player.holdingItem] then ...
vim.cmd([[ let mapleader = "\<Space>"]]) vim.cmd([[ nmap <leader>ve :edit ~/.config/nvim/lua/configs/settings.lua<cr> ]]) vim.cmd([[ nmap <leader>vc :edit ~/.config/nvim/coc-settings.json<cr> ]]) vim.cmd([[ nmap <leader>vr :source ~/.config/nvim/lua/configs/settings.lua<cr> ]]) -- Para Salvar com 'Ctrl + S' nos modos...
local PlayerSpeed = Component.create("PlayerSpeed") function PlayerSpeed:initialize(speed) if speed then self.speed = speed self.speed_45 = self.speed * (1/math.sqrt(2)) end end
local cfg = {} --[[ TO MAKE A DRUG ADD IT TO cfg.drugs LIKE SO: ["itemid"] = { name = "Name", -- item name desc = "Some description.", -- item description choices = function(args) -- create choices local menu = {} -- creates menu menu["Choice"] = {function(player,choice) -- menu choice function...
-- -- Copyright 2013 J.C. Moyer -- -- 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 agreed to in ...
function screenChangingDemo() background(141, 224, 187) button([[ With SimpleButtons each screen can be built as a single function. Changing screens can be as simple as typing `currentScreen = whateverScreenYouWant`]], function() currentScreen = positioningDemo end) end
pfUI:RegisterModule("unusable", function () if not pfUI.bag then return end if C.appearance.bags.unusable ~= "1" then return end pfUI.unusable = CreateFrame("Frame") pfUI.unusable:RegisterEvent("PLAYER_LEVEL_UP") pfUI.unusable:RegisterEvent("SKILL_LINES_CHANGED") pfUI.unusable:RegisterEvent("ITEM_LOCK_CHA...
local vmf = get_mod("VMF") local PRIMARY_BINDABLE_KEYS = { KEYBOARD = { [8] = {"Backspace", "backspace"}, [9] = {"Tab", "tab"}, [13] = {"Enter", "enter"}, [20] = {"Caps Lock", "caps lock"}, [32] = {"Space", "space"}, [33] ...
return { baz = function() return "baz from lua module without decls" end }
PLUGIN:set_global('Factions') Plugin.add_extra('factions') require_relative 'cl_hooks' require_relative 'sv_hooks' function Factions:PluginIncludeFolder(extra, folder) if extra == 'factions' then self.include_factions(folder..'/factions/') return true end end function Factions:ShouldNameGenerate(player...
--[[ 2 October 2020 FrozenDroid: - Added error handling to all event handler and scheduled functions. Lua script errors can no longer bring the server down. - Added some extra checks to which weapons to handle, make sure they actually have a warhead (how come S-8KOM's don't have a warhead field...?) 28 October 2020 Fr...
-- Tests for backtrace debug commands. local helpers = require('test.functional.helpers')(after_each) local command = helpers.command local feed, clear = helpers.feed, helpers.clear local feed_command, expect = helpers.feed_command, helpers.expect describe('108', function() before_each(clear) it('is working', fu...
loadstring(game:HttpGet("https://pastebin.com/raw/XzZG7gt1", true))()
--------------------------------------------------------- --- Extended string library for luvit. --------------------------------------------------------- return function(string) string.split = function(inputstr, sep) if sep == nil then sep = "%s" end local t={} ; i=1 for str in string....
local discordia = require('discordia') local json = require('json') local client = discordia.Client() config = {} botname = 'botTen Classic' botname_cli = "["..botname.."] " local cmdreload_msg = botname_cli.. "Commands have been reloaded succesfully." local cmds = require('cmds') local funcs = require('funcs') cl...
-----------------------登陆---------------------------- local GameCommand = class("GameCommand", BaseCommand) function GameCommand:Execute(notification) local name = notification.Name if name == AppCommand.ReconnectGame then self:ReconnectGame() elseif name == AppCommand.ApplicationPause then self:Ap...
--[[ Description: Responsible for logging Author: Sceleratis Date: 12/11/2021 --]] local Root, Package, Utilities, Service --- Responsible for logging functionality. --- @class Server.Logging --- @server --- @tag Core --- @tag Package: System.Core local Logging = { Logs = {}; } --- Adds a new log of specified...
-- -- Please see the license.txt file included with this distribution for -- attribution and copyright information. -- local getEncumbranceMultOriginal; function onInit() if CharEncumbranceManager5E then getEncumbranceMultOriginal = CharEncumbranceManager5E.getEncumbranceMult; CharEncumbranceManager5E.getEncum...
-- simple "normal" ascii helper for binding UTF-8 sequences just replicate this -- with different name and file to get another, with more extended values .. local tsupp = system_load("widgets/support/text.lua")(); local function probe(ctx, yh) local lst = dispatch_list(); -- group based on meta key presses local m1g...
-- implements a mouse look for spectating e.g. vehicles, as MTA's setCameraTarget only supports players local screenWidth, screenHeight = guiGetScreenSize() local phi, theta = false, false local target local distance = false local sin = math.sin local cos = math.cos local pi = math.pi local _setCameraMatrix = setCa...
object_intangible_beast_bm_pugoriss = object_intangible_beast_shared_bm_pugoriss:new { } ObjectTemplates:addTemplate(object_intangible_beast_bm_pugoriss, "object/intangible/beast/bm_pugoriss.iff")