content
stringlengths
5
1.05M
local BasePlugin = require "kong.plugins.base_plugin" local constants = require "kong.constants" local jwt_decoder = require "kong.plugins.jwt.jwt_parser" local JwtClaimsHandler = BasePlugin:extend() JwtClaimsHandler.VERSION = "0.1.0" JwtClaimsHandler.PRIORITY = 1005 local function set_consumer(consumer, credential)...
function get_area( deployer ) local X = get_signal( deployer, X_SIGNAL ) local Y = get_signal( deployer, Y_SIGNAL ) local W = get_signal( deployer, WIDTH_SIGNAL ) local H = get_signal( deployer, HEIGHT_SIGNAL ) if W < 1 then W = 1 end if H < 1 then H = 1 end if settings.global["recursive-blueprints-area...
local M={} M.autopairs_bs = function(rules) for _, rule in pairs(rules) do if rule.start_pair then end if rule.start_pair then end end end return M
local cslime = "mobs_slimes:green_slimeball" if minetest.get_modpath("mobs_zombie") then local zflesh = "mobs_zombie:rotten_flesh" minetest.register_craft({ output = "mobs:meat_raw", type = "shapeless", recipe = { cslime,cslime,cslime, zflesh,zflesh,zflesh, } }) end
local config = {} config.symbols_outline = function() require("symbols-outline").setup({ highlight_hovered_item = true, width = 30, show_guides = true, auto_preview = true, position = "right", show_numbers = true, show_relative_numbers = true, show_symbol_details = true, preview_b...
cj = cjson.new() cjs = cjson_safe.new() local item_count = 0 function attrdir (path) if path==nil then path = '.' end for file in lfs.dir(path) do if file ~= "." and file ~= ".." then local f = path..'/'..file print("\t "..f) local attr = lfs.attributes (f) if type(attr) == "table" then if attr....
local m, s, o local fs = require "nixio.fs" local jsonc = require "luci.jsonc" or nil m = Map("zerotier") s=m:section(NamedSection,"sample_config","zerotier") s.anonymous=true s.addremove=false o = s:option(TextValue, "manualconfig") o.rows = 20 o.wrap = "soft" o.rmempty = true o.cfgvalue = function(self, section) ret...
--[[ Options configurations for the train/test/benchmark scripts. ]] projectDir = projectDir or './' local function Parse(arg) local cmd = torch.CmdLine() cmd:text() cmd:text(' ---------- General options ------------------------------------') cmd:text() cmd:option('-expID', 'stacked-aes...
-- -- YATM Woodcraft (Default) -- -- Specialized registration for default (from Minetest Game) local mod = foundation.new_module("yatm_woodcraft_default", "1.0.0") mod:require("nodes/wood_barks.lua") mod:require("nodes/wood_cores.lua") mod:require("nodes/wood_panels.lua") mod:require("recipes/sawing.lua")
function addBombTimer(name, player, data, scale) local r = data.bombTime * scale + 2 local obj = { type = 13, color = 0xFF0000, foreground = false, width = r, height = r, miceCollision = false } addGround( player.x, player.y, obj, data.bombTime, ...
--------------------------------------------------------------------------------------------------- -- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0173-Read-Generic-Network-Signal-data.md -- -- Description: Applying of the update for VehicleDataItems from PTU after already successfu...
version '1.2.0' author 'Lachee' description 'Modified version of a garage script.' repository 'https://github.com/lachee/fivem-garage' client_scripts{ "config.lua", "client/garageMenu.lua", "client/gui.lua", "client/functions.lua", "client/main.lua" } server_scripts{ "@mysql-async/lib/MySQL.lu...
require 'Coat' local CodeGen = require 'CodeGen' singleton 'Smc.Php' extends 'Smc.Language' has.id = { '+', default = 'PHP' } has.name = { '+', default = 'PHP' } has.option = { '+', default = '-php' } has.suffix = { '+', default = '_sm' } has.generator = { '+', isa = '...
Tilemap = Object:extend("Tilemap") function Tilemap:new(scene, map) self.scene = scene self.currentRoom = nil self.currentID = nil self.newRoomHandler = nil self.objectHandler = nil self.layerHandler = nil self.mergeTiles = true self.entities = buddies.new() if map then self:loadMap(map) end self._...
#!/usr/bin/env/tarantool local http = require('http.server') local http_router = require('http.router') local httpd = http.new('0.0.0.0', '5050') local router = http_router.new() httpd:set_router(router) local front = require('frontend-core') local analytics = require('analytics') front.add('analytics_static', analy...
local utils = require('agitator.utils') -- https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/builtin/git.lua#L269 local pickers = require "telescope.pickers" local finders = require "telescope.finders" local conf = require("telescope.config").values local actions = require "telescope.actions" l...
function post() local name = http.postValues["undelete-character"] if not name or name == "" then session:setFlash("validationError", "An error occured.") http:redirect("/subtopic/account/dashboard") return end local character = db:singleQuery("SELECT id, name from players WHER...
local logger = require("logger") GarbageQueue = class(function(s) s.chain_garbage = Queue() s.combo_garbage = {Queue(),Queue(),Queue(),Queue(),Queue(),Queue()} --index here represents width, and length represents how many of that width queued s.metal = Queue() end) function GarbageQueue.makeCopy(sel...
LinkLuaModifier('modifier_offside', 'modifiers/modifier_offside.lua', LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_out_of_duel", "modifiers/modifier_out_of_duel.lua", LUA_MODIFIER_MOTION_NONE) DUEL_IS_STARTING = 21 -- Taken from bb template if Duels == nil then DebugPrint ( 'Creating new Duels object.' ) D...
script_name = "Append Comment" script_description = "{ts do all the work pls kthxbye}" script_author = "garret" script_version = "1.1.2" function main(sub, sel) dialog_config= { { class="label", x=0,y=0,width=1,height=1, label="Comment:" }, { ...
local Draw = require("api.Draw") local Color = require("mod.extlibs.api.Color") local IUiMouseButton = require("mod.mouse_ui.api.gui.IUiMouseButton") local UiShadowedText = require("api.gui.UiShadowedText") local UiTheme = require("api.gui.UiTheme") local UiMouseStyle = require("mod.mouse_ui.api.UiMouseStyle") local ...
-- -- 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 ...
-- Copyright 2006-2021 Mitchell. See LICENSE. -- Lexer enhanced to conform to the realities of Prologs on the ground by -- Michael T. Richter. Copyright is explicitly assigned back to Mitchell. -- Prolog LPeg lexer. --[[ Prologs are notoriously fractious with many barely-compatible dialects. To make Textadept mo...
--[[ MIT License Copyright (c) 2019-2021 Love2D Community <love2d.org> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, ...
--[[ ------------------------------------ Description: HPC OnVehicleEntry #2 (Advanced), Phasor V2+ Copyright (c) 2016-2018 * Author: Jericho Crosby * IGN: Chalwk * Written and Created by Jericho Crosby Script Version: 3.5 ----------------------------------- ]]-- ------------------------------------------------------- ...
fp = io.open( "dictionary.txt" ) maxlen = 0 list = {} for w in fp:lines() do ordered = true for l = 2, string.len(w) do if string.byte( w, l-1 ) > string.byte( w, l ) then ordered = false break end end if ordered then if string.len(w) > maxlen then list = {} list[1] = w m...
--* This Document is AutoGenerate by OrangeFilter, Don't Change it! * ---@meta --- ---[3.7]material[parent:Object#object] --- ---@class Material Material = {} --- ---[4.3]get name --- --- @return string --- @nodiscard function Material:getName() end --- ---[3.7]set matrix --- --- @param arg0 string --- @param arg1 M...
----------------------------------- -- Ability: Invincible -- Grants immunity to all physical attacks. -- Obtained: Paladin Level 1 -- Recast Time: 1:00:00 -- Duration: 0:00:30 ----------------------------------- require("scripts/globals/settings") require("scripts/globals/status") ----------------------------------- ...
jester.help_map.play = {} jester.help_map.play.description_short = [[Play sounds on a channel.]] jester.help_map.play.description_long = [[This module provides actions for playing various sounds on a channel. The handlers for this module operate on the following actions: play play_valid_file]] jester.help_map.pla...
--[[---------------------------------------------------------------------------- Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found...
local Utils = {} local function inRange(x, min, max) local result = true if x > max then result = false end if x < min then result = false end return result end Utils.inRange = inRange local function round(x) return x>=0 and math.floor(x+0.5) or math.ceil(x-0.5) end ...
---------------------------- ----- GENERATED ASSETS ----- _R = {} _R.IMG = {} ----- GENERATED ASSETS ----- ---------------------------- ---------------------------- ----- '.\src\main.lua' ----- local lastPressed = "" local screenInvalid = true local lastFrameTime = 0 local screen = platform.window local options = {...
function fake_token_validate(request) -- local header = request:headers('Fake-Frinx-Token') -- if header ~= '' then print("INFO: JWT authorization is disabled. Default credentials are used!") request:headers('X-Auth-User-Groups', os.getenv("ADMIN_ACCESS_ROLE")) request:headers('X-Auth-Us...
---------------------------- -- Bunny Hop -- -- Created by Skeyler.com -- ---------------------------- HOOKS["InitPostEntity"] = function() print('hi') for k,v in pairs(ents.FindByClass("func_breakable")) do v:Remove() end timer.Simple(1,function() --cause other code runs helping us use these va...
local socket = require "socket" local wslib = {} --默认fin和mask function wslib:send_frame(fd, opcode, data) local finbit, mask_bit = 0x80,0 -- if fin then finbit = 0x80 else finbit = 0 end -- if self.mask_outgoing then mask_bit = 0x80 else mask_bit = 0 end local frame = string.pack("B", finbit | opcode) ...
local obj = { name = "snapshots" } obj.__index = obj local TIME_PATTERN = "(%d+)%-(%d+)%-(%d+)T(%d+):(%d+):(%d+)" function obj.new(spoon, callback) local self = { spoon = spoon, log = spoon.log, exec = spoon.exec, callback = callback } setmetatable(self, obj) return self end function obj:start() if ...
-- -- A set of very basic tests for turboredis -- -- function trace (event, line) local s = debug.getinfo(2).short_src print(s .. ":" .. line) end local turbo = require("turbo") LuaUnit = require("luaunit") local turboredis = require("turboredis") local yield = coroutine.yield local ffi = require("ffi") local os...
local params = ... local headers = params.headers local libs = params.libs local platform = params.platform local builddir = params.builddir local addHeadersFor = params.addHeadersFor addHeadersFor("zlib") local libpng_dir = "glorp/libs/libpng-1.4.3" --ursa.token.rule{"libpng files", nil, ("cd %s && find . -type f ...
local loadstring = loadstring or load local cache = setmetatable( {}, {__mode = 'k'} ) return function( k ) local f = cache[k] if not f then f = assert(loadstring( 'return function(_1,_2,_3,_4,_5,_6,...) return ' .. k .. ' end' ))() cache[k] = f end return f end
local GUI = require("GUI") local MineOSInterface = require("MineOSInterface") local MineOSPaths = require("MineOSPaths") local MineOSCore = require("MineOSCore") local module = {} local mainContainer, window, localization = table.unpack({...}) ------------------------------------------------------------------------...
require 'nngraph' --[[ Implementation of GRU from: http://arxiv.org/pdf/1412.3555v1.pdf ]] function GRU(inputSize, stateSize) local input = nn.Identity()() local prevH = nn.Identity()() local inputPrevH = nn.JoinTable(2)({input, prevH}) local concatSize = inputSize + stateSize -- update gate (p...
local M = {} function M.new(...) local writers = {...} return function(...) for i = 1, #writers do writers[i](...) end end end return M
HDC1000 = require("HDC1000") sda = 1 scl = 2 drdyn = false i2c.setup(0, sda, scl, i2c.SLOW) -- call i2c.setup() only once HDC1000.setup(drdyn) HDC1000.config() -- default values are used if called with no arguments. prototype is config(address, resolution, heater) print(string.format("Temperature: %.2f °C\nHumidity...
-- add target target("xmake") -- make as a static library set_kind("static") -- add deps add_deps("luajit") -- add defines add_defines("__tb_prefix__=\"xmake\"") -- set the auto-generated config.h set_config_h("$(projectdir)/xmake.config.h") set_config_h_prefix("XM_CONFIG") ...
local defaults = { execute_on_send = true, vsplit = true } local function set(_, key, value) defaults[key] = value end local function get(_, key) return defaults[key] end return { defaults = defaults, get = get, set = set }
AddCSLuaFile() SWEP.HoldType = "slam" if CLIENT then SWEP.PrintName = "defuser_name" SWEP.Slot = 7 SWEP.DrawCrosshair = false SWEP.ViewModelFOV = 10 SWEP.EquipMenuData = { type = "item_weapon", desc = "defuser_desc" }; SWEP.I...
-- Wire Trigger created by mitterdoo AddCSLuaFile() ENT.Base = "base_anim" ENT.Name = "Wire Trigger Entity" ENT.Author = "mitterdoo" function ENT:Initialize() if SERVER then self.EntsInside = {} end end function ENT:SetupDataTables() self:NetworkVar( "Entity", 0, "TriggerEntity" ) end function ENT:Reset() s...
local playsession = { {"mewmew", {71591}}, {"flooxy", {71733}}, {"dragongod21", {30301}}, {"helenohyeah", {32233}} } return playsession
include("terms") out = {} term = {} index = {1,7,30,1} day = 21 + math.random(99) week = 2 + math.random(16) month = 1 + math.random(5) year_ind = math.random(6) term[1] = day term[2] = week * 7 term[3] = month * 30 term[4] = math.floor(365/(year_ind+2)) out = lib.math.argsort(term) sign = math.random(2) length =...
--- Describes an ability event. Ability events should also support 'event' local prototype = require('prototypes/prototype') prototype.register('ability_event', { --- Set the name of the adventurer who caused this event. -- -- @tparam adventurer_name the new adventurer name for this event 'set_source_adventur...
do --this file contains the required units per sam type samTypesDB = { ['S-200'] = { ['type'] = 'complex', ['searchRadar'] = { ['RLS_19J6'] = { ['name'] = { ['NATO'] = 'Tin Shield', }, }, }, ['EWR P-37 BAR LOCK'] = { ...
stds.nodemcu_libs = {} loadfile ("tools/luacheck_config.lua")(stds) local empty = { } stds.nodemcu_libs.read_globals.ok = empty stds.nodemcu_libs.read_globals.nok = empty stds.nodemcu_libs.read_globals.eq = empty stds.nodemcu_libs.read_globals.fail = empty stds.nodemcu_libs.read_globals.spy = empty std = "lua51+lua53...
local test_name = "" local function assertEqual(actual, expect, msg) if not msg then msg = "" end if actual ~= expect then msg = test_name.." : expect ="..tostring(expect).." but actual = "..tostring(actual).." : "..msg error(msg) end end local elapsed_times = {} function main() local opponent_si...
-- === CommandFn === -- -- NOTE: this script / function is INCOMPLETE -- TODO: spend some time hashing out / working on script / function. -- Use left command key ⌘ when held while pressing a `f1` and possible other function keys as function keys and not media keys on macOS -- -- Download: https://github.com/ipatch/dot...
ModEncryption = {} aes_key = nil aes_IV = nil zzz_key = nil function ModEncryption.Init () end function ModEncryption.MD5Encrypt16 (str) end function ModEncryption.MD5Encrypt32 (str) end function ModEncryption.EncodeBase64 (str) end function ModEncryption.DecodeBase64 (str) end function ModEncryption.EncodeA...
object_building_kashyyyk_poi_kash_rryatt_lvl2_walk_tree_a1 = object_building_kashyyyk_shared_poi_kash_rryatt_lvl2_walk_tree_a1:new { } ObjectTemplates:addTemplate(object_building_kashyyyk_poi_kash_rryatt_lvl2_walk_tree_a1, "object/building/kashyyyk/poi_kash_rryatt_lvl2_walk_tree_a1.iff")
-------------------------------- -- @module MWSmoothRope -- @extend Node -- @parent_module mw -------------------------------- -- @overload self, cc.Texture2D -- @overload self, string -- @function [parent=#MWSmoothRope] setSegmentTexture -- @param self -- @param #string path ----------------------...
data:extend( { { type = "recipe", name = "thorium-recipe", icon = graphics .. "thorium.png", icon_size = 64, mipmap_count = 4, category = "centrifuging", energy_required = 20, enabled = false, order = "f", subgroup = "resources", ...
-- 三级缓存机制 -- Level1: resty.lrucache | worker level | reload will lose all cache data -- Level2: ngx.shared.DICT | server level | reload won't lose cache data -- Level3: callback function | server level| like redis、mysql、network io ... local ngx = require "ngx" -- https://github.com/thibaultcha/lua-resty-mlcache local...
object_ship_nova_orion_patrol_light_tier9 = object_ship_shared_nova_orion_patrol_light_tier9:new { } ObjectTemplates:addTemplate(object_ship_nova_orion_patrol_light_tier9, "object/ship/nova_orion_patrol_light_tier9.iff")
local S = farming.intllib -- cabbage minetest.register_craftitem("farming:cabbage", { description = S("Cabbage"), inventory_image = "farming_cabbage.png", groups = {seed = 2, food_cabbage = 1, flammable = 2}, on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, poin...
--[[ File: Asteroid.lua Author: Sam Triest Defines the blueprint for asteroids, and their operations. ]] Asteroid = { image, scoreValue, position, direction, rotation, speed, size, offset, collisionRadius } --[[ Contains all possible asteroid spawn locations. ]] lo...
--[[ This file is part of xmldom. It is subject to the licence terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/pallene-modules/xmldom/master/COPYRIGHT. No part of xmldom, including this file, may be copied, modified, propagated, or distributed e...
--- -- @module MeleeAttack -- -- ------------------------------------------------ -- Required Modules -- ------------------------------------------------ local Action = require( 'src.characters.actions.Action' ) local SoundManager = require( 'src.SoundManager' ) -- ------------------------------------------------ --...
-- Autoformat Lua sourtces on save / write vim.api.nvim_exec( [[ augroup Lua autocmd! autocmd BufWritePost *.lua !stylua --indent-type Spaces --indent-width 2 <afile> autocmd BufWritePost *.lua edit autocmd BufWritePost *.lua redraw! augroup end ]], false ) -- Autoformat Go sources on save /...
-- Time and Date formatter mimicking the vanilla os.date function -- @readme https://github.com/RoStrap/Time/blob/master/README.md -- @author Validark local Resources = require(game:GetService("ReplicatedStorage"):WaitForChild("Resources")) local Debug = Resources:LoadLibrary("Debug") local Suffixes = {"st", "nd", "r...
function init (args) local needs = {} needs["protocol"] = "tls" needs["filter"] = "alerts" return needs end function setup (args) filename = SCLogPath() .. "/" .. "dalton-tls-buffers.log" file, err = io.open(filename, "a") if file then SCLogInfo("TLS OPENED Log Filename " .. filename) ...
-------------------------------- -- @module EaseBounceOut -- @extend EaseBounce -- @parent_module cc -------------------------------- -- @function [parent=#EaseBounceOut] create -- @param self -- @param #cc.ActionInterval actioninterval -- @return EaseBounceOut#EaseBounceOut ret (return value: cc.EaseBounceOut) ...
local class = require("class") local NS_PER_MICROSECOND = 1000 local NS_PER_MILLISECOND = NS_PER_MICROSECOND * 1000 local NS_PER_SECOND = NS_PER_MILLISECOND * 1000 local NS_PER_MINUTE = NS_PER_SECOND * 60 local NS_PER_HOUR = NS_PER_MINUTE * 60 local function formatMinsSecs(ns) return tostring(math.floor(ns / NS_PER_...
function treeCreate(x, y, z, treeType, world) BulkBlockUpdate:start(world) local baseHeight2 if treeType == 1 then baseHeight2 = y + math.random(3, 5) for dz = z - 2, z + 2 do for dy = baseHeight2 - 2, baseHeight2 - 1 do for dx = x - 2, x + 2 do local o = BulkBlockUpdate:write(dx, dy, dz, 18) ...
return require("installer/integrations/ls/helpers").npm.builder({ install_package = "ember-language-server", lang = "ember", })
-- ********************************************************************************************************************* -- ********************************************************************************************************************* -- ********** GLOBAL VARIABLES. ...
function handle_get_root(req) req:set_response("<h1>Hello, Lua!</h1>") end
BLTOptionsMenu = BLTOptionsMenu or class(BLTMenu) function BLTOptionsMenu:Init(root) self:Title({text = "menu_header_options_main_screen_name"}) self:SubTitle({text = "blt_options_menu_lua_mod_options"}) local items = {} for _, lang in ipairs(BLT.Localization:languages()) do table.insert(items...
--[[ -- added by passion @ 2019-111-09 -- Lua侧UIPointerDoubleClick -- 注意: -- 1、按钮一般会带有其他的组件,如带一个UIText、或者一个UIImange标识说明按钮功能,所以这里是一个容器类 -- 2、UIPointerDoubleClick组件必须挂载在根节点,其下某个子节点有个Unity侧原生Button即可,如果有多个,需要指派相对路径 -- 使用方式: -- self.xxx_btn = self:AddComponent(UIPointerDoubleClick, var_arg)--添加孩子,各种重载方式查看UIBaseContainer --...
local function pos(x, y) return {x=x, y=y} end local function equalPositions(pos1, pos2) return pos1.x == pos2.x and pos2.y == pos2.y end local M = {} function M.new() return setmetatable({},{__index=M}) end function M:init(name) self.isLoaded = false self.path = name end function M:load() ...
----------------------------------- -- Area: Garlaige Citadel -- NPC: _5kr (Crematory Hatch) -- Type: Door -- !pos 139 -6 127 200 ----------------------------------- require("scripts/globals/titles") require("scripts/globals/settings") require("scripts/globals/quests") local ID = require("scripts/zones/Garlaige_Citade...
require "thread.Thread"
--- Longest Common Subsequence algorithm. -- After pseudo-code in <a -- href="http://www.ics.uci.edu/~eppstein/161/960229.html">lecture -- notes</a> by <a href="mailto:eppstein@ics.uci.edu">David Eppstein</a>. -- Find common subsequences. -- @param a first sequence -- @param b second sequence -- @return list of commo...
--=========== Copyright © 2018, Planimeter, All rights reserved. ===========-- -- -- Purpose: Close Button class -- --==========================================================================-- class "gui.closebutton" ( "gui.button" ) local closebutton = gui.closebutton closebutton.canFocus = false function closeb...
-- Chat example -- This sample demonstrates: -- - Starting up a network server or connecting to it -- - Implementing simple chat functionality with network messages require "LuaScripts/Utilities/Sample" local startServer = nil; local stopServer = nil; local refreshServerList = nil; local serverList = nil; --...
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf/protobuf" local BACKFLOWBUY_PB = require("BackFlowBuy_pb") module('BuyGoldFatInfo_pb') BUYGOLDFATINFO = protobuf.Descriptor(); local BUYGOLDFATINFO_DAY_FIELD = protobuf.FieldDescriptor(); local BUYGOLDFATINFO_BUYGOLDCOUNT_FIELD = protobuf.F...
return {'excellent','excellentie','excellenties','excelleren','excelsior','excentriciteit','excentriek','excentriekeling','excentrisch','exceptie','exceptionaliteit','exceptioneel','excerperen','excerpt','exces','excessief','excitatie','exciteren','exclamatie','exclave','exclusie','exclusief','exclusieve','exclusivisme...
local math = setmetatable({}, { __index = math }) math.lerp = function(a, b, c) return a + (b - a) * c end; return math
-- disable as clipLine is very slow on headless if (Spring.GetConfigInt('Headless', 0) ~= 0) then return false end function widget:GetInfo() return { name = "Red Console", --version 4.1 desc = "Requires Red UI Framework", author = "Regret", date = "29 may 2015", license = "GNU G...
-- -- NodeMCU implementation of 'ESP8266 Test App' -- https://github.com/malcom/ESP8266-Test-App/ -- Copyright (c) 2016 by Marcin 'Malcom' Malich -- Released under the MIT license -- local ssid = 'MalTest' local passw = 'dupa123' print('Connecting to WiFi...') wifi.setmode(wifi.STATION) wifi.sta.config(ssid, passw) ...
local PathJoin = require('path').join local Logger = require('logger') Logger:new(PathJoin(__dirname, 'console.json')) local log = Logger.getLogger('console_logger') log:error("Should be logged from root") log:warn("Should be logged from root") log:info("Should be logged from root") log:debug("Should be logged from r...
require 'paths' paths.dofile('mylib/helper.lua') ----------------------------------------- -- Parameters: ----------------------------------------- -- content_name: the content image located in folder "data/content" -- style_name: the style image located in folder "data/style" -- ini_method: initial method, set to "i...
ScoreTable = class(Observer) function ScoreTable:init() self.centerX = VIRTUAL_WIDTH * 0.5 - 7 self.centerY = VIRTUAL_HEIGHT * 0.3 self.color = {r = 1, g = 1, b = 1} self.scorePlayer1PosX = self.centerX - 30 self.scorePlayer2PosX = self.centerX + 25 end function ScoreTable:signal(message) ...
-- Arguments -- map_data: The map data source -- chunk: The chunk coordinate conversion API local map_data, chunk = ...; -- The map 'class' local Map = {}; Map.__index = Map; for _,loaded_map in ipairs(map_data.maps) do setmetatable(loaded_map, Map); end -- Rescale this map -- -- scale: The new scale function Ma...
local parent = require 'parent' describe('parent', function() it('returns the proper string for 0', function() assert.are.equal(parent(0), '@') end) it('returns the proper string for 1', function() assert.are.equal(parent(1), '@@parent') end) it('returns the proper string for 2', function() ass...
return {'tseetseevlieg','tse','tseng','tseetseevliegen'}
local oop = require("diffview.oop") local utils = require("diffview.utils") local git = require("diffview.git.utils") local Event = require("diffview.events").Event local FileEntry = require("diffview.views.file_entry").FileEntry local RevType = require("diffview.git.rev").RevType local Diff = require("diffview.diff")....
ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) --[[ AddEventHandler('mythic_base:shared:ComponentsReady', function() exports['mythic_base']:FetchComponent('Chat'):RegisterCommand('phone', function(source) TriggerClientEvent('8bit_phone:client:TogglePhone', source) end, { ...
slot0 = class("User", import(".BaseVO")) slot0.Ctor = function (slot0, slot1) slot0.type = slot1.type slot0.arg1 = slot1.arg1 slot0.arg2 = slot1.arg2 slot0.arg3 = slot1.arg3 slot0.arg4 = slot1.arg4 slot0.id = slot1.uid slot0.uid = slot1.uid slot0.token = slot1.token slot0.server = slot1.server end slot0.isLo...
local function shuffled_table(t) local ret = {} local keys = {} for k in pairs(t) do table.insert(keys, k) end while #keys > 0 do local ki = math.random(#keys) table.insert(ret, t[keys[ki]]) table.remove(keys, ki) end return ret end tsm_agnostic_dungeon = { -- Chest node. chest = function(pos) retur...
--------------------------------------------------------------------------- -- VANILLA SETTINGS -- --------------------------------------------------------------------------- data:extend({ --- Vanilla settings { type = "bool-setting", name ...
return {'onbaatzuchtig','onbaatzuchtigheid','onbalans','onbarmhartig','onbarmhartigheid','onbeantwoord','onbeantwoordbaar','onbebouwd','onbedaarlijk','onbedacht','onbedachtzaam','onbedachtzaamheid','onbedeeld','onbedekt','onbederfelijk','onbedijkt','onbedoeld','onbedorven','onbedorvenheid','onbedreigd','onbedreven','on...
vim.api.nvim_command("set foldmethod=expr") vim.api.nvim_command("set foldexpr=nvim_treesitter#foldexpr()") vim.cmd([[packadd nvim-ts-context-commentstring]]) vim.cmd([[packadd nvim-treesitter-textobjects]]) vim.cmd([[packadd nvim-ts-autotag]]) -- Setting clang as the compiler to use as pre this solution -- https://g...
--[[ Necessary changes to other files: -- - packet.lua: if the header has a length member, adapt packetSetLength; -- if the packet has a checksum, adapt createStack (loop at end of function) and packetCalculateChecksums -- - proto/proto.lua: add PROTO.lua to the list so it gets loaded --]] local ffi = require "f...