content stringlengths 5 1.05M |
|---|
if ( SERVER ) then
AddCSLuaFile( "shared.lua" )
end
if ( CLIENT ) then
SWEP.PrintName = "DH-17"
SWEP.Author = "Syntax_Error752"
SWEP.ViewModelFOV = 70
SWEP.Slot = 1
SWEP.SlotPos = 5
SWEP.WepSelectIcon = surface.GetTextureID("HUD/killicons/DH17")
killicon.Add( "weapon_752_dh17", "HUD/... |
object_tangible_furniture_decorative_wod_pro_tree_04 = object_tangible_furniture_decorative_shared_wod_pro_tree_04:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_decorative_wod_pro_tree_04, "object/tangible/furniture/decorative/wod_pro_tree_04.iff")
|
local World = BaseClass()
ECS.World = World
ECS.World.allWorlds = {}
function World:Constructor( name )
self.name = name
self.behaviour_mgrs = {}
self.behaviour_mgrs_lookup = {}
setmetatable(self.behaviour_mgrs_lookup, {__mode = "kv"})
self.IsCreated = true
table.insert(ECS.World.allWorlds, self)
end
functi... |
-- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
require("luci.sys")
require("luci.sys.zoneinfo")
require("luci.tools.webadmin")
require("luci.util")
m = Map("system", translate("System"), translate("Here you can configure the basic aspects of your device li... |
local PlatModule = {}
local HPL = 32 --Half PLatform length
local PL = 64 --Full PLatform length
local PW = 8 --Platform width
local ps = 128 --Platform speed
local MD = 0.1 --Maximal deviation
function PlatModule.__index(t, k)
return rawget(t, k) or PlatModule[k]
end
local function lerp(x, a, b)
if a > b then
... |
local KEYWORDS = {
["and"] = true, ["break"] = true, ["do"] = true, ["else"] = true,
["elseif"] = true, ["end"] = true, ["false"] = true, ["for"] = true,
["function"] = true, ["if"] = true, ["in"] = true, ["local"] = true,
["nil"] = true, ["not"] = true, ["or"] = true, ["repeat"] = true,
["return"] ... |
fx_version 'cerulean'
game 'gta5'
description 'QB-cnr'
version '1.0.0'
shared_script 'config.lua'
server_script 'server/*.lua'
client_scripts {
'client/*.lua'
}
files {
}
lua54 'yes' |
--花騎士団の白馬
--Script by XyLeN
function c100425021.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetTargetRange(POS_FACEUP_DEFENSE,0)
... |
--[[
Copyright 2021 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, distrib... |
--region CSize.lua
--Author : jefflwq
--Date : 2016/04/24
--说明 : Size类
--endregion
using "Joop"
namespace "System.Drawing"
{
class "CSize"
{
-- 此 Size 的 Width 。
Width = false,
-- 此 Size 的 Height 。
Height = false,
-- 初始化 Size 类的新实例。
CSize =
... |
if oo == nil then oo = require "loop.base" end
function assertClassMembers(object)
assert(oo.isinstanceof(object, Class) == true)
assert(object.classAttrib == "classAttrib")
assert(object:classMethod() == "classMethod")
assert(object.classMethod == methods.classMethod)
assert(rawget(object, "classAttrib") == nil)... |
return function(luma,fage)
local eztask = luma:import "eztask"
local lmath = luma:import "lmath"
local class = luma:import "class"
-------------------------------------------------------------------------------
local camera=fage.class.object:extend()
function camera:__tostring()
return "camera"
end
... |
-- configure the monitor names here
MACBOOK_MONITOR = 'Built-in Retina Display'
WIDE_MONITOR = 'DELL U3415W'
ACER_MONITOR = 'KG271'
DELL_MONITOR = 'PLX2481H' |
#!/usr/bin/env lua
local glfw = require("moonglfw")
local gl = require("moongl")
local glmath = require("moonglmath")
local cp = require("moonchipmunk")
local toolbox = require("moonchipmunk.toolbox")
cp.glmath_compat(true)
local pi, infinity = math.pi, math.huge
local sin, cos, abs = math.sin, math.cos, math.abs
loca... |
-- sample test.lua
-- sample2 test.lua
|
conky.config = {
alignment = 'middle_left',
background = true,
border_width = 1,
cpu_avg_samples = 2,
default_color = 'ffffff',
default_outline_color = 'ffffff',
default_shade_color = 'ff00cc',
draw_borders = false,
draw_graph_borders = true,
draw_outline = false,
draw_shades... |
-- _.reduce.lua
--
-- Reduces collection to a value which is the accumulated result of
-- running each element in collection through iteratee, where each
-- successive invocation is supplied the return value of the previous.
-- If accumulator is not provided the first element of collection is used
-- as the initial... |
do
local gridbak = swapoutgrid()
local grid = {}
getmygrid = function (x,y)
grid[x] = grid[x] or {}
return grid[x][y] or 10
end
setmygrid = function (x,y,v)
grid[x] = grid[x] or {}
grid[x][y] = v
end
local gg = getmygrid
function swapingrid(g)
grid = g
end
function swapoutgrid()
retur... |
local addon = select(2, ...)
local kCommandHandlers = {
details = function(elem)
return elem
end,
width = function(elem, width)
local numericWidth = tonumber(width)
if numericWidth then
elem:SetWidth(numericWidth)
end
return { width = elem:GetWidth() }
end,
height = function(elem, height)
local num... |
-- Copyright (c) 2019 Redfern, Trevor <trevorredfern@gmail.com>
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
local Component = require "moonpie.ui.components.component"
local image = require "moonpie.graphics.image"
local layouts = require "moonpie.ui.layouts"
Componen... |
package.path = '../../lua-otalk/?.lua;' .. '../src/?.lua;' .. package.path
require "verse".init("client")
c = verse.new()
local converter = require "converter"
local utils = require "utils"
require "jingleStanza"
local iqStanza = jingleStanza()
local jingle = require "jingle"
jingle.registerJingle(converter)
jingle... |
Global.cmp = Global.cmp or {}
Global.cmp.custom_loaded_packages = Global.cmp.custom_loaded_packages or {}
BLT.CustomPackageManager = {}
local C = BLT.CustomPackageManager
C.custom_packages = {}
C.ext_convert = {dds = "texture", png = "texture", tga = "texture", jpg = "texture"}
--Hopefully will be functional at some ... |
--SDMachine.lua
local ffi = require("ffi")
local sysd = require("systemd_ffi")
local fsutil = require("fs-util")
local strutil = require("string-util")
local fun = require("fun")
local function nil_gen()
return nil;
end
local SDMachine = {}
local SDMachine_mt = {
__index = SDMachine;
}
local function isNotUnit(na... |
local menu_height= 400
local menu_width= 250
local menu_x= {
[PLAYER_1]= _screen.w * .25,
[PLAYER_2]= _screen.w * .75,
}
local menus= {}
for i, pn in ipairs(GAMESTATE:GetHumanPlayers()) do
menus[pn]= setmetatable({}, nesty_menu_stack_mt)
end
local explanations= {}
local ready_indicators= {}
local turn_chart_mods= {... |
mail = {
-- mark webmail fork for other mods
fork = "webmail",
-- api version
apiversion = 1.1,
-- mail directory
maildir = minetest.get_worldpath().."/mails",
-- allow item/node attachments
allow_attachments = minetest.settings:get("mail.allow_attachments") == "true",
webmail = {
-- disallow banned pla... |
local LibDBIcon = LibStub("LibDBIcon-1.0")
--- @type ClickedInternal
local _, Addon = ...
--- @type Localization
local L = LibStub("AceLocale-3.0"):GetLocale("Clicked")
-- Local support functions
--- @param default string|boolean
--- @return Binding.LoadOption
local function GetLoadOptionTemplate(default)
local te... |
--[[ Copyright (c) 2018 Optera
* Part of LTN Content Reader
*
* See LICENSE.md in the project directory for license information.
--]]
local flib = require('__flib__.data-util')
local provider_reader_entity = flib.copy_prototype(data.raw["constant-combinator"]["constant-combinator"], "ltn-provider-reader")
... |
--[[
Copyright (c) 2015-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
--]]
require 'fb.luaunit'
local... |
local Region = require("refactoring.region")
local function selection_setup(refactor)
local region = Region:from_current_selection(refactor.bufnr)
local region_node = region:to_ts_node(refactor.ts:get_root())
local scope = refactor.ts:get_scope(region_node)
refactor.region = region
refactor.region... |
--
-- CBxx opcodes
--
local logger = require "logger"
local common_ops = require "opcodes.common"
local BIT = common_ops.BIT
local SET = common_ops.SET
local RES = common_ops.RES
local RL = common_ops.RL
local RLC = common_ops.RLC
local RR = common_ops.RR
local RRC = common_ops.RRC
local SLA = common_ops.SLA
local S... |
local lu = require('test.luaunit')
local spectacle = require('spectacle')
local t = {}
function t.testHeader()
local result = spectacle.Header(1, 'text', {id='meh'})
local expected = '<Header size={1} id="meh">text</Header>'
lu.assertEquals(result, expected)
end
function t.testPara()
local result = spectacle... |
local format = string.format
local concat = table.concat
local insert = table.insert
local inspect = vim.inspect
local function inspect_args(...)
local res = {}
for i = 1, select("#", ...) do
local v = select(i, ...)
insert(res, inspect(v, {newline='';indent=''}))
end
return concat(res, ', ')
end
loca... |
return {'ewijkse'} |
local grandTotal = 0;
local TotalWithdraw = 0;
local TotalDeposit = 0;
local cols = {["one"]=0, ["two"]=0, ["thr"]=0 , ["fou"]=0, ["fiv"]=0, ["six"]=0, ["sev"]=0, ["egh"]=0, ["nin"]=0, ["ten"]=0, ["ele"]=0, ["twe"]=0};
local colsWithdraw = {["one"]=0, ["two"]=0, ["thr"]=0 , ["fou"]=0, ["fiv"]=0, ["six"]=0, ["sev"]=0, [... |
local moon = require("moon")
local json = require("json")
local httpserver = require("moon.http.server")
local conf = ...
httpserver.content_max_len = 8192
httpserver.header_max_len = 8192
httpserver.error = function(fd, err)
moon.warn(fd," disconnected:", err)
end
local cluster_etc
local function load_cluste... |
--- 模块功能:MQTT客户端数据接收处理
-- @author openLuat
-- @module mqtt.mqttInMsg
-- @license MIT
-- @copyright openLuat
-- @release 2018.03.28
module(...,package.seeall)
--- MQTT客户端数据接收处理
-- @param mqttClient,MQTT客户端对象
-- @return 处理成功返回true,处理出错返回false
-- @usage mqttInMsg.proc(mqttClient)
function proc(mqttClient)
local resu... |
-- Torch/Lua Kalman Filter based Ball tracker test script
-- (c) 2013 Stephen McGill
local torch = require 'torch'
torch.Tensor = torch.DoubleTensor
local libKalman = require 'libKalman'
-- set the seed
math.randomseed(1234)
-- Debugging options
local show_kalman_gain = false
local debug_each_state = false
local test... |
--
-- _ninja.lua
-- Define the Ninja Build action.
--
premake.actions.ninja = {}
premake.abstract.ninjaVar = {}
local ninja = premake.actions.ninja
local ninjaVar = premake.abstract.ninjaVar
local solution = premake.solution
local project = premake5.project
local clean = premake.actions.clean
local config = p... |
local component = require("component")
local event = require("event")
local serialization = require("serialization")
local eventHandler = require("gachLib.type.eventHandler")
local state = require("gachLib.state")
local gLn = {
event = {
onDirectoryAdded = eventHandler(),
onDirectoryRemoved = eventH... |
--!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... |
-----------------------------------
-- Area: Gusgen Mines
-- NPC: Degga
-- Type: Standard Info NPC
-- !pos 40 -68 -259
-----------------------------------
require("scripts/globals/titles");
require("scripts/globals/quests");
require("scripts/globals/settings");
-----------------------------------
function onTrade(pla... |
-- config
local opts = {
}
(require 'mp.options').read_options(opts,"annotation")
local mpmsg = require 'mp.msg'
local dump = require 'dump'
local debug = require 'debug'
local msg = {}
local function wrap_message(...)
local info = debug.getinfo(3)
return '[' .. info.short_src .. ']:' .. info.currentline , .... |
--[[minetest.register_craft({
output = "multitest:shears",
recipe = {
{"default:steel_ingot", "", "default:steel_ingot"},
{"", "default:wood", ""},
{"multitest:handle_grip", "", "multitest:handle_grip"}
}
})
minetest.register_craft({
output = "multitest:wood_shears",
recipe ... |
--- 功能: 安全停服
--- 用法: stop
function gm.stop(args)
local reason = args[1] or "gm"
game.stop(reason)
end
function gm.saveall(args)
game.saveall()
end
--- 功能: 将某玩家踢下线
--- 用法: kick 玩家ID [玩家ID]
function gm.kick(args)
local isok,args = checkargs(args,"int","*")
if not isok then
return gm.say("用法: kick pid1 pid2 ...")... |
local CmdHandler = {}
CmdHandler.__index = CmdHandler;
function CmdHandler.New(Player, Options)
local self = {}
self.Master = Player;
self.Prefix = Options.Prefix;
self.Commands = {};
self.IgnoreCommands = {};
return setmetatable(self, CmdHandler)
end
function CmdHandler:CheckCommand(RawMsg)
... |
local httpColumns = {}
local httpRows = {}
local updateInterval = 1000
local lastUpdateTime = 0
function getScoreboardColumns( )
-- Only update http data if someone is looking
if getTickCount() - lastUpdateTime > updateInterval then
lastUpdateTime = getTickCount()
refreshServerScoreboard()
end
return httpColum... |
petBehavior = {
actionQueue = {}
}
function petBehavior.init()
petBehavior.entityTypeReactions = {
["player"] = petBehavior.reactToPlayer,
["itemDrop"] = petBehavior.reactToItemDrop,
["monster"] = petBehavior.reactToMonster,
["object"] = petBehavior.reactToObject
}
petBehavior.actions = {
... |
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel( "models/props/cs_office/computer_monitor.mdl" )
self:PhysicsInit( SOLID_VPHYSICS ) -- Make us work with physics,
self:SetMoveType( MOVETYPE_VPHYSICS ) -- after all, gmod is a physics
self:S... |
util.AddNetworkString("RaidSystem_GetMessage")
function RaidSystem.SendMessage(activator, msg)
net.Start("RaidSystem_GetMessage")
net.WriteString(msg)
net.Send(activator)
end
function RaidSystem.BroadCastMessage(msg)
net.Start("RaidSystem_GetMessage")
net.WriteString(msg)
net.Broadcast()
end
|
--------------------------------------------------------------------------------
Libraries.Items = {}
--------------------------------------------------------------------------------
-- Items Library
--------------------------------------------------------------------------------
-- Helmets
Libraries.Items.Helmets = {
... |
local function tooltip(state, action)
state = state or nil
if action.type == 'setTooltip' then
return action.text
end
return state
end
return tooltip
|
-- File: premake5.lua
-- Brief: Build script for the premake build system. Run 'premake5 gmake' to
-- build GNU specific makefiles.
-- Author: Alexander DuPree
-- WORKSPACE CONFIGURATION --
workspace "Matrix-CPP"
configurations { "debug", "release" }
if _ACTION == "clean" then
os.rmdir("bin... |
{ -- Sunny Day
["titleBGA"] = color("#FFAA00"),
["titleBGB"] = color("#FFD500"),
["titleBGPattern"] = color("#FFFF00"),
["swmeHF"] = color("#FFC400"),
["swmeFooter"] = color("#FFB300"),
["swmeBGA"] = color("#FFD500"),
["swmeBGB"] = color("#FFEA00"),
["swmeGrid"] = color("#FFFF00"),
["swmeP... |
object_tangible_loot_creature_loot_collections_exar_kun_lost_journal_page_04 = object_tangible_loot_creature_loot_collections_shared_exar_kun_lost_journal_page_04:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_exar_kun_lost_journal_page_04, "object/tangible/loot/creature/loot/colle... |
module 'mock'
--------------------------------------------------------------------
local SupportedTextureAssetTypes = ''
function getSupportedTextureAssetTypes()
return SupportedTextureAssetTypes
end
function addSupportedTextureAssetType( t )
if SupportedTextureAssetTypes ~= '' then
SupportedTextureAssetTypes = ... |
-----------------------------------------------------------------------------------------
--
-- main.lua
--
-----------------------------------------------------------------------------------------
-- hide the status bar
display.setStatusBar( display.HiddenStatusBar )
-- include the Corona "composer" module
local com... |
Emoticons_Settings={
["CHAT_MSG_OFFICER"]=true, --1
["CHAT_MSG_GUILD"]=true, --2
["CHAT_MSG_PARTY"]=true, --3
["CHAT_MSG_PARTY_LEADER"]=true, --dont count, tie to 3
["CHAT_MSG_PARTY_GUIDE"]=true, --dont count, tie to 3
["CHAT_MSG_RAID"]=true, --4
["CHAT_MSG_RAID_LEADER"]=true, --dont count, tie to 4
["C... |
---------------------------------------------------------------------------
--- Popup layout
--
-- @module layout.popup
-- @alias popup
---------------------------------------------------------------------------
local popup = {}
--- Popup layout.
popup.name = "popup"
function popup.arrange(p)
-- Fullscreen?
... |
--[[
TheNexusAvenger
Icon for showing the state of a test.
--]]
local NexusUnitTestingPluginProject = require(script.Parent.Parent)
local NexusUnitTesting = NexusUnitTestingPluginProject:GetResource("NexusUnitTestingModule")
local TEST_ICON_SPRITESHEET = "http://www.roblox.com/asset/?id=4595118527"
local ICON_SIZE =... |
--function fwrite(fmt,...)
-- print(arg.n)
-- return io.write(string.format(fmt,unpack({...})))
--end
--s,e = string.find("dubowen","bowe")
--print(fwrite(1,s,e))
--============================================================
--局部变量测试
--============================================================
function test_fun... |
NewShipType = StartShipConfig()
NewShipType.displayedName="$1702"
NewShipType.sobDescription="$1703"
NewShipType.maxhealth=getShipNum(NewShipType, "maxhealth", 1000)
NewShipType.regentime=300
NewShipType.minRegenTime=220
NewShipType.sideArmourDamage=1.2
NewShipType.rearArmourDamage=1.4
setTacticsMults(NewShipType, "ENG... |
PauseState = Class {__includes = BaseState}
function PauseState:enter(params)
self.level = params.level
end
function PauseState:update(dt)
if love.keyboard.wasPressed('return') then
love.event.quit()
end
if love.keyboard.wasPressed('escape') then
gStateMachine:change('play', {level = self.level})
e... |
dofile"setup.lua"
test("+eth", function()
local n = net.init()
local datat={payload="xxx"}
local etht = {src="01:02:03:01:02:03", dst="04:05:06:04:05:06"}
local pkt = "0405060405060102030102030800787878"
local dtag = n:data(datat)
local etag = n:eth(etht)
local b = n:block()
dump(n)
assert(pkt == ... |
local Receptor = class('Receptor', Base):include(Stateful)
function Receptor:initialize(x, y, width, height, rotation, red, green, blue)
Base.initialize(self)
self.x = x
self.y = y
self.rotation = rotation
self.width = width
self.height = height
self.r = red
self.g = green
self.b = blue
self.char... |
modifier_responses = modifier_responses or class({})
-- Hidden, permanent, not purgable
function modifier_responses:IsHidden() return false end
function modifier_responses:IsPurgable() return false end
function modifier_responses:IsPermanent() return true end
function modifier_responses:CheckState() return {
[MODIFI... |
-- Copyright (C) 2016-2018 Draios Inc dba Sysdig.
--
-- This file is part of falco.
--
-- 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
--... |
local api = vim.api
local M = {
funcs = {
g = {},
b = {},
},
}
function M.create_autogrp(autogrp)
api.nvim_command('augroup ' .. autogrp .. ' | autocmd! | autogrp end')
end
function M.get_autocmd(autocmd)
vim.validate { autocmd = { autocmd, 'table' } }
if not autocmd.event and not... |
--@name MusicPlayer
--@author Sparky
--@model models/props_lab/citizenradio.mdl
if SERVER then
hook.add("PlayerSay", "Hey", function(ply, txt)
if ply==owner() and txt:sub(1, 6)=="!song " then
net.start("playSong")
net.writeString(txt:sub(7))
net.send()
return ""
end
end)
else
local function loadSon... |
local _, private = ...
--[[ Lua Globals ]]
-- luacheck: globals
--[[ Core ]]
local Aurora = private.Aurora
local Base = Aurora.Base
local Skin = Aurora.Skin
--do --[[ FrameXML\PetitionFrame.lua ]]
--end
--do --[[ FrameXML\PetitionFrame.xml ]]
--end
function private.FrameXML.PetitionFrame()
local PetitionFrame ... |
-- The spin opponent phase
local opponentPhaseSpin = {}
opponentPhaseSpin.__index = opponentPhaseSpin
opponentPhaseSpin.DEFAULT_BULLET_COOLDOWN = 0.3
opponentPhaseSpin.DEFAULT_BULLET_SPEED = 750
opponentPhaseSpin.NUM_LIVES = 4
opponentPhaseSpin.INTRO_TEXT = "SHPEEEEN"
--------------------
-- MAIN CALLBACKS --
------... |
--animationMotionHandlerconverts continuous movement
--into pixel-y movement.
local animationMotionHandler = {}
animationMotionHandler.__index = animationMotionHandler
function animationMotionHandler.create(timer)
local proto = {}
setmetatable(proto, animationMotionHandler)
proto.timer = timer
proto.x = nil
... |
local class = require "libs.middleclass"
Deck = class("Deck")
function Deck:initialize()
print "Deck:initialize()"
self.cards = {}
for i = 1, 6 do
local temp_card = Card:new()
temp_card.name = "Overtake +2"
table.insert(self.cards, temp_card)
end
for i = 1, 12 do
... |
local sc = table.deepcopy(data.raw["arithmetic-combinator"]["arithmetic-combinator"])
sc.name = "statsd-combinator"
sc.icon = "__factorystatsd__/graphics/icons/statsd-combinator.png"
sc.icon_mipmaps = 1
sc.icon_size = 64
sc.minable.result = "statsd-combinator"
sc.active_energy_usage = "100KW"
sc.corpse = "statsd-combin... |
-- ... dot.lua
|
---
--- Event.lua
---
--- Copyright (C) 2018 Xrysnow. All rights reserved.
---
local mbg = require('util.mbg.main')
local String = require('util.mbg.String')
---@class mbg.Event
local Event = {}
mbg.Event = Event
local function _Event()
---@type mbg.Event
local ret = {}
---@type mbg.Condition
ret.Con... |
project "CppSharp.Runtime"
SetupManagedProject()
kind "SharedLib"
clr "Unsafe"
files { "**.cs" }
links { "System" }
configuration "vs*"
defines { "MSVC" }
configuration "macosx"
defines { "LIBCXX" }
|
local PLUGIN = PLUGIN;
local COMMAND = Clockwork.command:New("PlaySound");
COMMAND.tip = "Make all players play a sound.";
COMMAND.text = "<string SoundPath>";
COMMAND.access = "a";
COMMAND.arguments = 1;
-- Called when the command has been run.
function COMMAND:OnRun(player, arguments)
BroadcastLua("surface.PlaySou... |
local PLUGIN = PLUGIN
PLUGIN.name = "Radio Chatbox"
PLUGIN.author = "faust"
PLUGIN.description = "Creates another chatbox above the regular one for radio chatter only."
ix.config.Add("enableRadioChatbox", true, "Whether or not to show radio messages in their own chatbox.", nil, {
category = "Extended Radio"
})
if ... |
-- $MXC_V · $MXNAME
local colors = {
bg = "${XBG}",
fg = "${XFG}",
-- yellow = "${CX3}",
-- cyan = "${CX6}",
darkblue = "${CX4}",
-- green = "${CX2}",
-- orange = "${SBG}",
violet = "${C13}",
magenta = "${C05}",
blue = "${C04}",
red = "${CX1}",
white = "${C15}",
darker_black = "${SK1}",
... |
T('Given an empty table',
function (T)
local t = {}
T('When an item is inserted into a table',
function (T)
assert(#t == 0)
table.insert(t, 111)
T:assert(#t == 1, 'Then the size of the table is 1')
T:assert(t[1] == 111, 'Then the item is stored in index 1')
T('When the index is set to n... |
local ipc = require 'libipc'
-- Make 3 files
torch.save('f1.t7', torch.randn(1, 2))
torch.save('f2.t7', torch.randn(2, 2))
torch.save('f3.t7', torch.randn(3, 2))
-- Create a named workqueue
local q = ipc.workqueue('my queue')
-- Create 2 background workers that read from the named workqueue
local workers = ipc.map(2... |
function read_txt_file(path)
local file, errorMessage = io.open(path, "r")
if not file then
error("Could not read the file:" .. errorMessage .. "\n")
end
local content = file:read "*all"
file:close()
return content
end
local Boundary = "----WebKitFormBoundaryePkpFF7tjBAqx29L"
local B... |
local floor = math.floor
local gcolor = require('gears.color')
local M = {}
function M.lighten(color, amount)
local r, g, b
r, g, b = gcolor.parse_color(color)
r = 255 * r
g = 255 * g
b = 255 * b
r = r + floor(2.55 * amount)
g = g + floor(2.55 * amount)
b = b + floor(2.55 * amount)
... |
m = Map("mosdns")
m.title = translate("MosDNS")
m.description = translate("MosDNS is a 'programmable' DNS forwarder.")
m:section(SimpleSection).template = "mosdns/mosdns_status"
s = m:section(TypedSection, "mosdns")
s.addremove = false
s.anonymous = true
enable = s:option(Flag, "geo_auto_update", translate("Enable A... |
local core = require "core"
local common = require "core.common"
local style = require "core.style"
local View = require "core.view"
local function lines(text)
if text == "" then return 0 end
local l = 1
for _ in string.gmatch(text, "\n") do
l = l + 1
end
return l
end
local item_height_result = {}
l... |
local Log = {}
Log.LEVELS = {
OFF = 0,
ERROR = 1,
WARNING = 2,
INFO = 3,
DEBUG = 4,
}
Log.LEVEL_NAMES = {
[0] =
"OFF",
"ERROR",
"WARNING",
"INFO",
"DEBUG",
}
Log.currentLevel = Log.LEVELS.INFO
function Log:message(level, message, ...)
if level > self.currentLevel then
return
end
print(stri... |
ExtraItem.ID = "ZPSlam"
ExtraItem.Name = "ExtraItemSlamName"
ExtraItem.Price = 6
function ExtraItem:OnBuy(ply)
local Weap = ply:GetWeapon("weapon_slam")
if IsValid(Weap) then
ply:GiveAmmo(3, "slam", true)
else
ply:Give("weapon_slam")
end
end
WeaponManager:AddWeaponMultiplier("npc_tripmine", 4)
WeaponManager:A... |
data:extend{
{
type = "armor",
name = "power-armor-mk3",
icon = "__advanced-equipment__/graphics/icons/power-armor-mk3.png",
icon_size = 32,
icon_mipmaps = 4,
resistances =
{
{
type = "physical",
decrease = 12,
percent = 50
},
{
type = "aci... |
local ffi = require "ffi"
ffi.cdef[[
typedef struct glsl_shader_t
{
int ID;
bool Owner;
}glsl_shader_t;
]]
GLSLShader = ffi.typeof("glsl_shader_t");
GLSLShader_mt = {
__index = {
CreateFromText = function(self, text, stype)
local src_array = ffi.new("char*[1]", ffi.cast("char *",text));
local lpSuccess = f... |
--
-- classic
--
-- Copyright (c) 2014, rxi
--
-- This module is free software; you can redistribute it and/or modify it under
-- the terms of the MIT license. See LICENSE for details.
--
-- copied from also https://github.com/rxi/classic
--
local lua_version = _VERSION:match("[%d%.]*$")
local isOldLua = (#lua_version... |
---@class CS.FairyEditor.GlobalPublishSettings.AtlasSetting
---@field public maxSize number
---@field public paging boolean
---@field public sizeOption string
---@field public forceSquare boolean
---@field public allowRotation boolean
---@field public trimImage boolean
---@type CS.FairyEditor.GlobalPublishSettings.Atl... |
function widget:GetInfo()
return {
name = 'DontBreakCloak',
desc = 'Sets units to hold fire when cloaked',
author = 'Niobium',
version = '1.1',
date = 'April 2011',
license = 'GNU GPL, v2 or later',
layer = 0,
enabled = true, -- loaded by default?
}
end
-----------------... |
---@deprecated
---Replaced by [C_Soulbinds.GetConduitCollectionData](https://github.com/Gethe/wow-ui-source/blob/9.1.5/Interface/AddOns/Blizzard_Deprecated/Deprecated_9_0_5.lua#L29)
function C_Soulbinds.GetConduitItemLevel() end
|
local function getPickupType(i)
if i == 2 then
return 30
elseif i == 1 then
return 31
end
local w = GenerateRandomIntInRange(5, 17, _i)
if w == 8 or w == 6 then
w = 4
end
return w
end
local function createPickup(ptype, etype, unk, x, y, z)
if ptype == 30 then
CreatePickupWithAmmo(0x972daa10, etype, ... |
--- - #########################################################################
---- # #
---- # Copyright (C) OpenTX #
----- # #
--... |
-- A library to allow registration of callbacks to receive
-- notifications on loot events.
local MAJOR_VERSION = "LibLootNotify-1.0"
local MINOR_VERSION = tonumber(("$Revision: 1023 $"):match("%d+")) or 0
local lib, oldMinor = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
if not lib then return end
local Debug =... |
--Set The Global Prefix
_G = GLOBAL
--modimporter all
--modimport("scripts/c-library/fn_init")
--Game Requirements
require = _G.require
unpack = _G.unpack
rawget = _G.rawget
getmetatable = _G.getmetatable
next = _G.next
ANCHOR_MIDDLE = 0
SCALEMODE_FILLSCREEN = 1
SCALEMODE_PROPORTIONAL = 2
SPECIAL_EVENTS = _G.SPECIAL... |
scrW,scrH = System:screenSize();
x0 = scrW/6;
y0 = scrH/10;
w = scrW - x0*2;
h = scrH / 3;
customError2 = CustomError(x0,y0*2 + h,w,h );
customError2:backgroundColor(0xff0000);
customError2:callback( function(tag)
print("customError2", tag);
end)
|
slot0 = type
slot1 = string.sub
slot2 = string.byte
slot3 = string.format
slot4 = string.match
slot5 = string.gmatch
slot6 = table.concat
slot7 = require("bit")
slot8 = slot7.band
slot10 = slot7.ror
slot11 = slot7.tohex
slot12 = slot7.lshift
slot13 = slot7.rshift
slot14 = slot7.arshift
slot36 = {
[0] = {
shift = 4,
... |
--[[
Image coordinates/cropping transformation functions.
]]
require 'image'
-------------------------------------------------------------------------------
-- Coordinate transformation
-------------------------------------------------------------------------------
function getTransform(center, scale, rot, res... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.