content
stringlengths
5
1.05M
local ObjectManager = require("managers.object.object_manager") bestineStoneMerchantConvoHandler = conv_handler:new {} function bestineStoneMerchantConvoHandler:getInitialScreen(pPlayer, pNpc, pConvTemplate) local convoTemplate = LuaConversationTemplate(pConvTemplate) local curPhase = BestineElection:getCurrentPhas...
local NeP = NeP NeP.Buttons = { buttons = {} } local nBars = { "ActionButton", "MultiBarBottomRightButton", "MultiBarBottomLeftButton", "MultiBarRightButton", "MultiBarLeftButton" } -- this seems to be missing now.... -- added this from old dumps and seems to work... local function ActionButton_CalculateAction...
-- Monster casting tests. -- this is mostly implemented on the c++ side (see debug_check_moncasts), but -- we use lua to more easily set up the dungeon scenario. dgn.dismiss_monsters() local place1 = dgn.point(20, 20) local place2 = dgn.point(20, 21) dgn.create_monster(place1.x, place1.y, "generate_awake test statue...
Cobalt = require("Cobalt") print("Hello World!"); TestVar = 10; function OnUpdate() Cobalt.Clear(255, 0, 0); end
local thisDirectory = os.getcwd(); local LibDeps = { glmesh = {"glload", "glm"}, glutil = {"glm"}, } local LinkFuncs = { glload = function() includedirs "glload/include" libdirs "glload/lib" configuration "Debug" links {"glloadD"} configuration "Release" links {"glload"} end, glimage = function(...
#!/usr/bin/lua require 'os' --this is diffraction array generator (just the parallel lines with precise positions on paper) --usage: gen.lua strokes_num dpi if arg[1] == '--max-lines' and arg[2] then local dpi = tonumber(arg[2]) print ('Max lines per mm:', dpi/(2 * 25.4)) --2 because we count "visible" black ...
dofile("m12-codelist.lua") local baseAddress = 0xC10000 local special_chars = {} local special_char_idx = {} local function is_include(value, tab) for k,v in ipairs(tab) do if v == value then return true end end return false end local function split(s, p) local rt= {} strin...
Global("Locales", {}) function getLocale() return Locales[common.GetLocalization()] or Locales["eng"] end -------------------------------------------------------------------------------- -- Russian -------------------------------------------------------------------------------- Locales["rus"]={} Locales["rus"]["FPS...
local lsp_util = R 'nvim.utils.lsp' local java_util = R 'nvim.utils.lsp.java' local dap = R 'dap' dap.adapters.java = function(callback) java_util.start_debug_session( function(port) callback( { type = 'server', host = '127.0.0.1', ...
local Adventurer = require("mod.elona.api.Adventurer") local Area = require("api.Area") local Assert = require("api.test.Assert") local Map = require("api.Map") local TestUtil = require("api.test.TestUtil") local Chara = require("api.Chara") local IChara = require("api.chara.IChara") function test_Adventurer__area_of(...
-- Setup tests -- -- Setup nvim-test -- local nvim_test = require "nvim-test" -- nvim_test.setup { -- run = false, -- } -- Setup nvim-treesitter vim.o.runtimepath = vim.fn.getcwd() .. "/nvim-treesitter," .. vim.o.runtimepath local nvim_treesitter = require "nvim-treesitter.configs" nvim_treesitter.setup { ensure_...
trujhazii = Creature:new { objectName = "", socialGroup = "nightsister", faction = "nightsister", level = 50, chanceHit = 10, damageMin = 280, damageMax = 390, baseXp = 100, baseHAM = 12000, baseHAMmax = 15000, armor = 1, resists = {10,10,10,10,10,10,10,10,-1}, meatType = "", meatAmount = 0, hideType = "...
local E, C, L = select(2, ...):unpack() local module = C.aura local TIER = 7 -- Legion local INSTANCE = 875 -- 萨格拉斯之墓 local BOSS BOSS = 1862 -- 格罗斯 module:RegisterDebuff(TIER, INSTANCE, BOSS, 230345) module:RegisterDebuff(TIER, INSTANCE, BOSS, 234264) module:RegisterDebuff(TIER, INSTANCE, BOSS, 231363, 5) module:Regi...
local get_params = request('reformat.get_params') local get_ast = request('!.lua.code.get_ast') local serialize_ast = request('!.lua.code.ast_as_code') local convert = request('!.file.convert') return function(args) local f_in_name, f_out_name, formatter_options = get_params(args) if not f_in_name then ...
local Config = require('opus.config') local GPS = require('opus.gps') local Util = require('opus.util') local UI = require('opus.ui') local Event = require('opus.event') local colors = _G.colors local fs = _G.fs local os = _G.os local peripheral = _G.peripheral local read = _G.read ...
RegisterNetEvent("syncSongClient", function(song) local station = GetPlayerRadioStationName() local songHash = GetCurrentRadioTrackName(station) if songHash == GetHashKey(song) then print("song already synced") else FreezeRadioStation(station) SetRadioTrack(station, song) end end) CreateThread(function(...
--- Prismatic joint proxy class. -- This class is derived from @{JointProxy}. -- -- @classmod PrismaticJointProxy --- Get joint translation. -- @treturn number function PrismaticJointProxy:getJointTranslation() end --- Get joint speed. -- @treturn number function PrismaticJointProxy:getJointSpeed() end --- Set limit...
Blast = Class("Blast") local SPEED = 200 function Blast:init(map, source, size, damage) self.source = source self.size = size self.map = map self.x = source.x self.y = source.y self.width = self.size self.height = self.size self.show = false end function Blast:align() ...
Objects = { createObject ( 897, 695.20001, 851, -41 ), createObject ( 897, 696.5, 856.7002, -40 ), createObject ( 897, 699.5, 862, -41 ), createObject ( 897, 701.79999, 866.29999, -38 ), createObject ( 897, 701.70001, 873.20001, -41, 0, 0, 18 ), createObject ( 897, 702.7002, 869.40039, -41 ), createObject ( 897, 700...
return {'juk','jukbeen','jukboog','jukebox','jukken','jukema','jukbeenderen','jukbenen','jukbogen','jukdragende','jukt','jukte','jukeboxen'}
local util = require"novus.util" local client = require"novus.client" local emission = require"novus.client.emission" local re = require"novus.util.relabel" local lpeg = require"novus.util.lpeg" local patterns = require"novus.util.patterns" local myclient = client.create{token = "Bot "..os.getenv"TOKEN"} myclient.eve...
local crud = require "kong.api.crud_helpers" return { ["/oauth2_tokens/"] = { GET = function(self, dao_factory) crud.paginated_set(self, dao_factory.oauth2_tokens) end, PUT = function(self, dao_factory) crud.put(self.params, dao_factory.oauth2_tokens) end, POST = function(self, dao_...
if SERVER then AddCSLuaFile("shared.lua"); else SWEP.PrintName = "Five-Seven"; SWEP.Author = "Oubliette"; SWEP.Slot = 1; SWEP.SlotPos = 1; end SWEP.Base = "torrent_weapon_base"; SWEP.Spawnable = true; SWEP.AdminSpawnable = true; SWEP.ViewModel = "models/weapons/v_pist_fiveseven.mdl" SWEP.WorldModel = "mod...
-- Heist Yatch: -2043.974,-1031.582, 11.981 exports('GetHeistYachtObject', function() return HeistYacht end) HeistYacht = { ipl = { "hei_yacht_heist", "hei_yacht_heist_bar", "hei_yacht_heist_bar_lod", "hei_yacht_heist_bedrm", "hei_yacht_heist_bedrm_lod", "hei_y...
local timer = require("lib/timer") local lume = require("lib/lume") local mk = {} local flux = require("lib/flux") local colors = require("colors") function mk.boulder(world, x, y) local c = mk.circle(world, x, y, 40) c:setCollisionClass("Solid") c:setAngularDamping(4) c:setMass(3) c:setFriction(2) return c...
local fmt, sbyte, tinsert, tunpack = string.format, string.byte, table.insert, table.unpack local su = require "sqlutil" local rcBridge = require "RevConnBridge" -- 64 byte hex key local function createHexKey(bytes) return ba.rndbs(bytes):gsub(".", function(x) return fmt("%02x", sbyte(x)) end) end -- Encapsulation...
--[AimBot Settings]-- local FreeForAll = false local AimingFor = "Head" local AutoAim = false local Chams = true local PointToAiming = false local IgnoreFOV = false --[End AimBot Settings]-- --[AimBot HotKeys]-- local ModeSwitch = "Q" --Changes whether games FFA or TDM (shoot at all or only enemies). local AimSw...
--Rupture local alib = loadmodule("avada_lib") local common = alib.common local draw = alib.draw local polygon_helper = loadsubmodule("avada_evade", "modules/polygon_helper") local clipper = loadclipper() local myHero = objmanager.player chogath = common.Class(function (s, hero) callback.add(enum.callback.recv.spel...
-- Copyright 2014-2021 Sandor Balazsi <sandor.balazsi@gmail.com> -- Licensed to the public under the GNU General Public License. local io = require "io" local nixio = require "nixio" local http = require "luci.http" local rtorrent = require "rtorrent" local common = require "luci.model.cbi.rtorrent.common" local array...
--[[ KahLua KonferPUG - an open roll loot distribution helper for PUGs. WWW: http://kahluamod.com/kpug SVN: http://kahluamod.com/svn/konferpug IRC: #KahLua on irc.freenode.net E-mail: cruciformer@gmail.com Please refer to the file LICENSE.txt for the Apache License, Version 2.0. Co...
data:extend( { { type = "recipe", name = "e-train", enabled = "false", ingredients = { {"electric-engine-unit", 15}, {"electronic-circuit", 5}, {"steel-plate", 10}, }, result = "e-train" }, { type = "recipe", name = "gravel", enabled = "...
local materials = trinium.materials local recipes = trinium.recipes local S = materials.S materials.add_type("plate", function(def) minetest.register_craftitem(("trinium_materials:plate_%s"):format(def.id), { description = S("@1 Plate", def.name) .. def.formula, inventory_image = "(trinium_materials.plate.png^[mu...
//________________________________ // // NS2 Combat Mod // Made by JimWest and MCMLXXXIV, 2012 // //________________________________ // combat_MarineBuyFuncs.lua // helper Functions for the List, text etc // headlines for the Buymenu function CombatMarineBuy_GetHeadlines() headlines = { ...
-- Pretty sure I skidded this -- Also beautified this with an online beautifier sorry if it looks ugly :) local MainFrame = script.Parent local function dragify() local dragToggle = nil local dragSpeed = .001 local dragInput = nil local dragStart = nil local startPos = nil local function upda...
print "Hello!"
--assert(loadfile("C:\\Users\\spenc\\OneDrive\\Documents\\Eclipe_LDT\\dcs splash damage\\src\\mist.lua"))() --[[ 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, ...
-- author = ray require 'torch' require 'nn' -- configuration feat_dim = feat_dim or 400 num_layer = num_layer or 4 -- including input/output layer num_neuron = num_neuron or { feat_dim,feat_dim,feat_dim,2 } enable_dropout = enable_dropout or false dropout_input = dropout_input or 0.1 dropout_hidden = dropout_hidden ...
#!/usr/bin/env lua -- Author: Armit -- Create Time:
local maxWins local teams = {} local blueFlag, redFlag = nil, nil local blueBlip, redBlip = nil, nil local blueBlip2, redBlip2 = nil, nil local redPoints, bluePoints = 0, 0 local red_shader,blue_shader function ctfStart(red, blue, maxWins_) engineImportTXD(engineLoadTXD('model/' .. 'rcflagxred' .. '.txd'), 2914) en...
if SERVER then AddCSLuaFile("shared.lua") end if CLIENT then SWEP.ViewModelFlip = true SWEP.PrintName = "Steyr Scout" SWEP.IconLetter = "n" SWEP.Slot = 2 SWEP.Slotpos = 2 end SWEP.HoldType = "ar2" SWEP.Base = "rad_base" SWEP.ViewModel = "models/weapons/v_snip_scout.mdl" SWEP.WorldModel = "models/weap...
Rotator = GameObject:extend() function Rotator:new(area, x, y, opts) Rotator.super.new(self, area, x, y, opts) local direction = opts.direction or table.random({-1, 1}) self.x = opts.x or (gw/2 + direction*(gw/2 + 80)) self.y = opts.y or (random(16, gh - 16)) self.parts = {} for i = 1, 5 do s...
solution("xconsole") language("C#") location("") warnings("Extra") configurations({"Debug", "Release"}) filter("configurations:Debug") defines("DEBUG") symbols("On") objdir("obj/debug") targetdir("bin/debug") filter("configurations:Release") optimize("On") objdir("obj/release") targetdir("bin/rel...
gl.setup(1024, 768) -- change this to the native resolution local json = require "json" -- Helper function to create shader based transitions local function make_blender(blend_src) local function create_shader(main_src) local src = [[ uniform sampler2D Texture; varying vec2 TexCoor...
local M = {} -- {number = true} -> {number = {true}} function M.v2t(v) local t = {} for k, v in pairs(v) do t[k] = {} t[k][1] = v end return t end return M;
local ffi = require 'ffi' local gl = require 'gl' local class = require 'ext.class' local table = require 'ext.table' ffi.cdef[[ typedef struct gl_buffer_ptr_t { GLuint ptr[1]; } gl_buffer_ptr_t; ]] local gl_buffer_ptr_t = ffi.metatype('gl_buffer_ptr_t', { __gc = function(buffer) if buffer.ptr[0] ~= 0 then gl....
--[[ ########################################################## S V U I By: S.Jackson ########################################################## LOCALIZED LUA FUNCTIONS ########################################################## ]]-- --[[ GLOBALS ]]-- local _G = _G; local unpack = _G.unpack; local select ...
add_requires("zlib", {system = false}) add_requires("zlib", {system = false}) -- test repeat requires add_requires("zlib~debug", {system = false, debug = true}) add_requires("zlib~shared", {system = false, configs = {shared = true}, alias = "zlib_shared"}) set_policy("package.requires_lock", true) target("test1") ...
--# selene: allow(almost_swapped, divide_by_zero, duplicate_keys, empty_if, global_usage, if_same_then_else, ifs_same_cond, multiple_statements, mismatched_arg_count, parenthese_conditions, roblox_incorrect_color3_new_bounds, roblox_incorrect_roact_usage, shadowing, incorrect_standard_library_use, suspicious_reverse_lo...
n,k = io.read("*number", "*number", "*l") c = {} for i=1,n do c[i] = io.read('*n') == 1 end energy = 100 - (n/k) for i=1,n,k do if c[i] then energy = energy - 2 end end print(energy)
return { screen = require("OS2D.screens.screen"); screenmanager = require("OS2.screens.screenmanager"); }
--[[ Variables ]] Housing.currentHousingLocks = {} Housing.currentHousingLockdown = {} Housing.BuisnessLocations = {} Housing.Players = {} --[[ Functions ]] function getCurrentOwned(src) local cid = exports["caue-base"]:getChar(src, "id") if not cid then return {} end local result = MySQL.qu...
local _=require 'leda' local stage={} ----------------------------------------------------------------------------- -- Roundrobin through its output ports -- -- param: '...': data to be sent ----------------------------------------------------------------------------- function stage.handler(...) coroutine.r...
require 'game.vec2' require 'things.thing' require 'things.agent' require 'game.sound' require 'data.animationset.slash' require 'spriteeffect.splash' require 'game.message' slash = thing:new { source = nil, } local function splash_ice (reference, tile) local agent = agent:new{ counter = .3 } function ag...
-- require "bootstrap" --local int64 = require "int64" local lpb = require "lpb" local libjson = require "cjson"
--[[ Copyright (c) 2019 robot256 (MIT License) * Project: Multiple Unit Train Control * File: replaceLocomotive.lua * Description: Replaces one Locomotive Entity with a new one of a different entity-name. * Preserves as many properties of the original as possible. * Currently does not support preserving equi...
-- This is a class local BGline = {} function BGline:new (x1, z1, x2, z2, stage_elevation) -- Class operations done here local instance = {} self.__index = self setmetatable(instance, self) -- Generate world-coord vertices instance.vertices = { {x = x1, y = stage_elevation, z = z1}, {x = x2, y = sta...
Config = {} Config.DrawDistance = 10.0 Config.MarkerSize = {x = 7.0, y = 7.0, z = 1.0} Config.Money = 100 -- How much it takes from you when you open the clothing menu Config.Debug = false Config.ClothingShops = { [1] = { blip = true, coords = vector3(72.3, -1399.1, 28.4), MarkerSize = {x = 7.0, y = 7.0, ...
object_tangible_quest_talus_brood_egg_single = object_tangible_quest_shared_talus_brood_egg_single:new { } ObjectTemplates:addTemplate(object_tangible_quest_talus_brood_egg_single, "object/tangible/quest/talus_brood_egg_single.iff")
function love.load(arguments) require('demos.' .. arguments[1]) local oldDraw = love.draw function love.draw() if oldDraw then oldDraw() end love.graphics.print(string.format('Memory usage: %ikb', collectgarbage 'count')) end end
require('lspsaga').init_lsp_saga { error_sign = "✘", warn_sign = "➤", hint_sign = "", infor_sign = "➟", code_action_icon = "", code_action_prompt = { enable = true, sign = false, virtual_text = true }, finder_action_keys = { open = "e", vsplit = "v", split = "s", ...
function onCreate() makeLuaSprite('stageback', 'gacha/bg', -400, 100); setScrollFactor('stageback', 0.1, 0.1); makeLuaSprite('stagefront', 'gacha/floor', -400, 500); setScrollFactor('stageback', 1, 1); addLuaSprite('stageback', false); addLuaSprite('stagefront', false); close(true); end
local common = require("docscripts") local verbose, path = common.parseargs({...}) local data = common.loadDirectory(path) local peripherals = {} local plugins = {} function plugins.pnames(pname, peripheral) return pname end function plugins.methods(pname, peripheral) mnames = {} if peripheral.methods...
AddCSLuaFile() ENT.WeaponTypes.Lava = { Name = "mechassault.weapon.lava", Type = "Energy", Function = "FireLavaGun", Cooldown = 3.6, FireRate = 0.4, Burst = 3, Class = "ma2_proj_lava", Effect = "gm_MA2_muzzleflash_Flamer_lvl1", MaxLevel = 1 } function ENT:FireLavaGun(tbl, level, attachments) local target = ...
local Class = require("class") local C = Class:derive("Color") local hex_colors = { 0x43002a, 0x890027, 0xd9243c, 0xff6157, 0xffb762, 0xc76e46, 0x73392e, 0x34111f, 0x030710, 0x273b2d, 0x458239, 0x9cb93b, 0xffd832, 0xff823b, 0xd1401f, 0x7c191a, 0x310c1b, 0x833f34, 0xeb9c6e, 0xffdaac, 0xffffe4, 0xbfc3c6, 0x6...
local ReplicatedStorage = game:GetService("ReplicatedStorage") local CollectionService = game:GetService("CollectionService") local Players = game:GetService("Players") return function(Settings, CustomPackages, Stylesheets) -- BUILDER script.SystemPackages.Settings:Destroy() Settings.Name = "Settings" CustomPacka...
-- Copyright 2015-2021 David B. Lamkins <david@lamkins.net>. See LICENSE. -- pure LPeg lexer, see http://purelang.bitbucket.org/ local lexer = require('lexer') local token, word_match = lexer.token, lexer.word_match local P, S = lpeg.P, lpeg.S local lex = lexer.new('pure') -- Whitespace. lex:add_rule('whitespace', t...
-- A project defines one build target -- from IrrlichtML 1.7.1 project "IrrlichtML" --kind "WindowedApp" kind "ConsoleApp" --kind "SharedLib" --kind "StaticLib" language "C++" files { "*.cpp", "*.h", } includedirs { "../../../irrlicht/include", "../../../freetype/include", } links { "Irrlicht", "fr...
function get() local data = {} local name = url:decode(http.getValues.name) data.info, cache = db:singleQuery("SELECT a.id, a.account_id, e.premdays, e.creation, d.name AS rank, c.name AS guild, a.name, a.stamina, a.sex, a.vocation, a.level, a.town_id, a.lastlogin, a.lastlogout, a.maglevel, a.skill_sword, ...
object_mobile_dressed_biologist_10_undead = object_mobile_shared_dressed_biologist_10_undead:new { } ObjectTemplates:addTemplate(object_mobile_dressed_biologist_10_undead, "object/mobile/dressed_biologist_10_undead.iff")
--[[ --=====================================================================================================-- Script Name: Trophy Hunter (v2), for SAPP (PC & CE) Description: This is an adaptation of Kill-Confirmed from Call of Duty. When you kill someone, a trophy will fall at your victim's death locatio...
--------------------------------------------------------------------------------------------------- -- Proposal: -- https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0179-pixel-density-and-scale.md -- Description: -- In case: -- 1) During start HMI provides VideoStreamingCapability for parameters: ...
--[[ Copyright (c) 2016. Adobe Systems Incorporated. All rights reserved. This file is licensed to you 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/LICE...
function classify(class) setmetatable(class, { __call = function(class, ...) -- Create instance table local inst = {} -- Set metatable *before* constructor so they can invoke -- other functions during construction classifyInstance(inst, ...
local MAJOR_VERSION, MINOR_VERSION = "LibLimeDB-1.1", 5 local lib = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION) if not lib then return end local _G = _G local type = _G.type local next = _G.next local pairs = _G.pairs local rawget = _G.rawget local rawset = _G.rawset local twipe = _G.table.wipe local tinsert = _G...
--[[ NPC SPAWN LIST npc(<npc_lua_file>, <npc_id>, <map_id>, <x_pos>, <y_pos>, <z_pos>, <angle>); --]] npc("288", 1188, 51, 5107.24, 4996.57, 20.45, 231.000084975336); npc("286", 1186, 51, 5263.61, 5079.49, 13.78, 240.000061320122); npc("280", 1180, 51, 5414.86, 5114.41, 13.62, 0); npc("285", 1185, 51, 5298.98, 5105.0...
--=============================================================================-- -- ___ ___ _ _ _ __ _ ___ ___ __ __ -- |_ _|| __| / \ | \_/ | / _| / \ | o \ o \\ V / -- | | | _| | o || \_/ | ( |_n| o || / / \ / -- |_| |___||_n_||_| |_| \__/|_n_||_|\\_|\\ |_| 2007 -- --=============...
--[[ Title: UserConsole Page Author(s): big, minor refactor by LiXizhi Date: 2017/4/11 Desc: use the lib: ------------------------------------------------------------ local UserConsole = NPL.load("(gl)Mod/WorldShare/cellar/UserConsole/Main.lua") ------------------------------------------------------------ ]] -- libs...
--[[ BEGIN AUTOGENERATED SEGMENT ]] local glc; do local cdecl = [[ typedef unsigned int GLenum; typedef unsigned char GLboolean; typedef unsigned int GLbitfield; typedef void GLvoid; typedef signed char GLbyte; typedef short GLshort; typedef int GLint; typedef unsigned char GLubyte; typedef unsigned short GLus...
note = oapi.create_annotation() note:set_pos (0.2,0.1,0.8,0.9); note:set_size(0.5) note:set_colour ({r=0.7,g=0.8,b=1}) maxline = 20 nline = 0 first_line = 0 linebuf = {} function disp_output() buf = "" for i=0,nline-1 do idx = first_line + i if idx >= maxline then idx = idx - maxline end buf = buf .. lin...
local setting = { [16198] = SKILL_SWORD, [16199] = SKILL_AXE, [16200] = SKILL_CLUB, [16201] = SKILL_DISTANCE, [16202] = SKILL_MAGLEVEL } local skillTrainer = Action() function skillTrainer.onUse(player, item, fromPosition, target, toPosition, isHotkey) local skill = setting[item:getId()] if not player:isPremiu...
return { _fold = true, _id = "drawNodeTest1", _type = "DrawNodeTest", height = "$fill", width = "$fill", _children = { { _id = "drawNodeCircle1", _type = "DrawNodeCircle", angle = 0, drawLineToCenter = 1, radius = 80, scaleX = "$minScale", scaleY = "$minScale", ...
local cataUI = cataUI or {} cataUI.opened = cataUI.opened or {} for menu, _ in next, cataUI.opened do cataUI.opened[menu] = nil menu:Remove() end local mouseActive = false local lastMousePos function cataUI.Opened( panel ) cataUI.opened[panel] = true cataUI.ActivateMouse() end function cataUI.Clos...
local Utils = { } function Utils.clap(value, min, max) if max < min then min, max = max, min end if value < min then value = min elseif max < value then value = max end return value end function Utils.clone(base) local object = { } for key, value in pairs(base)...
-- Copyright 2022 SmartThings -- -- 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 ...
local m,s,o m=Map("bypass") s=m:section(TypedSection,"server_global",translate("Global Setting")) s.anonymous=true o=s:option(Flag,"enable_server",translate("Enable Server")) s=m:section(TypedSection,"server_config",translate("Server Setting")) s.anonymous=true s.addremove=true s.template="cbi/tblsection" s.extedit=...
--- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by hartnett. --- DateTime: 2019/11/10 20:29 --- local string = string local core = require("apisix.core") local function get_username_from_basic_auth(basic_auth) local username = "" local basic_auth = basic_auth or "" local auth = string...
local component = require("component") addresses = { component.proxy("74696253-673b-4fc6-9698-c4803f6e04dc"), component.proxy("773bfa68-327d-4114-8aaa-4c7c8c0ef29c"), component.proxy("56ee17f7-f47f-4444-a22b-810df11a451b"), component.proxy("c70f66c4-5a8e-4361-8f4f-29cf0e574c7b"), component.proxy("b...
-------------------------------- -- @module MWSqliteDb -- @extend MWObject,IDbBase -- @parent_module mw -------------------------------- -- -- @function [parent=#MWSqliteDb] executeNonQuery -- @param self -- @param #string sql -- @return bool#bool ret (return value: bool) -------------------------------- -...
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the license found in the -- LICENSE-examples file in the root directory of this source tree. -------------------------------------------------------------------------------- -- Models for SST-1 Sentiment Clas...
LANGUAGE = { itemMedkitDesc01 = "\n \n 의학 지식: ", itemMedkitDesc02 = "\n 회복력: ", selfheal = "자가 치료하기", heal = "치료해주기", lackKnowledge = "당신은 이 아이템을 사용하는 방법을 모릅니다.", cNotValid = "유효한 캐릭터를 바라보고 있어야 합니다.", ["Health Vial"] = "구급 주사", healthVialDesc = "녹색 액체가 든 작은 주사기입니다.", ["Health Kit"] = "구급 상자", healthKitDesc =...
function sanitize(text) local new, times = string.gsub(text, "##", "#") return new end function urlencode(char) local encoded = string.gsub (char, "([^%w])", function(c) return string.format("%%%02X", string.byte(c)) end) return encoded end function texencode(text) local new, ...
--[[ rectangleSwipeIn.lua Copyright (C) 2016 Kano Computing Ltd. License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2 This animation consists of a left (bottom) and a right (top) black rectangle coming into view from the sides of the screen. Their speed decreases towards the end. Used as the first part of the ...
-- The base HitFX class. -- Whenever an object is interacted with it's a good idea to either pull on a spring attached to its scale, or to flash it to signal that the interaction went through. -- This is a combination of both Springs and Flashes put together to create that effect. -- An instance of this called .hfx is ...
print2(getFunction(render)) continue() clearError() print2(getCamPos()) print2(getErrorText()) [string "function renderCameraGrid()..."]:8: attempt to perform arithmetic on global 'x' (a nil value) stack traceback: [string "function onerror(s) endGL() glResetStencil(..."]:1: in function <[string "function onerror(s...
-- get modpath local mpath = minetest.get_modpath("vehicle_mash") -- load framework dofile(mpath .. "/framework.lua") -- load crafts local craft_check = minetest.settings:get_bool("vehicle_mash.enable_crafts") if craft_check or craft_check == nil then dofile(mpath .. "/crafts.lua") end -- *********************** -...
local twitch = {} local mattata = require('mattata') local HTTPS = require('ssl.https') local URL = require('socket.url') local JSON = require('dkjson') function twitch:init(configuration) twitch.arguments = 'twitch <query>' twitch.commands = mattata.commands(self.info.username, configuration.commandPrefix):c('twitc...
local socket = require "cosock".socket local log = require "log" -------------------------------------------------------------------------------------------- -- TP-Link Core Protocol -------------------------------------------------------------------------------------------- local function encrypt(data, protocol) lo...
local function removeItemFromWorld(itemId) assert(typeof(itemId) == "string") return { type = script.Name, itemId = itemId, } end return removeItemFromWorld
-- EMPTY
package("minizip-ng") set_homepage("https://github.com/zlib-ng/minizip-ng") set_description("Fork of the popular zip manipulation library found in the zlib distribution.") add_urls("https://github.com/zlib-ng/minizip-ng/archive/refs/tags/$(version).tar.gz") add_versions("3.0.3", "5f1dd0d38adbe9785cb9c...