content
stringlengths
5
1.05M
--[[--ldoc desc @module paidiandaxiao_2240_1 @author RonanLuo Date 2018-01-19 15:12:07 Last Modified by RonanLuo Last Modified time 2018-03-01 09:56:06 ]] --[[ 牌点排序 打无主时 牌点大小:大王>小王>黑桃A>级别牌>A>K>Q>J>10>9>8>7>6>5>4>3>2 可跳过牌点相连(例如:级牌=8,7799算连对) ]] local LibBase = import("..base.LibBase") local SortU...
-- // About -- // Base instance functions for the Assembler -- // Variables local TweenService = game:GetService("TweenService") local IXObjectClassModule = {} IXObjectClassModule.__index = IXObjectClassModule IXObjectClassModule.Name = "IXLabelClass" IXObjectClassModule.Aliases = { "TextLabel" } -- // Functions f...
--[[ Skyblock for Minetest Copyright (c) 2015 cornernote, Brett O'Donnell <cornernote@gmail.com> Source Code: https://github.com/cornernote/minetest-skyblock License: GPLv3 ]]-- -- set mapgen to singlenode minetest.register_on_mapgen_init(function(mgparams) minetest.set_mapgen_params({mgname='singlenode', water_le...
-- -- Verify 验签签名处理 -- local _M = {} _M.allowInstall = function () local state = require("suma_main_state"); if state.verify_option.status then return true; end return false; end local dyn_lib = require("suma_basecom_action"); _M.handle = function (body) local key = ngx.ctx.deviceID .. ".chain"; local cache_...
--[[ Copyright (C) 2019 Onset Roleplay Developers: * Logic Contributors: * Blue Mountains GmbH ]]-- -- Variables local colour = ImportPackage('colours') DonationData = {} -- Functions local function CreateDonationData(playerid) DonationData[playerid] = {} DonationData[playerid].level = 0 DonationData[playeri...
iconDir = APPDIR.."icons/logo.png" IsMouseActive = false PaintFrame = createFrame(10, 10, 640, 480, "Графический редактор", "full") PaintFrame:Show() centerElement(PaintFrame) setAppIcon(PaintFrame, iconDir) setColor(PaintFrame, "FFFFFF", "444444") ScrollPane, Scrolling = createScrollPane(71, 0, 640-71, 480-51, ...
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local condition = createConditionObject(CONDITION_HASTE) setConditionParam(condition, CONDITION_PARAM_TICKS, 5000) setConditionFormula(condition, 0.9, -81, 0.9, -8...
object_mobile_beast_master_bm_razor_angler = object_mobile_beast_master_shared_bm_razor_angler:new { } ObjectTemplates:addTemplate(object_mobile_beast_master_bm_razor_angler, "object/mobile/beast_master/bm_razor_angler.iff")
local lfs = require "lfs" local https = require "ssl.https" local ltn12 = require "ltn12" local Util = {} local INVALIDATION_TIME = 60*60 function Util.SortBuild(a, b) local build_a = tonumber(a:match("(%d+)$")) local build_b = tonumber(b:match("(%d+)$")) if build_a ~= build_b then return build_a < build_b end ...
package("libdivsufsort") set_homepage("https://android.googlesource.com/platform/external/libdivsufsort/") set_description("A lightweight suffix array sorting library") add_urls("https://android.googlesource.com/platform/external/libdivsufsort.git") add_versions("2021.2.18", "d6031097d39aabfff1372e9a...
-- -- Table utility functions -- -- See also https://www.hammerspoon.org/docs/hs.fnutils.html -- local tl = {} function tl.print(t) for k, v in pairs(t) do print(k, ':', v) end end tl.show = tl.print function tl.printList(t) for i=1, #t do print(i, ':', t[i]) end end tl.showList = tl.printList fun...
local flyWithLuaStub = require("xplane_fly_with_lua_stub") flyWithLuaStub:suppressLogMessagesContaining( { "A320 NORMAL CHECKLIST using '" } ) require("test_high_level_behaviour") require("test_configuration")
local BaseInstance = import("./BaseInstance") local GuiService = BaseInstance:extend("GuiService") return GuiService
-- Pandoc writer for TikiWiki syntax -- Author: Chat Wacharamanotham -- Based on pandoc example -- Character escaping local function escape(s, in_attribute) return s:gsub("[<>&“”‘’—%\\%[]", function(x) if x == '<' then return '~lt~' elseif x == '>' then return '~gt~' elseif x ==...
local EQUIPMENT = script:FindAncestorByType("Equipment") -- Data for the grenade and explosion local WEAPON_TYPE = script:GetCustomProperty("WeaponType") local PROJECTILE_BODY = script:GetCustomProperty("ProjectileBody") local IMPACT = script:GetCustomProperty("ProjectileImpact") local BOUNCE_SOUND = script:GetCustomP...
local anim8 = require 'pong.vendor.anim8.anim8' local Constants = require 'pong.constants' local Court = require 'pong.court' local Utils = require 'pong.utils' -- A paddle that a player controls local Paddle = {} Paddle.__index = Paddle Paddle.HEIGHT = 128 Paddle.WIDTH = 16 Paddle.SPEED = 256 function Paddle.init...
local array = include( "modules/array" ) local util = include( "modules/util" ) local tooltip_breakice = include( "hud/tooltip_breakice" ) local mathutil = include( "modules/mathutil" ) local hud = include( "hud/hud" ) local cdefs = include( "client_defs" ) local serverdefs = include( "modules/serverdefs" ) loca...
-- Lua code to support BS BL editor
option("is_clang") add_cxxsnippets("is_clang", 'if(__clang__) return 0;', {tryrun = true}) option_end() option("is_msvc") add_cxxsnippets("is_msvc", 'if(_MSC_VER) return 0;', {tryrun = true}) option_end() option("is_unix") add_cxxsnippets("is_unix", 'if(__unix__) return 0;', {tryrun = true}) option_end() op...
return { { effect_list = { { type = "BattleBuffCastSkill", trigger = { "onUpdate" }, arg_list = { target = "TargetSelf", time = 35, skill_id = 12050 } } } }, { effect_list = { { type = "BattleBuffCastSkill", trigger = { "onUpdate" }, arg_lis...
--[[ LuaJIT FFI reflection Library ]]-- --[[ Copyright (C) 2014 Peter Cawley <lua@corsix.org>. All rights reserved. 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 wi...
------------------------------------------------------------------------------- -- wireshark-aun-dissector.lua -- Acorn Universal Networking protocol dissector for WireShark -- (c) Eelco Huininga 2018-2019 ------------------------------------------------------------------------------- aun_types = { [0x01] = "Broadcas...
data:extend( { { type = "repair-tool", name = "multitool-repair-pack", icon = "__More_Repair_Packs__/graphics/items/Multitool-repair-pack.png", icon_size = 63, subgroup = "tool", order = "e", speed = 3, durability = 500, stack_...
--[[ * canvas.lua * * . ]] local wx = require("wx") local trace = require("lib.trace") local rybclr = require("lib.RYBColours") local hsl_con = require("lib.hsl") local _insert = table.insert local _remove = table.remove local _wxColour = rybclr.wxColour local _colours = rybclr.tColours -- ----...
-- Disk Drive local function get_formspec() return "size[8,8.5]".. default.gui_bg.. default.gui_bg_img.. default.gui_slots.. "label[0,0;Disk Drive]".. "list[context;main;1,1;6,1;]".. "list[current_player;main;0,4.25;8,1;]".. "list[current_player;main;0,5.5;8,3;8]".. "listring[context;main]".. "listr...
function getAdmins() local players = exports.pool:getPoolElementsByType("player") local admins = { } local count = 1 for key, value in ipairs(players) do if isPlayerAdmin(value) then admins[count] = value count = count + 1 end end return admins end function isPlayerAdmin(thePlayer) ...
local ESX = nil local timePlay = {} local NewPlayers = {} -- ESX TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) AddEventHandler('esx:playerLoaded', function(source) local _source = source local identifier = GetPlayerIdentifier(_source) timePlay[identifier] = {source = _source, joinTime ...
print(string.byte("G"))
--[[ Project TkJson-Lua Author T1nKeR File TkJson.lua Description A simple JSON library that decodes a JSON string or encodes a Lua value. --]] local TkJson = {} TkJson.ErrorCode = { Ok = 'Decode successfully', ExpectValue = 'Expect a value', InvalidValue = 'Invalid value', RootNotSingul...
local ActiveRecord = require('arken.ActiveRecord') local test = {} test.before = function() ActiveRecord.reset() ActiveRecord.config = "config/active_record_sqlite.json" end test.after = function() ActiveRecord.config = nil end test.should_execute_commit_after_begin = function() ActiveRecord.begin() Active...
if not global.cch then global.cch = {} end function home_cmd(player, args) if not global.cch[player.name] then global.cch[player.name] = {} end if #args == 0 then player.print("Please specify a home") elseif #args == 1 then if global.cch[player.name][args[1]] then local home = global.cch[player.nam...
local Path = require('plenary.path') local M = {} local function merge_table_impl(t1, t2) for k, v in pairs(t2) do if type(v) == 'table' then if type(t1[k]) == 'table' then merge_table_impl(t1[k], v) else t1[k] = v end else ...
local base = { _0 = '#1B2B34'; _1 = '#343D46'; _2 = '#4F5B66'; _3 = '#65737E'; _4 = '#A7ADBA'; _5 = '#C0C5CE'; _6 = '#CDD3DE'; _7 = '#D8DEE9'; _8 = '#EC5f67'; _9 = '#F99157'; _A = '#FAC863'; _B = '#99C794'; _C = '#5FB3B3'; _D = '#6699CC'; _E = '#C594C5'; _F = '#AB7967'; } local white = ...
return { include = function() includedirs { "../vendor/fmtlib/include/" } end, run = function() targetname "fmtlib" language "C++" kind "StaticLib" files { "../vendor/fmtlib/src/**.cc", "../vendor/fmtlib/src/**.h", } end }
-- spec/hello_spec.lua local hello = require('hello') describe('hello lib', function() it('says hello to you', function() assert.equal('Hello you', hello.say('you')) end) end)
local text = create_text_list("default") local town_portal_check = function() -- game fully loaded? if not get_skill(0) then return end local quantity local portal_book = get_skill(220) if portal_book then quantity = portal_book.quantity else quantity = 0 end ...
HUD = {} HUD.Name = "Default" local Font_gear = {} Font_gear.font = "Agency FB" Font_gear.size = (ScrH() * 0.03333333) Font_gear.weight = 200 Font_gear.blursize = 0 Font_gear.scanlines = 0 Font_gear.antialias = true Font_gear.additive = false Font_gear.underline = false Font_gear.italic = false Font_gear.strikeout =...
-------------------------------------------------------------------------------------- -- this file is to test building a planner outside of dota 2 -- -------------------------------------------------------------------------------------- Class = require 'utils/class' require 'planner/elements/Ac...
local local0 = 0.3 local local1 = 1.8 - local0 local local2 = 1.8 - local0 local local3 = 2.9 - local0 local local4 = 1.8 - local0 local local5 = 2.5 - local0 local local6 = 2.5 - local0 local local7 = 1.8 - local0 local local8 = 2.3 - local0 local local9 = 2.5 - local0 local local10 = 5.9 - local0 local local11 = 4 - ...
--[[ Copyright (C) 2019 The DMLab2D Authors. 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writ...
return { Debugger = { PrintDebug = false; -- Wether or not debug messages get printed or not. Format = { TagFormat = "[%s]"; -- What a tag would look like. This is used for [CRITICAL], [Server\Script\...] Format = "%s: %s"; -- How you wanna divide it. ie [TAG] [TAG]: MESSAGE ...
client_script 'nonpcweapondrop.lua'
---------------------------------------------------------------- -- Copyright (c) 2012 Klei Entertainment Inc. -- All Rights Reserved. -- SPY SOCIETY. ---------------------------------------------------------------- local util = include( "client_util" ) local mathutil = include( "modules/mathutil" ) local array = incl...
-- Saw wave. local SoundUnit = require((...):gsub('[^.]*$', '') .. 'soundunit') local function process (t, v) return -v end return function (t) t = SoundUnit(t) t.process = process return t end
local function privatekey(name) return function() return name end end local CEL = {} CEL.privatekey = privatekey CEL._formation = privatekey('_formation') CEL._host = privatekey('_host') CEL._links = privatekey('_links') CEL._next = privatekey('_next') CEL._prev = privatekey('_prev') CEL._trap = privatekey('_trap...
local status_ok, _ = pcall(require, "lspconfig") if not status_ok then return end require("user.lsp.lsp-installer") require("user.lsp.handlers").setup() require("user.lsp.null-ls")
AddCSLuaFile() DEFINE_BASECLASS("emod_base") ENT.Category = "EMod" ENT.Spawnable = true ENT.PrintName = "EMod Solar Panel" ENT.EMODable = true if SERVER then function ENT:Initialize() self:SetModel("models/emod/emod_solar.mdl") self:PhysicsInit(SOLID_VPHYSICS) self:SetMoveType(MOVETYPE_VPHYSICS) self:SetSo...
modifier_onoki_added_weight_allies = class({}) -------------------------------------------------------------------------------- -- Classifications function modifier_onoki_added_weight_allies:IsHidden() return false end function modifier_onoki_added_weight_allies:IsDebuff() return false end function modifier_onoki_...
local a = {} lines = {} local i = 1 a.draw = function() scripts.systems.render.renderText.renderText(lines[i], { x = 200, y = 200 }, 25) end a.next = function() i = i + 1 if lines[i] == "LEVEL HERE" then i = i + 1 GS.pop() end end -- Read story from text file local k = 1 local story ...
local enemypack = ... local battleEnvironment local arf function RebuildBattle() if battleEnvironment then Command.Environment.Destroy(battleEnvironment) battleEnvironment = nil end if arf then Command.Environment.Destroy(arf) arf = nil end battleEnvironment = Command.Environment.Create(...
--[[------------------------------------------------------------------- PluginName: lualine.nvim Github: github.com/hoob3rt/lualine.nvim --]]------------------------------------------------------------------- -- ------------------------------------------------------------------- -- CONFIGS -- ---...
local OpcodeChecks = { MOVE = function(f, i) assert(i.C == 0, "Error: MOVE.C must equal 0") assert(i.A < f.MaxStackSize, "Error: MOVE.A out of bounds") assert(i.B < f.MaxStackSize, "Error: MOVE.B out of bounds") end, LOADK = function(f, i) assert(i.A < f.MaxStackSize, "Error: LOADK.A out of bounds") ...
local race = { ["human"] = { name = "human", home = "Stormwind City", pos_x = 1, pos_y = 2, pos_z = 3, pos_o = 4, }, ["orc"] = { name = "orc", home = "Orgrimmar", pos_x = 5, pos_y = 6, pos_z = 7, pos_o = 8, }, } return race
fx_version 'adamant' game 'rdr3' rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aware my resources *will* become incompatible once RedM ships.' description 'RDX Addon Account' version '1.0.1' server_scripts { '@mysql-async/lib/MySQL.lua', 'server/classes/addonaccount.lua', 'server/...
command.Register("ask", "Ask a question that Mr grape may be able to answer! Uses wolfram alpha.","fun",function(msg, args) local response = msg:reply("Give me a second...") function askquestion() local questionbasic = msg.content:gsub(PREFIX .. "ask ", "") local question = FUNCTIONS.urlencode(questionbasic...
-- @doc-title MD to Lua Pipe API --[[ @doc-overview Lua support for communicating through windows named pipes with an external process, with the help of the winpipe api dll, which wraps select windows OS functions. The external process will be responsible for serving pipes. X4 will act purely as a client. Note: if ...
object_draft_schematic_food_beastfood_fatty_meat_substitute = object_draft_schematic_food_shared_beastfood_fatty_meat_substitute:new { } ObjectTemplates:addTemplate(object_draft_schematic_food_beastfood_fatty_meat_substitute, "object/draft_schematic/food/beastfood_fatty_meat_substitute.iff")
--Necro Maiden Of Macabre function c700016.initial_effect(c) --c:EnableCounterPermit(0x3001) --recicle-GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(700016,0)) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCondition(c700016.condition) ...
local z=z local timer=timer local io=io local naughty=require("naughty") local ipairs=ipairs local table=table local utils=require("z.utils") module("z.network.connections") connections_panel=nil listen_panel=nil tor_panel=nil all_panel=nil established_panel=nil visible=false update_timer=nil config={} config.update_...
#!/usr/bin/env tarantool NAME = require('fio').basename(arg[0], '.lua') fiber = require('fiber') test_run = require('test_run').new() util = require('util') require('console').listen(os.getenv('ADMIN')) cfg = rawget(_G, "cfg") or require('localcfg') log = require('log') if not cfg.shard_index then cfg.shard_index ...
local function playerVehicleEnter(vehicle) -- Set the vehicle's radio station local vehicleRadioStation = getElementData(vehicle, "radioStation", false) if not vehicleRadioStation then setRadioChannel(0) else setRadioChannel(vehicleRadioStation) end end addEventHandler("onClientPlaye...
local AddonName, AddonTable = ... -- [Raid] Karazhan: 10 Normal AddonTable.kara = { 30642, -- Servant's Quarters 30686, 30687, 30684, 30685, 30677, 30675, 30678, 30676, 30681, 30680, 30683, 30682, -- Attumen the Huntsman 30480, 28504, 28509, 28...
local files = require 'files' local vm = require 'vm' local lang = require 'language' local guide = require 'parser.guide' local config = require 'config' local define = require 'proto.define' local await = require 'await' local noder = require 'core.noder' local types = {'getglobal', 'getfie...
-- Magic class -- LGPL Juan Belón Pérez -- videojuegos.ser3d.es -- 2011 Magic = class() function Magic:init(ps) self.ps = ps self.p = {} for i=0,ps do self.p[i]= {x=math.random(WIDTH*10)/10, y=math.random(HEIGHT*10)/10, ox=0.0, oy=0.0, vx=math.random(20)-10, vy=math.random(20)-10} end self.color = color(223, 255, 0, ...
--[[ New SHODAN design. Primary dataloop: - map network including running tasks - annotate map entries with: - desired tasks - tasks in progress (from the ps of other nodes) - priority level - generate ordered task queue and unordered thread queue from network map - assign tasks, keeping track of the one that's m...
-- language specific higlights local lush = require("lush") local base = require("apprentice.base") local styles = require("apprentice.settings").styles local table_concat = table.concat local M = {} M = lush(function() return { htmlTag {base.ApprenticeAquaBold}, htmlEndTag {base.ApprenticeAquaBold}, ht...
local timer = 0 local UPDATE_INTERVAL = 60 local CHECK_BUFF_MIN_MINUTES = 10 local buffMap = {} local addonName = "ShowMyTime" local onEvent = {} local frame = CreateFrame("Frame", addonName, nil) local customEvent = "UNIT_AURA" local maxIndex = 40 local lastReport = 0 function onEvent.UNIT_AURA(event, ...) INIT_B...
isPolice = false inServicePolice = false dragStatus = {} dragStatus.isDragged = false identityStats = nil vehicleStats = nil orgByService = {["police"] = "~b~Dept. de la justice",["fbi"] = "~b~Agence fédérale"} local menuThread = false local blips = {} local isHandcuffed = false RMenu.Add("police_dynamicmenu", "poli...
local progression = require "crit.progression" local monarch = require "monarch.monarch" local M = {} function M.show(screen_id, data, options) options = options or {} if options.sequential == nil then options.sequential = true end screen_id = hash(screen_id) local fork = progression.fork(function () ...
function onUnitDeath(star, unit) for i = 0, 25 do local randAngle = Random.randFloat(0, 360) newProj = Projectile.new("FLAK") newProj:setPos(unit:getPos()) newProj:setRotation(randAngle) newProj:setAllegiance(unit:getAllegiance()) star:addProjectile(newProj) end end
local p = (require 'gamestate._level')() local Signal = require 'lib.hump.signal' function p:draw() p.paper() p.sky(235, 82, 16) p.sea(89, 116, 194, false) p.fly(function () Signal.emit('next_level') end) p.border() end return p
local f = load("print('hello')") f() --> =hello do local env = {x = 1} local f = load("x = 2", "chunk", "bt", env) print(env.x) --> =1 f() print(env.x) --> =2 end load("print(...)")(1, 2) --> =1 2 -- This loads and executes the given file loadfile("lua/loadfile.lua.notest")() --> =loadfile loadf...
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' ) local base = _G __Moose = {} __Moose.Include = function( IncludeFile ) if not __Moose.Includes[ IncludeFile ] then __Moose.Includes[IncludeFile] = IncludeFile local f = assert( base.loadfile( IncludeFile ) ) if f == nil then error ("Moose: Could not load M...
collectibles = { {"qe_necrobook", 1}, } markers = { { map = "res/map/gandria/gandria.tmx", position = {2225, 950}, step = 0 }, { map = "res/map/marshland/marshland.tmx", position = {1425, 1625}, step = -1 } }
--[[ Copyright (C) 2014 - Eloi Carbó Solé (GSoC2014) BGP/Bird integration with OpenWRT and QMP 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) a...
ESX = nil local connectedPlayers = {} local playerJobs = {} TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) ESX.RegisterServerCallback('esx_scoreboard:getPlayers', function(source, cb) cb(connectedPlayers) end) Citizen.CreateThread(function() while true do Citizen.Wait(15000) CountJobs(...
voiceData = {} radioData = {} callData = {} mumbleConfig = { debug = false, -- enable debug msgs voiceModes = { {3.5, "Whisper"}, -- Whisper speech distance in gta distance units {10.0, "Normal"}, -- Normal speech distance in gta distance units {25.0, "Shouting"}, -- Shout speech distance in gta distance units ...
-- Reference - https://github.com/folke/tokyonight.nvim vim.g.tokyonight_style = "day" vim.g.tokyonight_italic_functions = true vim.g.tokyonight_sidebars = { "qf", "vista_kind", "terminal", "packer" } -- Change the "hint" color to the "orange" color, and make the "error" color bright red vim.g.tokyonight_colors = { h...
#!/usr/bin/lua local RESOLV_CONF = '/var/gluon/wan-dnsmasq/resolv.conf' local stat = require 'posix.sys.stat' local ubus = require('ubus').connect() local uci = require('simple-uci').cursor() local util = require 'gluon.util' local new_servers = '' local function append_server(server) new_servers = new_servers ...
local addonName, addon = ... addon.Damnation = LibStub("AceAddon-3.0"):NewAddon("Damnation", "AceEvent-3.0") local Damnation = addon.Damnation local COLOR_RED = "|cFFFF0000" local COLOR_GREEN = "|cFF1EFF00" local COLOR_BLUE = "|cFF0070DD" local COLOR_GOLD = "|cFFE6CC80" local COLOR_RESET = "|r" -- declare defaults t...
local vim = vim vim.api.nvim_exec([[autocmd Filetype markdown nmap <C-p> <Plug>MarkdownPreviewToggle]], false)
--[[********************************** * * Multi Theft Auto - Admin Panel * * admin_acl.lua * * Original File by lil_Toady * **************************************]] function aSetupACL () outputDebugString ( "Verifying ACL..." ) local temp = {} local node = xmlLoadFile ( "conf\\ACL.xml" ) if ( not node ) then ...
local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ETHEREALSPEAR) combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) function onGetFormulaValues(player, skill, attack, f...
-- Load those Spoons if not hspoon_list then hspoon_list = { "WinWin", "HSaria2", "KSheet", "IFLookupSelection", "TerminalHere", "HotKeyList", "BreakTime" } end for _, v in pairs(hspoon_list) do hs.loadSpoon(v) end hs.hotkey.bind({"cmd", "alt", "ctrl"}, "R", "Configuration Reload", f...
-- This is a part of uJIT's testing suite. -- Copyright (C) 2020-2022 LuaVela Authors. See Copyright Notice in COPYRIGHT -- Copyright (C) 2015-2020 IPONWEB Ltd. See Copyright Notice in COPYRIGHT local t = {} local mt = { __lt = function (_, _) print("__lt") return true end } setmetata...
--chatcmds.lua --Registers commands to modify the init and step code for LuaAutomation --position helper. --punching a node will result in that position being saved and inserted into a text field on the top of init form. local punchpos={} minetest.register_on_punchnode(function(pos, node, player, pointed_thing) loca...
--[[ Copyright 2012 Rackspace 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 or agreed to in writing, software dis...
-- A fizzbuzz module. Usage: `fb = require 'fizzbuzz4'; fb:run()` optional counter limits :run(x,y) -- Author: @darrenkearney local fizzbuzz = {} function fizzbuzz.exec(x) local x, s = tonumber(x), '' if (x % 3 == 0) then s = s..'Fizz' end if (x % 5 == 0) then s = s..'Buzz' end if s == '' then s = x end ...
ConsoleClass={} ConsoleClass.__index = ConsoleClass ConsoleCount = 0; dofile(chinConsoleDir.."chin_console_00_constrdestr.lua"); dofile(chinConsoleDir.."chin_console_01_functions.lua");
--[[ * MOCK framework for Moai * Copyright (C) 2012 Tommo Zhou(tommo.zhou@gmail.com). All rights reserved. * * 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 *...
local ffi = require("ffi") ffi.cdef [[ typedef void(*CB3)(); struct A3 { CB3 cb; }; ]] local a = ffi.new("struct A3") local luacb = function() print("call back") end local fficb = ffi.cast("CB3", luacb) a.cb = fficb luacb = nil fficb = nil collectgarbage("collect") collectgarbage("collect") collectgarbage("collect"...
function AABB(x,y,w,h,x2,y2,w2,h2) return x < x2+w2 and x+w > x2 and y < y2 + h2 and y+h > y2 end
return {'lok','lokaal','lokaalspoorweg','lokaaltje','lokaaltrein','lokaalvredebreuk','lokaas','lokalisatie','lokaliseren','lokalisering','lokaliteit','lokartikel','lokazen','lokduif','lokeend','loken','loket','loketbeambte','loketbediende','loketfunctie','loketkast','lokettenhal','lokettist','lokettiste','lokfluitje','...
local a = dofile(arg[1]) local b = dofile(arg[2]) for k,v in pairs(a) do if a[k]~=b[k] then os.exit(1) end end for k,v in pairs(b) do if a[k]~=b[k] then os.exit(1) end end
require("posix") while true do posix.fork() end
local _config = {} _config.app = { debug = true, controllerName = "controller" } _config.db = { host = '192.168.50.129', port = 3306, database = 'db_test', user = 'root', password = '123456' } _config.redis = { host = "192.168.50.128", port = 6379 } return _config
-- handles special chat or notification events and or stuff. local printCenter = {} printCenter.lastShownNotify = 0 printCenter.delay = 3.25 -- We'll follow PrintMessage's rule. Don't attempt to use ConVar here! printCenter.color = color_white function printCenter:notify_wait() local last = self.lastShownNotify l...
local mod = get_mod("SpawnTweaks") local pl = require'pl.import_into'() mod.specials_mut = {} mod.specials_mut.before_add_damage_network_player = function(damage_profile, target_index, power_level, hit_unit, attacker_unit, hit_zone_name, hit_position, attack_direction) -- luacheck: no unused if not mod.specials_mut...
data:extend({ { type = "technology", name = "stack-inserter-2", icon = "__base__/graphics/technology/stack-inserter.png", icon_size = 128, effects = { { type = "unlock-recipe", recipe = "express-stack-inserter" }, { type = "unlock-recipe", reci...
local nvim_lsp = require('lspconfig') -- IMPORTANT: use npm for installing language servers. Copy the command below: -- npm install -g typescript typescript-language-server diagnostic-languageserver eslint_d pyright -- Python nvim_lsp['pyright'].setup {} -- Rust language server require('rust-tools').setup({ tools ...