content stringlengths 5 1.05M |
|---|
return {
mod_key = 'Mod4',
alt_key = 'Mod1'
}
|
local name, addon = ...;
--[[
Many azerite traits augment healing done from existing spellIDs, and the amount added by the azerite traits does NOT scale with intellect.
This code is to estimate the percentage of a heal which was added by azerite, using knowledge of the spell coeffecients & calculated azerite coeffeci... |
require "ataraxis.autocommands"
local options = require "ataraxis.options"
local add_pads = require "ataraxis.add_pads"
local M = {}
function M.setup(user_options)
options.set(user_options)
add_pads()
end
return M
|
if not modules then modules = { } end modules ['publ-dat'] = {
version = 1.001,
comment = "this module part of publication support",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
}
-- todo: s... |
--
-- vs2010.lua
-- Add support for the Visual Studio 2010 project formats.
-- Copyright (c) Jason Perkins and the Premake project
--
local p = premake
p.vstudio.vs2010 = {}
local vs2010 = p.vstudio.vs2010
local vstudio = p.vstudio
local project = p.project
local tree = p.tree
---
-- Map Premake tokens to the... |
-- ## Global Configuration ##
UMMConfig = nil;
UMMSettings = {
Save = function(self)
SaveVariables("UMMConfig");
end;
Set = function(self, entry, value)
if (UMMConfig == nil) then
self:Init();
end
UMMConfig.Settings[entry] = value;
self:Save();
end;
Get = function(self,... |
MARKET_TIMER = {
TIMER_ADDR = 0x7E2513,
TIMER = 0,
TIMER_GOAL = 0xc4e0,
TIMER_OVERFLOW = 0x3b1f,
FRAME_COUNTER_ADDR = 0x7E0B19,
FRAME_COUNTER = 0,
FPS = 60.098475521,
OVERRIDE_FLAG_ADDR = 0x7E225D,
OVERRIDE_FLAG_OFFSET = 0x08,
OVERRIDE_FLAG = false
} |
local log = require('tarantool-lsp.log')
local function ltrim(s)
return (s:gsub("^%s*", ""))
end
local function rtrim(s)
local n = #s
while n > 0 and s:find("^%s", n) do n = n - 1 end
return s:sub(1, n)
end
local completionKinds = {
Text = 1,
Method = 2,
Function = 3,
Constructor = 4,
Fie... |
local mysql = require "db.zs_sql"
local cjson = require "cjson"
local lua_db_help = require "db.lua_db_help"
local db_help = lua_db_help.new()
local _M = {}
_M._VERSION = '0.01'
local mt = { __index = _M }
function _M.new()
return setmetatable({}, mt)
end
-- 将一个字符串通过空格分割成t... |
local WatchDog = {}
local Delegate = require 'Utils.Delegate'
function WatchDog.WatchTable(tbl)
local proxy = {
__value = tbl,
onValueChanged = Delegate(),
}
return setmetatable(proxy, {
__index = function(t, name)
return t.__value[name]
end,
__newindex = function(t, name, newValue)
local old = t.... |
--[[
Miscellaneous functions to help with handling colors
]]
return {
hexToRGBA = function(hexcode)
hexcode = hexcode:gsub("#","") -- remove pound symbol, if present
-- extract values in a format love2d can use
local r = tonumber(hexcode:sub(1,2),16) / 255
local g = tonumber(hexcode:sub(3,4),16) / 255
local... |
LIGHT_PIN = 2
gpio.mode(LIGHT_PIN, gpio.OUTPUT)
function Light_on()
gpio.write(LIGHT_PIN, gpio.HIGH)
end
function Light_off()
gpio.write(LIGHT_PIN, gpio.LOW)
end |
local mod = DBM:NewMod(675, "DBM-Party-MoP", 4, 303)
local L = mod:GetLocalizedStrings()
local sndWOP = mod:SoundMM("SoundWOP")
mod:SetRevision(("$Revision: 9469 $"):sub(12, -3))
mod:SetCreatureID(56589)
mod:SetZone()
mod:RegisterCombat("combat")
mod:RegisterEventsInCombat(
"SPELL_AURA_APPLIED",
"SPE... |
local http = require "datanet.http";
-- TEST USE-CASE SETTINGS
local CollectionName = "testdata";
local Key = "unit_test";
-- TEST DEFAULT SETTINGS
local Channel = "0";
local Username = "default";
local Password = "password";
-- ERROR USE-CASE SETTINGS
local MissingKey = "abcdefghi... |
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel( "models/props_combine/combine_intmonitor003.mdl" )
self:PhysicsInit( SOLID_VPHYSICS ) -- Make us work with physics,
self:SetMoveType( MOVETYPE_VPHYSICS ) -- after all, gmod is a physics
sel... |
include( "shared.lua" )
language.Add("weapon_rpw_binoculars_scout", "Scouting Binoculars")
surface.CreateFont( "rangefinderscout", {
font = "Arial",
extended = false,
size = 32,
weight = 600,
blursize = 2,
scanlines = 0,
antialias = true,
underline = false,
italic = false,
strikeout = false,
... |
return {'rhone','rhona','rhonda','rhonas','rhondas','rhoonse'} |
--- 控制某个变量随时间变化的协程类
--- @module TweenController
--- @copyright Lilith Games, Avatar Team
--- @author An Dai
local TweenController = class('TweenController')
---_name:类名,_sender:使用它的类,_getTotalTime:获得总时间的方法,_update _callback:回调函数 _isFix:是否在fixupdate中执行, _start: 开始函数
function TweenController:initialize(_name, _sender, _... |
local cjson = require "cjson"
local helpers = require "spec.helpers"
local function get_available_port()
local socket = require("socket")
local server = assert(socket.bind("*", 0))
local _, port = server:getsockname()
server:close()
return port
end
local test_port1 = get_available_port()
local test_port2... |
#!/usr/bin/env tarantool
local build_path = os.getenv("BUILDDIR")
package.cpath = build_path..'/test/sql-tap/?.so;'..build_path..'/test/sql-tap/?.dylib;'..package.cpath
local test = require("sqltester")
test:plan(2)
box.schema.func.create("gh-5938-wrong-string-length.ret_str", {
language = "C",
param_list = {... |
omniknight_guardian_angel_lua = class({})
LinkLuaModifier( "modifier_omniknight_guardian_angel_lua", "lua_abilities/omniknight_guardian_angel_lua/modifier_omniknight_guardian_angel_lua", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
-- Ability Start
functio... |
local G = torch.class('Check')
function G.gradCheck(module, criterion, input, label, delta)
delta = delta or 1e-6
local grad_param, grad_input = G.analyticalGrad(module, criterion, input, label)
print('\n-- Module --')
G.printModule(module, input, 1, '')
print('\n-- Params --')
G.printParams(m... |
-- Key Codes --
KEY_SPACE = 32
KEY_APOSTROPHE = 39
KEY_COMMA = 44
KEY_MINUS = 45
KEY_PERIOD = 46
KEY_SLASH = 47
KEY_0 = 48
KEY_1 = 49
KEY_2 = 50
KEY_3 = 51
KEY_4 ... |
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
vim.keymap.set('n', '<leader>de', '<cmd>lua vim.diagnostic.open_float()<CR>')
vim.keymap.set('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>')
vim.keymap.set('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>')
vim.keymap.set('n', '<le... |
-- visp operatives and AST manipulation functions.
--
-- operatives are first-class combiners whose operands
-- are never evaluated.
-- applicatives are operatives that evaluate the operands.
--
-- Defines oper, wrapoper and defoper.
-- Lambda could be defined as:
-- (def-oper "lambda"
-- (oper (args body)
--... |
local pie = require "lua-pie"
local class = pie.class
local static = pie.static
local public = pie.public
local private = pie.private
local operators = pie.operators
local extends = pie.extends
local interface = pie.interface
local abstract_function = pie.abstract_function
local implements = pie.implements
interface "... |
client = client or {}
function client.init(conf)
client.tcp_gate = conf.tcp_gate
client.websocket_gate = conf.websocket_gate
client.kcp_gate = conf.kcp_gate
client.session = 0
client.sessions = {}
-- 连线对象
client.linkobjs = ccontainer.new()
end
function client.onconnect(linktype,linkid,addr)
local linkobj = cl... |
local quick = require("arshlib.quick")
---Text object for in/around the next object.
---@param motion any
local function next_obj(motion) --{{{
local c = vim.fn.getchar()
local ch = vim.fn.nr2char(c)
local step = "l"
if ch == ")" or ch == "]" or ch == ">" or ch == "}" then
step = "h"
end
local sequence... |
local T = {}
local function sort2(x, y, optargs)
local exp_file = 'Q/OPERATORS/F1F2_IN_PLACE/lua/expander_f1f2_in_place'
local expander = assert(require(exp_file))
local z = assert(expander("sort2", x, y, optargs))
return z
end
T.sort2 = sort2
require('Q/q_export').export('sort2', sort2)
--====================... |
--
-- MUST be included through blend2d.lua, not independently
--
-- since the BLContextCore is by far the biggest object, it makes
-- sense to have it split out on its own for easy maintenance
--
local ffi = require("ffi")
local C = ffi.C
local bit = require("bit")
local bor, band = bit.bor, bit.band
local min, max =... |
local mod = {}
local device = require "device"
local turbo = require "turbo"
local libmoon = require "libmoon"
local stats = require "stats"
local ffi = require "ffi"
local log = require "log"
local HTTPError = turbo.web.HTTPError
local deviceHandler = class("deviceHandler", turbo.web.RequestHandler)
... |
local GFX = {}
GFX.__index = GFX
return GFX |
return {
boolean = function(Value0, Value1, Alpha)
return Alpha < 0.5 and Value0 or Value1;
end,
number = function(Value0, _, Alpha)
local Delta = Value0 - Value0;
return Value0 + Delta * Alpha;
end,
CFrame = function(Value0, Value1, Alpha)
return Value0:Lerp(Value1,Alpha)... |
-- Title: QuestLevelPatch
-- Version: 1.24
-- Author: iceeagle
-- Notes: Adds level within brackets to the quest name. Example: [62] Order Must Be Restored
--------------------------------------------------------------------------------------------------------
-- QuestLevelPatch varia... |
local parser = {}
return parser
|
local pg = require('PiroGame/PiroGame');
local gs = require('GameState');
local mms = pg.class('MainMenuState', gs);
function mms.testscore(button)
button.gameState.game.currentScore = { name = 'Test level', time = 1010101, points = 1234 };
button.gameState.game:switchState('SaveScoreState');
end
function mm... |
-- Config
local storage_types = {
"minecraft:chest", "ironchest:iron_chest", "ironchest:gold_chest", "ironchest:diamond_chest", "ironchest:copper_chest",
"ironchest:silver_chest", "ironchest:obsidian_chest"
}
local io_types = {"minecraft:trapped_chest", "ironchest:crystal_chest"}
local listening_channel = 234
-... |
--[[
GetPostions: Return the postion of Mario Using in game Hex Bits
--]]
function getPositions()
--In the classic game the X bit is done using a paging bit first
--This allows you to have bigger numbers than 256
marioPage=memory.readbyte(0x6D)
marioX = memory.readbyte(0x6D) * 0x100 + memory.readbyte(0x86)
marioY ... |
object_mobile_otonon_tracks_ice_cream = object_mobile_shared_otonon_tracks_ice_cream:new {
}
ObjectTemplates:addTemplate(object_mobile_otonon_tracks_ice_cream, "object/mobile/otonon_tracks_ice_cream.iff")
|
local uv = require('uv')
local getenv = require('os').getenv
local success, luvi = pcall(require, 'luvi')
if success then
loadstring(luvi.bundle.readfile("luvit-loader.lua"), "bundle:luvit-loader.lua")()
else
dofile('luvit-loader.lua')
end
local connect = require('redis-client')
local p = require('pretty-print').p... |
musicentity = class("musicentity")
function musicentity:init(x, y, r)
self.x = x
self.y = y
self.cox = x
self.coy = y
self.visible = false
self.r = {unpack(r)}
self.single = true
self.triggered = false
table.remove(self.r, 1)
table.remove(self.r, 1)
--VISIBLE
if #self.r > 0 and self.r[1] ~= "link" then
... |
local utils = {}
utils.if_nil = function(x, was_nil, was_not_nil)
if x == nil then
return was_nil
else
return was_not_nil
end
end
utils.get_default = function(x, default)
return utils.if_nil(x, default, x)
end
utils.get_border = function(title, width, title_pos)
local top = '╭' .. string.rep('─', w... |
function SMOnlineScreen()
for pn in ivalues(GAMESTATE:GetHumanPlayers()) do
if not IsSMOnlineLoggedIn(pn) then
return "ScreenSMOnlineLogin"
end
end
return "ScreenNetRoom"
end
function SelectMusicOrCourse()
if IsNetSMOnline() then return "ScreenNetSelectMusic"
elseif GAMESTATE:IsCourseMode() then return... |
-- VECTOR 2D
function CreateVector(x, y)
return { x = x, y = y }
end
function CreateZeroVector()
return CreateVector(0, 0)
end
-- returns a new vector (a lua table w/ x and y properties)
function CloneVector(original)
return CreateVector(original.x, original.y)
end
function SetVector(v, x, y)
v.x = ... |
--[[
Copyright (c) 2015, Robert 'Bobby' Zenz
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the fo... |
function change(startX, startY, endX, endY, screen, color, name)
local tempScreen = screen
for y=startY, endY do
for x=startX, endX do
screen[name][x][y] = screen[x][y]
screen[x][y]
end
end
end
|
--------------------------------------------------------------------------------
-- Handler.......... : onSconAnalogActionContinuous
-- Author........... :
-- Description...... :
--------------------------------------------------------------------------------
------------------------------------------------------... |
-- See LICENSE for terms
-- unlock the tech at start
local function Startup()
UnlockBuilding("DefenceTower")
end
OnMsg.CityStart = Startup
OnMsg.LoadGame = Startup
--~ local next, pairs = next, pairs
--~ local IsValid = IsValid
--~ local IsValidThread = IsValidThread
--~ local CreateRealTimeThread = CreateRealTimeT... |
if mg.request_info.request_method=='SUBSCRIBE' then
--UUIDを作って投げるだけ
package.path=mg.script_name..'/../../?.lua'
mg.write('HTTP/1.1 200 OK\r\n',
'SID: uuid:'..require('uuid4').getUUID():lower()..'\r\n',
'Server: '..mg.system:gsub(' ','/')..' UPnP/1.1 EpgTimerSrv/0.10\r\n',
'Timeout: Second-1800\r... |
function C_GM13B_GUI_Panel:Fill_GM13B_SubTab_Map(GM13B_SubTab_Map)
-- Setup
local GM13B_SubTab_Map_PropertySheet = vgui.Create("DPropertySheet")
GM13B_SubTab_Map_PropertySheet:SetParent(GM13B_SubTab_Map)
GM13B_SubTab_Map_PropertySheet:Dock(FILL)
local GM13B_SubTab_Map_Top = vgui.Create("DPanel")
GM13B_SubT... |
function SetTarget( _configuration, _platform, _basepath )
--print(_configuration .. _platform)
local platformname = _platform
local archname = _platform
if _platform == "x32" then
platformname = "Win32"
archname = "x86"
end
local strtarget = string.format( "%s/bin/%s_%s/", _basepath, _configuration... |
local scandir = require "scandir"
local files, err = scandir.scandir(".")
if files == nil then
print("Failed to open dir: " .. err)
os.exit(1)
end
local keys = { }
for k,v in pairs(files) do table.insert(keys, k) end
table.sort(keys)
for _,k in pairs(keys) do
print(k)
-- print(k .. " type " .. files[k].... |
-- vim: ts=2 sw=2 sts=2 expandtab:cindent:formatoptions+=cro
--------- --------- --------- --------- --------- ---------
require "lib"
require "rows"
function dom(t,row1,row2, n,a0,a,b0,b,s1,s2)
s1,s2,n = 0,0, 0
for _ in pairs(t.w) do n=n+1 end
for c,w in pairs(t.w) do
a0 = row1[c]
b0 = row2[c]... |
Ray Tracing mode script in vGPU
><RT-mod start.cfg>
start rtcore
start rtcore_client
start coreboost
start vcore
start rtmod_script
><End of RT-mod start.cfg>
'
Toggle rtcore>
Cores: <rtcore1> <rtcore2>
Clone core "rtcore1" and "rtcore2"x100000
Run all rt cores
Basic v... |
require("lua.log")
counter = 0
function initialization_event()
counter = ports:get_double_port("starter")
log.debug(counter)
return duration.new(0)
end
function unplanned_event(elapsed_dt)
return duration.new(1)
end
function planned_event(elapsed_dt)
counter = counter + 1
log.debug(counter)
... |
local langName = {
common = {
loaded = "Lang laoded",
access = "Accéder"
},
menu = {
mainmenu = {
title = "",
tel = "Tel: ",
police = "Menu Police",
anim = "Animations",
reper = "Répertoire",
givecash = "Donner de l'argent",
givedcash = "Donner de l'argent sal... |
local Plugin = SS.Plugins:New("Title")
// When players values get set
function Plugin.PlayerSetVariables(Player)
CVAR.New(Player, "Title", "Custom Title", "")
end
// When players GUI is updated
function Plugin.PlayerUpdateGUI(Player)
Player:SetNetworkedString("Title", CVAR.Request(Player, "title"))
end
// Chat c... |
local ffi = require("ffi")
ffi.cdef[[
/*
* IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble
* and FCS/CRC (frame check sequence).
*/
static const int ETH_ALEN = 6; /* Octets in one ethernet addr */
static const int ETH_HLEN = 14; /* Total octets in header. */
static const int ETH_ZLEN = ... |
--[[--
path =
request.get_path()
Returns the path in the URL of the request. May return nil for a HTTP OPTIONS request with "*" target.
--]]--
function request.get_path()
return request._http_request.path
end
|
pExodus.ItemId.FORGET_ME_LATER = Isaac.GetItemIdByName("Forget Me Later")
local NumberFloors = 0
function pExodus.forgetMeLaterAdd()
NumberFloors = pExodus.Level:GetAbsoluteStage() + math.random(2)
end
pExodus:AddCustomCallback(pExodus.ExodusCallbacks.MC_ADD_COLLECTIBLE, pExodus.forgetMeLaterAdd, pExodus.ItemId.... |
local GameCreationCallHandler = class()
function GameCreationCallHandler:start_game_command(session, response)
stonehearth.game_creation:start_game(session)
response:resolve({})
end
return GameCreationCallHandler
|
includeFile("dungeon/corellian_corvette/serverobjects.lua")
includeFile("dungeon/death_watch_bunker/serverobjects.lua")
includeFile("dungeon/geonosian_bio_lab/serverobjects.lua")
includeFile("dungeon/warren/serverobjects.lua")
includeFile("dungeon/exar_kun/serverobjects.lua")
|
---
--- Created by Jacobs Lei.
--- DateTime: 2018/9/12 下午4:21
---
local _plastic = {}
local str_find = string.find
local str_upper = string.upper
local cjson = require("core.utils.json")
local param_type = require("core.constants.param_type")
local ngx_req = ngx.req
local quote_sql_str = ngx.quote_sql_str
local DEBUG... |
local vim, api, fn, exe = vim, vim.api, vim.fn, vim.api.nvim_command
--[[ VARIABLES ]]
-- These are constants for the indexes in the colors that were defined before.
local _NONE = 'NONE'
local _PALETTE_256 = 2
local _PALETTE_ANSI = 3
local _PALETTE_HEX = 1
local _TYPE_STRING = 'string'
local _TYPE_TABLE = 'table'
... |
object_tangible_furniture_all_frn_all_trophy_xandank = object_tangible_furniture_all_shared_frn_all_trophy_xandank:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_all_frn_all_trophy_xandank, "object/tangible/furniture/all/frn_all_trophy_xandank.iff")
|
function RPGM.Classes.TimeArgument(name, optional, default)
local tbl = RPGM.Classes.Argument(name, optional, default)
tbl.__type = "argument_time"
tbl.DisplayType = "Time"
function tbl:processString(str)
local splitStr = string.Split(str, " ")
if #splitStr < 1 then return self:getOpti... |
do
local _ = {
['automated-cleanup'] = {
icon = '__base__/graphics/achievement/automated-cleanup.png',
name = 'automated-cleanup',
icon_size = 128,
type = 'deconstruct-with-robots-achievement',
steam_stats_name = 'deconstructed-by-robots',
... |
-- rsyslog 添加配置
-- local4.* /var/log/app.log
-- $EscapeControlCharactersOnReceive off
--
local skynet = require "skynet.manager"
local syslog = require "syslog"
local date_helper = require "bw.util.date_helper"
local log = require "bw.log"
local sformat = string.format
local smatch = string.match
lo... |
local Editor = {}
function Editor.diagnostic()
return {
"folke/lsp-trouble.nvim",
wants = { "nvim-web-devicons", "nvim-lspconfig" },
config = require("modules.editor.diagnostic")(),
disable = true,
}
end
function Editor.gist()
return {
"mattn/gist-vim",
want... |
local lg = love.graphics --Localize love.graphics
local dirs = { --8 directions
{0, -1},
{1, -1},
{1, 0},
{1, 1},
{0, 1},
{-1, 1},
{-1, 0},
{-1, -1}
}
local cave = {}
cave.__index = cave
function cave:getRenderedCanvas() --Renders itself to it's canvas and returns it
lg.setCanvas(self.canvas)... |
function love.load(args)
t=0
hello = {
text='hello world',
x=0,
y=0
}
echo = {
text='can you hear me?',
x=0,
y=0
}
end
function love.update(dt)
t=t+dt
hello.x=350+200*math.cos(t)-(#hello*3)
hello.y=300+200*math.sin(t)
echo.x=350+1... |
local GTabLayer = require("graphic.popup.GTabLayer")
local ActivityTabLayer = class("ActivityTabLayer", GTabLayer)
local layerConfig =
{
--{layerName=enum.ui.layer.gm, name="gm", class="graphic.popup.console.GmLayer"},
}
function ActivityTabLayer:ctor()
GTabLayer.ctor(self)
end
function ActivityTabLayer:init()
... |
Citizen.CreateThread(function()
LoadInterior(GetInteriorAtCoords(440.84,-983.14,30.69))
for _,ipl in pairs(allIpls) do
loadInt(ipl.coords,ipl.interiorsProps)
end
end)
function loadInt(coordsTable,table)
for _,coords in pairs(coordsTable) do
local interiorID = GetInteriorAtCoords(coords[1],coords[2],coords[3])
... |
local utils = require "kong.tools.utils"
local function check_user(anonymous)
if anonymous == "" or utils.is_valid_uuid(anonymous) then
return true
end
return false, "the anonymous user must be empty or a valid uuid"
end
return {
no_consumer = true,
fields = {
anonymous = {type = "string", defaul... |
SetGameType('5M Cops and Robbers')
Citizen.CreateThread(function()
while not CNR do Wait(1) end
CNR.SQL = {
-- Execute and Forget
-- Executes 'cb' (callback) function on result with result as argument
-- Script doesn't wait for a response/result
EXECUTE = function(query,tbl,cb)
if n... |
imgui.Begin("title1")
imgui.Text("aalsdfjias")
imgui.End()
print("1111111111111") |
--# selene: allow(unused_variable)
---@diagnostic disable: unused-local
-- Inspect/manipulate display brightness
--
-- Home: https://github.com/asmagill/mjolnir_asm.sys
--
-- This module is based primarily on code from the previous incarnation of Mjolnir by [Steven Degutis](https://github.com/sdegutis/).
---@class hs.... |
Locales['fr'] = {
['invoices'] = 'Factures',
['received_invoice'] = '~r~Vous avez reçu une facture.',
['paid_invoice'] = 'Vous avez ~r~payé~w~ une facture.',
['received_payment'] = 'Votre société a ~g~reçu~w~ un paiement.',
['player_not_logged'] = '~r~Le joueur n\'est pas connecté !',
['no_money'] = '~r~Vous n... |
local _, NeP = ...
local T = NeP.Interface.toggleToggle
local L = {
mastertoggle = function(state) T(self,'MasterToggle', state) end,
aoe = function(state) T(self,'AoE', state) end,
cooldowns = function(state) T(self,'Cooldowns', state) end,
interrupts = function(state) T(self,'Interrupts', s... |
local Character = require 'common.class' ()
function Character:_init(spec)
self.spec = spec
self.hp = spec.max_hp
end
function Character:get_name()
return self.spec.name
end
function Character:get_appearance()
return self.spec.appearance
end
function Character:get_hp()
return self.hp, self.spec.max_hp
en... |
function model.getAvailableConveyors()
local l=sim.getObjectsInTree(sim.handle_scene,sim.handle_all,0)
local retL={}
for i=1,#l,1 do
local data=sim.readCustomDataBlock(l[i],simBWF.modelTags.CONVEYOR)
if data then
retL[#retL+1]={simBWF.getObjectAltName(l[i]),l[i]}
end
... |
-- Bootstrap & run lua web application. This module
-- sets several global variables and initializes other
-- commonly used modules (eg. database).
local Database = require("library.database");
local Application = {};
APPLICATION_PATH = "";
APPLICATION_DB = "";
-- Bootstrap application. Init global variables and env... |
--[[
Copyright 2015 Rackspace
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 agreed to in writing, software
dis... |
local hex = {
[0]='0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
}
local function escapec1(chr)
local code = string.byte(chr)
local hi, lo = math.floor(code / 16), code % 16
return '""\\x'..hex[hi]..hex[lo]..'""'
end
local function escapec(str)
return string.gsub(str, "[\x00-\x1f\... |
--[[
Game Dev 2020
Game name: Whaff (from "whiff-whaff")
Author : Marc Freir
E-mail : marcfreir@outlook.com
Version : 0.1
Created with Lua and Löve2D in August 19, 2020
>>Based on Pong by Colton Ogden (cogden@cs50.harvard.edu)<<
]]
local push = {
defalts = {
fullscreen = ... |
local common = require "upcache.common"
local console = common.console
local module = {}
local varyHeader = "Vary"
local function build_key(key, headers, list)
local resVal
local reqVal
for reqName, map in pairs(list) do
reqVal = headers[reqName]
if reqVal ~= nil then
resVal = map[reqVal]
if resVal ~= n... |
require 'cutorch';
require 'cunn';
require 'cudnn'
require 'image'
require 'model'
dofile('util.lua')
-- example usage: th test.lua --gpu_index 0 --model model.net --test_data scenes_test.txt
local basePath = 'data/keypointmatch'
opt_string = [[
-h,--help print hel... |
Widget = {}
function Widget.create(properties)
if type(properties) ~= "table" then
properties = {}
end
local widget = {}
widget.x = exports.dpUtils:defaultValue(properties.x, 0)
widget.y = exports.dpUtils:defaultValue(properties.y, 0)
widget.width = exports.dpUtils:defaultValue(properties.width, 0)
widget.he... |
---
---Utility class with helpful string functions.
---@class StringUtil:AeroServer
---
local StringUtil = {}
-- Constants
--- Value used in string <---> byte conversion
local MAX_TUPLE = 7997
---
---Formats a number with commas and dots. (e.g. 1234567 -> 1,234,567)
---
---@param n number
---@return string
---
funct... |
script_name('Mordor Police Helper')
script_description('Удобный помощник для МЮ.')
script_author('Shepi, Just-Mini')
script_version_number(46)
script_version('3.0.5')
script_dependencies('mimgui; samp events; lfs; MoonMonet')
local latestUpdate = '22.01.2022'
require 'moonloader'
local dlstatus = requ... |
--[[----------------------------------------------------------------------------
Application Name: TCPIPServer
Description:
Creating TCP/IP Server.
Script creates a TCPIPServer and wait for connections on port 2120. If new connections
arrive, they are accepted and a greeting message is sent to them. The da... |
if settings.startup["guft-misc-fragile-burners"] then
data.raw["mining-drill"]["burner-mining-drill"].minable.result = nil
data.raw["mining-drill"]["burner-mining-drill"].minable.results = data.raw["recipe"]["burner-mining-drill"].normal and data.raw["recipe"]["burner-mining-drill"].normal.ingredients or data.raw["re... |
---- ale config
-- only used for linting on save
vim.g.ale_fixers = {
javascript = 'eslint',
typescript = 'eslint',
rust = 'rustfmt',
go = 'gofmt',
lua = 'stylua',
}
vim.g.ale_fix_on_save = 1
vim.g.ale_lint_on_enter = 0
vim.g.ale_lint_on_insert_leave = 0
vim.g.ale_lint_on_filetype_changed = 0
vim.g.ale_lint_o... |
return {'luo','luong'} |
local exports = exports or {}
local function publicFunc()
end
exports.publicFunc = publicFunc
return exports
|
local CollectMe = LibStub("AceAddon-3.0"):GetAddon("CollectMe")
local Export = CollectMe:NewModule("Export")
local CompanionDB = CollectMe:GetModule("CompanionDB")
local MountDB = CollectMe:GetModule("MountDB")
local ZoneDB = CollectMe:GetModule("ZoneDB")
local db
local function extractZones(source)
loca... |
-------------------------------------------------------------------------------
-- Mob Framework Mod by Sapier
--
-- You may copy, use, modify or do nearly anything except removing this
-- copyright notice.
-- And of course you are NOT allow to pretend you have written it.
--
--! @file template.lua
--! @brief templat... |
local isLocating = false
local WAYPOINTLOC = { }
local DistToPoint = 0
local TRACKELEMENT = nil
function createWaypointLoc ( x, y, z )
TRACKELEMENT = nil
local px, py, pz = getElementPosition ( localPlayer )
local dist = getDistanceBetweenPoints2D ( px, py, x, y )
if ( dist <= 20 ) then
return exports.VDBGMessag... |
local http = require "http"
local json = require "json"
local shortport = require "shortport"
local stdnse = require "stdnse"
local table = require "table"
description = [[
Enumerates Drupal users by exploiting an information disclosure vulnerability
in Views, Drupal's most popular module.
Requests to admin/views/aja... |
#!/usr/bin/env tarantool
box.cfg{slab_alloc_arena = 0.1}
r = require('redis')
local function pp(self)
self.s:write('+TEST\r\n')
end
redis = r.new('127.0.0.1', 6379)
:command('ping', pp)
:start()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.