content stringlengths 5 1.05M |
|---|
b.pathfinder.register("b:builtin", {
metatable = {
init = function(self)
self.path = minetest.find_path(self.from, self.to, self.def.search_distance, self.def.jump_height, self.def.drop_height)
self.i = 1
return not not self.path
end,
next = function(self)
self.i = self.i + 1
return self.path[self... |
log("5dim_automatization") |
-- Copyright 2018-2019, Firaxis Games
include("InstanceManager");
include("PopupDialog")
include("GameCapabilities");
include("GreatWorksSupport");
include("ModalScreen_PlayerYieldsHelper"); -- CUI
include("cui_settings"); -- CUI
-- ===========================================================================
-- CONST... |
--[[----------------------------------------------------------------------------
Classic Guild Frame
Restoring the old GuildUI for BfA
(c) 2018 -
Sanex @ EU-Arathor / ahak @ Curseforge
/run GuildFrame_Toggle()
/run ToggleCommunitiesFrame()
/run ToggleGuildFinder()
----------------------------------... |
--------------------------------------------------------------------------------
-- pk-rocks-manifest.lua: PK rocks manifest
-- This file is a part of lua-nucleo library
-- Copyright (c) lua-nucleo authors (see file `COPYRIGHT` for the license)
---------------------------------------------------------------------------... |
require 'factories.camera'
require 'lib.eal.manager'
local async = require 'lib.async'
describe("test camera eal #ogre", function()
local ninja = data:createEntity({
id = 'ninja',
render = {
resources = {
Ninja = {
"Zip;bundles/models/v1/packs/ninja.zip"
}
},
root ... |
local Packages = script.Parent.Parent.Parent.Parent
local TextService = game:GetService("TextService")
local Roact = require(Packages.Roact)
local t = require(Packages.t)
local Cryo = require(Packages.Cryo)
local RoactGamepad = require(Packages.RoactGamepad)
local UIBloxConfig = require(Packages.UIBlox.UIBloxConfig)
... |
-- vim.cmd [[packadd telescope-fzy-native.nvim]]
local map = require "settings.utils".map
local finders = require "telescope.builtin"
local actions = require "telescope.actions"
local telescope = require "telescope"
local sorters = require "telescope.sorters"
local previewers = require "telescope.previewers"
local tran... |
Predicter = {};
function Predicter.predictAge(...)
sum = 0
for _,age in ipairs({...}) do
sum = sum + age*age
end
return math.sqrt(sum)//2
end |
-- Optimize FS
-- doFile( file{lc,lua} )
local doFile = function(f)
-- check file present
if file.open(f..'.lua') then
file.close()
dofile(f..'.lua')
elseif file.open(f..'.lc') then
file.close()
dofile(f..'.lc')
else
print('file:'..f..' not present')
end
end
return doFile |
return {
source = {
location = 'git@bitbucket.org:bazurbat/hi-utils.git'
},
build = {
type = 'cmake'
},
requires = {
'cmake-modules',
'glib',
'hi-sdk',
},
uses = 'hi-sdk'
}
|
---@diagnostic disable:unused-local
local str1 = strtrim(" hello world ")
local str2 = format("%s %d", "greedisgood", 999)
local num1 = bit.bor(0x1, 0x2)
hooksecurefunc("test", function() end)
-- api
C_AccountInfo.GetIDFromBattleNetAccountGUID()
C_CVar.GetCVar("autoClearAFK")
-- widgets
local f = CreateFrame("Frame")... |
--ZFUNC-func1a-v1
local function func1a()
return "a"
end
return func1a
|
local dns = require('dns');
local fse = require('fs-extra');
local function printUsage()
print('Usage:')
print('\t\t dns help - print this message')
print('\t\t dns register [name] - try to register with the current hostname if name arg is not provided')
print('\t\t dns unregister - try to unregister')
print... |
-- DEPRECATED: This story is provided for backwards compatibility with horsecat and will be removed.
-- Please only make changes to `src\Stories\Private\App\Container\FreeFlowCarousel.story.lua`
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local StoryView = require(ReplicatedStorage.Packages.StoryCo... |
object_tangible_loot_generic_usable_shared_bacta_ampules_generic = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/loot/generic_usable/shared_bacta_ampules_generic.iff"
}
ObjectTemplates:addClientTemplate(object_tangible_loot_generic_usable_shared_bacta_ampules_generic, "object/tangible/l... |
require "lib.classes.class"
local LinearMoveAnimation = require("Battle.view.animations.animations.LinearMoveAnimation")
--------------------------------------------------------------------------------------------------------
-- class: LinearReturnMoveAnimation
-- param: end_x:num -> The end x position of the entity a... |
return {'gtje','gtjes'} |
local table = require("__flib__.table")
--- An easy-to-use dictionary system for storing localised string translations.
local flib_dictionary = {}
local inner_separator = "⤬"
local separator = "⤬⤬⤬"
local max_depth = settings.global["flib-dictionary-levels-per-batch"].value
local translation_timeout = 180
-- Dependi... |
local enabled = themeConfig:get_data().global.SongBGEnabled
local brightness = 0.3
local t = Def.ActorFrame {}
-- bg
if enabled then
t[#t + 1] = Def.Sprite {
Name = "BGSprite",
InitCommand = function(self)
self:diffusealpha(0)
end,
CurrentSongChangedMessageCommand = function(self)
self:stoptweening():s... |
--[[Author: Aysegul Dundar (adundar@purdue.edu)
-- This file converts Linear layers in the network to ConvolutionMM
-- so in the demo, you can step in the image.
-- Please update the input size based on your network.
-- ]]
require 'nnx'
if not arg[1] then print "Network unspecified (type it after the program's name... |
-----------------------------------
-- Area: Mhaura
-- NPC: Tya Padolih
-- Standard Merchant NPC
-- !pos -48 -4 30 249
-----------------------------------
local ID = require("scripts/zones/Mhaura/IDs")
require("scripts/globals/shop")
function onTrade(player,npc,trade)
end
function onTrigger(player,npc)
local sto... |
if not nil then else error() end
if not false then else error() end
if not {} then error() end
if not 0 then error() end
if not '' then error() end
|
module 'mock'
--------------------------------------------------------------------
CLASS: ScenePortal ( Component )
:MODEL{
Field 'name' :string();
Field 'comment' :string();
-- '----';
-- Field 'locateConnectedPortal' :action() :label( 'goto connected portal');
}
mock.registerComponent( 'ScenePortal', Scen... |
function SpawnPoints()
return {
constructionworker = {
{ worldX = 15 + 34, worldY = (-7) + 46, posX = 278, posY = 40, posZ = 0 },
{ worldX = 15 + 38, worldY = (-7) + 52, posX = 47, posY = 127, posZ = 0 }
},
fireofficer = {
{ worldX = 15 + 34, worldY = (-7) + 46, posX = 278, posY = 40, posZ = 0 },
... |
modifier_sona_crescendo_perseverance = class({})
--------------------------------------------------------------------------------
-- Classifications
function modifier_sona_crescendo_perseverance:IsHidden()
return false
end
function modifier_sona_crescendo_perseverance:IsDebuff()
return false
end
function modifier_... |
for c = 1, 40 do
for b = 1, c-1 do
for a = 1, b-1 do
if a * a + b * b == c * c then
print(string.format("%d, %d, %d", a, b, c))
end
end
end
end
|
--useful for validating if an object is an instance of a class,
--even when the class is a super class.
--e.g pattern = "^torch[.]%a*Tensor$"
--typepattern(torch.Tensor(4), pattern) and
--typepattern(torch.DoubleTensor(5), pattern) are both true.
--typepattern(3, pattern)
function torch.typepattern(obj, pattern)
lo... |
object_building_general_ord_filler_a = object_building_general_shared_ord_filler_a:new {
}
ObjectTemplates:addTemplate(object_building_general_ord_filler_a, "object/building/general/ord_filler_a.iff")
|
#! /usr/local/bin/lua
--
-- @(!--#) @(#) hs100110.lua, version 003, 31-may-2018
--
-- TP-Link HS100 Smart WiFi Plug controller (Lua version)
--
-- Send encoded JSON requests via TCP/IP to turn a
-- TP-Link HS100 and HS110 Smart WiFi plug on and off
--
-- Product details:
--
-- http://uk.tp-link.com/products/... |
local usbWatcher = nil
function usbDeviceCallback(data)
print ( data["productName"] )
if (data["productName"] == "USB Keyboard") then
if (data["eventType"] == "added") then
hs.execute('/bin/sh /Users/ttiurani/.config/karabiner/swap-active-profile.sh')
elseif (data["eventType"] == "re... |
module(...,package.seeall)
require "lvsym"
require "sys"
scr2 = nil
local function close_win(btn, event)
if event == lvgl.EVENT_RELEASED then
win = lvgl.win_get_from_btn(btn)
lvgl.obj_del(win)
lvgl.disp_load_scr(scr2)
end
end
function create()
scr = lvgl.cont_create(nil, nil)
scr2 =... |
include( 'prop_tools.lua' )
local function DupeBarrel(Player)
SendHint(Player,"Cannot duplicate barrels", NOTIFY_ERROR, 5)
end
duplicator.RegisterEntityClass( "harbor_oil-small", DupeBarrel )
duplicator.RegisterEntityClass( "harbor_oil-large", DupeBarrel )
--[[----------------------------... |
AddCSLuaFile()
SWEP.Base = "weapon_gwbase"
SWEP.Name = "Ragdoll"
SWEP.AbilityDuration = 8
SWEP.AbilityDescription ="Pretty much what the name suggests.\nTransforms you into a ragdoll for $AbilityDuration seconds."
function SWEP:Ability()
if CLIENT then return end
local ply = self:GetOwner()
self:Ability... |
module ("L_DataUser", package.seeall)
local LICENSE = [[
Copyright 2016 AK Booer
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
... |
--- @type StdUi
local StdUi = LibStub and LibStub('StdUi', true);
if not StdUi then
return
end
local module, version = 'Autocomplete', 3;
if not StdUi:UpgradeNeeded(module, version) then return end;
local TableInsert = tinsert;
StdUi.Util.autocompleteTransformer = function(_, value)
return value;
end
StdUi.Util.a... |
-- 存储游戏中会用到的常量
const = {}
const.TILESIZE = 32
const.Direction = {S=0, WS=1, W=2, NW=3, N=4, NE=5, E=6, ES=7}
local d = const.Direction
const.DiagDirection = {WS=1, NW=3, NE=5, ES=7}
-- 八方向转四方向
const.FullToDiagDir = { [d.S]=7, [d.WS]=1,
[d.W]=1, [d.NW]=3,
[d.N]=3, [d.NE]=5,
[d.E]=5, [d.ES]=7}
-- ... |
-- ===== ===== ===== ===== =====
-- Copyright (c) 2017 Lukas Grünwald
-- License MIT License
-- ===== ===== ===== ===== =====
--- {library} This library contains all usable object types in the game.
-- The way it is set up, it supports multiple affiliations for one single object type by adding factions to the Fa... |
local utilities = require "scripts/common/utilities"
local aispawntrigger = {
Properties = {
AISpawnGroup = { default = "", description = "The spawn group to be triggered when the player enters the trigger." },
Switch =
{
On = { default = "", description = "The event name when switched on." },
Off = { def... |
local M = {}
function M.init()
vim.cmd([[
Guifont! MeiryoKe_Gothic:h14
GuiTabline 0
GuiPopupmenu 0
]])
vim.fn.GuiWindowMaximized(1)
vim.keymap.set("n", "<Space>R", function()
vim.fn.jobstart("nvim-qt.exe", { detach = true })
vim.cmd([[quitall]])
end)
return nil
end
return M
|
--[[
Math functions
Author: Ragnarok.Lorand
]]
local lor_math = {}
lor_math._author = 'Ragnarok.Lorand'
lor_math._version = '2016.06.28'
require('lor/lor_utils')
_libs.req('maths')
_libs.lor.math = lor_math
--[[
Rounds a float to the given number of decimal places.
Note: math.round is only for round... |
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0216-widget-support.md
--
-- Description: Check app is activated into FULL level in case if user taps on a soft button
-- in the widget ... |
data.raw.recipe["sniper-rifle-magazine"].ingredients =
{
{"steel-plate", 5},
{"copper-plate", 20},
{"iron-plate", 5}
}
data.raw.recipe["basic-launched-grenade"].ingredients =
{
{"iron-plate", 5},
{"explosives", 4}
}
data.raw.recipe["he-launched-grenade"].ingredients ... |
--[[
NAME_PLATE_UNIT_ADDED
1. For players:
Player-[server ID]-[player UID]
(Example: "Player-970-0002FD64")
2. For creatures, pets, objects, and vehicles:
[Unit type]-0-[server ID]-[instance ID]-[zone UID]-[ID]-[spawn UID]
(Example: "Creature-0-970-0-11-31146-000136DF91")
Unit Type Names: "Creatu... |
local HttpEnv = require "arken.net.HttpEnv"
local HttpRequest = require "arken.net.HttpRequest"
local test = {}
test.should_return_table_from_params_by_get = function()
local env = {}
env.requestMethod = function()
return "GET"
end
env.queryString = function()
return "val1=123&val2=strval"
end
... |
local addon, L = ...
local aboutConfig = CreateFrame("FRAME", "MountsJournalConfigAbout", InterfaceOptionsFramePanelContainer)
aboutConfig:Hide()
aboutConfig.name = L["About"]
aboutConfig.parent = addon
aboutConfig:SetScript("OnShow", function(self)
self:SetScript("OnShow", function(self)
self.model:PlayAnimKit(13... |
function convert._from_human_to_time(str)
return atom.time:load(str)
end
|
include("shared.lua")
ENT.RenderGroup = RENDERGROUP_TRANSLUCENT
surface.CreateFont("font_news", {
font = "Arial",
size = 48,
weight = 600
})
surface.CreateFont("font_rules", {
font = "Arial",
size = 54,
weight = 600
})
local newsTexture = surface.GetTextureID("skeyler/graphics/info_news")
local ru... |
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
ui_page "nui/index.html"
client_scripts {
"@vrp/lib/utils.lua",
"client.lua"
}
server_scripts {
"@vrp/lib/utils.lua",
"server.lua"
}
files {
"nui/css.css",
"nui/jquery.js",
"nui/index.html",
"nui/inicio.html",
"nui/vestuari... |
local function view_quote(str)
return ("\"" .. str:gsub("\"", "\\\"") .. "\"")
end
local short_control_char_escapes = {["\11"] = "\\v", ["\12"] = "\\f", ["\13"] = "\\r", ["\7"] = "\\a", ["\8"] = "\\b", ["\9"] = "\\t", ["\n"] = "\\n"}
local long_control_char_escapes = nil
do
local long = {}
for i = 0, 31 do
lo... |
{
[ "Railcraft:machine.alpha" ] = "nope",
[ "ProjRed|Exploration:projectred.exploration.ore" ] = "ProjRed|Core:projectred.core.part",
[ "minecraft:iron_ore" ] = "minecraft:iron_ore",
[ "chisel:limestone" ] = "chisel:limestone",
[ "DraconicEvolution:draconiumOre" ] = "DraconicEvolution:draconiumDust",
[ "min... |
net.Receive("OCRP_Loot", function()
OpenLootingMenu(net.ReadTable())
end)
net.Receive("OCRP_UpdateLootingTable", function()
PopulateLootingInventory(net.ReadTable())
end)
OCRP_LOOTINGMENU = nil
function OpenLootingMenu(items)
local nick = LocalPlayer():GetEyeTrace().Entity:IsPlayer() and LocalPlayer():G... |
--[[
local accessory = {
Name = "",
Attachment = "BodyBackAttachment",
Position = {X = 0, Y = 0, Z = 0},
Rotation = {X = 0, Y = 0, Z = 0},
Colors = {
color1 = {R = 0, G = 0, B = 0},
color2 = {R = 0, G = 0, B = 0},
color3 = {R = 0, G = 0, B = 0},
}
}
--]]
-- << Services ... |
local sql = require "sqlite3"
local db = sql.open("../src/test.db")
function drawer(name, ...)
end
|
--***********************************************************
--** THE INDIE STONE **
--***********************************************************
require "ISUI/ISPanel"
local FONT_HGT_SMALL = getTextManager():getFontHeight(UIFont.Small)
local SBAR_WID = 17
---@class ISSectione... |
local CUPON = FindMetaTable("MPCupons") or {}
CUPON.__index = CUPON
gpay.CUPONS = {}
local default = {
cupon = "null",
type = "currency",
data = 0, -- Data on use :D
maxuses = 0,
used = {}, -- steamids :D
callback = function(args) gpay.Msg("Used a null CUPON!")... |
--local normalW, normalH = 480, 320
--local w, h = display.pixelWidth, display.pixelHeight
--local scale = math.max(normalW / w, normalH / h)
--w, h = w * scale, h * scale
--application = {
--content = {
--width = w,
--height = h,
--scale = 'letterbox',
--fps = 60,
--imageS... |
local skynet = require "skynet"
local log = {}
function log.log(format, ...)
skynet.error(string.format(format, ...))
end
return log |
local gpu = require("component").gpu
local bit32 = require("bit32")
local depth = tonumber((...)) or 8
if gpu.getDepth() ~= depth then
local old = gpu.getDepth()
gpu.setDepth(depth)
depth = old
end
-- rgb
local reds = {0,0x33,0x66,0x99,0xCC,0xFF}
local greens = {0,0x24,0x49,0x6D,0x92,0xB6,0xDB,0xFF}
local blues... |
GUI_ELEMENT_PREFIX = "region-cloner_"
--[[Ghosts will break script as it exists currently. Copying the player is annoying and only serves to clutter the map.]]
ENTITIES_TO_NOT_CLONE = {"player", "entity-ghost", "tile-ghost"}
TICKS_PER_PASTE = 2
--[[These types have defines.inventory.chest return their fuel slot, whi... |
---
--- Created by Ray1184.
--- DateTime: 04/10/2020 17:04
---
--- Wrapper for cached context.
---
local cats = require('data/scripts/libs/Categories')
local utils = require('data/scripts/libs/Utils')
context = {}
function context:new()
local ctx = { dummy = false }
utils.debug('Creating context with categori... |
-- See LICENSE for terms
local DoneObject = DoneObject
local OnMsg = OnMsg
local RemoveAttachAboveHeightLimit = ChoGGi.ComFuncs.RemoveAttachAboveHeightLimit
-- we don't add shortcuts and ain't supposed to drink no booze
OnMsg.ShortcutsReloaded = ChoGGi.ComFuncs.Rebuildshortcuts
-- so we have shortcuts when LUA reloa... |
number1 = math.random(99)
ind = math.random(7) - 1
if (ind == 6) then
number2 = 0
else
number2 = 10^ind
end
result = number1 * number2
|
--
-- from src/fib.c
--
-- int fib1(int) to fib1
-- int fib2(int) to fib2
-- a part of main to fib3
-- fib3 to fib4
--
local floor, pow, sqrt = math.floor, math.pow, math.sqrt
local function fib1(n)
return floor(pow((1 + sqrt(5)) / 2, n) / sqrt(5) + 0.5)
end
local function fib2(n)
local a, b, c, x, y = 1, 1, ... |
function model.setCuboidMassAndInertia(h,sizeX,sizeY,sizeZ,mass,inertiaFact)
local inertiaFact=1
local transf=sim.getObjectMatrix(h,-1)
local inertia={(sizeY*sizeY+sizeZ*sizeZ)*mass*inertiaFact/12,0,0,0,(sizeX*sizeX+sizeZ*sizeZ)*mass*inertiaFact/12,0,0,0,(sizeY*sizeY+sizeX*sizeX)*mass*inertiaFact/12}
si... |
numb1 = math.random(10);
numb2 = math.random(10);
numb3 = math.random(10);
if (numb1 * numb2 * numb3 == 10^3) then
numb3 = math.random(9)
end
array_name[1] = hundreds[numb1];
array_name[2] = tens[numb2];
array_name[3] = ones[numb3];
if (numb1 == 10) then
term1 = 0
else
term1 = numb1*1... |
ENT.DrrBaseType = "base"
ENT.RenderInCam = true
ENT.WaitNPCS = 0
ENT.NextAction = 0
ENT.EnginePower = 0
ENT.FlyConstant = 2.2524 -- 2.26 2.34 2.25 2.2524
ENT.BlockKeys = false
ENT.MoveCoefficient = 1
ENT.DRONES_REWRITE_DELTA = 0
ENT.DRRFriendsControlling = nil
ENT.CamAngles = Angle(0, 0, 0)
ENT.HackValue = 1
ENT.U... |
------------------------------------------------------------------------------------------------------------------------
-- Proposal:
-- https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0192-button_subscription_response_from_hmi.md
------------------------------------------------------------------... |
--- GENERATED CODE - DO NOT MODIFY
-- Amazon SageMaker Runtime (runtime.sagemaker-2017-05-13)
local M = {}
M.metadata = {
api_version = "2017-05-13",
json_version = "1.1",
protocol = "rest-json",
checksum_format = "",
endpoint_prefix = "runtime.sagemaker",
service_abbreviation = "",
service_full_name = "Amazon... |
local AttackProperties = Component.create("AttackProperties")
function AttackProperties:initialize(spawnDistance)
self.spawnDistance = spawnDistance
end
|
local tty = require("tty")
local computer = require("computer")
local process = require("process")
local event = require("event")
local core_cursor = require("core/cursor")
local kb = require("keyboard")
local keys = kb.keys
local term = setmetatable({internal={}}, {__index=tty})
local function as_window(window, fun... |
-- Configuration
function love.conf(t)
t.title = "SnowmanSniper" -- The title of the window the game is in (string)
t.version = "11.2" -- The LÖVE version this game was made for (string)
t.window.width = 800 -- we want our game to be long and thin.
t.window.height = 800
end
|
PageInfo = {}
function PageInfo:getobjects_count()
local s = ctk.string.list:new()
s.text = tab.reslist
local c = s.count
s:release()
return c
end
function PageInfo:getobjects(tag)
local list = ''
local line = ''
local src = ''
local urlext = ''
local comburl = ''
local filename = ''
local html = ctk.stri... |
require('utility')
grid = require('grid')
players = require('player')
arena = require('arena')
mainMenu = require('mainMenu')
options = require('options')
optionsMenu = require('optionsMenu')
state = require('state')
message = require('message')
function love.load()
love.window.setTitle("NORT")
love.window.set... |
local IInput = require("api.gui.IInput")
local UiMouseManager = require("mod.mouse_ui.api.gui.UiMouseManager")
local InputHandler = require("api.gui.InputHandler")
local UiMouseStyle = require("mod.mouse_ui.api.UiMouseStyle")
local IUiMouseElement = require("mod.mouse_ui.api.gui.IUiMouseElement")
local UiTheme = requir... |
local ffi = require 'ffi'
local ParseBack = require 'parseback'
----------------- utils -------------
local show do
local function q(s)
return type(s)=='string' and ('%q'):format(s) or s
end
local function qk(s)
if type(s) == 'string' and s:match('^[_%a][_%w]*$') then
return s
end
return ('[%s]'):format... |
includeFile("tangible/loot/mustafar/must_painting_01.lua")
includeFile("tangible/loot/mustafar/must_painting_04.lua")
includeFile("tangible/loot/mustafar/must_painting_03.lua")
includeFile("tangible/loot/mustafar/must_painting_02.lua")
|
--[[
Description: Shared command declaration. Should not be used for commands with sensitive/not public server-side code.
Author: Sceleratis
Date: 12/25/2021
--]]
local Root, Utilities, Service, Package;
local Settings = setmetatable({}, {
__index = function(self, ind)
return { __ROOT_PROXY = true, Path = "Se... |
return function(text)
local letters={}
local count =0
for char in text:lower():gmatch('%a') do
if not letters[char] then
count = count +1
letters[char] = true
end
end
return count == 26
end |
-- ARGV[1] = idpKey, ARGV[2] = states
-- 处理参数
local KEY_PREFIX = 'idp-'
local newKJson = ARGV[1]
local statesJson = ARGV[2]
local expire_seconds = ARGV[3]
local newK = cjson.decode(newKJson)
local states = cjson.decode(statesJson)
local res = {}
-- 不存在的情况
local oldKJson = redis.call("get", KEY_PREFIX .. newK.id)
if (f... |
local ui_functions = Tremualin.UIFunctions
-- A button that turns a residence into a seniors only residence
-- Useful for those that don't have the new DLC
function OnMsg.ClassesPostprocess()
local template = XTemplates.sectionResidence
ui_functions.RemoveXTemplateSections(template, "Tremualin_SeniorsAllowed")... |
local editor = require('distant.editor')
local fn = require('distant.fn')
local match = require('luassert.match')
local stub = require('luassert.stub')
local v = require('distant.vars')
describe('editor.write', function()
it('should do nothing if the buffer does not have a remote path', function()
stub(v.buf,... |
---@class dsl
---@field transition fun(origin: string): StateTransitionBuilder
---@field policy TransitionPolicyFactory
---@field effect TransitionEffectBuilderFactory
local dsl = {} |
-- ----------------------------------------------------------------------------
--
-- TickTimer
--
-- counts the time elapsed between a start time and time now
-- the accurancy of this timer object relies on the frequency
-- its methods are called
-- -------------------------------------------------------------... |
--[[
LuCI - Lua Development Framework
Copyright 2009 Steven Barth <steven@midlink.org>
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
$Id$
]]
local ni... |
slot0 = class("MusicCollectionView", import("..base.BaseSubView"))
slot0.getUIName = function (slot0)
return "MusicCollectionUI"
end
slot0.OnInit = function (slot0)
slot0:initData()
slot0:findUI()
slot0:addListener()
slot0:initPlateListPanel()
slot0:initSongListPanel()
slot0:Show()
slot0:recoverRunData()
slo... |
local plugins_configurations_schema = require "kong.dao.schemas.plugins_configurations"
local query_builder = require "kong.dao.cassandra.query_builder"
local constants = require "kong.constants"
local BaseDao = require "kong.dao.cassandra.base_dao"
local cjson = require "cjson"
local PluginsConfigurations = BaseDao:e... |
-- exitd.lua
-- Created by wugd
-- 结束进程
-- 声明模块名
EXIT_D = {}
setmetatable(EXIT_D, {__index = _G})
local _ENV = EXIT_D
local shutdown_status = false
-- 定义公共接口
function exit()
--TODO 保存数据库,关闭程序
end
--关闭服务器
function shutdown()
stop_server()
-- CONNECT_D.closeConnectingInfo()
--通知其它服务器关闭
set_shutd... |
local mysql = require "mysql"
local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"
description = [[
Dumps the password hashes from an MySQL server in a format suitable for
cracking by tools such as John the Ripper. Appropriate DB privileges (root) are required.
The <code>... |
LinkLuaModifier("modifier_intimidator_be_my_friend_lua", "heroes/intimidator/intimidator_modifiers_lua.lua", LUA_MODIFIER_MOTION_NONE)
intimidator_be_my_friend_lua = class({})
function intimidator_be_my_friend_lua:GetBehavior()
self.hSpecial = Entities:First()
while self.hSpecial and (self.hSpecial:GetName() ~= ... |
local jackmovementdirectionprovider =
{
Properties =
{
Camera = {default = EntityId()},
WalkSpeedMutiplier = { default = 0.25, description = "Multiplier for speed while walking.", },
Events =
{
ControlsEnabled = { default = "EnableControlsEvent", description =... |
local Erase = class("Editor.Erase")
function Erase:initialize(editor)
self.editor = editor
self.level = self.editor.level
end
function Erase:draw()
local mouseX, mouseY = getWorldMouse()
local coordX, coordY = self.level:cameraToCoordinate(mouseX, mouseY)
local worldX, worldY = self.level:coordin... |
local FileReader = torch.class("FileReader")
function FileReader:__init(filename)
self.file = assert(io.open(filename, "r"))
end
--[[ Read next line in the file and split it on spaces. If EOF is reached, returns nil. ]]
function FileReader:next()
local line = self.file:read()
if line == nil then
return nil... |
-- tools_mtg/init.lua
-- Aliases to support loading worlds using nodes following the old naming convention
-- These can also be helpful when using chat commands, for example /giveme
minetest.register_alias("WPick", "base_tools:wood_pick")
minetest.register_alias("STPick", "base_tools:stone_pick")
minetest.register_ali... |
-- @author Sachin Mehta
--- ----
-- Module to parse command line arguments
-- @module opts
local opts = {}
--- --------------------------------------------------
-- A function to parse the command line arguments
-- @function [parent=#opts] parse
-- @param #string arg command line arguments
-- --------------------... |
Sprite = {
Animations = {
{
Name = "Normal",
Texture = "@Graphics/GoalFx.png",
FrameCount = { X = 10, Y = 2 },
StartIndex = 1,
EndIndex = 20,
FrameTime = 20,
Loop = false,
},
},
DefaultAnimation = "Normal",
} |
local log = require "kong.plugins.tcplog.log"
local BasePlugin = require "kong.plugins.base_plugin"
local basic_serializer = require "kong.plugins.log_serializers.basic"
local TcpLogHandler = BasePlugin:extend()
function TcpLogHandler:new()
TcpLogHandler.super.new(self, "tcplog")
end
function TcpLogHandler:log(con... |
function love.draw()
love.graphics.print('Hello world', 400, 300)
end
|
-- Replaced QuadTree with Spacialhash, after benchmarks, it shows to have better performances
local spatialhash = instance(Spatialhash, 1000)
-- Rate check for collisions, instead of checking on each frame, this will avoid overusage because collisions check is heavy as f***. (even with optimizations)
local TIMER_CHECK... |
SkadaPerCharDB = {
["sets"] = {
{
["healingabsorbed"] = 0,
["dispells"] = 0,
["ccbreaks"] = 0,
["time"] = 77,
["interrupts"] = 0,
["mobdone"] = 442799,
["mobtaken"] = 1832942,
["damage"] = 1832942,
["players"] = {
{
["last"] = 1423948502,
["healingabsorbed"] =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.