content
stringlengths
5
1.05M
local json = require 'cjson' local lpeg = require 'lpeg' locale = lpeg.locale() local C = lpeg.C local Ct = lpeg.Ct local P = lpeg.P local S = lpeg.S local grok = '"$time_local" $remote_addr $upstream_addr $request_time $request_method $status "$scheme://$host_request_uri" $request_length $body_bytes_sent "$http_...
-- Profile settings for MX518 -- ========================== -- Use these parameters to assign keyboard-keys to mouse buttons 4,5,6,7,8 -- Type in your in-game key bindings to select which signs should be mapped to a mouse button. -- Also type in what key you're using to cast a sign. -- E.g. the default key mappings fo...
local lush = require "lush" local generator = require "zenbones.specs" local p = require("vimbones.palette").light local specs = generator.generate(p, "light", generator.get_global_config("vimbones", "light")) return lush.extends({ specs }).with(function() ---@diagnostic disable: undefined-global -- selene: allow(u...
local function format_async(err, _, result, _, bufnr) if err ~= nil or result == nil then return end if not vim.api.nvim_buf_get_option(bufnr, "modified") then local view = vim.fn.winsaveview() vim.lsp.util.apply_text_edits(result, bufnr) vim.fn.winrestview(view) if bufnr == vim.api.nvim_get_current...
Config = {} Config.EAS = {} Config.EAS.Volume = 0.1 --(0.2 = 20% Volume) Config.EAS.Departments = { LSPD = { name = "Comminiqué de la LSPD" }, Admin = { name = "Alerte du Staff" }, Pompier = { name = "Communiqué des Pompier" }, ...
--- TLbind v1.3, a simple system for creating professional control schemes -- @author Taehl (SelfMadeSpirit@gmail.com), with contributions from smrq local update --- Gives a new instance of TLbind settings and control. -- Good for OOP, multi-player split-screen with their own controls, etc. -- Use: P1.bind, P1.contro...
object_tangible_loot_misc_maw_liver = object_tangible_loot_misc_shared_maw_liver:new { } ObjectTemplates:addTemplate(object_tangible_loot_misc_maw_liver, "object/tangible/loot/misc/maw_liver.iff")
-- $Id: TableExplorer.lua 16 2014-02-24 05:55:58Z diesal2010 $ local AddOnName = local_stream_name or '???' local ADDON = {} _G[AddOnName] = ADDON -- ~~| Lua Upvalues |~~~~~~~~~~~~~~~ local DiesalGUI = LibStub("DiesalGUI-1.0") local print, type, tostring, tonumber = print, type, tostring, tonumber -- ~~| Slash Com...
--------------------------------------------------------------------------- --- Icon theme module -- -- @author Michael Perlov -- @copyright 2020 Michael Perlov -- @module gears.xdg.icon_theme --------------------------------------------------------------------------- local Gtk = require("lgi").Gtk local dbg = require...
--- Script which runs test scripts -- -- *Dependencies:* `atf.util` -- -- *Globals:* none -- @script launch -- @copyright [Ford Motor Company](https://smartdevicelink.com/partners/ford/) and [SmartDeviceLink Consortium](https://smartdevicelink.com/consortium/) -- @license <https://github.com/smartdevicelink/sdl_core/bl...
function Test() -- PostErrorMessage = '* This test needs more work.' local originalFiles = { "Jamfile.jam", "Jamrules.jam", "test.lua", "liba/Jamfile.jam", "liba/rootfile.cpp", "liba/treea/treeb/deepfile.cpp", "libb/Jamfile.jam", "libb/filea.cpp", "libb/fileb.cpp", "libb/filec.cpp", "libb/onele...
/* sv_pointshop_override.lua Copyright© Nekom Glew, 2017 */ local Player = FindMetaTable('Player') local function Initialize() --[[------------------------------------------------ Desc: Prevent items equiping on props when they spawn. --]]------------------------------------------------ func...
local _class = { _name = 'IdeaMassView', _version = '1.0' } ---@public function _class:new() local o = {} setmetatable(o, { __index = self }) self.dataList = Array() self.pageIndex = 1 self.type = 1 return o end ---优先加载其他辅助文件 ---@private function _class:loadExtensions() require("MML...
local vim = vim local vsyn = {} -- VSyntax default options. vsyn.options = { -- Virtual text prefix prefix = ' $» ', -- Strings for representing highlighting attributes attributes = { bold = '', italic = '', reverse = '', standout = 'ꜱ', underline = '', ...
data:extend( { { type = "autoplace-control", name = "iron-ore", richness = true, order = "b-a", category = "resource" }, { type = "autoplace-control", name = "copper-ore", richness = true, order = "b-b", category = "resource" }, { type = "autoplace-control", nam...
object_tangible_loot_beast_beast_steroid_pig = object_tangible_loot_beast_shared_beast_steroid_pig:new { } ObjectTemplates:addTemplate(object_tangible_loot_beast_beast_steroid_pig, "object/tangible/loot/beast/beast_steroid_pig.iff")
require("nvim-treesitter.configs").setup({ highlight = { enable = true, }, indentation = { enable = true, }, rainbow = { enable = true, extended_mode = false, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean }, autotag = { enable = true, }, })
x = -7 -- negation operator applied to the constant 7 y = -x -- negation operator applied to the x variable -- x: -7, y: 7 x = 7 - 3 -- Operand 1 is the constant 7, Operand 2 is the constant 3 y = x - 1 -- Operand 1 is the variable x, Operand 2 is the constant 1 z = x - y -- Operand 1 is the variable x, Operand 2 is t...
--- Core attachment handler class. -- -- Implements the methods necessary to handle attachments. Note that for most -- cases, the attachment handling methods in @{luchia.document} should be used; -- this module provides the core functionality that those higher-level methods -- use. -- -- See the @{core.attachment.lua} ...
--[[ Author(s): Nettoork#0000 ]]-- do --- Variáveis de bibliotecas --- local coroutines = {} local textAreas = {} local db = {} local wait = {} local libs -------------------------------- libs = { ['perfomance'] = { AUTHOR = 'Nettoork#0000', _VERSION = '1.0', dependencies = {}, ['create'] = functio...
function love.conf(t) t.console = true -- Attach a console (boolean, Windows only) end
local abs = math.abs local floor = math.floor local max = math.max local min = math.min local sort = table.sort local vehicle_types = { ["locomotive"] = true, ["cargo-wagon"] = true, ["car"] = true, } local train_types = { ["locomotive"] = true, ["cargo-wagon"] = true, } local default_masses = { ["locomoti...
io.write(string.format("Hello from %s\n", _VERSION)) io.write("Calling testFromLua() ...\n") local value = testFromLua("First", "Second", 112233) io.write(string.format("testFromLua() returned: %s\n", tostring(value)))
if condition then print("condition") end if condition1 then print("condition1") elseif condition2 then print("condition2") end if condition_outer then print("condition_outer") else if condition2 then print("condition_inner") end end
--[[ © 2020 TERRANOVA do not share, re-distribute or modify without permission of its author. --]] ITEM.base = "base_torso"; ITEM.name = "Brown Dinner Jacket with Tie"; ITEM.model = "models/fty/items/suitjacket.mdl" ITEM.price = 50; ITEM.description = "A fancy looking brown dinner jacket with an orange, white and bl...
-- $Id: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/GameObject/UM02_MagnetDoors.lua#3 $ --///////////////////////////////////////////////////////////////////////////////////////////////// -- -- (C) Petroglyph Games, Inc. -- -- -- ***** ** * * -- * ** ...
([[This file was protected with MoonSec V3 by Federal#9999]]):gsub('.+', (function(a) _KtpaVru_jQhK = a; end)); HqbBuUwdbVwFukaI=_ENV;CeoOLEfDqilmHya='h!4(+Wgd;TfPuC<54+44((++Wdggdd;;TTffPPuuCC5! C!{4!(4+!<P<;4445(!(dg+d;d(;5;df5f((++WW(g+dW5T>u3fPPufCP<u5Cp<!5(y;!WWgdd+;WTgRf4%4f+u<C5u?C!<45+bW!W4P4;dfWfgPdu;Cd;!fdfdu...
local analytics_version = 2 analytics = { -- The lastly used version version = analytics_version, last_game = { -- the amount of destroyed panels destroyed_panels = 0, -- the...
project "IMGUI" location "imgui" kind "StaticLib" language "C++" cppdialect "C++11" targetdir(dirbin) objdir(dirobj) files { "imgui/imconfig.h", "imgui/imgui.h", "imgui/imgui.cpp", "imgui/imgui_demo.cpp", "imgui/imgui_draw.cpp", "imgui/im...
#! /usr/bin/lua -- ---------------------------------------------------- -- couch_update.lua -- -- Feb/16/2015 -- ---------------------------------------------------- require 'json' require 'text_manipulate' http = require ("socket.http") -- ---------------------------------------------------- function rest_put_pro...
--必须在这个位置定义PROJECT和VERSION变量 --PROJECT:ascii string类型,可以随便定义,只要不使用,就行 --VERSION:ascii string类型,如果使用Luat物联云平台固件升级的功能,必须按照"X.X.X"定义,X表示1位数字;否则可随便定义 PROJECT = "ONENET_MQTT_TEST" VERSION = "2.0.5" -- 日志级别 require "log" LOG_LEVEL = log.LOGLEVEL_TRACE require "sys" require "utils" require "patch" require "pins" -- 加载GSM r...
test_run = require('test_run').new() json = require('json') engine = test_run:get_cfg('engine') _ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}}) -- -- gh-4086: SQL transactional DDL. -- test_run:cmd("setopt delimiter ';'") box.begin() box.execute('CREATE TABLE t1(id INTEGER PRIMARY KEY)...
function setPlayerFreecamEnabled(player, x, y, z, dontChangeFixedMode) removePedFromVehicle(player) setElementData(player, "realinvehicle", 0, false) return triggerClientEvent(player,"doSetFreecamEnabled", getRootElement(), x, y, z, dontChangeFixedMode) end function setPlayerFreecamDisabled(player, dontChangeFixed...
bmp085.init(1, 2) local p = bmp085.pressure() print(string.format("Pressure: %s.%s mbar", p / 100, p % 100)) local t = bmp085.temperature() print(string.format("Temperature: %s.%s degrees C", t / 10, t % 10))
local paths = {}; function Local.Init() Object.world = BuildWorldMatrix(); end function Event.Game.Update(event) for _, entity in pairs(Engine.Scene:getAllGameObjects("Entity")) do if entity.controllable then FollowCharacter(entity); ComputeNextMove(entity); UsePowe...
local _, crequire, brequire = require("newmodule")(...) local _M = assert( crequire('assert') ) -- require('luassert.assert') _M._COPYRIGHT = "Copyright (c) 2012 Olivine Labs, LLC." _M._DESCRIPTION = "Extends Lua's built-in assertions to provide additional tests and the ability to create your own." _M._VERSION ...
----------------------------------- -- Area: Aht Urhgan Whitegate -- NPC: Sulbahn -- Type: Alchemy Adv. Image Support -- !pos -10.470 -6.25 -141.700 241 ----------------------------------- require("scripts/globals/status") require("scripts/globals/crafting") require("scripts/globals/npc_util") local ID = require("scri...
local a, b, i = 0, 0, 0 for i = 1, 5 do a = a + 1 b = b + i end assertTrue (a == 5, 'For loop should iterate the correct number of times') assertTrue (b == 15, 'For loop variable should hold the value of the current iteration') local funcs = {} local b = '' for i = 1, 3 do table.insert(funcs, function () b = b...
--- -- mission_repository.lua local class = require "middleclass" local json = require "json.json" local Mission = require "repositories.missions.dto.mission" local Map = require "repositories.missions.dto.map" local Cell = require "repositories.missions.dto.cell" local Unit = require "repositories.missions.dto.unit...
local Path = require('plenary.path') local sha = require('exrc.sha2') local cache_file_path = 'exrc/cache.json' local function source () local exrc_path = vim.fn.fnamemodify('.exrc', ':p') local exrc_file = Path:new(exrc_path) if not exrc_file:exists() then return end local cache_file = Path:new(vim.fn.stdpat...
--[[ player.lua Utility methods for player display operations --]] local ADDON, Addon = ... local Cache = LibStub('LibItemCache-1.1') local ALTERNATIVE_ICONS = 'Interface/CharacterFrame/TEMPORARYPORTRAIT-%s-%s' local ICONS = 'Interface/Icons/Achievement_Character_%s_%s' local CLASS_COLOR = '|cff%02x%02x%02x' --[...
TEST [[ ::<!LABEL!>:: goto <?LABEL?> ]] TEST [[ goto <?LABEL?> ::<!LABEL!>:: ]] TEST [[ ::LABEL:: function _() goto <?LABEL?> end ]] TEST [[ do goto <?LABEL?> end ::<!LABEL!>:: ]] TEST [[ ::LABEL:: goto <?LABEL?> ::<!LABEL!>:: ]]
----------------------------------- -- Ability: Warrior's Charge -- Will double your next attack. -- Obtained: Warrior Level 75 (Merit) -- Recast Time: 00:15:00 (Can be reduced to 00:05:00 using Merit Points) -- Duration: 00:01:00 or next attack ----------------------------------- require("scripts/globals/status") ----...
--------------------------------------------------------------------------------------------- -- Requirement summary: -- [Policies]: Permissions assignment in case device is not yet consented (didn't get any user response yet) -- -- Description: -- Condition for assigning by PoliciesManager policies from 'pre_DataConse...
pg = pg or {} pg.enemy_data_statistics_44 = { [5015] = { cannon = 20, antiaircraft_growth = 2340, hit_growth = 210, speed_growth = 0, pilot_ai_template_id = 10001, air = 0, luck = 0, dodge = 6, cannon_growth = 1638, rarity = 3, reload = 150, reload_growth = 0, dodge_growth = 84, id = 5015, ...
local mappings = require("cokeline.mappings") local colors = require("gruvboy.colors") local C = {} C.file_manager = { text = "File Browser", fg = colors.yellow, style = "bold", } C.space = { text = " ", truncation = { priority = 1 }, } C.devicon = { text = function(buffer) return (m...
newoption({ trigger = "gmcommon", description = "Sets the path to the garrysmod_common (https://github.com/danielga/garrysmod_common) directory", value = "path to garrysmod_common directory" }) local gmcommon = assert(_OPTIONS.gmcommon or os.getenv("GARRYSMOD_COMMON"), "you didn't provide a path to your garrysmod_...
return {'stuc','stucmarmer','stucwerk','studeerbaar','studeerbaarheid','studeerkamer','studeerkamergeleerde','studeerlamp','studeervertrek','student','studente','studentenaantal','studentenadministratie','studentenalmanak','studentenarbeid','studentenarts','studentenbestand','studentenbevolking','studentenbeweging','st...
local Config = { filetypes = {}, file_extensions = { "csproj" }, nuget = { packages = { limit = 100, prerelease = false, sem_ver_level = "2.0.0", package_type = "", }, versions = { prerelease = true, sem_ver_level = "2.0.0", }, }, } return Config
--- An enum that determines the method a Control activates in. -- The ControlMethod values are None, Binary, Axis, and Vector. These are used -- with a Control to tell which methods of control it supports and how to -- interpret its Inputs. -- -- @author LastTalon -- @version 0.1.0, 2020-04-15 -- @since 0.1 -- -- @modu...
Schema.voices.Add("Combine", "0", "0.", "npc/metropolice/vo/zero.wav") Schema.voices.Add("Combine", "1", "1.", "npc/metropolice/vo/one.wav") Schema.voices.Add("Combine", "10", "10.", "npc/metropolice/vo/ten.wav") Schema.voices.Add("Combine", "10-0 수색 중", "10-0, 비저레이터가 수색 중이다!", "npc/metropolice/vo/tenzerovisceratorish...
--[[ A library for calling into Go from LuaJit --]] local lua2go = {} local ffi = require('ffi') ffi.cdef[[ // standard Go definitions // typedef signed char GoInt8; typedef unsigned char GoUint8; typedef short GoInt16; typedef unsigned short GoUint16; typedef int GoInt32; typedef unsigned int GoUi...
--define the class ACF_defineGunClass("AC", { spread = 0.12, name = "Autocannon", desc = "Autocannons have a rather high weight and bulk for the ammo they fire, but they can fire it extremely fast.", muzzleflash = "auto_muzzleflash_noscale", rofmod = 0.85, sound = "weapons/ACF_Gun/ac_fire4.mp3", soundDistance = ...
local mod_name = "SkipCutscenes" local oi = OptionsInjector SkipCutscenes = { SETTINGS = { ACTIVE = { ["save"] = "cb_skip_level_cutscenes", ["widget_type"] = "stepper", ["text"] = "Skip Level Cutscenes", ["tooltip"] = "Skip Level Cutscenes\n" .. ...
local menuengine = require "menuengine" local text = "Nothing was selected." -- Mainmenu local mainmenu -- Function to start after User selects something local function mainmenu_finish(entrypoint) if entrypoint == 1 then text = "Start Game was selected!" elseif entrypoint == 2 then text = "...
local ReactFiberDevToolsHook = require "ReactFiberDevToolsHook" local pi = require "pi" pi(ReactFiberDevToolsHook)
-- Useful basic action subroutines -- -- All public actions have a verbose flag as a final optional parameter -- (default false). require 'table' require 'codes.direction' require 'codes.menu' require 'dynamicinfo.menuinfo' require 'utils.messages' basicactions = {} ---- BEGIN INTERNAL STUFF ---- -- Mapping from v...
-- Construct a function which just sets the current color return function() return function(st) st[1]:fill(st[4],st[5],st[6],st[7]) end end
---@class CS.FairyEditor.BytesWriter ---@field public littleEndian boolean ---@field public length number ---@field public position number ---@type CS.FairyEditor.BytesWriter CS.FairyEditor.BytesWriter = { } ---@return CS.FairyEditor.BytesWriter function CS.FairyEditor.BytesWriter.New() end ---@return number ---@param...
local tNewAbilities = { "siglos_disadvantage", "siglos_reflect", "siglos_disruption_aura", "generic_hidden", "generic_hidden", "siglos_mind_control", "special_bonus_gold_income_120", "special_bonus_exp_boost_30", "special_bonus_armor_7", "special_bonus_unique_siglos_1", "special_bonus_cast_range_300", "spec...
#!/usr/bin/env lua -- mkdir w -- for d in bjam cmake meson premake5 scons xmake ; do git worktree add w/$d ; done function readfile(filename) local f,e = io.open(filename) if e then error(filename .. ': ' .. e) end local r = f:read'*a' f:close() return r end function writefile(filename, ...) local ...
--frame 3, Battery voltage, Battery current, Battery Temperature, Cycles local batV = struct.unpack("<h", struct.pack("H", battery.voltage * 100)) local batA = struct.unpack("<h", struct.pack("H", battery.current * 10)) local batC = struct.unpack("<h", struct.pack("H", battery.cicles)) print("V: ", batV, "A: ", batA, "...
local Prop = {} Prop.Name = "Banco do Brasil" Prop.Government = true Prop.Doors = { Vector(-2948, -1783, -142), Vector(-2948, -1689, -142), Vector(-2948, -1639, -142), Vector(-2948, -1545, -142), Vector(-3318, -1873, -142), } GM.Property:Register( Prop )
-- lerror | 15.07.2018 -- By daelvn -- Errors and Exceptions for default Lua errors --# Namespace #-- local lua = {} --# Libraries #-- local lobject = require "lobject" local Class = lobject.class --# Errors & Exceptions #-- lua.Error = Class "LuaError" (function (argl) return {err=argl.err} end) lua.Exception...
--[[ ########################################################## S V U I By: Munglunch ########################################################## LOCALIZED LUA FUNCTIONS ########################################################## ]]-- --[[ GLOBALS ]]-- local _G = _G; local unpack = _G.unpack; local select ...
-- ####################################### -- ## Project: MTA:scp-088 ## -- ## Name: Development.lua ## -- ## Author: Noneatme ## -- ## Version: 1.0 ## -- ## License: See top Folder ## -- ####################################### -- FUNCTIONS / METHODS -- local cFunc = {}; -- Local Functions local c...
-- 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 ...
return function(ASS, ASSFInst, yutilsMissingMsg, createASSClass, re, util, unicode, Common, LineCollection, Line, Log, SubInspector, Yutils) local Transform = createASSClass("Transform", ASS.Tag.Base, {"tags", "startTime", "endTime", "accel"}, {ASS.Section.Tag, ASS.Time, ASS.Tim...
----------------------------------------------------------------------------------------- -- -- about.lua -- ----------------------------------------------------------------------------------------- local storyboard = require( "storyboard" ) local scene = storyboard.newScene() -- include Corona's "widget" library --l...
-- ===================================================================== -- -- buffer.lua - -- -- Created by liubang on 2021/01/15 15:05 -- Last Modified: 2021/01/15 15:05 -- -- ===================================================================== local api, fn = vim.api, vim.fn local special_buffers = { 'qf', 'git...
-- Copyright (C) 2020-2022 Dmitrii Maximenko <d.s.maximenko@gmail.com> -- Use of this source code is governed by an MIT-style -- license that can be found in the LICENSE file or at -- https://opensource.org/licenses/MIT -- This functions queries information about -- indexes in innoDB buffer poll and prints it to st...
local testwin = window.new("Debug Window") do local buttonTest = UIElement.UIButton.new(testwin,"Press me!",10,10,90,35) local textTest = UIElement.UITextbox.new(testwin,10,100,300,nil,nil,"Type Here") local checkTest = UIElement.UICheckbox.new(testwin,120,10,15,15) testwin:setBackgrou...
if arg[2] == '--tests' then require('tests') else require('src') end
------------------------------------------------------------------------------- -- -- tek.ui.class.layout -- Written by Timm S. Mueller <tmueller at schulze-mueller.de> -- See copyright notice in COPYRIGHT -- -- OVERVIEW:: -- [[#ClassOverview]] : -- [[#tek.class : Class]] / -- Layout ${subclasses(Layout)} -- -- A l...
----- String Utilities --- Title Case a string -- @param string_input string -- @return the Title Cased string function title_case(string_input) local output_buffer = {} for word in string.gmatch(string_input, "%S+") do local first, rest = string.sub(word, 1, 1), string.sub(word, 2) table.inser...
My = My or {} My.World = My.World or {} -- all inhabitant stations My.World.stations = {} -- all stations that are not inhibited and basically serve as battlefields My.World.abandonedStations = {} -- all nebulas in the world My.World.nebulas = {} My.World.planet = nil My.World.drops = {} My.World.getDrops = functi...
------------------------------------------------------------------------------ -- -- This file is part of the Corona game engine. -- For overview and more information on licensing please refer to README.md -- Home page: https://github.com/coronalabs/corona -- Contact: support@coronalabs.com -- ------------------------...
hs.distributednotifications = require("hs.distributednotifications") -- Storage for a notifications watcher object distNotWatcher = nil -- Storage for a timer callback to modify in various tests testDistNotValue = nil function testDistributedNotifications() distNotWatcher = hs.distributednotifications.new(function(...
ProjectileManager = ProjectileManager or class() function ProjectileManager:init() self._pinned_units = {} self._pin_data = {} -- go through dynamics (11) -- but stop at civs (21, 22) -- or sentry guns (25, 26) self._pin_mask = World:make_slot_mask(1, 8, 21, 22, 25, 26, 39) end local blacklisted_bodies = { ...
local ScriptSignal = {} local ErrorMessages = { Connect = "Attempted to connect ScriptSignal to %s (%s)", } local ScriptSignalTable = { __type = "ScriptSignal", } function ScriptSignalTable:Connect(func) if type(func) == "function" then local connection = Connection.new(func, self) table.ins...
local wezterm = require('wezterm'); return { color_scheme = "OneHalfDark"; font_size = 15; font = wezterm.font("FiraCode Nerd Font"); window_padding = { -- This will become the scrollbar width if you have enabled the scrollbar! top = 1, }, hide_tab_bar_if_only_one_tab = true, ...
local M = {} local compe_config = {} M.config = function() compe_config = { active = true, autocomplete = true, debug = false, min_length = 1, preselect = "enable", throttle_time = 80, source_timeout = 200, incomplete_delay = 400, max_abbr_width = 100, max_kind_width = 100, ...
local have_ml,ml = pcall(require, 'ml') local posix = require 'posix' local linenoise = require 'linenoise' local lsh = { tostring = tostring } local append = table.insert io.write "luaish (c) Steve Donovan 2012\n" local our_completions, our_history = {} local our_line_handlers, our_shortcuts = {} ,{} local functio...
local char_to_hex = function(c) return string.format("%%%02X", string.byte(c)) end function urlencode(r) local url = r:url() path, query = url:match("([^,]+)?([^,]+)") url = url:gsub(";", char_to_hex) return url end
local my_entity_name = "big-worm-turret" for prot_type_name, prot_type in pairs (data.raw) do for prot_name, prot in pairs (prot_type) do --if prot_name == my_entity_name then log ('data.raw["'.. prot_type_name .. '"]["' .. prot_name .. '"] = ' .. serpent.block(prot, {comment = false})) --end end end 5.7...
spectator = {} spectator.spectators = {} local spectators = spectator.spectators minetest.register_privilege("spectator", { description = "Allows player to use spectator mode." }) function spectator.is_spectator(name) return spectators[name] ~= nil end function spectator.send(name, msg) minetest.chat_send_pla...
local platebackTexture = dxCreateTexture("files/plateback.png", "dxt3") local texturesTable = { bloodpool_64 = dxCreateTexture("files/bloodpool_64.png", "dxt3"), bubbles = dxCreateTexture("files/bubbles.png", "dxt3"), --coronastar = dxCreateTexture("files/coronastar.png", "dxt3"), fireball6 = dxCreateTexture("file...
-- Author: Davis Zeng <daviszeng@outlook.com> local tool = {} function tool:required_check(data, need) if type(data) ~= "table" or type(need) ~= "table" then return false end for key, value in pairs(need) do if data[value] == nil then return false end end return true end return tool
local M = {} M.FEED_TABLE = "feeds" M.ENTRY_TABLE = "entries" M.FEED_SCHEMA = { link = { -- feed url, also id in atom "text", primary = true, unique = true, }, title = { "text", required = true, }, format = { -- is "atom" or "rss" "text", required = true, }, subtitle = "text...
local META = FindMetaTable("CLuaEmitter") if not META then return end function META:DrawAt(pos, ang, fov) local pos, ang = WorldToLocal(EyePos(), EyeAngles(), pos, ang) cam.Start3D(pos, ang, fov) self:Draw() cam.End3D() end WORLDEMITTER = WORLDEMITTER or ParticleEmitter(Vector(0, 0, 0)) local EFFECT = {} loca...
PlayerFoV = {} function CreateNewPlayerFoV( player ) local fov = MeshTriangle( player:GetPosition(), 20 ) fov.width_multi = 3 PlayerFoV[player:GetId()] = fov end Events:Subscribe( 'ModuleLoad', function() for p in Server:GetPlayers() do CreateNewPlayerFoV( p ) end end ) Events:Subscribe( 'PlayerJoin', functi...
local ffi = require "ffi" local httpmsg = require("HttpMessage") local HttpMessage = httpmsg.HttpMessage; local HttpMessage_t = httpmsg.HttpMessage_t; local HttpChunkIterator = require("HttpChunkIterator") local HttpStatus = require ("httpstatus"); -- parse first line -- parse lines until blank lines local WebRespo...
local _, p1xelUI = ... local m = p1xelUI:CreateModule("SharedMedia") local eventHandler = CreateFrame("Frame", nil, UIParent) eventHandler:SetScript("OnEvent", function(self, event, ...) return self[event](self, ...) end) function m:OnLoad() self:SetupMedia() end function m:SetupMedia() local LSM = LibSt...
-- -- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License"); you may ...
local Enum = require("api.Enum") local Rand = require("api.Rand") local Filters = require("mod.elona.api.Filters") local Gui = require("api.Gui") local DeferredEvent = require("mod.elona_sys.api.DeferredEvent") local Dialog = require("mod.elona_sys.dialog.api.Dialog") local Chara = require("api.Chara") local Item = req...
-------------------------------------------------------------------------- -- Discrete3Params -- -------------------------------------------------------------------------- require("std/utils") require("ui/widgets/widgets") require("ui/widgets/sinputwidget") requ...
-- HEAD -- lisense = 'same as nmap see: https://nmap.org/book/man-legal.html' -- mask nmap User-Agent for stealth local shortport = require "shortport" local http = require "http" local stdnse = require "stdnse" local string = require "string" -- The Rule Section -- portrule = shortport.http -- The Action Section ...
--[[---------------------------------------------------------------------------- Application Name: ProfileControl Summary: Finding min and max point in heightmap and calculating angle using Profile API Description: This Sample shows how to extract points from a heightmap transform information to a prof...
local Node = require "espalier/node" local Grammar = require "espalier/grammar" local L = require "espalier/elpatt" local P, R, E, V, S = L.P, L.R, L.E, L.V, L.S local _ = (P" " + P"\n" + P"\t" + P"\r")^0 local IDstart = R("az", "AZ") + "_" -- dot is actually latin-1 but local IDrest = IDst...
--[[---------------------------------------------------------------------------- Application Name: SurfaceFitter3D Summary: Fitting planes and rectangles to surfaces in heightmaps Description: This Sample shows how to use PixelRegions and 3D shapes to select points for fitting. Rectangles are fitted to...