content
stringlengths
5
1.05M
-- A global variable for the App Mode appMode = hs.hotkey.modal.new() appModeStatusMessage = message.new('App Mode') appModeBlocked = false function enterAppMode() if (appModeBlocked) then return end appModeStatusMessage:show() appMode:enter() end function exitAppMode() appModeStatusMessage:hide() app...
local path = minetest.get_modpath("mobs") -- Mob API dofile(path.."/api.lua") -- Mob Items dofile(path.."/crafts.lua")
--[[-- A module that maps between Lua and XML without much ado. LuaXML provides a set of functions for processing XML data in Lua. It offers a very simple and natural mapping between the XML format and Lua tables, which allows one to work with and construct XML data just using Lua's normal table access and ite...
--[[ -- added by passion @ 2019/11/14 16:39:51 -- UIBoardUIMain模型层 -- 注意: -- 1、成员变量预先在OnCreate、OnEnable函数声明,提高代码可读性 -- 2、OnCreate内放窗口生命周期内保持的成员变量,窗口销毁时才会清理 -- 3、OnEnable内放窗口打开时才需要的成员变量,窗口关闭后及时清理 -- 4、OnEnable函数每次在窗口打开时调用,可传递参数用来初始化Model --]] ---@class UUIBoardNPCModel:UIBaseModel local UUIBoardNPCModel = BaseClass("UUI...
--[[ Database Plugin -> Initialize (ServerSide) by Tassilo (@TASSIA710) Contains the plugin core. --]] -- Configuration config.AddPlugin("Jet/Database", "Hostname", "localhost", "string", "The hostname of the database.") config.AddPlugin("Jet/Database", "Port", 3306, "number", "The port of the database.") config...
local cmd = vim.cmd local opt = vim.opt -- NeoVim cmd [[syntax on]] cmd [[filetype plugin on]] opt.number = true opt.relativenumber = true opt.termguicolors = true opt.splitbelow = true opt.splitright = true opt.scrolloff = 1 opt.sidescrolloff = 5 opt.inccommand = 'nosplit' opt.colorcolumn = "79" -- Vim settings opt...
Width = 34 ActiveColour = nil local pickerColours = { colours.brown, colours.yellow, colours.orange, colours.red, colours.green, colours.lime, colours.magenta, colours.pink, colours.purple, colours.blue, colours.cyan, colours.lightBlue, colours.lightGrey, colours.grey, colours.black, colours.white } ...
local function getScope(data, name, scope) if data[name] == nil then data[name] = {} end if data[name][scope] == nil then data[name][scope] = {} end return data[name][scope] end local function create() local data = {} return { get = function(name, scope) return getScope(data, name, scope) end, ...
-- Topper McNabb TOPPERMCNABB = {} function TOPPERMCNABB_onDied(Unit, event, player) Unit:RemoveEvents() end function TOPPERMCNABB_onSpawn(Unit, event, player) Unit:RegisterEvent("TOPPERMCNABB_Say",30000, 0) end function TOPPERMCNABB_Say(Unit, event, player) local chance = math.random(1,6) if(chance == 1) then ...
local vim = vim local M = {} M.defaults = { highlight_hovered_item = true, show_guides = true, position = 'right', width = 25, auto_preview = true, show_numbers = false, show_relative_numbers = false, show_symbol_details = true, keymaps = { -- These keymaps can be a string or a tab...
----------------------------------------------------- --name : lib/crunch/10_index_unifier.lua --description: crunch module, converts '.name'/{'name'} to '["name"]' as an intermediate step to '[x]' --author : mpmxyz --github page: https://github.com/mpmxyz/ocprograms --forum page : none ----------------------...
ITEM.name = "AK-103" ITEM.description = "The AK-103 assault rifle is a derivative of the AK-74M chambered for the 7.62×39mm M43 round, similar to the older AKM. The AK-103 can be fitted with a variety of sights, including night vision and telescopic sights, plus a knife-bayonet or a grenade launcher. It uses plastic co...
TagRules = function () local rules = { accelerations = { 1200, -- SMILEY_STATE_SMILEY 1200, -- SMILEY_STATE_SHIELD 1200, -- SMILEY_STATE_PIRATE 0 -- SMILEY_STATE_SLEEPY }, maxSpeeds = { 600, -- SMIL...
--[[ Kill Confirmed (Semi-Permissive) PvE Ground Branch game mode by Bob/AT 2022-05-08 https://github.com/JakBaranowski/ground-branch-game-modes/issues/26 Notes for Mission Editing: 1. Start with a regular 'Kill Confirmed' mission 2. Add non-combatants - use team id = 10 - one of the unarmed 'Civ*' kits) ]]...
-- Using v1.5.0 -- This bot is going to join its tribe house and -- spawn a different textarea (using lua) 10 times -- and then leave the room. local transfromage = require("transfromage") local client = transfromage.client() local timer = require("timer") client:once("ready", function() print("Ready to connect!") ...
-- 公历农历转换 -- {{#Invoke:Calendar|solar_to_lunar|2020-04-23}} => 2020-04-01 -- {{#Invoke:Calendar|solar_to_lunar|2020-05-23}} => 2020-04-01L (L表示闰月) -- {{#Invoke:Calendar|lunar_to_solar|2020-04-01}} => 2020-04-23 -- {{#Invoke:Calendar|lunar_to_solar|2020-04-01L}} => 2020-05-23 -- {{#Invoke:Calendar|lunar_format|2020-04-...
------------------------------------------------------------------------------- -- Mob Framework Mod by Sapier -- -- You may copy, use, modify or do nearly anything except removing this -- copyright notice. -- And of course you are NOT allow to pretend you have written it. -- --! @file mob_template.lua --! @brief templ...
--//i did do a bit shit on this one... for i=99,0,-1 do if i>2 then print(i .. " bottles of beer on the wall, " .. i .. " bottles of beer.\nTake one down and pass it around, " .. i-1 .. " bottles of beer on the wall.\n")elseif i==2 then print("2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it...
return redis.call('keys', '*')
----------------------------------------------------------------------------- -- MIME support for the Lua language. -- Author: Diego Nehab -- Conforming to RFCs 2045-2049 ----------------------------------------------------------------------------- ----------------------------------------------------------------------...
GM.Name = "Panic Ritual" GM.Author = "Zet0r" GM.Email = "N/A" GM.Website = "https://youtube.com/Zet0r" TEAM_HUMANS = 1 TEAM_DEMONS = 2 TEAM_SPECTATORS = 3 team.SetUp(TEAM_HUMANS, "Humans", Color(100,125,255), true) team.SetUp(TEAM_DEMONS, "Demons", Color(255,100,100), true) team.SetUp(TEAM_SPECTATORS, "Spectators", C...
---Stack of drawables. Used to implement methods `on_click`, `on_hower` etc. ---Only elements with these methods should be added on stack. ---@class src.app.stack ---@type src.app.stack|src.proto.drawable[] local stack = proto.set_name({}, "src.app.stack") ---@param drawable src.proto.drawable ---@return integer inde...
local _, Private = ... if Private.initialized then local name = "nerien_ovale_demonhunter_vengeance" local desc = string.format("[9.1] %s: Demon Hunter - Vengeance", Private.name) local code = [[ # Adapted from Wowhead's "Vengeance Demon Hunter Rotation Guide - Shadowlands 9.1.0" # by Itamae. # https://www.wowhead....
local aStar = {} local Grid = require "modules.jumper.grid" local Pathfinder = require "modules.jumper.pathfinder" local walkable = 0 local grid local myFinder local map = {} function aStar.get_path(from, to) return myFinder:getPath(from.x, from.y, to.x, to.y) end function aStar.load() for line=1,MI...
include('shared.lua') function GM:ScoreboardShow() ShowSB = true end function GM:ScoreboardHide() ShowSB = false end // TODO: CLEAN THIS CODE function GM:GetTeamScoreInfo() local TeamInfo = {} local teamd={} local players={} local i=0 local name,cash,member,alive,ping for i=0,10 do ta...
charJob = require "lib/charJob" charInventory = require "lib/charInventory" mapQuests = require "lib/mapQuests" npcSpeakers = require "lib/npcSpeakers" charConstants = require "lib/charConstants" quest = target.get_quest(mapQuests.getID("SpecialTrainingBeginner")) mapleAdmin = self.as_speaker(npcSpeakers.getID("MapleA...
TOOL.Category = "Starfall" TOOL.Name = "Starfall - Processor" TOOL.Command = nil TOOL.ConfigName = "" -- ------------------------------- Sending / Receiving ------------------------------- -- local MakeSF TOOL.ClientConVar["Model"] = "models/spacecode/sfchip.mdl" TOOL.ClientConVar["ScriptModel"] = "" TOOL.Clien...
local scripts = { "src/main.lua", "src/utility.lua", "src/calculatePos.lua", "src/createWindow.lua", "src/createText.lua", "src/create3DText.lua", "src/createImage.lua", "src/createButton.lua", "src/createInput.lua", "src/createCheckbox.lua", "src/createList.lua" } function rea...
local vh2 = Instance.new("ScreenGui") local Frame = Instance.new("Frame") local bar3 = Instance.new("Frame") local bar = Instance.new("Frame") local title = Instance.new("TextLabel") local bar2 = Instance.new("Frame") local godmode = Instance.new("TextButton") local exploitgun = Instance.new("TextButton") local morphin...
-- Importing modules local RandomSelector = require "elasticsearch.selector.RandomSelector" local Connection = require "elasticsearch.connection.Connection" local Logger = require "elasticsearch.Logger" local getmetatable = getmetatable -- Setting up environment local _ENV = lunit.TEST_CASE "tests.selector.RandomSelec...
local name=KEYS[1] local greet=ARGV[1] local result=greet.." "..name return result
local R = require "rigel" local RM = require "generators.modules" local types = require("types") local S = require("systolic") local harness = require "generators.harness" local C = require "generators.examplescommon" W = 128 H = 64 T = 8 ITYPE = types.array2d( types.uint(8), T ) local inp = R.input( R.Handshake(ITYP...
local priority_queue = require("galaxyline.priority_queue") local M = {} -- TODO: -- 2. proper setup function -- 3. documentation and publish -- 4. tabline -- 5. .lua-format file M.section = {} M.section.left = {} M.section.right = {} M.section.mid = {} M.divider = { provider = "%=", highlight = "StatusLine"...
local colors = { bg = '#1e1e1e', fg = '#aab2bf', red = "#e06c75", green = "#98C379", yellow = "#ecbf6f", blue = "#61afef", purple = "#c678dd", cyan = "#56b6c2", white = "#abb2bf", black = "#1E1E1E", gray = "#4c4f55", highlight = "#e2be7d" } return colors
return { Inventory = { -- ADRENAL BOOSTER / Cyberware / Circulatory System / Common -- Helps the body maintain performance when under great strain. -- Instantly restores 10% Stamina when you defeat an enemy. { id = "Items.StaminaRegenBoosterCommon" }, -- ADRENAL BOOSTER / Cyberware / Circulatory System / U...
ESX = nil local Categories = {} local Vehicles = {} TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) Citizen.CreateThread(function() local char = Config.PlateLetters char = char + Config.PlateNumbers if Config.PlateUseSpace then char = char + 1 end if char > 8 then print(('esx_truckshop: ^1W...
local pollution_crystalsb="_block" local pollution_crystalsd="_" local pollution_crystals={ {"Coal","coal","lump"}, {"Steel","steel","ingot"}, {"Copper","copper","ingot"}, {"Bronze","bronze","ingot"}, {"Gold","gold","ingot"}, {"Mese","mese","_crystal"}, {"Diamond","diamond",""}, {"Obsidian","obsidian","_shard...
local UserInputService = game:GetService("UserInputService") local players = game:GetService("Players") local mouse = players.LocalPlayer:GetMouse() local ICONS = { horizontal = "rbxassetid://7655080017", vertical = "rbxassetid://7655095494", bottomLeft = "rbxassetid://7655124995", bottomRight = "rbxassetid://76551...
--[[ This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:27' using the latest game version. NOTE: This file should only be used as IDE support; it should NOT be distributed with addons! **************************************************************************** CONTENTS OF THIS FILE IS COPYRI...
enemy = {} animTimer = love.timer.getMicroTime( ) animTimerDelay = 1 bloodTimer = love.timer.getMicroTime( ) bloodTimerDelay = 0.1 bloodID = 1 deathID = 1 jDeathTimer = love.timer.getMicroTime() function enemy:init(max_enemies) self.table = {} enemyNumber = max_enemies end function enemy:getMaxEnemies( ) return ...
ESX = nil local display = false local LastVehicle = nil local LicencePlate = {} LicencePlate.Index = false LicencePlate.Number = false local Keys = { ["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57, ["~"] = 243,...
---@diagnostic disable: undefined-global -- Success function Success() rulexlib:log("success") end -- Failed function Failed(error) rulexlib:log(error) end --- --- 这里展示一个远程发送到经过ESP8266控制的多路继电器后响应的 Demo: --- 假设远程指令是打开开关, 然后同步状态到云端, 指令体: --- {"cmdId": "00001", "cmd" :"open","sw": [1, 2] } --- [1, 2]表示打开 ...
local function Reply(msg) local text = msg.content_.text_ if not database:get(bot_id..'Reply:Status'..msg.chat_id_) then if text == 'هلو' then TextReply = 'هلوات يروحي🥺♥️' send(msg.chat_id_, msg.id_,'['..TextReply..']') return false end if text == 'شلونكم' then TextReply = 'تمام وان...
data:extend({ { type = "recipe", name = "nuclear-furnace", ingredients = {{"uranium-238", 2}, {"processing-unit", 10}, {"electric-furnace", 1}, {"uranium-235", 1}}, result = "nuclear-furnace", energy_required = 10, enabled = false } })
ITEM.name = "M14 EBR" ITEM.description= "A modernized M14 battle rifle. Fires 7.62x51mm." ITEM.longdesc = "The Mk 14 Enhanced Battle Rifle (EBR) is an American selective fire military designated marksman rifle chambered for the 7.62×51mm NATO cartridge.\nIt is a variant of the M14 battle rifle and was originally built...
-- tolua: container abstract class -- Written by Waldemar Celes -- TeCGraf/PUC-Rio -- Jul 1998 -- $Id: $ -- This code is free software; you can redistribute it and/or modify it. -- The software provided hereunder is on an "as is" basis, and -- the author has no obligation to provide maintenance, support, updates, -- e...
--A function that creates new sandboxed global environment. local basexx = require("Engine.basexx") local bit = require("bit") local _LuaBCHeader = string.char(0x1B).."LJ" return function(Machine, APIS) local GLOB = { assert = assert, error = error, ipairs = ipairs, pairs ...
function RefreshAccount (account, since) local isFirst = true local transactions = {} -- load transactions repeat local url = "https://secure.lloydsbank.co.uk/personal/link/lp_statement_ajax?_=" .. os.time() .. "&viewstatement=" .. (isFirst == true and "latest" or "previous") isFirs...
test = {"t", "t", "n", "n", "t", "n", "t", "t", "t", "n", "n", "n", "t", "n", "t", "t", "t", "n"}
local cfg = require("config").layer.fire local util = require("util") local core = require("core") local hexagon = require("hexagon") local buff = require("buff") --[[ get: nil ui, dump all team, pos internal, get total strength set: team, area, duration, strength put fire on the ground --]] return function(map,...
visage_summon_familiars_oaa = class(AbilityBaseClass) function visage_summon_familiars_oaa:OnSpellStart() local caster = self:GetCaster() local playerID = caster:GetPlayerID() local abilityLevel = self:GetLevel() if caster.familiars == nil then caster.familiars = {} end -- Kill non-dead familiars cr...
test = require 'u-test' common = require 'common' local function VerifySuccess(hr) SetCheckHR(1) if hr ~= 0 then test.equal(hr, 0) print("Failure. hr=" .. hr) test.stopTest() end return true end function AchievementsManagerPerformance_Handler( ... ) print("AchievementsManag...
local oop = require('oop.oop') _G.class = oop.class _G.static = oop.static
local class = require "com/class" local BootSettings = class:derive("BootSettings") local Vec2 = require("src/Essentials/Vector2") local Button = require("src/Kernel/UI/Button") local Checkbox = require("src/Kernel/UI/Checkbox") function BootSettings:new(bootScreen) self.bootScreen = bootScreen -- prepare fonts...
---@meta ---@class cc.ControlSwitch :cc.Control local ControlSwitch={ } cc.ControlSwitch=ControlSwitch ---@overload fun(boolean:boolean):self ---@overload fun(boolean:boolean,boolean:boolean):self ---@param isOn boolean ---@param animated boolean ---@return self function ControlSwitch:setOn (isOn,animated) end ---...
local StateMachine = require "src.util.statemachine" describe("StateMachine", function() local sm local entity setup(function() entity = {} entity.enter = function(self) end entity.update = function(self) end entity.draw = function(self) end end) before_each(functi...
nuclear.debug.log("Init recipes...") require(no_path_p_recipes .. "ammo") require(no_path_p_recipes .. "decay") require(no_path_p_recipes .. "fluoride") require(no_path_p_recipes .. "enrichment") require(no_path_p_recipes .. "fuel") require(no_path_p_recipes .. "processing") require(no_path_p_recipes .. "reactor") req...
-- set all the info config = require "modconfig" require("botlife") config.CreateRconInt("dennisness", 0, 9001, 10, "set teh dennisness to over 9000!!") Srv.Console:Print("dennis", "blub, init running!") Srv.Console:Register("dennis_is_krass", "r", "much dennis!", function(result) Srv.Console:Print("you den...
--utils:log("newUserRegistration", "Loaded"); local scene = composer.newScene(); scene.resMan = nil; --- -- Handler for the create event. -- -- @param inEvent The event object. -- function scene:create(inEvent) --utils:log("newUserRegistration", "create()"); self.resMan = utils:newResourceManager(); local ...
function random_pair(upper, ...) --[[-- Returns a pair of random points in the interval [1,upper]. Each point is picked with uniform probability. The pair (v0,v1) also has the property that v0 != v1. The results are returned in order. If a second argument is passed to the function, it becomes a fi...
local grpc_json = require('conf.client.etcd.grpc_json') local function new() local protocol = grpc_json.new_protocol() -- https://github.com/etcd-io/etcd/blob/v3.4.15/mvcc/mvccpb/kv.proto -- https://github.com/etcd-io/etcd/blob/v3.4.15/etcdserver/etcdserverpb/rpc.proto -- {{{ General purpose messages...
--[[ @ filename : share_memory.lua @ author : zhangshiqian1214@163.com @ modify : 2017-08-23 17:53 @ company : zhangshiqian1214 ]] local skynet = require "skynet" local stm = require "skynet.stm" local addr local share_memory = {} local share_data_map = {} local function init() addr = skynet.uniqueservice...
local PLUGIN = PLUGIN util.AddNetworkString("ixPlayerDeathMenu") util.AddNetworkString("ixPlayerSpawnerSync") local spawnPointVariations = {Vector(0, 0, 0)} for i = 0, 360, 22.5 do spawnPointVariations[#spawnPointVariations + 1] = Vector(math.cos(i), math.sin(i), 0) end local function GetPlayerSize(ply) local bott...
-- Simple supervised learning on MNIST, using a feedforward neural net (brute forcing) -- Uses the h2o training version of mnist -- This is a one file script, no options, just to keep it simple -- Loading data require 'os' require 'torch' require 'nn' require 'csvigo' require 'optim' local data_path = "./data/" loca...
--[[-- charset_data = -- table containing information about the current charset charset.get_data() Returns a table with information about the currently selected charset. See framework/env/charset/data/ for more information. --]]-- function charset.get_data() return charset.data[ string.gsub(string.lower(chars...
local minit = require("minit") local OOP = require("oop"); local mission = require("cmisnlib"); local buildAi = require("buildAi"); local core = require("bz_core"); local misc = require("misc"); local ProducerAi = buildAi.ProducerAi; local ProductionJob = buildAi.ProductionJob; local IsIn = OOP.isIn; ...
-- Initial stuff math.randomseed(tick()) -- Wait for character repeat wait() until game.Players.LocalPlayer.Character ~= nil -- Useful shortcuts local plr = game:GetService("Players").LocalPlayer local char = plr.Character local plrgui = plr.PlayerGui local backpack = plr.Backpack local torso = char.Torso local...
object_building_general_srii_skyscraper_05 = object_building_general_shared_srii_skyscraper_05:new { } ObjectTemplates:addTemplate(object_building_general_srii_skyscraper_05, "object/building/general/srii_skyscraper_05.iff")
-- To prevent too frequent connections to the server local M = {} local t = {} local interval = 0.4 function M.connect(ip) if socket.gettime() - (t[ip] or socket.gettime() + interval + 1) > interval then t[ip] = socket.gettime() return true else t[ip] = socket.gettime() return...
require 'concurrent' function sender(pid) concurrent.register('sender', concurrent.self()) concurrent.send(pid, { from = concurrent.self(), integer = 9634, float = 96.34, string = 'hello world', table = { 'hello, world', hello = 'world' }, callme = function () return 'hello world!' end }) end ...
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' description 'REE Discord Integration' version '1.0.0' client_scripts { 'options.lua', 'client/client.lua', 'client/discord.lua', 'client/events.lua', 'client/functions.lua', }
-------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------- ------------ Pour commencer n'oubliez pas de remercier íʍƊɑѵƊɑѵ#9351 pour ce script ---------...
local Signal = require 'lib.hump.signal' local Timer = require 'lib.hump.timer' local Gamestate = require "lib.hump.gamestate" local love = love local debug = false local joystick local music = {} local img = {} local sfx = {} local state = { mainmenu = {d=0, locked = 0}, reading = {d=0, ends=0, speed=40, textKe...
--DBString = {} xg.loadString = function (ty) if ty == xg.LanguageType.Zh then cc.exports.DBString = require("dev.demo.data.string.zh.DBStringZh") else cc.exports.DBString = require("dev.demo.data.string.en.DBStringEn") end end xg.loadString(xg.LanguageType.Zh) --return DBString
local helpers = require "spec_helper" describe("cliargs::core", function() local cli before_each(function() cli = require("../src.cliargs.core")() end) describe('#parse', function() context('when invoked without the arguments table', function() local global_arg before_each(function() ...
return function(self, node) if not self:process_node(node.dest_list) then return end if node.val_list then self.printer:add_textline(' = ') return self:process_block(node.val_list) end return true end
class("CommanderFormationOPCommand", pm.SimpleCommand).execute = function (slot0, slot1) slot4 = slot1:getBody().data.FleetType slot5 = getProxy(CommanderProxy) slot6 = getProxy(ChapterProxy) slot7 = getProxy(FleetProxy) if slot1.getBody().data.data.type == LevelUIConst.COMMANDER_OP_RENAME then slot0:sendNotifi...
-- this is very accurate approx of 2^x on the interval 0 < x < 1 -- from http://mathworld.wolfram.com/PadeApproximant.html, [3/3] Padé approximant of exp -- note x is 6 digits at most, so multiplying directly is OK -- error is most as x approaches 1 local function pade_exp(self, x) -- note 69314718 represents ln(2) x...
local rp_languages = {} local selectedLanguage = GetConVarString("gmod_language") -- Switch language by setting gmod_language to another language function DarkRP.addLanguage(name, tbl) local old = rp_languages[name] or {} rp_languages[name] = tbl -- Merge the language with the translations added by DarkRP.a...
--[=[ Provides permissions for the game. See [BasePermissionProvider]. :::tip Be sure to initialize the [PermissionServiceClient] on the client. ::: ```lua local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore")) local PermissionProvider = require("PermissionProvider") local Pe...
local holdingup = false local store = "" local secondsRemaining = 0 function holdup_DisplayHelpText(str) SetTextComponentFormat("STRING") AddTextComponentString(str) DisplayHelpTextFromStringLabel(0, 0, 1, -1) end function holdup_drawTxt(x,y ,width,height,scale, text, r,g,b,a, outline) SetTextFont(0) SetTe...
--- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by Yuk. --- DateTime: 2021/7/12 1:25 --- --- require("Game.Libs.Util.class") ---@class Game:Object local _M = singleton("Game") ---@param self Game ---@return Game function _M.New(self) --BaseObject = require("Game.Libs.Module.BaseObject") p...
mapping = { foo = { bar = "baz" } }
local configs = require 'nvim_lsp/configs' local util = require 'nvim_lsp/util' configs.ccls = { default_config = { cmd = {"ccls"}; filetypes = {"c", "cpp", "objc", "objcpp"}; root_dir = util.root_pattern("compile_commands.json", "compile_flags.txt", ".git"); }; docs = { package_json = "https://r...
function Auctionator.Search.GetEmptyResult(searchTerm, index) -- Remove "" from exact searches so it sorts properly local cleanSearchParameter = searchTerm:gsub("\"", "") return { itemKey = { itemID = 1217, -- Valid item ID, "Unknown Reward", but unobtainable itemLevel = index, -- Differentiate be...
术语: mf == msg foward, 消息转发服务器。 user == msg foward的客户端,被服务器对象。客户端进程。服务器群的其中一个服务器进程。 cd == client driver,驱动,给user作为库使用,可以再这个基础快速写出客户端链接应用。 设计目的: 问题:一套服务器群,数量超过几台以上,互相之间直接socket通讯会带来以下问题: 配置繁琐,每条连接都要一个服务端的ip地址。 代码结构复杂:其中一个进程, 可能是server,可能也是client,对外通讯接口不一样。 连接网状拓扑,分析问题难度大。 解决方法: 服务器群都链接mf,mf作为消息转发中心出。 ...
local consume = test.EventConsumer({ "init", "hide", "parent group", "shown from rendering", "draw", "hide", "remove", }) function test.Run(done) do local BUILDER, PART = pac.PartTemplate("base_drawable") PART.FriendlyName = "test" PART.ClassName = "test" PART.Icon = 'icon16/cut.png' function PART...
--[[ Name: init.lua For: SantosRP By: TalosLife ]]-- AddCSLuaFile "cl_init.lua" AddCSLuaFile "shared.lua" include "shared.lua" function ENT:Initialize() self:SetModel( "models/props_junk/gascan001a.mdl" ) self:PhysicsInit( SOLID_VPHYSICS ) self:SetMoveType( MOVETYPE_VPHYSICS ) self:SetSolid( SOLID_VPHYSICS ) ...
local cache = require "kong.tools.database_cache" local responses = require "kong.tools.responses" local utils = require "kong.tools.utils" local _M = {} function _M.execute(conf) local consumer_id if ngx.ctx.authenticated_entity then consumer_id = ngx.ctx.authenticated_entity.consumer_id else return re...
enemyCollision = {} function enemyCollision:isCollidingWithFireboy(enemy) local width = fireboy.boxWidth * fireboy.scale local height = fireboy.boxHeight * fireboy.scale local fireboyPoints = { { x=(fireboy.x-width/2), y=(fireboy.y-height) }, -- Upper left { x=(fireboy.x+width/2), y=(firebo...
#!/usr/bin/env luajit local xmlua = require("xmlua") local path = arg[1] local file = assert(io.open(path)) local parser = xmlua.HTMLSAXParser.new() parser.start_document = function() print("Start document") end parser.ignorable_whitespace = function(whitespaces) print("Ignorable whitespaces: " .. "\"" .. whit...
love.conf = function(t) t.gammacorrect = true t.title, t.identity = "Tover Drank", "Minimal" t.modules.joystick = false t.modules.physics = false t.window.width = 720 t.window.height = 450 t.window.vsync = false t.window.resizable = true t.version = "11.3" t.console = true end
local utils = require("utils") local map = utils.map map("n", "<Leader>h", ":noh<CR>") map("n", "<Leader><Leader>", "<C-^>") -- Switching windows -- map("n", "<C-j>", "<C-w>j") -- map("n", "<C-k>", "<C-w>k") -- map("n", "<C-l>", "<C-w>l") -- map("n", "<C-h>", "<C-w>h") -- Resizing windows map("n", "<C-Up>", ...
------------------------------------------------------------------------------- --- AUTHOR: Nostrademous --- GITHUB REPO: https://github.com/Nostrademous/Dota2-FullOverwrite ------------------------------------------------------------------------------- --[[ function ItemUsageThink() return end function AbilityUs...
local FOLDER_NAME, private = ... local Chronicles = private.Core local Locale = LibStub("AceLocale-3.0"):GetLocale(private.addon_name) Chronicles.UI.EventDescription = {} Chronicles.UI.EventDescription.CurrentPage = nil Chronicles.UI.EventDescription.CurrentEvent = nil Chronicles.UI.EventDescription.CurrentFactionsC...
local kernel = {} kernel.language = "glsl" kernel.category = "filter" kernel.name = "iris" -- IMPORTANT: If you move the position while keeping the unitOpenness -- constant, the actual radius in pixel WON'T stay constant because -- the diagonal distance from the center to the most distant corner -- of the DisplayOb...
local Runner = require("tests.indent.common").Runner --local XFAIL = require("tests.indent.common").XFAIL local run = Runner:new(it, "tests/indent/graphql", { tabstop = 2, shiftwidth = 2, softtabstop = 0, expandtab = true, }) describe("indent Lua:", function() describe("whole file:", function() run:whol...
local utils = {} utils.unpack = table.unpack or unpack if _VERSION:find("5.1") then utils.loadstring = loadstring else utils.loadstring = load end local function flatten_into(array, res) for i = 1, #array do if type(array[i]) == "table" then flatten_into(array[i], res) else res...
--[[-------------------------------------------------------------------]]--[[ Copyright wiltOS Technologies LLC, 2020 Contact: www.wiltostech.com ----------------------------------------]]-- wOS = wOS or {} wOS.ALCS = wOS.ALCS or {}...
local path = (...):gsub("[^%.]*$", "") local M = require(path .. 'master') local CyclicList, Set, SymmetricMatrix, Vec2 CyclicList, Set, SymmetricMatrix, Vec2 = M.CyclicList, M.Set, M.SymmetricMatrix, M.Vec2 local wedge wedge = Vec2.wedge local round round = M.math.round local geometry = require(path .. 'geometry') loc...