content
stringlengths
5
1.05M
ACL = { lastError = "" } local playersConnecting = {} local lastConnectedIdent = nil -- Checks whether the player is whitelisted -- @param1 integer NetID of the player connecting. NetID = PlayerID << 16 -- @param2 string Name of the player connecting -- @return function ACL:canConnect( netID, playerName...
-- Nncachebuilder-test.lua -- unit test require 'all' setRandomSeeds(27) tester = Tester() test = {} function test.cache() local v, isVerbose = makeVerbose(false, 'test.cache') local chatty = isVerbose local nObs = 10 local nDims = 1 local xs = torch.Tensor(nObs, nDims) for i = 1, nObs do xs...
local function setup () vim.keymap.set('n', '<leader>bk', '<cmd>BufDel<CR>', {desc = 'Delete current buffer, keeping layout'}) vim.keymap.set('n', '<leader>bK', '<cmd>BufDel!<CR>', {desc = 'Force delete current buffer, keeping layout'}) end return { setup = setup }
ModifyEvent(-2, 0, 0, 0, -1, -1, -1, -1, -1, -1, -2, -2, -2); ModifyEvent(-2, 14, 0, 0, -1, -1, -1, -1, -1, -1, -2, -2, -2); ModifyEvent(-2, 15, 0, 0, -1, -1, -1, -1, -1, -1, -2, -2, -2); ModifyEvent(-2, 16, 0, 0, -1, -1, -1, -1, -1, -1, -2, -2, -2); ModifyEvent(-2, 17, 0, 0, -1, -1, -1, -1, -1, -1, -2, -2, -2); Modify...
uuid = argv[1]; another_session = freeswitch.Session(uuid) callerid = another_session:getVariable("caller_id_number"); --file = io.open("logtest1.txt", "a+") --file:write("\n:"..callerid..":\n") --file:close() another_session:consoleLog("info", "callerid: " .. callerid .. "\n"); stream:write(callerid);
--[[********************************** * * Multi Theft Auto - Admin Panel * * client\widgets\admin_editor.lua * * Original File by lil_Toady * **************************************]] function nothing () end
local sides = { bottom = 0, top = 1, back = 2, front = 3, right = 4, left = 5 } sides["down"] = sides["bottom"] sides["up"] = sides["top"] sides["north"] = sides["back"] sides["south"] = sides["front"] sides["west"] = sides["right"] sides["east"] = sides["left"] sides["negy"] = sides["bottom"] sides["posy"] = s...
signal = require 'signal' a=torch.Tensor({12,2,9,16}) b=torch.poly(a) print(a) print(b) print('-- Expected: 1 -39 518 -2616 3456') a=torch.Tensor({{12,2,9,16},{12,2,9,16},{12,2,9,16},{12,2,9,16}}) b=torch.poly(a) print(a) print(b) print('-- Expected: 1.0000 -39.0000 0.0000 0...
-- automatic conversion of input parameters function autonumber(input) local base = 10 local orig_input = input if (type(input) == "string") then input = input:gsub("[\(\)\"uUlL]", "") if string.find(input,"[bxhBXH]") ~= nil then if string.find(string.lower(input), "0b") =...
local on_attach = function(client, bufnr) vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.lsp.omnifunc") -- autoformat on save if client.resolved_capabilities.document_formatting then vim.cmd("au BufWritePre <buffer> lua vim.lsp.buf.formatting_sync(nil, 1000)") end end local default_options = { on...
require "premake_modules" local ProjectName = "RaycastedMetaBalls" function AddSourceFiles(DirectoryPath) files { ("../" .. DirectoryPath .. "/**.h"), ("../" .. DirectoryPath .. "/**.hpp"), ("../" .. DirectoryPath .. "/**.cpp"), ("../" .. DirectoryPath .. "/**.inl"), ("../" .. Dir...
-- -- Project: wiola -- User: Konstantin Burkalev -- Date: 16.03.14 -- local _M = { _VERSION = '0.13.3', } _M.__index = _M setmetatable(_M, { __call = function(cls, ...) return cls.new(...) end }) local wamp_features = { agent = "wiola/Lua v" .. _M._VERSION, roles = { broker = ...
object_tangible_loot_beast_beast_steroid_mantis_monkey = object_tangible_loot_beast_shared_beast_steroid_mantis_monkey:new { } ObjectTemplates:addTemplate(object_tangible_loot_beast_beast_steroid_mantis_monkey, "object/tangible/loot/beast/beast_steroid_mantis_monkey.iff")
test_run = require('test_run').new() engine = test_run:get_cfg('engine') box.execute('pragma sql_default_engine=\''..engine..'\'') -- create space box.execute("CREATE TABLE foobar (foo INT PRIMARY KEY, bar TEXT)") -- prepare data box.execute("INSERT INTO foobar VALUES (1, 'foo')") box.execute("INSERT INTO foobar VALU...
-- local M = {} local enum_type = require('xe.node.enum_type') M.any = { } M.audio_pan = { 'string', 'const', const = { { 'default', "self.x / 256" }, }, } M.bgstage = { 'enum', enum = enum_type.bgstage } M.blend = { 'enum', enum = enum_type.blend } M.bool = { 'bool' } M.bul...
module("time", package.seeall) local meta = FindMetaTable("Player") if not meta then return end function meta:GetTime() return self:GetNWFloat("TotalTime") end function meta:SetTime(num) self:SetNWFloat("TotalTime", num) end function meta:GetTimeStart() return self:GetNWFloat("TimeStart") end function meta:SetT...
-- code browser plugin local aerial = require('aerial') local on_attach = function(client, bufnr) aerial.on_attach(client) -- aerial does not set any mappings by default -- toggle the aerial window with <leader>a vim.api.nvim_buf_set_keymap(0, 'n', '<leader>a', '<cmd>AerialToggle!<CR>', {}) -- jump forwards/...
BTN_L = 0 BTN_R = 1 BTN_U = 2 BTN_D = 3 BTN_O = 4 BTN_X = 5 CLR_BLK = 0 CLR_DBL = 1 CLR_PRP = 2 CLR_DGN = 3 CLR_BRN = 4 CLR_DGY = 5 CLR_GRY = 6 CLR_WHT = 7 CLR_RED = 8 CLR_ORN = 9 CLR_YLW = 10 CLR_GRN = 11 CLR_BLU = 12 CLR_IND = 13 CLR_PNK = 14 CLR_PCH = 15 RESOLUTION_X = 128 RESOLUTION_Y = 120 MAX_VEL = 0.8 FRAME_...
RegisterNetEvent("npc-jobmanager:playerBecameJob") AddEventHandler("npc-jobmanager:playerBecameJob", function(job, name, notify) local LocalPlayer = exports["npc-core"]:getModule("LocalPlayer") LocalPlayer:setVar("job", job) if notify ~= false then TriggerEvent("DoLongHudText", job ~= "unemployed" ...
--[[ File: LuaNativeUIExample.lua Author: Mikael Kindborg Description: Demo that uses a high-level Lua UI library to create a NativeUI. The object NativeUI is defined in file: projects/common/LuaLib.lua Here are some things to try in the LuaLive editor. First press "Run program" in the editor to run all of the co...
local INSTANCE_ID = string.match(arg[0], "gh%-6035%-(.+)%.lua") local function unix_socket(name) return "unix/:./" .. name .. '.sock'; end require('console').listen(os.getenv('ADMIN')) if INSTANCE_ID == "master" then box.cfg({ listen = unix_socket("master"), }) elseif INSTANCE_ID == "replica1" th...
gamestats = {} function gamestats:enter(previous) self.previous = previous self.yModPerc = 100 self.screen = "stats" self.cursorX,self.cursorY=1,1 tween(0.2,self,{yModPerc=0}) output:sound('stoneslideshort',2) self.transY = 0 self.maxTransY = 0 self.sideTransY = 0 self.maxSideTransY = 0 local gra...
plugin = { type = "piglet", name = "piglet::codec_data", test = function() dofile(SCRIPT_DIR .. "/../common.lua") return run_tests(tests) end } INIT_PROTO = 1 DEFAULT_VALUES = { next_prot_id = 0, lyr_len = 0, invalid_bytes = 0, proto_bits = 0, codec_flags = 0, i...
-------------------------------------------------------------------------------------------------- -- Localized messages and options in English -------------------------------------------------------------------------------------------------- --Slash Commands MYREP_CMD_STATUS = "status"; MYREP_CMD_DEBUG = "debug...
function API.ItemData(id, name, weight, subTitle, type, hungerVar, thirstVar, droppable) local self = {} self.id = id self.name = name self.weight = weight self.type = type self.subTitle = subTitle or "NULL" self.hungerVar = hungerVar or 0 self.thirstVar = thirstVar or 0 self.droppa...
--- LPeg PEG pattern matching. -- @module lpeg local lpeg = {} --- -- The matching function. It attempts to match the given pattern against the -- subject string. If the match succeeds, returns the index in the subject of -- the first character after the match, or the captured values (if the pattern -- captu...
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf" module('BseBroadcastMessage_pb', package.seeall) local BSEBROADCASTMESSAGE = protobuf.Descriptor(); local BSEBROADCASTMESSAGE_MESSAGETYPE = protobuf.EnumDescriptor(); local BSEBROADCASTMESSAGE_MESSAGETYPE_NORMAL_STRING_ENUM = protobuf.Enum...
-- Copyright (C) by Hiroaki Nakamura (hnakamur) local resty_cookie = require "resty.cookie" local setmetatable = setmetatable local _M = { _VERSION = '0.2.0' } local mt = { __index = _M } local function _update(dt, ...) for i = 1, select('#', ...) do local t = select(i, ...) if t then ...
---@type nvimd.Unit local M = {} M.url = 'antoinemadec/FixCursorHold.nvim' M.description = 'Fix slowness in CursorHold' M.no_default_dependencies = true M.activation = { wanted_by = { 'target.base', }, } function M.config() -- in ms vim.g.cursorhold_updatetime = 100 end return M
local M = {} local function is_float(value) local _, p = math.modf(value) return p ~= 0 end local function calc_float(value, max_value) if value and is_float(value) then return math.min(max_value, value * max_value) else return value end end local function calc_list(values, max_value, aggregator, l...
--- --- Group rate limiting plugin's global configuration constant --- Created by jacobs. --- DateTime: 2018/4/10 下午3:59 --- local _M = {} _M.name = "group_rate_limit" _M.small_error_types = { sys = { type_plugin_conf = "grp.conf_error" }, biz = { type_rate_control = "grp.reject", ...
QRCodeQueue = {} function dgsRequestQRCode(str,w,h) local w,h = w or 128,h or 128 local encodedStr = urlEncode(str) local QRCode = dxCreateTexture(w,h,"argb") dgsSetData(QRCode,"asPlugin","dgs-dxqrcode") dgsSetData(QRCode,"data",{str,encodedStr}) dgsSetData(QRCode,"loaded",false) local index = math.seekEmpty(QRC...
EndorResearchOutpostScreenPlay = ScreenPlay:new { numberOfActs = 1, screenplayName = "EndorResearchOutpostScreenPlay" } registerScreenPlay("EndorResearchOutpostScreenPlay", true) function EndorResearchOutpostScreenPlay:start() if (isZoneEnabled("endor")) then self:spawnMobiles() end end function EndorResearch...
--[[ Videoclip - mp4/webm clips creator for mpv. Copyright (C) 2021 Ren Tatsumoto This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later versi...
----------------------------------- -- Area: Crawlers' Nest -- NPC: qm10 (??? - Exoray Mold Crumbs) -- Involved in Quest: In Defiant Challenge -- !pos -83.391 -8.222 79.065 197 ----------------------------------- require("scripts/globals/quests"); require("scripts/globals/keyitems"); require("scripts/globals/settings"...
return Def.ActorFrame{ -- Transition Def.Quad { InitCommand=function(self) self:zoomto(SCREEN_WIDTH,SCREEN_HEIGHT):vertalign(bottom):x(SCREEN_CENTER_X):y(SCREEN_BOTTOM) self:diffuse(Color.Black) end; OnCommand=function(self) self:decelerate(0.5):zoomtoheight(0):sleep(0.1):diffusealpha(0) end; ...
function aurum.biomes.v_base(def) return b.t.combine({ y_min = 1, }, def) end function aurum.biomes.v_ocean(def) return b.t.combine({ node_top = "aurum_base:sand", depth_top = 1, node_filler = "aurum_base:sand", depth_filler = 3, y_max = 0, y_min = -50, node_cave_liquid = "aurum_base:water_source", ...
local U = {} local dota2team = { [1] = { ['name'] = ""; ['alias'] = ""; ['players'] = { 'Miracle-', 'BlackDream', 'Two Faced', '→ OPERATIVO', 'Dreamer' }; ['sponsorship'] = ''; }, [2] = { ['name'] = ""; ['alias'] = ""; ['players'] = { 'TripleSteal-', '*Kiss...
GameWorld={}; GameAgentAction={}; GameAgentAction.ATTACK=0; GameAgentAction.IDLE=1; GameAgentAction.APPROACH=2; GameAgentAction.WANDER=3; GameAgentAction.ESCAPE=4; GameAgentAction.DIE=5; GameAgentAction.SHOOT=6; GameAgentAction.WALK=7; GameAgentAction.SLUMP=8; GameAgentAction.DEAD=9; GameAgentAction.UNKNOWN=10; GameA...
---@class CS.FairyGUI.GTextField : CS.FairyGUI.GObject ---@field public text string ---@field public templateVars CS.System.Collections.Generic.Dictionary_CS.System.String_CS.System.String ---@field public textFormat CS.FairyGUI.TextFormat ---@field public color CS.UnityEngine.Color ---@field public align number ---@fi...
CuiVersion = "1.5.7" LastUpdate = "2020-09-27" VersionDetail = "Concise UI - " .. CuiVersion .. "[NEWLINE]" .. "Last Update: " .. LastUpdate
-- This is a useful module which, can be used for debugging tunnel local DbTunnel, parent = torch.class('nn.DbTunnel', 'nn.Module') function DbTunnel:__init(db_id) parent.__init(self) self.gradInput = nil self.db_id = db_id or '0' self.print_db_id = false end function DbTunnel:updateOutput(input) if se...
--------------------------------------------- -- Subsonics -- Lower defense --------------------------------------------- require("scripts/globals/monstertpmoves") require("scripts/globals/settings") require("scripts/globals/status") --------------------------------------------- function onMobSkillCheck(target, mob, s...
drive = function(name, vehicle) local playerData = players[name] if playerData.canDrive or not playerData.cars[1] then return end if playerData.holdingItem then return end local car = mainAssets.__cars[vehicle] if not car then return end if car.type ~= 'boat' and (ROOM.playerList[name].y < 7000 or ROOM.playerList...
require("ai/ai_core") function Spawn(entity) InitAI(thisEntity) end function InitAI(self) self:SetContextThink( "init_think", function() self:GetAbilityByIndex(0):SetLevel(4) self:GetAbilityByIndex(1):SetLevel(3) self.aiThink = aiThinkStandardSkill ...
local t = Def.ActorFrame{ OnCommand=function(self) SCREENMAN:ReloadOverlayScreens() end }; return t;
--stone golem mobs:register_mob("dmobs:golem", { type = "monster", reach = 3, damage = 2, attack_type = "dogfight", hp_min = 62, hp_max = 72, armor = 100, collisionbox = {-0.4, 0, -0.4, 0.4, 2.5, 0.4}, visual = "mesh", mesh = "golem.b3d", textures = { {"dmobs_golem.png"}, }, blood_texture = "default_sto...
--[[ @author Sebastian "CrosRoad95" Jura <sebajura1234@gmail.com> @copyright 2011-2021 Sebastian Jura <sebajura1234@gmail.com> @license MIT ]]-- mojeW,mojeH = 1280, 1024 sW,sH = guiGetScreenSize() width, height = (sW/mojeW), (sH/mojeH) GUIEditor = { gridlist = {}, progressbar = {}, button = {}, wind...
require('lusp'):repl{ welcome = 'Welcome to Lusp 0.1\n', promt = 'lusp> ', init = '(begin (load "stdsyntax.scm") (load "stdlib.scm"))', }
return { language = "nl", source = "http://www.onzetaal.nl/advies/letterfreq.html", frequencies = { [0x61] = 7.47, [0x62] = 1.58, [0x63] = 1.24, [0x64] = 5.93, [0x65] = 18.91, [0x66] = 0.81, [0x67] = 3.40, [0x68] = 2.38, [0x69] = 6.50, [0x6A] = 1.46, [0x6B] = 2.25, [0x6C...
-- scaffold geniefile for yas yas_script = path.getabsolute(path.getdirectory(_SCRIPT)) yas_root = path.join(yas_script, "yas") yas_includedirs = { path.join(yas_script, "config"), yas_root, } yas_libdirs = {} yas_links = {} yas_defines = {} ---- return { _add_includedirs = function() includedirs { yas_include...
local infinity_accumulator = {} local gui = require("__flib__.gui") local math = require("__flib__.math") local util = require("scripts.util") local constants = require("scripts.constants") -- ----------------------------------------------------------------------------- -- LOCAL UTILITIES local function get_setting...
print("App running") devices_online = {} -- table of all variables that can be sent to frontend (except devices list) variable_registry = {} -- parsing clients datafile clients_data = {} if file.open("clients_datafile.json", "r") then local raw_data = file.read() file.close() -- cutting comments raw...
package("libgo") set_homepage("https://github.com/yyzybb537/libgo") set_description("Go-style concurrency in C++11.") set_urls("https://github.com/yyzybb537/libgo.git") if is_host("macosx", "linux") then add_deps("cmake") end on_install("macosx", "linux", function (package) i...
local HttpService = game:GetService("HttpService") local Promise = require(script.Parent.Promise) local PlayFabSettings = require(script.Parent.PlayFabSettings) local IPlayFabHttps = {} local function GetFullUrl(urlPath) local fullUrl = "https://" .. PlayFabSettings.settings.titleId .. PlayFabSettings.settings.produ...
------------------------ -- Extensions to the [string module](http://www.lua.org/manual/5.1/manual.html#5.4). -- Credit to rxi's [lume](https://github.com/rxi/lume/) lib for some of these functions. -- @extend string --- Split a string using a given seperator. -- If seperator is not provided, it will split the string...
local Token = {} local tokens = {} local counter = 0 function Token.register(var) counter = counter + 1 tokens[counter] = var return counter end function Token.get(token_id) return tokens[token_id] end global.tokens = {} function Token.register_global(var) local c = #global.tokens + 1 g...
-- dynamically start/stop/suspend interfaces -- local dotos = require("dotos") local ipc = require("ipc") local path = "/dotos/interfaces/?/main.lua;/shared/interfaces/?/main.lua" local running = {dynamic = dotos.getpid()} local current local api = {} -- start an interface and switch to it function api.start(_, ifa...
return Def.ActorFrame { children = { LoadActor( "_Tap Receptor", NOTESKIN:LoadActor(Var "Button", "Ready Receptor") ) .. { Frame0000=0; Delay0000=1; InitCommand=cmd(playcommand, "Set"); GameplayLeadInChangedMessageCommand=cmd(playcommand,"Set"); SetCommand=cmd(visible,GAMESTATE:GetGameplayLeadIn()); ...
-- vim:et function love.conf(t) t.title="NetWars" t.author="Borg <borg@uu3.net>" t.identity="netwars" t.console=false t.screen.width=800 t.screen.height=600 t.modules.joystick=false t.modules.physics=false t.modules.audio=false t.modules.sound=false end
function Server_AdvanceTurn_Start (game,addNewOrder) SkippedAirlifts = {}; executed = false; end function Server_AdvanceTurn_Order(game, order, result, skipThisOrder, addNewOrder) if(executed == false)then if(order.proxyType == 'GameOrderAttackTransfer' and order.PlayerID == 520078)then executed = true; ...
local color_palette = { rosewater = "#F5E0DC", -- Rosewater flamingo = "#F2CDCD", -- Flamingo magenta = "#C6AAE8", -- Magenta pink = "#E5B4E2", -- Pink red = "#E38C8F", -- Red maroon = "#E49CB3", -- Maroon peach = "#F7BE95", -- Peach yellow = "#ECDDAA", -- Yellow green = "#B1E1A6", -- Green teal = "#B7E5E6", ...
GWall = class { dir='', -- left/right/up/down is_door=false, is_unlocked=false, to_outside=false, -- does this wall lead to the outside of the map? init = function(self, opt) table.update(self, opt) end, getFullString = function(self) local str = self.dir if self.is_door then str = str .. '.door.'..(self.i...
-- -- GMP LuaJIT FFI binding for 6.1.2, by lalawue, 2019/07/07 assert(jit, "Please use LuaJIT 2.0.5") local ffi = require("ffi") local bit = require("bit") local gmp = ffi.load("gmp") assert(gmp, "Please provide gmp library in your load path") ffi.cdef[[ /** Types */ typedef unsigned long long int mp_limb_t; typ...
function init(virtual) if not virtual then entity.setInteractive(true) end end function onInteraction(args) if args ~= nil and args.sourceId ~= nil then local p = entity.position() local parameters = {} local type = "gardenbotv80g" if entity.configParameter("botspawner.type") ~= nil then ...
function description() return "Open a web page" end function run() if #arguments > 0 then windex = focused_window_index() target = arguments[1] load_uri(windex, focused_webview_index(windex), target) return true end log_debug("No URL specified") return false end
EssentialsPlugin.Server_ShutdownCommand = function(client, args) if (not PermissionsPlugin.CheckPermissionNotify(client, "essentials.server")) then return end local index = 1 -- used to concatenate reason message local time = 15 if (args[1] == "-t" and args[2] ~= nil) then time = tonumber(args[2]) if (tim...
return "This is file A"
local SszViewCtr = require("app.demo.DowneyTang.CapsaSusun.SszViewCtr") local function main() local scene = cc.Scene:create() local SszViewCtr = SszViewCtr.new(); SszViewCtr:initView() scene:addChild(SszViewCtr:getView()); return scene end return main
--! @brief places player in invite list function factions.invite_player(name, player) local faction = factions.factions.get(name) faction.invited_players[player] = true factions.on_player_invited(name, player) factions.factions.set(name, faction) end --! @brief removes player from invite list (can no longer ...
local Utils = require "Utils" local xml2lua = require("xml2lua") local LayoutIO = {} local xmlDecl = "<?xml version=\"1.0\" encoding=\"utf-8\"?> \n" local function fileExists(path) local file = io.open(path) if file == nil then return false else return true end end function LayoutIO...
#!/usr/bin/lua local uci = require 'uci'.cursor() local ubus = require('ubus').connect() local neighbor_reports = {} local function hasKey(tab, key) for k, _ in pairs(tab) do if k == key then return true end end return false end uci:foreach('static-neighbor-report', 'neighbor', function (config) if hasKey(con...
local CommandBytes = { nameChange = "\1", chat = "\4", pm = "\5", message = "\7", version = "\19", pingRequest = "\26", pingResponse = "\27", sendAction = "\9", sendAlias = "\10", sendMacro = "\11", sendVariable = "\12", sendEvent = "\13", sendGag = "\14", sendHighlight = "\15", sendList = "\16", sendA...
function getCharacterId() return exports["caue-base"]:getChar("id") end
return { fadeOut = 1.5, mode = 2, id = "XINNIAN5", once = true, fadeType = 1, fadein = 1.5, scripts = { { mode = 1, sequence = { { "新年快乐\n\n<size=45>五 贺年卡</size>", 1 } } }, { actor = 301330, nameColor = "#a9f548", side = 2, actorName = "{namecode:34}", dir = 1, ...
-- imports local active_screen = require 'active_screen' local game_view = require 'game_view' local level_list = require 'level_list' function exports() local instance = {} local backButton = love.graphics.newImage('level_select/back.png') local backX = 20 local backY = 600 local backWidth = 300 local backHeig...
local M = {} function M.MouseEnable(mode) io.write(string.format('\027[?%dh', mode)) io.flush() end function M.MouseDisable(mode) io.write(string.format('\027[?%dl', mode)) io.flush() end function M.cycle(n) local i = 1 return function() local result = i i = i + 1 if i > n then i = 1 end ...
local PLUGIN = PLUGIN local PANEL = {} function PANEL:Init() if (IsValid(ix.gui.areaEdit)) then ix.gui.areaEdit:Remove() end ix.gui.areaEdit = self self.list = {} self.properties = {} self:SetDeleteOnClose(true) self:SetSizable(true) self:SetTitle(L("areaNew")) -- scroll panel self.canvas = self:Add("D...
-- Copyright (c) 2021 EngineerSmith -- Under the MIT license, see license suppiled with this file local path = select(1, ...):match("(.-)[^%.]+$") local baseAtlas = require(path .. "baseAtlas") local util = require(path .. "util") local fixedSizeTA = setmetatable({}, baseAtlas) fixedSizeTA.__index = fixedSizeTA local...
local ok, treesitter = pcall(require, "nvim-treesitter.configs") if not ok then vim.notify "Could not load treesitter" return end treesitter.setup { ensure_installed = "all", sync_install = true, ignore_install = {}, highlight = { enable = true, disable = {}, }, incremental_selection = { en...
-- 历史上的今天 local Api = require("coreApi") local json = require("json") local http = require("http") function ReceiveFriendMsg(CurrentQQ, data) return 1 end function ReceiveGroupMsg(CurrentQQ, data) if data.FromUserId == tonumber(CurrentQQ) then return 1 end if string.find(data.Content, "历史上的今天...
----------------------------------- -- -- Zone: Lebros_Cavern -- ----------------------------------- require("scripts/zones/Lebros_Cavern/IDs") ----------------------------------- function onInitialize(zone) end function onInstanceZoneIn(player, instance) local cs = -1 local pos = player:getPos() if (pos...
script.Parent.MouseButton1Click:Connect(function() if script.Parent.Text == "X" then script.Parent.Text = "" else script.Parent.Text = "X" end end)
local scriptedailOldInit = init function init() scriptedailOldInit() message.setHandler("returnCompanions", function() return playerCompanions.getCompanions("crew") end) message.setHandler("dismissCompanion", function(_, _, podUuid) recruitSpawner:dismiss(podUuid) end) end
GUINotifications.kScoreDisplayFontName = Fonts.kMicrogrammaDMedExt_Small GUINotifications.kScoreDisplayTextColor = Color(1, 1, 1, 1) GUINotifications.kScoreDisplayYOffset = 128 GUINotifications.kScoreDisplayExtraText = " XP" local oldInitialize = GUINotifications.Initialize function GUINotifications:Initialize() old...
local tiny = require('lib.tiny') local class = require('lib.middleclass') local System = tiny.processingSystem(class('system.player.shoot')) function System:initialize() self.filter = tiny.requireAll( 'isPlayer', 'timeout', 'cooldown', 'shoot', 'space' ) end function System:process(e, dt) i...
local privateRoomInputLayout = require(ViewPath .. "hall/privateRoom/privateRoomInputLayout"); local privateRoom_pin_map = require("qnFiles/qnPlist/hall/privateRoom_pin") -- 私人房输入层 local PrivateRoomInputLayer = class(CommonGameLayer, false); local h_index = 0; local getIndex = function(self) h_index = h_i...
---@class SafeHouse : zombie.iso.areas.SafeHouse ---@field private x int ---@field private y int ---@field private w int ---@field private h int ---@field private diffError int ---@field private owner String ---@field private players ArrayList|Unknown ---@field private lastVisited long ---@field private title String --...
-- -- Created by IntelliJ IDEA. -- User: chen0 -- Date: 29/6/2017 -- Time: 4:20 AM -- To change this template use File | Settings | File Templates. -- local mergesort = {} mergesort.__index = mergesort function mergesort.sort(a, comparator) local aux = require('lualgorithms.data.list').create() for i=0,(a:siz...
-- https://github.com/terrortylor/nvim-comment require("nvim_comment").setup { marker_padding = true, -- Linters prefer comment and line to have a space in between markers comment_empty = true, -- should comment out empty or whitespace only lines create_mappings = true, -- Should key mappings be created ...
if mods["angelsbioprocessing"] then data:extend( { ----------- -- Algae -- ----------- --Orange { type = "recipe", name = "algae-orange", category = "bio-processing", subgroup = "bio-processing-green", enabled = false, energy_required = 20, ingredients = { {type="fluid", name="water-miner...
local _, ns = ... local B, C, L, DB, P = unpack(ns) local S = P:GetModule("Skins") local _G = getfenv(0) local select = select local function loadFunc() P:Delay(.5, function() local bu = _G.PlayerTalentFrame.__TalentEmuCall if bu then B.Reskin(bu) bu:SetPoint("RIGHT", PlayerTalentFrameCloseButton, "LEFT", ...
addEvent("onDiscordPacket") local sockets = {}; local channels = {}; function createSocketFromConfig() local _channels = getSystemEnvVariable("DISCORD_CHANNELS"); local passphrase = getSystemEnvVariable("DISCORD_PASSPHRASE"); local hostname = "mta-tr-discord-bot"; local port = getSystemEnvVariabl...
local popup = {array = {}} function popup:new(atlas, quad, x, y, size) size = size or drawSize self.array[#self.array + 1] = { atlas = atlas, quad = quad, x = x, y = y, size = size, scale = 0, scaleSpeed = config.display.height * 0.05, alpha = 255, alphaSpeed = 255 } end function...
-------------------------------- -- Makefile specific settings -- -------------------------------- vim.wo.foldmethod = "marker"
factory.electronics = {} dofile(factory.modpath.."/electronics/device.lua") dofile(factory.modpath.."/electronics/cable.lua") dofile(factory.modpath.."/electronics/combustion_generator.lua") dofile(factory.modpath.."/electronics/electronic_furnace.lua") dofile(factory.modpath.."/electronics/battery.lua")
include("shared.lua") function ENT:GetDisplayPosition() local obbcenter = self:OBBCenter() local obbmax = self:OBBMaxs() return Vector(obbcenter.x, obbmax.y - 19.5, obbcenter.z + 41), Angle(0, LocalPlayer():EyeAngles().y - 90, 90), 0.2 end function ENT:Draw() self:DrawModel() self:FWDrawInfo() end fun...
-- This script used to rearrange disk images for use by Dirac's CP/M, -- but the sectors are now arranged contiguously. The main point of -- this tool is now to add in the boot sector and bootable CP/M image. -- -- Command line arguments are: -- -o file_name Output filename -- file_name Input fil...
local PlayerAdded = false local UIS = game:GetService("UserInputService") while wait() do for i,v in pairs(script.Parent.Background.Players:GetChildren()) do if v.Name ~= "PlayerName" then v:Destroy() end end for i,v in pairs(game.Players:GetChildren()) do if script.Parent.Background.Players:FindFirstChild...
-- -- Created by IntelliJ IDEA. -- User: petrus -- Date: 2021/01/01 -- Time: 09:10 -- To change this template use File | Settings | File Templates. -- local m = require("services") mysql = require('mysql') json = require('json') function get() if POST_DATA ~= nil then for key, value in pairs(POST_DATA) do...