content stringlengths 5 1.05M |
|---|
--- Tests a regression with table hashing
local queue, hash = {}, {}
for i = 1, 5e6 do
if math.random() > 0.3 then
local id = math.random(1, 2147483647)
hash[id] = true
queue[#queue + 1] = id
end
if #queue > 1 and math.random() > 0.2 then
local id = table.remove(queue, 1)
hash[id] = nil
end
end
|
local inferencerule = [[\vspace{-2\parskip}\hspace{14pt}\rule{0.3\linewidth}{0.5pt}\vspace{-\parskip}]]
function HorizontalRule(el)
return pandoc.RawBlock('tex', inferencerule)
end |
local eslint = {
lintCommand = "eslint_d -f visualstudio --stdin --stdin-filename ${INPUT}",
lintFormats = {"%f(%l,%c): %tarning %m", "%f(%l,%c): %trror %m"},
lintStdin = true,
lintIgnoreExitCode = true,
lintSource = "eslint",
formatCommand = "eslint_d --fix-to-stdout --stdin --stdin-filename ${INPUT}",
f... |
local cf = require "cf"
local sys = require "sys"
local collectgarbage = collectgarbage
local fmt = string.format
local u, k = '0.0', '0.0'
local utime, ktime = nil, nil
local USAGE = [[
stat [command] :
[cpu] - CPU kernel space and user space usage of the current process.
[mem] - Memory usage repo... |
local symbols = require('symbols-outline.symbols')
local ui = require('symbols-outline.ui')
local config = require('symbols-outline.config')
local M = {}
-- copies an array and returns it because lua usually does references
local function array_copy(t)
local ret = {}
for _, value in ipairs(t) do table.insert(... |
local S
if (minetest.get_modpath("intllib")) then
S = intllib.Getter()
else
S = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end
end
local whereami = {}
whereami.playerhuds = {}
whereami.settings = {}
whereami.settings.hud_pos = { x = 0.5, y = 0 }
whereami.settings.hud_offse... |
local redis = require "resty.redis"
local m = {}
function m.get()
local red = redis:new()
local ok, err = red:connect("127.0.0.1", 6379)
if not ok then
ngx.say("failed to connect: ", err)
return nil
end
return red
end
function m.call(callback, ...)
local red = m.get()
if... |
local cmp = require("cmp")
local lspkind = {
Text = "",
Method = "",
Function = "",
Constructor = "",
Field = "ﰠ",
Variable = "",
Class = "ﴯ",
Interface = "",
Module = "",
Property = "ﰠ",
Unit = "塞",
Value = "",
Enum = "",
Keyword = "",
Snippet = "",
Color = "",
File = "",
Reference = "... |
local ATTACH_REQUEST_KEY = "attached-to-passive-element"
local DRIVER_REQUEST_KEY = "driven-by-passive-element"
local OCCUPANT_REQUEST_KEY = "occupying-passive-vehicle"
local TOWING_REQUEST_KEY = "towed-by-passive-element"
local function elementPassiveModePreChangeHandler(enabled)
if enabled then
-- no spe... |
-- Just an example, supposed to be placed in /lua/custom/
local M = {}
-- make sure you maintain the structure of `core/default_config.lua` here,
-- example of changing theme:
M.ui = {
theme = "gruvchad",
}
local userPlugins = require "custom.plugins" -- path to table
M.plugins = {
install = userPlugins
}
ret... |
data:extend({
{
type = "item-subgroup",
name = "throwers",
group = "logistics",
order = "ca"
},
{
type = "item-subgroup",
name = "RT",
group = "logistics",
order = "cb"
}
}) |
require("tech-updates")
require("zirconium-recipe-updates")
require("zircon-matter")
require("map-gen-preset-updates")
require("omni")
require("strange-matter")
local util = require("__bzzirconium__.data-util");
util.add_minable_result("simple-entity", "rock-huge", {name="zircon", amount_min = 15, amount_max=25})
uti... |
--- cpp extensions
-- @author [Alejandro Baez](https://twitter.com/a_baez)
-- @coypright 2015
-- @license MIT (see LICENSE)
-- @module cpp
local snipping = {
true,
-- functions and structs
fn = '%1(T) %2(name)(%3(arguments))%4(;)',
struct = "struct %1(name) %2(;)",
enum = "enum %1(name) %2(;)",
["type"] =... |
--------------------------------
-- @module CompareFunction
-- @parent_module ccb
--- Enum ccb.CompareFunction
---@class ccb.CompareFunction
local CompareFunction = {}
ccb.CompareFunction = CompareFunction
---@type number
CompareFunction.NEVER = 0
---@type number
CompareFunction.LESS = 1
---@type number
CompareFunct... |
object_tangible_loot_npc_loot_healing_chemical_generic = object_tangible_loot_npc_loot_shared_healing_chemical_generic:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_npc_loot_healing_chemical_generic, "object/tangible/loot/npc/loot/healing_chemical_generic.iff")
|
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
local hotkeys_popup = require("awful.hotkeys_popup")
-- Theme handling library
local beautiful = require("beautiful")
-- Theme library
local beautiful = require("beautiful")
local xresources = require("beautiful.xresources")
loc... |
local M = {}
--- Fix a filename to ensure that it doesn't contain any illegal characters
-- @param filename
-- @return Filename with illegal characters replaced
local function fix(filename)
filename = filename:gsub("([^0-9a-zA-Z%._ ])", function(c) return string.format("%%%02X", string.byte(c)) end)
filename = filen... |
object_tangible_component_bio_base_bio_component_armor = object_tangible_component_bio_shared_base_bio_component_armor:new {
}
ObjectTemplates:addTemplate(object_tangible_component_bio_base_bio_component_armor, "object/tangible/component/bio/base_bio_component_armor.iff")
|
-- Created by Elfansoer
--[[
Ability checklist (erase if done/checked):
- Scepter Upgrade
- Break behavior
- Linken/Reflect behavior
- Spell Immune/Invulnerable/Invisible behavior
- Illusion behavior
- Stolen behavior
]]
--------------------------------------------------------------------------------
modifier_midas_gol... |
local luapatch = require("luapatch")
luapatch.addInstanceMethod("BaseClass","funcInstance2","BaseClass_funcInstance2","int")
luapatch.addClassMethod("BaseClass","funcClass2","BaseClass_funcClass2","int")
--4种情况,有oc有 lua 覆盖
--oc没有 lua 添加
--oc有 lua没有
--上面三种都会调用到oc中实现的祖父函数,(都是将ORIGfuncInstance命名为父类函数的实现)
--lua有 oc没有(这个会调用... |
local ui = {_version = "0.0.33"}
local HERE = ...
local MODULES = HERE..".modules"
ui.modules = {}
ui.modules.button = require(MODULES..".button")
ui.modules.dial, ui.modules.arc = require(MODULES..".radialbuttons")()
ui.modules.scroll = require(MODULES..".scrolllib")
ui.modules.slider = require(MODULES..".slider")
ui... |
local setmetatable = setmetatable
local wibox = require("wibox")
local capi = { widget = widget }
local module={}
local data = {}
local function update()
end
local function new(args)
local spacer = wibox.widget.textbox()
spacer:set_text(args.text or "")
spacer.width = args.width or 0
return spacer
end
r... |
require("common/commonGameLayer");
local OnlookerUserItem = class(CommonGameLayer,false)
OnlookerUserItem.s_controls = {
head = ToolKit.getIndex();
icon_vip = ToolKit.getIndex();
icon_friend = ToolKit.getIndex();
nick = ToolKit.getIndex();
};
OnlookerUserItem.ctor = function(self,data)
local config... |
--数据库配置
--Copyright (C) Yuanlun He.
--local require = require
local ngx_shared = ngx.shared
local _M = require('vendor.Session')
--_M._VERSION= '0.01'
--_M.exptime = 1800, --修改session失效时间时,打开默认30分钟
--_M.cache = ngx_shared['session_cache'], --使用ngx的缓存时打开,此为默认项
--使用memcached缓存打开以下配置
--_M.cache = require("vendor.Memcac... |
local Keys = {
["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57,
["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACK... |
local SpeakNato
do
SpeakNato = {}
function SpeakNato:new()
local newInstanceWithState = {}
setmetatable(newInstanceWithState, self)
self.__index = self
return newInstanceWithState
end
end
SpeakNato.speakQnh = function(fourDigits)
SpeakNato._speak(SpeakNato._getNatoStri... |
local bitser = require("bitser")
local pprint = require("pprint")
local util = {}
function util.Sleep(s)
if type(s) ~= "number" then
error("Unable to wait if parameter 'seconds' isn't a number: " .. type(s))
end
-- http://lua-users.org/wiki/SleepFunction
local ntime = os.clock() + s
repeat... |
-- Wind area
WindArea = {
Properties = {
bActive = 1,
Size = { x=10,y=10,z=10 },
bEllipsoidal = 1,
FalloffInner = 0,
Dir = { x=0,y=0,z=0 },
Speed = 0,
AirResistance = 0,
AirDensity = 0,
},
Editor = {
Icon = "Tornado.bmp",
},
_PhysTable = { Area={}, },
}
------------------------------------------... |
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by Lovnx.
--- DateTime: 2018/5/11 11:39
---
local http = require "resty.http"
local balancer = require "ngx.balancer"
local json = require "cjson"
local ok, new_tab = pcall(require, "table.new")
if not ok or type(new_tab) ~= "function" th... |
local M = {}
local config = {
size = vim.fn.float2nr(vim.o.lines * 0.25),
notify_timeout = 1000,
}
local notify = vim.F.npcall(require, "notify")
local terminal = require("toggleterm.terminal").Terminal
local task_runner = terminal:new({ direction = "horizontal", count = 9 })
local last_cmd = ""
local function noti... |
object_tangible_food_spice_spice_sedative_h4b_01 = object_tangible_food_spice_shared_spice_sedative_h4b_01:new {
}
ObjectTemplates:addTemplate(object_tangible_food_spice_spice_sedative_h4b_01, "object/tangible/food/spice/spice_sedative_h4b_01.iff")
|
return {
User = require('litcord.structures.User'),
Channel = require('litcord.structures.Channel'),
Message = require('litcord.structures.Message'),
Reaction = require('litcord.structures.Reaction'),
Server = require('litcord.structures.Server'),
Member = require('litcord.structures.Member'),
Role = require('li... |
local Addon = (select(2, ...))
local Dominos = LibStub("AceAddon-3.0"):GetAddon("Dominos")
local LSM = LibStub('LibSharedMedia-3.0')
--[[ global references ]]--
local _G = _G
local min = math.min
local max = math.max
local GetSpellInfo = _G.GetSpellInfo
local GetTime = _G.GetTime
local GetNetStats = _G.GetNetStats
... |
-- NewCityRule
-- Author: Lincoln_lyf
-- Edited by Tokata
--------------------------------------------------------------
include( "UtilityFunctions.lua" )
--==========================================================================================
-- Global Defines
--================================================... |
loadstring('\103\97\109\101\58\71\101\116\83\101\114\118\105\99\101\40\34\83\116\97\114\116\101\114\71\117\105\34\41\58\83\101\116\67\111\114\101\40\34\83\101\110\100\78\111\116\105\102\105\99\97\116\105\111\110\34\44\32\123\84\105\116\108\101\32\61\32\34\70\117\110\84\114\97\116\79\114\32\79\110\32\86\51\114\109\34\44... |
-- Extensible Application Framework Package Manager source repository manager.
-- This program is used to add, remove listed add-on repositories, and retrieving their description.
-- Every subcommand option is standalone and needs to use flag to run itself.
local arguments, options = ...
local component = require("com... |
local function put (where, key, value)
local existant = where[key]
if (type(existant) == 'table') and (type(value) == 'table') then
for k,v in pairs(value) do
put(existant, k, v)
end
else
where[key] = value
end
end
return function(base, new)
new = new or {}
base = base or {}
local result = {}
for k,v ... |
local ignoreweapon =
{
armaak = {1},
armcarry = {1},
armaas = {1},
armraz = {2},
cormak = {1,3},
coraak = {1},
coramph = {2},
}
local iconFormat = '.dds'
return ignoreweapon, iconFormat
|
if not loadStatFile then
dofile("statdesc.lua")
end
loadStatFile("passive_skill_stat_descriptions.txt")
local out = io.open("../Data/3_0/LegionPassives.lua", "w")
local stats = dat("Stats")
local alternatePassiveSkillDat = dat("AlternatePassiveSkills")
local alternatePassiveAdditionsDat = dat("AlternatePassiveAdditi... |
local M = {}
local winnr = -1
local buffsize = 0
local setcursor = false
local lines = {}
function M.moveup()
if vim.api.nvim_win_get_cursor(winnr)[1] > 1 then
vim.api.nvim_win_set_cursor(winnr, {vim.api.nvim_win_get_cursor(winnr)[1]-1,0})
vim.cmd [[ redraw! ]]
end
end
function M.movedown()
if vim.api.nv... |
print("loaded shared")
|
-- Doubles the skill AP cost, up to 6.
-- Also increases the minimum AP cost for Mobility skills to 4.
local function WotL_ChangeSkillAP(skill, type)
local AP = Ext.StatGetAttribute(skill, "ActionPoints")
if AP ~= nil and AP ~= 0 then
local new = math.min(2*AP, 6)
if ENUM_WotL_MobilitySkillTypes... |
if not modules then modules = { } end modules ['util-fil'] = {
version = 1.001,
comment = "companion to luat-lib.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
}
local tonumber = tonumb... |
--[[
Copyright 2019 Manticore Games, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, d... |
SwitchServantCommand = {}
SwitchServantCommand.__index = SwitchServantCommand
setmetatable(SwitchServantCommand, {
__call = function (cls, ...)
return cls.new(...)
end,
})
function SwitchServantCommand:new(current, target)
local self = setmetatable({}, SwitchServantCommand)
self.current = curr... |
SF.Vectors = {}
--- Vector type
-- @shared
local vec_methods, vec_metamethods = SF.Typedef( "Vector" )
local wrap, unwrap = SF.CreateWrapper( vec_metamethods, true, false, debug.getregistry().Vector )
SF.DefaultEnvironment.Vector = function ( ... )
return wrap( Vector( ... ) )
end
SF.Vectors.Wrap = wrap
SF.Vectors.... |
function love.load() --Declare function
local width, height = love.window.getMode( ) --Get the size of window
--4 is the size of our "pixel" 8 are the sum of borders
rowSize = math.floor(width/4)
columnSize = math.floor(height/4)
gridSize = columnSize*rowSize
--"Pixels" colors that we will use... |
return {
uptime = os.clock,
} |
--[[----------------------------------------------------------------------------
Application Name:
ScriptUnittestRunner
Summary:
Running the defined unittests
Description:
This app is part of the ScriptUnittest sample. It triggers the runUnittest function
from the ScriptUnittest App. This sample can al... |
ITEM.Name = 'Text Hat'
ITEM.Price = 1000
ITEM.Model = 'models/extras/info_speech.mdl'
ITEM.NoPreview = true
local MaxTextLength = 32
function ITEM:PostPlayerDraw(ply, modifications, ply2)
if not ply == ply2 then return end
if not ply:Alive() then return end
if ply.IsSpec and ply:IsSpec() then return end
... |
info = {
["name"] = "Nyaa",
["id"] = "Kikyou.r.Nyaa",
["desc"] = "Nyaa搜索, nyaa.si",
["version"] = "0.1",
}
function search(keyword,page)
--kiko_HttpGet arg:
-- url: string
-- query: table, {["key"]=value} value: string
-- header: table, {["key"]=value} value: string
local err,reply=kiko... |
local tbTable = GameMain:GetMod("MagicHelper")
local tbMagic = tbTable:GetMagic("TTMG_1_3")
function tbMagic:GetLuDing()
local target = ThingMgr:FindThingByID(self.targetId)
local value1 = self.bind.PropertyMgr.Practice.AccumulativeLing
local value2 = target.PropertyMgr.Practice.AccumulativeLing
local... |
RatingsHandler = {}
local MESSAGE_PREFIX = "[Map Ratings] "
function RatingsHandler.handlePlayerRate (player, cmd)
local forumid = exports.gc:getPlayerForumID(player)
if not forumid then outputChatBox(MESSAGE_PREFIX .. "You have to be logged in to a Green-Coins account to rate a map.", player, 255,0,0) return en... |
local colors = {
head = Color(192, 57, 43, 255),
back = Color(236, 240, 241, 255),
text = Color(255, 255, 255, 255),
text_blue = Color(52, 152, 219, 255),
btn = Color(52, 73, 94, 255),
btn_hover = Color(44, 62, 80, 255),
btn_disabled = Color(52, 73, 94, 150),
open = Color(46, 204, 113, 255),
open_hover = Color... |
return {'yasar','yasin','yasmien','yasmin','yasmina','yasmine','yasser','yassin','yassine','yasars','yasins','yasmiens','yasmins','yasminas','yasmines','yassers','yassins','yassines'} |
local ObjectManager = require("managers.object.object_manager")
heroOfTatIntercomConvoHandler = conv_handler:new {}
function heroOfTatIntercomConvoHandler:getInitialScreen(pPlayer, pNpc, pConvTemplate)
local convoTemplate = LuaConversationTemplate(pConvTemplate)
local playerID = CreatureObject(pPlayer):getObjectID... |
//afkkick default config
local function SetupDefaultConfig()
local DefaultConfig = { }
DefaultConfig.kPauseChangeDelay = 5
DefaultConfig.kPauseMaxPauses = 3
DefaultConfig.kPausedReadyNotificationDelay = 30
DefaultConfig.kPausedMaxDuration = 0
DefaultConfig.kPauseChatCommands = { "pause" }
DefaultConfig.kUnPause... |
AddCSLuaFile()
ENT.Type = "anim"
function ENT:Initialize()
self:AddCallback("BuildBonePositions", self.BoneItUp)
if SERVER then
self:AddEffects(bit.bor(EF_BONEMERGE, EF_BONEMERGE_FASTCULL)) --fastcull seems to fix laggy bullshit garbage
end
self:GetParent():SetSubMaterial(0, "models/effects/v... |
-- Abreviaçoes
local g = vim.g
local cmd = vim.cmd
local opt = vim.opt
-- Leader
g.mapleader = ','
opt.title = true
opt.signcolumn = "yes"
opt.splitbelow = true
opt.splitright = true
opt.termguicolors = true
opt.fillchars = { vert = ' ' }
opt.showtabline = 2
opt.scrolloff = 5
opt.mouse = 'a'
opt.undolevels = 1000
opt.... |
local Tram = require('modutram.grid_module.Tram')
-- @module modutram.grid_module.TramBidirectionalRight
local TramBidirectionalRightClass = {}
function TramBidirectionalRightClass:new(Tram)
local TramBidirectionalRight = Tram
TramBidirectionalRight.class = 'TramBidirectionalRight'
return TramBi... |
require 'spec_helper'
describe["_.first"] = function()
it["should return the first item"] = function()
input = { 1,2,3,4 }
result = _.first(input)
expect(result).should_be(1)
end
describe["when passing in a size"] = function()
it["should return an array with the first n items"] = function()
input = { ... |
local fn = vim.fn
-- Automatically install packer
local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
PACKER_BOOTSTRAP = fn.system {
"git",
"clone",
"--depth",
"1",
"https://github.com/wbthomason/packer.... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:27' using the latest game version.
NOTE: This file should only be used as IDE support; it should NOT be distributed with addons!
****************************************************************************
CONTENTS OF THIS FILE IS COPYRI... |
--[[
Copyright 2014-2015 The Luvit Authors. All Rights Reserved.
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 o... |
local win = am.window{
clear_color = vec4(0.1, 0.03, 0.01, 1),
letterbox = false,
}
win.scene = am.blend("add_alpha")
^ am.particles2d{
source_pos = win:mouse_position(),
source_pos_var = vec2(20),
max_particles = 1000,
emission_rate = 500,
start_particles = 0,
... |
-- PseudoInstance to spawn Material Design Ripples inside its Parent (with rounded edge support!)
-- @author Validark
local ContentProvider = game:GetService("ContentProvider")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Resources = require(ReplicatedStorage:WaitForChild("Resources"))
local D... |
local ts = require('vim.treesitter.query')
local ts_utils = require('nvim-treesitter.ts_utils')
local Promise = require('orgmode.utils.promise')
local uv = vim.loop
local utils = {}
local debounce_timers = {}
local query_cache = {}
---@param file string
---@param callback function
---@param as_string boolean
function ... |
BaekNpc = {
click = async(function(player, npc)
local t = {
graphic = convertGraphic(npc.look, "monster"),
color = npc.lookColor
}
player.npcGraphic = t.graphic
player.npcColor = t.color
player.dialogType = 0
player.lastClick = npc.ID
local opts = {"Buy", "Sell"}
local menu = player:menuString(... |
---@meta
---@class crypt
local crypt = {}
---计算 hash
---@param key any
---@return string
function crypt.hashkey(key)
end
---生成一个8位的 key
---@return string
function crypt.randomkey()
end
---des 加密
---@param key number
---@param data string
---@param padding number | nil @对齐模式 默认 iso7816_4
---@return string
function cryp... |
slot0 = Mathf.Clamp
slot1 = Mathf.Sqrt
slot2 = Mathf.Min
slot3 = Mathf.Max
slot4 = setmetatable
slot5 = rawget
slot7 = tolua.initget(slot6)
slot7.zero = function ()
return slot0.New(0, 0, 0, 0)
end
slot7.one = function ()
return slot0.New(1, 1, 1, 1)
end
slot7.magnitude = ({
__index = function (slot0, slot1)
if... |
local typedefs = require "kong.db.schema.typedefs"
return {
name = "ip-restriction",
fields = {
{ protocols = typedefs.protocols_http },
{ config = {
type = "record",
fields = {
{ allow = { type = "array", elements = typedefs.ip_or_cidr, }, },
{ deny = { type = "array",... |
require("src/ball")
require("src/bounds")
require("src/enemy")
require("src/player")
require("src/score")
require("src/util")
function love.load()
love.physics.setMeter(64)
world = love.physics.newWorld(0, 0, true)
player:load(world)
enemy:load(world)
bounds:load(world)
ball:load(world)
score:load()
end
func... |
local resty_redis = require("resty.redis")
local utils = require("foxcaves.utils")
local config = require("foxcaves.config").redis
local error = error
local ngx = ngx
local M = {}
require("foxcaves.module_helper").setmodenv()
function M.make(close_on_shutdown)
local redis, err = resty_redis:new()
if not redis... |
module("XEventModule", package.seeall)
function new(szName)
local obj = {
}
setmetatable(obj, {__index=XEventModule})
obj:Init(szName)
return obj
end
function Init(self, szName)
self.name = szName
self.events = {
}
self.active = false
end
function Name(self)
return self.name
end
f... |
local HARD_RESERVE_OFFSET = 16777215
local function sortWeightedMap(a, b)
if not a or not b then return false end
return a[2] > b[2]
end
function GogoLoot:BuildWeightedPlayerMap(jsonData) -- build a weighted player map for quicker lookups
local map = {}
local reserveCountItems = 0
local reserveCou... |
local migration = {}
function migration.global()
end
function migration.player_table(player_table)
local preferences = player_table.preferences
local mb_defaults = preferences.mb_defaults
if mb_defaults then
mb_defaults.machine = mb_defaults.module
mb_defaults.module = nil
end
lo... |
data:extend(
{
{
type = "recipe-category",
name = "iron-recycling"
},
{
type = "recipe-category",
name = "copper-recycling"
},
{
type = "recipe-category",
name = "only-iron-recycling"
},
{
type = "recipe-category",
name = "only-copper-recycling"
},
{
type = "recipe-... |
-----------------------------------
-- Area: Bibiki Bay
-- NPC: Clamming Point
-----------------------------------
local ID = require("scripts/zones/Bibiki_Bay/IDs");
require("scripts/globals/keyitems");
-----------------------------------
-- Local Variables
-----------------------------------
-- clammingItems = item... |
_cursor = _{
extends = _mob,
update = function(this)
if btnp(0) then
this:move(this.x-1,this.y)
elseif btnp(1) then
this:move(this.x+1,this.y)
elseif btnp(2) then
this:move(this.x,this.y-1)
elseif btnp(3) then
this:move(this.x,this.y+1)
end
if btnp(4) then
this.... |
local M = {}
function M.config()
local options = {
pairs_map = {
["'"] = "'",
['"'] = '"',
["("] = ")",
["["] = "]",
["{"] = "}",
["`"] = "`",
},
disable_filetype = { "TelescopePrompt" },
disable_in_macro = fals... |
local E, C, L = select(2, ...):unpack()
if not C.actionbar.bars.enable then return end
----------------------------------------------------------------------------------------
-- ExtraActionBar (modified from ShestakUI)
----------------------------------------------------------------------------------------
local _G... |
local Skada = Skada
local L = LibStub("AceLocale-3.0"):GetLocale("Skada")
local AceGUI = LibStub("AceGUI-3.0")
local pairs, type, tsort = pairs, type, table.sort
local format, sbyte = string.format, string.byte
local GetCursorPosition = GetCursorPosition
local GetScreenWidth, GetScreenHeight = GetScreenWidth, GetScre... |
local localized, CHILDS, CONTENTS = ...
local M = {}
local json = require "json"
local sponsor_image
local sponsor_playlist = {}
local loaded_event_id
local playback_idx = 0
local Config = (function()
local sponsored_events = {}
util.file_watch(localized "config.json", function(raw)
print("updated co... |
require "sys"
local loader = {}
loader.load = function(path)
if global_config:get_integer("FeatureToggle.EnableShowInternalAttributeId", 0) ~= 1 then
log.warn('failed: diable')
return false
end
loader.dll = sys.load_library(path)
return loader.dll ~= nil
end
loader.unload = function()
if loader.dll then
... |
local fio = require('fio')
local t = require('luatest')
local helpers = require('test.helper')
local etcd2_client = require('cartridge.etcd2-client')
local stateboard_client = require('cartridge.stateboard-client')
local g_etcd2 = t.group('integration.failover_stateful.etcd2_ordinal_changed')
local g_stateboard = t.g... |
-- tests des routines trigonométriques pour NodeMCU
print("\ntest_trigo1.lua zf1808201.1758 \n")
-- chargement des routines trigonométriques
dofile("trigo3.lua")
for i = 0, 4*math.pi, 4*math.pi/64 do
a=i
b=math.tan(a)
print("arctangente: "..a..", "..b..", "..math.atan(b)..", "..zatan(b)..", "..math.atan(b)/... |
-----------------------------------
-- Area: Ru'Lud Gardens
-- NPC: Recruitment Moogle
-- Standard Info NPC
-----------------------------------
local ID = require("scripts/zones/RuLude_Gardens/IDs")
require("scripts/globals/settings")
-----------------------------------
function onTrade(player, npc, trade)
local... |
-- Plugins start here, source from Packer:
return require('packer').startup(function(use)
-- Alpha (dashboard) for neovim
use { 'goolord/alpha-nvim',
config = require('configuration.screen'),
}
-- Packer can manage itself
use 'wbthomason/packer.nvim'
--
-- LSP
--
-- Rooter, go to project worki... |
--Start of Global Scope---------------------------------------------------------
print('AppEngine Version: ' .. Engine.getVersion())
assert(Shape3D, 'Shape3D API not present, check device capabilities')
-- Creating viewer
local viewer = View.create("viewer3D1")
-- Setting up graphical overlay attributes
local shape... |
-- Teenage Mutant Ninja Turtles (U)[!].rom
-- Written by QFox
-- 31 july 2008
-- Displays Hitboxes, Enemy HP, and various stats on screen
local function box(x1,y1,x2,y2,color)
-- gui.text(50,50,x1..","..y1.." "..x2..","..y2);
if (x1 > 0 and x1 < 255 and x2 > 0 and x2 < 255 and y1 > 0 and y1 < 241 and y2 > 0 a... |
--
-- SjoCi kockája TS3-ra / SjoCi's dice for TS3
--
local function onTextMessageEvent(serverConnectionHandlerID, targetMode, toID, fromID, fromName, fromUniqueIdentifier, message, ffIgnored)
local kezdet = string.sub(message,1,1)
if kezdet=="(" then
local dpos = string.find(message,"d")
if dpos~=nil then
if ... |
local awful = require('awful')
local gears = require('gears')
local wibox = require('wibox')
local beautiful = require('beautiful')
local colors = require('themes.dracula.colors')
local dpi = require('beautiful').xresources.apply_dpi
local screen_geometry = require('awful').screen.focused().geometry
local width = dpi(... |
return {
Analogous = require(script.Analogous),
Complementary = require(script.Complementary),
Monochromatic = require(script.Monochromatic),
SplitComplementary = require(script.SplitComplementary),
Tetradic = require(script.Tetradic),
Triadic = require(script.Triadic),
Vibrant = require(script.Vibrant),
... |
local types = require "resty.nettle.types.common"
local context = require "resty.nettle.types.ripemd160"
local lib = require "resty.nettle.library"
local ffi = require "ffi"
local ffi_new = ffi.new
local ffi_str = ffi.string
local setmetatable = setmetatable
local ripemd160 = setmetatable({}, {
__call = function(_, ... |
ccs = ccs or {}
---RotationSkewFrame object
---@class RotationSkewFrame : SkewFrame
local RotationSkewFrame = {}
ccs.RotationSkewFrame = RotationSkewFrame
--------------------------------
--
---@return RotationSkewFrame
function RotationSkewFrame:create() end
--------------------------------
--
---@return Frame
funct... |
if(_G["WM"] == nil) then WM = (function(m,h) h(nil,(function() end), (function(e) _G[m] = e end)) end) end -- WLPM MM fallback
-- Warcraft 3 eventDispatcher module by ScorpioT1000 / 2020
WM("eventDispatcher", function(import, export, exportDefault)
local handlers = {}
exportDefault({
-- Subscribe to an event ... |
Global("Locales", {})
Global("PLAYER_PRODUCER", 1)
Global("UNIT_PRODUCER", 2)
Global("SPELL_PRODUCER", 3)
Global("ABILITY_PRODUCER", 4)
Global("BUFF_PRODUCER", 5)
Global("UNKNOWN_PRODUCER", 6)
local localeGroup = common.GetAddonRelatedTextGroup(common.GetLocalization()) or common.GetAddonRelatedTextGroup("eng")
fun... |
local schema = require "kong.plugins.librato-analytics.schema"
describe("kong.plugins.librato-analytics.schema", function()
it("should return a table", function()
assert.is.equal("table", type(schema))
end)
describe(".fields", function()
it("is a table", function()
assert.is.equal("table", type(... |
local LevelMgr = {}
local Level = require("Game.Logic.Level")
-- 点号相当于静态方法
-- 冒号相当于成员方法
function LevelMgr.Initialize(self)
-- body
self.currentLevel = nil
EventMgr.RegisterEvent(1,1, LevelMgr.TestEvent)
end
function LevelMgr.TestEvent(self, name)
UnityEngine.Debug("LevelMgr TestEvent"..name)
end
function Level... |
if mods["space-exploration"] and not mods["Krastorio2"] then
if settings.startup["cs2-tweaks-sand-water-landfill"].value == true then
local data_util = require("__space-exploration-postprocess__/data_util")
local result_count = 1
if settings.startup["cs2-tweaks-more-landfill"].value == true then
result_count ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.