content
stringlengths
5
1.05M
-- Copyright (C) by Hiroaki Nakamura (hnakamur) local session_cookie = require "session.cookie" local session_store = require "session.store" local saml_sp_request = require "saml.service_provider.request" local saml_sp_response = require "saml.service_provider.response" local resty_random = require "resty.random" lo...
--[[------------ Q U A K E Heads Up Display Version 1.3.3 19/01/22 By DyaMetR ]]-------------- -- Main framework table Q1HUD = {}; Q1HUD.Version = "1. 33"; --[[ METHODS ]] --[[ Correctly includes a file @param {string} file @void ]]-- function Q1HUD:IncludeFile(file) if SERVER then include(f...
registerNpc(347, { walk_speed = 210, run_speed = 700, scale = 150, r_weapon = 1064, l_weapon = 0, level = 98, hp = 27, attack = 413, hit = 219, def = 313, res = 359, avoid...
local Const = require(ENV_RFF_PATH .. "constants") local Firearm = require(ENV_RFF_PATH .. "firearm/init") local Ammo = require(ENV_RFF_PATH .. "ammo/init") local Magazine = require(ENV_RFF_PATH .. "magazine/init") local TestData = { } TestData.AmmoGroups = { AmmoGroup_357Magnum = { }, AmmoGroup_556x45mm = { }...
return function() local Modules = game:GetService("Players").LocalPlayer.PlayerGui.AvatarEditorInGame.Modules local TryOnCharacterModelVersion = require(script.Parent.TryOnCharacterModelVersion) local IncrementTryOnCharacterModelVersion = require(Modules.AvatarExperience.Catalog.Actions.IncrementTryOnCharacterModelV...
SetDiscordAppId(cfg.DiscordAppID) Citizen.CreateThread(function() while true do SetDiscordRichPresenceAsset(cfg.discordImageName) SetDiscordRichPresenceAssetText(cfg.hoverText) SetDiscordRichPresenceAssetSmall(cfg.smallDiscordImageName) SetRichPresence(cfg.richPresenceText) SetDiscordRichPresenc...
object_tangible_meatlump_event_meatlump_weapon_palette_01_10 = object_tangible_meatlump_event_shared_meatlump_weapon_palette_01_10:new { } ObjectTemplates:addTemplate(object_tangible_meatlump_event_meatlump_weapon_palette_01_10, "object/tangible/meatlump/event/meatlump_weapon_palette_01_10.iff")
local uv = vim.loop -- Alias for Neovim's event loop (libuv) local run_hook -- to handle mutual recursion -- nvim 0.4 compatibility local cmd = vim.api.nvim_command local vfn = vim.api.nvim_call_function local compat = require('paq-nvim.compat') ----- Constants local PATH = vfn('stdpath', {'data'}) .. '/site/pack...
Rule("sig01", 1): fields("request_uri"): phase("REQUEST_HEADER"): op('rx', [[f\x00?oo]]): action("setRequestHeader:X-Foo=bar") Rule("sig02", 1): fields("request_uri"): phase("REQUEST_HEADER"): op('streq', [[f\x00?oo]]): action("setRequestHeader:X-Bar=baz")
--[[ ################################################################################ # # Copyright (c) 2014-2020 Ultraschall (http://ultraschall.fm) # # 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 ...
local data = {} -- Read data function readPassport() local p = {} local line = io.read("l") while line and line ~= "" do for k, v in line:gmatch("(%a+):([^%s]+)") do p[k] = v end line = io.read("l") end table.insert(data, p) return line end repeat local l = readPassport() until not l function has(p, ...
object_tangible_veteran_reward_frn_vet_holo_darth_vader = object_tangible_veteran_reward_shared_frn_vet_holo_darth_vader:new { } ObjectTemplates:addTemplate(object_tangible_veteran_reward_frn_vet_holo_darth_vader, "object/tangible/veteran_reward/frn_vet_holo_darth_vader.iff")
name = "aa[A]bcde" i=name:find("%[") print(i) print(name:sub(i+1,i+1))
if enemy_1.hp_percentage > 10 then character_1:WithWaitTime(1000):UseSkill(2) character_1:UseSkill(3) if enemy_1.hp_percentage > 50 then character_1:UseSkill(4) end character_2:UseSkill(2) character_2:UseSkill(3) character_2:UseSkill(4) character_4:UseSkill(1) character_4:UseSkill(2) if character_4...
--*********************************************************** --** THE INDIE STONE ** --*********************************************************** require "TimedActions/ISBaseTimedAction" ---@class ISInsertMagazine : ISBaseTimedAction ISInsertMagazine = ISBaseTimedAction:derive(...
local composer = require( "composer" ) local loadsave = require( "loadsave" ) local roleslib = require( "scenes.library.roles" ) local scene = composer.newScene() local uiGroup = display.newGroup() local settings = loadsave.loadTable( "settings.json" ) local ui = { background, frontbox, title, roles = {}, playe...
-- create node Arctangent2 require "moon.sg" local node = moon.sg.new_node("sg_arctangent2") if node then node:set_pos(moon.mouse.get_position()) end
local builder = ll.class(ll.ContainerNodeBuilder) function builder.newDescriptor() ll.logd('ImagePyramid', 'newDescriptor') local desc = ll.ContainerNodeDescriptor.new() desc.builderName = 'ImagePyramid' desc:addPort(ll.PortDescriptor.new(0, 'in_RGBA', ll.PortDirection.In, ll.PortType.ImageView)) ...
local luaunit = require("luaunit") require("imports_abs_abs") TestImportsAbsAbs = {} function TestImportsAbsAbs:test_imports_abs_abs() local r = ImportsAbsAbs:from_file("src/fixed_struct.bin") luaunit.assertEquals(r.one, 0x50) luaunit.assertEquals(r.two.one, 0x41) luaunit.assertEquals(r.two.two.one,...
BigWigs:AddColors("Vizier Jin'bak", { [-5960] = "blue", [-5959] = "red", [-5958] = "yellow", }) BigWigs:AddColors("Commander Vo'jak", { [-6287] = {"blue","red"}, [120778] = "blue", [120789] = {"blue","yellow"}, }) BigWigs:AddColors("General Pa'valak", { [-5946] = "yellow", [119875] = "red", [124283] = "oran...
--[[/* * (C) 2012-2013 Marmalade. * * 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, modify, merge, publish,...
-- require "/lib/stardust/power.lua" shared.energyReceptor = { } function init() rate = config.getParameter("conversionRate") end function shared.energyReceptor:receive(socket, amount, testOnly) local fuel = world.getProperty("ship.fuel") local maxFuel = world.getProperty("ship.maxFuel") if type(fuel) ~= "n...
-- Log -- local bret = require "behavior3.behavior_ret" local M = { name = "Log", type = "Action", desc = "打印日志", args = { {"str", "string", "日志"} }, } function M.run(node, env) print(node.args.str) return bret.SUCCESS end return M
local modname = ... local M = {} _G[modname] = M local RPIN = 7 local GPIN = 6 local BPIN = 5 local REV = false function M.init(r_pin, g_pin, b_pin, rev) if rev then REV = true else REV = false end RPIN = r_pin GPIN = g_pin BPIN = b_pin pwm.setup(RPIN, 1000, 1023) pwm.setup(GPIN, 1000, 1023) pwm.se...
--- --- ColaFramework --- Copyright © 2018-2049 ColaFramework 马三小伙儿 --- Common NotifyId 处理没有模块的通用类型事件 --- local NotifyId = { CREATE_PANEL = 0, -- 创建UIPanel DESTROY_PANEL = 1, -- 销毁UIPanel ALLUI_SHOWSTATE_CHANGED = 2, --所有的UI显隐状态变化 } return NotifyId
bloodbagstore = 0 -- if multiple but not all were used, the rest should stay in the tent. if you cant use the item, it needs to go back in the tent. Make using ground items not give space back.Making items not store when wanting to drop. make items you already have give the option to replace or store.Make items you do...
---@meta ---@class network.Tskill ---@field dataID integer ---@field level integer --* network.TGameSkill ---@class TGameSkill:System.Object ---@field actionName string ---@field animationID integer ---@field consumeHP integer ---@field consumeMP integer ---@field coolTime number ---@field criticalPercent number ---@fi...
------------------------------ -- library ------------------------------ require 'xlua' require 'csvigo' require 'optim' require 'cutorch' require 'read_data' require 'save_feature' require 'lib/orderedPairs' require 'lib/fill_na' require 'lib/log_transform' require 'lib/normalize_col' require 'lib/normalize_row' ...
----------------------------------< -- Bluebird GUI -- elements/dxImage.lua ----------------------------------< -- Element variables --[[------------------------------< dxElement -> dxImage ------------------- [Includes Basic Indicators] x : X position y : Y position sx : SX position sy : SY position pathOrImage : The...
Locales['en'] = { ['not_enough_nitrous'] = 'Not enough nitrous.', ['nitrous_activated'] = 'Nitrous activated.', ['nitrous_ready'] = 'Nitrous ready. Press ~INPUT_PICKUP~ to use.' }
--[[ -- Copyright(c) 2019, 武汉舜立软件 All Rights Reserved -- Created: 2019/4/23 -- -- @file upgrade.lua -- @brief 升级模块 -- @version 0.1 -- @author 李绍良 -- @history 修改历史 -- \n 2019/4/23 0.1 创建文件 -- @warning 没有警告 --]] local string = require("string") local io = require("io") local os = require("os") local l_sys = requi...
local CircularBuffer = require(script.Parent.Parent.Parent.CircularBuffer) local Signal = require(script.Parent.Parent.Parent.Signal) local Constants = require(script.Parent.Parent.Parent.Constants) local HEADER_NAMES = Constants.ServerJobsFormatting.ChartHeaderNames local MAX_DATASET_COUNT = tonumber(settings():GetF...
-------------------------------------------------- -- Created By: Luciano -- Description: Cover goes hiding under fire -------------------------- -- local Behavior = CreateAIBehavior("Cover2Hide", { Alertness = 1, ----------------------------------------------------- Constructor = function(self,entity) ent...
local query = require 'lusty-store-mysql.query' local connection = require 'lusty-store-mysql.store.mysql.connection' local function keysAndValues(tbl) local n, keys, values = 1, {}, {} for k, v in pairs(tbl) do keys[n] = k if type(v) == 'number' then values[n] = v else values[n] = ngx.quot...
local Types = require(script.Parent.Parent.Types) type Array<T> = Types.Array<T> local function loadDescendants(parent: Instance) local modules: Array<any> = {} for _, descendant in parent:GetDescendants() do if descendant:IsA("ModuleScript") then table.insert(modules, require(descendant :: ModuleScript)) e...
local myNAME = "merTorchbug" local tbug = SYSTEMS:GetSystem("merTorchbug") local strformat = string.format function tbug.inspect(object, tabTitle, winTitle, recycleActive) local inspector = nil if rawequal(object, _G) then inspector = tbug.getGlobalInspector() inspector.control:SetHidden(fals...
local APABadEnts = APABadEnts or {} local log = APA.log local isPlayer = APA.isPlayer local physStop = APA.physStop local IsValid = IsValid local timer = timer local hook = hook function APA.SetBadEnt(ent,bool,ignorefrozen) local phys = IsValid(ent) and ent.GetPhysicsObject and ent:GetPhysicsObject() if bool the...
local classic = require 'classic' local DynaMaze, super = classic.class('DynaMaze', Env) -- Constructor function DynaMaze:_init(opts) opts = opts or {} super._init(self, opts) -- Set change: none|blocking|shortcut self.change = opts.change or 'none' -- Create blank grid (y, x) self.maze = torch.ByteTens...
--- -- @author wesen -- @copyright 2019-2020 wesen <wesen-ac@web.de> -- @release 0.1 -- @license MIT -- local Exception = require "AC-LuaServer.Core.Util.Exception.Exception" --- -- The exception for the case that the remaining time of the current active game is attempted to be set to -- a value that would cause a in...
-- "Dungeon Loot" [dungeon_loot] -- Original by BlockMen, this entire file by Amoeba -- -- config.lua -- -- Note: All positive heights (above water level) are treated as depth 0. -- Also, no comma after the item of a list. -- Minimum number of rooms a dungeon should have for a chest to be generated dungeon_loot.min_nu...
--- === hs.geometry === --- --- Mathematical functions local geometry = require "hs.geometry.internal" --- hs.geometry.rotateCCW(point, aroundpoint, ntimes = 1) -> point --- Function --- Rotates a point around another point N times. function geometry.rotateCCW(point, aroundpoint, ntimes) local p = {x = point.x, y =...
----------------------------------- -- Area: Mount Zhayolm -- Door: Runic Seal -- !pos 703 -18 382 61 ----------------------------------- local ID = require("scripts/zones/Mount_Zhayolm/IDs") require("scripts/globals/besieged") require("scripts/globals/keyitems") require("scripts/globals/missions") --------------------...
-------------------------------------------------------------------------------- -- Clientside utility functions -------------------------------------------------------------------------------- local bitmap_font_1 = { [10] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0}, ["."] = { 0...
function Utils:ShowRules() BeginScaleformMovieMethod(self.Scaleform, 'SHOW_SCREEN') ScaleformMovieMethodAddParamInt(9) EndScaleformMovieMethod() end
local winapi = require("luawinapi") print("UNDER_CE:", UNDER_CE) print("WINVER:", string.format("0x%x", WINVER)) print("_WIN32_WINDOWS:", _WIN32_WINDOWS and string.format("0x%x", _WIN32_WINDOWS)) print("_WIN32_WINNT:", _WIN32_WINNT and string.format("0x%x", _WIN32_WINNT))
--[[ MIT License Copyright (c) 2021 Michael Wiesendanger 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, mod...
--[[---------------------------------------------------------------------------- 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 f = function() return function() end end local t = { nil, [false] = 'Lua 5.1', [true] = 'Lua 5.2', [1/'-0'] = 'Lua 5.3', [1] = 'LuaJIT' } local version = t[1] or t[1/0] or t[f()==f()] print(version) --[[ 网上大神根据lua 各个版本的特性写的 通过判断 每个版本的table实现和function 实现的不同 来获得运行的lua 版本 ]]
newTable = {} table.insert(newTable,"first") table.insert(newTable,"second") table.insert(newTable,"third") -- 求长度 print(#newTable) -- 跳着插入 newTable[5] = "fourth" print(newTable[9]) -- 求长度 print(#newTable)
--- RectSegmentBuilder --- Builder Pattern constructor for a RectSegment local RectSegment = require(script.Parent.RectSegment) local root = script.Parent.Parent local Builder = require(root.Builder) local util = root.Util local t = require(util.t) local RectSegmentBuilder = { ClassName = "RectSegmentBuilder"; } ...
--- @module ChooseOccUI 选择枪械的UI控制 --- @copyright Lilith Games, Avatar Team --- @author Sharif Ma local ChooseOccUI, this = ModuleUtil.New('ChooseOccUI', ClientBase) local defaultId = 1001 local showPnlBtnRotateSpeed = 5 local selectColor = Color(93, 53, 35, 255) local noSelectColor = Color(255, 255, 255, 255) local se...
if settings.startup["enable-loaderhaul"].value == true and mods["miniloader"] and mods["deadlock-beltboxes-loaders"] and settings.startup["deadlock-enable-loaders"].value == true then local function createPlatform(prefix, filter, mask_tint) local function name() if prefix == nil and filter == fa...
date = "Today is 17/7/1991" d = string.match(date, "%d+/%d+/%d+") print(d)
function BiteLeap:GetMeleeBase() return 0.7, 1 end
local App = script:FindFirstAncestor("App") local UIBlox = App.Parent local Core = UIBlox.Core local Packages = UIBlox.Parent local t = require(Packages.t) local Roact = require(Packages.Roact) local Cryo = require(Packages.Cryo) local Dictionary = Cryo.Dictionary local List = Cryo.List local Images = require(App.Ima...
local config = {} config.areaID = 1000 config.db = { STDictDBMgr = {ip = "127.0.0.1", port = 3306, db = "dict", user = "root", pwd = "123456"}, STInfoDBMgr = {ip = "127.0.0.1", port = 3306, db = "info", user = "root", pwd = "123456"}, STLogDBMgr = {ip = "127.0.0.1", port = 3306, db = "log", us...
qui_hyang = { use = async(function(player) local t = {graphic = convertGraphic(309, "item"), color = 0} player.npcGraphic = t.graphic player.npcColor = t.color player.dialogType = 0 if player.warpOut == 0 then player:sendMinitext("Unable to warp out.") return end if player.state == 1 then pla...
local math = require("math") local error, type = error, type local luasimplex = require("luasimplex") local abs = math.abs -- Constants ------------------------------------------------------------------- local TOLERANCE: number = 1e-7 local NONBASIC_LOWER: integer = 1 local NONBASIC_UPPER: integer = -1 local NONBASI...
return function() local Reducers = script.Parent.Parent.Reducers local DevConsoleReducer = require(Reducers.DevConsoleReducer) local DevConsoleDisplayOptions = require(Reducers.DevConsoleDisplayOptions) local MainView = require(Reducers.MainView) local MemoryData = require(Reducers.MemoryData) local NetworkData...
--!A cross-platform build utility based on Lua -- -- 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...
package("mem") set_kind("library", {headeronly = true}) set_homepage("https://github.com/0x1F9F1/mem") set_description("A collection of C++11 headers useful for reverse engineering") add_urls("https://github.com/0x1F9F1/mem/archive/refs/tags/$(version).tar.gz", "https://github.com/0x1F9F1...
--[[ License : GLPv3, see LICENCE in root of repository Authors : Nikolay Fiykov, v1 --]] wifi = {} wifi.__index = wifi wifi.NULLMODE = 0 wifi.STATION = 1 wifi.SOFTAP = 2 wifi.STATIONAP = 3 wifi.OPEN = 14 wifi.WPA_PSK = 15 wifi.WPA2_PSK = 16 wifi.WPA_WPA2_PSK = 17 wifi.wifiModeEnum = {wifi.STATION, wifi.SOFTAP, wif...
--- @class Joystick Joystick = GameObject:extend() --- @field working boolean --- @field stickSize int --- @field sw number --- @field sh number --- @field changeRange number --- @field relative boolean --- @field resetPosition func function Joystick:new() self.working=false self.stickSize=30 self.sw,self.sh = l...
return require("lapis.db.model")
-- -- Please see the license.html file included with this distribution for -- attribution and copyright information. -- function onInit() local node = getDatabaseNode(); if node then node.createChild("level0"); node.createChild("level1"); node.createChild("level2"); node.createChild("level3"); ...
-- Colorscheme local c = { "{{ CS_TERM[0] }}", "{{ CS_TERM[1] }}", "{{ CS_TERM[2] }}", "{{ CS_TERM[3] }}", "{{ CS_TERM[4] }}", "{{ CS_TERM[5] }}", "{{ CS_TERM[6] }}", "{{ CS_TERM[7] }}", "{{ CS_TERM[8] }}", "{{ CS_TERM[9] }}", "{{ CS_TERM[10] }}", "{{ CS_TERM[11] }}", ...
object_tangible_tcg_series3_greeter_deed_battle_droid = object_tangible_tcg_series3_shared_greeter_deed_battle_droid:new { } ObjectTemplates:addTemplate(object_tangible_tcg_series3_greeter_deed_battle_droid, "object/tangible/tcg/series3/greeter_deed_battle_droid.iff")
local M = {} local telescope_mapper = require "rb.telescope.mappings" function M.set(client) local opts = {noremap = true, silent = true} -- install servers vim.api.nvim_set_keymap('n', '<leader>lsp', "<cmd>lua require('rb.lsp.install_servers').lsp_install_servers()<CR>", opts) -- gives definition & referenc...
factory.require("machines/crafting") factory.require("machines/belt") factory.require("machines/ind_furnace") factory.require("machines/ind_squeezer") factory.require("machines/wire_drawer") factory.require("machines/grinder") factory.require("machines/stp") factory.require("machines/swapper") factory.require("machines...
local settings = {} local buttons_tbl = {} buttons_tbl[1] = { x = nil, y = nil, z = nil, width = nil, height = nil, function action() end, } function settings.draw() end function settings.update(dt) end return settings
HedgewarsScriptLoad("/Scripts/Locale.lua") local player = nil local enemy = nil function onGameInit() Map = "Castle" Theme = "Nature" Seed = 0 GameFlags = gfInfAttack TurnTime = 45 * 1000 CaseFreq = 0 MinesNum = 0 Explosives = 0 AddTeam(loc("Hero Team"), 14483456, "Simple", "Island", "Default", "Hedgewar...
local STP = require("StackTracePlus") local Page = {} local function bla() error("oops") end local function foo() bla() end Page.render = foo function main() local p = {} setmetatable(p, { __index = Page }) local x = "render" p[x]() end xpcall(main, function() print(STP.stacktrace()) end)
function Chatbox:OnResolutionChanged(new_width, new_height) Theme.set_option('chatbox_width', new_width * 0.375) Theme.set_option('chatbox_height', new_height * 0.45) Theme.set_option('chatbox_x', math.scale(8)) Theme.set_option('chatbox_y', new_height - Theme.get_option('chatbox_height') - math.scale(64)) lo...
-- Rewrite this file however you please to style it for your theme. -- The actor names are are used to find and control certain actors. -- If you leave out the actors for "max_offset", then the user will have no -- buttons for "max_offset", but everything will still work fine. -- So leave out any parts you don't want b...
local args = { ... } local ui = args[1] assert(ui, 'Imevul UI library not found') local gfx = ui.lib.cobalt.graphics ---@class Button : Text Builds on top of the Text class, but also draws an outline and provides an onClick event ---@field public color string Text color of the button ---@field public background string...
local ffi = require("ffi") -- without this we get errors such as "attempt to redefine XXX" local old_cdef = ffi.cdef local exists = {} ffi.cdef = function(def) if exists[def] then return end exists[def] = true return old_cdef(def) end local old_udp = ngx.socket.udp ngx.socket.udp = function(...) local s...
--- === Quitter === -- -- Quits configured apps if they have not been used since a specified amount of time. local obj = {} obj.__index = obj -- Metadata obj.name = "Quitter" obj.version = "0.1" obj.author = "Alpha Chen <alpha@kejadlen.dev>" obj.license = "MIT - https://opensource.org/licenses/MIT" obj.logger = hs....
local Point = {} function Point:new(x, y, z) local point = {} point.x = x point.y = y point.z = z return point end return Point
MarketMaxAmount = 2000 MarketMaxAmountStackable = 64000 MarketMaxPrice = 999999999 MarketMaxOffers = 100 MarketAction = {Buy = 0, Sell = 1} MarketRequest = {MyOffers = 0xFFFE, MyHistory = 0xFFFF} MarketOfferState = { Active = 0, Cancelled = 1, Expired = 2, Accepted = 3, AcceptedEx = 255 } Market...
return function() local lastCalls = {} return { callback = function(...) table.insert(lastCalls, { ... }) end, getNumberOfCalls = function() return #lastCalls end, expectToBeCalledWith = function(...) local lastCall = lastCalls[#lastCalls] assert(lastCall, "was never called") local expectedP...
--3L·MyonMyonMyon local m=37564842 local cm=_G["c"..m] if not pcall(function() require("expansions/script/c37564765") end) then require("script/c37564765") end cm.named_with_myon=3 function cm.initial_effect(c) c:SetUniqueOnField(1,0,m) senya.leff(c,m) c:EnableReviveLimit() local e1=Effect.CreateEffect(c) e1:SetTy...
--- 过滤器:单字在先 function single_char_first_filter(input) local l = {} for cand in input:iter() do if (utf8.len(cand.text) == 1) then yield(cand) else table.insert(l, cand) end end for cand in ipairs(l) do yield(cand) end end --- 计算器 --- @KyleBing...
local languages = require("tabset.config").get_languages_config() local defaults = require("tabset.config").get_defaults() local logic = {} function logic.set_settings() local tabwidth = defaults.tabwidth local expandtab = defaults.expandtab if languages[vim.o.filetype] ~= nil then tabwidth = languages[vim.o.fi...
imgui.SetNextWindowPos(0, 0) imgui.SetNextWindowSize(500,400) if imgui.Begin("Test", nil, { "NoTitleBar", "NoResize", "NoMove", "NoBringToFrontOnFocus" }) then imgui.End() end
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf" module('BseArrangeList_pb', package.seeall) local BSEARRANGELIST = protobuf.Descriptor(); local BSEARRANGELIST_TOTALNUM_FIELD = protobuf.FieldDescriptor(); local BSEARRANGELIST_ARRINFO_FIELD = protobuf.FieldDescriptor(); BSEARRANGELIST_TO...
return { tllmlv = { acceleration = 0.071, activatewhenbuilt = true, brakerate = 1.65, buildcostenergy = 960, buildcostmetal = 206, builddistance = 96, builder = true, buildpic = "tllmlv.dds", buildtime = 3921, canassist = true, canbeassisted = true, canguard = true, canmove = tr...
--priority.lua local ipairs = ipairs local FAIL = luabt.FAIL local SUCCESS = luabt.SUCCESS local node_execute = luabt.node_execute local PriorityNode = class() function PriorityNode:__init(...) self.name = "priority" self.children = {...} end function PriorityNode:run(btree, node_data...
local util = require('pretty-fold.util') local v = vim.v local bo = vim.bo local opt = vim.opt local fn = vim.fn local M = {} ---@param config? table ---@return string content modified first nonblank line of the folded region function M.content(config) ---The content of the 'content' section. ---@type string ...
data:extend( { { type = "technology", name = "fluid-handling", icon = "__Engineersvsenvironmentalist__/graphics/icons/storage/heavy-oil-barrel.png", prerequisites = {"oil-processing"}, effects = { { type = "unlock-recipe", recipe = "small-pump" }, { ...
local class = require 'middleclass' local Vector = class('Vector') function Vector:initialize(x, y) self.x = x or 0 self.y = y or 0 end function Vector.__add(v1, v2) return Vector(v1.x + v2.x, v1.y + v2.y) end function Vector.__sub(v1, v2) return Vector(v1.x - v2.x, v1.y - v2.y) end function Vector:__unm()...
local _, ns = ... local oUF = ns.oUF or oUF assert(oUF, 'oUF not loaded') local IsInInstance = IsInInstance local UnitCanAttack = UnitCanAttack local UpdateTarget = function(self) local _, instanceType = IsInInstance(); local targetIcon = self.ArenaTargetIcon if instanceType == 'arena' then local ID = self.unit...
-- create node Not require "moon.sg" local node = moon.sg.new_node("sg_not") if node then node:set_pos(moon.mouse.get_position()) end
------------------------------------------ -- Effortless wmii-style dynamic tagging. ------------------------------------------ -- Lucas de Vries <lucas@glacicle.org> -- Licensed under the WTFPL version 2 -- * http://sam.zoy.org/wtfpl/COPYING ----------------------------------------- -- Cut version ------------------...
local vmath = {} function vmath.vec(x, y) return {x, y} end function vmath.add(a, b) return {a[1] + b[1], a[2] + b[2]} end function vmath.sub(a, b) return {a[1] - b[1], a[2] - b[2]} end function vmath.mul(a, s) return {a[1] * s, a[2] * s} end function vmath.copy(v) return {v[1], v[2]} end func...
--- Discord message snowflake definition. -- Dependencies: `snowflakes`, `reaction`, `novus.api`, `novus.cache`, `novus.cache.view` -- @module snowflakes.message -- @alias message --imports-- local api = require"novus.api" local util = require"novus.snowflakes.helpers" local cache = require"novus.cache" local snowf...
object_tangible_deed_player_house_deed_jedi_house_deed = object_tangible_deed_player_house_deed_shared_jedi_house_deed:new { } ObjectTemplates:addTemplate(object_tangible_deed_player_house_deed_jedi_house_deed, "object/tangible/deed/player_house_deed/jedi_house_deed.iff")
-- 流量控制脚本, 设置一个TTL = 1的HASH对象, 有2个entry, 分别是当前请求次数current和当前最大请求次数max; -- 当current + 1 > max时则返回0, 当HASH对象不存在或者current + 1 <= max时返回1; -- 参数: ARGV[1]:服务名; ARGV[2]: qps -- 返回0表示达到限流, 返回1表示OK local servId = ARGV[1] if nil == servId then servId = "global" end local HASH_KEY = "goate:ratelimiter:" .. ARGV[1] local...
local helper = require("suball.lib.testlib.helper") local suball = helper.require("suball") describe("suball", function() it("can substitute various cases strings with keeping them cases", function() helper.set_lines([[ TEST_CASE test_case test-case TestCase testCase]]) local key = ":%" .. suball.map("test_...
object_tangible_terminal_planning_table_keren_imp = object_tangible_terminal_shared_planning_table_keren_imp:new { } ObjectTemplates:addTemplate(object_tangible_terminal_planning_table_keren_imp, "object/tangible/terminal/planning_table_keren_imp.iff")
---- Test/gimmick lang -- Not an example of how you should translate something. See english.lua for that. local L = LANG.CreateLanguage("Swedish chef") local gsub = string.gsub local function Borkify(word) local b = string.byte(word:sub(1, 1)) if b > 64 and b < 91 then return "Bork" end ...