content stringlengths 5 1.05M |
|---|
local has_technic = minetest.get_modpath("technic")
local drain_inv = minetest.settings:get_bool("headlamp_drain_inventory", false)
local battery_life = tonumber(minetest.settings:get("headlamp_battery_life")) or 180
local battery_drain = math.floor(65535 / (battery_life * 60)) * 5
-- Helper function to make code ne... |
return {
tllobliterator1 = {
activatewhenbuilt = true,
buildangle = 4096,
buildcostenergy = 267109,
buildcostmetal = 21755,
builder = false,
buildinggrounddecaldecayspeed = 30,
buildinggrounddecalsizex = 10,
buildinggrounddecalsizey = 10,
buildinggrounddecaltype = "tllobliterator_aoplane.dds",
buil... |
require("ui/node");
local match_hall_record_item_rank_layout = require(ViewPath .. "hall/matchHall/widget/match_hall_record_item_rank_layout");
require("uilibs/userMoneyItem");
local ranklist_pin_map = require("qnFiles/qnPlist/hall/ranklist_pin");
-- 好友排行
local GameMatchHallRecordRankItem = class(Node);
GameM... |
modifier_puck_dream_coil_lua_thinker = class({})
--------------------------------------------------------------------------------
-- Classifications
function modifier_puck_dream_coil_lua_thinker:IsHidden()
return false
end
function modifier_puck_dream_coil_lua_thinker:IsPurgable()
return false
end
----------------... |
-- Generated using ntangle.nvim
local client1, client2
local nodejs = false
local num_connected = 0
events = {}
local test_passed = 0
local test_failed = 0
local node_finish = false
local log
local assertEq
function log(str)
print(str)
end
function assertEq(val1, val2)
if val1 == val2 then
test_passed = te... |
local dyes = {
{"white", "White", "basecolor_white"},
{"grey", "Grey", "basecolor_grey"},
{"black", "Black", "basecolor_black"},
{"red", "Red", "basecolor_red"},
{"yellow", "Yellow", "basecolor_yellow"},
{"green", "Green", ... |
workspace "LZW"
architecture "x86_64"
configurations {
"Release",
"Debug"
}
targetdir "bin/%{cfg.buildcfg}/%{prj.name}"
objdir "obj/%{cfg.buildcfg}/%{prj.name}"
startproject "LZW_CLI"
filter "system:Windows"
systemversion "latest"
filter "Release"
d... |
local oldInitialize = GUIMinimap.Initialize
function GUIMinimap:Initialize()
gMaskMapName = false
oldInitialize(self)
gMaskMapName = true
end
|
local KUI, E, L, V, P, G = unpack(select(2, ...))
local ElvUF = ElvUI.oUF
assert(ElvUF, "ElvUI was unable to locate oUF.")
--All credits belongs to Merathilis, Blazeflack and Rehok for this mod
-- Cache global variables
local abs = math.abs
local format, match, sub, gsub, len = string.format, string.match, string.su... |
-- This lua script file represents a lua implementation translation of sample00-mesh with a box instead of a duck.
function initialize()
-- Display splash screen for at least 1 second.
ScreenDisplayer.start("drawSplash", 1000)
_touched = false
_touchX = 0
-- Load font
_font = Font.create("res... |
return {
zh = {
-- 系统状态码
[0x000000] = 'ok',
[0x000001] = '验证错误',
[0x000002] = '数据不存在',
[0x000003] = '密码错误',
[0x000004] = '未授权访问',
[0x000005] = '系统错误,数据库错误',
[0x000006] = '请求太频繁,请稍后访问',
[0x000007] = '系统错误,系统数据异常',
[0x000008] = '系统错误,共享内存... |
--[[
* Copyright (c) 2015-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 in the PATENTS file in the same directory.
]]--
functi... |
return {
_fold = false,
_id = "APITest",
_type = "APITest",
height = "$fill",
ignoreAnchor = 0,
popOnBack = 1,
width = "$fill"} |
local NoobTacoUI, E, L, V, P, G = unpack(select(2, ...))
function NoobTacoUI:SetupActionBars()
-- Main Actionbar
E.db["actionbar"]["bar1"]["enabled"] = true
E.db["actionbar"]["bar1"]["buttons"] = 12
E.db["actionbar"]["bar1"]["buttonsPerRow"] = 12
E.db["actionbar"]["bar1"]["buttonSize"] = 32
E.db["actionbar... |
local config_dbg_core = slc.config("SL_CPC_DEBUG_SYSTEM_VIEW_LOG_CORE_EVENT")
local config_dbg_endpoint = slc.config("SL_CPC_DEBUG_SYSTEM_VIEW_LOG_ENDPOINT_EVENT")
if config_dbg_core.value == "1" and not slc.is_provided("segger_systemview") then
validation.error(
"Segger System View is required when SL_CPC_DEBUG_SY... |
require("lspconfig").prismals.setup({
root_dir = function()
return vim.loop.cwd()
end,
})
|
local _, NeP = ...
local _G = _G
NeP.Core = {}
local last_print = ""
function NeP.Core.Print(_, ...)
if last_print ~= ... then
last_print = ...
print('[|cff'..NeP.Color..'NeP|r]', ...)
end
end
local d_color = {
hex = 'FFFFFF',
rgb = {1,1,1}
}
function NeP.Core.ClassColor(_, unit, type)
type = type and type:... |
---
--- this demo shows how to use memory data: new/foreach/convert/isValid
--- memory support types: f, d, w, b, i, s, c, F
--- float, uint32, uint16, uint8, int, short, signed char, double
---
local mem = require("memory")
local me;
print("------------ start t... |
data:extend({
{ --nuclear furnace
type = "recipe",
name = "nuclear-furnace",
enabled = false,
ingredients = {
{"steel-plate", 25}, {"refined-concrete", 20}, {"processing-unit", 5}
},
result = "nuclear-furnace",
},
{ --nuclear inserter
type... |
local assets =
{
-- Asset("ANIM", "anim/blacklotus.zip"),
-- Asset("ANIM", "anim/swap_darklotus.zip"),
-- Asset("ANIM", "anim/swap_lightlotus.zip"),
}
local function fx_enable(inst)
local owner = inst.components.inventoryitem and inst.components.inventoryitem.owner or nil
if owner ~= nil then
... |
return {
id = "ingotCopper",
name = "Copper Ingot",
tier = 2,
spriteSheet = "materials",
spriteCoords = Vector2.new(4,2),
recipe = {
oreCopper = 15,
},
craftQuantity = 5,
tags = {
"material",
}
} |
-- This code is licensed under the MIT Open Source License.
-- Copyright (c) 2015 Ruairidh Carmichael - ruairidhcarmichael@live.co.uk
-- 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 with... |
local cv = require 'cv'
require 'cv.features2d'
require 'cv.imgcodecs'
require 'cv.highgui'
if not arg[1] then
print('Usage: `th demo/descriptors.lua path-to-image`')
print('Now using demo/lena.jpg')
end
local image = cv.imread{arg[1] or 'demo/lena.jpg'}
if not image then
print("Problem loading image\n")... |
-- fall (1.0.2)
--
-- generative melodies
--
-- E2: Add/remove leaves
-- E3: Cycle attack/release times
-- K2: Rand notes
-- K3: Rand notes and scales
--
-- written by ambalek for
-- the norns community
-- luacheck: globals engine clock util screen softcut enc key audio init redraw midi params include
local settings ... |
--- 近战武器类
-- @module MeleeWeapon
-- @copyright Lilith Games, Avatar Team
-- @author Dead Ratman
local MeleeWeapon = class('MeleeWeapon', WeaponBase)
function MeleeWeapon:initialize(_data, _config)
WeaponBase.initialize(self, _data, _config)
print('MeleeWeapon:initialize()')
end
--攻击
function MeleeWeapon:Attac... |
-- Copyright (c) 2021 Ashish Panigrahi
-- MIT license, see LICENSE for more details.
-- stylua: ignore
local colors = {
black = '#202020',
neon = '#DFFF00',
white = '#FFFFFF',
green = '#00D700',
purple = '#5F005F',
blue = '#00DFFF',
darkblue = '#00005F',
na... |
local robot = require("robot")
local component = require("component")
for i = 1, 32, 1 do
robot.forward()
end |
--[[
=== hegetopt
]]
local he = require "he"
local function parseoptstr(optstr)
if not optstr:match("^[:%a]*$") then return nil end
local optdic = {}
local i = 1
while i <= #optstr do
local c = optstr:sub(i, i)
local c1 = optstr:sub(i+1, i+1)
if c ~= ':' then
optdic[c] = (c1 == ":") and 'arg' o... |
vim.g.doge_mapping = "<Leader>*"
|
ESX = nil
if Config.UseESX then
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
RegisterServerEvent('fuel:pay')
AddEventHandler('fuel:pay', function(price)
local xPlayer = ESX.GetPlayerFromId(source)
local amount = ESX.Math.Round(price)
TriggerEvent('esx_statejob:getTaxed', 'FUEL', amount, f... |
-- Natural Selection 2 Competitive Mod
-- Source located at - https://github.com/xToken/CompMod
-- lua\CompMod\Weapons\Weapon\shared.lua
-- - Dragon
-- Just Override these, we change too much here anyways
function Weapon:GetUpgradeTier()
return kTechId.None, 0
end |
--[[
Project: SA Memory (Available from https://blast.hk/)
Developers: LUCHARE, FYP
Special thanks:
plugin-sdk (https://github.com/DK22Pac/plugin-sdk) for the structures and addresses.
Copyright (c) 2018 BlastHack.
]]
local shared = require 'SAMemory.shared'
shared.require 'CPed'
shared.ffi.cde... |
-- serve test results, in case operating in an environemnt with no console
local S = require "syscall"
-- exit will cause issues, override
os.exit = function() end
-- open output file
local outname = "output"
local fd = S.creat(outname, "rwxu")
-- set stdio to file, keep handle so not garbage collected
local stdin ... |
local config = {
positions = {
Position({x = 33258, y = 31080, z = 8}),
Position({x = 33266, y = 31084, z = 8}),
Position({x = 33259, y = 31089, z = 8}),
Position({x = 33263, y = 31093, z = 8})
},
stairPosition = Position(33265, 31116, 8),
areaCenter = Position(33268, 31119, 7),
zalamonPosition = Position(... |
--[[
TheNexusAvenger
Manages the quests for players.
Class is static (should not be created).
--]]
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ReplicatedStorageProject = require(ReplicatedStorage:WaitForChild("Project"):WaitForChild("ReplicatedStorage"))
local ServerScriptServiceProject = re... |
-- https://github.com/sotakoira/pandora-luas
ui.add_label("Aiming at player color")
local atplayer = ui.add_colorpicker("Aiming at player")
ui.add_label("Regular color")
local noplayer = ui.add_colorpicker("Regular")
function on_paint()
local_player = entity_list.get_client_entity(engine.get_local_player())
... |
-- Includes
local json = require "dkjson"
local date = require "pl.Date"
local path = require "pl.path"
local file = require "pl.file"
local post = {}
local blogs_path = path.join("..", "pub", "blogs.json")
local function load_existing_data()
if path.exists(blogs_path) then
return json.decode(file.read(blogs_path)... |
---@class Config
local config
-- shim vim for kitty and other generators
vim = vim or { g = {}, o = {} }
local function opt(key, default)
key = "tokyonight_" .. key
if vim.g[key] == nil then
return default
end
if vim.g[key] == 0 then
return false
end
return vim.g[key]
end
config = {
style = opt... |
require("util")
local random = math.random
-- stuff should have first_seven, metal, vs_mode, metal_col, prev_metal_col
function make_panels(ncolors, prev_panels, stuff)
local ret = prev_panels
local rows_to_make = 20
if ncolors < 2 then return end
local cut_panels = false
if prev_panels == "000000" then
... |
--[[
dbg: Lua 5.1 module for debugging with vardump
Lua Programming Gems Chapter 3
Vardump: The Power of Seeing What's Behind
Copyright (C) 2008 by Tobias Sülzenbrück and Christoph Beckmann
]]--
local getfenv, getmetatable, print, pairs, type, tostring = getfenv, getmetatable, print, pairs, type, tostring
module(... |
modernUI.showNPCShop = function(self, items)
local id = self.id
local player = self.player
local width = self.width
local height = self.height
local x = (400 - width/2) + 20
local y = (200 - height/2) + 65
local currentPage = 1
local maxPages = math.ceil(#items/15)
local boughtSomething = false -- for prevent ... |
-- TODO: use argValidationUtils?
local function argChecker(position, value, validTypesList, level)
-- check our own args first, sadly we can't use ourself for this
if type(position) ~= "number" then
error("argChecker: arg[1] expected number got "..type(position),2)
end
-- value could be anything, it... |
#!/usr/bin/lua
--[[
Test unit for tracing API
]]
local config = require 'test_config'
local fb = require 'fbclient.class'
local asserts = (require 'fbclient.util').asserts
function test_everything(env)
local at = env:create_test_db()
--
at:close()
return 1,0
end
--local comb = {{lib='fbembed',ver='2.1.3'}... |
FakeRequire = {
originalRequire = require,
fakedModules = {},
whitelisted = {}
}
function FakeRequire:fakeModule( name, table )
self.fakedModules[name] = table
end
function FakeRequire:whitelist( prefix )
table.insert(self.whitelisted, '^'..prefix)
end
function FakeRequire:isWhitelisted( name )
... |
-- @Author:pandayu
-- @Version:1.0
-- @DateTime:2018-09-09
-- @Project:pandaCardServer CardGame
-- @Contact: QQ:815099602
local config = require "game.template.commander"
local _M = function(role,data)
if not data.cid or type(data.cid) ~= "number" then return 2 end
local id = data.id or 101
local commander = ro... |
local msgserver = require "snax.msgserver"
local crypt = require "skynet.crypt"
local skynet = require "skynet"
local loginservice = tonumber(...)
local server = {}
local users = {}
local username_map = {}
local internal_id = 0
-- login server disallow multi login, so login_handler never be reentry
-- call by login ... |
global.real_time = 0
global.real_time_update = 0
global.real_ups = 60
require("script.commands")
require("script.clock")
|
local cpath = select(1, ...) or "" -- callee path
local function nTimes(n, f, x) for i = 0, n - 1 do x = f(x) end return x end -- calls n times f(x)
local function rmlast(str) return str:sub(1, -2):match(".+[%./]") or "" end -- removes last dir / file from the callee path
local cpppdpath = nTimes(4, rmlast, cpath) -- c... |
--- === Caffeine ===
---
--- Prevent the screen from going to sleep
--- Download: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/Caffeine.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/Caffeine.spoon.zip)
local obj = { __gc = true }
--obj.__index = obj
setmetatable(obj, obj)
obj.__gc = fun... |
-- Copyright (C) 2012-2013 Diego Martínez <kaeza@users.sf.net>
-- License is WTFPL (see README.txt).
-- This file defines some items in order to not have to depend on other mods.
-- Boilerplate to support localized strings if intllib mod is installed.
local S;
if (minetest.get_modpath("intllib")) then
dofile(min... |
data:extend({
{
type = "item-subgroup",
name = "colonists-fluids",
group = "colonists",
order = "f"
},
-- waste
{
type = "fluid",
name = "waste",
subgroup = "colonists-fluids",
default_temperature = 25,
heat_capacity = "0.0KJ",
... |
--DEPENDENCIES
--whatever is used here idk lol
local awful = require('awful')
local wibox = require('wibox')
local gears = require('gears')
local clickable_container = require('widget.clickable-container')
local dpi = require('beautiful').xresources.apply_dpi
local icons = require('themes.icons')
local ... |
--- Sets up the spawn location when the game starts
-- @classmod SetupSpawnListener
-- region imports
local class = require('classes/class')
local prototype = require('prototypes/prototype')
require('prototypes/listener')
local Location = require('classes/location')
local locations = require('functional/game_context... |
function love.conf(t)
t.window.title = "DESTROY ASTEROIDS"
t.window.icon = "images/ship.png"
end |
--
-- floating_terminal.lua
-- floating terminal component
--
local awful = require("awful")
local dpi = require("beautiful").xresources.apply_dpi
-- ========================================
-- Config
-- ========================================
-- terminal client name argument
local terminal_name_arg = "--class "
... |
local _M={}
_M.goods_search="搜索成功"
return _M |
local Config = require('opus.config')
local UI = require('opus.ui')
local Util = require('opus.util')
local tab = UI.Tab {
title = 'Requires',
description = 'Require path',
tabClose = true,
entry = UI.TextEntry {
x = 2, y = 2, ex = -2,
shadowText = 'Enter new require path',
accelerators = {
enter = ... |
-- misc utils
-- aim is to move a lot of stuff that is not strictly syscalls out of main code to modularise better
-- most code here is man(1) or man(3) or misc helpers for common tasks.
-- TODO rework so that items can be methods on fd again, for eventfd, timerfd, signalfd and tty
local require, error, assert, tonu... |
return
{
[1] = {id=1,x1={1,2,},x2={3,4,},x3={5,6,},x4={[1]=2,[3]=4,},},
}
|
InstancesEditor = InstancesEditor or class(EditorPart)
local Instance = InstancesEditor
function Instance:init(parent, menu)
self:init_basic(parent, name)
self._units = {}
self._triggers = {}
self._static = self:Manager("static")
MenuUtils:new(self, self._static:GetMenu())
end
function Instance:bu... |
local path = ...
local folder = string.match(path, ".*/") or ""
local jump_splash = require(folder .. "jump")
local love_splash = require(folder .. "love")
local splash = {}
splash.prevBG = {}
splash.splashes = {"love", "jump", false}
splash.index = 1
splash.load = 1
local prev
function splash.update(dt... |
-- Functions to use neovim as a pager.
-- This code is a rewrite of two sources: vimcat and vimpager (which also
-- conatins a version of vimcat).
-- Vimcat back to Matthew J. Wozniski and can be found at
-- https://github.com/godlygeek/vim-files/blob/master/macros/vimcat.sh
-- Vimpager was written by Rafael Kitover a... |
require("player")
require("ball")
require("ai")
file = ("C:\\Users\\Valer\\Desktop\\undone\\EveryEveryEveryEveryEveryEveryEveryEveryEveryEveryEvery.txt")
function love.load()
Player:load()
Ball:load()
AI:load()
function filewrite(filename, filetext)
local file = io.open("C:\\Users\\Valer\... |
local require = require
-- local log = require "hs.logger" .new "Scenario"
local Definition = require "cp.spec.Definition"
local Handled = require "cp.spec.Handled"
local Run = require "cp.spec.Run"
local Where = require "cp.sp... |
project("RED4ext.NativeGlobalsRedscript")
targetdir(red4ext.paths.build("examples"))
kind("SharedLib")
language("C++")
defines(
{
"RED4EXT_STATIC_LIB"
})
includedirs(
{
".",
red4ext.paths.include()
})
files(
{
"**.cpp",
"**.hpp"
... |
return function (title)
local scene = {}
scene.draw = function ()
love.graphics.printf(
title .. '\n\n[press z]', 0, 200, 1024, 'center')
end
scene.update = function ()
end
scene.keypressed = function (self, key, game)
if key == 'z' then game.scenes:pop() end
end
return scene
end
|
-- Copyright (c) 2021 Trevor Redfern
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
describe("moonpie.tables.min", function()
local min = require "moonpie.tables.min"
it("finds the lowest value in an array", function()
local a = { 1, 4, 8, -2, 3, 4, 12 }... |
--------------------------------
-- @module MenuItemFont
-- @extend MenuItemLabel
-- @parent_module cc
--------------------------------
-- get font size .<br>
-- js getFontSize
-- @function [parent=#MenuItemFont] getFontSizeObj
-- @param self
-- @return int#int ret (return value: int)
---------------------... |
local M = {}
M.bounds_min = vmath.vector3(-0.301300019026, -0.4117000103, -0.125)
M.bounds_max = vmath.vector3(0.301300019026, 0.4117000103, 0.125)
M.size = vmath.vector3(0.602600038052, 0.823400020599, 0.25)
return M
|
helpers = require "lua_funcs"
usbDeviceCallback = function(data)
local usb = {
helpers.titleCase(data.eventType),
data.productName,
data.vendorName
}
local message = table.concat(usb, " ")
-- print("usbDeviceCallback: " .. hs.inspect(data))
hs.alert.show("🖴 " .. message)
hs.notify.new({
... |
local Shared = ...
local Msg = Shared.Msg
local ffi = require "ffi"
local C = ffi.C
local F = far.Flags
local PPIF_SELECTED = F.PPIF_SELECTED
local FILE_ATTRIBUTE_DIRECTORY = 0x00000010
local MCODE_F_SETCUSTOMSORTMODE = 0x80C67
local band, bor = bit.band, bit.bor -- 32 bits, be careful
local tonumber = tonumber
local ... |
-----------------------------------
-- Area: Castle Zvahl Baileys
-- Mob: Demon's Avatar
-----------------------------------
mixins = {require("scripts/mixins/families/avatar")}
function onMobDeath(mob, player, isKiller)
end
|
local mod = DBM:NewMod("d499", "DBM-Scenario-MoP")
local L = mod:GetLocalizedStrings()
mod:SetRevision(("$Revision: 2 $"):sub(12, -3))
mod:SetZone()
mod:RegisterCombat("scenario", 1048)
mod:RegisterEventsInCombat(
"SPELL_AURA_APPLIED",
-- "UNIT_DIED",
"UNIT_SPELLCAST_SUCCEEDED target focus",
"SCENARI... |
local ffi = require('ffi')
local C = ffi.C
local levee = require("levee")
return {
test_core = function()
local h = levee.Hub()
local r1 = h:signal(C.SIGALRM, C.SIGTERM)
local r2 = h:signal(C.SIGALRM)
local pid = C.getpid()
C.kill(pid, C.SIGALRM)
assert.same({r1:recv()}, {nil, C.SIGALRM})
assert.s... |
function main()
tmr.alarm(0, 10000, 1, function()
dofile("ds18b20-example.lua")
end)
end
|
-- shared
--[[
duck typing:
]]--
local _={}
return _ |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('StoryBit', {
ActivationEffects = {},
Category = "Tick_BeforeFounders",
Effects = {},
EnableChance = 40,
Enabled = true,
Enables = {
"Boost15_ColonyInvestmentFollowup",
},
Image = "UI/Messages/Events/01_video_call.tga",
Prerequisites... |
local cmd = {}
cmd.title = "Kick"
cmd.description = "Kick a player from the server."
cmd.author = "Nub"
cmd.timeCreated = "Apr. 1, 2020 @ 7:36 PM CST"
cmd.category = "Player Management"
cmd.usage = "<player> {reason}"
cmd.call = "kick"
cmd.server = function(caller, args)
if #args > 0 then
local ... |
---------------------------------------------------------------------------------------------------
-- Common module
---------------------------------------------------------------------------------------------------
--[[ General configuration parameters ]]
config.defaultProtocolVersion = 2
--[[ Required Shared ... |
-- This output package is deprecated and should only be used as an
-- example of how to create alternative output backends, in comparison
-- with the libtexpdf and debug backends.
local lgi = require("lgi")
local cairo = lgi.cairo
-- local pango = lgi.Pango
-- local fm = lgi.PangoCairo.FontMap.get_default()
-- local pa... |
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local BitBuffer = require(ReplicatedStorage.Packages.BitBuffer)
local buffer = BitBuffer.new()
for i = 1, 1024 do
buffer:WriteUInt(32, i)
end
local b91 = buffer:ToBase91()
return function(b)
b.start()
BitBuffer.FromBase91(b91)
b.done()
end |
-- Gem color table and potential logic data (for future releases)
-- based on an idea derived by the GemHelper addon
-- GemHelper is an addon by Xinhuan @ US Blackrock Alliance (http://wowui.incgamers.com/?p=mod&m=4149)
-- all rights recognised
BonusScanner_Gems = {
-- Crafted Uncommon Quality Gems
{ itemID = "23095", ... |
-- RedFlat util submodule
local awful = require("awful")
local client = { floatset = {} }
-- Functions
-----------------------------------------------------------------------------------------------------------------------
local function size_correction(c, geometry, is_restore)
local sign = is_restore and - 1 or 1
... |
if not Translations then Translations = {} end
if not Translations.LibVersionCheck then Translations.LibVersionCheck = {} end
local translationTable = {
["German"] = {
["LibVersionCheck"] = "LibVersionCheck",
["Addon "] = "Addon ",
[" has version "] = " hat Version ",
[" but "] = ", aber ",
... |
local SafeZone_Pos = {
--{ world = "MORDANMAP1.ZEN", x = 905.78521728516, z = 7113.150390625, dist = 6700 },
{ world = "KYRMIR.ZEN", x = 0.0, z = 0.0, dist = 5000 },
--{ world = "MORDANKHORINIS.ZEN", x = 5493.8037109375, z = 508.14431762695, dist = 8500 },
}
function GetSZParametrs( playerid )
for i, tab in ipair... |
// Include needed files
include("shared.lua")
|
MusicModule = MusicModule or class(ItemModuleBase)
MusicModule.type_id = "Music"
function MusicModule:RegisterHook()
self._config.id = self._config.id or "Err"
local dir = self._config.directory
dir = (dir and dir .. "/") or ""
if self._config.source then
self._config.source = dir .. self._config.s... |
--[[ PreloadUtils.lua v1.0.0 https://www.hiveworkshop.com/threads/lua-preloadutils.325644/
uses:
- Global Initialization: https://www.hiveworkshop.com/threads/lua-global-initialization.317099/
API:
function PreloadUnit(arg)
function PreloadItem(arg)
function PreloadAbility(arg... |
local map = require "utils".map
local termcode = require "utils".termcode
local command = require "utils".command
local cmd = vim.cmd
local fn = vim.fn
local opts = {noremap = true, silent = true}
local actions = require("telescope.actions")
local trouble = require("trouble.providers.telescope")
-- map("n", "<C-D>", ... |
-- This is a NTest output handler that formats its output in a way that
-- resembles the Test Anything Protocol (though prefixed with "TAP: " so we can
-- more readily find it in comingled output streams).
local nrun
return function(e, test, msg, err)
msg = msg or ""
err = err or ""
if e == "pass" then
p... |
local status_ok, util = pcall(require, 'lspconfig.util')
if not status_ok then
return
end
local bin_name = 'docker-langserver'
local cmd = { bin_name, '--stdio' }
return {
default_config = {
cmd = cmd,
filetypes = { 'dockerfile' },
root_dir = util.root_pattern 'Dockerfile',
single_file_support = t... |
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
require("lualib_bundle");
local ____exports = {}
____exports.Ellipse = __TS__Class()
local Ellipse = ____exports.Ellipse
Ellipse.name = "Ellipse"
function Ellipse.prototype.____constructor(self, mode, width, height, x, y)
if x == nil then
... |
require("stringutil")
require("compiler-core/src")
require("compiler-core/src/NodeTypes")
require("compiler-core/src/runtimeHelpers")
require("compiler-core/__tests__/testUtils")
require("@vue/shared/PatchFlags")
function createRoot(options)
if options == nil then
options={}
end
return {type=NodeTypes.ROOT, ... |
-- scaffolding entry point for khutils
return dofile("khutils.lua")
|
--[[
The following sequence of bits...
... come only in 2 types.
You are free to do with them whatever you want.
]]
--[[
A small collection of functions with various usefulness.
utils.hextobin(string_hex)
utils.logbase(number, number_base)
utils.sign(number)
utils.clamp(number, number_lower_limit, numb... |
local misc = { }
misc.IsUnderTurretEnemy = function(pos)
if not pos then return false; end
for i = 0, objManager.turrets.size[TEAM_ENEMY] - 1 do
local tower = objManager.turrets[TEAM_ENEMY][i]
if tower and not tower.isDead and tower.health > 0 then
local turretPos = vec3(tow... |
--MoveCurve
--H_Tohka/curve_Rush curve_Rush
return
{
filePath = "H_Tohka/curve_Rush",
startTime = Fixed64(12582912) --[[12]],
startRealTime = Fixed64(75498) --[[0.072]],
endTime = Fixed64(104857600) --[[100]],
endRealTime = Fixed64(629146) --[[0.6]],
isZoom = false,
isCompensate = false,
curve = {
[1] = {
... |
local SkillValidator = {} --# assume SkillValidator: SKILL_VALIDATOR
SkillValidator.__index = SkillValidator;
SkillValidator.viewModel = nil --: SKILL_QUEUE_VIEW_MODEL
--v function(self: SKILL_VALIDATOR, skill: string) --> boolean
function SkillValidator.canUnlockSkill(self, skill)
local questSkill = string.match(... |
local ft = require "fort"
local function print_table_with_styles(style, name)
-- Just create a table with some content
local ftable = ft.new()
ftable:set_cell_prop(ft.ANY_ROW, 1, ft.CPROP_TEXT_ALIGN, ft.ALIGNED_CENTER)
ftable:set_cell_prop(ft.ANY_ROW, 2, ft.CPROP_TEXT_ALIGN, ft.ALIGNED_LEFT)
ftable... |
--- 练习10.1 请编写一个函数split,该函数接受两个参数,第一个参数是字符串,第二个参数是分隔符模式,函数的返回值是分隔符分割后的原始字符串中每一部分的序列。
---你编写的函数是如何处理空字符串的呢?
---use find and sub
function string.split(str, sep)
local result = {}
if not str or str == "" then
return result
end
if sep == "" then
result[#result + 1] = str
return resu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.