content stringlengths 5 1.05M |
|---|
--
--*****************************
--*** Industrialization ***
--*****************************
-- Coded by: ATPHHe
--
--*****************************
--
-- All audio is handled and played by "CIndustrializationGlobalObject.lua".
IndustrializationGlobalObjectAudio = {}
-----------------
----- Power -----
--------... |
local PackageName, Major, Minor, Patch = "ItemHelper", 1, 0, 2
local PkgMajor, PkgMinor = PackageName, tonumber(string.format("%02d%02d%02d", Major, Minor, Patch))
local Pkg = Apollo.GetPackage(PkgMajor)
if Pkg and (Pkg.nVersion or 0) >= PkgMinor then
return -- no upgrade needed
end
-- Set a reference to the actual... |
require('./loader').loadScript('PokeMastersBot/ext-init', true) |
local setup = function()
local keymap = vim.api.nvim_set_keymap
local opts = {noremap = true, silent = true}
-- General pickers
keymap('n', '<leader>?', '<cmd>Telescope<CR>', opts)
keymap('n', '<leader>r', '<cmd>Telescope resume<CR>', opts)
keymap('n', '<leader>pp', '<cmd>Telescope pickers<CR>'... |
kaas_rebel_cave = ScreenPlay:new {
numberOfActs = 1;
lootContainers = {
},
lootLevel = 100,
lootGroups = {
{
groups = {
{group = "color_crystals", chance = 700000},
{group = "junk", chance = 7500000},
{group = "rifles", chance = 600000},
{group = "pistols", chance = 600000},
{group... |
function onCreate()
precacheImage('blinds');
addCharacterToList('liquidanniepl', 'bf');
setPropertyFromClass('GameOverSubstate', 'characterName', 'DrownDeath'); --Character json file for the death animation
setPropertyFromClass('GameOverSubstate', 'deathSoundName', 'DrowningDeath'); --put in mods/sounds/
setP... |
--[[
desc: a type of Attri and a part of Renderer.
author: Musoucrow
since: 2018-3-9
alter: 2019-9-17
]]--
---@type Graphics.Renderer.Part
local _Base = require("graphics.renderer.part.base")--base class
---@class Graphics.Renderer.Part.Radian:Graphics.Renderer.Part
local _Radian = require("core.class")(_Base)
-... |
--[[
This module is a decorator and a facade for all other modules that are generating a data model of the world.
]]--
local HeightmapGenerator = require(script.Parent.HeightmapGenerator)
local Falloff = require(script.Falloff)
local RiverGenerator = require(script.RiverGenerator)
local Utils = require(script.Parent.... |
local w = require("worker_init")
local tableutil = require( "acid.tableutil" )
local _M = {}
function _M.get()
local cc, ident = w.cc, w.ident
-- strip /get/
local fn = ngx.var.uri:sub(6)
local mems = cc:members()
ngx.log(ngx.ERR, tableutil.str(mems))
local hsh = ngx.crc32_long(fn)
loca... |
--------------------------------
-- Author: Gregor Best --
-- Copyright 2009 Gregor Best --
--------------------------------
local os_time = os.time
local os_date = os.date
local tostring = tostring
local pairs = pairs
local print = print
local setmetatable = setmetatable
local tonumber = tonumber
local type... |
-- English localization file for enUS and enGB.
local _
-- global functions and variebles to locals to keep LINT happy
local assert = _G.assert
local LibStub = _G.LibStub; assert(LibStub ~= nil,'LibStub')
-- local AddOn
local ADDON = ...
local AceLocale = LibStub:GetLibrary("AceLocale-3.0");
local L = AceLocale:NewLoca... |
-- actual move. move request: ClientAction.move
local _=function(event)
local entity=Entity.findByRef(event.entityRef)
-- if entity==nil then
-- local a=1
-- local entity=Entity.find(event.entity, event.entityId,event.login)
-- end
if entity==nil then
log("error in event. cannot find entity:"..pack(eve... |
--[[
flatland is a very boring landscape generator that just generates an absolutely flat surface.
It DOES utilize biomes if you pass a biomefunc
below is an example of a realms.conf entry that calls flatland:
tg_flatland |-33000| 25000|-33000| 33000| 26500| 33000| 26000|bm_mixed_biomes |
--]]
--***... |
--Check for disabling global
if gDisableUWEBalance then return end
--changelog
ModLoader.SetupFileHook( "lua/Player_Client.lua", "lua/GhoulsBalance/changelog.lua", "post" )
--drifter techs
ModLoader.SetupFileHook( "lua/Drifter.lua", "lua/GhoulsBalance/DrifterPassives/Drifter.lua", "post" )
ModLoader.SetupFileHook( "l... |
return function(import)
local Promise = import 'Class/Promise'
local Signal = import 'Class/Signal'
local HttpRequest = import './HttpRequest'
local DataStore = import './DataStore'
local NetworkChannel = import './NetworkChannel'
local create, table, console, lzw, string =
import 'Cre... |
local boss = scene:getObjects("skull1")[1];
local bossAmplified = false;
local bp = scene:getObjects("boss_path");
local bossFastSpeed = settings.bossSkull.fastWalkSpeed;
local bossSlowSpeed = settings.bossSkull.slowWalkSpeed;
local barrel = nil;
local barrelTurn = math.random(0, 1);
local function bossDefeated()
... |
function mean (numlist)
if type(numlist) ~= 'table' then return numlist end
num = 0
table.foreach(numlist,function(i,v) num=num+v end)
return num / #numlist
end
print (mean({3,1,4,1,5,9}))
|
PLoop(function()
namespace "KittyBox.Layout"
class "FlexboxLayout"(function()
inherit "ViewGroup"
end)
end) |
wn=require'wifi_net'
wn.init({mode='ap'})
ws = require'webserver'
ws.init()
ws.ws_register('/', print) |
function Render:DrawBorderedText(pos, text, colour, size, scale)
Render:DrawText( pos + Vector2( 1, 1 ), text,
Color( 0, 0, 0, colour.a * 0.9 ), size, scale );
Render:DrawText( pos, text, colour, size, scale );
end
function Render:GetScreenSize()
return { width = Render.Size.x, height = Render... |
local EquipmentBehavior = {}
function EquipmentBehavior.new(assetId)
local self = setmetatable({},{__index = EquipmentBehavior})
return self
end
function EquipmentBehavior:equipped(player)
-- equipped to player
end
function EquipmentBehavior:applyStats(stats)
local statChanges = {}
-- shallow co... |
game.Workspace.Regium.Humanoid.MaxHealth = math.huge |
local amqp = require('amqp')
local fiber = require('fiber')
local json = require('json')
local function consume_callback_wrapper(ch)
return function(payload)
ch:put(payload)
end
end
local function get_worker(args)
local wrk = {
channel_out = fiber.channel(1),
}
local w_ok, w_err
wrk.ctx = ... |
local E, _, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local C, L = unpack(select(2, ...))
local WM = E:GetModule('WorldMap')
local MM = E:GetModule('Minimap')
local AB = E:GetModule('ActionBars')
local SetCVar = SetCVar
-- GLOBALS: WORLD_MAP_MIN_ALPHA
E.Options.args.maps = {
... |
local Entity = require('__stdlib__/stdlib/data/entity')
local Recipe = require('__stdlib__/stdlib/data/recipe')
local Item = require('__stdlib__/stdlib/data/item')
local ico_path = '__PickerCheats__/graphics/icons/infinity-chest/'
local ent_path = ico_path
--------------------------------------------------------------... |
--[[
Swaggy Jenkins
Jenkins API clients generated from Swagger / Open API specification
OpenAPI spec version: 1.1.1
Contact: blah@cliffano.com
Generated by: https://openapi-generator.tech
]]
-- string_parameter_definition class
local string_parameter_definition = {}
local string_parameter_definition_mt =... |
ENT.Base = "base_entity"
ENT.Type = "anim"
ENT.PrintName = "Base Entity"
ENT.Author = "Hulk Hogan"
ENT.Contact = "hulkhogan@hotmail.com"
ENT.Purpose = "No purpose entered"
ENT.Instructions = "No instructions entered"
// Defaulting this to OFF. This will automatically save bandwidth
// on stuff that is already... |
return { sharp = { 40, 5, 13, 16, 4 }, sharpp = { 40, 5, 13, 16, 11, 5 } } |
--# (project_name = 'EmojiBloX - funTasia BloX World')
--# (project_alias = 'emojiblox')
--# (file_name = 'init')
--# (file_extension = 'lua')
--# (file_format = 'lua script')
--# (file_version = {major_version = 0, minor_version = 1, patch_version = 0, suffix_version = 'alpha'})
--# [!] File version numbers have to ma... |
local PANEL = {}
AccessorFunc( PANEL, "m_bSizeToContents", "AutoSize" )
AccessorFunc( PANEL, "m_bStretchHorizontally", "StretchHorizontally" )
AccessorFunc( PANEL, "m_bNoSizing", "NoSizing" )
AccessorFunc( PANEL, "m_bSortable", "Sortable" )
AccessorFunc( PANEL, "m_fAnimTime", "AnimTime" )
AccessorFu... |
-- test_dxgi.lua
local ffi = require("ffi")
local dxgi_ffi = require("dxgi_ffi")
local dxgi = require("dxgi")
local fac, err = dxgi.IDXGIFactory1()
print("Factory: ", fac, err)
print("Is Current: ", fac:IsCurrent())
for adapter in fac:Adapters() do
print("======= Adapter ==========")
print(adapter)
print("---- O... |
object_mobile_azure_cabal_drennic_dataminer_f_02 = object_mobile_shared_azure_cabal_drennic_dataminer_f_02:new {
}
ObjectTemplates:addTemplate(object_mobile_azure_cabal_drennic_dataminer_f_02, "object/mobile/azure_cabal_drennic_dataminer_f_02.iff")
|
local vim = vim
local api = vim.api
local chains = require'autocomplete.chains'
local util = require'autocomplete.util'
local health_start = vim.fn["health#report_start"]
local health_ok = vim.fn['health#report_ok']
local health_info = vim.fn['health#report_info']
local health_error = vim.fn['health#report_error']
lo... |
math.clamp = function(v, min, max) return math.max(math.min(v, max), min) end
util = {
__version=1,
__vars = {
c = 0,
pv = vectors.of{0,0,0},
pp = player.getPos(),
lpp = player.getPos()
},
__functions = {}
}
util.__functions.updatePlayerVelocity = function()
util.__vars.lpp = util.__vars.pp
util.__vars.... |
hover = {}
hover.modname = core.get_current_modname()
hover.modpath = core.get_modpath(hover.modname)
dofile(hover.modpath .. "/settings.lua")
dofile(hover.modpath .. "/hover.lua")
hover:register_hovercraft("hovercraft:hover_red" ,{
description = "Red Hovercraft",
textures = {"hovercraft_red.png"},
inventory_imag... |
cflags{
'-D HAVE_CONFIG_H',
'-I $outdir',
'-I $srcdir',
'-I $srcdir/include',
'-I $srcdir/x86',
'-I $srcdir/asm',
'-I $srcdir/disasm',
'-I $srcdir/output',
}
build('cat', '$outdir/config/config.h', {
'$builddir/probe/HAVE___BUILTIN_CLZ',
'$dir/config.h',
})
pkg.deps = {'$outdir/config/config.h'}
lib('libna... |
local M = {}
M.description = 'Mostly lua modules that is available during startup'
M.wants = { }
return M
|
levelSpec =
{
--[[ level1 ]]
{
bonus='cherries', bonusPoints=100, pacManSpeed=0.8, pacManDotsSpeed=0.71,
ghostSpeed=0.75,ghostTunnelSpeed=0.4, pacManFrightSpeed=0.9, pacManFrightDotSpeed=0.79,
ghostFrightSpeed=0.5,frightTime=6,
scatterTime = {7, 7, 5, 5},
chaseTime = {20, 20, 20, math.huge}
}... |
---
-- curl -X POST http://kong:8001/services/<service-name-or-id>/plugins \
-- -d "name=my-custom-plugin" \
-- -d "config.environment=development" \
-- -d "config.server.host=http://localhost"
---
local require = require
local kong = kong
local ngx = ngx
local BasePlugin = require "kong.p... |
local systemTime = hs and hs.timer.secondsSinceEpoch or os.time
local t = systemTime()
local a = 0 ; for i = 3, 999, 1 do if (i % 3) == 0 or (i % 5 == 0) then a = a + i end end ; print(a)
print(systemTime() - t)
|
object_tangible_storyteller_prop_pr_lifeday_mini_tree = object_tangible_storyteller_prop_shared_pr_lifeday_mini_tree:new {
}
ObjectTemplates:addTemplate(object_tangible_storyteller_prop_pr_lifeday_mini_tree, "object/tangible/storyteller/prop/pr_lifeday_mini_tree.iff")
|
-------------------------------------------------------------------------------
-- Importing modules
-------------------------------------------------------------------------------
local IndicesEndpoint = require "elasticsearch.endpoints.Indices.IndicesEndpoint"
--------------------------------------------------------... |
Citizen.CreateThread(function()
Wait(500)
if (((Plugins.Stores) and not (_StartError_) and (Framework.RedEmRP))) then
--------------------------------------------------------------------------------
----------------------------------- DevDokus -----------------------------------
-----------------------... |
options = {
enable_colour = true,
animate = true,
grid_height = 4,
grid_width = 4,
spawn_rate = 1,
ai = false,
interactive = true
}
local animateTime = 160;
function onGameLoopIteration()
animateTime = animateTime + 10;
SetAnimateTime(animateTime);
end
local turns = 0;
function o... |
error("neorocks is no longer supported. Please use packer.nvim or other project for neorocks usage.")
|
--- XML DOM DocumentType Interface.
--
-- The DOM level 2 does not specify how to interact with the DTD, hence
-- has not been implemented other than the wrapper for external DTD definitions,
-- the generated internal subset will always be empty for now.
--
-- See the [DocumentType](https://www.w3.org/TR/DOM-Level-2-Co... |
describe("Table heap", function()
local table_heap = require("data_structures.table_heap")
local shuffle = require("random.fisher_yates_shuffle")
local n = 100
local list = {}
for index = 1, n do
list[index] = index
end
shuffle(list)
local heap = table_heap.new()
for index = 1, #list do
heap:push(list[ind... |
local M = {}
function M.after(_)
end
function M.action_cd(self, items)
for _, item in ipairs(items) do
vim.cmd("lcd " .. self.filelib.escape(item.path))
M.after(item.path)
end
end
function M.action_tab_open(self, items)
for _, item in ipairs(items) do
vim.cmd("tabedit")
vim.cmd("lcd " .. self.f... |
--Nicolai, Edited on March 19th 2022, 19:53 GMT+1
local TS = game:GetService("TweenService")
local RRT = require(script.RRT)
local fidelity = 1
local offset = 3
local MaxIteration = 5000
local Nodes = 200
local start = workspace.Start.Position
local endpoint = workspace.End.Position
local m = (start-endpoint).Magnit... |
return require('_openssl.x509.csr')
|
-- This script has not been optimized to use callbacks. Keep that in mind.
local joystick = {} -- Stores the joystick library object.
local lastButton = 0
local controllerGroup = {}
function joystick.addController(controller)
if not controllerGroup[controller] then
controllerGroup[controller] = {}
controllerGr... |
local nvim = require'nvim'
local load_module = require'tools'.helpers.load_module
local has_attrs = require'tools'.tables.has_attrs
local plugins = nvim.plugins
local set_autocmd = nvim.autocmds.set_autocmd
-- local set_command = nvim.commands.set_command
-- local set_mapping = nvim.mappings.set_mapping
loc... |
require "scripts.library.event"
local json = require "scripts.json"
ClientEvents = CreateGlobalVariable("ClientEvents", {
handler = nil,
events = {}
})
function ClientEvents:OnActivate ()
Debug.Log('Initializing client events!')
if self.readyHandler then
self.readyHandler()
self.readyHandler = nil
end
sel... |
-- 3x3 matrix class, used for point transformation
local Matrix3 = {}
Matrix3.__index = Matrix3;
local Matrix3Const = {}
Matrix3Const.__index = Matrix3Const;
function Matrix3:__tostring()
return
([=[[%.2f, %.2f, %.2f,
%.2f, %.2f, %.2f,
%.2f, %.2f, %.2f]]=]):format(unpack(self))
end
local default_mat = {1,0,0, 0,1,... |
-- OpenComputers Lib
local sh = require("shell")
local fs = require("filesystem")
-- Make library folder
local PATH_LIB = sh.resolve("lib") .. "/"
fs.makeDirectory(PATH_LIB)
-- Config
local URL = "https://raw.githubusercontent.com/dstodev/MC-Fluid-Tank-Controller/master/lib/"
local function getlib(file)
local st... |
-- 原作:SimpleObjectiveProgress
-- 原作者:MMOSimca (https://wow.curseforge.com/projects/simpleobjectiveprogress)
-- 修改:houshuu
-------------------
-- 主要修改条目:
-- 模块化
local E, L, V, P, G = unpack(ElvUI);
local SOP = E:NewModule('Wind_SOP', 'AceHook-3.0', 'AceEvent-3.0');
-- Localized function references
local LOP = _G.LibStu... |
--MIT License
--Copyright (c) 2019 LisaFlocke
--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, pub... |
-- load credentials, 'SSID' and 'PASSWORD' declared and initialize in there
dofile('config.lua')
USER_AGENT = 'prikmeter'
VERSION = '1.0.0'
upload_telegram = function(telegram)
local socket = tls.createConnection()
socket:on('connection', function(socket)
print('Socket connected, uploading telegram')
sock... |
return {
source = {
type = 'dist',
location = 'https://dl.google.com/android/repository/android-ndk-r17b-linux-x86_64.zip',
sha1sum = 'dd5762ee7ef4995ad04fe0c45a608c344d99ca9f',
basename = 'android-ndk-r17b'
},
export = {
env = {
ANDROID_NDK_HOME = "$... |
fx = {
style = "STYLE_COMBO",
properties = {
property_06 = {
name = "FX7",
type = "VARTYPE_STRING",
value = "destroyerI_07",
},
property_05 = {
name = "FX6",
type = "VARTYPE_STRING",
value = "destroyerI_06",
},
property_07 = {
name = "FX8",
type = "VARTYPE_STRING",
value = "destroyerI_08",
},
property... |
-------------------------------------------------------------------------------
-- Title: MSBT Options Controls
-- Author: Mikord
-------------------------------------------------------------------------------
-- Create module and set its name.
local module = {}
local moduleName = "Controls"
MSBTOptions[moduleName] = ... |
local awful = require("awful")
local wibox = require("wibox")
local Gtk = require("lgi").Gtk
local icon_theme = Gtk.IconTheme.get_default()
local gears = require("gears")
local tasklist = {}
local tasklist_buttons = awful.util.table.join(awful.button({},
1,
function(c)
if c.active then
c.m... |
--[[
Meta Achievements - README
v0.1.0 - 2021/5/29
Developed by: Morticai (META) (https://www.coregames.com/user/d1073dbcc404405cbef8ce728e53d380)
UI Designed by: KonzZwodrei (META) (https://www.coregames.com/user/fdb45035857a4e87b17344cd891c48c5)
This package is a work in progress.
D... |
local TableInsert = table.insert;
local TableRemove = table.remove;
local StringFormat = string.format;
local ToString = tostring;
local BitBand = bit.band
local qcL = qcLocalize
local qcPins = {}
local qcPinFrames = {}
local qcSparePinFrames = {}
local qcCurrentCategoryID = 0
local qcCurrentCategoryQuestCount = 0
l... |
--HD44780 LCD Driver
local bits = require("bit")
local band,bor,lshift,rshift = bit.band, bit.bor, bit.lshift, bit.rshift
local socket = require("socket")
local periphery = require('periphery')
local GPIO = periphery.GPIO
print("Using GPIO:",GPIO.version)
local function sleep(seconds)
socket.sleep(seconds)
end
... |
local HelperTestScene = game.createSceneClass("HelperTestScene")
function HelperTestScene:ctor()
cc.FileUtils:getInstance():addSearchPath("src/")
self:prepare({
description = "Please check console output"
})
local items = {
"getFileData",
}
self:addChild(game.createMenu(items... |
return {
version = "1.2",
luaversion = "5.1",
tiledversion = "1.2.4",
orientation = "orthogonal",
renderorder = "right-down",
width = 32,
height = 18,
tilewidth = 16,
tileheight = 16,
nextlayerid = 11,
nextobjectid = 8,
properties = {},
tilesets = {
{
name = "tiles",
firstgid =... |
local ffi = require("ffi")
local wo = vim.wo
local fn = vim.fn
local api = vim.api
local M = {
---Table with all 'foldtext' functions.
foldtext = {}
}
-- Labels for every vim foldmethod config table (:help foldmethod) and one
-- general config unlabeled table (accessible with config[1]) to seek into if
-- no va... |
require("LocalRockInit")
insulate(
"#magicMock",
function()
local mock
setup(
function()
require("Tests")
end
)
before_each(
function()
mock = magicMock()
end
)
it(
"shoul... |
for i,v in ipairs({
createObject ( 11353, 2467.1006, 602.7002, 16.1, 0, 0, 90 ),
createObject ( 11353, 2521.2002, 602.7002, 16.1, 0, 0, 90 ),
createObject ( 11353, 2616.9004, 602.7002, 16.1, 0, 0, 90 ),
createObject ( 11353, 2670.7002, 602.7002, 16.1, 0, 0, 90 ),
createObject ( 11353, 2440.5, 575.2002, 16.1 ),
createOb... |
-- AquaShine error handler entry point
-- Part of Live Simulator: 2
-- See copyright notice in AquaShine.lua
local AquaShine = AquaShine
local ErrorHandler = {}
function ErrorHandler.Start(arg)
ErrorHandler.Msg = assert(arg[1])
love.graphics.setFont(love.graphics.newFont(14))
end
function ErrorHandl... |
local function add_layer(layer, layers)
if layer.isGroup then
for i,l in ipairs(layer.layers) do
add_layer(l, layers)
end
end
layers[#layers+1] = layer
end
--- 処理対象のフレームとレイヤを取得する
local function GetTargetLayerAndFrameNumbers(is_all_frame)
local frameNumbers = {}
... |
--- Probability utility functions
-- @module Probability
local Probability = {}
function Probability.uniform(min, max)
end
--- Normal curve. [-1, 1]
function Probability.boxMuller()
return math.sqrt(-2 * math.log(math.random())) * math.cos(2 * math.pi * math.random()) / 2
end
function Probability.normal(mean, ... |
local ffi = require("ffi")
local S = require "syscall"
ffi.cdef[[
typedef struct _fb_bitfield {
unsigned int offset;
unsigned int length;
unsigned int msb_right;
} fb_bitfield;
typedef struct _fb_fix_screeninfo {
char id[16];
unsigned long smem_start;
unsigned int smem_len;
unsigned ... |
vim.g.gruvbox_bold = 1
vim.g.gruvbox_italic = 1
vim.g.gruvbox_underline = 1
vim.g.gruvbox_undercurl = 1
vim.cmd'packadd gruvbox'
|
-- luacheck: ignore 213
local oprint = print
local print = print
local dummy = function() end
local sf = string.format
local dump_table
local INDENT_STR = " "
local function dump_indent(indent, buffer, n)
for i=1,indent do
n=n+1; buffer[n] = INDENT_STR
end
return n
end
local function dump_fiel... |
ZYLayer = class("ZYLayer", function()
return cc.Layer:create();
end)
function ZYLayer:ctor()
end
return ZYLayer
|
log("LOAD:", tostring(ModPath .. "cc/CopClickerManager.lua"))
dofile( ModPath .. "cc/CopClickerManager.lua" )
local MenuSetup_init_managers = MenuSetup.init_managers
function MenuSetup:init_managers( ... )
MenuSetup_init_managers( self, ... )
managers.cop_clicker = CopClickerManager:new()
end
|
minetest.register_craft({
output = "factory:smoke_tube",
recipe = {
{"default:steel_ingot", "", "default:steel_ingot"},
{"default:steel_ingot", "", "default:steel_ingot"},
{"default:steel_ingot", "", "default:steel_ingot"}
}
})
minetest.register_craft({
output = 'factory:factory_brick 6',
recipe = {
{'fac... |
local serial = require 'serialdriver'
local basexx = require 'basexx'
local base = require 'app.base'
local chk_sum = require 'hasings.sum16'
local ioe = require 'ioe'
local app = base:subclass("YXK_12AB_APP")
app.static.API_VER = 10
function app:on_init()
self._log:debug("Port example application initlized")
end
-... |
#!/usr/bin/env tarantool
-- Testing feedback module
local tap = require('tap')
local json = require('json')
local fiber = require('fiber')
local test = tap.test('feedback_daemon')
local socket = require('socket')
box.cfg{log = 'report.log', log_level = 6}
local feedback_save = nil
local feedback = nil
local feedbac... |
local M = {}
local types = {
["--from"] = "string",
["--read"] = "string",
["--to"] = "string",
["--write"] = "string",
["--output"] = "string",
["--data-dir"] = "string",
["--metadata"] = "string",
["--metadata-file"] = "string",
["--defaults"] = "string",
["--file-scope"] = "flag",
["--standalo... |
--- The Scheduler Prototype
-- @module ROT.Scheduler
local ROT = require((...):gsub(('.[^./\\]*'):rep(1) .. '$', ''))
local Scheduler = ROT.Class:extend("Scheduler")
function Scheduler:init()
self._queue = ROT.EventQueue:new()
self._repeat = {}
self._current = nil
end
--- Get Time.
-- Get time counted since sta... |
local unload = require "deftest.util.unload"
local mock = require "deftest.mock.mock"
local mock_gui = require "deftest.mock.gui"
local button = require "in.button"
return function()
describe("button", function()
before(function()
button = require "in.button"
mock_gui.mock()
end)
after(function()
moc... |
-- A Lua source file packer.
-- released under the Romantic WTF Public License
setmetatable( _G or _ENV, {__index = require"init" } )
args = {...}
--[[]] pcall( require,"luarocks.loader" )
--[[]] local success, fs = pcall( require,"lfs" )
files = {}
fs = success and fs or {
dir = function (path)
local ... |
create_actor([[police_weapon;3;col,vec,confined,rel,bad_attack,post_drawable,tcol|
x:@1; y:@2; dx:@3; d:@4; tile_hit:@5; destroyed:@6;
kill_when_hit:yes;
touchable:no; rx:.375; ry:.25;
iyy:-6;
tl_max_time=1,;
]], function(a)
a.flipped = not a.flipped
a.sind = a.flipped and 197 or 198
a.... |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf"
module('BseTask_pb', package.seeall)
local AWARD = protobuf.Descriptor();
local AWARD_ID_FIELD = protobuf.FieldDescriptor();
local AWARD_TYPE_FIELD = protobuf.FieldDescriptor();
local AWARD_LV_FIELD = protobuf.FieldDescriptor();
local AWAR... |
--[[-------------------------------------------------------------------------
-- BackupHelper Lightroom plug-in
--
-- Copyright 2014 Joergen Ibsen
--
-- 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 Lic... |
--[[
Copyright 2012 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... |
cannon = {}
-- Constants for customization.
local CONST_CANNON_SPEED = 50
local CONST_GRAVITY = -10
local Y_OFFSET = 20 -- Increase for easier aiming without having to dig yourself into the ground. Not a constant, modifiable via formspec.
cannon.blacklisted_nodes = { -- Nodes the cannonball can't 'hit'
["air... |
return {
_renamefunc =
RS.RenameFunc(
{"setLineLength", "setLineLength<float>"},
{"setLightDepthSize", "setLightDepthSize<const spn::Size&>"}
)
}
|
--[[--
Tables as lists.
Every list is also an object, and thus inherits all of the `std.object`
methods, particularly use of object cloning for making new list objects.
In addition to calling methods on list objects in OO style...
local List = require "std.list"
local l = List {1, 2, 3}
for e in l... |
local runService = game:GetService("RunService")
local replicatedStorage = game:GetService("ReplicatedStorage")
local players = game:GetService("Players")
if not runService:IsServer() then return {} end
local package = script.Parent
local packages = package.Parent
local maidConstructor = require(packages:WaitForChild... |
xAdmin.Console = {}
xAdmin.Console.isConsole = true
function xAdmin.Console:GetUserGroup()
return "Console"
end
function xAdmin.Console:GetGroupPower()
return 9999
end
function xAdmin.Console:GetGroupTable()
return {
name = "Console",
power = 9999
}
end
function xAdmin.Console:IsAdmin()
return true
end
fu... |
local name = "hover_yellow"
local definition = ...
definition.description = "Yellow hovercraft"
definition.inventory_image = "hovercraft_yellow_inv.png"
definition.wield_image = "hovercraft_yellow_inv.png"
definition.textures = {"hovercraft_yellow.png"}
definition.drop_on_destroy = {"wool:yellow", "wool:black 2", "d... |
local example = {}
example.title = "List"
example.category = "Object Demonstrations"
local font = love.graphics.newFont(10)
function example.func(loveframes, centerarea)
local frame = loveframes.Create("frame")
frame:SetName("List")
frame:SetSize(500, 470)
frame:CenterWithinArea(unpack(centerarea))
local li... |
local ilk_keywords = require('keywords')
local asn1_types = require('asn1_types')
local constants = require('constants')
local transformations = require('transformations_generator')
local variables = require('variable_names')
local function generate_inputs(metadata)
local result_decl = ''
local result_call = ... |
local function prequire(...)
local ok, mod = pcall(require, ...)
return ok and mod, mod or nil
end
local zmq, zthreads, zpoller
local zstrerror, zassert, ETERM
local zconnect, zbind
local zrecv_all, zrecv
local zerrcode
local function has_member(t, key)
local ok, has
if type(key) == "table" then
ok, has... |
--[[
Arduino的にFlashAirのPIOを扱う。
必ず、pinModeで入出力を設定後、digitalWriteもしくはdigitalReadで操作すること。
各ピンの入出力選択、出力状態は記憶しているため、
これらを使わずpio関数を直接触った後、これらの関数を使うと望み通りの動作をしない。
入出力は、デフォルトでは全端子INPUT(0)、全LOW(0)である。
s, indata = pinMode(port,mode)
入出力設定
OUTPUT(1)で出力
INPUT(1以外)で入力に設定。
sは制御可否(pio関数の戻り値参照)
indataがくっついているのは、pioの返却値をそのまま返しているため。
... |
-- TO DO
-- stop game physics from making OBJECTS spin and fall
-- make it possible for elements to hit surfaces properly
local g_screenX,g_screenY = guiGetScreenSize()
local SURFACE_ERROR_CORRECTION_OFFSET = .05
local MAX_DISTANCE = 150 --units
local MIN_DISTANCE = 2 --units
local maxMoveDistance = 100 --default
lo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.