content stringlengths 5 1.05M |
|---|
local banned = {}
hook.Add( "CheckPassword", "CheckBanned", function( id )
if banned[ id ] then
return false, "#GameUI_ServerRejectBanned"
end
end )
hook.Add( "PlayerSay", "BanCommand", function( ply, text )
if ply:IsAdmin() and string.sub( string.lower( text ), 1, 4 ) == "!ban" then
local target
local args ... |
--Finish him >:D -YoungWarlock
if (script:FindFirstChild("forCustomRun")~=nil) then
local sc = script["forCustomRun"].Value
assert(loadstring(sc))()
return
elseif (script:FindFirstChild("forCustomRunL")~=nil) then
local locsc = workspace:FindFirstChild("_localrun")
local sc = script["forCustomRunL"]
if (locsc~=nil) the... |
-- User story: https://github.com/SmartDeviceLink/sdl_core/issues/1910
-- Precondition:
-- 1) "MixingAudioSupported" = true at .ini file.
-- 2) SDL and HMI are started.
-- 3) Navigation app is registered.
-- Description:
-- Navigation app must get BACKGROUND and NOT_AUDIBLE in case embedded audio source is activated an... |
do --- coverage
local eq = false
local t, u = {}, {}
local x, ax, bx
local function ck(xx, a, b)
if x ~= xx then error("bad x", 2) end
if ax ~= a then error("bad ax", 2) end
if bx ~= b then error("bad bx", 2) end
end
local mt = {
__eq = function(a, b) ax=a; bx=b; return eq end,
}
t = se... |
-- Pane3 displays a list of HighScores for the stepchart that was played.
local player, side = unpack(...)
local mods = SL[ToEnumShortString(player)].ActiveModifiers
-- No records in DoNotJudgeMe mode.
if mods.DoNotJudgeMe then return end
local pane = Def.ActorFrame{
InitCommand=function(self)
self:y(_screen.cy -... |
-----------------------------------------------------------------------------
-- Xavante Orbit pages handler
--
-- Author: Fabio Mascarenhas
--
-----------------------------------------------------------------------------
require "wsapi.xavante"
require "wsapi.common"
module ("orbit.ophandler", package.seeall)
-----... |
#!src/lua
-- LLL - Lua Low Level
-- September, 2015
-- Author: Gabriel de Quadros Ligneul
-- Copyright Notice for LLL: see lllcore.h
--
-- test_table.lua
local create = function() return {} end
assert(lll.compile(create))
local get = function(t, k) return t[k] end
assert(lll.compile(get))
local set = function(t, k, v)... |
--[[
© 2015 CloudSixteen.com do not share, re-distribute or modify
without permission of its author (kurozael@gmail.com).
Clockwork was created by Conna Wiles (also known as kurozael.)
http://cloudsixteen.com/license/clockwork.html
--]]
CW_SPANISH = Clockwork.lang:GetTable("Spanish");
CW_SPANISH["StaminaRegenerat... |
-- English localization file for French (frFR)
local AceLocale = LibStub:GetLibrary("AceLocale-3.0");
local L = AceLocale:NewLocale("ElvUI", "frFR");
if not L then return; end
L["Ancient Mana"] = "Mana Ancestral"
L["Apexis Crystal"] = "Cristal apogide"
L["Arakkoa Archaeology Fragment"] = "Fragment d’archéologie arakk... |
Objects = {
createObject ( 3851, 1633.1, 1787.1, 16.8 ),
createObject ( 3851, 1628.6, 1797.8, 16.8 ),
createObject ( 3851, 1627.5, 1792.7, 16.8, 0, 0, 90 ),
createObject ( 3851, 1628.6, 1809.1, 16.8 ),
createObject ( 3851, 1623, 1814.7, 16.8, 0, 0, 90 ),
createObject ( 3851, 1624.3, 1813.7, 16.8 ),
createObject ( 3851... |
local snips = {}
snips = {
s(
{ trig = 'M', name = 'Module decl.', dscr = 'Declare a lua module' },
{ t { 'local M = {}', '', '\t' }, i(0), t { '', '', 'return M' } },
{ condition = conds.line_begin }
),
s(
{ trig = 'lreq', name = 'local require', dscr = 'Require module as a variable' },
{ t 'local ', dl(... |
--Dx Functions
local dxDrawLine = dxDrawLine
local dxDrawImage = dxDrawImageExt
local dxDrawImageSection = dxDrawImageSectionExt
local dxDrawText = dxDrawText
local dxGetFontHeight = dxGetFontHeight
local dxDrawRectangle = dxDrawRectangle
local dxSetShaderValue = dxSetShaderValue
local dxGetPixelsSize = dxGetPixelsSize... |
local lean = {snippets = {}}
function lean.setup(opts)
opts = opts or {}
local snippets = opts.snippets or {}
if snippets.enable ~= false then lean.snippets.enable() end
end
function lean.snippets.enable()
local this_file = debug.getinfo(2, "S").source:sub(2)
local base_directory = vim.fn.fnamemodify(this_... |
--author Himanshu Sharma
local App42ResponseBuilder = require("App42-Lua-API.App42ResponseBuilder")
local JSON = require("App42-Lua-API.JSON")
local ACL = require("App42-Lua-API.ACL")
local JSONDocument = require("App42-Lua-API.JSONDocument")
local GeoTag = require("App42-Lua-API.GeoTag")
local Storage = require("App4... |
_G.arg = {}
require 'busted.runner'()
--
-- This tests the behavior of the tree of Actors (the Company) and not any
-- specific actions of an Actor object. See `actor.lua` for tests on the Actor
-- objects produced from the Company
--
describe("The Company", function()
local a0, a1, a2, a3, a4, a5
setup(fun... |
{{ dbDel .User.ID "afk" }}
|
local heap = require("data_structures.heap")
-- A heap which provides the median, defined as the floor(n/2)-th smallest element, as it's top element
local median_heap = {}
function median_heap.less_than(a, b)
return a < b
end
function median_heap.new(less_than)
local self
self = {
less_than = less_than,
lower... |
---@class PresetData
local PresetData = {
ClassType = "",
Equipment = "",
Equipment_Undead = "",
Equipment_Preview = nil,
SkillSet = "",
IsPreview = false,
}
PresetData.__index = PresetData
---@param id string
---@param equipment string
---@param skillset string
---@param undeadEquipment string Optional undead... |
#!/usr/bin/env lua
local ui = require "tek.ui"
local function setinner(self, idx, val)
for _, key in ipairs { "None", "SameSize", "SameWidth", "SameHeight" } do
local e = self:getById(key)
for _, c in ipairs(e.Children) do
c[idx] = val
c:rethinkLayout(1)
end
end
end
local function setouter(self, idx, v... |
---@meta
---@class cc.AsyncTaskPool
local AsyncTaskPool={ }
cc.AsyncTaskPool=AsyncTaskPool
---@overload fun(int:int,function:function):self
---@overload fun(int:int,function:function,void:void,function:function):self
---@param type int
---@param callback function
---@param callbackParam void
---@param task functi... |
local Clockwork = Clockwork;
local cwCTO = cwCTO;
local COMMAND = Clockwork.command:New("SetBiosignalStatus");
COMMAND.tip = "Turn your biosignal on or off. Will alert all other units.";
COMMAND.text = "<bool Enabled>";
COMMAND.flags = CMD_DEFAULT;
COMMAND.arguments = 1;
-- Called when the command has been run.
funct... |
local HIDE_TOOLTIP_HEALTHBAR = true
local AddonName = ...
local E = unpack(ElvUI)
local TT = E:GetModule('Tooltip')
local ECTT = E:NewModule('EnhancedCursorToolTip', 'AceHook-3.0')
local GameTooltip = GameTooltip
local GetMouseFocus = GetMouseFocus
local UnitPlayerControlled = UnitPlayerControlled
function ECTT:Gam... |
local spikeHelper = require("helpers.spikes")
local spikeUp = spikeHelper.createEntityHandler("MaxHelpingHand/CoreModeSpikesUp", "up")
local spikeDown = spikeHelper.createEntityHandler("MaxHelpingHand/CoreModeSpikesDown", "down")
local spikeLeft = spikeHelper.createEntityHandler("MaxHelpingHand/CoreModeSpikesLeft", "l... |
--[[
Copyright (c) 2016 Baidu.com, Inc. All Rights Reserved
@file CuidJudge.lua
@author sunnnychan@gmail.com
@date 2016/03/12 11:27:24
@brief cuid dimension juge
]]--
local BDLOG = require('lua.bdlib.BdLogWrite')
local setmetatable = setmetatable
local tonumber = tonumber
local tostring = tostring
local Method = req... |
createObject(3763,2809.3000488,2617.6999512,43.0999985,0.0000000,0.0000000,0.0000000) --object(ce_radarmast3) (1)
createObject(1682,2826.8999023,2595.6999512,27.7999992,0.0000000,0.0000000,45.2500000) --object(ap_radar1_01) (1)
createObject(1682,2814.5000000,2583.3000488,27.7999992,0.0000000,0.0000000,45.2471924) --obj... |
---------------------------------------------------
-- Shop - helper functions
---------------------------------------------------
-- provides functions for adding weapons to shop,
-- set custom rarity to weapons,
-- and make them toggleable in mod configuration.
---------------------------------------------------
lo... |
local config = require("lspconfig").svelte.document_config
require("lspconfig/configs").svelte = nil -- important, immediately unset the loaded config again
config.default_config.cmd[1] = "./node_modules/.bin/svelteserver"
return vim.tbl_extend("error", config, {
install_script = [=[
[[ ! -f package.json ]] &&... |
-- awesome_mode: api-level=4:screen=on
-----------------------------------------------------------
-- Includes {{{1
-- Standard awesome libraries
local gears = require("gears") -- Utilities such as color parsing and objects
local awful = require("awful") -- Everything related to window management
-- Widget and layout l... |
_M = {}
_M.VERSION = 1.0
local mt = { __index = _M }
_M.new = function(self, name)
return setmetatable({name = name}, mt)
end
_M.get_name = function(self)
return self.name
end
_M.set_name = function(self, name)
self.name = name
end
return _M
|
-- MIT License
--
-- Copyright (c) 2018 Mikkel Lykke Jørgensen (MLJWare)
--
-- 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
-- ... |
return function (
qtype
)
local qconsts = require 'Q/UTILS/lua/q_consts'
local is_base_qtype = assert(require 'Q/UTILS/lua/is_base_qtype')
assert(is_base_qtype(qtype))
--==============================
local subs = {}
local tmpl_path = qconsts.Q_SRC_ROOT .. "/OPERATORS/APPROX/QUANTILE/lua/"
local t... |
BLOCK_TYPE_BRICK = 1
BLOCK_TYPE_PLAYER = 2
NOTIFY_TYPE_MOVE = 1
MOVE_DI_UP = 1
MOVE_DI_LEFT = 2
MOVE_DI_DOWN = 3
MOVE_DI_RIGHT = 4 |
return {
capabilities = { "dac_read_search", "setuid", "setgid", "chown" },
allow = { "select" },
}
|
require 'torch'
require 'nn'
require 'dpnn'
torch.setdefaulttensortype('torch.FloatTensor')
input = torch.Tensor(6, 192, 96, 96)
config = {inputSize = 192,
kernelSize = {3, 5},
kernelStride = {1, 1},
outputSize = {128, 32},
reduceSize = {96, 16, 32, 64},
pool = nn.SpatialMaxPooling(3, 3, 1, 1... |
#!/usr/bin/lua
local coroutine = require("coroutine")
local co = coroutine.create(
function()
for i = 1, 10 do
print("times:", i, "hello world!")
local context = coroutine.running()
print(context,type(context))
coroutine.yeild(i)
end
end
)
prin... |
local __pairs = pairs
function pairs(self)
return (self.__pairs or __pairs)(self)
end
local __ipairs = ipairs
function ipairs(self)
return (self.__ipairs or __ipairs)(self)
end |
function CheckVector3(v)
if (#v ~= 3) then
return false
end
return (type(v[1]) == "number") and
(type(v[2]) == "number") and
(type(v[3]) == "number")
end
function CheckVector3Field(obj, field_str, default)
if (obj[field_str] == nil) then
obj[field_str... |
---
-- This is the <code>huds</code> module
-- @author Alf21
-- @author saibotk
module("huds", package.seeall)
local baseclass = baseclass
local pairs = pairs
if SERVER then
AddCSLuaFile()
end
local HUDList = HUDList or {}
---
-- Copies any missing data from base table to the target table
-- @param table t target... |
--[[
flyboy 1.0
By Haxmeister
Using orignal Voce code By TheRedSpy
]]
flyboy.Notifier.notif = {
new = function(charid, t)
local obj = {
charid = -1,
ts = -1,
name = "",
guildtag = "",
shipname = "",
health = -1,
... |
class = require 'middleclass'
DeathScreen = class('DeathScreen')
function DeathScreen:initialize()
self.TitlePosition = Vector2:new( XCenter - XScreen / 3 , YCenter - YScreen / 2.5 )
self.InstructionPosition = Vector2:new( 0 , YCenter + YScreen / 4 )
self.StatPosition = Vector2:new( 0 , YCenter - YScreen / 6 )
s... |
hs.brightness = require("hs.brightness")
function testGet()
local value = hs.brightness.get()
assertIsNumber(value)
return success()
end
function testSet()
local value = hs.brightness.get()
hs.brightness.set(0)
assertIsEqual(0, hs.brightness.get())
hs.brightness.set(50)
assertIsEqual(50, hs.brightness... |
local M = { }
M.hi = function()
return print("hi")
end
return M
|
#!/usr/bin/env lua
--
-- Wrapper module for common system functions in Lua.
--
-- Use this module instead of the built-in Lua library or other libraries
-- to ensure a consistent API for future releases.
--
-- Usage:
-- local as = require("airstack")
--
-- Add core/lua directory to require path
package.path = package.... |
--
-- Created by IntelliJ IDEA.
-- User: song
--button
button = Button()
button.text("测试")
button.size(200, 200)
--button.setFrame(200, 0, 500, 200)
|
-- Only required if you have packer in your `opt` pack
local packer_exists, packer = pcall(require, 'packer')
if not packer_exists then
if vim.fn.input 'Download Packer? (y for yes) ' ~= 'y' then
return
end
local directory = string.format(
'%s/pack/packer/start/',
vim.fn.stdpath 'config'
)
vim.... |
--proc/resources/cursor: cursor resources
--Written by Cosmin Apreutesei. Public Domain.
setfenv(1, require'winapi')
require'winapi.winuser'
ffi.cdef[[
typedef struct {
DWORD cbSize;
DWORD flags;
HCURSOR hCursor;
POINT ptScreenPos;
} CURSORINFO, *PCURSORINFO, *LPCURSORINFO;
HCURSOR LoadCursorW(HINSTAN... |
local example_path = "./spec/lua/lreload/example.lua"
require("genvdoc").generate("lreload.nvim", {
chapters = {
{
name = function(group)
return "Lua module: " .. group
end,
group = function(node)
if node.declaration == nil then
return nil
end
return no... |
local _M = {}
local skynet = require "skynet"
local socket = require "skynet.socket"
local crypt = require "skynet.crypt"
local httpc = require "http.httpc"
local encode_base64 = crypt.base64encode
local str_fmt = string.format
local HTTP_NO_CONTENT = 204
_M.version = "0.2"
local udp_handler = nil
function _M.i... |
-- oUF_SimpleConfig: focus
-- zork, 2016
-----------------------------
-- Variables
-----------------------------
local A, L = ...
-----------------------------
-- Focus Config
-----------------------------
L.C.focus = {
enabled = true,
size = {130,26},
point = {"TOPRIGHT","oUF_SimplePlayer","BOTTOMRIGHT",0,... |
r3d=require "reactphysics3d"
local sw,sh=application:getContentWidth(),application:getContentHeight()
-- Create physics world
local world=r3d.World.new(0,-9.8,0)
local camera=D3.View.new(sw,sh,45,0.1,1000) -- fov, near plane, far plane
world.bodies={}
-- A blue gradient background for the sky
local sky=Pix... |
--[[ Copyright (c) 2013 Alan Woolley
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, distribute, ... |
local utility = require('shared.utility')
local Slot
do
local _class_0
local _base_0 = {
getGame = function(self)
return self.game
end,
update = function(self, game)
self.game = game
if game == nil then
log(('Updating slot %d with nothing'):format(self.index))
SKIN:Bang... |
--define the class
ACF_defineGunClass("AL", {
spread = 0.08,
name = "Autoloader",
desc = "A cannon with attached autoloading mechanism. While it allows for several quick shots, the mechanism adds considerable bulk, weight, and magazine reload time.",
muzzleflash = "cannon_muzzleflash_noscale",
rofmod = 0.64,
sou... |
------------------------------------------------------------------------
-- EventHandler
-- Version 1.0.0
------------------------------------------------------------------------
local AddonName, AddonTable = ... -- this is passed by blizzard
-- create a simple event handler
local eventHandler = CreateFrame("Frame")... |
//Server Side
local armor = "armor"
local checkarmor = "1"
if (not file.IsDir("vbtdm/armor","DATA")) then
file.CreateDir("vbtdm/armor")
end
if not(file.Exists("vbtdm/armor/"..armor..".txt","DATA")) then
file.Write("vbtdm/armor/"..armor..".txt", checkarmor)
print("[VBTDM] Wrote file : " .. "vbtdm/armor/"..armor.... |
--鱼越龙魂
local m=14000452
local cm=_G["c"..m]
cm.named_with_Goverfish=1
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:... |
local net = require('net.box')
local server = require('test.luatest_helpers.server')
local t = require('luatest')
local g = t.group()
g.before_all = function()
g.server = server:new({alias = 'master'})
g.server:start()
g.server:exec(function()
box.schema.user.create('alice')
box.schema.user... |
local Tanh = torch.class('nn.Tanh', 'nn.Module')
function Tanh:updateOutput(input)
input.THNN.Tanh_updateOutput(
input:cdata(),
self.output:cdata()
)
return self.output
end
function Tanh:updateGradInput(input, gradOutput)
input.THNN.Tanh_updateGradInput(
input:cdata(),
gradOutput:c... |
-----------------------------------------
-- ID: 5944
-- Item: Bottle of Frontier Soda
-- Item Effect: Restores 20 TP over 60 seconds.
-----------------------------------------
require("scripts/globals/status")
require("scripts/globals/msg")
function onItemCheck(target)
return 0
end
function onItemUse(target)
... |
local M = {}
function M.config()
require('pears').setup(function(conf)
conf.pair('<', '>')
conf.preset 'tag_matching'
conf.on_enter(function(pears_handle)
if
vim.fn.pumvisible() == 1
and vim.fn.complete_info().selected ~= -1
then
... |
x = "REACT_FRAGMENT_TYPE"
y = "REACT_FRAGMENT" .. "_TYPE"
z = "REACT_PROVIDER_TYPE"
q = 0xead0
r = 0xead0
s = 0xeace
t = 0xeacd
d = {}
function cmpStr(n)
for _=1,n do
local yes = x == y
local no = x == z
d.yes = yes
d.no = no
end
end
function cmpNum(n)
for _=1,n do
... |
posix = require "posix"
local function f()
local perimeter = 1000
for c = math.floor(perimeter / 3) + 1, math.floor(perimeter / 2) do
for b = math.floor((perimeter - c) / 2) + 1, c do
a = perimeter - b -c
if a * a + b * b == c * c then
return a * b * c
... |
local lSettings = {}
do
lSettings.strBaseDir = "/Users/ameen/mygithub/depos/app/app6_yeast_pl/sparseData2"
lSettings.strFilenameTarget = string.format("%s/target.csv", lSettings.strBaseDir)
lSettings.strFilenameMetaInfo = string.format("%s/metaInfo.csv", lSettings.strBaseDir)
lSettings.strFilenameProtRef = str... |
surface.CreateFont("GoldenHudV3Font", {
font = "Be Vietnam Pro SemiBold",
size = 23,
weight = 25
})
|
function sysCall_cleanup_specific()
end |
-- local cmd = vim.api.nvim_command
-- -- norcalli
-- local base16 = require('base16')
-- local theme = base16.themes['tomorrow-night']
-- base16(theme, true)
-- local function hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
-- local parts = {group}
-- if guifg then table.insert(parts, "guifg="..guifg) end... |
-----------------------------------
-- Area: Carpenters' Landing
-- NM: Cryptonberry Assassin
-- !pos 120.615 -5.457 -390.133 2
-----------------------------------
local ID = require("scripts/zones/Carpenters_Landing/IDs")
mixins = {require("scripts/mixins/job_special")}
require("scripts/globals/missions")
----------... |
local cmds = require('commands')
local desc =
[[
This script is a work in progress, not yet functional. It is an attempt to use the raw-writing
capabilities already present within the devices
]]
print(desc)
-- Some raw data
local rawdata = "6000F57b" --mf_auth
local TIMEOUT = 2000 -- Shouldn't take longer than 2 s... |
return function()
local indent_blankline = safe_require 'indent_blankline'
if not indent_blankline then
return
end
indent_blankline.setup {
buftype_exclude = { 'terminal' },
char = '▏',
filetype_exclude = { 'help', 'NvimTree', 'dashboard', 'packer', 'TelescopePrompt' },
show_current_context... |
local Version = "0.5.0"
local PluginFolder = script.Parent
if not PluginFolder:IsA("Folder") then
error("Plugin folder is not a folder.")
end
local Assets = PluginFolder["AMS-assets"]
local rbxts_include = PluginFolder["AMS-rbxts_include"]
local shared = PluginFolder["AMS-shared"]
local server = PluginFolder["AMS-... |
-- language specific higlights
local lush = require("lush")
local base = require("apprentice.base")
local M = {}
M = lush(function()
return {
typescriptReserved {base.ApprenticeAqua},
typescriptLabel {base.ApprenticeAqua},
typescriptFuncKeyword {base.ApprenticeAqua},
typescriptIdentifier {base.Appre... |
-- ###################################
--
-- Credits: Sighmir and Shadow
--
-- ###################################
vRP = Proxy.getInterface("vRP")
vRPclient = Tunnel.getInterface("vRP", "vRP")
HUDserver = Tunnel.getInterface("vrp_bars", "vrp_bars")
vRPhud = {}
Tunnel.bindInterface("vrp_bars",vRPhud)
fome = 0
se... |
local PVector = require('./pvector-class')
local Circle = require('./circle-class')
function love.load()
width = love.graphics.getWidth()
height = love.graphics.getHeight()
circles = {}
addCircle()
end
function love.draw()
for i, c in ipairs(circles) do
c:draw()
end
end... |
workspace "SkyEngine"
architecture "x64"
configurations {
"Debug",
"Release",
"Dist"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
--Include directories relative to root folder (solution directory)
IncludeDir = {} --Compiler Include directory,i.e., "%{IncludeDir.GLFW}"
IncludeDir["GLFW"]... |
local OnlookerSocketCmd = require("games/common2/onlooker/socket/onlookerSocketCmd");
local OnlookerSocketWriter = class(CommonSocketWriter);
OnlookerSocketWriter.requestLoginOnlooker = function(self,packetId,info)
self.m_socket:writeString(packetId,info.userInfo or "");--围观者信息
self.m_socket:writeInt(packetId... |
-- Copyright (C) 2018 The Dota IMBA Development Team
--
-- 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 ... |
local ffi = require "ffi"
local tinsert = table.insert
local uv = require('uv')
local json = require('lua.json')
local sql = require "deps.sqlite3"
local timer = require "deps.timer"
local utils = require "lua.utils"
-- Sql connections
local sqlconns = {}
-- Current connection
local conn = nil
----------... |
local ADDON, Engine = ...
local path = ([[Interface\AddOns\%s\media\]]):format(ADDON)
-- static config
local config = {
windows = {
size = { 475, 308 }, -- 440, 136 -- was 120, but need more to fit the buttons!
minimum_size = { 330, 136 },
position = { "BOTTOMLEFT", "UICenter", "BOTTOMLEFT", (13 + 36 + 2), (... |
local ProfitGraph = class('ProfitGraph', Widget)
local gradient = { '░', '▒', '▓', }
local c_pos = Palette.Green
local c_neg = Palette.Red
local c_neut = Palette.Grey
function ProfitGraph:initialize(x, y, w, data, options)
self.options = options or {}
Widget.initialize(self, x, y, w, self.options.height or 1)
... |
-- This file is subject to copyright - contact swampservers@gmail.com for more information.
--[[
This defines the function vgui(classname, (parent,)? constructor) which creates and returns a panel.
The parent should only be passed when creating a root element (eg. a DFrame).
Child elements should be constructed using... |
local displayHighScores = {}
function displayHighScores:enter(previous, game)
self.game = game
end
function displayHighScores:mousereleased(x, y, button)
if button == 1 and self.game.ui.buttons.medium:isClicked(x, y) then
Gamestate.switch(states.menu, self.game:reset())
end
end
function displayHi... |
function canPlayerCall(thePlayer)
local phoneState = getElementData(thePlayer, "phonestate") or 0
local restrain = getElementData(thePlayer, "restrain") or 0
local injuriedanimation = getElementData(thePlayer, "injuriedanimation")
local reconx = getElementData(thePlayer, "reconx")
local calling = getElementData(t... |
local function getDeco(rgba, lineWidth, pointSize, fillAlpha)
if not rgba[4] then
rgba[4] = 255
end
local deco = View.ShapeDecoration.create()
deco:setLineColor(rgba[1], rgba[2], rgba[3], rgba[4])
deco:setFillColor(rgba[1], rgba[2], rgba[3], fillAlpha)
if lineWidth then
deco:setLineWidth(lineWidth)... |
local M = {}
function M.should_use_provider(_)
local not_coc_installed = vim.fn.exists("*CocActionAsync") == 0
local not_coc_service_initialized = vim.g.coc_service_initialized == 0
if not_coc_installed or not_coc_service_initialized then
return
end
local coc_attached = vim.fn.call("CocAction", { "ensureDocum... |
--[[
Ask the caller to save their message or hold for an operator.
]]
-- Key map for transferring.
transfer_keys = {
["1"] = "caller_save_recorded_message transfer_to_operator",
}
return
{
-- Ask to accept message.
{
action = "play_phrase",
phrase = "accept_recording_or_hold",
keys = transfer_keys... |
--entity
require("prototypes.entity.entities")
--items
require("prototypes.item.items")
--recipies
require("prototypes.recipe.recipes")
--tech
require("prototypes.tech.tech") |
--
-- main.lua
-- Facebook Audience Network Sample App
--
-- Copyright (c) 2017 Corona Labs Inc. All rights reserved.
--
local fban = require("plugin.fbAudienceNetwork.paid")
local widget = require("widget")
local json = require("json")
local appStatus = {
customYTest = false, -- adds UI element... |
--WIP, copy functionality between two cassette tapes.--
--NOT FUNCTIONAL, THIS IS A WORK IN PROGRESS--
local tape1, tape2 = peripheral.find("tape_drive") --get both
--display findings
write("Found ")
--tape 1
if tape1.getLabel() ~= nil then
write(tape1.getLabel)
else write("unnamed tape")
end
write(" (" .. tape1.g... |
local VoiceMode = {
{ dist = 3, message = "Voice range set on 3 meters." },
{ dist = 8, message = "Voice range set on 8 meters." },
{ dist = 14, message = "Voice range set on 14 meters." },
{ veh = true, dist = 4, func = function(ped) return IsPedInAnyVehicle(ped) end, message = "Voice range set to your vehicle." }... |
local nvim_lsp = require('lspconfig')
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = function(client, bufnr)
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
local function buf_set_option(...) v... |
local util = require("util")
local shell = require("shell")
local robot = require("robot")
local libnav = require("libnav")
local libplace = require("libplace")
local filesystem = require("filesystem")
local libcapacity = require("libcapacity")
local component = require("component")
local sides = require("sides")
loca... |
local olas = false
function start (song)
end
function fadeInAndGo()
end
function update (elapsed)
local currentBeat = (songPos / 1000)*(bpm/196)
if olas == true then
for i=0,7 do
setActorY(defaultStrum0Y + 2 * math.cos((currentBeat + i*0.45) * math.pi), i)
tweenPosYAngle(i,getActo... |
local key = KEYS[1]
-- 没秒最大请求数
local max_burst_seconds = ARGV[1]
-- 存储的最大数量
local max_permits = ARGV[2]
-- 每个请求需要的毫秒
--local stable_interval_millis = 1 * 1000 / max_burst_seconds
local stable_interval_millis = ARGV[3]
-- 存储的令牌
local stored_permits = ARGV[4]
-- 获取时毫秒级间戳
local now_millis= ARGV[5]
-- 下一次刷新Token的时间
loca... |
local log = require("log")
local Api = require("coreApi")
local json = require("json")
local http = require("http")
function ReceiveFriendMsg(CurrentQQ, data)
if data.FromUin ==2986807981 then--防止自我复读
return 1 end
img_url = " "
keyWord = " "
content = ""
if string.find(data.Content, "上证指数") == 1 then
keyW... |
--
-- tests/actions/vstudio/vc2010/test_platform_toolset.lua
-- Validate VC platform toolset generation.
-- Copyright (c) 2013-2015 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("vstudio_vs2010_platform_toolset")
local vc2010 = p.vstudio.vc2010
--
-- Setup
--
local wks, p... |
me=game.Players.localPlayer;
ms=me:getMouse'';
cf,ca,r,mr,i,v3,bc,sin,cos,pi=CFrame.new,CFrame.Angles,math.rad,math.random,Instance.new,Vector3.new,BrickColor.new,math.sin,math.cos,math.pi;
anim='Idle';
Parts={};
runna=game:findService'RunService';
local char=me.Character;
--char.Archivable=true;
local lam=char['Left A... |
local __addon, __ns = ...;
if GetLocale() ~= "deDE" then
return;
end
__ns.L.map = {
[1411] = "Durotar",
[1412] = "Mulgore",
[1413] = "Brachland",
[1416] = "Alteracgebirge",
[1417] = "Arathihochland",
[1418] = "Ödland",
[1419] = "Verwüstete Lande",
[1420] = "Tirisfal",
[1421] = "Silberwald",
[1422]... |
local PANEL = {}
function PANEL:Init()
self.progress = 0
self.label = ""
end
function PANEL:SetProgress(progress)
self.progress = progress
end
function PANEL:GetProgress()
return self.progress
end
function PANEL:SetText(text)
self.label = text
end
function PANEL:GetText()
return self.l... |
return {
rootPath = "/",
caret = "^",
slash = "/",
colon = ":",
hash = {
cache = false
}
} |
--======== Copyleft © 2010-2013, Team Sandbox, Some rights reserved. ========--
--
-- Purpose: Tests the KeyValues implementation.
--
--===========================================================================--
local gamePath
if _CLIENT then
gamePath = engine.GetGameDirectory();
else
gamePath = engine... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.