content stringlengths 5 1.05M |
|---|
-- Plugins and modifications to the core text editing
-- experience, and isn't that really why we're here in
-- the first place?
local function setup()
vim.cmd([[
packadd nvim-autopairs
packadd nvim-comment
]])
require('nvim_comment').setup {
marker_padding = true,
comment_... |
-- version
set_xmakever("2.2.5")
-- set warning all as error
set_warnings("all", "error")
-- set language: c99, c++11
set_languages("c99", "cxx11")
-- disable some compiler errors
add_cxflags("-Wno-error=deprecated-declarations", "-fno-strict-aliasing")
add_mxflags("-Wno-error=deprecated-declarations", "-fno-strict-... |
-- Lua Library inline imports
function __TS__ObjectKeys(obj)
local result = {}
for key in pairs(obj) do
result[#result + 1] = key
end
return result
end
function __TS__ArrayForEach(arr, callbackFn)
do
local i = 0
while i < #arr do
callbackFn(_G, arr[i + 1], i, arr... |
Socket,Address,Interface,Buffer =
require('t.Net.Socket'),require('t.Net.Address'),require('t.Net.Interface'),require('t.Buffer')
ipAddr = arg[1] and arg[1] or Interface.default( ).address.ip
port = arg[2] and arg[2] or 8888
udpsock = Socket( 'UDP' ) --implicit ip4
adr = Address( ipAddr, port )
udpsock:send( Bu... |
--[[
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... |
Importer{version=1.00, format="Bancolombia 'Excel'", fileExtension="xls"}
local function strToDate (str)
-- Helper function for converting localized date strings to timestamps.
local y, m, d = string.match(str, "(%d%d%d%d)/(%d%d)/(%d%d)")
return os.time{year=y, month=m, day=d}
end
function ReadTransactions (acc... |
local strAllowedNumericCharacters = "1234567890.-"
DEFINE_BASECLASS("Panel")
--local baseEntry = baseclass.Get( "DTextEntry" )
local PANEL = {}
AccessorFunc(PANEL, "bDeleteSelf", "DeleteSelf", FORCE_BOOL)
AccessorFunc(PANEL, "m_characters", "Characters", FORCE_STRING)
PANEL.outlineRect = Color(204, 204, 204, 100)
f... |
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local S = E:GetModule('Skins')
--Lua functions
local _G = _G
local unpack = unpack
--WoW API / Variables
local hooksecurefunc = hooksecurefunc
local function SkinOjectiveTrackerHeaders()
local frame = _G.Objective... |
-- This is a ROS enabled Hokuyo_04LX_UG01 model (although it can be used as a generic
-- ROS enabled laser scanner), based on the existing Hokuyo model. It performs instantaneous
-- scans and publishes ROS Laserscan msgs, along with the sensor's tf.
function sysCall_init()
laserHandle=sim.getObjectHandle("Ho... |
local conditionalProperty = require(script.Parent.Parent.Utility.conditionalProperty)
local evaluateColorSequence = require(script.Parent.Parent.Utility.Sequences.evaluateColorSequence)
local evaluateNumberSequence = require(script.Parent.Parent.Utility.Sequences.evaluateNumberSequence)
local Types = require(script.Par... |
bot_token = "323116787:AAEgT0pkF9I3_Ja2p7wBN_l9nWxDKn-9YLU"
send_api = "https://api.telegram.org/bot"..bot_token
bot_version = "6.0"
sudo_name = "ALIREZA ABEDZADEH"
sudo_id = 119707014
admingp = -185089971
sudo_num = "989226773671"
sudo_user = "alireza_abedzadeh"
sudo_ch = "botantispam1"
|
local ffi = require("ffi")
-- OpenFlow: protocol between controller and datapath.
local common = require("openflow_common")
local OFP_ASSERT = common.OFP_ASSERT;
ffi.cdef[[
/* Group commands */
enum ofp15_group_mod_command {
/* Present since OpenFlow 1.1 - 1.4 */
OFPGC15_ADD = 0, /* New group. */
... |
id = 'V-38547'
severity = 'low'
weight = 10.0
title = 'The audit system must be configured to audit all discretionary access control permission modifications using fchmod.'
description = 'The changing of file permissions could indicate that a user is attempting to gain access to information that would otherwise be disa... |
--[[
Localization.lua
Translations for Dominos
English: Default language
--]]
local AddonName = ...
local L = LibStub('AceLocale-3.0'):NewLocale(AddonName, 'enUS', true)
L.ActionBarDisplayName = "Action Bar %d"
L.ActionButtonDisplayName = "Action Button %d"
L.AlertsBarDisplayName = "Alerts"
L.AvailableProfiles ... |
_side = "enemy"
local _states = {
["player"] = {color = {0, 0, 0.545098}, state = 1},
["enemy"] = {color = {0.517647, 0, 0.098039}, bright = {0.94902, 0.184314, 0.32549}, state = 2},
["ally"] = {color = {0.039216, 0.368627, 0.211765}, bright = {0.352941, 0.823529, 0.603922}, state = 3},
["neutral"] = {c... |
-- This normalizes title to the "pretty" form with spaces,
-- because that is used in the entry_index.
local function normalize_title(title)
return (title:gsub("_", " "))
end
local function eprint(...)
io.stderr:write(...)
io.stderr:write "\n"
end
local function get_entry_redirects(path)
local title_to_redirects ... |
game:DefineFastFlag("PlayerSpecificPopupCounter", false)
return function()
return game:GetFastFlag("PlayerSpecificPopupCounter")
end
|
--[[
Includes a series of useful utilities
]]
--checks if two tables are equal to eachother
function table.eq(firstTable, secondTable)
for firstIndex, value in pairs(firstTable) do
if secondTable[firstIndex] ~= value then
return false
end
end
return true
end
function table.print(t)
for i,v in pairs(t) do
... |
Locales ['es'] = {
['message_title'] = '^3Sistema de alarma',
['message_locked'] = 'Alarma Activada',
['message_unlocked'] = 'Alarma Desactivada',
}
|
package = "blunty666.nodes.gui.events"
class = "PasteEvent"
extends = "BaseEvent"
variables = {
data = NIL,
}
local function checkData(data)
return data -- TODO
end
constructor = function(self, data)
self.super("paste")
self.raw.data = checkData(data)
end
|
function LERider_OnEnterCombat(Unit,Event)
Unit:CastSpell(39782)
Unit:CastSpellOnTarget(31888,Unit:GetClosestPlayer())
end
RegisterUnitEvent(22966, 1, "LERider_OnEnterCombat") |
--[[
################################################################################
#
# Copyright (c) 2014-2020 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 ... |
player = game.Players.LocalPlayer
game:GetService("BadgeService"):AwardBadge(player.userId, 24806012) |
local util = require("spec.util")
describe("forin", function()
describe("ipairs", function()
it("with a single variable", util.check [[
local t = { 1, 2, 3 }
for i in ipairs(t) do
print(i)
end
]])
it("with two variables", util.check [[
local t = { 1... |
local sendText = ""
local printText = false
local Wins_Offset = Hack.GetOffset("DT_CSPlayerResource", "m_iCompetitiveWins")
local Rank_Offset = Hack.GetOffset("DT_CSPlayerResource", "m_iCompetitiveRanking")
local Team_Offset = Hack.GetOffset("DT_BaseEntity", "m_iTeamNum")
function Split (inputstr, sep)
if... |
-- Privates variables
local cdBarWin = nil
local isIn = 'H' --[[ 'H' = horizontal; 'V' = vertical ]]--
local namesAtks = ''
local icons = {}
-- End privates variables
-- Public functions
function init()
cdBarWin = g_ui.displayUI('cdBar', modules.game_interface.getRootPanel())
cdBarWin:setVisible(false)
cdBa... |
////////////////////////////////////////
// Maax´s Libary (MLIB) //
// Coded by: Maax //
// //
// Version: v1.0 (Workshop) //
// //
// You are not permitted to //
// reupload this Script! ... |
local assert = require('luassert')
local formatter = require('legendary.formatter')
describe('formatter', function()
describe('format(item)', function()
it('formats properly with default formatter', function()
-- ensure using default function
require('legendary.config').formatter = nil
local it... |
-- Tue Aug 6 00:54:24 2019
-- (c) Alexander Veledzimovich
-- set PHOTON
-- lua<5.3
local utf8 = require('utf8')
local unpack = table.unpack or unpack
local SET = {
APPNAME = love.window.getTitle(),
VER = '1.5',
SAVE = 'photonsave.lua',
FULLSCR = love.window.getFullscreen(),
WID = love.graphics.ge... |
local registry = require 'lulz.types.registry'
local types = {}
types.type = require 'lulz.types.type'
types.declare = types.type.declare
for name, tp in pairs(require 'lulz.types.builtin') do
types[name] = tp
end
types.find = registry.find
function types.isinstance(obj, tp)
if rawget(tp, 'isinstance') then ... |
require("prototypes.constants")
require("prototypes.functions")
--This exists to test the theory of whether you need 1 input per fluid box for max flow, or if you
-- can get away with one fluidbox that has multiple inputs. This function will be used if it can flow at max.
function createOilMultipleFluidboxConnections(... |
local BOOST = 300
local WIDTH = 1280
local HEIGHT = 720
dofile("game/Pipe.lua");
math.randomseed(os.time())
-- Set up the background layer
local background = newSprite(WIDTH, HEIGHT, 0, 0)
background:setTexture("res/bg.png");
local citybg = {
newSprite(WIDTH, 256, 0, HEIGHT - 310),
newSprite(WIDTH, 256, WIDTH, ... |
--Turtle
--A program that gives quick acces to all of the important functions of the turtle
local Tin = nil --Resets the value, if defined somewhere before
local Tin = {...} --(T)urtle(in)put Defines what the user wants the Turtle to do
HT = false --(H)ave (T)oggled This, and others like this, should... |
ITEM.name = "Американский MRE"
ITEM.desc = "Сухой паек, готовый к употреблению является автономным, индивидуальным рационом питания вооруженных сил Соединенных Штатов в полевых условиях, при проведении боевых операций или при других сложных условиях, когда нет поблизости источников нормальной пищи. \n\nХАРАКТЕРИСТИКИ... |
-- Notify module
local Notify = {}
-- Variables
local gameWidth = 0
local fadeDuration = 0
local notifyDuration = 0
local notifyTime = 0
local notifyText = nil
-- Initializes notifications
function Notify.init(config)
gameWidth = config.gameWidth or 800
notifyDuration = config.notifyDuration or 1
fadeDura... |
local require = GLOBAL.require
local Vector3 = GLOBAL.Vector3
local STRINGS = GLOBAL.STRINGS
local ACTIONS = GLOBAL.ACTIONS
local ActionHandler = GLOBAL.ActionHandler
local LANG = GetModConfigData("LINGUAGEM")
local CNFG_HEALTH = GetModConfigData("HEALTH")
local CNFG_SANITY = GetModConfigData("SANITY")
local CNFG_HUNG... |
Quest.Config.Storylines["he_fix_it_falafel"] ={
name = "He fix it Falafel",
id = "he_fix_it_falafel",
desc = "Oil and grease",
quests = {
[1] = {
name = "Become a Mechanic",
desc = "Become a Mechanic from the F4 menu",
func = function(ply, data)
return true
end
},
[2] = {
name = "Repair a v... |
class("CheckWorldBossStateCommand", pm.SimpleCommand).execute = function (slot0, slot1)
slot2 = slot1:getBody()
slot4 = slot2.callback
slot6 = slot2.time or 0
function slot7()
slot0 = getProxy(ChatProxy)
for slot5, slot6 in ipairs(slot1) do
slot6.args.isDeath = true
slot0:UpdateMsg(slot6)
end
for ... |
savage_guf_drolg = Creature:new {
objectName = "@mob/creature_names:savage_guf_drolg",
socialGroup = "guf_drolg",
faction = "",
level = 15,
chanceHit = 0.31,
damageMin = 170,
damageMax = 180,
baseXp = 831,
baseHAM = 2400,
baseHAMmax = 3000,
armor = 0,
resists = {110,5,5,-1,-1,-1,-1,-1,-1},
meatType = "meat... |
--[[
Copyright 2012-2015 The Luvit Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or... |
#include "_T_Lapism_goldentheme.lua"
durability=20,
density=0.05,
growRate=2,
armor=0,
meleeDamage=0,
capacity=0,
|
-- https://github.com/folke/which-key.nvim
require("which-key").setup {
key_labels = {
["<space>"] = "SPC",
["<cr>"] = "RET",
["<tab>"] = "TAB"
}
}
|
data:extend({
{
type = "accumulator",
name = "power-sensor",
icon = "__Red Alerts__/graphics/PowerSensorIcon.png",
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "power-sensor"},
max_health = 100,
corpse = "small-remnants",
collision_bo... |
--[[
file:api_socket.lua
desc:socket使用
auth:Caorl Luo
]]
local socket = require("skynet.socket")
---@class api_socket
local api_socket = {}
---监听
---@param host ip @地址
---@param port port @端口
---@return socket
function api_socket.listen(host, port)
re... |
slot0 = class("BiliTracker")
slot0.Ctor = function (slot0, slot1)
return
end
slot0.Tracking = function (slot0, slot1, slot2, slot3)
if slot1 == TRACKING_USER_LEVELUP then
print("tracking lvl:" .. slot3)
pg.SdkMgr.GetInstance():SdkLevelUp()
end
end
return slot0
|
return function(keyName, tbl)
assert(typeof(keyName)=="string", "Arg 1 must be a string, got "..typeof(keyName))
assert(typeof(tbl)=="table", "Arg 2 must be a table, got"..typeof(tbl))
local new = {}
for idx,v in ipairs(tbl) do
if v[keyName] ~= nil then
new[v[keyName]] = v
... |
return {
init_effect = "",
name = "测试-声望-主炮额外一轮攻击1",
time = 0,
picture = "",
desc = "触发:主炮额外一轮攻击1",
stack = 1,
id = 60033,
icon = 60033,
last_effect = "lingxing",
effect_list = {
{
type = "BattleBuffCastSkill",
trigger = {
"onChargeWeaponFire"
},
arg_list = {
skill_id = 60017,
target... |
-- Detect optional mods.
local armor_path = minetest.get_modpath("3d_armor")
-- global runtime storage for data and references
-- contains .motors loaded from mod storage
-- runtime variables and api functions
elevator = {
SPEED = 10, -- Initial speed of a box.
ACCEL = 0.1, -- Acceleration of a box.
VISUAL_INCREA... |
local fillerStruct = {}
function fillerStruct.decode(data)
local filler = {
_type = "filler",
_raw = data
}
filler.x = data.x or 0
filler.y = data.y or 0
filler.width = data.w or 0
filler.height = data.h or 0
return filler
end
function fillerStruct.encode(rect)
local... |
#!/usr/bin/env tarantool
require('strict').on()
package.setsearchroot()
local front = require('frontend-core')
local cartridge = require('cartridge')
local analytics = require('analytics')
local tutorial_bundle = require('cartridge-app.bundle')
local clock = require('clock')
local json = require('json')
local helper ... |
counter = 0
function onSave()
node:save(tostring(counter))
end
function onRedstonePowered()
counter=counter+1
node:setInfoLine(tostring(counter))
end
function load(data)
print(data)
counter = tonumber(data)
node:setInfoLine(counter)
end
node:onRedstoneSignal(onRedstonePowered)
node:onSave(onS... |
createbaseprojectcpp("GoogleTest", "StaticLib")
files
{
"googlemock/src/gmock-all.cc",
"googletest/src/gtest-all.cc",
}
includedirs
{
"googletest",
"googlemock",
"googletest/include",
"googlemock/include",
} |
--------------------------------------------------------------------------------
waterState = {}
--------------------------------------------------------------------------------
function waterState.enter()
if not isPleasedGiraffe() then return nil, 9999 end -- get out, and dont come back!
local position = mcontr... |
-- NetHack 3.6 Samurai.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $
-- Copyright (c) 1989 by Jean-Christophe Collet
-- Copyright (c) 1991-92 by M. Stephenson, P. Winner
-- NetHack may be freely redistributed. See license for details.
--
des.level_init({ style = "solid... |
object_mobile_tatooine_sand_splitter_erib_kurrugh = object_mobile_shared_tatooine_sand_splitter_erib_kurrugh:new {
}
ObjectTemplates:addTemplate(object_mobile_tatooine_sand_splitter_erib_kurrugh, "object/mobile/tatooine_sand_splitter_erib_kurrugh.iff")
|
--[[
AMixer - interface for amixer
(c) 2012, Will Szumski will@cowboycoders.org
(c) 2012, Adrian Smith, triode1@btinternet.com (several functions used from his EnhancedDigitalOuput)
--]]
local oo = require("loop.simple")
local io = require("io")
local os = require("os")
loc... |
modifier_creature_lich_statue = class({})
--------------------------------------------------------------------------------
function modifier_creature_lich_statue:IsHidden()
return true
end
--------------------------------------------------------------------------------
function modifier_creature_lich_statue:IsPur... |
local primitiveTypes = {
Bool = true,
Enum = true,
Float32 = true,
Float64 = true,
Int32 = true,
Int64 = true,
String = true,
Content = true,
}
local function identity(...)
return ...
end
local encoders = {
Bool = identity,
Float32 = identity,
Float64 = identity,
Int32 = identity,
Int64 = identity,
Str... |
--[[
<name>
<expression>
<expression>
opt <expression>
<statements>
]]
return
function(self, node)
node.index = node[1]
node[1] = nil
node.start_val = node[2]
node[2] = nil
node.end_val = node[3]
node[3] = nil
local seek_pos = 4
if (node[seek_pos].type == ... |
local playerModule = require "module.playerModule"
local View = {};
function View:Start(data)
self.view = CS.SGK.UIReference.Setup(self.gameObject);
self.data = data;
self:InitView();
end
function View:InitView()
local side1 = playerModule.GetSelfID();
local side2 = self.data.attacker_pid == side1 and self.data.d... |
//________________________________
//
// NS2 CustomEntitesMod
// Made by JimWest 2012
//
//________________________________
// LogicTrigger.lua
// Entity for mappers to create teleporters
Script.Load("lua/ExtraEntitiesMod/LogicMixin.lua")
class 'LogicTrigger' (Trigger)
LogicTrigger.kMapName = "logic_trigger"
... |
object_tangible_tcg_series5_hangar_ships_arc170 = object_tangible_tcg_series5_hangar_ships_shared_arc170:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series5_hangar_ships_arc170, "object/tangible/tcg/series5/hangar_ships/arc170.iff")
|
require("busted.runner")()
local name = require("citeproc.citeproc-node-names").name
describe("String split", function ()
local context = {
["initialize-with-hyphen"] = true,
initialize=true,
}
describe("Initialize true:", function ()
context.initialize = true
describe("Space:", functi... |
return [[
{
"Lang" : "pl",
"Name" : "polski",
"Entities.gmod_subway_ezh3.Buttons.Stopkran.EmergencyBrakeValveToggle" : "Hamulec awaryjny",
"Entities.gmod_subway_ezh3.Buttons.Back.BackDoor" : "Drzwi tylne",
"Entities.gmod_subway_ezh3.Buttons.DriverValveBLTLDisconnect.DriverValveBLD... |
local t = Def.ActorFrame{}
t[#t+1] = LoadActor("_background")
t[#t+1] = LoadActor("_particles");
return t |
return {
tag = 'colliders',
summary = 'Add a Collider with a BoxShape to the World.',
description = 'Adds a new Collider to the World with a BoxShape already attached.',
arguments = {
{
name = 'x',
type = 'number',
default = '0',
description = 'The x coordinate of the center of the b... |
require("settings")
require("keymaps")
require("plugins")
|
--[[
=== test_hepack
]]
local he = require "he"
local hs = require "he.pack"
local list = he.list
local pp = he.pp
local pack, unpack = hs.pack, hs.unpack
--test equality including the metatable
local function eq(a, b) return he.equal(a, b, true) end
--------------------------------------------------------------... |
while true do
screen:clear()
pad = Controls.read()
if pad:cross() then dofile("script.lua") end
screen:print(220,100,"Game Over", Color.new(255,255,255))
screen:print(210,110,"Press Cross", Color.new(255,255,255))
screen.waitVblankStart()
screen.flip()
end |
local util = require("spec.util")
describe("assignment to multiple variables", function()
it("from a function call", util.check [[
local function foo(): boolean, string
return true, "yeah!"
end
local a, b = foo()
print(b .. " right!")
]])
it("reports unsufficient rvalues as a... |
LANGUAGE = {
paper = "Paper"
}
|
object_tangible_quest_outbreak_outbreak_facility_vent = object_tangible_quest_outbreak_shared_outbreak_facility_vent:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_outbreak_outbreak_facility_vent, "object/tangible/quest/outbreak/outbreak_facility_vent.iff")
|
TOOL.Category = "Construction"
TOOL.Name = "#tool.remover.name"
TOOL.Command = nil
TOOL.ConfigName = nil
local function RemoveEntity( ent )
if ( ent:IsValid() ) then
ent:Remove()
end
end
local function DoRemoveEntity( Entity )
if ( !IsValid( Entity ) || Entity:IsPlayer() ) then return ... |
--------------------------------------------------------------------------------
-- WiFi module for 512 KB flash and nodeMCU 0.9.5
--------------------------------------------------------------------------------
local function timeout(timeout_callback)
tmr.stop(1)
wifi.sta.disconnect()
timeout_callback()
end
loc... |
describe("constructor '#iterator'", function()
local linq = require("lazylualinq")
it("calls the passed function repeatedly to retrieve items", function()
local progress = 0
local iterator = linq.iterator(function()
progress = progress + 1
return progress % 3, progress
end)
:getIterator()
asser... |
print('\n\nLoading TrollsAndElves modules...')
--[[function Dynamic_Wrap( mt, name )
if Convars:GetFloat( 'developer' ) == 1 then
local function w(...) return mt[name](...) end
return w
else
return mt[name]
end
end]]--
-- Module loading system (it reports errors)
local totalErrors = 0
lo... |
local _, ns = ...
local B, C, L, DB, P = unpack(ns)
local S = P:GetModule("Skins")
local _G = getfenv(0)
local select, pairs, type = select, pairs, type
local strfind = string.find
local function reskinChildButton(frame)
if not frame then return end
for i = 1, frame:GetNumChildren() do
local child = select(i, fr... |
RegisterServerEvent("InitInventaire:tradePlayerItem")
AddEventHandler("InitInventaire:tradePlayerItem", function(from, target, type, itemName, itemCount)
print("ezzz")
--[[local _source = from
local sourceXPlayer = ESX.GetPlayerFromId(_source)
local targetXPlayer = ESX.GetPlayerFromId(target)
if type == "item_st... |
local e = {}
e.PermissionLevel = {
Custom = -1;
Visitor = 100;
Support = 125;
Observer = 150;
TrialMod = 175;
Aux = 200;
JrMod = 225;
SrMod = 300;
Admin = 400;
}
e.Arguments = {
UsernameInGame = 0;
DisplayNameInGame = 1;
Username = 2;
UserId = 3;
Number = 4;
Text = 5;
Boolean = 6;
Any = 7;
}
e.Neces... |
local Native = require('lib.stdlib.native')
local converter = require('lib.stdlib.enum.converter')
---@class AttackType
local AttackType = {
Normal = 0, --ATTACK_TYPE_NORMAL
Melee = 1, --ATTACK_TYPE_MELEE
Pierce = 2, --ATTACK_TYPE_PIERCE
Siege = 3, --ATTACK_TYPE_SIEGE
Magic = 4, --ATTACK_TYPE_MAGIC... |
local state_machine = {}
local sm = state_machine
local EventQueue = {data = {}}
sm.EventQueue = EventQueue
function EventQueue.add(event)
EventQueue.data[#EventQueue.data + 1] = event
end
function EventQueue.pop()
return table.remove(EventQueue.data, 1)
end
function EventQueue.is_empty()
return #EventQueue.da... |
local fs = require "nvim-lsp-installer.fs"
local path = require "nvim-lsp-installer.path"
local installers = require "nvim-lsp-installer.installers"
local platform = require "nvim-lsp-installer.platform"
local npm = require "nvim-lsp-installer.installers.npm"
local process = require "nvim-lsp-installer.process"
local ... |
function event_death_complete(e)
e.self:Say("All Iksar residents.. shall learn.. of my demise. Ungghh!!");
eq.signal(87101,1); -- NPC: Atheling_Plague
end
-------------------------------------------------------------------------------------------------
-- Converted to .lua using MATLAB converter written by Stryd
-- ... |
require('networks/modules/Concatenation')
require('networks/modules/SpatialConvolution1_fw')
local network = {}
local function deepCopy(tbl)
-- creates a copy of a network with new modules and the same tensors
local copy = {}
for k, v in pairs(tbl) do
if type(v) == 'table' then
copy[k] = deepCo... |
local basic_stuff = require("lua_schema.basic_stuff");
local eh_cache = require("lua_schema.eh_cache");
local element_handler = {};
element_handler.__name__ = 'X509DataType';
local mt = { __index = element_handler; };
local _factory = {};
function _factory:new_instance_as_global_element(global_element_properties)
... |
-- 使用技能后加buff
function apply_modifier(keys)
local caster = keys.caster
local ability = keys.ability
-- 获取当前释放的技能
local event_ability = keys.event_ability
local isItem = event_ability:IsItem()
if not isItem then
local trigger_hp = ability:GetLevelSpecialValueFor("trigger_hp",
... |
settings {
logfile = "/var/log/lsyncd.log",
statusFile = "/var/log/lsyncd.status",
statusInterval = 5,
maxDelays = 1,
inotifyMode = "CloseWrite or Modify",
nodaemon = false,
maxProcesses = 1,
}
sync {
default.rsyncssh,
source = "/etc/dnsmasq-ha-web",
host = "ubuntu@10.10.11.11",
targetdir = "/etc... |
function find_nodes_in_area_cache.create_entry(mapblock)
-- print("[cache] creating entry for mapblock " .. dump(mapblock))
local entry = {
mtime = os.time(),
blocks = {}
}
-- create nodename map
for nodename in pairs(find_nodes_in_area_cache.nodenames) do
entry.blocks[nodename] = {}
end
l... |
--[[-----------------------------------------------------------------------------
EditBox Widget
-------------------------------------------------------------------------------]]
local Type, Version = "CustomEditBox", 1
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Typ... |
netstream.Hook('TTS:Boombox.Play', function(ply, track_id)
TTS.HTTP(
'/api/server/track/' .. track_id .. '/play',
{
user_id = ply:GetUserID()
},
function(data)
-- PrintTable(data)
local uri = {}
ply:SetNWString("TTS::BoomboxAuthor",
(data.info.track_author or 'No')
..... |
-------------------------------------------------------------------
--------------------------- window:dev services -----------------
-------------------------------------------------------------------
--[[
dev services window
win_devserv.show () -- Show
win_devserv.hide () -... |
local WIM = WIM;
--------------------------------------
-- Table Functions --
--------------------------------------
-- Simple shallow copy for copying defaults
function copyTable(src, dest)
if type(dest) ~= type(src) and type(src) == "table" then dest = {} end
if type(src) == "table... |
local geezify={}
function geezify.geezify_2digit(num)
local oneth_array = {'', '፩', '፪', '፫', '፬', '፭', '፮', '፯', '፰', '፱'}
local tenth_array = {'', '፲', '፳', '፴', '፵', '፶', '፷', '፸', '፹', '፺'}
local tenth_index = math.floor(num / 10)
local oneth_index = num % 10
return tenth_array[tenth_index+1] .. o... |
do
local FFmpeg = torch.class('FFmpeg')
function FFmpeg:__init(video_path, opts)
self.video_path = video_path
self.opts = opts or ''
self.valid = true
self.fd = nil
end
function FFmpeg:read(nframes)
if self.fd == nil then
-- open ffmpeg pipe
-- this subprocess will send raw RGB... |
local collect = require("nightfox.lib.collect")
local util = require("nightfox.util")
local M = { fox = "nightfox", has_options = false }
M.options = {
compile_path = util.join_paths(vim.fn.stdpath("cache"), "nightfox"),
compile_file_suffix = "_compiled",
transparent = false,
terminal_colors = true,
dim_ina... |
-- HTTP web based client - URI modifier
-- Author:: Pavan Kumar Paluri
-- Copyright @ University of Houston - RTLAB @ 2020
-- init a random value
-- maintain an array of file size requests
local file_size_req = {1000, 100000, 1000000}
-- init a random seed
math.randomseed(os.time()) -- gives a random val on each run
... |
rvreasons = {}
rvreasons[1] = tr("1a) Offensive Name")
rvreasons[2] = tr("1b) Invalid Name Format")
rvreasons[3] = tr("1c) Unsuitable Name")
rvreasons[4] = tr("1d) Name Inciting Rule Violation")
rvreasons[5] = tr("2a) Offensive Statement")
rvreasons[6] = tr("2b) Spamming")
rvreasons[7] = tr("2c) Illegal Advertising")
r... |
-- Copyright (C) 2019 Miku AuahDark
--
-- 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,... |
local function compare(first_value, compare_method, second_value)
if compare_method == "=" then
return first_value == second_value
elseif compare_method == "<=" then
return first_value <= second_value
elseif compare_method == "<" then
return first_value < second_value
elseif compare_method == ">=" t... |
-- sample_wu.lua
batch = 172
subtype = "xyz"
require("app.lua")
param1="x"
param2="y"
prepare_something()
run_app()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.