content stringlengths 5 1.05M |
|---|
local fio = require('fio')
local Capture = require('luatest.capture')
local helper = {}
helper.root = fio.dirname(fio.dirname(fio.abspath(package.search('luacov.reporters_utils'))))
-- cdata errors friendly assert compatible with fio calls.
local function assert(val, message, ...)
if not val or val == nil then
... |
require "ratchet"
local samestate_transaction = {}
samestate_transaction.__index = samestate_transaction
-- {{{ samestate_transaction.new()
function samestate_transaction.new(request)
local self = {}
setmetatable(self, samestate_transaction)
self.request = request
return self
end
-- }}}
-- {{{ sam... |
local ConVar_RestrictFingers = CreateClientConVar( "finger_restrict", "1", false, false )
local PANEL = {}
local MAX_ANGLE_X = 100
local MAX_ANGLE_Y = 100
function PANEL:Init()
self.Value = { 0, 0 }
self.UpdateTimer = 0
-- Don't update convars straight away.
self.NextUpdate = CurTime() + 0.5
... |
local skynet = require "skynet"
local cluster = require "skynet.cluster"
local runconf = require(skynet.getenv("runconfig"))
local tool = require "tool"
local faci = require "faci.module"
local module = faci.get_module("reload")
local dispatch = module.dispatch
local forward = module.forward
local event = module.event... |
return {
{
desc = "自身炮击提高10.0%",
addition = {
"10.0%(+1.1%)"
}
},
{
desc = "自身炮击提高11.1%",
addition = {
"11.1%(+1.1%)"
}
},
{
desc = "自身炮击提高12.2%",
addition = {
"12.2%(+1.1%)"
}
},
{
desc = "自身炮击提高13.3%",
addition = {
"13.3%(+1.1%)"
}
},
{
desc = "自身炮击提高14.4%",
addition =... |
--[[World of Warcraft Login System Part 2]]--
function GoToTheDoor_Gasthaus (event, player, object)
if (player:GetTeam() == 0) then -- Allianz --
player:SummonGameObject(2873, 1571.803955, 612.343506, 99.763451, 1.053991, 20)
player:SummonGameObject(2873, 1571.803955, 612.343506, 99.763451, 1.053991, 20)
... |
local Juliet = JulietFrame
-- initial adds
function Juliet:AddSetupOnLoad()
self:AddCallback("ADDON_LOADED", "SETUP_ON_LOAD",
function()
self:RemoveEvent('ADDON_LOADED')
JulietsMemory = JulietsMemory or {} --use stored variable for memory if exists, otherwise create new table for her m... |
local java = ImportPackage("java");
AddFunctionExport("GetAdminLevel", function(player)
return java.GetAdminLevel(player)
end)
AddFunctionExport("GetAccount", function(player)
local account = java.GetAccount(player)
if(account == nil) then
return nil
end
return jsondecode(accoun... |
object_tangible_loot_creature_loot_collections_bantha_bone = object_tangible_loot_creature_loot_collections_shared_bantha_bone:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_bantha_bone, "object/tangible/loot/creature/loot/collections/bantha_bone.iff")
|
require 'funcs'
local GameMode = require 'tetris.modes.gamemode'
local Piece = require 'tetris.components.piece'
local History6RollsRandomizer = require 'tetris.randomizers.history_6rolls'
local Marathon2020Game = GameMode:extend()
Marathon2020Game.name = "Marathon 2020"
Marathon2020Game.hash = "Marathon2020"
Marat... |
include("sv_antifriendlyfire.lua")
include("sv_blocksuicide.lua") |
---------------------------------------------
-- VOR - NAV2 --
-- Modification of Jason Tatum's original --
-- Brian McMullan 20180324 --
-- Property for background off/on --
-- Property for dimming overlay --
-- some gauge initialization fixes ... |
function love.conf(t)
<CONF>
end |
object_tangible_collection_reward_col_imperial_gcw_reward = object_tangible_collection_reward_shared_col_imperial_gcw_reward:new {
objectMenuComponent = "ImperialMenuComponent",
}
ObjectTemplates:addTemplate(object_tangible_collection_reward_col_imperial_gcw_reward, "object/tangible/collection/reward/col_imperial_gcw... |
SKILL.name = "Word of the Emperor"
SKILL.LevelReq = 10
SKILL.SkillPointCost = 3
SKILL.Incompatible = {
}
SKILL.RequiredSkills = {
}
SKILL.icon = "vgui/skills/Dow2r_ig_impenetrable.png"
SKILL.category = "Faith"-- Common Passives, Warrior, Stealth, Lore of Light, Dark Magic
SKILL.slot = "ULT" -- ULT, RANGED, MELEE, A... |
return Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("#00000000"));
OnCommand=cmd(sleep,3;linear,2;diffusealpha,1);
}; |
local NORMAL_ZSET = KEYS[1];
local taskId = ARGV[1];
local taskJsonStr = ARGV[2];
local taskTTLMs = ARGV[3];
local taskExecuteTime = ARGV[4];
-- PSETEX fail
redis.call('PSETEX', taskId, taskTTLMs, taskJsonStr);
if (nil == redis.call('GET', taskId)) then
redis.log(redis.LOG_NOTICE, 'PSETEX failed when creation');
... |
local Buffer = require('reach.buffers.buffer')
local handles = require('reach.buffers.handles')
local u = require('reach.buffers.util')
local util = require('reach.util')
local sort = require('reach.buffers.sort')
local deduped_path = u.deduped_path
local function set_previous_markers(buffers, options)
local curren... |
function fib(n)
if n < 2 then
return 1
end
return fib(n-1) + fib(n-2)
end |
--[[ PLAYER SPAWN POINT LIST
revive_point(<map_id>, <x_pos>, <y_pos>);
start_point(<map_id>, <x_pos>, <y_pos>);
respawn_point(<map_id>, <x_pos>, <y_pos>);
--]]
start_point(6, 5155.11, 5105.19);
respawn_point(6, 5201.83, 5498.4);
respawn_point(6, 5200.79, 5059.89);
|
-- <img src="https://image.flaticon.com/icons/png/512/264/264745.png" width=75">
-- <a href="http://github.com/tomm/keys"><img src="https://github.blog/wp-content/uploads/2008/12/forkme_left_red_aa0000.png?resize=149%2C149" align=left></a>
-- "Keys = cluster, discretize, contrast"
-- 
language.Add( "tool.teleporter.desc", "Teleport yourself" )
language.Add( "tool.teleporter.0", "Left click to teleport" )
end
function TOOL:LeftClick( trace )
self:GetOwner():SetPos( trace.HitPos ... |
-- lua 性能监控程序
-- todo
-- 添加按函数执行时间进行剪枝的功能
-- NOTE: 如果找不到 C 模块的话,就使用 os.clock() 替代模块中的函数,但是要注意,C模块中返回的是时间戳,替代函数返回的是程序从启动后经过的时间
local _loadModuleSucc, proftimer = pcall(require, "timerlib")
if not _loadModuleSucc then
print("ERROR: the C extern module 'timerlib' not found, use os.clock() to replace. millisecTim... |
Config = {}
Config.SpawnWheel = false -- If your map does NOT have the wheel, set it to true. if your map has already a wheel set it to false
Config.WheelPos = {x = 949.71, y = 45.1, z = 70.9, h =328.0} -- Where the wheel prop will spawn OR where wheel prop is
Config.startingPrice = 5000
Config.CasinoMembership = ... |
-- Node IO System
local nodeiodef = {
node_io_can_put_liquid = function (pos, node, side)
return minetest.get_item_group(node.name, 'fluid_container') > 0
end,
node_io_can_take_liquid = function (pos, node, side)
return minetest.get_item_group(node.name, 'fluid_container') > 0
end,
-- if false, transfer node... |
object_draft_schematic_genetic_engineering_processor_use_fuse = object_draft_schematic_genetic_engineering_shared_processor_use_fuse:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_genetic_engineering_processor_use_fuse, "object/draft_schematic/genetic_engineering/processor_use_fuse.iff")
|
--[[
Copyright 2012-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 or... |
-- Author:Demon
-- Date:2016/1/11
-- Last modification:
-- Description:
-- Note:若需使用该类管理类接口,创建类时应 require("hall/report/hallLayerBase"); class(HallLayerBase,false)
-- HallLayerBase继承了CommonGameLayer
local __LAYER_CONFIG = require("hall/widget/layerPathConfig");
LayerManagerIsolater = class();
LayerMan... |
object_tangible_wearables_cybernetic_cybernetic_crafted_s03_hand_l = object_tangible_wearables_cybernetic_shared_cybernetic_crafted_s03_hand_l:new {
}
ObjectTemplates:addTemplate(object_tangible_wearables_cybernetic_cybernetic_crafted_s03_hand_l, "object/tangible/wearables/cybernetic/cybernetic_crafted_s03_hand_l.iff... |
local bit = require 'bit'
local ffi = require 'ffi'
local C = ffi.C
local S = require 'syscall'
local utils = require 'utils'
local nflog_lib = ffi.load('netfilter_log')
ffi.cdef [[
static const int NFULNL_COPY_NONE = 0x00;
static const int NFULNL_COPY_META = 0x01;
static const int NFULNL_COPY_PACKET = 0x02;
typ... |
--[[ Copyright (C) 2019 The DMLab2D Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writ... |
-- This script automatically loads playlist entries before and after the
-- the currently played file. It does so by scanning the directory a file is
-- located in when starting playback. It sorts the directory entries
-- alphabetically, and adds entries before and after the current file to
-- the internal playlist. (I... |
-- Until now, coroutines look like nothing more than a complicated
-- way to call functions. The real power of coroutines stems from
-- the yield function, which allows a running coroutine to suspend its
-- execution so that it can be resumed later. Let us see a simple example:
co =
coroutine.create(
function(a... |
--[[**********************************
*
* Multi Theft Auto - Admin Panel
*
* client\widgets\admin_messages.lua
*
* Original File by lil_Toady
*
**************************************]]
aMessages = {
Form = nil,
Messages = {}
}
function aMessages.Open ()
if ( not aMessages.Form ) then
local x, y = guiGetScreenSi... |
-- Class: Emitter
-- An emitter periodically emits sprites with varying properties --
-- for example, velocity. These are set with the emitter's min and
-- max properties. For example, you could set the x velocity of
-- particles to range between -100 and 100 with these statements:
--
-- > emitter.min.velocity.x = -100... |
return {'ubs'} |
dgFireAtState = {}
function dgFireAtState.load()
--dgFireAtState.sheet = love.graphics.newImage()
--dgFireAtState.quads = {}
end
function dgFireAtState.update(dt)
end |
shell.setPath(shell.path()..":/usr/bin")
help.setPath(help.path()..":/usr/help")
os.loadAPI("/usr/apis/minepackapi")
minepackapi.load()
local function completeMultipleChoice( sText, tOptions, bAddSpaces )
local tResults = {}
for n=1,#tOptions do
local sOption = tOptions[n]
if #sOption + (bAddS... |
if not Utils:IsInGameState() then
do return end
end
if not Utils:IsInHeist() then
do return end
end
if not Network:is_server() then
UT.showMessage("host only", UT.colors.red, "spawn")
do return end
end
if UT.Spawn.mode == "enemies" then
UT.Spawn.spawnEnemy(UT.Tables.enemies[UT.Spawn... |
msemenu_debug_saves = {}
EVENT_TAGS = {
MOMENT = "[Ev]",
BOSS = "[Bo]",
ITEM = "[It]",
CUTSCENE = "[CS]"
}
msemenu_debug_events = {
["surface"] = {
{
"Planet arrival",
"s000_surface",
"surface",
{
EVENT_TAGS.CUTSCENE
}
},
{
"Melee tutorial",
"s000_... |
--[[
MIT License
Copyright (c) 2019-2021 Love2D Community <love2d.org>
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, ... |
--
-- GENie - Project generator tool
-- https://github.com/bkaradzic/GENie#license
--
premake.qbs = { }
local qbs = premake.qbs
newaction
{
-- Metadata for the command line and help system
trigger = "qbs",
shortname = "qbs",
description = "Generate QBS build files",
module = "qbs",
-- The capabilit... |
local zlib = require "zlib"
local function out32(f, u)
f:write(string.char(bit32.band(u,255),
bit32.band(bit32.rshift(u,8),255),
bit32.band(bit32.rshift(u,16),255),
bit32.rshift(u,24)))
end
local function out16(f, u)
f:write(string.char(bit32.band(u,255),
... |
--[[
--MIT License
--
--Copyright (c) 2019 manilarome
--Copyright (c) 2020 Tom Meyers
--
--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 ... |
panshee_veteran = Creature:new {
objectName = "@mob/creature_names:panshee_veteran",
randomNameType = NAME_GENERIC,
randomNameTag = true,
socialGroup = "panshee_tribe",
faction = "panshee_tribe",
level = 35,
chanceHit = 0.41,
damageMin = 325,
damageMax = 360,
baseXp = 3460,
baseHAM = 8700,
baseHAMmax = 1070... |
local templet = require("templet")
local function template(filename, env)
local function include(filename)
local filename, err = package.searchpath(filename, package.path)
if not filename then return error(err) end
local template = templet.loadfile(filename)
return template(env)
end
env = setmeta... |
----------------------------------------------------------------------------------------------------
-- Script verifies issue https://github.com/SmartDeviceLink/sdl_core/issues/1206
-- Flow: HTTP, PROPRIETARY
----------------------------------------------------------------------------------------------------
--[[ Requi... |
function love.conf(win)
win.title="angus game"
win.window.width=1280
win.window.height=720
win.modules.joystick=false
win.modules.physics=false
end
|
--[[
Copyright © 2020, Dean James (Xurion of Bismarck)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of con... |
local require = require
local globals = _G
local pcall = pcall
module('tango.config')
server_default =
function(config)
config = config or {}
config.functab = config.functab or globals
config.serialize = config.serialize or require'tango.utils.serialization'.serialize
config.unserialize = config.un... |
local url = require 'resty.url'
local tostring = tostring
describe('resty.url', function()
describe('.default_port', function()
local default_port = url.default_port
it('returns 80 for http', function()
assert.equal(80, default_port('http'))
end)
it('returns 443 for https', function()
... |
return {
fadeOut = 1.5,
mode = 2,
id = "TIEXUEYUYINFU14",
once = true,
fadeType = 1,
fadein = 1.5,
scripts = {
{
stopbgm = true,
mode = 1,
sequence = {
{
"第五乐章\n\n<size=45>「科学与学习~Von der Wissenschaft~」</size>",
1
}
}
},
{
actor = 900011,
nameColor = "#ff5c5c",
side = ... |
m = Map("qbittorrent", translate("qBittorrent"), translate("qBittorrent is a cross-platform free and open-source BitTorrent client.").."<br/>"..translate("Default login username: admin, password: adminadmin."))
m:section(SimpleSection).template="qbittorrent/qbittorrent_status"
s = m:section(TypedSection, "qbittorrent... |
object_static_worldbuilding_vegitation_frst_fngi_mushroom_blue_group = object_static_worldbuilding_vegitation_shared_frst_fngi_mushroom_blue_group:new {
}
ObjectTemplates:addTemplate(object_static_worldbuilding_vegitation_frst_fngi_mushroom_blue_group, "object/static/worldbuilding/vegitation/frst_fngi_mushroom_blue_gro... |
local M = {}
M.config = function()
local kind = require("user.lsp_kind").symbols_outline
vim.g.symbols_outline = {
highlight_hovered_item = true,
show_guides = true,
auto_preview = false,
position = "right",
relative_width = true,
width = 35,
show_numbers = false,
show_relative_numb... |
local genre
local id = param.get_id()
if id then
genre = Genre:by_id(id)
end
if genre then
slot.put_into("title", encode.html(_"Genre"))
else
slot.put_into("title", encode.html(_"New genre"))
end
slot.select("actions", function()
ui.link{
content = _"Back",
module = "genre"
}
if genre and app.sess... |
-- RequestBuffer.test.lua
-- David Skrundz
package.path = "./../src/?.lua;" .. package.path
require "RequestBuffer"
Test:start("RequestBuffer")
data = {}
data.client = nil
data.method = nil
data.path = nil
data.version = nil
data.header = nil
data.body = nil
data.called = false
rb = RequestBuffer.new()
rb:onReques... |
---
-- @author wesen
-- @copyright 2020 wesen <wesen-ac@web.de>
-- @release 0.1
-- @license MIT
--
local Callable = require "Callable"
---
-- Example Callable class that forwards all arguments that are passed to the instances __call handler.
--
-- @type WithInputArgumentForwarderCallHandler
--
local WithInputArgument... |
---@class ResistancePenetrationTagEntry
---@field Tag string
---@field Amount integer
---@type table<string, ResistancePenetrationTagEntry[]>
Data.ResistancePenetrationTags = {
Water = {
[1] = {Tag="LeaderLib_ResistancePenetration_Water5", Amount=5},
[2] = {Tag="LeaderLib_ResistancePenetration_Water10", Amount=... |
-- Creator:
-- AltiV - March 7th, 2019
LinkLuaModifier("modifier_item_imba_ethereal_blade", "components/items/item_ethereal_blade.lua", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_item_imba_ethereal_blade_ethereal", "components/items/item_ethereal_blade.lua", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifie... |
--1. tree as Lua table
--[[Tree={branchname="Testtree",
"besser",
"soso",
{branchname="Ast","Blatt",},
"testet",
}
--]]
--1. read input tree
dofile("Tree_Baum.lua")
--2.1 function to build recursively the tree
function readTreetohtmlRecursive(TreeTable)
AusgabeTabelle[tostring(TreeTable.branchname:... |
local M = {}
local vim = vim
local space = ' '
local function file_size(file)
local size = vim.fn.getfsize(file)
if size == 0 or size == -1 or size == -2 then
return ''
end
if size < 1024 then
size = size .. 'B'
elseif size < 1024 * 1024 then
size = string.format('%d', size / 1024) .. 'KB'
elseif size < 10... |
--The following global values are set via the simulation core:
-- ------------------------------------
-- IMMUTABLES.
-- ------------------------------------
-- ID -- id of the agent.
-- STEP_RESOLUTION -- resolution of steps, in the simulation core.
-- EVENT_RESOLUTION -- resolution of event distributi... |
function getPositionFromElementAtOffset(element,x,y,z)
if not x or not y or not z then
return x, y, z
end
local matrix = getElementMatrix ( element )
local offX = x * matrix[1][1] + y * matrix[2][1] + z * matrix[3][1] + matrix[4][1]
local offY = x * matrix[1][2] + y * matrix[2][2] + z * matrix[3... |
--
-- Created by IntelliJ IDEA.
-- User: wenshengping
-- Date: 16/4/5
-- Time: 16:25
-- To change this template use File | Settings | File Templates.
--
-- assert 当读写输入报错的时候,会打印出断言
-- io.open 表示 io 是系统自带的库,其中有个方法叫 open 由此可见io 是一个table
-- r表示读取的权限(read的缩写) 参数如果是a表示追加(append) w表示写入(write) b表示打开二进制(binary)
-- local f ... |
-- $Name:English Tutorial$
instead_version "1.6.0"
game.act = 'You can\'t.';
game.inv = "Hmm... Wrong...";
game.use = 'Won\'t work...';
game.pic = 'instead.png';
set_music('instead.ogg');
main = room {
nam = 'Tutorial',
act = function()
walk('r1');
end,
dsc = txtc("Welcome to INSTEAD tutorial mode.")..[[^^
T... |
--!A cross-platform build utility based on Lua
--
-- 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... |
local PANEL = {}
function PANEL:Init()
local size_x, size_y = 64, 64
self:SetSize(size_x, size_y)
self:SetText("")
self.icon = self:Add("SpawnIcon")
self.icon:Dock(FILL)
self.icon.DoClick = function()
self.DoClick()
end
self.color = Color(70, 70, 70)
self.values = {}
self.values_hide = false
end
function... |
-- Copyright (c) 2021 Kirazy
-- Part of Artisanal Reskins: Compatibility
--
-- See LICENSE in the project directory for license information.
-- Check to see if reskinning needs to be done.
if not mods["P-U-M-P-S"] then return end
if not (reskins.bobs and reskins.bobs.triggers.logistics.entities) then return end
-- Se... |
local Fun = require "fun"
local Graph = require "graph"
local Marking = require "marking"
local Coverability = {}
function Coverability.create (t)
t = t or {
traversal = Graph.depth_first,
}
assert (type (t) == "table")
assert (type (t.traversal) == "function")
return Graph.create {
traversal ... |
------------------------
-- #region もぐらキャラクタークラス
------------------------
MogChar = {}
------------------------
-- #region コンストラクタ
-- name :キャラ固有名(キャラ固有の特殊条件の判定に使用)
-- img_off :マウスoff時画像
-- img_over :マウスover時画像
-- img_on :マウスon時画像
-- point :もぐら叩き時ポイント
-- x :表示調整用相対値x
-- y :表示調整用相対値y
-- z :表示調整用... |
local utils = require('metrics.utils')
local collectors_list = {}
local function update_memory_metrics()
if not utils.box_is_configured() then
return
end
if box.info.memory ~= nil then
local i = box.info.memory()
for k, v in pairs(i) do
local metric_name = 'info_memory... |
local G = {
}
local function variables(g)
if g == _G then
return G.variables
end
if type(g) == 'table' then
return g.variables
end
end
local function variables_save(g)
if g == _G then
return G.variables_save
end
if type(g) == 'table' then
return g.variables_save
end
end
function isForSave(k, v, s) --... |
local API_NPC = require(script:GetCustomProperty("API_NPC"))
local EFFECT_TEMPLATE = script:GetCustomProperty("EffectTemplate")
local TELEGRAPH_TEMPLATE = script:GetCustomProperty("TelegraphTemplate")
local telegraphs = {}
function OnTaskStart(npc, animatedMesh)
animatedMesh:PlayAnimation("unarmed_shout")
... |
ChatBubble = {}
ChatBubble.iconTalk = Material("chatbubbles/talking.png")
ChatBubble.iconType = Material("chatbubbles/typing.png")
hook.Add( "PostDrawTranslucentRenderables", "ChatBubble", function()
for _,ply in pairs( player.GetAll() ) do
if IsValid(ply) && ply:Alive() then
if LocalPlayer() == p... |
--#############################################################################
--# Solar2D Scene Kit
--#############################################################################
io.output():setvbuf("no")
display.setStatusBar(display.HiddenStatusBar)
--###############################################################... |
object_tangible_tcg_series7_garage_display_vehicles_tcg_at_pt_walker = object_tangible_tcg_series7_garage_display_vehicles_shared_tcg_at_pt_walker:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series7_garage_display_vehicles_tcg_at_pt_walker, "object/tangible/tcg/series7/garage_display_vehicles/tcg_at_pt_wa... |
local vehshop = {
opened = false,
title = "Vehicle Shop",
currentmenu = "main",
lastmenu = nil,
currentpos = nil,
selectedbutton = 0,
marker = { r = 0, g = 155, b = 255, a = 200, type = 1 },
menu = {
x = 0.1,
y = 0.08,
width = 0.2,
height = 0.04,
buttons = 10,
from = 1,
to = 10,
... |
local Vector=require("vector")
function AxisVector(mag,xSign,angle,ySign)
return Vector(mag*math.cos(angle)*xSign,mag*math.sin(angle)*ySign)
end
function roundVector(v,places)
return Vector(math.round(v.x,places),math.round(v.y,places))
end |
-- Hunt and kill algorithm
-- Detailed description: http://weblog.jamisbuck.org/2011/1/24/maze-generation-hunt-and-kill-algorithm
local random = math.random
local function hunt_and_kill(maze)
maze:ResetDoors(true)
maze[1][1].visited = true
-- these will track last hunt position and free us of need to traverse... |
cli = inst.cli
Help.Register { Command="exit", Brief="exit from cli", Usage="exit([code])"}
function exit(code)
code = code or 0
cli:Exit(code)
end
Help.Register { Command="q", Brief="exit from cli", Usage="q([code])"}
function q(code)
exit(code)
end
|
local welcomeMsg = "Welcome to K33N! Checking whitelist status..."
local steamMsg = "Please open Steam and try again."
local noEntryMsg = "You are not able to join this server. Register and apply for our whitelist today: k33ngaming.com/apply"
function iamRequest(method, endpoint, jsonData)
local data = nil
Per... |
return {
plugins = function(use)
use("nvim-telescope/telescope.nvim")
use("~/workspace/open-related.nvim")
end,
setup = function()
require("telescope").setup({
defaults = {
sorting_strategy = "ascending",
layout_config = {
width = 0.9,
height = 0.9,
}... |
local test = require("cp.test")
local List = require("cp.rx.go.List")
local prop = require("cp.prop")
local insert = table.insert
return test.suite("cp.rx.go.List"):with {
test("List", function()
local results = {}
local error = nil
local completed = tru... |
if REALM_HUD or REALM_MENU then
local console_buffer = util.shared_buffer("savegame.console", 128)
local bottom = not not REALM_MENU
local function console()
local w, h = UiWidth(), UiHeight()
local cw, ch = w / 2 - 220, bottom and math.floor(h * 0.75) or h - 40
local visible = bottom and 1 - (gSandboxScale... |
local motion =
Concord.system(
{_components.transform},
{_components.transform, _components.spin, _components.polygon, "ROTATING"},
{_components.transform, _components.control, _components.collides, "PLAYER"}
)
function motion:init()
self.obstacle_min_x = nil
self.obstacle_max_x = nil
self.obstacle_min_y... |
local ngx = ngx
local ngx_log = ngx.log
local ngx_ERR = ngx.ERR
local ngx_var = ngx.var
local op_time_version = require "cache_proxy.lua_script.op_time_version"
local init_config = require "cache_proxy.config.config"
function get_nowtime_cache_version()
local cache_version_updatetime = ... |
print '-------------------------------------------------------------'
print 'gh-806: cant prune old replicas by deleting their server ids'
print '-------------------------------------------------------------'
env = require('test_run')
test_run = env.new()
engine = test_run:get_cfg('engine')
replica_set = require('fast... |
--[[NIGHTOWLACE_WEAPONRY]]--
wait(1 / 60)
Effects = { }
local Player = game.Players.localPlayer
local Character = Player.Character
local Humanoid = Character.Humanoid
Humanoid.WalkSpeed = 25
local mouse = Player:GetMouse()
local m = Instance.new('Model', Character)
m.Name = "WeaponModel"
local LeftArm = Character["Left... |
function game_canvas()
end |
local mod = DBM:NewMod(673, "DBM-Party-MoP", 3, 312)
local L = mod:GetLocalizedStrings()
local sndWOP = mod:SoundMM("SoundWOP")
mod:SetRevision(("$Revision: 10172 $"):sub(12, -3))
mod:SetCreatureID(56747)--56747 (Gu Cloudstrike), 56754 (Azure Serpent)
mod:SetZone()
mod:RegisterCombat("combat")
mod:Regist... |
local vars = require('vars')
require('packer').startup(function(use)
use { 'wbthomason/packer.nvim', opt = true }
use 'lewis6991/impatient.nvim'
use 'nathom/filetype.nvim'
-- profiling
if vars.profile == true then
use { 'tweekmonster/startuptime.vim', cmd = 'StartupTime' }
end
use {
'kyazdani42... |
--[[ _
( )
_| | __ _ __ ___ ___ _ _
/'_` | /'__`\( '__)/' _ ` _ `\ /'_` )
( (_| |( ___/| | | ( ) ( ) |( (_| |
`\__,_)`\____)(_) (_) (_) (_)`\__,_)
DNumberWang
--]]
local PANEL = {}
--[[---------------------------... |
-- 时间窗内,总流量限流
-- 低版本openresty暂不支持,仅支持1.13.6.1+ 以上
local limit_count = require "resty.limit.count"
print("测试输出成功3------------------")
-- rate: 120/min
local lim, err = limit_count.new("limit_count_store", 60, 60)
if not lim then
ngx.log(ngx.ERR, "failed to instantiate a resty.limit.count object: ", err)
return ngx.... |
local mapa = {
ambient="0.1,0.1,0.1",
gravity="0 -9.8 0",
entities={
{
name="Suelo",
id=1,
components={
transform={
position="0,0,0",
rotation="0,0,0",
scale="0.75,0.03,0.75",
parent="-1"
},
renderer={
mesh="cube.mesh"... |
--[[---------------------------------------------------------
Super Cooking Panic for Garry's Mod
by Xperidia (2020)
-----------------------------------------------------------]]
include("sh_powerups.lua")
local function PlayerUsedPowerUP()
local ply = net.ReadEntity()
local powerup_id = net.ReadUInt(4)
if... |
operat1 = {"difference", "sum"}
operat2 = {"Decrease", "Increase"} |
local brute = require "brute"
local creds = require "creds"
local ipmi = require "ipmi"
local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
description = [[
Performs brute force password auditing against IPMI RP... |
Base = {}
--Funcao que calcula uma funcao pre-definida
--args: (double) x
function Base.FxEq(x)
return tonumber(string.format("%." .. PRECISION .. "f", (2*math.cos(0.39*x)) + (5*math.sin(0.5*x)) + (0.5*math.cos(0.1*x)) + (10*math.sin(0.7*x)) + (5*math.sin(1*x)) + (5*math.sin(0.35*x))))
end
--Funcao que avalia uma p... |
--
-- Created by IntelliJ IDEA.
-- User: alexa
-- Date: 20/11/2019
-- Time: 23:48
-- To change this template use File | Settings | File Templates.
--
local A, Bag=...;
function Bag.isCoin(currencyID, lootQuantity)
return currencyID == nil and lootQuantity == 0;
end
function Bag.bag()
local container = {};
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.