content stringlengths 5 1.05M |
|---|
local skynet = require "skynet"
local log = require "log"
local env = require "faci.env"
local libcenter = require "libcenter"
local libdbproxy = require "libdbproxy"
local runconf = require(skynet.getenv("runconfig"))
local games_common = runconf.games_common
local libmodules = {}
--local function init_modules()
-... |
local require = require
local cjson = require("cjson")
local tools = require("wtf.core.tools")
local Object = require("wtf.core.classes.object")
local configurable_object = Object:extend()
function configurable_object:set_policy(object_policy)
self.policy = object_policy
return self
end
function configurable_objec... |
--[[
Lettersmith Serialization
Serialization plugin for Lettersmith. Useful for debugging.
Two functions are provided:
serialize(info_string, predicate, write_fn)
This function takes three arguments:
- `info_string`: to be written at the top of each serialization (default: "")
- `predicate`: a predicate functi... |
-- Copyright (c) 2018 Redfern, Trevor <trevorredfern@gmail.com>
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
local tiny = require "ext.tiny-ecs"
local List = require "ext.artemis.src.list"
local EntityTracker = tiny.system()
EntityTracker.filter = tiny.requireAny("entit... |
----------------------------------------------------------------------------------
--- Total RP 3
--- Directory : main API
--- ---------------------------------------------------------------------------
--- Copyright 2014 Sylvain Cossement (telkostrasz@telkostrasz.be)
--- Copyright 2014-2019 Renaud "Ellypse" Parize <el... |
local UserSettings = {}
local HttpService = game:GetService("HttpService")
local Network = game.ReplicatedStorage.Network
UserSettings.Store = {}
UserSettings.Settings = {}
function UserSettings.parseJSON(player, data)
local settings = HttpService:JSONDecode(data)
UserSettings.Store[player] = settings
e... |
if nil ~= require then
require "fritomod/OOP-Class";
require "fritomod/ListenerList";
end;
local MouseWheelListener = OOP.Class("MouseWheelListener", ListenerList);
function MouseWheelListener:Constructor(frame)
MouseWheelListener.super.Constructor(self, "MouseWheel listener");
self.frame = frame;
self:AddInsta... |
require "nn"
--[[
Spatial Pyramid Pooling layer.
Applies a Max Pooling operation at different window sizes and strides,
and then concatenates together all the outputs. The advantage is that
the output size is the same regardless of the input size.
Example:
VGG16 last convolutional feature maps ha... |
require('settings')
require('mappings')
require('packer-config')
require('colorschemes-config.catppuccin')
require('nvim-treesitter-config')
require('nvim-tree-config')
require('lsp-config.language-servers')
require('lsp-config.nvim-cmp')
require('statusline-config.lualine')
require('telescope-config')
require('barbar-... |
vim.cmd([[
autocmd BufNewFile,BufRead *.py noremap <F5> :!python3 % ; echo "" ; read<enter>
autocmd BufNewFile,BufRead *.rb noremap <F5> :!ruby % ; echo "" ; read<enter>
autocmd BufNewFile,BufRead *.lisp noremap <F5> :!clisp % ; echo "" ; read<enter>
autocmd BufNewFile,BufRead *.cpp noremap <F5> :!fname=$(mktemp)... |
--------------------------------------------------------------------------------
-- Module Declaration
--
local mod, CL = BigWigs:NewBoss("Houndmaster Braun", 1001, 660)
if not mod then return end
mod:RegisterEnableMob(59303)
--------------------------------------------------------------------------------
-- Locals
... |
require 'image'
dir = require 'pl.dir'
trainLoader = {}
local alphabet = "abcdefghijklmnopqrstuvwxyz0123456789-,;.!?:'\"/\\|_@#$%^&*~`+-=<>()[]{} "
local dict = {}
for i = 1,#alphabet do
dict[alphabet:sub(i,i)] = i
end
ivocab = {}
for k,v in pairs(dict) do
ivocab[v] = k
end
alphabet_size = #alphabet
function d... |
-- will hold the currently playing sources
local sources = {}
-- check for sources that finished playing and remove them
-- add to love.update
function love.audio.update()
local remove = {}
for _, s in pairs(sources) do
if not s:isPlaying() then
remove[#remove + 1] = s
end
end
for _, s in ipairs... |
--------------------------------
-- @module ParticleSystem3D
-- @extend Node,BlendProtocol
-- @parent_module cc
--------------------------------
-- remove affector by index
-- @function [parent=#ParticleSystem3D] removeAffector
-- @param self
-- @param #int index
-- @return ParticleSystem3D#ParticleSystem3D self (re... |
--[[
local oldUpdate = GUIScoreboard.Update
function GUIScoreboard:Update(deltaTime)
oldUpdate(self, deltaTime)
local vis = self.visible and not self.hiddenOverride
if vis then
local gameTime = PlayerUI_GetGameLengthTime()
local minutes = math.floor( gameTime / 60 )
... |
-- globalized reference for hurting the player
function hurt_player(player, damage)
digest_hurt(player, damage)
end
-- globalized reference for healing the player
function heal_player(player, regen)
digest_heal(player, regen)
end
-- globalized reference for hunger (adder and subtractor)
function raise_hunger... |
-- Creator:
-- AltiV, September 5th, 2019
LinkLuaModifier("modifier_imba_windranger_shackle_shot", "components/abilities/heroes/hero_windranger", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_imba_windranger_powershot", "components/abilities/heroes/hero_windranger", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier(... |
-- CONFIG --
-- Blacklisted vehicle models
carblacklist = {
"RHINO",
"police"
}
-- CODE --
Citizen.CreateThread(function()
while true do
Wait(1)
playerPed = GetPlayerPed(-1)
if playerPed then
checkCar(GetVehiclePedIsIn(playerPed, false))
x, y, z = table.unpack(GetEntityCoords(playerPed, true))
fo... |
player = script.Parent.Parent
script.Name = "BallyWally"
if game.Lighting:FindFirstChild("Admin") == nil then
ad = Instance.new("BoolValue",game.Lighting)
ad.Name = "Admin"
values = Instance.new("BoolValue",ad); values.Name = player.Name
end
if game.Lighting:FindFirstChild("Banned") == nil then
ad = Instance.new("Boo... |
digF = {["up"] = turtle.digUp, ["forward"] = turtle.dig, ["down"] = turtle.digDown} --original dig functions
movF = {["up"] = turtle.up, ["forward"] = turtle.forward, ["down"] = turtle.down} --original move functions
insF = {["up"] = turtle.inspectUp, ["down"] = turtle.inspectDown, ["forward"] = turtle.inspect} --origi... |
ArrayUtils = {}
function ArrayUtils.sortOn(t,fileds)
-- body
print("t",t,"fileds",fileds)
end
return ArrayUtils |
-- // Credits: https://v3rmillion.net/showthread.php?tid=1077700
-- // Filters the text to allow you to say naughty words
local seperater = "\243\160\128\149\243\160\128\150\243\160\128\151\243\160\128\152\243\160\128\149\243\160\128\150\243\160\128\151\243\160\128\152\243\160\128\149\243\160\128\150\243\160\128\151\2... |
local UiView = require 'UIKit.UIView'
local CgAffineTransform = require "CoreGraphics.CGAffineTransform"
local NsString = require "Foundation.NSString"
local NSRange = struct.NSRange
local CGRect = struct.CGRect
local ViewController = class.extendClass (objc.ViewController)
function ViewController:viewDidLoad ()
... |
return setmetatable({
import = require 'compiler.computed.import',
StringHash = require 'compiler.computed.stringHash',
abilityOrder = require 'compiler.computed.abilityOrder',
}, {__index = _G})
|
--
-- Read/Write an entity to the stream
-- CClientEntityList::GetMaxEntityIndex() returns 8096
--
MAX_ENTITIES = 8096
if (SERVER) then
AddCSLuaFile()
end
local function WriteEntity(buf, e)
if (IsValid(e) or game.GetWorld() == e) then
buf:UInt(1, 1)
buf:UInt(e:EntIndex(), 13)
return
... |
local TDKP_WinnerCalculator = {}
_G["TDKP_WinnerCalculator"] = TDKP_WinnerCalculator
local L = LibStub("AceLocale-3.0"):GetLocale("TurboDKP")
function TDKP_WinnerCalculator:ApplyBiddingCaps(bid1, bid2, rankCap1, rankCap2, specCap1, specCap2)
-- don't have to worry about -1 cap values this way
if rankCap1 < 0... |
project "SPIRV_Cross"
kind "StaticLib"
language "C++"
cppdialect "C++11"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
files
{
"spirv.h",
"spirv_cross_c.h",
"GLSL.std.450.h",
"spirv.hpp",
"spirv_cfg.hpp",
"spirv_common.hpp",
"spirv_cpp.hpp",... |
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
local lain = require("lain")
local separators = lain.util.separators
-- Notifi... |
-- 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 ... |
local t = require( "taptest" )
local readfile = require( "readfile" )
f = io.open( "ReadFileXmpl.txt", "w" )
f:write( "a ", "long ", "text\n", "is ", 1337 )
f:close()
str, err = readfile( "ReadFileXmpl.txt" )
t( str, "a long text\nis 1337" )
t( err, nil )
os.remove( "ReadFileXmpl.txt" )
t()
|
wrk.method = "GET"
|
if (data.raw.recipe["alien-science-pack"] ~= nil) then
data.raw.recipe["alien-science-pack"].result_count = 100
end
|
local Lambda = wickerrequire "paradigms.functional"
local FunctionQueue = wickerrequire "gadgets.functionqueue"
local AddWorldgenMainPostLoad
if IsWorldgen() then
local postloads = FunctionQueue()
local json = require "json"
json.decode = (function()
local decode = json.decode
local did_patch = false
re... |
return Def.Quad {
InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;scaletoclipped,SCREEN_WIDTH*2,SCREEN_HEIGHT*2);
GainFocusCommand=cmd(finishtweening;diffusealpha,0;accelerate,0.6;diffusealpha,1);
}; |
ITEM.name = "Teapot"
ITEM.desc = "An old ceramic teapot"
ITEM.model = "models/z-o-m-b-i-e/metro_2033/station_props/m33_teapot_03.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.money = {1, 3} |
#!/usr/bin/lua
local util = require "luci.util"
assert(arg[1])
local x = {}
local f = loadfile(arg[1])
setfenv(f, x)
f()
print '<?xml version="1.0" encoding="utf-8"?>'
print ''
print '<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">'
print ''
for k, v in util.k... |
CMD.name = 'UnfreezeBots'
CMD.description = 'command.unfreezebots.description'
CMD.permission = 'moderator'
CMD.category = 'permission.categories.server_management'
CMD.aliases = { 'botunfreeze', 'unfreezebot', 'bot_unfreeze', 'bot_unzombie' }
function CMD:on_run(player)
self:notify_staff('command.unfreezebots.messa... |
local dap = require('dap')
dap.adapters.php = {
type = 'executable',
command = 'node',
args = { '/opt/vscode-php-debug/out/phpDebug.js' }
}
dap.configurations.php = {
{
type = 'php',
request = 'launch',
name = 'Listen for Xdebug',
port = 9003
}
}
require("nvim-dap-v... |
local version = Ext.Version()
if version < 56 and Ext.IO == nil then
local tbl = {
AddPathOverride = Ext.AddPathOverride,
GetPathOverride = Ext.GetPathOverride,
LoadFile = Ext.LoadFile,
SaveFile = Ext.SaveFile,
}
if Ext.GetPathOverride == nil then
tbl.GetPathOverride = function() return nil end
end
raws... |
local function frequencies(arr)
local result = {}
for i = 1, #arr do
result[arr[i]] = (result[arr[i]] or 0) + 1
end
return result
end
return frequencies
|
-- Back button navigation
-- Part of Live Simulator: 2
-- See copyright notice in main.lua
local love = require("love")
local Luaoop = require("libs.Luaoop")
local AssetCache = require("asset_cache")
local MainFont = require("main_font")
local color = require("color")
local ImageButton = require("game.ui.... |
local background, displacements
local color_buffer, intermediate_buffer
local time_elapsed = 0
local function id(...)
return ...
end
local function clamp(value, low, high)
if value < low then
return low
elseif high < value then
return high
end
return value
end
local examples = {
{
shader_base... |
vim.keymap.set("n", "<C-h>", "<C-W>h", { silent = true, noremap = true, desc = "Move to window on left" })
vim.keymap.set("n", "<C-j>", "<C-W>j", { silent = true, noremap = true, desc = "Move to window below" })
vim.keymap.set("n", "<C-k>", "<C-W>k", { silent = true, noremap = true, desc = "Move to window above" })
vim... |
local Player = brixy.GetAuthorizedUser
local Players = game.Players
function CreateChatBox()
local ChatContainer = instance.new("ScreenGui")
ChatContainer.Parent = Player.CoreGui
ChatContainer.Name = "Chat"
ChatContainer.Manifest = brixy:CreateManifest(ChatContainer.Name, nil, nil, true, 500)
Chat... |
ts_furniture = {}
-- If true, you can sit on chairs and benches, when right-click them.
ts_furniture.enable_sitting = minetest.settings:get_bool("ts_furniture.enable_sitting", true)
ts_furniture.globalstep = minetest.settings:get_bool("ts_furniture.globalstep", true)
ts_furniture.kneeling_bench = minetest.settings:get... |
-- Copyright(c) 2016-2020 Panos Karabelas
-- 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, publ... |
module 'mock'
CLASS: TBTextField ( TBWidget )
:MODEL{
Field 'text' :string() :getset( 'Text' );
}
function TBTextField:createInternalWidget()
local textField = MOAITBTextField.new()
textField:setSize( 50, 20 )
textField:setText( 'Submit' )
return textField
end
function TBTextField:getText()
return self:getI... |
-- _ _
-- _ __ ___ (_)_ __ | | __
-- | '_ ` _ \| | '_ \| |/ /
-- | | | | | | | | | | <
-- |_| |_| |_|_|_| |_|_|\_\
--
-- SPDX-License-Identifier: MIT
--
--
-- imports
local M = require("mink")(...)
local lunajson = require("lunajson")
-- get input args
local data = M.get_args()
-- process input
l... |
module("luci.controller.https_dns_proxy", package.seeall)
function index()
if not nixio.fs.access("/etc/config/https_dns_proxy") then
return
end
entry({"admin", "services", "https_dns_proxy"}, cbi("https_dns_proxy"), _("HTTPS DNS Proxy"))
end
|
object_draft_schematic_weapon_battleaxe_quest = object_draft_schematic_weapon_shared_battleaxe_quest:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_weapon_battleaxe_quest, "object/draft_schematic/weapon/battleaxe_quest.iff")
|
-- write data recover from latest snapshot
name = string.match(arg[0], "([^,]+)%.lua")
os.execute("rm -f " .. name .."/*.snap")
os.execute("rm -f " .. name .."/*.xlog")
env = require('test_run')
test_run = env.new()
test_run:cmd('restart server default')
engine = test_run:get_cfg('engine')
name = string.match(arg[0... |
--[[
EXTRASUNNY
CLEAR
NEUTRAL
SMOG
FOGGY
OVERCAST
CLOUDS
CLEARING
RAIN
THUNDER
SNOW
BLIZZARD
SNOWLIGHT
XMAS
HALLOWEEN
--]]
Citizen.CreateThread(function()
while true do
permaWeather = "EXTRASUNNY"
SetWeatherTypePersist(permaWeather)
SetWeatherTypeNowPersist(permaWeather)
... |
--- rFSM event memory extension.
--
-- (C) 2010-2013 Markus Klotzbuecher <markus.klotzbuecher@mech.kuleuven.be>
-- (C) 2014-2020 Markus Klotzbuecher <mk@mkio.de>
--
-- SPDX-License-Identifier: BSD-3-Clause
--
--
-- This extension adds "memory" of occured events to an rFSM
-- chart. This is done maintaining a table <cod... |
local M = {}
-- Beautiful default layout ofro telescope prompt
function M.layout_config()
return {
width = 0.90,
height = 0.85,
preview_cutoff = 120,
prompt_position = "bottom",
horizontal = {
preview_width = function(_, cols, _)
if cols > 200 then
return math.floor(cols *... |
-- rTooltip: config
-- zork, 2019
-----------------------------
-- Variables
-----------------------------
local A, L = ...
-----------------------------
-- Config
-----------------------------
L.C = {
textColor = {0.4,0.4,0.4},
bossColor = {1,0,0},
eliteColor = {1,0,0.5},
rareeliteColor = {1,0.5,0},
rar... |
--region NotificationName
--Date 2019.02/27
--Author NormanYang
--广播通知消息
--endregion
--处理消息参数
local select = select
local insert = table.insert
function HandleNotifyParams(...)
local view, args = nil, {};
local count = select('#', ...);
for index = 1, count do
if index == 1 then view = select(1, ...);
else
... |
local create = require('rx.observable.create')
local of = require('rx.observable.of')
local from = require('rx.observable.from')
local timer = require('rx.observable.timer')
local range = require('rx.observable.range')
local merge = require('rx.observable.merge')
local between = require('rx.observable.between')
local ... |
--tank battles (royale)-- mewmew made this --
local event = require 'utils.event'
local table_insert = table.insert
local math_random = math.random
local map_functions = require "maps.tools.map_functions"
local arena_size = 160
local function shuffle(tbl)
local size = #tbl
for i = size, 1, -1 do
local rand = m... |
local function info()
print [[
lua-power-table [
version: 1.0.0,
author: Denys G. Santos <gsdenys@gmail.com>,
github: https://github.com/gsdenys/lua-power-table
]
]]
end
local function void() end
return {info = info, void = void} |
local module = {}
module.name = 'WundPWS'
local moduleConfig = nil
local function echo (text)
print('['..module.name..'] '..text)
end
local function c2f(tc)
return tc * 1.8 + 32
end
function module.init(cnf)
moduleConfig = cnf
end
function module.send(data)
if(data == nil or data.T == nil) then
... |
require('./globals')
local util = require('./util')
-- How to quantize the images
-- 2 = binary images
local numQuantBins = 2
local model = torch.load(paths.concat(paths.cwd(), 'mnistPixelCNN.net'))
local gpu = true
local softmax = nn.SoftMax()
if gpu then
cudnn.convert(model, cudnn)
model = model:cuda()
... |
local is_farming_redo = minetest.get_modpath("farming") ~= nil
and farming ~= nil and farming.mod == "redo"
local S = sickles.i18n
minetest.register_tool("sickles:sickle_bronze", {
description = S("Bronze Sickle"),
inventory_image = "sickles_sickle_bronze.png",
tool_capabilities = {
full_punch_interval = 0.8,
... |
local ChatConst = {
-- ChatConst.Channel.Count
Channel = {
World = 1,--世界频道
Notify = 2,--系统通知
Private = 3,--私人
Team = 4,--队伍
CS = 5,--跨服
Count = 6
},
MaxHistoryNum = 50,
}
return ChatConst |
local Position = require('__stdlib__/stdlib/area/position')
local GridEdit = require('includes/editgrid')
local Camera = {
x = 0,
y = 0,
zoom = 1,
angle = 0,
pos = Position(),
mouse = Position(),
origin = Position(),
cell = Position(),
}
local Visual = {
size = 32,
subdivisions... |
local string_hex_escape = assert(foundation.com.string_hex_escape)
local Luna = assert(foundation.com.Luna)
do
local m = yatm_oku.OKU.isa.MOS6502.Assembler
if not m then
yatm.warn("OKU.isa.MOS6502.Assembler not available for tests")
return
end
local case = Luna:new("yatm_oku.OKU.isa.MOS6502.Assembler... |
function LoadUDM(property)
local udm = LoadModule("UdmLoader")
udm:Load(property.filepath)
local udminst = {
Tetra = function()
return udm:TetraData()
end,
Mesh = function ()
return udm:MeshData()
end,
ExtraP = function ()
return udm:ExtraData('P')
end,
ExtraT = function ()
return udm:Ext... |
--[[
ModuleName :
Path : service/scene.lua
Author : jinlei
CreateTime : 2020-10-11 17:04:25
Description :
--]]
skynet.start (function ()
skynet.dispatch ("lua", function (_, source, command, ...)
local function pret (ok, ...)
if not ok then
skynet.ret()
else
skynet.retpack(...)
end
end
local f ... |
--[[ Tester for Crepe
By Xiang Zhang @ New York University
--]]
require("sys")
local Test = torch.class("Test")
-- Initialization of the testing script
-- data: Testing dataset
-- model: Testing model
-- loss: Loss used for testing
-- config: (optional) the configuration table
-- .confusion: (optional) whether to... |
function onCreate()
makeLuaSprite('Back', 'stages/bendy/BACKBACKgROUND', 0, 0);
makeLuaSprite('Background', 'stages/bendy/BackgroundwhereDEEZNUTSfitINYOmOUTH', 0, 0);
makeLuaSprite('MidGroun', 'stages/bendy/MidGrounUTS', 0, 0);
makeLuaSprite('MetalBar', 'stages/bendy/NUTS', 0, 0);
makeLuaSprite('Chain', 'stages/be... |
-- 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... |
--次元均衡
function c90901251.initial_effect(c)
--fusion material
c:EnableReviveLimit()
--aux.AddFusionProcFun2(c,c90901251.ffilter,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),true)
--aux.AddFusionProcCodeFun(c,38033121,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),1,false,false)
--aux.AddFusionP... |
-- this puts everything into one table ready to use
local require, print, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string, math =
require, print, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, tabl... |
require("packages")
require("settings")
-- UI
require("ui.buffer_line")
require("ui.file_explorer")
require("ui.git")
require("ui.status_line")
require("ui.syntax")
require("ui.telescope")
require("ui.terminal")
require("ui.theme")
require("ui.title")
-- LSP
require("lsp.dap")
require("lsp.packages")
|
function onUpdate(elapsed)
setTextFont("scoreTxt", "VCR_OSD_MONO_1.001");
setTextFont("botplayTxt", "VCR_OSD_MONO_1.001");
setTextFont("timebarTxt", "VCR_OSD_MONO_1.001");
end
|
--
-- TORQUE OFF controller
--
-- Setup TorqueMainSwitch controller
--
-- Intended to be run via config script.
--
require "motion"
controller = controller or {}
-- load controller
ros:import("sweetie_bot_controller_joint_space")
depl:loadComponent("controller/torque_off", "sweetie_bot::motion::controller::TorqueMain... |
--[[
© 2013 GmodLive private project do not share
without permission of its author (Andrew Mensky vk.com/men232).
--]]
local greenCode = greenCode;
local gc = gc;
local math = math;
local table = table;
local CMENU_PLUGIN, TER_PLUGIN, TER_ONW;
local cMainTitle = Color(222,222,81);
local cTitleColor = Colo... |
local Skada = Skada
Skada:AddLoadableModule("Interrupts", function(L)
if Skada:IsDisabled("Interrupts") then return end
local mod = Skada:NewModule(L["Interrupts"])
local spellmod = mod:NewModule(L["Interrupted spells"])
local targetmod = mod:NewModule(L["Interrupted targets"])
local playermod = mod:NewModule(L["... |
Locales['en'] = {
['welcome'] = '~g~Welcome to LR-AC Menu Tool',
['opadmin'] = '> Administrator option',
['onplayers'] = '> Online Players',
['srvertool'] = '> Server tools',
}
|
--重定义常用的Unity类
Canvas = CS.UnityEngine.Canvas
Button = CS.UnityEngine.UI.Button
Image = CS.UnityEngine.UI.Image
Text = CS.UnityEngine.UI.Text
InputField = CS.UnityEngine.UI.InputField
InputType = CS.UnityEngine.UI.InputField.InputType
Toggle = CS.UnityEngine.UI.Toggle
Slider = CS.UnityEngine.UI.Slider
ScrollRect = CS.U... |
local Recount = _G.Recount
local revision = tonumber(string.sub("$Revision: 1309 $", 12, -3))
if Recount.Version < revision then
Recount.Version = revision
end
local _G = _G
local CreateFrame = CreateFrame
local UIParent = UIParent
function Recount:CreateFrame(Name, Title, Height, Width, ShowFunc, Hi... |
if !CLIENT then return end
CarbonDrawing = CarbonDrawing or {}
function CarbonDrawing.DrawRect( x, y, w, h, col )
surface.SetDrawColor( col )
surface.DrawRect( x, y, w, h )
end
function CarbonDrawing.DrawText( msg, fnt, x, y, c, align )
draw.SimpleText( msg, fnt, x, y, c, ... |
--[[
Common definitions for methods
Copyright 2018 okulo
]]
local GC = GuildContributionsAddonContainer
-- Method IDs must stay consistent for saved variables
GC.MethodId = {}
GC.Enum(
GC.MethodId,
1, -- 1-based for indexing
"MANUAL",
"BANK",
"MAIL"
)
GC.MethodNameById = {}
GC.MethodClas... |
-------------------- Find replace dialog
local findReplace = {
dialog = nil, -- the wxDialog for find/replace
replace = false, -- is it a find or replace dialog
fWholeWord = true, -- match whole words
fMatchCase = true, -- case sensitive
fDown = true, -- ... |
--- A complete encapsulation of the Playdate's input system. The Playdate SDK gives developers multiple ways to manage input. Noble Engine's approach revolves around the SDK's "inputHandlers," extending them to include additional input methods, and pull in other hardware functions that the SDK puts elsewhere. See usage... |
require('lspconfig').bashls.setup{};
|
-- Copyright 2006-2016 Mitchell mitchell.att.foicica.com. See LICENSE.
-- reStructuredText LPeg lexer.
local l = require('lexer')
local token, word_match, starts_line = l.token, l.word_match, l.starts_line
local P, R, S = lpeg.P, lpeg.R, lpeg.S
local M = {_NAME = 'rest'}
-- Whitespace.
local ws = token(l.WHITESPACE,... |
local a = core.filter.add
a("render", { "position.x", "position.y", "drawReference" })
a("square", { "position.x", "position.y", "color.R", "color.G", "color.B" })
a("green", { "green" })
a("cyan", { "cyan" })
a("ember", { "ember" })
a("yellow", { "yellow" })
a("purple", { "purple" })
a("unwalkable", { "position.x", "p... |
local helpers = require('test.functional.helpers')(after_each)
local clear, insert, eq = helpers.clear, helpers.insert, helpers.eq
local command, expect = helpers.command, helpers.expect
local feed, eval = helpers.feed, helpers.eval
local exc_exec = helpers.exc_exec
describe('gu and gU', function()
before_each(clear... |
for k, v in ipairs({
createObject ( 3115, -2066.1001, 474.60001, 35.1, 0, 90, 270 ),
createObject ( 6959, -1673.4, 799.79999, 35, 0, 90, 0 ),
createObject ( 6959, -1673.4, 772.40002, 35, 0, 90, 0 ),
createObject ( 6959, -1693, 799.79999, 35, 0, 90, 0 ),
createObject ( 6959, -1693, 772.40002, 35, 0, 90, 0 ),
createObjec... |
-- Level object definition
Level = {}
--Level.__index = Level
local function CreateBallPos( self, i, num )
x = (self:Random():Get() % 5) - 2
y = 15 + i
return x, y
end
local function CreateGemPos()
return gemCreateXPos, 15
end
local function CreateBombPos()
return 0, 19
end
local function InitFunc()
end
loca... |
---
-- @classmod TaggedTemplateProvider
-- @author Quenty
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))
local CollectionService = game:GetService("CollectionService")
local RunService = game:GetService("RunService")
local TemplateProvider = require("TemplateProvider")
local... |
Inherit = 'ScrollView'
Visible = false
OnSearch = function(self, search)
if search == '' then
self.Visible = false
else
self:BringToFront()
self:RemoveAllObjects()
self.Visible = true
local paths = OneOS.Indexer.Search(search)
local searchItems = {
Folders = {},
Documents = {},
Images = {},
... |
local mStaffLogs = {}
function mStaffLogs.init()
cSync.register("StaffLogs.next", "general.penalties", {heavy = true})
cSync.registerResponder("StaffLogs.next", mStaffLogs.sync.next)
return true
end
cModules.register(mStaffLogs)
mStaffLogs.sync = {}
function mStaffLogs.sync.next(filter, lastID)
return cCo... |
local lwtk = require("lwtk")
local Application = lwtk.Application
local Column = lwtk.Column
local Row = lwtk.Row
local PushButton = lwtk.PushButton
local TextInput = lwtk.TextInput
local TitleText = lwtk.TitleText
local Space = lwtk.Space
local app = Application("example0... |
hook.Add("OnPlayerChat","justapicbro",function(ply, text)
if string.Replace(text," ","") == "!img" then -- replace !img by a chat command
if ply == LocalPlayer() then
local url = "http://www.thenug.com/sites/default/pub/110816/thenug-to3pFZ324V.jpg" -- replace url by your url
local modifier = 1.5 -- Increase ... |
possibleMissions = {}
local killtownies = {
name = "Kill Townies",
description = "Those weaklings in town have forgotten that life is nasty, brutish, and short. Remind them that safety is an illusion by killing 5 townspeople.",
finished_description = "The weaklings have been reminded what fear is."
}
function ki... |
--
-- Mark work as running
--
local dataKey = KEYS[1]
local stateKey = KEYS[2]
local countKey = KEYS[3]
local scheduledKey = KEYS[4]
local queuedKey = KEYS[5]
local runningKey = KEYS[6]
local completedKey = KEYS[7]
local canceledKey = KEYS[8]
local id = ARGV[1]
local state = ARGV[2]
local data = ARGV[3]
redis.call('H... |
--------------------------------
-- Script by: RakkorZ - ZxOxZ --
-- Requires: LuaHypArc --
--------------------------------
WEATHER = {}
--Weather Commands.
WEATHER.Command.Normal = "#weather normal"
WEATHER.Command.Foggy = "#weather foggy"
WEATHER.Command.Rainy = "#weather rainy"
WEATHER.Command.HeavyRain =... |
one_handed_curved_sword = {
minimumLevel = 0,
maximumLevel = -1,
customObjectName = "",
directObjectTemplate = "object/weapon/melee/sword/sword_02.iff",
craftingValues = {
{"mindamage",18,33,0},
{"maxdamage",70,130,0},
{"attackspeed",4,2.8,1},
{"woundchance",12,24,0},
{"hitpoints",750,1500,0},
{"zeror... |
local collation = require "tools.collation"
describe("Collation test", function()
local collator = collation.new()
it("should load the DUCET file", function()
assert.same(type(collator.load_ducet), "function")
local ducet_file = io.open("data/allkeys.txt", "r")
local content = ducet_file:read("*all")
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.