content stringlengths 5 1.05M |
|---|
Resource = Class('Resource')
local g_Map = {}
setmetatable(g_Map, {__mode = 'v'}) -- weak table
addEvent('toxic.onResReady')
function Resource.preInit(name)
return g_Map[name]
end
function Resource.__mt.__index:init(name)
local res = getResourceFromName(name)
local resRoot = res and getResourceRootE... |
--[[
Script to handle removing tokens from map, or map and CT with mouse click and keyboard combination.
]]--
function onInit()
Token.onClickDown = onClickDown;
end
-- Delete token / and CT entry on mouse click.
-- Use: Mouse Left-click Token on combat map while holding down either 'Alt' or 'Alt+Ctrl'
-- Pr... |
local skynet = require 'skynet'
local gateserver = require 'snax.gateserver'
local netpack = require 'skynet.netpack'
local handler = {}
function handler.connect(fd, ipaddr)
skynet.error('fd = ', fd, ' ipaddr = ', ipaddr)
gateserver.openclient(fd)
end
function handler.message(fd, msg, sz)
skynet.error('... |
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg)... |
local login_pin_map = require("qnFiles/qnPlist/hall/login_pin");
local login_avatar_item=
{
name="login_avatar_item",type=0,typeName="View",time=0,report=0,x=0,y=0,width=174,height=174,visible=1,fillParentWidth=0,fillParentHeight=0,nodeAlign=kAlignTopLeft,
{
name="avatar",type=1,typeName="Image",time=90472650,repor... |
local p = require('lib/utils').prettyPrint
local port = os.getenv("IP") or "0.0.0.0"
local uv = require('luv')
local function create_server(host, port, on_connection)
local server = uv.new_tcp()
p(1, server)
uv.tcp_bind(server, host, port)
function server:onconnection()
local client = uv.new_tcp()
uv... |
local K, C = unpack(select(2, ...))
if C["DataText"].System ~= true then
return
end
local _G = _G
local string_format = _G.string.format
local unpack = _G.unpack
local COMBAT_ZONE = _G.COMBAT_ZONE
local CONTESTED_TERRITORY = _G.CONTESTED_TERRITORY
local FACTION_CONTROLLED_TERRITORY = _G.FACTION_CONTROLLED... |
local super = Class("RenderTarget", Container).getSuperclass()
function RenderTarget:init(sourceWidth, sourceHeight)
super.init(self)
self.clear = true
self:setAutoUpdate(true)
self:setSourceSize(sourceWidth, sourceHeight)
return self
end
function RenderTarget:setSourceSize(sourceWidth, sourceHeight)
if(sourceW... |
des.level_init({ style = "solidfill", fg = " " });
des.level_flags("mazelevel", "noflip");
des.map([[
---------------------------------------------------------------------------
|.........................................................................|
|.................................................................. |
--[===[DOC
= pathpart
[source,lua]
----
function pathpart( pathIn ) --> pathOut, errorStr
----
Convert between two path representation: the string one, and the array of
strings one. `pathIn` may be any of them: the other will be generated as
`pathOut`. In case of error, `nil` plus the `errorStr` string is returned
... |
local subprocess_posix = {}
local types = require("subprocess.types")
local exceptions = require("subprocess.exceptions")
local errno = require("posix.errno")
local fcntl = require("posix.fcntl")
local libgen = require("posix.libgen")
local posix_sys_time = require("posix.sys.time")
local posix_time = require("posi... |
local openssl_bignum = require "openssl.bignum"
local openssl_pkey = require "openssl.pkey"
local openssl_rand = require "openssl.rand"
local x509 = require "openssl.x509"
local x509_extension = require "openssl.x509.extension"
local x509_name = require "openssl.x509.name"
local generate_uuid = require "kong.tools.util... |
--[[
This file is part of 'Masque', an add-on for World of Warcraft. For license information,
please see the included License.txt file or visit https://github.com/StormFX/Masque.
* File...: Core\Regions\Shadow.lua
* Author.: StormFX
'Shadow' Region
]]
local _, Core = ...
-------------------------------------... |
local vim = vim
vim.g.coq_settings = {
auto_start = 'shut-up',
['clients.tabnine.enabled'] = true,
['display.icons.spacing'] = 2,
['keymap.recommended'] = false,
--, ["keymap.jump_to_mark"] = "<leader><tab>"
}
-- More here https://github.com/ms-jpq/coq.thirdparty
require('coq_3p')({
-- conf_only :: Maybe bool... |
-- Copyright (C) 2018 by chrono
-- curl 127.1:82/upstream
local upstream = require "ngx.upstream"
local name = upstream.current_upstream_name()
local addr = ngx.var.upstream_addr
ngx.log(ngx.ERR, "proxy to: ", name)
local srvs,err = upstream.get_primary_peers(name)
for _,s in ipairs(srvs) do
if string.find(add... |
local KUI, E, L, V, P, G = unpack(select(2, ...))
local QT = KUI:NewModule('QuestTracker', 'AceEvent-3.0');
-- Based on WatchFrameHider by Sortokk and ElvUI Enhanced
-- Cache global variables
-- WoW API / Variables
local ObjectiveTracker_Expand, ObjectiveTracker_Collapse = ObjectiveTracker_Expand, ObjectiveTracker_Co... |
--[[
Copyright (c) 2015 Natanael Copa <ncopa@alpinelinux.org>
Copyright (c) 2015 Eivind Uggedal <eivind@uggedal.com>
This content is released under the MIT License.
--]]
local upstream = require("upstream")
local M = {}
local function versions(self)
return upstream.versions(
self.provider_name,
("http://sourc... |
---
-- @module VoteService
-- @author Quenty
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))
local HttpPromise = require("HttpPromise")
local Promise = require("Promise")
local Maid = require("Maid")
local fastSpawn = require("fastSpawn")
local UPDATE_RATE = 15
local VoteServ... |
if not modules then modules = { } end modules ['font-agl'] = {
version = 1.001,
comment = "companion to font-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "derived from http://www.adobe.com/devnet/opentype/archives/glyphlist.txt",
original = "Adobe Glyph List, version... |
-- bbLua events
EV_RECONFIGURE = 1; |
-- todo make this generic so it's not reliant on coming up from the bottom
local obs = obslua
local AUDIO_NAME = 'cable a'
local AUDIO_THRESHOLD = -60
local SCENE_ITEM_NAME = 'swolebae'
local SCENE_ITEM_QUIET_POSITION = obs.vec2()
SCENE_ITEM_QUIET_POSITION.x = 0
SCENE_ITEM_QUIET_POSITION.y = 1456
local SCENE_ITEM_LOU... |
-- return function that returns network definition
return function(params)
-- get number of classes from external parameters
local nclasses = 14 -- params.nclasses or 1
if pcall(function() require('cudnn') end) then
print('Using CuDNN backend')
backend = cudnn
convLayer = cudnn.Spatia... |
saveMode = 'SQLite' -- Can be MySQL or SQLite
-- Connect database.
addEventHandler ( "onResourceStart", resourceRoot, function ( )
local saveMode_ = string.lower ( saveMode )
if ( saveMode_ == 'sqlite' ) then
dbc = dbConnect ( "sqlite", "updates.sql" )
else
return outputDebugString ( "Server Updates: "..saveMod... |
-- tl_ops_limit
-- en : token bucket
-- zn : 令牌桶-熔断限流用
-- @author iamtsm
-- @email 1905333456@qq.com
local cjson = require("cjson");
local tlog = require("utils.tl_ops_utils_log"):new("tl_ops_limit_fuse_token_bucket");
local tl_ops_utils_func = require("utils.tl_ops_utils_func");
local tl_ops_constant_limit = require(... |
return {'antarctica','antarctisch','antillenroute','antilliaan','antilliaans','antilliaanse','antwerpen','antwerpenaar','antwerps','antwerpse','antagonisme','antagonist','antagonistisch','antarctisch','ante','antecedent','antecedenten','antecedentenonderzoek','antedateren','antediluviaal','antediluviaans','antenne','an... |
minetest.register_node("yatm_armoury_c4:c4_tripwired", {
description = "C4 (Tripwire Operated)",
groups = {
oddly_breakable_by_hand = 1,
cracky = 1,
c4 = 1,
explosive = 1,
trip_node = 1,
},
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
node_box = {
type = "f... |
SWEP.PrintName = "DEA Passport"
SWEP.Author = "Kerry"
SWEP.Contact = "just add on Steam"
SWEP.Purpose = "Description"
SWEP.Instructions = "Kerry"
SWEP.Category = "Passport"
SWEP.Spawnable= true
SWEP.AdminSpawnable= true
SWEP.AdminOnly = false
SWEP.ViewModelFOV = 54
SWEP.ViewModel = "models/weapons/kerry/w_dea_... |
include('shared.lua')
SWEP.PrintName = "Laser Pointer"
SWEP.Slot = 0
SWEP.SlotPos = 4
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = true
local LASER = Material('cable/redlaser')
function SWEP:Setup(ply)
if ply.GetViewModel and ply:GetViewModel():IsValid() then
local attachmentIndex = ply:GetViewModel():Loo... |
local top = 72
local width = 80
local road = {
width = function() return width end,
top = function() return top end,
draw = function()
-- top border
inAlphaCanvas(2)
rekt(0, 71, w, 1)
inColourCanvas(2)
grey()
rekt(0, 64, w, 8)
-- tarmac
inColourCanvas(1)
if BOOM > 0 then
violet()
else
... |
local DialogueSystem = {}
-- Queue handling
local DialogueQueue = {}
local defaultWalkSpeed = 16
local defaultJumpPower = 50
DialogueSystem.InitPlayer = function(player)
DialogueQueue[player.UserId] = {}
player.PlayerGui:WaitForChild('DialogueBox').NextButton.MouseButton1Click:Connect(function()
Pop... |
shell.run("fury","server-clone","internet","genericHttp")
shell.run("fury","server-clone","internet","genericLog")
shell.run("fury","server-clone","internet","internet")
shell.run("fury","server-clone","internet","json") |
return {
formatCommand = ([[
~/.yarn/bin/sql-formatter
--indent 3
--uppercase
--lines-between-queries 2
]]):gsub('\n', '')
}
|
--Make your own bot!
local botchats = {
"This is a message you can edit!",
"Hey, you can also edit this message!",
"This bot will chat these messages randomly every set amount of time.",
"Copy this line and paste it to have more messages available!",
"Customise and enjoy!"
}
for i=1,10 do -- Change 10 ... |
------------------ change this -------------------
admins = {
'steam:110000105c4d991',
'steam:110000103e83831',
'steam:11000010256b49a',
--'license:1234975143578921327',
}
-- Set this to false if you don't want the weather to change automatically every 10 minutes.
DynamicWeather = true
-----------------... |
local FakeClone, super = Class(Object)
function FakeClone:init(ref, x, y, copy_transform)
super:init(self, x, y, ref and ref.width, ref and ref.height)
self.ref = ref
self.copy_transform = copy_transform ~= false
self.auto_remove = true
end
function FakeClone:getDebugRectangle()
return self.ref... |
---------------------------------
--! @file InPortCorbaCdrProvider.lua
--! @brief CorbaCdrインターフェースで通信するInPortProvider定義
--! 「corba_cdr」のインターフェース型で利用可能
--! OpenRTM.idlのPortServiceインターフェース
---------------------------------
--[[
Copyright (c) 2017 Nobuhiko Miyamoto
]]
local InPortCorbaCdrProvider= {}
--_G["openrtm.InPor... |
--- @class StageEnd
--- @field world World
--- @field area Area
StageEnd = Object:extend()
function StageEnd:new()
self.area = Area(self)
self.font = font
self.main_canvas = love.graphics.newCanvas(gw,gh)
gooi.newButton({group = "end",text = "重新挑战", x = 0,y = gh*sh/2,w=gw*sw,h=40})
:center()
... |
Citizen.CreateThread(function()
local defaultHash = 416176080
for i=1, #Config.Locations do
local model = Config.Locations[i]["model"]
if model then
model["hash"] = model["hash"] or defaultHash
_RequestModel(model["hash"])
if not DoesEntityExist(model["... |
local M = {}
M.config = function()
local neoclip_req = { "tami5/sqlite.lua", module = "sqlite" }
if lvim.builtin.neoclip.enable_persistant_history == false then
neoclip_req = {}
end
lvim.plugins = {
{
"rose-pine/neovim",
as = "rose-pine",
config = function()
require("user.them... |
help([==[
Description
===========
Intel C, C++ & Fortran compilers
More information
================
- Homepage: http://software.intel.com/en-us/intel-cluster-toolkit-compiler/
]==])
depends_on("icc/.2018.3.222")
depends_on("ifort/.2018.3.222")
if isloaded("imkl") then
always_load("imkl/2018.3.222")
end
famil... |
local t = {}
local start = os.clock()
for i = 1,10000 do
t[i] = {}
end
local e = os.clock()
print("10000:",(e-start)*1000000)
t = {}
start = os.clock()
for i = 1,10000000 do
t[i] = {}
end
e = os.clock();
print("100000:",(e-start)*1000000)
|
return {'ehbo','ehboer','ehboers'} |
ShopModule = CreateModule("ShopModule", GAME_PHASE_PRE_GAME)
function ShopModule:Init ()
self.gameManager = GetGameManager()
self:ListenToUIEvent("BuyItem")
end
function ShopModule:BuyItem (data)
UnitRequestBus.Event.NewOrder(SelectionRequestBus.Broadcast.GetMainSelectedUnit(),BuyItemOrder(Item),false)
end
|
local robot = require("robot")
local component = require("component")
--[[
Start:
invt: elec. wrench equipped and configurator in 1
pos: standing infront of redstone torch
]]
robot.select(1)
robot.swing() --torch
robot.forward()
robot.suck()
robot.use() --miner
robot.forward()
component.inventory_control... |
--[[--------------------------------------------------------------------------
--
-- File: UTGame.Ui.Settings.GameSettings.lua
-- Copyright (c) Ubisoft Entertainment. All rights reserved.
--
-- Project: Ubitoys.Tag
-- Date: September 2, 2010
--
------------------... |
Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
if IsPedOnFoot(GetPlayerPed(-1)) then
SetRadarZoom(1100)
elseif IsPedInAnyVehicle(GetPlayerPed(-1), true) then
SetRadarZoom(1100)
end
end
end) |
do --CFrame lerp (stravant, clerp by AntiBoomz0r)
local function QuaternionFromCFrame(cf) -- y u no axis angle interpolation?
local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
local trace = m00 + m11 + m22
if trace > 0 then
... |
local helpers = require('test.gs_helpers')
local setup_gitsigns = helpers.setup_gitsigns
local feed = helpers.feed
local test_file = helpers.test_file
local edit = helpers.edit
local command = helpers.command
local check = helpers.check
local exec_lua = helpers.exe... |
HalloweenEventVendorLogic = VendorLogic:new {
scriptName = "HalloweenEventVendorLogic",
currencies = {
--For Tokens: Displayed Name, full template string (without shared_), if applicable: ScreenPlayData string, ScreenPlayData key
{currency = "token", name = "Hallween Event Coins", template = "object/tangible/event... |
local args = ...
local player = args.player
local controller = player == 'PlayerNumber_P1' and "left" or "right"
local hash = args.hash
local otherSide = {left = "right", right = "left"}
local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats(player)
local comparisonScore
local currentScore = {}
local sanitizedComp... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:28' using the latest game version.
NOTE: This file should only be used as IDE support; it should NOT be distributed with addons!
****************************************************************************
CONTENTS OF THIS FILE IS COPYRI... |
#!/usr/bin/env lua
local bxx = require("basexx")
local tty = io.open("/dev/tty", "w")
local input = io.read("*all")
local c
if (#arg < 2) then
c = "c"
else
c = string.sub(arg[1], 1, 1)
end
io.write(c)
io.output(tty)
io.write("\027]52;" .. c .. "c;" .. bxx.to_base64(input) .. "\a")
io.close(tty)
|
require('constants')
require('decide')
goblin_traps = {"arrow_trap", "rock_trap", "crossbow_trap",
"flash_trap", "poison_dart_trap", "blackwater_trap"}
local function has_remaining_traps(creature_id)
local has_traps = false
local traps_property = "CREATURE_PROPERTIES_NUM_TRAPS"
local traps_prop... |
function table.merge(t1, t2)
for k,v in pairs(t2) do
t1[k] = v
end
return t1
end
function table.extend(t1, t2)
local maxnum = 1
local minnum = 1
local max = math.max
local min = math.min
for k,v in pairs(t1) do
if type(k) == "number" then
maxnum = max(maxnu... |
-- shared_chests.lua
-- Feb 2020
-- Oarc's silly idea for a scripted item sharing solution.
-- Buffer size is the limit of joules/tick so multiply by 60 to get /sec.
SHARED_ELEC_OUTPUT_BUFFER_SIZE = 1000000000
SHARED_ELEC_INPUT_BUFFER_SIZE = 1000000001
SHARED_ENERGY_STARTING_VALUE = 0 -- 100GJ
function SharedChestIn... |
local class = require('middleclass')
local Finder = class('Finder')
function Finder:initialize(map)
self.map = map
self.algorithm = require('graph.search.astar')
self.heuristic = map.distance
end
function Finder:search(start, goal)
return self.algorithm(self.map, start, goal, self.heuristic)
en... |
createObject(14595,1589.9450683594,1799.3917236328,2086.330078125,0,0,0,4,0)
createObject(14596,1599.3665771484,1784.0727539063,2081.4682617188,0,0,0,4,0)
createObject(14597,1580.4884033203,1787.578125,2090.1713867188,0,0,0,4,0)
createObject(8079,1539.7926025391,1806.1271972656,2095.6491699219,0,0,0,4,0)
create... |
local skynet = require "skynet"
local coroutine = coroutine
local xpcall = xpcall
local traceback = debug.traceback
local table = table
function skynet.queue2()
local current_thread
local ref = 0
local thread_queue = {}
local scope_lock = setmetatable({}, { __close = function()
ref = ref - 1
if ref == 0 then
... |
require 'nn'
require 'image'
require 'unsup'
require 'optim'
local Atan2, Parent = torch.class('nn.Atan2', 'nn.Module')
function Atan2:__init()
Parent.__init(self)
end
function Atan2:updateOutput(input)
self.output = torch.atan2(input[{{},2}],input[{{},1}])
return self.output
end
function Atan2:update... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:28' using the latest game version.
NOTE: This file should only be used as IDE support; it should NOT be distributed with addons!
****************************************************************************
CONTENTS OF THIS FILE IS COPYRI... |
local datetime = require "datetime"
local http = require "http"
local os = require "os"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local datetime = require "datetime"
description = [[
Gets the date from HTTP-like services. Also prints how much the date
differs... |
Name = 'Select'
OnUse = function(artboard, event, side, x, y)
if event == 'mouse_click' then
artboard.Selection = {
{
X = x,
Y = y
},
nil
}
elseif event == 'mouse_drag' then
if artboard.Selection and artboard.Selection[1] then
artboard.Selection = {
artboard.Selection[1],
{
X =... |
Config = {}
Config.DrawingTime = 20*1000 --20 seconds
Config.TextColor = {r=255, g=255,b=255} -- WHITE (Player Data)
Config.AlertTextColor = {r=255, g=0, b=0} -- RED (Player Left Game)
Config.LogSystem = true
Config.UseSteam = true -- If False then use R* License
Config.LogBotName = "ES_EXTENDED"
Config.AutoDisableDra... |
---
--- ColaFramework
--- Copyright © 2018-2049 ColaFramework 马三小伙儿
--- 通用接口工具类
---
local LuaCommon_Utils = Class("LuaCommon_Utils")
LuaCommon_Utils._instance = nil
-- override 初始化各种数据
function LuaCommon_Utils.initialize()
end
return LuaCommon_Utils |
-- vim: filetype=lua syntax=lua softtabstop=3 tabstop=3 shiftwidth=3 fileencoding=utf-8 smartindent autoindent expandtab
-- code: language=lua insertSpaces=true tabSize=3
-- ──────────────────────────────────────────────────────────────────────
-- selene: allow(unused_variable)
-- luacheck: no unused args
return functi... |
local TurtlePlus = {}
-- Right goes up, left goes down the array
local directionsIndex = { north=1, east=2, south=3, west=4 }
local directions = { 'north', 'east', 'south', 'west' }
function TurtlePlus:new()
local s = setmetatable({}, { __index = TurtlePlus })
-- Coord system
s.x = 0
s.y = 0
s.z = 0
s.fac... |
object_tangible_component_weapon_mustafar_2h_obsid_sword_core = object_tangible_component_weapon_mustafar_shared_2h_obsid_sword_core:new {
}
ObjectTemplates:addTemplate(object_tangible_component_weapon_mustafar_2h_obsid_sword_core, "object/tangible/component/weapon/mustafar/2h_obsid_sword_core.iff")
|
local body = ngx.req.read_body()
local methodType = ngx.req.get_method()
local args = ngx.req.get_post_args()
local sourceIP = ngx.var.remote_addr
local ipuserdict = ngx.shared.ipuser
local header = ngx.header
local currentHPuserIPaddr1 = ipuserdict:get("honeypot1")
local currentHPuserIPaddr2 = ipuserdict:get("honeypot... |
local jbs = {}
--[[
Tags
----
Tags are categories for sounds. Sounds can have any combination of tags,
and tags can be added or removed at any time. When applied to a sound,
a tag will affect the volume level of the sound and the effects
that are applied to it.
]]
local Tag = {}
-- Adds a sound to the tag's int... |
table.insert(Assets, Asset("ANIM", "anim/ui_showbundle.zip"))
table.insert(Assets, Asset("ANIM", "anim/ui_showbundle_3x2.zip"))
local modname = modname
local modimport = modimport
local AddClassPostConstruct = AddClassPostConstruct
GLOBAL.setfenv(1, GLOBAL)
SB = {}
modimport("main/util.lua")
modimport("main/showbund... |
---------------------------------------------------------------------------------------------
-- Requirement summary:
-- [PolicyTableUpdate] PoliciesManager changes status to “UPDATE_NEEDED”
--
-- Description:
-- PoliciesManager must change the status to “UPDATE_NEEDED” and notify HMI with
-- OnStatusUpdate(“UPDATE_NEE... |
local core = require 'core'
--- @param lsp LSP
--- @param params table
--- @return table
return function (lsp, params)
local uri = params.textDocument.uri
local newName = params.newName
local vm, lines = lsp:loadVM(uri)
if not vm then
return {}
end
local position = lines:positionAsChar(... |
-- 트래킹
local Table_to_str = require('modules.table_to_str')
local Tree = require('modules.tree')
local Tracking = {}
Tracking.draw = function(panel, path_str, full_path, preinput)
local container = panel.add{type = 'flow', name = path_str, direction = 'vertical', style = 'vflow_gvv-mod'}
local header = container... |
-- split
local function xsplit(inputstr, sep)
if sep == nil then
sep = "%s"
end
local t={} ; local i=1
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
t[i] = str
i = i + 1
end
return t
end
--
redis.call('HSET', ... |
spammers = { }
possiblyMuted = { }
spamTimers = { }
muteLog = { }
maxMutes = 3
spamTimer = 500
addEventHandler ( "onPlayerChat", root, function ( msg, tp )
cancelEvent ( )
if ( isGuestAccount ( getPlayerAccount ( source ) ) ) then
return outputChatBox ( "#d9534f[VDBG.ORG] #ffffffPor favor, aguarde até que você e... |
--[[
Public domain:
Copyright (C) 2017 by Matthias Richter <vrld@vrld.org>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIE... |
local Skada = Skada
Skada:AddLoadableModule("Potions", function(L)
if Skada:IsDisabled("Potions") then return end
local mod = Skada:NewModule(L["Potions"])
local playermod = mod:NewModule(L["Potions list"])
local potionmod = mod:NewModule(L["Players list"])
-- cache frequently used globals
local pairs, ipairs, ... |
local log = ApolloLive.Log
local Connection = ApolloLive.Connection
local interval = ApolloLive.Config.PollInterval
ModUtil.WrapBaseFunction("AddTraitToHero", function ( baseFunc, args)
log('AddTraitToHero')
baseFunc(args)
ApolloLive.Update()
end, ApolloLive)
ModUtil.WrapBaseFunction("RemoveTraitData", function... |
local ContributionCollector =
{
Name = "ContributionCollector",
Type = "System",
Namespace = "C_ContributionCollector",
Functions =
{
{
Name = "Close",
Type = "Function",
},
{
Name = "Contribute",
Type = "Function",
Arguments =
{
{ Name = "contributionID", Type = "number", Nilable = f... |
local M = {}
function M.config()
local status_ok, neoscroll = pcall(require, "neoscroll")
if status_ok then
neoscroll.setup(require("core.utils").user_plugin_opts("plugins.neoscroll", {}))
end
end
return M
|
EtcdClientOpSet = EtcdClientOpSet or class("EtcdClientOptSet", EtcdClientOpBase)
function EtcdClientOpSet:ctor()
EtcdClientOpSet.super.ctor(self)
self[EtcdConst.Key] = nil
self[EtcdConst.Value] = nil
self[EtcdConst.Ttl] = nil
self[EtcdConst.Refresh] = nil
self[EtcdConst.Dir] = nil
self[Etc... |
local colors = require 'src/colors'
local menu = {}
local function drawRainbowCosText(text, time)
for i=1, #text do
for j=1, #colors.getRainbowColors() do
local t1 = time + i*4 - j*2
local y = 60 + math.cos(t1*3)*20
love.graphics.setColor(colors.getRainbowColors()[j])
love.graphics.prin... |
-- see syntax.lua for IndentMarker
require("indent_blankline").setup({ char_highlight_list = { 'IndentMarker' } })
|
script_serverside = true
data_sent = {}
function sendAttachmentData()
if data_sent[client] then return end
triggerClientEvent(client,"boneAttach_sendAttachmentData",root,
attached_ped,
attached_bone,
attached_x,
attached_y,
attached_z,
attached_rx,
attached_ry,
attached_rz
)
data_sent[client] = tru... |
function InverterOnAvionics(ofs, val)
if (val == 0) then
ipc.writeLvar("Duke_inverter_Switch", 1)
else
ipc.writeLvar("Duke_inverter_Switch", 0)
end
end
function LogoOnLanding(ofs, val)
if (logic.And(val, 4) == 0) then
ipc.clearbitsUW(0x0d0c, 256)
else
ipc.setbitsUW(0x0d0c, 256)
end
end
event.offset(0x2e... |
-- premake5.lua
workspace "YagetCore"
configurations { "Debug", "Release" }
platforms { "Win64" }
location "builds"
filter { "platforms:Win64" }
system "Windows"
architecture "x86_64"
project "YagetCore"
kind "StaticLib"
language "C++"
location "builds"
--targetdir "bin/%{cfg.build... |
local math = math
module "MaxSpeed"
function limit(way,max,maxf,maxb)
if maxf and maxf>0 then
way.forward_speed = math.min(way.forward_speed, maxf)
elseif max and max>0 then
way.forward_speed = math.min(way.forward_speed, max)
end
if maxb and maxb>0 then
way.backward_speed = math.min(way.backward... |
--- GENERATED CODE - DO NOT MODIFY
-- Amazon Kinesis Video Streams (kinesisvideo-2017-09-30)
local M = {}
M.metadata = {
api_version = "2017-09-30",
json_version = "",
protocol = "rest-json",
checksum_format = "",
endpoint_prefix = "kinesisvideo",
service_abbreviation = "Kinesis Video",
service_full_name = "Am... |
-- Copyright (C) 2016-2017 Jian Chang <aa65535@live.com>
-- Copyright (C) 2017 Xingwang Liao <kuoruan@gmail.com>
-- Licensed to the public under the GNU General Public License v3.
local m, s, o
local shadowsocks = "shadowsocks"
m = Map(shadowsocks, "%s - %s" %{translate("ShadowSocks"), translate("Servers Manage")})
... |
-----------------------------------------------------------------------------------------
--
-- level1.lua
--
-----------------------------------------------------------------------------------------
local composer = require( "composer" )
local scene = composer.newScene()
-- include Corona's "physics" library
local p... |
-- Sample server responses for different code versions
function default_server(applet)
local response = "Request has been forwarded to the default server running V1.0.0\n"
applet:set_status(200)
applet:start_response()
applet:send(response)
end
core.register_service("default_server", "http", default_server)
... |
local dynamicOptions = {}
local sheetOptions =
{
-- required parameters
width = 250,
height = 250,
numFrames = 6,
-- optional parameters; used for dynamic resolution support
sheetContentWidth = 750, -- width of original 1x size of entire sheet
sheetContentHeight = 500 -- height of origi... |
local Widget = require "widgets/widget"
local SanityBadge = require "widgets/sanitybadge"
local HealthBadge = require "widgets/healthbadge"
local HungerBadge = require "widgets/hungerbadge"
local MoistureMeter = require "widgets/moisturemeter"
local StatusDisplays = Class(Widget, function(self, owner)
Widget._cto... |
require "strangepan.secretary.Entity"
require "strangepan.util.type"
require "Set"
Map = buildClass(Entity)
function LevelMap:_init()
LevelMap.superclass._init(self)
self.entities = Set()
end
function LevelMap:addEntity(entity)
assertClass(entity, Entity, "entity")
self.entities:add(entity)
end
function ... |
-- ror.lua
-- This is the file goes in your ~/.config/awesome/ directory
-- It contains your table of 'run or raise' key bindings for aweror.lua
-- Table entry format: ["key"]={"function", "match string", "optional attribute to match"}
-- The "key" can include "Control-", "Shift-", and "Mod1-" modifiers (eg "Control-z"... |
local M = {}
function M:init()
self.base_app_tbl = {}
end
-- 创建baseapp
function M:create_base_apps()
for i=1,20 do
local addr = skynet.newservice("base_app", i)
local info = {
addr = addr
}
self.base_app_tbl[addr] = info
end
end
function M:get_base_app_info(a... |
local GameComponent = require "smee.game_core.gamecomponent"
local MapComponent = GameComponent:subclass("MapComponent")
function MapComponent:initialize(image)
self.windowWidth, self.windowHeight = love.graphics.getDimensions()
self.mapWidth, self.mapHeight = self.windowWidth, self.windowHeight - 150 -- UI H... |
--[[
碰撞体
--]]
local bump_body = class("bump_body"){
_id = 0,
_layer = 0,
_wait = false,
shapes = nil,--这是一个HC形状对象
at_world = nil,
}
function bump_body:__init(shapes)
self.shapes = shapes
self._id = self
self._layer = 0
end
function bump_body:get_bump_body()
return self
end
fun... |
local install_path = vim.fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.fn.system({'git', 'clone', 'https://github.com/wbthomason/packer.nvim', install_path})
vim.api.nvim_command 'packadd packer.nvim'
end
vim.cmd('packadd packer.nvim')
req... |
ArchetypeManager = BaseClass()
ECS.ArchetypeManager = ArchetypeManager
function ArchetypeManager:Constructor( sharedComponentManager )
self.m_SharedComponentManager = sharedComponentManager
self.m_TypeLookup = {}
self.m_EmptyChunkPool = {}
ECS.UnsafeLinkedListNode.InitializeList(self.m_EmptyChunkPool)
en... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.