content stringlengths 5 1.05M |
|---|
--------------------------------------------------------------------------------
--- List directory content
--
-- @usage
--
-- -- List directory, recursive:
--
-- local ls = require("gears.filesystem.ls")
--
-- ls('/tmp', function(result) dbg.dump(result) end, true)
--
-- @author Michael Perlov
-- @copyright 2018 Mi... |
--[[
Copyright (c) 2021-2022 Jason Morley, Tom Sutcliffe
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, ... |
local stringx = require "pl.stringx"
local url = require "socket.url"
local utils = require "api-umbrella.proxy.utils"
local append_args = utils.append_args
local startswith = stringx.startswith
local url_build = url.build
local url_parse = url.parse
-- Parse the "cache-lookup" status out of the Via header into a sim... |
function num_of_factors(num)
local n = 0
local factor = 1
while factor * factor < num do
if num % factor == 0 then
n = n + 1
end
factor = factor + 1
end
if factor * factor > num then
return n * 2
else
-- perfect square
return n * 2 + 1
end
end
triangle = 0
for i = 1, math.hu... |
function Blink(keys)
local point = keys.target_points[1]
local caster = keys.caster
local casterPos = caster:GetAbsOrigin()
FindClearSpaceForUnit(caster, point, false)
ProjectileManager:ProjectileDodge(caster)
end |
local att = {}
att.name = "bg_6inchsw29"
att.displayName = "Long Barrel"
att.displayNameShort = "Long"
att.isBG = true
att.statModifiers = {RecoilMult = 0.15,
AimSpreadMult = -0.4,
DrawSpeedMult = -0.2,
OverallMouseSensMult = -0.1,
DamageMult = 0.06}
if CLIENT then
att.displayIcon = surface.GetTextureID("atts/bg_6in... |
local lume = require "lib.lume"
local vector = require "lib.vector"
local input = require "input"
local assets = require "assets"
local atlas = assets.atlas0
local lightbulb = {
filter = function (self, ent)
return ent.type == "LightBulb"
end,
setup = function (self, ent, world)
ent.i... |
--[[
################################################################################
#
# Copyright (c) 2014-2019 Ultraschall (http://ultraschall.fm)
#
# 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 ... |
--[[
Copyright (C) 2017-2018 ZTE, Inc. and others. All rights reserved. (ZTE)
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/LIC... |
function passive(spell, target, caster, turns, statustype)
if target[statustype][spell.name] then
target[statustype][spell.name].turns = target[statustype][spell.name].turns + (turns-1)
return
end
target[statustype][spell.name] = turns
if not spell.blurb then spell.blurb = "" end
tab... |
local format = require("cmp_git.format")
local sort = require("cmp_git.sort")
require("cmp_git").setup({
-- defaults
filetypes = { "gitcommit", "octo" },
remotes = { "upstream", "origin" }, -- in order of most to least prioritized
enableRemoteUrlRewrites = false, -- enable git url rewrites, see https://git-scm... |
local status_ok, gitsigns = pcall(require, 'gitsigns')
if not status_ok then
return
end
gitsigns.setup {
current_line_blame = true,
signs = {
add = { hl = 'GitSignsAdd', text = '▌' },
change = { hl = 'GitSignsChange', text = '▌' },
delete = { hl = 'GitSignsDelete', text = '▌' },
topdelete = { hl ... |
AmiUI = {
log = function(self, text)
cecho("AmiUI: " .. text .. "\n")
end
}
AUITriggers = AUITriggers or {}
AmiUI:log("Initializing AmiUI...")
tempTimer( 0, function () raiseEvent( "AmiUI.Loaded" ) end ) |
Network = class('Network')
-- initialize some basic values
function Network:initialize()
--self.ip = '73.130.6.29'
self.ip = 'localhost'
self.port = '22122'
-- used as the divider between tag and message in networked data communication
self.magicChar = '|'
self.lastEvent = nil
self.peer = nil
end
-- create a... |
RegisterServerEvent("pixel:watermark")
AddEventHandler("pixel:watermark", function() TriggerClientEvent("pixel", source, GetPlayers())
end)
Citizen.CreateThread(function()
Citizen.Wait(5000)
print(
"^0============================================================================================^7\... |
include('qword.lua');
include("addresses.lua");
include("database.lua");
include("functions.lua");
include("classes/player.lua");
include("classes/equipment.lua");
include("classes/inventory.lua");
include("classes/bank.lua");
include("classes/guildbank.lua");
include("classes/cursor.lua");
include("classes/camera.lua"... |
local ChangeLog = require('ui.changelog')
ChangeLog:create(1, 0, 0):normal(L['First version'])
ChangeLog:create(2, 0, 0):normal(L['Second version'])
ChangeLog:update()
|
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local Resources = require(ReplicatedStorage:WaitForChild("Resources"))
local Registerable = require(script.Registerable)
local AuraAgent = require(script.AuraAgent)
local SyncEvent = Resources:GetRemoteEven... |
Description="Add doc.qt.io reference links to HTML, LaTeX, RTF and ODT output of C++ code"
-- optional parameter: syntax description
function syntaxUpdate(desc)
if desc~="C and C++" then
return
end
function getURL(token)
url='http://doc.qt.io/qt-5/'..string.lower(token).. '.html'
if... |
--[[
Bags for Minetest
Copyright (c) 2012 cornernote, Brett O'Donnell <cornernote@gmail.com>
Source Code: https://github.com/cornernote/minetest-particles
License: GPLv3
]]--
-- get_formspec
local get_formspec = function(player,page)
if page=="bags" then
local player_inv = player:get_inventory()
player_inv:se... |
-- This module is loaded if a script calls require "gplus.objects".
local g = golly()
local gp = require "gplus"
local pattern = gp.pattern
local m = {}
m.block = pattern([[
**
**
]])
m.blinker = pattern("***", -1, 0)
m.glider = pattern([[
.**
**.
..*
]])
m.lwss = pattern([[
****.
*...*
*....
.*..*
]])
m.mwss = ... |
local cjson = require ("cjson")
local client = require ("resty.kafka.client")
local broker_list = {
{ host = "127.0.0.1", port = 9092 },
}
local cli = client:new(broker_list)
local brokers, partitions = cli:fetch_metadata("test")
if not brokers then
ngx.say("fetch_metadata failed, err:", partitions)
end
ngx.say... |
-- Set the Maximum amount of Product for all Data Assembler --
for _, da in pairs (global.dataAssemblerTable or {}) do
for _, recipe in pairs (da.recipeTable) do
if recipe.amount ~= nil and recipe.amount ~= 0 then
for _, product in pairs (recipe.products) do
product.max = recipe.... |
-- {{{ Use protected call so we don't error on first use.
local packer_ok, packer = pcall(require, 'packer')
if not packer_ok then return end
-- ------------------------------------------------------------------------- }}}
-- {{{ Packer startup function definition.
return packer.startup(function(use)
-- ----------... |
local mayConflictList = {
"2433702881", -- Chaos Mod
}
local willConflictList = {
"2415158477", -- Sprint and Walk
"2417915839", -- Flymode
}
local compatTimer = 0
local willConflict = false
local conflicts = {}
function checkCompat()
for i=1, #mayConflictList do
local id = mayConflictList[i]
local active = ... |
--[[
Title: Adv. Dupe 2 Codec
Desc: Dupe encoder/decoder.
Author: emspike
Version: 2.0
]]
local REVISION = 4
local hasModule = false
if(SERVER)then
if(system.IsWindows())then
hasModule = file.Exists("lua/bin/gmsv_ad2filestream_win32.dll", "GAME")
print(hasModule)
if(!hasModule)then
print("[AdvDupe2Not... |
--IupTree Example in IupLua
--Creates a tree with some branches and leaves. Uses a Lua Table to define the IupTree structure.
require( "iuplua" )
tree = iup.tree{}
dlg = iup.dialog{tree ; title = "TableTree result", size = "200x200"}
dlg:showxy(iup.CENTER,iup.CENTER)
t = {
{
"Horse",
"Whale";
branchnam... |
-- Super Nicknames are saved in gc_nickcache.colorname
local acceptedChars = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
local nickLimit = 22
local originalName = {
-- [player] = name
}
function setSuperNick(player,bool)
-- originalName[source] = getPlayerName(... |
local nested_ordered = {}
local KEY_ORDER_KEY = '__key_order'
function nested_ordered.new()
return setmetatable({
[KEY_ORDER_KEY] = {},
}, nested_ordered)
end
function nested_ordered.__newindex(t, index, value)
local order = rawget(t, KEY_ORDER_KEY)
order[#order + 1] = index
rawset(t, ind... |
local web = require('http')
local function http_magick(self)
print(555555555555555)
return self:http("hello")(self)
end
print(4)
local function print_body(self)
print(66666666666666)
print(self:body_read())
print("Content-Type")
print(self:http_header("Content-Type"))
print(77777777777777)
... |
-- This file is part of SA MoonLoader package.
-- Licensed under the MIT License.
-- Copyright (c) 2016, BlastHack Team <blast.hk>
local sampfuncs = {
-- RPCs
RPC_CLICKPLAYER = 23,
RPC_CLIENTJOIN = 25,
RPC_ENTERVEHICLE ... |
minetest.register_craftitem("bitumen:blueprint_paper", {
description = "Blueprint Paper",
stack_max = 99,
inventory_image = "default_paper.png^[colorize:blue:120",
groups = {flammable = 3},
})
minetest.register_craftitem("bitumen:blueprint_book", {
description = "Blueprint Paper",
stack_max = 99,
invent... |
local popup = require"plenary.popup"
local M = {}
-- State
local _hmap_input_bufwin = nil
local _hmap_input_win_id = nil
local _hmap_results_bufwin = nil
local _hmap_results_win_id = nil
local _hmap_results = nil
local _hmap_maps = nil
-- Locals
local function list(m)
local map_list = {}
local maps = vim.api.... |
local config = require'nlspsettings.config'
local nlspsettings = require'nlspsettings'
local a = vim.api
local uv = vim.loop
local M = {}
--- Returns the name of the server connected to the current buffer.
---@param bufnr number? buffer number
---@return string server_name
local get_server_name = function(bufnr)
v... |
title = "My Webpage"
page = [[
<html !DOCTYPE="html">
<head>
<title>]] .. title .. [[</title>
</head>
<body>
</body>
</html>
]]
io.write(page) |
requireInjector(getfenv(1))
local Config = require('config')
local Event = require('event')
local UI = require('ui')
local Util = require('util')
multishell.setTitle(multishell.getCurrent(), 'Files')
UI:configure('Files', ...)
local config = {
showHidden = false,
showDirSizes = false,
}
Config.load('File... |
function breakpoint()
if(fa.sharedmemory("read", 0x00, 0x01, "") == "!")then
error("--- BREAK POINT ---")
end
sleep(0)
end
function putMessage(msg)
fa.sharedmemory("write", 0x01, 0xFE, msg)
end
fa.sharedmemory("write", 0x00, 0x01, "-") |
-- supporting testfile; belongs to 'cl_spec.lua'
describe("Tests the busted command-line options", function()
it("is a test with a tag #tag1", function()
-- works by counting failure
error("error 1 on tag1")
end)
it("is a test with a tag #tag1", function()
-- works by counting failure
error("... |
object_tangible_loot_creature_loot_collections_tusken_bantha_tooth = object_tangible_loot_creature_loot_collections_shared_tusken_bantha_tooth:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_tusken_bantha_tooth, "object/tangible/loot/creature/loot/collections/tusken_bantha_tooth.iff... |
function factorial(n)
for i = 1, n-1 do
n = n*i
end
return n
end
io.write(factorial(4))
|
ModalClass(textentry)
function textentry:ctor(cb, title)
self:ModalInit()
self:ModalCallback(cb)
local scn = self.Elements
scn.content:SetFocus()
scn.title.Text = title
scn.content:OnTextEntered(function(name)
self:Close('ok', name, 0)
end)
scn.close:OnClick(function()
self:Close('cancel')
... |
local strsub = string.sub
local m = require 'lpeg'
local contiguous_byte_ranges = require 'parse.char.utf8.data.contiguous_byte_ranges'
local make_set = require 'parse.char.utf8.make.set'
local m_char = require 'parse.char.utf8'
local m_char_no_more = m_char * m.P(-1)
local char_tools = require 'parse.char.utf8.tools'
... |
client_script 'client.lua'
files {
'index.html',
'application.js'
}
ui_page 'index.html' |
--
-- tests/api/test_directory_kind.lua
-- Tests the directory API value type.
-- Copyright (c) 2013 Jason Perkins and the Premake project
--
local suite = test.declare("api_directory_kind")
local api = premake.api
--
-- Setup and teardown
--
function suite.setup()
api.register {
name = "testapi",
kind =... |
object_draft_schematic_droid_droid_texture_kit = object_draft_schematic_droid_shared_droid_texture_kit:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_droid_droid_texture_kit, "object/draft_schematic/droid/droid_texture_kit.iff")
|
object_mobile_outbreak_undead_scientist_m_hum_02 = object_mobile_shared_outbreak_undead_scientist_m_hum_02:new {
}
ObjectTemplates:addTemplate(object_mobile_outbreak_undead_scientist_m_hum_02, "object/mobile/outbreak_undead_scientist_m_hum_02.iff")
|
local un = encode.mime.unstructured_header_line
local mbl = encode.mime.mailbox_list_header_line
local function encode_container(parts, container)
if container.multipart then
local boundary
boundary = "BOUNDARY--" .. multirand.string(
24,
"123456789BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz"
... |
--[[--ldoc desc
@Module BetView.lua
@Author JasonLiu
Date: 2018-10-24 19:13:25
Last Modified by: JasonLiu
Last Modified time: 2018-10-25 14:41:11
]]
local BetView = class("BetView", cc.load("boyaa").mvc.BoyaaView);
local BehaviorExtend = cc.load("boyaa").behavior.BehaviorExtend;
local Chip = require("app... |
--- Hardware timestamping.
local mod = {}
local ffi = require "ffi"
local dpdkc = require "dpdkc"
local dpdk = require "dpdk"
local device = require "device"
local eth = require "proto.ethernet"
local memory = require "memory"
local timer = require "timer"
local log = require "log"
local filter = require ... |
-- s-125 ln
GT = {};
GT_t.ws = 0;
set_recursive_metatable(GT, GT_t.generic_stationary);
set_recursive_metatable(GT.chassis, GT_t.CH_t.STATIC);
GT.visual.shape = "5P73_LAUNCH";
GT.visual.shape_dstr = "5P73_LAUNCH_P_1";
GT.sensor = {};
set_recursive_metatable(GT.sensor, GT_t.SN_visual);
GT.sensor.height = 2.707;
--Bu... |
require 'torch'
require 'xlua'
local evaluator = {}
function evaluator:evaluate(model, criterion, x, y, f_n, verbose)
local avg_score = 0
local cumulative_loss = 0
model:evaluate()
for t =1, #x do
if not verbose then
xlua.progress(t, #x)
end
local output = model:forward(x[t])
... |
--[[
Copyright 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 agr... |
return Def.ActorFrame{
Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("1,1,1,1"));
OnCommand=cmd(diffusealpha,0;sleep,0.8;linear,0.1;diffusealpha,1);
};
StartTransitioningCommand=function(self) SOUND:DimMusic(0,math.huge) end,
}
|
local exports = {}
local path = require('path')
local w = require('tables').wrap
exports.dirs = clink.dirmatches
exports.files = clink.filematches
exports.create_dirs_matcher = function (dir_pattern, show_dotfiles)
return function (token)
return w(clink.find_dirs(dir_pattern))
:filter(function(... |
-- Command shortcuts
local opt = vim.opt
local api = vim.api
local fn = vim.fn
local cmd = vim.cmd
-- Configure plugins
require('packer').startup(function()
-- Packer can manage itself
use 'wbthomason/packer.nvim'
use {
'nvim-telescope/telescope.nvim',
requires = { {'nvim-lua/plenary.nvim'} },
confi... |
-------------------------------------------------------------------------------
-- コマンド ノーマルモード 挿入モード コマンドラインモード ビジュアルモード
-- map/noremap @ - - @
-- nmap/nnoremap @ - - -
-- imap/inoremap - @ ... |
object_building_kashyyyk_thm_kash_zonegate_gate_simple = object_building_kashyyyk_shared_thm_kash_zonegate_gate_simple:new {
}
ObjectTemplates:addTemplate(object_building_kashyyyk_thm_kash_zonegate_gate_simple, "object/building/kashyyyk/thm_kash_zonegate_gate_simple.iff")
|
module( "search", package.seeall )
local Providers = {}
function AddProvider( func, id )
local prov = {
func = func,
}
if ( id ) then
Providers[ id ] = prov
else
table.insert( Providers, prov )
end
end
function GetResults( str, types, maxResults )
if ( !maxResults || maxResults < 1 ) then maxResults... |
local Addonname, Addontable = ...
-- Maw of Souls
Addontable.maw = {
-- Ymiron, the Fallen King
133637, -- Utgarde Royal Signet
133644, -- Memento of Angerboda
137326, -- Fragmented Meteorite Whetstone
133629, -- Crown of Fallen Kings
133682, -- Northern Gale
133616, -- Legwraps of Unworthy... |
surface.CreateFont("lambda_sb_def", {font = "Verdana", size = 22, weight = 400, antialias = true})
surface.CreateFont("lambda_sb_num", {font = "HudHintTextLarge", size = 18, weight = 600, antialias = true})
surface.CreateFont("lambda_sb_def_sm", {font = "Roboto Light", size = 16, weight = 300, antialias = true})
surfac... |
local tApis = {}
for k,v in pairs( _G ) do
if type(k) == "string" and type(v) == "table" and k ~= "_G" then
table.insert( tApis, k )
end
end
table.insert( tApis, "shell" )
table.insert( tApis, "package" )
if multishell then
table.insert( tApis, "multishell" )
end
table.sort( tApis )
textutils.page... |
local S = minetest.get_translator("item_repair")
-- Please don't change this, I don't protect against division by zero!
local base_time = 1.0 -- 0.4 max
local base_repair = 65535.0 * (item_repair_settings.repair_percent / 100.0)
item_repair_internal.update = function (pos, elapsed)
local meta=minetest.get_meta(po... |
forge.clear()
bladeHeight = math.random(6, 14) / 10;
bladeWidth = math.random(7, 9) /10;
guardHeight = 0.1;
hiltHeight = 0.1;
if math.random(0, 2) == 1 then
blades = {
"Swords/blade",
"Swords/blade_bend",
"Swords/blade_broken",
"Swords/blade_dagger",
"Swords/blade_dua... |
object_ship_kihraxz_tier9 = object_ship_shared_kihraxz_tier9:new {
}
ObjectTemplates:addTemplate(object_ship_kihraxz_tier9, "object/ship/kihraxz_tier9.iff")
|
local types = require "resty.nettle.types.common"
local context = require "resty.nettle.types.sha3"
local lib = require "resty.nettle.library"
local ffi = require "ffi"
local ffi_new = ffi.new
local ffi_str = ffi.string
local setmetatable = setmetatable
local hashes = {
shake256 = {
length = 32,
context = co... |
--[[
© 2021 Tony Ferguson, do not share, re-distribute or modify
without permission of its author ( devultj@gmail.com - Tony Ferguson, http://www.tferguson.co.uk/ )
]]
AddCSLuaFile()
ENT.Base = "base_anim"
ENT.Type = "anim"
ENT.Author = "DevulTj"
ENT.PrintName = "Drill Base"
ENT.Spawnable = false
ENT.AdminSpawnab... |
require "scripts.core.variable"
local mana_max = class(Variable);
function mana_max:GetValue()
local baseMana = 75
if self.owner:HasValue("base_mana") then
baseMana = self.owner:GetValue("base_mana")
end
return baseMana + self.owner:GetValue("intelligence")*12;
end
return mana_max;
|
-- #######################################
-- ## Project: MTA:scp-088 ##
-- ## Name: Remover.lua ##
-- ## Author: Noneatme ##
-- ## Version: 1.0 ##
-- ## License: See top Folder ##
-- #######################################
-- FUNCTIONS / METHODS --
local cFunc = {}; -- Local Functions
local cSett... |
local lsp_signature = require 'lsp_signature'
lsp_signature.setup {
hint_enable = true,
hint_prefix = '🤔️ ',
}
|
require('nvim_mappings')
function load_rc_files()
local files =
vim.api.nvim_eval([[sort(glob(g:lua_plugin_config_dir .. '/*.lua', '', v:true))]])
for _, file in ipairs(files) do
-- local name = file:sub(#vim.g.lua_plugin_config_dir+2, file:len()-4)
-- require('rc/' .. name)
dofile(file)
end
end
... |
-- Copyright (c) 2018 Redfern, Trevor <trevorredfern@gmail.com>
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
return {
inventory = require "components.inventory",
position = require "components.position",
size = require "components.size",
sprite = require "compon... |
it('creates commands', function()
local mapx = require 'mapx'
mapx.setup { global = true }
expect.notNil(cmd)
expect.notNil(cmdbang)
local cmd = mapx.cmd
local cmdbang = mapx.cmdbang
local var = nil
-- option test
cmd('SetVar', function(opt)
if opt.register ~= '' then
var = opt.register
... |
color = {}
color.red = { 1, 0, 0, 1 }
color.green = { 0, 1, 0, 1 }
color.blue = { 0, 0, 1, 1 }
color.white = { 1, 1, 1, 1 }
color.black = { 0, 0, 0, 1 }
color.clear = { 0, 0, 0, 0 }
color.gray = { 0.25, 0.25, 0.25, 1.0 }
function color.random()
return {
math.random(),
math.random(),
math.random(),
1,
... |
----------------------------------------
-- Sassilization
-- http://sassilization.com
-- By Sassafrass / Spacetech / LuaPineapple
----------------------------------------
--This code is old and now useless //Hateful
/*
local require = require
local pairs = pairs
local _G = _G
module( "alliance" )
if( n... |
--[=[
[ContainerService](https://github.com/csqrl/containerservice-knit/) by csqrl. ContainerService is a Service and Controller pair for Sleitnick's Knit framework,
which allows for selective replication to clients. This means that an Instance can be replicated to a specific client without it being replicated to any... |
--- DENG: dynamic engine - powerful 3D game engine
--- licence: Apache, see LICENCE file
--- file: premake5.lua - main premake5 configuration file
--- author: Karl-Mihkel Ott
workspace "deng"
cleancommands { "make clean %{cfg.buildcfg}" }
configurations { "Debug", "Release" }
platforms { "Win32", "Linux" }... |
function love.conf(t)
t.modules.window = false
end
|
assets = require('libs.cargo').init('assets')
Button = require "Button"
Signal = require 'libs.hump.signal'
local game = require "game"
local menu = {}
music = love.audio.newSource("assets/music/theme.wav", "static")
local startBtn = Button(assets.gfx.btnstart, 150, 160, 32, 16)
function menu:enter()
... |
--Copyright (c) 2013, Banggugyangu
--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 conditions an... |
AddCSLuaFile()
DEFINE_BASECLASS("emod_base")
ENT.Category = "EMod"
ENT.Spawnable = true
ENT.PrintName = "EMod Meter"
ENT.EMODable = true
if SERVER then
function ENT:Initialize()
self:SetModel("models/emod/emod_meter.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SO... |
--[[
This script is an heavy modification of the soundstreamer package :
https://github.com/BlueMountainsIO/OnsetLuaScripts/tree/master/soundstreamer
Modified By GalaxHD551
]]--
local StreamedLights = {}
AddEvent("OnPackageStart", function()
math.randomseed(os.time())
end)
AddEvent("OnPackageStop", function()
fo... |
local self = {}
CAC.Vermilion2BanSystem = CAC.MakeConstructor (self, CAC.IBanSystem)
function self:ctor ()
end
-- IReadOnlyBanSystem
function self:GetId ()
return "Vermilion2BanSystem"
end
function self:GetName ()
return "Vermilion 2"
end
function self:IsAvailable ()
return istable (Vermilion) and
istabl... |
--[[
# Element: ClassPower
Handles the visibility and updating of the player's class resources (like Chi Orbs or Holy Power) and combo points.
## Widget
ClassPower - An `table` consisting of as many StatusBars as the theoretical maximum return of [UnitPowerMax](http://wowprogramming.com/docs/api/UnitPowerMax.... |
local h = require("helper")
vim.bo.tabstop = 2
vim.bo.softtabstop = 2
vim.bo.shiftwidth = 2
h.map("n", "<Leader>gf", "<cmd>lua require('ftplugin.yaml').go_task_file()<CR>")
|
DB_TEMPLATE_EQUIP =
{
[1] = {name = "weapon_sword_1", icon = "weapon_sword", sound = "", type = 0, part = 0, requirement = nil, mainValue = "attack", rangeType = "", rangeValue = 1, hitRate = 98, element = nil, attack = 15, defense = 0, mAttack = 0, speed = 0, hitPoint = 0, manaPoint = 0, stamina = 0, luck = 0, resis... |
local K, C, L = unpack(select(2, ...))
local Module = K:NewModule("RaidUtility", "AceEvent-3.0")
local _G = _G
local find = string.find
local ipairs, pairs, next = ipairs, pairs, next
local tinsert, twipe, tsort = table.insert, table.wipe, table.sort
local CreateFrame = _G.CreateFrame
local CUSTOM_CLASS_COLORS = _G.C... |
jinkinsConvoTemplate = ConvoTemplate:new {
initialScreen = "",
templateType = "Lua",
luaClassHandler = "theme_park_nym_conv_handler",
screens = {}
}
----------
--Jinkins convos if quest completed
----------
good_work = ConvoScreen:new {
id = "good_work",
leftDialog = "@celebrity/jinkins:good_work", -- Securing t... |
local jdtls = require 'jdtls'
local api = vim.api
local M = {}
-- https://github.com/mfussenegger/nvim-jdtls/wiki/UI-Extensions
-- use telescope for code actions etc...
local function jdtls_setup_ui()
local finders = require'telescope.finders'
local sorters = require'telescope.sorters'
local actions = require'te... |
return {
-- ID of the actor (optional, defaults to filepath)
id = "starwalker",
-- Width and height of the actor (if unsure, just use sprite size)
width = 37,
height = 36,
-- In-world hitbox, relative to the actor's topleft
-- (these numbers are based on the actual deltarune hitbox)
hi... |
local api = vim.api
local function create_buf()
return api.nvim_create_buf(false, true)
end
local function create_win(x, y, width, color, blend)
local buf = api.nvim_create_buf(false, true)
local options = {
relative='win',
focusable=false,
bufpos={x, y},
row=0,
co... |
trinium.creative_mode = minetest.settings:get_bool"creative_mode"
local speed = 100
local caps = {times = {speed, speed, speed}, uses = 0, maxlevel = 456}
if trinium.creative_mode then
minetest.register_item(":", {
type = "none",
wield_image = "wieldhand.png",
wield_scale = {x = 1, y = 1, z = 2.5},
groups = {... |
project "Launch"
RuntimeModule()
kind "ConsoleApp"
links
{
"Core"
}
includedirs
{
"%{RuntimeInclude.Core}"
}
-- Filters
RuntimeFilters() |
local sysinfo = require 'utils.sysinfo'
local base_app = require 'app.base'
local app = base_app:subclass("FREEIOE_DATA_SIM_APP")
app.static.API_VER = 4
function app:initialize(name, sys, conf)
base_app.initialize(self, name, sys, conf)
self._devs = {}
end
function app:on_start()
local dev_count = self._conf.devi... |
NewShipType = StartShipConfig()
NewShipType.displayedName="$10020"
NewShipType.sobDescription="$10021"
NewShipType.maxhealth=getShipNum(NewShipType, "maxhealth", 1200)
NewShipType.regentime=0
NewShipType.minRegenTime=0
NewShipType.sideArmourDamage = getShipNum(NewShipType, "sideArmourDamage", 1.0)
NewShipType.rearArmou... |
---------------------------------------------------
-- Licensed under the GNU General Public License v2
-- * (c) 2010, Adrian C. <anrxc@sysphere.org>
---------------------------------------------------
-- {{{ Grab environment
local io = { open = io.open }
local setmetatable = setmetatable
local string = { find = stri... |
-- Set the FPS cap at runtime.
--[[=begin
setfps
======
Run ``setfps <number>`` to set the FPS cap at runtime, in case you want to watch
combat in slow motion or something.
=end]]
local cap = ...
local capnum = tonumber(cap)
if not capnum or capnum < 1 then
qerror('Invalid FPS cap value: '..cap)
end
df.global.... |
#!/usr/bin/env lua
-- Application template.
-- Uses the GLFW/OpenGL backend shipped with MoonNuklear.
local glfw = moonglfw
local gl = moongl
local backend = require("moonnuklear.glbackend")
local nk = moonnuklear
local TITLE = "Template" -- GLFW window title
local FPS = 30 -- desired frames per seconds
local W, H = ... |
--websocket协议的网关
--负责连接验证以及网络协议解析和网络数据的转发
local skynet = require "skynet"
local crypt = require "skynet.crypt"
local netpack = require "skynet.netpack"
local cluster = require "skynet.cluster"
local socket = require "skynet.socket"
local protobuf = require "protobuf"
local subid_online = {} -- subid -> { uid, secret, ... |
RegisterCommand(Config.SwitchVehicleJobCommand, function()
if IsPedInAnyVehicle(ESX.PlayerData.ped, true) and GetPedInVehicleSeat(GetVehiclePedIsIn(ESX.PlayerData.ped), -1) == ESX.PlayerData.ped then
local vehicle = GetVehiclePedIsIn(ESX.PlayerData.ped, false)
local plate = GetVehicleNumberPlateText(vehicle)
ESX... |
-- Tests for GLib Regex functions
-- written by Hadriel Kaplan, based on Lrexlib's test suite
-- This is a test script for tshark/wireshark.
-- This script runs inside tshark/wireshark, so to run it do:
-- tshark -r empty.cap -X lua_script:<path_to_testdir>/lua/gregex.lua -X lua_script1:glib
--
-- if you have to give ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.