content stringlengths 5 1.05M |
|---|
object_building_kashyyyk_thm_kash_arch_wood_s01 = object_building_kashyyyk_shared_thm_kash_arch_wood_s01:new {
}
ObjectTemplates:addTemplate(object_building_kashyyyk_thm_kash_arch_wood_s01, "object/building/kashyyyk/thm_kash_arch_wood_s01.iff")
|
ShadeInk.kInkRange = 10 -- kScanRadius is 20
-- make the effect the same for both teams
ShadeInk.kShadeInkMarineEffect = PrecacheAsset("cinematics/shade_ink.cinematic")
ShadeInk.kShadeInkAlienEffect = ShadeInk.kShadeInkMarineEffect
function ShadeInk:GetUpdateTime()
return 0.1 -- was 2.0
end
if Server then
f... |
local Effect = require 'prefabs/effects/effect'
local Effects = require 'prefabs/effects/effecttype'
local cmp = require 'component/common'
return {
Bullet = {
width = 5,
height = 5,
add_render = function(proj)
proj:add_component(cmp.Sprite, Resource.Image.Bullet)
return proj
end,
dam... |
function divide(parametro)
linha = {}
n = 0
-- parametro para espaço "*l"
for i in string.gmatch(io.read(parametro), "%S+") do
n = n + 1
linha[n] = i
end
return linha
end
--------------------------------------------------------------------------------------------------
-------------------------... |
local OAuth = require "kong.plugins.google-logging.google.core.oauth"
local HTTPClient = require "kong.plugins.google-logging.google.core.http"
local BatchQueue = require "kong.tools.batch_queue"
local kong = kong
local plugin_name = ({...})[1]:match("^kong%.plugins%.([^%.]+)")
local socket = require "socket"
local c... |
local string = string
local Container = require('sanity/util/container')
local FontIcon = require('sanity/util/fonticon')
local spawn = require('awful.spawn')
local net = require('lain.widget.net')
local fixed = require('wibox.layout.fixed')
local widget = require('wibox.widget')
local text = require('s... |
local a = require "plenary.async.async"
local await = a.await
local async = a.async
local vararg = require "plenary.vararg"
local uv = vim.loop
-- local control = a.control
local control = require "plenary.async.control"
local channel = control.channel
local M = {}
local defer_swapped = function(timeout, callback)
... |
--New
includeFile("custom_content/building/content/nova_orion_station/chapter_8_space_station.lua")
|
-- Button Controller
-- MrLonely1221
-- April 16, 2019
--[[
ButtonController:Initialize();
ButtonController:GetButtons();
ButtonController:GetButton(buttonId);
ButtonController:AddButton(name, sizeX, sizeY, posX, posY, color, text, image);
--]]
local ButtonController = {ButtonHolder = nil; Buttons = {}; Them... |
local listeners = {}
--[[
Subscribe to event
Arguments:
class originator = Class with subscribe method
string event = Event name
string identifier = Unique name to identify the event
function func = Callback
Return:
nil
]]
function Subscribe(origi... |
-- programme pour faire clignoter une LED avec un rapport on/off
print("\n blink_led2.lua zf200718.1204 \n")
zLED=4
zTm_On_LED = 50 --> en ms
zTm_Off_LED = 500 --> en ms
zFlag_LED = 0
function blink_LED ()
if zFlag_LED==gpio.LOW then
zFlag_LED=gpio.HIGH
ztmr_LED:alarm(zTm_Off_LED, tm... |
local m = vim.api.nvim_set_keymap
local n = {noremap = true}
local s = {silent = true}
local o = {noremap = true, silent = true}
m("n", "<leader>q", ":q<CR>", o)
m("n", "<leader>qx", ":q!<CR>", o)
m("n", "<leader>x", ":qa<CR>", o)
m("n", "<leader>xx", ":qa!<CR>", o)
m("n", "<C-n>", ":NvimTreeToggle<CR>", o)
m("n", "<... |
object_tangible_shipcontrol_turret_ladder = object_tangible_shipcontrol_shared_turret_ladder:new {
}
ObjectTemplates:addTemplate(object_tangible_shipcontrol_turret_ladder, "object/tangible/shipcontrol/turret_ladder.iff")
|
return PlaceObj("ModDef", {
"dependencies", {
PlaceObj("ModDependency", {
"id", "ChoGGi_Library",
"title", "ChoGGi's Library",
"version_major", 9,
"version_minor", 6,
}),
},
"title", "Drones Harvest Rocks",
"version", 4,
"version_major", 0,
"version_minor", 4,
"image", "Preview.png",
"id", "ChoG... |
local TOCNAME,Addon = ...
Addon.Tool=Addon.Tool or {}
local Tool=Addon.Tool
Tool.IconClassTexture="Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES"
Tool.IconClassTextureWithoutBorder="Interface\\WorldStateFrame\\ICONS-CLASSES"
Tool.IconClassTextureCoord=CLASS_ICON_TCOORDS
Tool.IconClass={
["WARRIOR"]= ... |
local State = require("stateBase")
local ConcreteState1 = State:new()
function ConcreteState1:handle(context)
print(context:getHour())
print("ConcreteState1:handle")
end
return ConcreteState1 |
local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
local RangeCheck = IceCore_CreateClass(IceElement)
RangeCheck.prototype.scheduledEvent = nil
local LibRange = nil
local DogTag = nil
-- Constructor --
function RangeCheck.prototype:init()
RangeCheck.super.prototype.init(self, "RangeCheck")
self.scalingE... |
--
-- string.lua
-- Additions to Lua's built-in string functions.
-- Copyright (c) 2002-2008 Jason Perkins and the Premake project
--
--
-- Returns an array of strings, each of which is a substring of s
-- formed by splitting on boundaries formed by `pattern`.
--
function string.explode(s, pattern, plain)
if (pat... |
return function()
local FromKeys = require(script.Parent.FromKeys)
describe("Set/FromKeys", function()
it("should return an empty table given an empty table", function()
local Result = FromKeys({})
expect(next(Result)).never.to.be.ok()
end)
it("should return cor... |
-- Behavior for observer (5) in the level yasha_thief
routine = function(O)
O:gotoTile(4.5, 25)
O:wait(1)
O:gotoTile(12.5, 25)
O:wait(1)
end
|
require("ItemTweaker_Copy_CC");
--TIEONSPEARHEADS
--Weapons
TweakItem("Base.SpearChippedStone","DisplayCategory","WepMelee"); |
if not pcall(require, 'telescope') then
return
end
require('telescope').setup {
defaults = {
vimgrep_arguments = {
'rg',
'--color=never',
'--no-heading',
'--with-filename',
'--line-number',
'--column',
'--smart-case',
},
prompt_prefix = '> ',
selection_care... |
-- Not placeable, too hardcoded for general use
local summitGemManager = {}
summitGemManager.name = "summitGemManager"
summitGemManager.depth = 0
summitGemManager.texture = "@Internal@/summit_gem_manager"
summitGemManager.nodeVisibility = "always"
summitGemManager.nodeDepth = -10010
function summitGemManager.nodeTex... |
local _, ns = ...
local oGlow = ns.oGlow
local argcheck = oGlow.argcheck
local pipesTable = ns.pipesTable
local filtersTable = {}
local activeFilters = {}
local numFilters = 0
function oGlow:RegisterFilter(name, type, filter, desc)
argcheck(name, 2, 'string')
argcheck(type, 3, 'string')
argcheck(filter, 4, 'funct... |
local Player = class('Player', Base)
Player.static.SPEED = 200
Player.static.RADIUS = 20
local radius = Player.RADIUS
local AttackCharacter = require('player.attack_character')
local DefenseCharacter = require('player.defense_character')
local getUVs = require('getUVs')
function Player:initialize(joystick, keyboard, ... |
local g = vim.g
local function mapnoremap(mode, lhs, rhs, opts)
local options = { noremap = true }
if opts then
options = vim.tbl_extend('force', options, opts)
end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end
-- Spacebar is <Leader>
mapnoremap('', '<Space>', '<Nop>', { silent = true })
g.ma... |
module(..., lunit.testcase, package.seeall)
local common = dofile("common.lua")
local http = require("luanode.http")
local net = require("luanode.net")
function test()
local gotReq = false
local server = http.createServer(function (self, req, res)
common.error('got req')
gotReq = true
assert_equal('GET', re... |
module 'character'
--------------------------------------------------------------------
local _messageEventTypes = {}
function registerActionMessageEventType( t, clas )
if _messageEventTypes[ t ] then
_error( 'duplicated action message event type', t )
end
_messageEventTypes[ t ] = clas
end
-------------------... |
-- Battle Matchmaker
-- Version 1.4.0
g_players={}
g_ui_id=0
g_popups={}
g_status_text=nil
g_vehicles={}
g_spawned_vehicles={}
g_players={}
g_status_dirty=false
g_finish_dirty=false
g_in_game=false
g_in_countdown=false
g_timer=0
g_remind_interval=3600
g_supply_buttons={
MG_K={42,50},
MG_AP={45,50},
MG_I={46,50},
... |
local eq = assert.are.same
local operations = require'neogit.operations'
local harness = require'tests.git_harness'
local in_prepared_repo = harness.in_prepared_repo
local get_current_branch = harness.get_current_branch
--local status = require'neogit.status'
local input = require'tests.mocks.input'
local function ac... |
local LibNumbers = Wheel("LibNumbers")
assert(LibNumbers, "UnitManaText requires LibNumbers to be loaded.")
-- Lua API
local _G = _G
local math_floor = math.floor
local pairs = pairs
local tonumber = tonumber
local tostring = tostring
local unpack = unpack
-- WoW API
local UnitIsConnected = _G.UnitIsConnected
local U... |
--
-- Copyright (c) 2015, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--
-- Author: Alex... |
notice = {}
notice.red = {1, 0.5, 0.5}
notice.white = {1, 1, 1}
notice.notices = {}
notice.duration = 5 --seconds
notice.fadetime = 0.5
function notice.new(text, color, duration)
local duration = duration or notice.duration
local text = text or ""
local color = color or notice.white
table.insert(notice.... |
--[[--
Registration, parsing, and handling of commands.
Commands can be ran through the chat with slash commands or they can be executed through the console.
]]
-- @module ix.command
--- When registering commands with `ix.command.Add`, you'll need to pass in a valid command structure. This is simply a table
-- with ... |
local HTTP = game:GetService("HttpService")
local LOCA = game:GetService("LocalizationService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Anticheat = require(ReplicatedStorage.Shared.Anticheat)
local Misc = ReplicatedStorage:WaitForChild("Misc")
local baseUrl = "robeatscsgame.com/api/"
bas... |
include("data/scripts/lib/utils/enum")
EnumUtils.addNextKey(OrderButtonType, "Trade")
if onClient() then
local autotrade_initUI = MapCommands.initUI
function MapCommands.initUI()
autotrade_initUI()
local order = {tooltip = "Trade"%_t, icon = "data/textures/icons/battery-pack.png", ... |
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
-- A do-nothing "structural" node, to ensure all digtron nodes that are supposed to be connected to each other can be connected to each other.
minetest.register_node("digtron:str... |
COMMAND.name = 'ForceGetUp'
COMMAND.description = 'command.forcegetup.description'
COMMAND.syntax = 'command.forcegetup.syntax'
COMMAND.permission = 'assistant'
COMMAND.category = 'permission.categories.roleplay'
COMMAND.arguments = 1
COMMAND.player_arg = 1
COMMAND.aliases = { 'forcegetup', 'plygetup' }
function COMMA... |
local test = {}
local json = require('arken.json')
local Class = require('arken.oop.Class')
local Person = Class.new("Person", "ActiveRecord")
test.beforeAll = function()
ActiveRecord.reset()
ActiveRecord.config = "config/active_record_sqlite.json"
local sql = [[
CREATE TABLE IF NOT EXISTS person (
id... |
--{{{ Screen locker command
local locker_cmd = '~/dotfiles/bin/locker '
if beautiful.wallpaper then
locker_cmd = locker_cmd .. beautiful.wallpaper
end
--}}}
-- {{{ Autostart applications
function run_once(cmd)
findme = cmd
firstspace = cmd:find(" ")
if firstspace then
findme = cmd:sub(0, firstspace-1)
... |
local M = {}
function M.temporary(str)
vim.validate({ str = { str, "string", true } })
local path = vim.fn.tempname()
local f = io.open(path, "w")
if str then
f:write(str)
end
f:close()
return path
end
function M.find_upward_dir(child_pattern)
local found_file = vim.fn.findfile(child_pattern, ".... |
local helpers = require('test.functional.helpers')(after_each)
local thelpers = require('test.functional.terminal.helpers')
local lfs = require('lfs')
local clear = helpers.clear
local nvim_prog = helpers.nvim_prog
local feed_command = helpers.feed_command
local feed_data = thelpers.feed_data
if helpers.pending_win32(... |
object_mobile_ep3_jyykle_vulture = object_mobile_shared_ep3_jyykle_vulture:new {
}
ObjectTemplates:addTemplate(object_mobile_ep3_jyykle_vulture, "object/mobile/ep3_jyykle_vulture.iff")
|
AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire User"
ENT.RenderGroup = RENDERGROUP_BOTH
ENT.WireDebugName = "User"
function ENT:SetupDataTables()
self:NetworkVar( "Float", 0, "BeamLength" )
end
if CLIENT then return end -- No more client
function ENT:Initialize()
self:PhysicsIni... |
sir("DieRollInterceptable", 1)
ssr("DieRollDescription", "Great Disaster")
ssr("DieRollChoice1", "Earthquake")
ssr("DieRollChoice2", "Earthquake")
ssr("DieRollChoice3", "Earthquake")
ssr("DieRollChoice4", "Eruption")
ssr("DieRollChoice5", "Great River")
ssr("DieRollChoice6", "Plague")
ssr("DieRollChoice7", "Fallen St... |
return {
{
effect_list = {
{
type = "BattleBuffAddAttrRatio",
trigger = {
"onAttach",
"onRemove"
},
arg_list = {
attr = "dodgeRate",
number = -500
}
}
}
},
{
effect_list = {
{
type = "BattleBuffAddAttrRatio",
trigger = {
"onAttach",
"onRemove"
... |
-- Commands by Devieth.
-- Script for SAPP
api_version = "1.10.0.0"
-- Vanished player list
player_vanished = {}
player_respawn_time = {}
function OnScriptLoad()
register_callback(cb['EVENT_TICK'], "OnEventTick")
register_callback(cb['EVENT_COMMAND'], "OnEventCommand")
register_callback(cb['EVENT_DIE'... |
return redis.call('RPUSH',KEYS[1],ARGV[1]); |
describe('utility functions', function()
describe('time conversions', function()
it('converts back and forth', function()
wow.state.localTime = 100
wow.state.serverTime = 200
assert.same(180, wow.addon.LocalToServer(80))
assert.same(80, wow.addon.ServerToLocal(180))
end)
it('clamp... |
---
-- Viewport.lua - ViewportFrame with limited simulated physics and controls
--
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Create = ReplicatedStorage.Common.Create
local CreateModule = require(Create.CreateModule)
local Viewport = {}
Viewport.__index = Viewport
function Viewport.new(par... |
--------------------------------------------------------------------------
-- Crytek Source File.
-- Copyright (C), Crytek Studios, 2001-2006.
--------------------------------------------------------------------------
-- $Id$
-- $DateTime$
-- Description: Switch entity for both FG and Prefab use.
--
------------------... |
local gcd = require("math.greatest_common_divisor")
return function(
a, -- number
b -- number
)
-- |a * b / gcd(a, b)| reordered in order to keep intermediate results small (to not hit number representation bounds)
return math.abs(a / gcd(a, b) * b) -- least common multiple of a and b
end
|
local L = Grid2Options.L
function Grid2Options:MakeStatusDebuffsListOptions(status, options, optionParams)
options.aurasList = {
type = "input", dialogControl = "Grid2ExpandedEditBox",
order = 155,
width = "full",
name = "",
multiline = 16,
get = function()
local auras = {}
for _,aura in pairs(statu... |
require 'torch'
require 'nn'
require 'image'
local utils = require 'utils.misc'
local DataLoader = require 'utils.DataLoader'
require 'loadcaffe'
cmd = torch.CmdLine()
cmd:text('Options')
cmd:option('-batch_size', 10, 'batch size')
cmd:option('-split', 'train', 'train/val')
cmd:option('-debug', 0, 'set debug = 1 f... |
-- Projectiles.Lua
-- Projectile definitions for LoveExtension library
-- Copyright (c) 2011 Robert MacGregor
local Projectiles = { }
Projectiles.imageManager = require("scripts/Image.lua")
Projectiles.enemyManager = require("scripts/Enemy.lua")
Projectiles.collisionManager = require("scripts/Collision.lua")
P... |
-----------------------------------
-- Area: Western Altepa Desert
-- NPC: _3h0 (Altepa Gate)
-- !pos -19 12 131 125
-----------------------------------
local ID = require("scripts/zones/Western_Altepa_Desert/IDs")
-----------------------------------
function onTrade(player, npc, trade)
end
function onTrigger(player... |
pcreate = function(name,desc)
return {
PluginName = name,
PluginDescription = desc,
Commands = {}
}
end
paddcmd = function(plugin,name,listname,desc,aliases,func)
plugin.Commands[name] = {
ListName = listname,
Description = desc,
Aliases = aliases or {},
... |
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
local area = createCombatArea(AREA_CROSS5X5)
combat:setArea(area)
function onGetFormulaValues(player, level, maglevel)
min = -((level / 5) + (maglevel * 8) + 50)
max = -((lev... |
--[[-------------------------------------------------------------------------
Footsteps and logic.
- Overrides default footstepsounds with terrain-sounds
---------------------------------------------------------------------------]]
local NetL = {"npc_zombie", "npc_poisonzombie", "npc_vortigaunt", "npc_antlion", "npc_fa... |
local mongo = require "api-umbrella.utils.mongo"
local nillify_json_nulls = require "api-umbrella.utils.nillify_json_nulls"
local _M = {}
function _M.fetch(last_fetched_version)
local raw_result, err = mongo.first("config_versions", {
sort = "-version",
query = {
version = {
["$gt"] = {
... |
object_intangible_vehicle_basilisk_war_droid = object_intangible_vehicle_shared_basilisk_war_droid:new {
}
ObjectTemplates:addTemplate(object_intangible_vehicle_basilisk_war_droid, "object/intangible/vehicle/basilisk_war_droid.iff")
|
-- This file is subject to copyright - contact swampservers@gmail.com for more information.
-- INSTALL: CINEMA
surface.CreateFont("ScoreboardTitle", {
font = "Righteous",
size = 52,
weight = 400
})
surface.CreateFont("ScoreboardTitleSmall", {
font = "Righteous",
size = 36,
weight = 400
})
sur... |
-- =============================================================
-- Copyright Roaming Gamer, LLC. 2008-2018 (All Rights Reserved)
-- =============================================================
local files = ssk.files
local header =
[[
-- =============================================================
-- !!! T... |
--[[
Copyright (c) 2016-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
--]]
require('torch')
loc... |
return {'xiv'} |
object_tangible_component_armor_armor_segment_enhancement_assault = object_tangible_component_armor_shared_armor_segment_enhancement_assault:new {
}
ObjectTemplates:addTemplate(object_tangible_component_armor_armor_segment_enhancement_assault, "object/tangible/component/armor/armor_segment_enhancement_assault.iff")
|
-- Copyright 2022 Erick Israel Vazquez Neri
--
-- 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... |
local CassandraFactory = require "kong.dao.cassandra.factory"
local spec_helper = require "spec.spec_helpers"
local timestamp = require "kong.tools.timestamp"
local cassandra = require "cassandra"
local constants = require "kong.constants"
local DaoError = require "kong.dao.error"
local utils = require "kong.tools.util... |
function onEvent(name, value1, value2)
if name == 'Play Sound' then
playSound(value1, value2);
end
end |
local PLAYER = PLAYER or FindMetaTable("Player")
--Managing their data
local function ct(tbl, temp) -- Copy Table
local out = table.Copy(tbl)
for key, val in pairs(temp) do -- Loop through all items on the table
if istable(val) then -- If it's a table, we want to re-iterate
if not is... |
local class = {}
function class:MessageAble(ctx, http)
local Messageable = {}
function Messageable:send(message)
local msg = {
content = message,
tts = false
}
http:Route("POST", msg, ctx)
end
return M... |
--------------------------------
-- @module TransitionZoomFlipAngular
-- @extend TransitionSceneOriented
-- @parent_module cc
--------------------------------
-- @overload self, float, cc.Scene
-- @overload self, float, cc.Scene, int
-- @function [parent=#TransitionZoomFlipAngular] create
-- @param ... |
--[[ --- Day 23: Experimental Emergency Teleportation ---
]]--
local printf = function(s,...)
return io.write(s:format(...))
end
local fname = arg[1]
local verbose = (fname == '-v')
if verbose then fname = arg[2] end
local bots = {}
local maxr = 0
local maxb
local minx = 100000000000
local maxx = -1000000000... |
wind_harpy_tornado_checker_modifier = class({})
function wind_harpy_tornado_checker_modifier:OnCreated( kv )
self.damage = self:GetAbility():GetSpecialValueFor("damage")
end
function wind_harpy_tornado_checker_modifier:DeclareFunctions()
local funcs = {
MODIFIER_PROPERTY_TOOLTIP,
}
return... |
object_tangible_component_weapon_new_weapon_enhancement_melee_slot_one_s06 = object_tangible_component_weapon_new_weapon_shared_enhancement_melee_slot_one_s06:new {
}
ObjectTemplates:addTemplate(object_tangible_component_weapon_new_weapon_enhancement_melee_slot_one_s06, "object/tangible/component/weapon/new_weapon/en... |
--[[ ALGORITMO
É uma sequencia de comandos em uma ordem logica e sequencial a fim de realizar um objetivo pré definido.
Ex. Jogar papel no lixo
1 - Pegar o papel
2 - Amassar o papel
3 - Encontrar a lixeira
4 - Jogar o papel na lixeira
Ex. escovar os dentes
1 - Ir ao banheiro
2 - Abrir o armario
3 - Pegar a escova
4... |
--[[
AutoApply.lua
@Author : DengSir (tdaddon@163.com)
@Link : https://dengsir.github.io
]]
BuildEnv(...)
AutoApply = Addon:NewModule('AutoApply', 'AceEvent-3.0', 'AceBucket-3.0', 'AceTimer-3.0')
function AutoApply:OnInitialize()
self.applies = {}
self.events = {'LFG_LIST_SEARCH_RESULT_UPDATED', 'LFG_LI... |
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local S = E:GetModule('Skins')
--Lua functions
local _G = _G
--WoW API / Variables
local function LoadSkin()
if E.private.skins.blizzard.questChoice ~= true then return end
local QuestChoiceFrame = _G.QuestChoic... |
--if you wanna see the mouse X and Y coordinates turn this on
count = 0
mouseX = display.newText( count , display.contentCenterX, 60, native.systemFont, 40 )
mouseX:setFillColor( 0, 0, 0 )
mouseY = display.newText( count , display.contentCenterX, 120, native.systemFont, 40 )
mouseY:setFillColor( 0, 0, 0 )
local func... |
local middot = '·'
local raquo = '»'
local small_l = 'ℓ'
-- Override default `foldtext()`, which produces something like:
--
-- +--- 2 lines: source $HOME/.config/nvim/pack/bundle/opt/vim-pathogen/autoload/pathogen.vim--------------------------------
--
-- Instead returning:
--
-- »··[2ℓ]··: source $HOME/.config/... |
local logic = require "logic"
remote.add_interface("advanced-combinator", {
resolve = function(param, entity, current)
local logic_data = logic.logic[param.name]
if not logic_data then
error("No such function name: " .. param.name)
end
local parsed = logic.parse(logic_data, param.params, entity... |
arg = nil
-- import
flower = require "flower"
tests = require "tests"
require "LuaUnit"
-- setting
local screenWidth = MOAIEnvironment.horizontalResolution or 320
local screenHeight = MOAIEnvironment.verticalResolution or 480
local screenDpi = MOAIEnvironment.screenDpi or 120
local viewScale = math.floor(screenDpi / ... |
BANANA_SYMBOL_COLOR1 = "00f7f26c";
BANANA_SYMBOL_COLOR2 = "00f69218";
BANANA_SYMBOL_COLOR3 = "00cb32dd";
BANANA_SYMBOL_COLOR4 = "000fb20a";
BANANA_SYMBOL_COLOR5 = "008cb0c5";
BANANA_SYMBOL_COLOR6 = "00007aff";
BANANA_SYMBOL_COLOR7 = "00d7422e";
BANANA_SYMBOL_COLOR8 = "00e7e4d9";
BANANA_SYMBOL_COLORHM = "00d0d0d0";
BA... |
--[[
skyfactory_quests
================
Copyright (C) 2018-2019 Quentin Bazin
LGPLv2.1+
See LICENSE.txt for more information
]]--
local page = 2
quest_lib.pages[page] = {}
quest_lib.pages[page].quests = {
--[[{
name = 'Sieve Gravel, Sand or Dust to get ore pieces',
hint = 'default:gravel',
quest = 'pi... |
local folderOfThisFile = (...):match("(.-)[^%/%.]+$")
-- ゲームクラス
local Game = require(folderOfThisFile .. 'class')
-- クラス
local Application = require 'Application'
local Field = require 'Field'
-- 初期化
function Game:initialize(...)
Application.initialize(self, ...)
end
-- 読み込み
function Game:load(...)
-- スクリー... |
-----------------------------------------------------------------------------------------------------------------------
-- RedFlat map layout --
--------------------------------------------------------------------------------... |
TOOL.Category = "Marty's Tools"
TOOL.Name = "Binder"
TOOL.Information = {
{ name = "left" }
}
local boundNpcs = boundNpcs or {}
-- if SERVER then
-- util.AddNetworkString("BindNPC")
-- end
-- if CLIENT then
-- net.Receive("BindNPC", function(length)
-- local ent = net.ReadEntity()
-- local ragdol... |
local S = technic.getter
minetest.register_craft({
output = 'technic:wind_mill_frame 5',
recipe = {
{'technic:carbon_steel_ingot', '', 'technic:carbon_steel_ingot'},
{'', 'technic:carbon_steel_ingot', ''},
{'technic:carbon_steel_ingot', '', ... |
local M = {}
local sched=require 'sched'
local selector = require "tasks/selector"
local nixio = require 'nixio'
--executes s on the console and returns the output
local run_shell = function (s)
local f = io.popen(s) -- runs command
local l = f:read("*a") -- read output of command
f:close()
return l
end
M.init =... |
local http = require "lib.http.http";
local _M = {};
-- 发起请求,lua_resty_http
function _M.request(uri, options, timeout)
local is_success, code, response_body, response_err, response_header;
local httpc = http.new();
if (timeout == nil or timeout == ngx.null) then
timeout = 10000;
end
httpc:... |
-- optional wifi connection monitor
-- prints messages when wifi fails or gets restored
-- note wifi reconnection is normally an automatic & silent process. This lib prints advice.
wifidiscon = 0
wifi.eventmon.register(wifi.eventmon.STA_CONNECTED , function(T)
node.task.post(function () print("Wifi connect... |
pp(package.cpath)
local uv = require('luv')
local function create_server(host, port, on_connection)
local server = uv.new_tcp()
server:bind(host, port)
server:listen(128, function(err)
-- Make sure there was no problem setting up listen
assert(not err, err)
-- Accept the client
local client =... |
-- $Id: language.us.lua 18737 2010-06-04 17:09:02Z karl $
--[[
language.us.dat (and the start of language.dat.lua), used by:
- a special luatex version of hyphen.cfg (derived from the babel system);
- a special luatex version of etex.src (from the e-TeX distributon).
See luatex-hyphen.pdf (currently part of the hyph-u... |
CompositeEntities = {
data = {}
-- [""} = {
-- base_entity = "",
-- component_entities =
-- {
-- entity_name = "",
-- offset = { x=0, y=0 },
-- operable=false,
-- lable="train-stop-name"
-- }
-- }
}
-- global.composite_entities = { { type="name", entity_list = {} } }
-- global.compo... |
local gct = require("gpioctrl")
gct:Low(4)
server_run = false
function StartServer()
--print("Start Http Server!")
dofile('logicserver.lc')
server_run = true
gct:High(4)
end
wifi.ap.config({ ssid = 'NodeMCU', auth = wifi.WPA_WPA2_PSK,pwd="779686611" });
wifi.ap.setip({ip="1.8.8.1",netmask="255.255.25... |
--[[
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... |
-- utils.lua
local M = {} -- The module to export
local cmd = vim.cmd
-- helper function to create maps
function M.map(mode, lhs, rhs, opts)
local options = {noremap = true}
if opts then options = vim.tbl_extend('force', options, opts) end
vim.api.nvim_set_keymap(mode,... |
local mg = require "moongen"
local memory = require "memory"
local device = require "device"
local ts = require "timestamping"
local stats = require "stats"
local hist = require "histogram"
local PKT_SIZE = 80
local ETH_DST = "11:12:13:14:15:16"
local function getRstFile(...)
local args = { ... }
for i, ... |
local api = trinium.api
local S = tinker.S
local tool_station_formspec = [[
size[8,6.5]
list[context;inputs;1,0;3,2;]
list[context;output;6,0.5;1,1;]
list[current_player;main;0,2.5;8,4;]
listring[context;output]
listring[current_player;main]
listring[context;inputs]
image[4.5,0.5;1,1;trinium_gui.arrow.png]
]]
... |
-- This uses
-- The global awesome object
-- the global screen class : https://awesomewm.org/doc/api/classes/screen.html
-- the global client class : https://awesomewm.org/doc/api/classes/client.html
-- luacheck: globals screen client awesome
-- If LuaRocks is installed, make sure that packages installed through it ar... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.