content stringlengths 5 1.05M |
|---|
local const = require "nvim.cmake_file_api.const"
local fs = require "nvim.cmake_file_api.fs"
local object = {}
object.__index = object
local lazy = {}
lazy.__index = lazy
local function init_lazy_objects(data, object_dir)
if not (type(data) == "table") then
return
end
local keys = {}
for key, _ in pair... |
-- Copyright 2022 SmartThings
--
-- 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 ... |
-- 00000011
-- Increment the above number by 1 to enable auto update at next extension startup
--[[
The MIT License (MIT)
Copyright (c) 2014 sleighsoft
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... |
pg = pg or {}
pg.enemy_data_statistics_2 = {
[110] = {
cannon = 0,
name = "川内级量产型",
type = 2,
speed_growth = 0,
battle_unit_type = 49,
air = 0,
air_growth = 0,
durability = 99999,
friendly_cld = 1,
armor = 0,
id = 110,
bubble_fx = "",
dodge_growth = 0,
icon = "chuanneidanchuan",
star = 0,... |
function mysplit (inputstr, sep)
if sep == nil then
sep = "%s"
end
local t={}
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
table.insert(t, str)
end
return t
end
-- Event notes hooks
function onEvent(value1, value2)
local tableee=mysplit(value2,", ") ... |
function onCreate()
makeLuaSprite('transitionwhite', nil, -400, -300);
luaSpriteMakeGraphic('transitionwhite', screenWidth * 2, screenHeight * 2, 'ffffff');
setScrollFactor('transitionwhite', 0, 0);
doTweenAlpha('transitionwhite', 'transitionwhite', 0, 0.01, 'backIn')
addLuaSprite('transitionwhite',true)
end... |
ENT.Type = "anim"
ENT.Base = "base_anim"--base_gmodentity"
ENT.PrintName = "Lift Controller"
ENT.Author = "Lexi"
ENT.Contact = ""
ENT.Purpose = ""
ENT.Instructions = ""
ENT.Spawnable = false
ENT.AdminSpawnable = false
ENT.RenderGroup = RENDERGROUP_TRANSLUCENT;
ENT.held = true;
ENT.floorpose = {
{-45,... |
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
local ACF = ACF
local hook = hook
do -- Spawning and Updating --------------------
local Piledrivers = ACF.Classes.Piledrivers
local AmmoTypes = ACF.Classes.AmmoTypes
local CheckLegal = ACF_CheckLegal
local function VerifyData(Data... |
print("\n==================CHECK=================\n")
os.execute("luacheck .")
|
fp = io.tmpfile()
-- do some file operations
fp:close()
|
local inr = {}
if not PIPES_C_LIB then
PIPES_C_LIB = OPEN_PIPES_C_LIB()
end
local _c = PIPES_C_LIB
--
local typeName = {
raw = 0,
string = 1,
newsvrret = 11,
timer = 20,
net = 22,
reterr = 30,
stat = 40,
lua = 64
}
local typeCode
local function genTypeCode()
typeCode = {}
for k,v in pairs(typeName) do... |
require("util")
require("model/var")
PlayerModel = Class()
function PlayerModel.new(data)
if not data then
data = {money=0}
end
local self = {data=data}
setmetatable(self, PlayerModel)
self.money = ModelVar.new(data, "money")
return self
end
function PlayerModel:destroy()
self.money = nil
... |
local CustomErrors = {}
CustomErrors.Errors = {}
getfenv().CustomErrors = CustomErrors; getfenv().Errors = CustomErrors.Errors
CustomErrors.__index = CustomErrors;
local print = print
local error = error
function CustomErrors.new(Info)
local Name = Info.Name;
local Syntax = Info.Syntax;
local ErrorCode ... |
function read_txt_file(path)
local file, errorMessage = io.open(path, "r")
if not file then
error("Could not read the file:" .. errorMessage .. "\n")
end
local content = file:read "*all"
file:close()
return content
end
init = function(args)
local FileBody = read_txt_file("04-moderate... |
--Dx Functions
local dxDrawImage = dxDrawImageExt
local dxDrawImageSection = dxDrawImageSectionExt
local dxDrawRectangle = dxDrawRectangle
local dxGetMaterialSize = dxGetMaterialSize
local dxCreateTexture = dxCreateTexture
--DGS Functions
local dgsSetType = dgsSetType
local dgsGetType = dgsGetType
local dgsSetParent = ... |
local class = require "class"
local BonusScarab = class:derive("BonusScarab")
local Vec2 = require("Essentials/Vector2")
local Color = require("Essentials/Color")
local Sprite = require("Sprite")
function BonusScarab:new(path)
self.path = path
self.offset = path.length
self.distance = 0
self.trailDi... |
lay_hands_poet = {
cast = function(player)
local spellName = "Lay Hands"
if not player:canCast(1, 1, 0) then
return
end
local worked = global_heal.cast(player, player, 100, 90, 0)
if worked == 1 then
player:sendMinitext("You cast " .. spellName .. ".")
end
end,
requirements = function(player)
lo... |
links { "dwrite" }
return function()
add_dependencies { 'vendor:utfcpp' }
end |
--
-- Please see the license.txt file included with this distribution for
-- attribution and copyright information.
--
local updateOriginal;
function onInit()
updateOriginal = super.update;
super.update = update;
super.onInit();
end
function update()
if updateOriginal then -- May have been deleted by another ... |
--local Model = require( 'models/base' )
local GoogleAPI = class( 'GoogleAPI' )
GoogleAPI.static.clientid = '[]'
GoogleAPI.static.clientemail = '[]'
GoogleAPI.static.clientsecret = '[]'
GoogleAPI.static.redirecturi = '[]';
-- client login uses an email and password to get access to old APIs
function GoogleAPI.stat... |
test = require 'u-test'
common = require 'common'
maxRetries = 3
syncGameHostRetries = 0
syncGamePropRetries = 0
function MPM_SingleDeviceWriteTest_Handler()
print("MPM_SingleDeviceWriteTest_Handler")
XblMultiplayerManagerInitialize();
StartDoWorkLoop();
XblMultiplayerManagerLobbySessionAddLocalUser()... |
--[[
Description: To create class
Author: M.Wan
Date: 04/15/2014
]]
local CLASS_TYPE = {
INHERIT_FROM_CPP = 1,
INHERIT_FROM_LUA = 2,
}
local function setmetatableindex(t, index)
if type(t) == "userdata" then
local peer = tolua.getpeer(t)
if not peer then
peer = {}
tolua.setpeer(t, peer)
end
setmet... |
-- require("mod-gui")
local PriorityQueue = require("priority_queue")
local pumpable_resource_categories = require("pumpable")
function string:starts_with(prefix)
return string.find(self, prefix) == 1
end
-- returns a string representation of a position
local function key(position)
return math.floor(position.x)... |
function print_in_box(message, x, y)
local pico8_letter_width = 4
local message_width_px = #message * pico8_letter_width
local box_left = x - message_width_px / 2 - pico8_letter_width
local box_right = x + message_width_px / 2 + 2
local box_top = y - pico8_letter_width
local box_bottom = y + pic... |
#!/usr/bin/env lua
require 'Test.More'
if not pcall(require, 'crypto') then
skip_all 'no crypto'
end
plan(27)
local response = { status = 200, headers = {} }
require 'Spore.Protocols'.request = function (req)
return response
end -- mock
if not require_ok 'Spore.Middleware.Auth.OAuth' then
skip_rest "no... |
-- stylua: ignore start
function simple_function(a)
local test = 1
local test_other = 11
for idx = test - 1, test_other do
print(idx, a)
end
return test, test_other
end
|
-- See LICENSE for terms
local tostring, type = tostring, type
local MsgPopup = ChoGGi.ComFuncs.MsgPopup
local Strings = ChoGGi.Strings
local Translate = ChoGGi.ComFuncs.Translate
--~ local RetName = ChoGGi.ComFuncs.RetName
function ChoGGi.MenuFuncs.SetShuttleCapacity()
local r = const.ResourceScale
local default_... |
local skynet = require "skynet"
local dbname = skynet.getenv("mysql_db")
local schema = {}
function get_primary_key(tbname)
local sql = "select k.column_name " ..
"from information_schema.table_constraints t " ..
"join information_schema.key_column_usage k " ..
"using (constraint_name,table_schema,table_n... |
--[[
bindings.lua (rev. 2018/05/11)
otouto's bindings for the Telegram bot API.
https://core.telegram.org/bots/api
Copyright 2016-2018 topkecleon <drew@otou.to>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the... |
local cjson = require "cjson"
local orange_data = ngx.shared.orange_data
local _M = {}
-- 从缓存获取不存在时更新并返回
function _M.get_or_load(key, cb)
local value, err
value = _M.get(key)
if not value then
value, err = cb(key)
if err then
ngx.log(ngx.ERR, "METHOD:[get_or_load] KEY:[", key... |
local lm = require 'luamake'
local platform = require "bee.platform"
lm.arch = 'x64'
lm:import '3rd/bee.lua/make.lua'
lm:shared_library 'protobuf' {
deps = {
platform.OS == "Windows" and "lua54" or "lua",
},
sources = {
'binding/lua53/pbc-lua53.c',
'src/*.c',
},
includes =... |
local awful = require('awful')
local beautiful = require('beautiful')
local wibox = require('wibox')
local gears = require('gears')
local helpers = require('helpers')
local beautiful = require("beautiful")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local configuration = require... |
project "AthleteScoreboard"
kind "ConsoleApp"
language "C++"
cppdialect "C++20"
targetdir "%{BUILD_DIRECTORY}/bin/%{cfg.buildcfg}"
objdir "%{BUILD_DIRECTORY}/bin/obj/%{cfg.buildcfg}"
files {
"include/**.h",
"src/**.cpp",
}
vpaths {
["*"] = {
... |
object_tangible_item_beast_converted_gurnaset_decoration = object_tangible_item_beast_shared_converted_gurnaset_decoration:new {
}
ObjectTemplates:addTemplate(object_tangible_item_beast_converted_gurnaset_decoration, "object/tangible/item/beast/converted_gurnaset_decoration.iff")
|
local rawUrl = "https://raw.githubusercontent.com/mikk809h/TurtleSwarm/master/"
local VersionControl = {}
-- Update slave file from github
function VersionControl:Slave()
rawUrl = rawUrl .. "slave.lua"
local handle = http.get(rawUrl)
if handle then
local server_version = handle.readAll()
... |
local noop = function(self) return self end
function _G.getObjectsInRadius() return {} end
local function mergeObjects(...)
local merged = Util.mergeTables(table.unpack({...}))
setmetatable(merged, Util.mergeTables(table.unpack(Util.map({...}, function(el) return getmetatable(el) end))))
return merged
end... |
--[=[
Provides a means to, with both a continuous position and velocity,
accelerate from its current position to a target position in minimum time
given a maximum acceleration.
Author: TreyReynolds/AxisAngles
@class AccelTween
]=]
local TimeFunctions = require(script.Parent.Parent.Utility.TimeFunctions)
local ... |
--[[
Licensed under GNU General Public License v2
* (c) 2013, Jan Xie
--]]
local helpers = require("lain.helpers")
local markup = require("lain.util").markup
local awful = require("awful")
local naughty = require("naughty")
local mouse = mouse
local string = { format = string.format, gsub = string.g... |
TriggerManager = Observable:extends{}
function TriggerManager:init()
self:super('init')
self.triggerIDCount = 0
self.triggers = {}
end
---------------
-- CRUD methods
---------------
function TriggerManager:addTrigger(trigger)
local success, err = self:ValidateTrigger(trigger)
if not success and S... |
local env = environment()
local opts = options()
env:add_var("T", Type())
local T = Const("T")
env:add_var("x", T)
env:add_var("y", T)
env:add_var("f", mk_arrow(T, mk_arrow(T, T)))
print(parse_lean("f x (f x y)", env, opts))
-- parse_lean will use the elaborator to fill missing information
local F = parse_lean("fun x,... |
--- Quaternion library
--- Quaternion library
-- @deprecated Pure Lua implementation. This can be done with a user library.
-- @deprecated Deprecated my ass. ~Mijyuoon
local quat_lib, quat_lib_meta = SF.Libraries.Register("quaternion")
--[[
-- Quaternion Support
-- Converted from Wiremod's E2 Quaternion library for g... |
--http://lodev.org/cgtutor/raycasting.html
local constants = require("pseudo.modules.constants")
local world = require ("pseudo.modules.world.world")
local map = world.map_geometry
local player = world.player
local lume = require("lib.lume")
local M = {}
local sin = math.sin
local cos = math.cos
local floor = math.flo... |
-- comp_tokenring_node.lua
TokenRing = require("TokenRing");
OnMessage = function(msg)
--print(string.format("OnMessage: %d", msg.Message));
if msg.Message == TokenRing.Messages.DELIVER then
if msg.Param1 == NodeId then
print("================");
print("receiving node: ", NodeId);
print(" delivery Node: ... |
-- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(..., package.seeall)
local lib = require("core.lib")
local pci = require("lib.hardware.pci")
local S = require("syscall")
local usage = require("program.pci_bind.README_inc")
local long_opts = {
all = "a",
bind = "b",
inf... |
package.path = package.path..";../src/?.lua"
local sysd = require("systemd_ffi")
local res = sysd.sd_booted()
print("booted: ", res) |
-----------------------------------------
-- ID: 6
-- Item: Noble's Bed
-----------------------------------------
require("scripts/globals/common")
require("scripts/globals/quests")
-----------------------------------------
function onFurniturePlaced(player)
if player:getQuestStatus(OTHER_AREAS_LOG, tpz.quest.id.o... |
local Config = require('opus.config')
local UI = require('opus.ui')
local itemDB = require('core.itemDB')
local args = { ... }
local colors = _G.colors
local peripheral = _G.peripheral
local context = args[1]
local ni = peripheral.find('neuralInterface')
if not context.state.depositAll then
conte... |
return {
mine_singularity = {
areaofeffect = 200,
craterboost = 10,
cratermult = 5,
edgeeffectiveness = 0.7,
explosiongenerator = "custom:singularitybomb",
impulseboost = 0,
name = "SingularityMine",
range = 480,
reloadtime = 3.6,
soundhit = "xplolrg3",
soundstart = "largegun",
weaponvelocity =... |
local selectModule = {
-- text labels
{
-- "SelectNameText" 1
{
{ "Name", "SelectNameText" },
{ "AnchorPoint", Vector2.new(1, 1) },
{ "BackgroundTransparency", 1 },
{ "BorderSizePixel", 0 },
{ "Font", Enum.Font.Code },
{ "Position", UDim2.new(0.87, 0, 0.14, 0) },
{ "Size", UDim2.new(0.05, 0,... |
-----------------------------------
-- Area: Pso'Xja
-- NPC: _i9y (Crystal Receptor)
-- !pos -389.980 -3.198 -203.595 9
-----------------------------------
local ID = require("scripts/zones/PsoXja/IDs");
-----------------------------------
function onTrade(player,npc,trade)
end;
function onTrigger(player,npc)
if... |
return function(HooI)
local KeyInputEvent = HooI.class("KeyInputEvent")
function KeyInputEvent:initialize(inputType)
self.inputType = inputType
end
return KeyInputEvent
end
|
includeFile("custom_content/tangible/item/quest/force_sensitive/fs_crystal_force.lua")
includeFile("custom_content/tangible/item/quest/force_sensitive/fs_crystal_health.lua")
|
--[[
# Lua Debug Example
This filter demonstrates how to add mobdebug commands to stop execution within
the filter functions, see README.md for details how to install and set up
Zerobrane Studio.
]]
md = require("mobdebug")
md.start()
function Emph(elem)
md.pause() --breakpoint
return elem.content
end
function Str... |
local RbTree = require 'klib/vendor/rbtree'
local pkey = require 'pda/pathfinding/grid/pkey'
local OpenList = {}
function OpenList.new(engine)
return setmetatable({
wtree = RbTree.new(),
ptable = engine.ptable
}, {__index = OpenList})
end
function OpenList:push(node)
self.wtree:insert(node... |
--[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
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
h... |
#!/usr/bin/env lua
if #arg < 3 then
io.stderr:write('reduce-xml.lua prefix suffix files...\n')
os.exit(1)
end
lpeg = require'lpeg'
local P = lpeg.P
local S = lpeg.S
local R = lpeg.R
local Cp = lpeg.Cp()
local Cs = lpeg.Cs
local Ct = lpeg.Ct
local C = lpeg.C
local After = function(p) p=P(p) return (1 - p)^0 * p e... |
-- snippets.lua
local types = require("luasnip.util.types")
local U = require("neovim.core.utilities")
require("luasnip").config.setup({
ext_opts = {
[types.choiceNode] = {
active = {
virt_text = { { "●", "DiffAdd" } },
},
},
[types.insertNode] = {
active = {
virt_text... |
------------------------------------------------------------------------
-- Tips数据表
------------------------------------------------------------------------
--------------------------------------------------------------------------
----类的声明
--------------------------------------------------------------------------
lo... |
sounds = {}
sounds.itemGet = love.audio.newSource("sounds/itemGet.wav", "static")
sounds.playerHurt = love.audio.newSource("sounds/player/playerHurt.wav", "static")
sounds.splash = love.audio.newSource("sounds/player/splash.wav", "static")
-- There are multiple laser sound effects, was originally planning to have
-- ... |
-- Copyright (C) Izio, Inc - All Rights Reserved
-- Unauthorized copying of this file, via any medium is strictly prohibited
-- Proprietary and confidential
-- Written by Romain Billot <romainbillot3009@gmail.com>, Jully 2017
HasLoadedModel = false
local Skin = nil
local new = false
local di... |
--[[
MIT License
Copyright (c) 2022 Ivan Perzhinsky.
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
t... |
Meshes: --[[
Ring: "http://www.roblox.com/asset/?id=3270017"
SpikeCrown: "http://www.roblox.com/asset/?id=20329976"
Spike: "http://www.roblox.com/asset/?id=1033714"
Diamond: "http://www.roblox.com/asset/?id=9756362"
Ice crown: "http://www.roblox.com/asset/?id=1323306"
Riddling skull: Mesh: "http://www.roblox.com/asset... |
local pf = require 'eonz.polyfill'
local table = pf.extended 'table'
local string = pf.extended 'string'
local unpack = require "eonz.unpack"
test['string.split(...)'] = function()
local str = ",,,this text,is,, a , string"
local split = string.split(str, ",")
assert_exists(split, 'split returned nil')
assert... |
local constants = require("kong.constants")
local openssl_x509 = require("resty.openssl.x509")
local ssl = require("ngx.ssl")
local ocsp = require("ngx.ocsp")
local http = require("resty.http")
local system_constants = require("lua_system_constants")
local bit = require("bit")
local ffi = require("ffi")
local io_ope... |
local split = require("pl.utils").split
local pretty = require("pl.pretty").write
local strip = require("pl.stringx").strip
local lines = require("pl.stringx").splitlines
local _execex = require("pl.utils").executeex
local _exec = require("pl.utils").execute
local files = require("pl.dir").getfiles
local directories = ... |
package("libuv")
set_homepage("http://libuv.org/")
set_description("A multi-platform support library with a focus on asynchronous I/O.")
set_urls("https://github.com/libuv/libuv/archive/$(version).zip",
"https://github.com/libuv/libuv.git")
add_versions("v1.28.0", "e7b3caea3388a02f2f99e6... |
-- Neuron is a World of Warcraft® user interface addon.
-- Copyright (c) 2017-2021 Britt W. Yazel
-- Copyright (c) 2006-2014 Connor H. Chenoweth
-- This code is licensed under the MIT license (see LICENSE for details)
---@class KEYBINDER : Button @define class KEYBINDER is our keybinding object
local KEYBINDER = setme... |
Enums = Enums or require "enums"
local Elements = Enums.Elements
Modules = Modules or require "modules"
local Dim = Modules.Dim
local Collider = Modules.Collider
--* Local Functions
local nofunc = function()
end
local function changeBlock(old, new)
old.element = new.element
old.draw = new.draw
old.update... |
local ctoken = redis.call('HGET', KEYS[1], '_cas')
if (not ctoken) or ctoken == ARGV[2] then
local ntoken
if not ctoken then
ntoken = 1
else
ntoken = tonumber(ctoken) + 1
end
redis.call('HMSET', KEYS[1], '_sdata', ARGV[1],
'_cas', ntoken, '_ndata', ARGV[3])
return ntoken
else... |
VERSION ='UNRELEASED'
SPLASH ='LuaHIE ' .. VERSION .. ' (c)' .. os.date('%Y') .. ' Paul Lewis'
PATH_SEPARATOR=package.config:sub(1,1)
require ('engine' .. PATH_SEPARATOR .. 'init')
LOGGER:debug("LuaHIE engine components loaded")
SERVER:start()
print(SPLASH)
LOGGER:info(SPLASH)
LOGGER:info("Startup in %dm... |
-- Use of this source code is governed by the Apache 2.0 license; see COPYING.
module(..., package.seeall)
local pci = require('lib.hardware.pci')
-- This module provides some common definitions for snabbwall programs
inputs = {}
function inputs.pcap (kind, path)
return "output", { require("apps.pcap.pcap").Pcap... |
-- supporting testfile; belongs to 'cl_spec.lua'
error("This compiles fine, but throws an error when being run")
|
require("Cocos2d")
local LicenseLayer = class("LicenseLayer", function()
return cc.Layer:create()
end)
LicenseLayerFactory = {}
function LicenseLayerFactory:create(type_file_name)
pRet = require("LicenseLayer").new()
pRet.type_file_name = type_file_name
pRet:init()
return pRet
end
function L... |
local
PushUISize, PushUIColor,
PushUIStyle, PushUIAPI,
PushUIConfig, PushUIFrames = unpack(select(2, ...))
-- Create the frame
local PushUIFrameActionBarFrame = CreateFrame("Frame", "PushUIFrameActionBarFrame", UIParent)
PushUIFrames.AllFrames[#PushUIFrames.AllFrames + 1] = PushUIFrameActionBarFrame
--ta... |
-- Script officialy made and used by Central Life server --
-- CLIENTSIDED --
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if GetPlayerWantedLevel(PlayerId()) ~= 0 then
SetPlayerWantedLevel(PlayerId(), 0, false)
SetPlayerWantedLevelNow(PlayerId(), false)
... |
local crypto = require("goluago/crypto/hmac")
--signsha256
equals("compute hmac with sha256", "\40\122\59\216\164\252\119\49\169\76\114\32\121\5\83\35\100\77\135\152\189\41\27\249\135\138\188\155\143\212\177\208", crypto.signsha256("message", "secret-key"))
equals("compute hmac with sha256 and empty secret", "\235\8\1... |
-- Live Simulator: 2 Extensions Lua binding
-- Part of Live Simulator: 2 Extensions
-- See copyright notice in LS2X main.cpp
local ls2x = {}
local haslib, lib = pcall(require, "ls2xlib")
if not(haslib) then
-- no features
io.stderr:write("warning: no features.\n", lib)
return ls2x
end
assert(lib._... |
--[[
Name: sh_mayor_taxes.lua
-----------------------------------------------------------------
-- @package VrZn - Custom Gamemode (SRP BASE)
-- @author Nodge
-- @build Beta 1
-----------------------------------------------------------------
]]--
local App = {}
App.Name = "City Taxes"
App.ID = "turbota... |
local TestUtil = require("api.test.TestUtil")
local Assert = require("api.test.Assert")
function test_race_intrinsic_traits()
local chara = TestUtil.stripped_chara("elona.mutant")
Assert.eq(1, chara:trait_level("elona.perm_chaos_shape"))
end
|
-- Generated using ntangle.nvim
local client1, client2
local client1pipe = [[\\.\\pipe\nvim-12392-0]]
local client2pipe = [[\\.\\pipe\nvim-28204-0]]
local num_connected = 0
local outputbuf
local outputwin
local test_passed = 0
local test_failed = 0
outputbuf = vim.api.nvim_create_buf(false, true)
local curwidth = ... |
local items = {
{
name = "One Dollar",
weight = 0.00001,
stack = 100,
model = "bkr_prop_money_unsorted_01",
},
{
name = "Five Dollars",
weight = 0.00001,
stack = 100,
model = "bkr_prop_money_unsorted_01",
},
{
name = "Ten Dollars",
weight = 0.00001,
stack = 100,
model = "bkr_prop_money_unso... |
local com = require("component")
local event = require("event")
local term = require("term")
local comp = require("computer")
local forms = require("forms")
local gpu = com.gpu
local oldW, oldH = gpu.getResolution()
local oldFG = gpu.getForeground()
local oldBG = gpu.getBackground()
gpu.setResolution(80, 25)
forms.... |
love.conf = function(t)
t.version = '11.2'
t.window.title = 'Nameless Hero 0.0.12'
t.window.icon = nil
t.window.width = 960
t.window.height = 540
t.window.resizable = true
t.window.minwidth = 960
t.window.minheight = 540
t.modules.data = false
t.modules.joystick = false
t.a... |
-- Congo Caper's Collision Box Viewer
-- Author: Pasky13
camx = 0
camy = 0
memory.usememorydomain("CARTROM")
function findbit(p)
return 2 ^ (p - 1)
end
function hasbit(x, p)
return x % (p + p) >= p
end
local function RetrieveBox(obase, switch)
if switch == 1 then
pointer = mainmemory.read... |
local f = CreateFrame('Frame')
local zoneTextFrame
local format = string.format
-- get and set the zone text, including pvp zone color
local function update_zone_text()
if not zoneTextFrame then
return
end
local zone = GetSubZoneText()
zone = (zone == '') and GetRealZoneText() or zone
zone... |
m = Map("dawn", "Hearing Map", translate("Hearing Map"))
m.pageaction = false
s = m:section(NamedSection, "__hearingmap__")
function s.render(self, sid)
local tpl = require "luci.template"
tpl.render_string([[
<%
local utl = require "luci.util"
local status = require "luci.tools.ieee80211"
local stat = u... |
--[[
This module prints the list of all Pokémon, alternative forms included, having
a given type. It divides them into mono-typed, first-typed and second-typed.
--]]
local g = {}
local mw = require('mw')
local css = require('Css')
local ms = require('MiniSprite')
local list = require('Wikilib-lists')
local oop = r... |
return {'mifepriston'} |
local tr = aegisub.gettext
script_name = tr"Space K Checker"
script_description = tr"Check invalid k tag"
script_author = "domo"
script_version = 1.1
re = require 'aegisub.re'
function wrong_k_checker(subtitles, selected_lines)
for i=1,#subtitles do
if subtitles[i].class=="dialogue" then
dialogue_start... |
--------------------------------------------------------------------------------
-- Module Declaration
--
local mod, CL = BigWigs:NewBoss("Black Rook Hold Trash", 1501)
if not mod then return end
mod.displayName = CL.trash
mod:RegisterEnableMob(
98280, -- Risen Arcanist
98243, -- Soul-torn Champion
100485, -- Soul... |
local S = technic.getter
technic.register_recipe_type("separating", {
description = S("Separating"),
output_size = 2,
})
function technic.register_separating_recipe(data)
data.time = data.time or 10
technic.register_recipe("separating", data)
end
local recipes = {
{ "technic:bronze_dust 8", "technic... |
-- Luagit2's Branch module tests
local fixer = require("Fixtures.fix_repo")
describe(" Branch Methods Tests ", function()
local luagit2 = require("luagit2")
local repo
local type_local, type_remote
setup(function()
luagit2.init()
end)
before_each(function()
fixer.set_repo("testrepo")
repo = luagit2.repo... |
local bitser = require "Libraries/bitser"
local saveLoader = {
save = function(terrain)
local serializedPoints = bitser.dumps(terrain:getPoints())
return love.filesystem.write("data.wld", serializedPoints)
end,
load = function ()
local serializedPoints = love.filesystem.read("data.wld")
if (serializedPoints ... |
local Config = GiveMeAShot:NewModule('Config')
local L = LibStub('AceLocale-3.0'):GetLocale("GiveMeAShot")
local Util = GiveMeAShot:GetModule('Util')
local Controls = GiveMeAShot:GetModule('Controls')
--------------------------------------------------
-- Locals
--------------------------------------------------
----... |
---@class util
local util = {}
function util.FirstElement(list)
local _, value = next(list)
return value
end
return util
|
function MonolithDKPButton_OnLoad(self)
if ( not self:IsEnabled() ) then
self.Left:SetTexture("Interface\\Buttons\\UI-Panel-Button-Disabled");
self.Middle:SetTexture("Interface\\Buttons\\UI-Panel-Button-Disabled");
self.Right:SetTexture("Interface\\Buttons\\UI-Panel-Button-Disabled");
end
end
function Monolith... |
rangeKey = "smokeToken"
require('!/TokenWithRangeRuler')
|
a = [=[<![CDATA[
Hello world
]]>]=]
print(a)
a = [=[<![CDATA[
Hello world
]]>]=]
print(a)
|
local percent_decode = function(s)
local r = s:gsub("%%(..)", function(s2)
local value = assert(tonumber(s2, 16), "bad percent encoded hex")
return string.char(value)
end)
return r
end
local split = function(s)
local ret = {}
local index = 0
s:gsub("[^&]*", function(m)
index = index + 1
ret[index] = m
... |
local utf8 = require('acid.utf8')
local strutil = require('acid.strutil')
function test.basic(t)
for _, code_points, desc in t:case_iter(1, {
{ { } },
{ {0 } },
{ {0x80 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.