content
stringlengths
5
1.05M
-- enable termguicolors vim.opt.termguicolors = true
-- Assumes that spaceno has a TREE int32 (NUM) or int64 (NUM64) primary key -- inserts a tuple after getting the next value of the -- primary key and returns it back to the user function box.auto_increment(spaceno, ...) spaceno = tonumber(spaceno) local max_tuple = box.space[spaceno].index[0].idx:max() loca...
-- PLAYER derives from CREATURE -- this file is basically all controls stuff local CREATURE = require("classes.entities.CREATURE") local PLAYER = CREATURE:derive('PLAYER') local Vector2 = require('lib.Vector2') function PLAYER:PLAYER_init(arg) self.hp = arg.hp self.player_num = self.form.player_num -- slop...
-- ======= Copyright (c) 2003-2011, Unknown Worlds Entertainment, Inc. All rights reserved. ======= -- -- lua\TargetCache.lua -- -- Created by: Mats Olsson (mats.olsson@matsotech.se) -- -- Allows for fast target selection for AI units such as hydras and sentries. -- -- Gains most of its speed by using the fact tha...
slot0 = class("Mail", import(".BaseVO")) slot0.ATTACHMENT_NONE = 0 slot0.ATTACHMENT_EXIST = 1 slot0.ATTACHMENT_TAKEN = 2 slot0.Ctor = function (slot0, slot1) slot0.id = slot1.id slot0.date = slot1.date slot0.title = string.split(HXSet.hxLan(slot1.title), "||")[1] slot0.sender = (#string.split(HXSet.hxLan(slot1.tit...
#!/usr/bin/env luajit local constants = require "kong.constants" local logger = require "kong.cli.utils.logger" local utils = require "kong.tools.utils" local config_loader = require "kong.tools.config_loader" local Serf = require "kong.cli.services.serf" local lapp = require("lapp") local args = lapp(string.format([[...
local awful = require('awful') local wibox = require('wibox') local gears = require('gears') local watch = awful.widget.watch local dpi = require('beautiful').xresources.apply_dpi local clickable_container = require('widget.airplane-mode.clickable-container') local config_dir = gears.filesystem.get_configuration_dir() ...
---------------------------------------------------------------------- -- This script implements a test procedure, to report accuracy -- on the test data. Nothing fancy here... -- -- Clement Farabet ---------------------------------------------------------------------- require 'torch' -- torch --require 'xlua' --...
local mjlib = require "mjlib" local utils = require "utils" local tips_lib = require "tipslib" function test_fail() local cards = { 1,1,1,0,0,0,2,0,0, 0,0,0,0,2,0,0,0,0, 0,0,0,0,1,2,2,1,0 } local result = true if mjlib._check_hu(cards) == result then print("test_fail 测试...
AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) include( "shared.lua" ) function SWEP:Fail( ) -- Fail in handcuffing. self.Target = nil self:SetNWInt( "FinishHandcuffingTime", 0 ) end function SWEP:Success( ) -- Succeed in handcuffing. self.Target:Give( "eps_handcuffed" ) self.Target = nil self:SetNWI...
concurrent = require 'concurrent' concurrent.setoption('trapexit', true) function ping(pid) concurrent.register('ping', concurrent.self()) concurrent.link(pid) while true do concurrent.send(pid, { from = { 'ping', 'ping@localhost' }, body = 'ping' }) print('ping sent message to...
local M = {} M.__index = M local private = {} local dir = (...):gsub('.[^%.]+$', '') local ObjParser = require(dir..'.obj_parser') require(dir..'.model_builder').inject(M) local new_mesh = love.graphics.newMesh M.mesh_format = { { 'VertexPosition', 'float', 3 }, { 'VertexTexCoord', 'float', 2 }, { 'VertexNorm...
-- TODO: add default configurations local config = {} -- default config config.default = { verbose = false, } return config
local AddonName, AddonTable = ... AddonTable.inscription = { -- Inks 173059, 173058, 175970, -- Optional Reagents 173161, 173160, 173162, 173163, -- Books and Scrolls 173048, 173049, 173065, -- Contracts 173062, 173051, 175924, 173053, -- Cards...
-- This file is automatically generated, do not edit! -- Item data (c) Grinding Gear Games local itemBases = ... itemBases["Iron Greaves"] = { type = "Boots", subType = "Armour", socketLimit = 4, tags = { default = true, armour = true, boots = true, str_armour = true, }, armour = { ArmourBase = 6, }, req = { st...
CATEGORY_NAME = "Chat" ------------------------------ tgag ------------------------------ function ulx.tgag( calling_ply, target_plys, minutes, should_ungag ) local players = player.GetAll() for i=1, #target_plys do local v = target_plys[ i ] if should_ungag then v.ulx_tgagged = nil v:SetNWBool("ulx_gagged"...
------------------------------------------------------------------------------- -- Hook library ------------------------------------------------------------------------------- --- Deals with hooks -- @shared local hook_library, _ = SF.Libraries.Register( "hook" ) local registered_instances = {} --- Sets a hook functi...
local p = require('pretty-print').prettyPrint local Object = { name = "Play", usage = "play url or a search for youtube music", cmdNames = {'play','ply','paly','plya','pley','p'}, dependsOnMod = "YoutubeHelper" } function Object.callback(self,args,rawarg) if self.dependsOnMod then if not _G[self.dependsOnMod]...
local streak = nil local titleLabel = nil local subtitleLabel = nil local s = CCDirector:sharedDirector():getWinSize() local scheduler = CCDirector:sharedDirector():getScheduler() local firstTick = nil local function modeCallback(sender) fastMode = streak:isFastMode() if fastMode == true then strea...
return _csharp_getType("io.LuaFileInfo");
workspace "AdakiteEngine" architecture "x64" startproject "Sandbox" configurations{ "Debug", "Release", "Dist" } outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" project "AdakiteEngine" location "AdakiteEngine" kind "SharedLib" language "C++" targetdir ("bin/" .. outputdir .. "/%{...
--------------------------------------------------------------------------- --- Modified Prompt module. -- @author Julien Danjou <julien@danjou.info> -- @copyright 2008 Julien Danjou --------------------------------------------------------------------------- local akey = require("awful.key") local keygrabber = r...
sounds = {} function getSounds(loc) if loc:IsA("Sound") then table.insert(sounds,loc) end for _,obj in pairs(loc:GetChildren()) do getSounds(obj) end end getSounds(game) game.DescendantAdded:connect(function(obj) if obj:IsA("Sound") then table.insert(sounds,obj) end end) while wait(0.2) do for _,sound in pairs(soun...
--[[ Syntax highlighter for shell script code. Author: Peter Odding <peter@peterodding.com> Last Change: September 30, 2011 URL: http://peterodding.com/code/lua/lxsh/ ]] local lxsh = require 'lxsh' return lxsh.highlighters.new { lexer = lxsh.lexers.sh, aliases = { variable = 'constant', command = '...
file_magic = { { type = "XLW", id = 1, category = " Office Documents", rev = 1, magic = { { content = "| 09 08 10 00 00 06 05 00 |",offset = 512 } } }, { type = "POSIX_TAR", id = 2, category = "Archive", rev = 1, magic = { { content = "| 75 73 74 61 72 00 20 20 |",offset = 257 } } }, { type =...
-- We will initialize the config stuff here -- Shared includes AddCSLuaFile("sh_additional_taunts.lua") include("sh_additional_taunts.lua") -- Server includes if SERVER then include("server/sv_phkleiner_config.lua") include("server/sv_phhotel_config.lua") include("server/sv_devilball_additions.lua") include(...
--[[ *** StableSnapshot *** Written by : echomap --]] local L = LibStub("AceLocale-3.0"):GetLocale("StableSnapshot", false) --TEST FUNCTIONS function StableSnapshot:CountBySpecial() StableSnapshot:DebugMessage("CountBySpecial: Called") countBySpecialDB = {} petListDB = {} countarr = StableSnapshot:CountByFa...
local configs = require 'lspconfig/configs' local util = require 'lspconfig/util' local server_name = 'pyright' local bin_name = 'pyright-langserver' if vim.fn.has 'win32' == 1 then bin_name = bin_name .. '.cmd' end local root_files = { 'setup.py', 'pyproject.toml', 'setup.cfg', 'requirements.txt', '.git'...
-- -------------------- -- TellMeWhen -- Originally by Nephthys of Hyjal <lieandswell@yahoo.com> -- Other contributions by: -- Sweetmms of Blackrock, Oozebull of Twisting Nether, Oodyboo of Mug'thol, -- Banjankri of Blackrock, Predeter of Proudmoore, Xenyr of Aszune -- Currently maintained by -- Cybeloras...
-- AnnoyingPopupRemover.lua -- Written by KyrosKrane Sylvanblade (kyros@kyros.info) -- Copyright (c) 2015-2020 KyrosKrane Sylvanblade -- Licensed under the MIT License, as per the included file. -- Addon version: @project-version@ --######################################### --# Description --##########################...
local present, impatient = pcall(require, 'impatient') if present then impatient.enable_profile() end vim.g.mapleader = ' ' require('options') require('colors').init() local fn = vim.fn local install_path = fn.stdpath('data') .. '/site/pack/packer/opt/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then _G....
--Automatically generated by SWGEmu Spawn Tool v0.12 loot editor. fambaa_hide_segment = { minimumLevel = 0, maximumLevel = -1, customObjectName = "", directObjectTemplate = "object/tangible/component/armor/armor_segment_padded_fambaa.iff", craftingValues = { {"armor_special_type",0,0,0}, {"armor_effectiveness...
local Player = game.Players.LocalPlayer local Char = Player.Character if script.Parent.className ~= "HopperBin" then local h = Instance.new("HopperBin", Player.Backpack) h.Name = "Lazers" script.Parent = h end local bin = script.Parent a=false cam=nil function onSelected(mouse) mouse.Button1Down:c...
----------------------------- -- Invisible Air -- ----------------------------- artoria_strike_air = class({}) function artoria_strike_air:OnSpellStart() local caster = self:GetCaster() local target = self:GetCursorTarget() local point = self:GetCursorPosition() + (caster:GetForwardVector() * 1) if target ...
--[[ Mod Xpro para Minetest Copyright (C) 2018 BrunoMine (https://github.com/BrunoMine) Recebeste uma cópia da GNU Lesser General Public License junto com esse software, se não, veja em <http://www.gnu.org/licenses/>. Eventos de ganho ou perca de XP ao colocar um node ]] -- Lista de itens que geram recomp...
local filterShader local function getFilterShader() if filterShader == nil then local shaderFragStr = VFS.LoadFile("shaders/map_blur_drawing.glsl", nil, VFS.MOD) local shaderTemplate = { fragment = shaderFragStr, uniformInt = { mapTex = 0, pat...
return { name = 'KeyConstant', description = 'All the keys you can press. Note that some keys may not be available on your keyboard or system.', constants = { { name = 'a', description = 'The A key', }, { name = 'b', description = 'The ...
local dt = require "decisiontree._env" -- Interface for all decisionForestTrainers local DFT = torch.class("dt.DecisionForestTrainer", dt) -- Train a DecisionForest with examples, a table of valid featureIds and a dataset (i.e. sortedExamplesByFeatureId) function DFT:train(examples, validFeatureIds, dataset) asser...
local function TestFunction(name) for _, func in ipairs(APIDocumentation.functions) do -- print(func:GetFullName(false, false)) local fullName if func.System.Namespace then fullName = format("%s.%s", func.System.Namespace, func.Name) else fullName = func.Name end if fullName == name then print(Wow...
-- test code for bipartite matching require 'nn' require 'hdf5' import 'matching_loss.lua' cmd = torch.CmdLine() cmd:option('-file' , '../../workspace/model/matching.asc') params = cmd:parse(arg) print(params) method = 'matching' outpath = '../../workspace' outpath = string.format("%s/%s/" , outpath , method) if not p...
return { summary = 'Convert a point from world space to collider space.', description = [[ Converts a point from world coordinates into local coordinates relative to the Collider. ]], arguments = { { name = 'wx', type = 'number', description = 'The x coordinate of the world point.' ...
-- a proper user system -- local lib = {} local dotos = require("dotos") local fs = require("fs") local settings = require("settings") local hash = dofile("/dotos/core/sha256.lua").digest local ucfg = "/.users.cfg" local function ensure() if not fs.exists(ucfg) or not settings.get(ucfg, "admin") then settings...
---@class CS.FairyGUI.MaterialManager ---@field public firstMaterialInFrame boolean ---@type CS.FairyGUI.MaterialManager CS.FairyGUI.MaterialManager = { } ---@param value (fun(obj:CS.UnityEngine.Material):void) function CS.FairyGUI.MaterialManager:add_onCreateNewMaterial(value) end ---@param value (fun(obj:CS.UnityEng...
-- ------------------------------------------------------------------------------ -- File: dwark.lpeg.http.lua -- -- Usage: Used by worker to match http headers -- -- Description: -- -- Options: --- -- Requirements: --- -- Bugs: --- -- Notes: --- -- Author: YOUR NAME (),...
local gfs = require("gears.filesystem") local naughty = require("naughty") local display = true awesome.connect_signal("signal::battery", function(value) if value < 11 then naughty.notification({ title = "Battery Status", text = "Running low at " .. value .. "%", image ...
--[[ This file is part of cvetool. 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/libertine-linux/cvetool/master/COPYRIGHT. No part of cvetool, including this file, may be copied, modified, propagated, or distribute...
local theme={colors={normal={blue={0.4,0.85098039215686,0.93725490196078,1},green={0.65098039215686,0.88627450980392,0.18039215686275,1},cyan={0.63137254901961,0.93725490196078,0.89411764705882,1},white={0.97254901960784,0.97254901960784,0.94901960784314,1},red={0.97647058823529,0.14901960784314,0.44705882352941,1},mag...
cc = cc or {} ---CCBReader object ---@class CCBReader : Ref local CCBReader = {} cc.CCBReader = CCBReader -------------------------------- -- ---@param name string ---@return CCBReader function CCBReader:addOwnerOutletName(name) end -------------------------------- -- ---@return array_table function CCBReader:getOwne...
--[[ 闪光 ]] local THIS_MODULE = ... local FlashLight = class("FlashLight", require("app.main.modules.ui.FrameBase")) --[[ 构造函数 config params 额外参数 name 名称 csb csb文件 widgets 组件表 bindings 绑定表 ]] function FlashLight:ctor(config) self:setup(config) self:retain() end -- 析构函数 function FlashLight:dtor() ...
return {'nomade','nomaden','nomadenbestaan','nomadenleven','nomadenstam','nomadentent','nomadenvolk','nomadisch','nomadisme','nomen','nomenclatuur','nominaal','nominalisme','nominalist','nominalistisch','nominatie','nominatief','nomineren','nomografie','nomogram','nomothetisch','nomadencultuur','nominatielijst','nomina...
modifier_neutral_champion = class({}) function modifier_neutral_champion:IsPurgable() return false end function modifier_neutral_champion:DeclareFunctions() return {MODIFIER_PROPERTY_TOOLTIP} end function modifier_neutral_champion:OnTooltip() return self:GetStackCount() end function modifier_neutral_champion:Get...
-- trim a string. function trim(s) return s:match'^%s*(.*%S)' or '' end --- -- Splits a string on the given pattern, returned as a table of the delimited strings. -- @param str the string to parse through -- @param pat the pattern/delimiter to look for in str -- @return a table of the delimited strings. If pat is em...
module(..., package.seeall) -- This module implements a level 7 firewall app that consumes the result -- of DPI scanning done by l7spy. -- -- The firewall rules are a table mapping protocol names to either -- * a simple action ("drop", "reject", "accept") -- * a pfmatch expression local bit = require("bit") ...
function permgen(a, n) if n == 0 then coroutine.yield(a) else for i = 1, n do a[n], a[i] = a[i], a[n] permgen(a, n - 1) a[n], a[i] = a[i], a[n] end end end function printResult(a) for i, v in ipairs(a) do io.write(v, " ") end io...
local ov_functions = {} ov_functions.disable_technology = function (technology) -- disable technology (may be a table containing a list of technologies) if type(technology) == "table" then for tk, tech in pairs(technology) do data.raw["technology"][tech].enabled = false end else data.raw["technology"][techn...
local TAB_NAME = table.remove(KEYS, 1) local to_return = {} for i=1, #KEYS, 2 do local key, increment = KEYS[i], tonumber(KEYS[i + 1]) local value = redis.call('hincrby', TAB_NAME, key, increment) table.insert(to_return, value) local has_a_listener = (redis.call('hget', 'shl-' .. TAB_NAME, key) == tos...
local ffi = require("ffi") local C = ffi.C local FontMonger = require("FontMonger") local GraphicGroup = require("GraphicGroup") local Gradient = require("Gradient") local GFontFaceIcon = {} ---[[ setmetatable(GFontFaceIcon, { __index = GraphicGroup }) --]] local GFontFaceIcon_mt = { __index = GFontFaceIcon...
-- Make such a thing minetest.register_tool("durapick:bronze_pick", { description = "Durable Bronze Pickaxe", inventory_image = "durapick_bronze.png", tool_capabilities = { full_punch_interval = 1.0, max_drop_level=1, groupcaps={ cracky = {times={[1]=4.50, [2]=1.80, [3]=0.90}, uses=(durapick_durabi...
local make_grid = require 'grid.grid' local type, math_random = type, math.random local make_sidewinder_gen do local step = function(self) local x, y, grid = self._x, self._y, self._grid if y ~= 0 then if math.random(0, 1) == 0 and x ~= self._w - 1 then self._grid:setr(x, y, false) else ...
local Native = {} --@remove@ ---@param i integer ---@return race function Native.ConvertRace(i) end ---@param i integer ---@return alliancetype function Native.ConvertAllianceType(i) end ---@param i integer ---@return racepreference function Native.ConvertRacePref(i) end ---@param i integer ---@return igamestate ...
require("awful.autofocus") awful = require("awful") awful.rules = require("awful.rules") beautiful = require("beautiful") naughty = require("naughty") -- Simple function to load additional LUA files. function loadrc(name, mod) local success local result -- Which file? In rc/ or in lib/? local path...
function Player:onBrowseField(position) return true end function Player:onLook(thing, position, distance) local utf8 = require("data/lib/utf8") local description = utf8.convert("You see " .. thing:getDescription(distance)) if self:getGroup():getAccess() then if thing:isItem() then description = string.format...
local root = fs.ydwe_devpath() local w3xparser = require 'w3xparser' local mpq = root / 'share' / 'zh-CN' / 'mpq' local info = load(io.load(root / 'plugin' / 'w3x2lni' / 'script' / 'core' / 'info.lua'))() local typedefine = { aibuffer = 3, armortype = 3, attackbits = 0, attacktype...
return { tllwin = { activatewhenbuilt = true, buildangle = 8192, buildcostenergy = 134, buildcostmetal = 48, builder = false, buildpic = "tllwin.dds", buildtime = 1500, category = "ALL SURFACE", collisionvolumeoffsets = "0 -3 0", collisionvolumescales = "38 52 38", collisionvolumetype = "box", ...
-------------------------------------------------------------------------- -- GTFO_Recount.lua -------------------------------------------------------------------------- --[[ GTFO & Recount Integration Author: Zensunim of Malygos Change Log: v4.1 - Added Recount Integration v4.6 - Fixed label text ]]-- functi...
MonkTimers_GlobalSettings = nil MonkTimers_Profiles = nil
--ゼアル・アライアンス -- --Script by 龙骑 function c101104209.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(101104209,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetCod...
--- A LuaJIT FFI binding for Telegram's Database Library (TDLib)'s JSON interface. -- @module luajit-tdlib -- @alias tdlib local ffi = require("ffi") local Client = require("luajit-tdlib.Client") local tdlib = {} --- The loaded FFI object of tdlib (clib or nil). -- @local -- @field _clib --- Initializes the TDLib l...
require 'Coat' local string = require 'string' abstract 'Smc.Generator' has.suffix = { is = 'ro', isa = 'string', required = true } has.srcfileBase = { is = 'ro', isa = 'string', required = true } has.targetfileBase = { is = 'ro', isa = 'string', required = true } has.scopeSep = { is = 'ro', is...
-------------------------------------------------------------------------------- -- Function : FTP Upload Demo -- Author : ArisHu(50362) -- Note : This demo use luasocket ftp, this module can only be run -- with Lua interpreter 5.1, so first parameter of lagent.execute -- should be 1 ----------------------------...
insulate("config", function() it("defaults", function() stub(os, "getenv") local config = require("plugins.mtag.config") assert.is_equal(config.controller.hostname, nil) assert.is_equal(config.controller.port, 443) assert.is_equal(config.controller.prefix, "") assert.is_equal(config.controlle...
--[[ The main reducer for the app's store ]] local Root = script.Parent.Parent local CorePackages = game:GetService("CorePackages") local PurchasePromptDeps = require(CorePackages.PurchasePromptDeps) local Rodux = PurchasePromptDeps.Rodux local PromptRequestReducer = require(script.Parent.PromptRequestReducer) local...
-------------- -- Includes -- -------------- #include 'include/internal_events.lua' addEvent('onPlayerChatting', true) addEvent('onClientPlayerChatting', true) ---------------------- -- Global variables -- ---------------------- local WHITE = tocolor(255, 255, 255) local BLACK = tocolor(0, 0, 0) lo...
--# selene: allow(unused_variable) ---@diagnostic disable: unused-local -- Graphical, interactive tool for choosing/searching data -- -- Notes: -- * This module was influenced heavily by Choose, by Steven Degutis (https://github.com/sdegutis/choose) ---@class hs.chooser local M = {} hs.chooser = M -- Get or attach/d...
----------------------- -- Addon and Modules -- ----------------------- local DS = LibStub("AceAddon-3.0"):GetAddon("Doom Shards", true) if not DS then return end local CD = DS:GetModule("display") if not CD then return end local WA = DS:NewModule("weakauras", "AceEvent-3.0") -------------- -- Upvalues -- ----------...
local S = mobs.intllib -- Npc by TenPlus1 mobs.npc_drops = { "default:pick_steel", "mobs:meat", "default:sword_steel", "default:shovel_steel", "farming:bread", "bucket:bucket_water" } mobs:register_mob("mobs_npc:npc", { type = "npc", passive = false, damage = 3, attack_type = "dogfight", attacks_monsters = t...
print(require 'lib.skill_manager':new():get("test1").text)
#!/usr/bin/lua local nkey = "slow" local mode = "time" do local i = 1 while i <= #arg do if arg[i] == "--fast" then nkey = "fast" elseif arg[i] == "--medium" then nkey = "medium" elseif arg[i] == "--slow" then nkey = "slow" elseif arg[i] == "--time" then mode = "time" ...
-- @Author:pandayu -- @Version:1.0 -- @DateTime:2018-09-09 -- @Project:pandaCardServer CardGame -- @Contact: QQ:815099602 local model = require "game.model.role_model" local CCommander = require "game.model.role.commander" local commander_config = require "game.template.commander" local _M = model:extends() _M.class =...
--[[ Carbon for Lua #class Collections.Tuple #inherits OOP.Object #description { A disposable List object for quick vararg transformations. } ]] local Carbon, self = ... local OOP = Carbon.OOP local vunpack = unpack local unpack if (Carbon.Support.jit and jit.status()) then unpack = Carbon.Unpack else unpac...
--[[ ==================================================================== Licensed under the MIT license -------------------------------------------------------------------- More information on the license at https://github.com/0aoq/RobloxScriptUtility/blob/main/LICENSE ===============================================...
local ffi = require("ffi") local C = ffi.C local blapi = require("blend2d") local function addStops(gradient, stops) if not stops then return false end for _,stop in ipairs(stops) do if stop.uint32 then gradient:addStopRgba32(stop.offset, stop.uint32) elseif stop.obj == BLRgba32...
testfiledir = "./test/testfiles-bibunits" testsuppdir = testfiledir .. "/support" checkruns = 3 function runtest_tasks(name) return "bibtex -terse bu1; bibtex -terse bu2" end
--[[ Created by Grid2 original authors, modified by Michael ]]-- local Grid2 = Grid2 local Grid2Frame = Grid2Frame local min = min local max = max local pairs = pairs local ipairs = ipairs local AlignPoints = Grid2.AlignPoints local SetSizeMethods = { HORIZONTAL = "SetWidth", VERTICAL = "SetHeight" } local GetSizeMet...
local nvim_lsp = require('lspconfig') -- Map keys only after attach local on_attach = function(_, bufnr) -- Set omnifunc vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') -- Set key mapping local opts = { noremap=true, silent=true } local function buf_set_keymap(...) vim.api.nvim_buf_set_k...
-- Portefeuille require("math/math") Portefeuillef={} function Portefeuillef.GetVect(self,vect) local counti = 1 local luaVect = {} local tiVect = "[" string.gsub(vect, "([^,]*),*", function(val) if tiNspire.toNumber(val)~=nil then luaVect[counti]=val if counti~=1 then tiVect=tiVe...
local DEBUG_MOVEMENT = GetConVar("rsnb_debug_movement") function ENT:MovementInaccessableInit() self.inaccessable_data = {} end function ENT:GetCnavInaccessableData( cnav ) if not IsValid( cnav ) then return nil end local data = self.inaccessable_data[tostring(cnav:GetID())] return data end function ENT...
return [[da dab dabbed dabber dabbers dabbing dabble dabbled dabbler dabblers dabbles dabbling dabblingly dabblings dabchick dabchicks dabs dabster dabsters dace daces dacha dachas dachshund dachshunds dacite dacker dackered dackering dackers dacoit dacoitage dacoitages dacoities dacoits dacoity dactyl dactylar dactyli...
local nightfox = require('nightfox') local opt = vim.opt local augroup = require('vim_ext').augroup nightfox.setup({ fox = 'nightfox', transparent = false, alt_nc = true, terminal_colors = true, styles = { comments = 'italic', keywords = 'bold', }, inverse = { visual = false, }, hlgroups ...
--Copyright: https://github.com/coolsnowwolf/luci/tree/master/applications/luci-app-cpufreq --Planner: https://github.com/unifreq/openwrt_packit --Extended support: https://github.com/ophub/luci-app-amlogic --Function: Support multi-core local mp --Remove the spaces in the string function trim(str) --return (string....
----------------------------------- -- Ability: Ancient Circle -- Grants resistance, defense, and attack against dragons to party members within the area of effect. -- Obtained: Dragoon Level 5 -- Recast Time: 5:00 -- Duration: 03:00 ----------------------------------- require("scripts/globals/settings") require("scrip...
-- A mpris music widget using playerctl -- Imports local awful = require("awful") local wibox = require("wibox") local utils = require("lib.utils") -- Locals local dpi = require("beautiful.xresources").apply_dpi -- Code function spawn_widget(tbl) widget = wibox({ screen = tbl.screen, visible = t...
-- Copyright (C) by qlee local ffi = require "ffi" local ffi_new = ffi.new local ffi_gc = ffi.gc local ffi_str = ffi.string local C = ffi.C local setmetatable = setmetatable local _M = { _VERSION = '1.0' } local mt = { __index = _M } ffi.cdef[[ typedef struct engine_st ENGINE; typedef struct env_md_ctx_st EVP_MD...
package.path = package.path .. ";tests/?.lua" local testlib = require("testlib") local alphabet_str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" local alphabet = {} for i = 1, #alphabet_str do alphabet[i] = alphabet_str:sub(i, i) end local function check_table(db, t) for i,v in ipairs(t) ...
--[[ TheNexusAvenger Implementation of a command. --]] local BaseCommand = require(script.Parent.Parent:WaitForChild("BaseCommand")) local Command = BaseCommand:Extend() --[[ Creates the command. --]] function Command:__new() self:InitializeSuper("mute","BasicCommands","Mutes a set of players. Admins can not b...
function EntityListToTable(entityList) PROFILE("EntityListToTable") assert(entityList ~= nil) local result = {} for _, ent in ientitylist( entityList ) do if ent ~= nil then result[#result+1] = ent end end return result end function GetEntitiesForTeamTypeW...
RegisterServerEvent("kickForBeingAnAFKDouchebag") AddEventHandler("kickForBeingAnAFKDouchebag", function() DropPlayer(source, "Vous étiez afk.") end)
local Anagram = {} Anagram.__index = Anagram function Anagram:new(str) local self = setmetatable({}, Anagram) self.original = str self.sorted = sortString(str) return self end function Anagram:match(strs) local result = {} for _, str in ipairs(strs) do strToMatch = sortString(str) if...
require "nacl" require "emscripten" solution "platform-web" platforms { "PNaCl" } -- This hack just makes the VS project and also the makefile output their configurations in the idiomatic order if _ACTION == "gmake" then configurations { "Release", "Debug", "DebugOpt" } else configurations { "Debug", "DebugO...
-- entities local entities = __pointers__.entities local p = entities:at(1) print('Container: ' .. tostring(entities)) print('Type: ' .. tostring(p)) print('Pos: ' .. p.pos) p.pos = camera:getPosition() p.vel = vec2.new(0, 0) print('New Pos: ' .. p.pos)