content stringlengths 5 1.05M |
|---|
return {
version = "1.5",
luaversion = "5.1",
tiledversion = "1.7.2",
orientation = "orthogonal",
renderorder = "right-down",
width = 16,
height = 16,
tilewidth = 16,
tileheight = 16,
nextlayerid = 5,
nextobjectid = 44,
properties = {},
tilesets = {
{
name = "dungeon-tileset",
... |
-- $Id$
--******************************************************************************
-- Copyright 2002 Noemi Rodriquez & Roberto Ierusalimschy. All rights reserved.
--******************************************************************************
--------------------------------------------------------------------... |
------------------------------------------------------------------------------
-- Test programs.
-- Copyright © 2013–2015 Peter Colberg.
-- Distributed under the MIT license. (See accompanying file LICENSE.)
------------------------------------------------------------------------------
require("strict")
pcall(require... |
filename = "lua-dns.log"
function init (args)
local needs = {}
needs["protocol"] = "dns"
return needs
end
function setup (args)
SCLogNotice("lua: setup()")
file = assert(io.open(SCLogPath() .. "/" .. filename, "w"))
end
function log(args)
ts = SCPacketTimeString()
ip_ver, src_ip, dst_ip, proto, ... |
local md = require('lmbedtls.md')
local utils = require('util')
local assert = require('assert')
local tap = require('util/tap')
--console.log(md)
local test = tap.test
test("test md", function()
assert.equal(utils.hexEncode(md.md5('test')), "098f6bcd4621d373cade4e832627b4f6")
assert.equal(utils.hexEncode(md.... |
scriptId = 'com.tylercasson.scripts.missionControl'
-- Global:
-- Spread Fingers to toggle Mission Control
-- Make a Fist to toggle Application Windows for the current application
-- Mission Control:
-- Wave Left to move right a space
-- Wave Right to move left a space
-- Application Windows:
-- ... |
local playerModule = {}
function playerModule.newplayer (width, height)
local x, y = width/2 - 10, height/2 - 10
local rotation = 0
return {
try = function ()
return x
end,
update = function (dt)
-- x = x + 0.5
-- if x > width then
-- x = 0
-- end
end,
draw = fu... |
-- Part of BioLua by SweetPalma, 2017. All rights reserved.
-- BioLua OOP system unit tests:
describe('biolua.object', function()
local Object, Vector, vector
it('Successfully imports', function()
Object = require 'biolua.object'
assert.type('table', Object)
end)
it('Successfully extends using :extend', func... |
--[[------------------------------------------------------
# osc send client
This is a simple UDP client (based on lens.Socket) to send OSC messages.
NOTE: This class needs the [lens](http://doc.lubyk.org/lens.html) library.
## Usage example
local osc = require 'osc'
client = osc.Client('127.0.0.1'... |
--[[
© CloudSixteen.com do not share, re-distribute or modify
without permission of its author (kurozael@gmail.com).
Clockwork was created by Conna Wiles (also known as kurozael.)
http://cloudsixteen.com/license/clockwork.html
--]]
-- A function to load the shipments.
function cwSaveItems:LoadShipments()
local s... |
--[[--- A C lexical scanner using LPeg.
= CREDITS
= based on the C lexer in Peter Odding's lua-lxsh
@module macro.clexer
--]]
local clexer = {}
local lpeg = require 'lpeg'
local P, R, S, C, Cc, Ct = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Cc, lpeg.Ct
-- create a pattern which captures the lua value [id] and the input ma... |
-- 封装一些与数组有关的操作
-- @verson 1.0
-- @author 拐 <geyunfei@gmail.com>
-- @date Oct 10th,2018
local M = {}
M._VERSION = "1.0"
local mt = { __index = M }
-- 取一个table中每个元素的key值
function M:get_by_key (array ,key )
local res = {}
for i , v in ipairs(array) do
res[i] = v[key]
end
return res
end
function M:group_by_key... |
system_configs =
{
delete_stop = false,
slots = 100,
default_info = [[ Hola, Aqui debes colocar la informacion de tu grupo ]],
default_color1 = "#00ff00",
default_color2 = "#ffffff",
GUI_co_effect = false
}
|
return {'bie','bieb','biecht','biechtbriefje','biechteling','biechtelinge','biechten','biechtgeheim','biechthokje','biechtspiegel','biechtstoel','biechtvader','bieden','bieder','biedermeier','biedgedrag','bieding','biedingsbericht','biedingsoorlog','biedingsproces','biedingsstrijd','biedkoers','biedoorlog','biedplicht'... |
AddCSLuaFile()
DEFINE_BASECLASS( "base_gmodentity" )
ENT.PrintName = "Lamp"
ENT.Editable = true
AccessorFunc( ENT, "Texture", "FlashlightTexture" )
-- Set up our data table
function ENT:SetupDataTables()
self:NetworkVar( "Bool", 0, "On", { KeyName = "on", Edit = { type = "Boolean", order = 1, title = ... |
local mod = DBM:NewMod(192, "DBM-Firelands", nil, 78)
local L = mod:GetLocalizedStrings()
local sndWOP = mod:SoundMM("SoundWOP")
mod:SetRevision(("$Revision: 79 $"):sub(12, -3))
mod:SetCreatureID(52498)
mod:SetZone()
mod:RegisterCombat("combat")
mod:RegisterEventsInCombat(
"SPELL_AURA_APPLIED",
"SPELL... |
addEventHandler("onClientResourceStart", resourceRoot,
function ()
b1 = guiCreateButton(429, 272, 136, 123, "", false)
guiSetAlpha(b1, 0.00)
guiSetProperty(b1, "NormalTextColour", "FFAAAAAA")
b2 = guiCreateButton(600, 273, 136, 123, "", false)
guiSetAlpha(b2, 0.0... |
function shorten_str (str)
if str:len() > 30 then
return str:sub(1,30) .. ".."
else
return str
end
end
require'lualine'.setup {
options = {
theme = 'auto',
section_separators = {'', ''},
component_separators = {'', ''}
},
sections = {
lualine_a = ... |
local finders = require('telescope.finders')
local pickers = require('telescope.pickers')
local actions = require('telescope.actions')
local conf = require('telescope.config').values
local function file_exists(file)
local f = io.open(file, "rb")
if f then f:close() end
return f ~= nil
end
local function read_fi... |
Assets = require "modules/assets"
MapTools = require "modules/MapTools"
Settings = require "modules/Settings"
l = require "modules/l"
-- local defaultImg = Assets.images.enemy_lvl_1
counter = 0
-- Pawns (enemies)
enemy = {
state = 1,
name = 'Enemy',
img = Assets.enemies[1],
xPos = 65,
yPos = 129,
prevTile =... |
{
["xOffset"] = -404.99997701562,
["BFbackdrop"] = false,
["yOffset"] = -160.00002024313,
["anchorPoint"] = "CENTER",
["customTextUpdate"] = "update",
["actions"] = {
["start"] = {
["do_glow"] = true,
["glow_frame"] = "WeakAuras:++Focus",
["glow_action... |
return {
lintCommand = "rustfmt",
lintStdin = true,
formatCommand = "rustfmt",
formatStdin = true
}
|
local local0 = 2.2
local local1 = 0 - local0
local local2 = 0 - local0
local local3 = 0 - local0
local local4 = 0 - local0
local local5 = 0 - local0
local local6 = 0 - local0
local local7 = 0 - local0
local local8 = 3.2 - local0
local local9 = 0 - local0
local local10 = 6.4 - local0
local local11 = 0 - local0
local loc... |
-----------------------------------------------------
-- Battery widget for Awesome WM
-- based on battery widget from:
-- https://github.com/streetturtle/awesome-wm-widgets
-----------------------------------------------------
local wibox = require("wibox")
local spawn = require("awful.spawn")
local timer = require("... |
object_tangible_component_weapon_core_weapon_core_melee_advanced = object_tangible_component_weapon_core_shared_weapon_core_melee_advanced:new {
}
ObjectTemplates:addTemplate(object_tangible_component_weapon_core_weapon_core_melee_advanced, "object/tangible/component/weapon/core/weapon_core_melee_advanced.iff")
|
world = require("World")
local Entity = require("Entity")
local Hunter = require("Hunter")
local Rabbit = require("Rabbit")
local RedScore = 0
local BlueScore = 0
DEBUG = false
debuglog = ""
g_state = nil
stateSwitcher = require("StateSwitcher")
function love.load( args )
stateSwitcher.load(args,"MenuState")... |
--2
local ws = require('websocket')
local conf = {}
local sides = {
"left", "right", "back"
}
function setSides(count)
for i = 1, table.getn(conf.sides) do
redstone.setOutput(conf.sides[i], i <= count)
end
end
function init()
local filename = 'var/signal.conf'
if fs.exists(filename) then
... |
function removequotes(text)
if string.len(text) > 1 then
if string.sub(text, 1, 1) == "\"" and string.sub(text, string.len(text), string.len(text)) == "\"" then
return string.sub(text, 2, string.len(text) - 1)
else
return text
end
elseif string.len(text) == 1 and string.sub(text, 1, 1) ~= "\"" then
retu... |
-- ZPU base instructions implementation
-- this file contains the implementations of the opcodes(returned as opcode table).
-- most code by vifino, some improvements by max1220
local bitlib = require("bitlib")
local bnot = assert(bitlib.bnot)
local band = assert(bitlib.band)
local bor = assert(bitlib.bor)
local bxor =... |
-- This code is part of Qiskit.
--
-- Copyright IBM 2020
math.randomseed(os.time())
function QuantumCircuit ()
local qc = {}
local function set_registers (n,m)
qc.num_qubits = n
qc.num_clbits = m or 0
end
qc.set_registers = set_registers
qc.data = {}
function qc.initialize (ket)
ket_copy =... |
local function Event(callback, instance)
local object = {}
object.callback = callback
object.instance = instance
function object:handle_messages(message_id, message, sender)
if message_id == hash("handle_event") then
if instance ~= nil then
self.callback(instance)
else
self.callback()
... |
return function(player, context, instance, properties)
local newProperties = {}
for _, index in pairs(properties) do
local property = context.RbxAPI.GetIndexProperty(index)
newProperties[property] = true
end
local node = context.Nodes.GetNode(instance)
if node then
if next(newProperties) then
node:_setRe... |
--requires = {'kyazdani42/nvim-web-devicons', opt = true},
--config = function()
--[[
require'lualine'.setup{
options = {
theme = 'gruvbox',
section_separators = {'', ''},
component_separators = {'', ''},
icons_enabled = true,
},
sections = {
l... |
---
-- @section voice_manager
---
-- Whether or not the @{Player} can use the voice chat.
-- @note Has to be registered on both client and server to hide the UI
-- element and stop the voicechat
-- @param Player ply @{Player} who wants to use the voice chat
-- @param boolean isTeam Are they trying to use the team voi... |
fx_version 'cerulean'
games { 'gta5' }
lua54 'yes'
author 'CharlesHacks#9999'
description '3D positional audio library for FiveM.'
version '0.0.1'
--
-- Server
--
server_scripts {
'config.lua',
'server/server.lua',
}
--
-- Client
--
client_scripts {
'config.lua',
'client/client... |
local idl = require "oil.corba.idl"
local base = require "oil.tests.corba.cdr.base"
local suite = base.newsuite(...)
--------------------------------------------------------------------------------
for name in pairs(idl.BasicTypes) do
suite:add(name, idl.TypeCode, idl[name])
end
------------------------... |
fct2 = math.random(6) + 2;
tp = math.floor(1000/fct2)
res = math.random(tp - 110) + 110;
fct1 = res * fct2
val1 = math.floor(fct1/(fct2*100))
ost1 = fct1 - val1 * 100 *fct2
val2 = math.floor(ost1/(fct2*10))
ost2 = ost1 - val2 * 10 * fct2
if (ost2 == 0) then
res = res - 1
fct1 = res * fct2
val1 = math.fl... |
return {
vulkan = {[[C:\VulkanSDK\1.1.130.0\Include]]}
} |
local PATH = (...):gsub('%.[^%.]+$', '')
local ffi = require "ffi"
local Transform = require(PATH..".transform")
local Mesh = {}
-- The vertex format for the model mesh
Mesh.modelFormat = {
{"VertexPosition", "float", 3},
{"VertexTexCoord", "float", 2},
}
-- The vertex format for the model attributes mesh
Mes... |
---
BLEND_ZERO = 0
---
BLEND_ONE = 1
---
BLEND_DST_COLOR = 2
---
BLEND_ONE_MINUS_DST_COLOR = 3
---
BLEND_SRC_ALPHA = 4
---
BLEND_ONE_MINUS_SRC_ALPHA = 5
---
BLEND_DST_ALPHA = 6
---
BLEND_ONE_MINUS_DST_ALPHA = 7
---
BLEND_SRC_ALPHA_SATURATE = 8
---
BLEND_SRC_COLOR = 9
---
BLEND_ONE_MINUS_SRC_COLOR = 10
---
BLENDFUNC_AD... |
function Rokmar_Grievous_Wound(Unit, event, miscunit, misc)
print "Rokmar Grievous Wound"
Unit:FullCastSpellOnTarget(30923,Unit:GetClosestPlayer())
Unit:SendChatMessage(11, 0, "Bad wound...")
end
function Rokmar_Water_Split(Unit, event, miscunit, misc)
print "Rokmar Water Split"
Unit:FullCastSpellOnTarget(38973,U... |
--[[
© 2020 TERRANOVA do not share, re-distribute or modify
without permission of the author.
--]]
ITEM.name = "Glasses";
ITEM.model = "models/props_junk/cardboard_box004a.mdl";
ITEM.outfitCategory = "glasses";
ITEM.category = "Clothing";
ITEM.description = "Glasses Base";
ITEM.width = 1;
ITEM.height = 1;
ITEM.price... |
local plugin = require 'bluegate.plugins.plugin'
local util = require 'bluegate.utils.util'
local pretty = require 'pl.pretty'
local strx = require "pl.stringx"
local db = require "bluegate.dao.factory"
local node = require "bluegate.node"
local LogHandler = plugin.extend()
LogHandler.PRIORITY = 9000
LogHandler.VERS... |
--[[
Flappy Bird Clone
Lua Build for Love2d
BaseState for state passed from StateMachine
Defines behavior and updates/rendering
Author: Troy Martin
beef.erikson.studios@gmail.com
]]
BaseState = Class{}
function BaseState:init() end
function BaseState:enter() end
function BaseState:exit() end... |
local Context = require "context"
local MMC = require "mmc"
usage = [[mmc [OPTIONS]\n
-h/--help: Print this help.\n
-i/--input PATH: Input path to compress (file or dir).\n
-o/--output PATH: compression destination.\n
--overwrite: Overwrite the input content.\n
-c/--compression-level LEVEL: Compression level... |
local centerOfMass = {}
local realVeh = nil
function math.round(number, decimals, method)
decimals = decimals or 0
local factor = 10 ^ decimals
if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor
else return tonumber(("%."..decimals.."f"):format(number)) end
en... |
local XMLUtils = {}
local _buffer = {}
local _entities = { amp=38, apos=39, gt=62, lt=60, nbsp=32, quot=34 }
function XMLUtils.encode(str)
str = string.gsub(str, "&", "&")
str = string.gsub(str, "<", "<")
str = string.gsub(str, ">", ">")
str = string.gsub(str, "'", "'")
return str
... |
table.append = table.insert
table.empty = function (t)
return next(t) == nil
end
table.size = function (t)
local size = 0
for i, n in pairs(table) do
size = size + 1
end
return size
end
table.find = function (table, value, sensitive)
local sensitive = sensitive or true
if(not sensitive and type(value) == "s... |
data.raw["gui-style"].default["heli-listbox_button"] =
{
type = "button_style",
parent = "button",
font = "default-bold",
align = "left",
scalable = true,
height = 23,
top_padding = 0,
right_padding = 0,
bottom_padding = 0,
left_padding = 5,
left_click_sound =
{
{
filename = "__core... |
--[[
XmlRpc.lua
Depends on LrXml.
--]]
local XmlRpc, dbg = Object:newClass{ className = 'XmlRpc' }
--- Constructor for extending class.
--
function XmlRpc:newClass( t )
return Object.newClass( self, t )
end
--- Constructor for new instance.
--
-- @param t ... |
-- Tue Aug 6 17:30:49 2019
-- (c) Alexander Veledzimovich
-- ui PHOTON
-- lua<5.3
local utf8 = require('utf8')
local unpack = table.unpack or unpack
local nuklear = require('nuklear')
local set = require('editor/set')
local UI = {}
function UI.editor(nk,PS)
local PH = PS.photons[PS.systems.value]
nk:frame... |
meta.name = "TAS Tool"
meta.version = "WIP"
meta.description = "STILL BUGGY AND RERECORD DOESN'T WORK PERFECTLY! This is The Tool for Tool Assisted Speedrunning Spelunky 2, to be used in seeded runs with Overlunky frame advance features. In a TAS, you record your inputs frame by frame, with the ability to rerecord your... |
local ffi = require("ffi");
local Application = require("Application");
local NativeSocket = require("NativeSocket");
local ws2_32 = require("ws2_32");
Application:setMessageQuanta(5);
local SocketServer = {}
setmetatable(SocketServer, {
__call = function(self, ...)
return self:create(...);
end,
});
local... |
-- Include Guard
--#if(includeGuard()) then return end
-- Use single big table or many small tables?
#local LIST_IN_SINGLE_TBL = false
#local ENTRY_CACHE = false
#local LAST_REF = true
#if(LIST_IN_SINGLE_TBL) then
#local FIRST = 1
#local LAST = 2
local function listCreate(tbl)
local lst = {false, f... |
local love = require('love')
local RenderSystem = ECS.System({
pool = {"position", "render"}
})
function RenderSystem:draw()
for _, e in ipairs(self.pool) do
love.graphics.circle("fill", e.position.x, e.position.y, 5)
end
end
return RenderSystem
|
--加载并运行LUA代码,同时设置一些关键路径
local args = {}
--string.gmatch (s, pattern)
--返回一个迭代器函数。 每次调用这个函数都会继续以 pattern (参见 §6.4.1) 对 s 做匹配,并返回所有捕获到的值。 如果 pattern 中没有指定捕获,则每次捕获整个 pattern
for word in string.gmatch(..., "%S+") do --这里pattern表达的意思是 非空白字符一次或多次
table.insert(args, word)--插入到args中
end
--所以上面处理的结果就是,如果传入的参数是a b c ... |
TomTomDB = {
["profileKeys"] = {
["Nevaar - Thrall"] = "Default",
["Ischozar - Thrall"] = "Default",
["Drâon - Thrall"] = "Default",
},
["profiles"] = {
["Default"] = {
["general"] = {
["announce"] = true,
},
["arrow"] = {
["lock"] = true,
["position"] = {
"TOP", -- [1]
nil, -... |
-- test_comp_netstream.lua
Computicle = require("Computicle");
local comp = Computicle:createFromFile("comp_getbing.lua");
comp:waitForFinish();
|
--[[
-- added by wsh @ 2017-12-01
-- UILogin控制层
--]]
---@class UILoginCtrl:UIBaseCtrl
local UILoginCtrl = BaseClass("UILoginCtrl", UIBaseCtrl)
---@return UIBaseCtrl
local base = UIBaseCtrl
local calkmm = function(arg)
local msg = pb.decode("cs.CSLoginReq", arg)
Logger.LogError(msg.UserName)
local list = msg... |
-----------------------------------
--
-- Zone: Grand_Palace_of_HuXzoi (34)
--
-----------------------------------
require("scripts/zones/Grand_Palace_of_HuXzoi/globals");
local ID = require("scripts/zones/Grand_Palace_of_HuXzoi/IDs");
require("scripts/globals/conquest");
require("scripts/globals/status");
------------... |
slimes = {}
--big slimes
minetest.register_entity("slimes:slime_big", {
initial_properties = {
physical = true,
collide_with_objects = false,
collisionbox = {-2.5,-2.5,-2.5, 2.5,2.5,2.5},
visual = "mesh",
mesh = "slime_big.x",
--visual_size = {3,3},slime_inside
textures = {"slime_outside.png","slime_in... |
f = compiler.load("local a = 2 return 1 and a");
assert(f and type(f) == 'function')
assert(f() == 2)
print 'Ok' |
--- Injects luarocks modules installed at ./rocks_modules into your love game.
-- See http://github.com/Alloyed/loverocks for details
-- (c) Kyle McLamb, 2015 <alloyed@tfwno.gf>, MIT License.
-- TODO: Configurable prefixes, binary modules
local function inject()
local luarocks_paths = {
"rocks/share/lua/5.1/?.lu... |
--[[
Tests for the fizz buzz module
--]]
local fizz_buzz = require 'src/random/fizz_buzz'
describe('fizz buzz', function()
it('should return number if number is not divisible by 3 or 5', function()
assert.is.equal(1, fizz_buzz(1))
assert.is.equal(2, fizz_buzz(2))
assert.is.equal(4, fizz_buzz(4))
end)
... |
simvis_attributes =
{
melee_size = 2,
melee_block_ratio = 80,
melee_unsynced_damage_ratio = 7,
selection_volume = 1,
selection_ground = 1,
-- Shadow Types:
-- 0 = None
-- 1 = blob (rotated by light dir)
-- 2 = blob (rotated by object dir)
-- 3 = shadow map
-- 4 = stencil shadow volume
sha... |
require("__subterra__.scripts.utils")
if not subterra.tick_events then subterra.tick_events = {} end
local check_telepads = require("__subterra__.scripts.events.updates.check_telepads")
local update_belt_elevators = require("__subterra__.scripts.events.updates.update_belt_elevators")
local update_power = require("__s... |
-- Copyright 2016 The Cartographer Authors
--
-- 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 Modules = game:GetService("Players").LocalPlayer.PlayerGui.AvatarEditorInGame.Modules
local AvatarEditorService = game:GetService("AvatarEditorService")
local Logging = require(Modules.Packages.Logging)
local Promise = require(Modules.Packages.Promise)
local PerformFetch = require(Modules.NotLApp.Thunks.Perform... |
local trinketBurntMatch =
TrinketPatches.util.registerEID("5% chance to turn fire into lower tier fire") ..
Isaac.GetTrinketIdByName("Burnt Match")
-- Make sure it doesn't appear regularly
local f =
TrinketPatches.util.register("MC_POST_GAME_STARTED") ..
function()
TrinketPatches.game:GetItemPool():RemoveTrinket(t... |
----------------------------------------------------------------
-- Copyright (c) 2012 Klei Entertainment Inc.
-- All Rights Reserved.
-- SPY SOCIETY.
----------------------------------------------------------------
local simdefs = include( "sim/simdefs" )
local simquery = include( "sim/simquery" )
local array = inclu... |
_G = _G
local os = _G.os
local ipairs, pairs, table, string, collectgarbage = ipairs, pairs, table, string, collectgarbage
local arg = arg
local print, type, tostring = print, type, tostring
local getfenv = getfenv
local tonumber = tonumber
local tinsert = table.insert
local gsub = string.gsub
local find = string.find
... |
local _, ns = ...
local _, _, L = unpack(ns)
--if GetLocale() ~= "enUS" then return end
L["Version Check"] = "Only support NDui v%s"
L["Changelog"] = "Changelog"
L["Option Tips"] = "|nOptions not marked with an asterisk (*) require an UI Reload.|n|nDouble click on slider header would reset its value."
L["Tips"] = "Tip... |
return [==[
/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery.min.map
*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function... |
local ArenaSprite, super = Class(Object)
function ArenaSprite:init(arena, x, y)
super:init(self, x, y)
self.arena = arena
self.width = arena.width
self.height = arena.height
self:setScaleOrigin(0.5, 0.5)
self:setRotationOrigin(0.5, 0.5)
self.background = true
self.debug_select = fa... |
require("scripts/globals/mixins")
require("scripts/globals/status")
g_mixins = g_mixins or {}
g_mixins.maat = function(mob)
mob:addListener("SPAWN", "JOB_SPECIAL_SPAWN", function(mob)
if (mob:getMainJob() == tpz.job.NIN) then
mob:setLocalVar("specialThreshold", 40)
elseif (mob:getMai... |
uart.setup(0,9600,8,0,1,0)
sv=net.createServer(net.TCP, 60)
global_c = nil
sv:listen(9999, function(c)
if global_c~=nil then
global_c:close()
end
global_c=c
c:on("receive",function(sck,pl) uart.write(0,pl) end)
end)
uart.on("data",4, function(data)
if global_c~=nil then
global_c:send(data)
end
end, 0)
|
local AS = unpack(AddOnSkins)
if not AS:CheckAddOn('ModelPique') then return end
function AS:ModelPique()
AS:SkinFrame(ModelPiqueFrame)
ModelPiqueFrame:SetTemplate("Transparent")
AS:SkinButton(ModelPiqueFrameCancelButton)
AS:SkinCloseButton(ModelPiqueFrameCloseButton)
AS:Kill(ModelPiqueFramePortrait)
--Reposit... |
---@diagnostic disable: lowercase-global, undefined-global
--[[----------------------------------------------------如何创建一个样式----------------------------------------------------
--1. 创建一个样式
style = lvgl.style_t()
--2. 为样式进行初始化
lvgl.style_init(style)
--3. 添加具体的样式
lvgl.style_set_bg_opa(style, lvgl.STATE_DEFAULT, lvgl.OPA_... |
local UIBase = require('ui.UIBase')
local SkillRewardView = class("SkillRewardView",UIBase)
local LoopScrollRect = require("ui.uiScripts.SkillRewardScrollComponent")
local upperLeft = Vector2(230,-6)
local xOffset = -15
local spaceY = 97
local itemScript = "ui.uiScrip... |
-----------------------------------
-- Area: Crawlers Nest [S]
-- NPC: Kalsu-Kalasu
-- !pos 304.768 -33.519 -19.168 171
-- Notes: Gives Green Letter required to start "Snake on the plains"
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/keyitems");
local ID = require("... |
-- This is an experiment to see how fast ffi calls are and how ugly/pretty
-- the bindings are.
local FFI = require('ffi')
local Fs = require('fs')
local Path = require('path')
-- Read the combined libuv and http_parser header file
FFI.cdef(Fs.read_file_sync(Path.join(__dirname, "ffi_uv.h")))
local C = FFI.C
local ... |
local M = {}
function M.config()
require("indent_blankline").setup({
char = "│",
use_treesitter = true,
show_current_context = false,
max_indent_increase = 1,
show_trailing_blankline_indent = false,
filetype_exclude = {
"Preview",
"__doc__",
... |
local Data = require "nvim-lsp-installer.data"
local log = require "nvim-lsp-installer.log"
local fetch = require "nvim-lsp-installer.core.fetch"
local spawn = require "nvim-lsp-installer.core.spawn"
local list_find_first = Data.list_find_first
local M = {}
---@alias GitHubRelease {tag_name:string, prerelease: boole... |
#include "scripts/utils.lua"
#include "scripts/savedata.lua"
#include "scripts/menu.lua"
#include "datascripts/keybinds.lua"
#include "datascripts/inputList.lua"
#include "datascripts/color4.lua"
toolName = "shapecollapsor"
toolReadableName = "Shape Collapsor"
local menu_disabled = false
local aabbActive = false
lo... |
local Chara = Elona.require("Chara")
local Enums = Elona.require("Enums")
local FOV = Elona.require("FOV")
local GUI = Elona.require("GUI")
local I18N = Elona.require("I18N")
local Math = Elona.require("Math")
local Skill = Elona.require("Skill")
local Rand = Elona.require("Rand")
local eating_effect = {}
local funct... |
local jwt = require "resty.jwt"
local json = require "guan.utils.json"
local BasePlugin = require("guan.plugins.base")
local ngx_re_gmatch = ngx.re.gmatch
local string_gsub = string.gsub
local function retrieve_token(request)
local authorization_header = request.get_headers()['authorization']
if authorization_... |
--[[Dalliah the Doomsayer yells: Ahh... just what I needed.
Dalliah the Doomsayer yells: Completely ineffective. Just like someone else I know.
Dalliah the Doomsayer yells: Congratulations. I've wanted to do that for years.
Dalliah the Doomsayer yells: Don't worry about me; kill that worthless dullard instead!
Dalliah ... |
DarthCaedusCave = ScreenPlay:new {
numberOfActs = 1,
screenplayName = "DarthCaedusCave"
}
registerScreenPlay("DarthCaedusCave", true)
function DarthCaedusCave:start()
if (isZoneEnabled("mandalore")) then
self:spawnMobiles()
end
end
function DarthCaedusCave:spawnMobiles()
--Cave of Darth Caedus
spawnMobil... |
local Modules = game:GetService("Players").LocalPlayer.PlayerGui.AvatarEditorInGame.Modules
local Roact = require(Modules.Packages.Roact)
local UIBlox = require(Modules.Packages.UIBlox)
local withStyle = UIBlox.Style.withStyle
local withLocalization = require(Modules.Packages.Localization.withLocalization)
local Imag... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:29' 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... |
local authorize = require 'http.middleware.authorize'
local request = require 'http.functional.request'
local writer = require 'http.functional.response'
local describe, it, assert = describe, it, assert
describe('http.middleware.authorize', function()
it('extends time left', function()
local options = {
... |
local os, string, table = os, string, table
local gears = require('gears')
local glib = require('lgi')
local Container = require('sanity/util/container')
local text = require('sanity/util/text')
local DateTime = glib.GLib.DateTime
local TimeZone = glib.GLib.TimeZone
local spawn = require('awful.spa... |
local Attributor = {}
Attributor.__index = Attributor
function Attributor:getAttr(node, attrName)
local node_ = node
if node.__isPocoNodeWrapper__ == nil then
node_ = node[1]
end
return node_:getAttr(attrName)
end
function Attributor:setAttr(node, attrName, attrVal)
local node_ = node
... |
local M = {}
local sched=require 'sched'
local toribio = require 'toribio'
M.init = function(conf)
sched.run(function()
local file = io.open(conf.outfile or 'data.log', 'w')
local motor = toribio.wait_for_device(conf.motorname)
while true do
local l = motor:get_load()
print(l)
file:write(l..'\n')
fil... |
invoker_ghost_walk_lua = class({})
LinkLuaModifier( "modifier_invoker_ghost_walk_lua", "lua_abilities/invoker_ghost_walk_lua/modifier_invoker_ghost_walk_lua", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_invoker_ghost_walk_lua_debuff", "lua_abilities/invoker_ghost_walk_lua/modifier_invoker_ghost_walk_lua_debuf... |
ghomrassen_giant_canyon_krayt_dragon_lair_neutral_large = Lair:new {
mobiles = {{"gr_giant_canyon_krayt_dragon",1},{"gr_canyon_krayt_dragon",2}},
spawnLimit = 9,
buildingsVeryEasy = {"object/tangible/lair/base/poi_all_lair_bones_large_evil_fire_red.iff"},
buildingsEasy = {"object/tangible/lair/base/poi_all_lair_bon... |
--// services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
--// modules
local EZReplicator = require(ReplicatedStorage:WaitForChild("EZReplicator"))
--// wait for main subscription
local MAIN_SUBSCRIPTION = EZReplicator:WaitForSubscription("MAIN")
--// detect when a property has been chang... |
-- This example shows how to create a new sprite stacking all the
-- other sprites each in one layer.
if #app.sprites < 1 then
return app.alert "You should have at least one sprite opened"
end
local bounds = Rectangle()
for i,sprite in ipairs(app.sprites) do
bounds = bounds:union(sprite.bounds)
end
local functio... |
local Source = {}
Source.new = function()
return setmetatable({}, { __index = Source })
end
Source.get_metadata = function(_)
return {
priority = 100;
dup = 1;
menu = '[Omni]';
}
end
Source.determine = function(self, context)
if vim.bo.omnifunc == '' then
return nil
end
local keyword_pat... |
local ffi = require("ffi")
local C = ffi.load('./libcogshared')
ffi.cdef[[
//cog_types.h
//types
typedef int cog_anim_id;
typedef int cog_snd_id;
typedef int cog_sprite_id;
typedef int cog_text_id;
typedef int cog_text_multiline_id;
typedef void* cog_dataptr;
typedef char* cog_string;
typedef struct cog_pos2 {
d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.