content stringlengths 5 1.05M |
|---|
--! LibreMap Babeld Plugin
--! Copyright (C) 2018 Gioacchino Mazzurco <gio@altermundi.net>
--!
--! This program is free software: you can redistribute it and/or modify
--! it under the terms of the GNU Affero General Public License as
--! published by the Free Software Foundation, either version 3 of the
--! License, ... |
local argcheck = require('argcheck')
local Distribution = torch.class('pdist.Distribution', require('pdist.env'))
Distribution.n_vars = argcheck{
{name = 'self', type = 'pdist.Distribution'},
call = function(self)
error('not implemented')
end
}
Distribution.n_params = argcheck{
{name = 'self', type = 'pd... |
local _M={}
_M.login_success="login success"
_M.login_error="account or password error"
_M.login_md5_error="md5 expect"
_M.login_type_error="logintype is not support"
_M.login_no_type_error="logintype is nil"
_M.login_no_token_error="token is nil"
_M.login_token_outtime_error="token is out of date,please login again"
_... |
---@class ViewWindowFGUI : ViewWindow
---@field private window FairyGUI.Window
---@field view_root FairyGUI.GComponent
ViewWindowFGUI = happ.declare_class("ViewWindowFGUI", ViewWindow)
function ViewWindowFGUI:ctor()
self.window = nil
end
---@overload
function ViewWindowFGUI:__InnerShowImpl()
self.window:Show(... |
local config = {
[1] = Position(32566, 31505, 9),
[2] = Position(32611, 31513, 9)
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local targetPosition = config[player:getStorageValue(Storage.hiddenCityOfBeregar.RoyalRescue)]
if not targetPosition then
player:sendTextMessage(MESSAGE_EVE... |
require "config"
AS.item_list = {}
AS.multiplier = (settings.global["basic-kit-substations"].value and 1 or 0) * AS.multiplier
AS.chests = settings.global["basic-kit-logistic-chests"].value and 1 or 0
-- parse settings values using config file fields
for key, options in pairs(AS.config) do
if settings.global[key] ~... |
-- Module to display, search and alert twitch.tv streams
-- vim: set noexpandtab:
local util = require'util'
local simplehttp = util.simplehttp
local json = util.json
local moduleName = 'twitch'
local key = moduleName
local store = ivar2.persist
local formatViewers = function (viewers)
if viewers > 1000 then
return... |
meshes = {{
vertexes = {{0,-750}, {0,750}, {1500,750}, {1500,-750}},
segments = {{0,1,2,3,0}},
colors = {0xce3aadff, 0x5afd72ff, 0x360ca4ff, 0xafd2b0ff}
}} |
local Iterator = require(script.Parent.Parent.Iterator)
local StepBy = setmetatable({}, Iterator)
StepBy.__index = StepBy
StepBy.__call = Iterator.__call
function StepBy.new(iterator, step)
return setmetatable({
iterator = iterator,
step = step - 1,
first = true,
}, StepBy)
end
function StepBy:... |
local module = {}
local ads = require("ads1115")
local function led(data)
if data > 1.25 then
return "1"
else
return "0"
end
end
local function state(data)
if data == 0 then
return "Off"
elseif data < 3 then
return "Tick"
elseif data < 7 then
return "Flashing"
else
return "On"
... |
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local UF = E:GetModule('UnitFrames');
--Lua functions
--WoW API / Variables
function UF:Construct_PvPClassificationIndicator(frame)
local PvPClassificationIndicator = frame.RaisedElementParent.TextureParent:Cre... |
require("prototypes.categories.module-category")
require("prototypes.item.module")
require("prototypes.recipe.module")
require("prototypes.technology.module-technology")
|
-- ======= Copyright (c) 2003-2011, Unknown Worlds Entertainment, Inc. All rights reserved. =====
--
-- lua\DetectableMixin.lua
--
-- Created by: Charlie Cleveland (charlie@unknownworlds.com)
--
-- ========= For more information, visit us at http://www.unknownworlds.com =====================
DetectableMixin = Cre... |
AddCSLuaFile()
local VehicleName = "[Photon] Pierce Quantum Pumper"
local EMV = {}
---CUSTOM COLORS---
local B = "BLUE"
local R = "RED"
local A = "AMBER"
local W = "WHITE"
local G = "GREEN"
local DR = "D_RED"
local CW = "C_WHITE"
local SW = "S_WHITE"
--------------------
local PA = "A"
local PB = "B"
local PCA = ... |
return {
include = function()
includedirs { "../vendor/nng/include/" }
end,
run = function()
targetname "nng"
language "C"
kind "SharedLib"
defines { "NNG_HAVE_PULL0", "NNG_HAVE_PUSH0", "NNG_HAVE_REQ0", "NNG_HAVE_REP0", "NNG_TRANSPORT_INPROC", "NNG_TRANSPORT_IPC", "NNG_SHARED_LIB", "NNG_LITTLE_ENDIAN"... |
quotes = {"Strong words resonate.",
"What you listen in heart, are echoes of the past. What you write today, will be echoed in the future.",
"For last year's words belong to last year's language And next year's words await another voice.",
"Words are pale shadows of forgotten names. As names have power, words have ... |
--落魂
--Otoshidamashii
--Scripted by Kohana Sonogami
function c101104031.initial_effect(c)
c:EnableCounterPermit(0x59,LOCATION_MZONE)
--cannot be target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LO... |
-------------------------------------------------------------------
--------------------------- window:APPs -------------------------
-------------------------------------------------------------------
--[[
Apps window
win_apps.show () -- Show
win_apps.hide () -- Hide
wi... |
-----------------------------------------------------------------------------------------
--
-- main.lua
--
-----------------------------------------------------------------------------------------
local widget = require('widget')
local colyseus = require('colyseus')
-- create UI for sending / viewing messages
local i... |
object_tangible_quest_legacy_tracks_cuan_datapad = object_tangible_quest_shared_legacy_tracks_cuan_datapad:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_legacy_tracks_cuan_datapad, "object/tangible/quest/legacy_tracks_cuan_datapad.iff")
|
--=========================================================================
--
-- Copyright NumFOCUS
--
-- 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.or... |
if custom_spawner == nil then
custom_spawner = class({})
end
-- This function checks for number of players/heroes in the game and setting the difficulty accordingly
function custom_spawner:DifficultyCheck()
local hero_flags = bit.bor(DOTA_UNIT_TARGET_FLAG_DEAD, DOTA_UNIT_TARGET_FLAG_NOT_ILLUSIONS, DOTA_UNIT_TARGET_F... |
--
-- User: hybridtupel
-- Date: 16.05.16
-- Time: 18:35
--
function concatenate(a1, a2)
local result = {}
for i, v in ipairs(a1) do
result[i] = v
end
for _, v in ipairs(a2) do
result[#result + 1] = v
end
return result
end
_G.__newindex = function(table, key, value)
setmeta... |
local Prop = {}
Prop.Name = "Shop A"
Prop.Cat = "Store"
Prop.Price = 4000
Prop.Doors = {
Vector( 6412, 3964, 190 ),
Vector( 6294, 3964, 190 ),
}
GM.Property:Register( Prop )
local Prop = {}
Prop.Name = "Strip Mall Shop A"
Prop.Cat = "Store"
Prop.Price = 4000
Prop.Doors = {
Vector( 4996, -2708, 190 ),
Vector( 4996... |
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)... |
tools = require('lib/tools')
require('lib/group')
require('lib/buildTree')
require('lib/commands')
s = {}
script.on_init(function(event)
s = tools.createLabSurface()
my_group = {}
end)
script.on_event(defines.events.on_tick, function(event)
if game.tick == (1 * 60) then tools.makeSpawn() end
if (game.t... |
-- by Qige <qigezhao@gmail.com>
-- 2017.06.30 encode|decode|length
-- 2017.07.03 dl_seq|dl_devid|seq_max
local tbl_push = table.insert
local tbl_flat = table.concat
local sfmt = string.format
local schar = string.char
local slen = string.len
local sbyte = string.byte
local ssub = string.sub
local sfind = string.find
... |
local PANEL = {}
AccessorFunc(PANEL, "Font", "Font", FORCE_STRING)
AccessorFunc(PANEL, "Speed", "Speed", FORCE_NUMBER)
AccessorFunc(PANEL, "Text", "Text", FORCE_STRING)
AccessorFunc(PANEL, "TextColor", "TextColor")
AccessorFunc(PANEL, "TextSeperator", "TextSeperator", FORCE_STRING)
function PANEL:Init()
self:SetFont... |
-- Options for the Neovim completion menu
-- - menu: use a popup menu if thre is more than one match
-- - menuone: also use the popup menu when there is only one match
-- - noselect: force the user to select a match themselves
-- - noinsert: do not insert any text until the user makes a selection
vim.g.completeopt = "m... |
local Command = {commands=framework:getFiles(module.dir.."/../commands/")}
local prefixes = settings.prefixes
function Command:checkPermission(message,command)
local member = message.member
local author = message.author
local guild = message.guild
local channel = message.channel
--if author.id == "260157417445130... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:26' 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... |
--[[
Copyright 2021 Todd Austin
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,... |
--File contains functions for initializing and working with ncurses
local ncurs = require("sluacurses")
COLORS = {
BLACK = 1,
WHITE = 2,
GREEN = 3,
YELLOW = 4,
CYAN = 5,
RED = 6,
MAGENTA = 7,
BLUE = 8
}
function initColors()
start_color()
init_color(COLOR_YELLOW,700... |
local _, Constants = unpack(select(2, ...))
-- luacheck: push ignore 113
local WOW_PROJECT_CLASSIC = WOW_PROJECT_CLASSIC
local WOW_PROJECT_ID = WOW_PROJECT_ID
-- luacheck: pop
-- Constants
Constants.DOCK_HEIGHT = 20
Constants.TEXT_XPADDING = 15
Constants.ENV = "retail"
if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then
... |
return function()
local CorePackages = game:GetService("CorePackages")
local Roact = require(CorePackages.Roact)
local RoactRodux = require(CorePackages.RoactRodux)
local Store = require(CorePackages.Rodux).Store
local ServerProfilerInterface = require(script.Parent.ServerProfilerInterface)
it("should create a... |
require("keymappings")
require("plugins")
require("settings")
require("treesitter")
require("nvimtree")
require("compe-config")
require("lsp")
require("telescope-config")
require("lspkind-settings")
require('nvim-autopairs').setup()
require'nvim-treesitter.configs'.setup {
autotag = {
enable = true,
}
}
vim.... |
pg = pg or {}
pg.enemy_data_statistics_146 = {
[10092500] = {
cannon = 0,
antiaircraft_growth = 0,
rarity = 6,
speed_growth = 0,
pilot_ai_template_id = 70044,
air = 120,
luck = 0,
dodge = 16,
id = 10092500,
cannon_growth = 0,
speed = 18,
reload_growth = 0,
dodge_growth = 242,
reload = 150,
... |
-- Copyright (C) Miracle
-- Copyright (C) OpenWAF
local _M = {
_VERSION = "0.0.1"
}
local cjson = require "cjson.safe"
local twaf_func = require "lib.twaf.inc.twaf_func"
local twaf_conf = require "lib.twaf.twaf_conf"
local prefix = "/api/"
local arr_index = "arr_tonumber"
local show ... |
local assets = {}
function assets.clear()
print(colr.cyan("ℹ️ clearing assets"))
sprites = {}
palettes = {}
sound_path = {}
music_path = {}
tiles_list = {}
tiles_by_old_name = {}
text_list = {}
text_in_tiles = {}
wobble_text_list = {}
wobble_text_in_tiles = {}
group_names = {}
group_names_n... |
--[[
Copyright (C) 2013-2018 Draios Inc dba Sysdig.
This file is part of sysdig.
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 ... |
local mapa = {
ambient="0.1,0.1,0.1",
gravity="0 -9.8 0",
entities={
{
name="Camera",
id=2,
components={
transform={
position="0,0,200",
rotation="0,0,0",
scale="1,1,1",
parent="-1"
},
camera={
near="0.1",
fa... |
love.conf = function(t)
t.title = "HEAT SHIELD"
t.version = "11.0"
t.window.width = 1366
t.window.height = 768
t.window.resizable = false
--t.console = true
t.window.vsync = false
end |
SWEP.DoubleUseKeyTime = 0
SWEP.DoubleUseKeyPresses = 0
SWEP.SubCustomizationCycleTime = nil
SWEP.AntiAttachmentSwitchSpam = 0
SWEP.InteractionMenuInteractWait = 0
SWEP.SubCustomizationTriggerTime = 0.25
local wep, CT
function SWEP.PlayerBindPress(ply, b, p)
if p then
wep = ply:GetActiveWeapon()
if IsValid(wep) ... |
--silver forest
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
local m,cm=Senya.SayuriSpellPreload(37564901)
function cm.initial_effect(c)
Senya.SayuriSelfReturnCommonEffect(c,m)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetT... |
local CT = ControllerTweaks
local Loot = CT_Plugin:Subclass()
local offsetSettingKey = "LootPanelOffset"
Loot.options = {
{
settingKey = offsetSettingKey,
type = "slider",
name = "Loot Panel Offset",
tooltip = "Vertical offset of the recent loot panel.",
min = -400,
... |
for line in io.lines(arg[1]) do
local l = select(2, line:gsub("[a-z]", "."))
local u = select(2, line:gsub("[A-Z]", "."))
if l+u > 0 then
print(string.format("lowercase: %.2f uppercase: %.2f", 100*l/(l+u), 100*u/(l+u)))
else
print("lowercase: 0.00 uppercase: 0.00")
end
end
|
--region JoopProjectLoader.lua
--Author : jefflwq
--Date : 2016/02/28
--说明 : 加载Joop和其他工程
--endregion
------------------------------------------------------------------------------------------------------------------
--加载JAddonLoader
--local loader = JoopProject:NewProject("JAddonLoader")
--local ret = loa... |
----------------------------------------
-- Constant Definitions ----------------
----------------------------------------
--
-- This file contains various constants.
--
----------------------------------------
--
-- table C
--
----------------------------------------
----------------------------------------
------... |
--
-- Copyright (C) 2022 Masatoshi Fukunaga
--
-- 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, ... |
sum_of_squares = 0
sum = 0
for i = 1, 100, 1 do
sum_of_squares = sum_of_squares + (i * i)
sum = sum + i
end
square_of_sum = sum * sum
print(square_of_sum -sum_of_squares)
|
require("rrpgUtil.lua");
require("rrpgGUI.lua");
local serpent = nil;
local lfmObjectsStrongRef = {};
function lfm_getObject(ctrlOrHandle)
if ctrlOrHandle == nil then
return nil;
elseif isNumber(ctrlOrHandle) then
return lfmObjectsStrongRef[ctrlOrHandle];
else
return ctrlOrHandle;
end;
end;
function lfm_... |
-- Oxypanel Core/Admin
-- File: get/users.lua
-- Desc: add/edit/list users
local template, database, request, user, users = oxy.template, luawa.database, luawa.request, luawa.user, oxy.users
--groups
local groups = database:select('user_groups', '*')
template:set('groups', groups)
--add user?
if request.get.action =... |
-- Name: utils
-- Description: Bunch of useful utility functions that can be used in any scenario script.
--[[ These functions should be as generic as possible, so they are highly usable. --]]
-- Given enough information, find the distance between two positions.
-- This function can be called four ways:
--
-- distanc... |
-- commands.lua by Bonyoze
bsuCommands = bsuCommands or {}
function BSU:RegisterCommand(data)
if not data.category then
data.category = "miscellaneous"
end
local category = data.category
data.category = nil -- we no longer need this value
if not bsuCommands[category] then bsuCommands[category] = {}... |
package("DirectXTK")
set_homepage("https://github.com/microsoft/DirectXTK")
set_description("This package contains the \"DirectX Tool Kit\", a collection of helper classes for writing Direct3D 11 C++ code for Universal Windows Platform (UWP) apps for Windows 10, Xbox One, and Win32 desktop applications for Win... |
require("tests/testsuite")
local r = Cmd.LoadDocumentSet("testdocs/README-v0.6.wg")
AssertEquals(true, r)
|
SF.Materials = {}
-- Register privileges
do
local P = SF.Permissions
P.registerPrivilege("material.load", "Load material", "Allows users to load a vmt material.", { client = {} })
P.registerPrivilege("material.create", "Create material", "Allows users to create a new custom material.", { client = {} })
P.registerP... |
local self = {}
GLib.Net.SingleEndpointChannelToChannelAdapter = GLib.MakeConstructor (self, GLib.Net.IChannel)
function self:ctor (singleEndpointChannel)
self.Channel = singleEndpointChannel
self.Channel:SetHandler (
function (sourceId, inBuffer)
self:GetHandler () (sourceId, inBuffer)
end
)
end
-- Packe... |
print("LabJack Lua Task Scheduler Example. Version 1.0")
-- Requires Firmware 1.0199 or higher (for T7)
-- This script demonstrates a simple task scheduler used to execute multiple tasks
-- at regular intervals to 1ms resolution.
-- Note: Increase scheduler resolution to reduce CPU load on the T7 processor.
-- Directi... |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf/protobuf"
local BAGTYPE_PB = require("BagType_pb")
module('BagExpandData_pb')
BAGEXPANDDATA = protobuf.Descriptor();
local BAGEXPANDDATA_TYPE_FIELD = protobuf.FieldDescriptor();
local BAGEXPANDDATA_NUM_FIELD = protobuf.FieldDescriptor();
lo... |
Keybind.g(
{
-- show the git status window
{ 'n', '<leader>gs', '<cmd>:Git<cr>' },
-- commit the staged changed
{ 'n', '<leader>gc', '<cmd>Git commit<cr>' },
-- in the git diff window, stage the changes of current file's change block
{ 'n', '<leader>gp', '<cmd>diffp... |
Citizen.CreateThread(function()
while true do
Wait(0)
Citizen.InvokeNative(0xC54A08C85AE4D410, 0.5)
end
end)
--0xB96B00E976BE977F |
local RunService = game:GetService("RunService")
if RunService:IsClient() then
script.server:Destroy()
return require(script.client)
else
return require(script.server)
end
|
-- * Metronome IM *
--
-- This file is part of the Metronome XMPP server and is released under the
-- ISC License, please see the LICENSE file in this source package for more
-- information about copyright and licensing.
--
-- As per the sublicensing clause, this file is also MIT/X11 Licensed.
-- ** Copyright (c) 2010-... |
---upvalues to prevent warnings
local UnitName, UnitHealth, UnitReaction = UnitName, UnitHealth, UnitReaction
local UnitClassification, UnitLevel = UnitClassification, UnitLevel
---include files
local ZxSimpleUI = LibStub("AceAddon-3.0"):GetAddon("ZxSimpleUI")
local Locale = LibStub("AceLocale-3.0"):GetLocale(ZxSimple... |
-- Framework logging library
-- by zorg @ 2015 license: ISC
--[[Code Flow:
require -> this
--]]
--[[Notes:
- Basic functions are to log a string into a file
- More advanced is the fact that one can choose to selectively log
- Even moreso is that one can set what identity the logger will use to find the path it'l... |
local URL = "https://raw.githubusercontent.com/njs50/tfe-mapper/master/tfe-mapper.xml"
local function d(_, f)
if not f:find("tfe-mapper", 1, true) then return end
installPackage(f)
os.remove(f)
cecho("<lime_green>Package installed!\n")
end
registerAnonymousEventHandler("sysDownloadDone", d, true)
downloadFil... |
local mod = DBM:NewMod("Drogan", "DBM-GarrisonInvasions")
local L = mod:GetLocalizedStrings()
mod:SetRevision(("$Revision: 13884 $"):sub(12, -3))
mod:SetCreatureID(90841)
mod:SetZone()
mod:RegisterCombat("combat")
mod:SetMinCombatTime(15)
mod:RegisterEventsInCombat(
"SPELL_CAST_START 180882",
"SPELL_A... |
function find_inventory(luacontrol)
local supported_inventories = {
defines.inventory.car_trunk -- look for this prior to chest. chest seems the fuel inventory for cars
,defines.inventory.chest
,defines.inventory.character_main
,defines.inventory.cargo_wagon
,defines.inventory.s... |
-- Export multiple function when the package start..
function OnPackageStart()
AddFunctionExport("AddObject", AddObject)
AddFunctionExport("RemoveObject", RemoveObject)
AddFunctionExport("AddVehicle", AddVehicle)
AddFunctionExport("RemoveVehicle", RemoveVehicle)
AddFunctionExport("AddPlayerToObjectR... |
local util = require("tests.test_util")
describe("treesitter dart", function()
it("parses all symbols correctly", function()
util.test_file_symbols("treesitter", "./tests/treesitter/dart_test.dart", {
{
kind = "Class",
name = "Class_1",
level = 0,
lnum = 1,
col = 0,
... |
return require('lib.stdlib.oop._generated._fogmodifier')
|
local recipes =
{
"raw-wood-charcoal",
"wood-charcoal",
"raw-wood-charcoal-adv",
"raw-wood-gasification"
}
for _, recipe in ipairs(recipes) do
table.insert(data.raw["module"]["productivity-module"].limitation, recipe)
table.insert(data.raw["module"]["productivity-module-2"].limitation, recipe)
... |
return {
CHANNEL = "/channels/%s",
CHANNEL_INVITES = "/channels/%s/invites",
CHANNEL_MESSAGE = "/channels/%s/messages/%s",
CHANNEL_MESSAGES = "/channels/%s/messages",
CHANNEL_MESSAGES_BULK_DELETE = "/channels/%s/messages/bulk-delete",
CHANNEL_MESSAGE... |
local asin = math.asin;
local atan2 = math.atan2;
local rad = math.rad;
local sin = math.sin;
local abs = math.abs;
local ceil = math.ceil;
local pi = math.pi;
local swing=1;
local hitdeb=false;
local deb=false;
local player = game.Players.LocalPlayer;
local pchar = player.Character;
local mouse = player:Ge... |
--[[ Filter off-screen shapes, by The0x539
Remove off-screen shapes within a drawing.
Assumes \pos(0,0)\fsc100\frz0 etc, as well as 1920x1080 content.
]]
local bb = {x0 = -10, y0 = -10, x1 = 1930, y1 = 1090}
local function f(contour)
local x0, y0 = math.huge, math.huge
local x1, y1 = -x0, -y0
for x, y ... |
-- Zelda 2 Random Script That Displays Miscellaneous Useless Crap (tm) by 4matsy
-- 2008, September 11th.
require("shapedefs");
local function box(x1,y1,x2,y2,color)
if (x1 > 0 and x1 < 255 and x2 > 0 and x2 < 255 and y1 > 0 and y1 < 241 and y2 > 0 and y2 < 241) then
gui.drawbox(x1,y1,x2,y2,color);
end;
end;
loc... |
function init(v)
energy.init()
if storage.active == nil then storage.active = false end
setActive(storage.active)
self.workSound = entity.configParameter("workSound")
self.moveSpeed = entity.configParameter("moveSpeed")
self.st = 0
onNodeConnectionChange(nil)
end
function die()
energy.die()
end
functi... |
debug_mode = hs.hotkey.modal.new()
local keys_watcher = nil
function debug_mode:entered()
modal_box("DEBUG", color.purple)
keys_watcher:start()
end
function debug_mode:exited()
keys_watcher:stop()
end
local event_types = {
hs.eventtap.event.types.keyUp,
hs.eventtap.event.types.flagsChanged
}
... |
local Digester = Class(function(self, inst)
self.inst = inst
self.digesttime = 20
self.itemstodigestfn = nil
self.task = self.inst:DoPeriodicTask(self.digesttime, function() self:TryDigest() end)
self.inst:ListenForEvent("gotnewitem", function()
if not self.task then
self.task = self.inst:DoPeriodicTask(se... |
Icon_Speed = "data:ui/newui/research/icons/speed.tga"
Icon_Health = "data:ui/newui/research/icons/health.tga"
Icon_Tech = "data:ui/newui/research/icons/tech.tga"
Icon_Ability = "data:ui/newui/research/icons/ability.tga"
Icon_Build = "data:ui/newui/research/icons/build.tga"
Icon_Attack = "data:ui/newui/research/ico... |
local configs = require 'lspconfig/configs'
local util = require 'lspconfig/util'
local server_name = "sorbet"
local bin_name = "srb"
configs[server_name] = {
default_config = {
cmd = {bin_name, "tc", "--lsp"};
filetypes = {"ruby"};
root_dir = util.root_pattern("Gemfile", ".git");
};
docs = {
de... |
local PlayerControlSystem = libs.tiny.processingSystem(libs.class{})
PlayerControlSystem.filter = libs.tiny.requireAll("controlable")
PlayerControlSystem.canInteracte = true
local function movementInput(entity, dt)
local input = libs.vector(Input:get("move"))
if entity.isHorizontalMove then
input.y... |
-- Modified version of nest.nvim (https://github.com/LionC/nest.nvim)
local fmt = string.format
local M = {}
M.defaults = {
mode = "n",
prefix = "",
buffer = false,
opts = {
noremap = true,
silent = true,
},
}
local store = {}
M._callFn = function(index)
store[index]()
end
M._execExpr = functio... |
require "console/utils"
local console = {}
function console.print(str, type)
local traceback = ((debug.traceback(""):gsub("stack traceback:","")):split("\n")[2])
local from_file = ("%s:%s"):format(
(((traceback:split(":")[1]):gsub("\9","")):gsub(".lua","")),
(((traceback:split(":")[2])))
)... |
local CL_LIMIT, CL_LIMIT_OVERRIDE, CL_NO_CLENGTH
if CLIENT then
CL_LIMIT = CreateConVar("pac_webcontent_limit", "-1", {FCVAR_ARCHIVE}, "webcontent limit, -1 = unlimited, 1024 = 1mb")
CL_NO_CLENGTH = CreateConVar("pac_webcontent_allow_no_content_length", "0", {FCVAR_ARCHIVE}, "allow downloads with no content length"... |
local PLUGIN_NAME = "sa-jwt-claims-validate"
-- helper function to validate data against a schema
local validate do
local validate_entity = require("spec.helpers").validate_plugin_config_schema
local plugin_schema = require("kong.plugins."..PLUGIN_NAME..".schema")
function validate(data)
return validate_en... |
minetest.register_on_joinplayer(function(player)
local skyTexBase = "spacestation_sky_"
player:set_sky("#000000", "skybox", {
skyTexBase .. "top.png",
skyTexBase .. "bottom.png",
skyTexBase .. "west.png",
skyTexBase .. "east.png",
skyTex... |
return require('sendtoimvision')
|
slot0 = class("CatteryFlowerView")
slot0.Ctor = function (slot0, slot1)
slot0._go = slot1
slot0._tf = slot1.transform
slot0.default = slot0._tf:Find("1")
slot0.levels = {
slot0._tf:Find("2"),
slot0._tf:Find("3"),
slot0._tf:Find("4"),
slot0._tf:Find("5")
}
end
slot0.Update = function (slot0, slot1)
slot2... |
-----------------------------------
-- Those Who Lurk in Shadows (III)
-- Qu'Bia Arena mission battlefield
-----------------------------------
local ID = require("scripts/zones/QuBia_Arena/IDs")
require("scripts/globals/battlefield")
require("scripts/globals/keyitems")
require("scripts/globals/missions")
--------------... |
-- Gemeinschaft 5 fire and forget http request script
-- (c) AMOOMA GmbH 2013
--
http = require('socket.http');
http.TIMEOUT = 10;
http.USERAGENT = 'Gemeinschaft 5';
local log_identifier = argv[1];
local url = argv[2];
local user = argv[3];
local password = argv[4];
if not log_identifier or not url then
return;
e... |
local PLUGIN = {}
PLUGIN.Name = "Theater"
PLUGIN.Author = "RedMist"
PLUGIN.Date = "6/14/2012"
PLUGIN.Filename = PLUGIN_FILENAME
PLUGIN.ClientSide = true
PLUGIN.ServerSide = true
PLUGIN.APIVersion = 2
PLUGIN.Gamemodes = {}
if (CLIENT) then
function PLUGIN.TDerma()
local TPanel = vgui.Create( "DFrame" )
TPanel:... |
--[[ WARP GATE LIST
warp_gate(<warp_alias>, <gate_to>, <this_gate_id>, <map_id>, <min_x_pos>, <min_y_pos>, <min_z_pos>, <max_x_pos>, <max_y_pos>, <max_z_pos>);
--]]
warp_gate("", 1, 0, 0, 0, 37, 5003.017, 5406.502, -2.324399, 5007.811, 5411.516, 2.457488);
|
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- S H O R T C U T S P R E F E R E N C E S P A N E L --
-----------------------------------------------------------------------------... |
local day = os.date("%Y-%m-%d")
local ucep = "78455970"
local only = true
package.loaded.lfs = lfs
local fun = require("functions")
local csv = require("client.csvutils")
local qrencode = require("qrencode")
local mustache = require("mustache")
mg.write([[
HTTP/1.0 200 OK
Content-Type: text/html
<!DOCTYPE html>
<ht... |
object_intangible_pet_super_battle_droid = object_intangible_pet_shared_super_battle_droid:new {
}
ObjectTemplates:addTemplate(object_intangible_pet_super_battle_droid, "object/intangible/pet/super_battle_droid.iff")
|
---------------------------------------------
--------------- DRUMS ----------------------
---------------------------------------------
function get_default_drum_pattern(meter)
local patterns
patterns = {{'d'}, {'z','d'},{'z', 'z', 'd'}, {'z','z','d','z'}, {'z','z','z','d','z'}, {'z','z','z','d','z','z'}, {'... |
object_mobile_outbreak_undead_civilian_32 = object_mobile_shared_outbreak_undead_civilian_32:new {
}
ObjectTemplates:addTemplate(object_mobile_outbreak_undead_civilian_32, "object/mobile/outbreak_undead_civilian_32.iff")
|
local a = {}
for i=10,1,-1 do
a["aaa"] = i;
end
print(a["aaa"]);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.