content stringlengths 5 1.05M |
|---|
--
-- (mostly) generalized version of the layout editor
-- reused in streaming and in remote control scripts
--
-- uses; colourtable, listview support scripts
-- also requires the global symbols settings, soundmap, dispatch_push and dispatch_pop
--
-- suggestions for future changes;
--
-- (*) better mouse support (cur... |
-- multi api compat
local compat = pfQuestCompat
pfDatabase = {}
local loc = GetLocale()
local dbs = { "items", "quests", "quests-itemreq", "objects", "units", "zones", "professions", "areatrigger", "refloot" }
local noloc = { "items", "quests", "objects", "units" }
pfDB.locales = {
["enUS"] = "English",... |
-- Copyright 2015 Boundary, Inc.
--
-- 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 i... |
--
--------------------------------------------------------------------------------
-- FILE: wire_format.lua
-- DESCRIPTION: protoc-gen-lua
-- Google's Protocol Buffers project, ported to lua.
-- https://code.google.com/p/protoc-gen-lua/
--
-- Copyright (c) 2010 , ๆๅๆฏ
(Zhuoyi Lin) netsnail@gma... |
local event = require('core.event')
local memory = require('memory')
local packets = require('packets')
local server = require('shared.server')
local struct = require('struct')
local data = server.new(struct.struct({
logged_in = {struct.bool},
name = {struct.string(0x10)},
id ... |
local skynet = require "skynet.manager"
local stm = require "skynet.stm"
local QueueMap = require "meiru.lib.queuemap"
local Markdown = require "meiru.lib.md"
local __queue_map = QueueMap(300)
local function markdown_file(path)
if os.mode == 'dev' then
local content = io.readfile(path)
if not c... |
--[[------------------------------------------------------------------
CONFIGURATION
Manages serverside and clientside configuration
]]--------------------------------------------------------------------
-- Include menu
HL2PICKUP:IncludeFile("menu.lua");
if CLIENT then
-- Default configuration
local DEFAULT_... |
class 'CBoardHud'
function CBoardHud:__init( CBoardClient, width, height, columns )
if LocalPlayer:GetValue( "Creator" ) then
self.status = "[ะะพัะปัะน ะกะพะทะดะฐัะตะปั] "
self.color = Color( 63, 153, 255 )
elseif LocalPlayer:GetValue( "GlAdmin" ) then
self.status = "[ะะป. ะะดะผะธะฝ] "
self.color = Color( 255, 48, ... |
-- The network module.
--
-- Initializes the networking.
-- Sends modem messages on event.
local component = require("component")
local srl = require("serialization")
local module = require("ut2-serv.modules")
local events = module.load("events")
local config = module.load("config")
local db = module.load("db")
loca... |
function onCreate()
-- background shit
makeAnimatedLuaSprite('stageback', 'kylebefore/Study', -340, -20);
addAnimationByPrefix('stageback', 'Normal', 'Study normal', 24, false);
addAnimationByPrefix('stageback', 'Open', 'Study door open', 24, false);
setScrollFactor('stageback', 1, 1);
--scaleObject('stageback', ... |
KeyBindings = {}
KeyBindings.__index = KeyBindings
setmetatable(KeyBindings, {
__index = KeyBindings,
__call = function (cls, ...)
local self = setmetatable({}, cls)
self:_init(...)
return self
end,
})
function KeyBindings:_init()
self.bindingsFilename = "keyBindings.dat"
self.bindings = {}
--P... |
local RichText = require 'packagemanager-cli/RichText'
local Stream = io.stdout
local Features = {}
Features.unicode = false
Features.ansiEscapeCodes = false
Features.carriageReturn = false
Features.maxLineLength = 80
-- Magic to detect terminal features:
if os.getenv('TERM') then
local tputProcess = io.popen('... |
{
color0=0x113077,
color1=0xaaaaaa,
color2=0,
name="F4",
faction=8,
blueprints={
{data={name="F4_0",author="F4_0_0",color0=0x113077,color1=0xaaaaaa,
wgroup={0, 0, 2, 0}}, blocks={
{800,{0,0},0},
{850,{15,5},3.1416},
{834,{-15,-5},3.1416},
{880,{-20,-27.071},1.5708},
{888,{-44.9998,4.9898},0.7854},
{801,{-37.071,-27.071... |
MLT = require "core/Tools"
Node = require "core/Node"
Box = require "core/Box"
Sprite = require "core/Sprite"
Character = require "core/Character"
Socket = require "socket"
|
local exitPosition = Position(32308, 32267, 7)
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
if player:getVocation():getBase():getId() == 1 then
return true
end
player:teleportTo(exitPosition)
player:getPosition():sendMagic... |
local Utils = require "plugin.wattageTileEngine.utils"
local min = math.min
local max = math.max
local floor = math.floor
local ceil = math.ceil
local requireParams = Utils.requireParams
local SpriteInfo = {}
-- Deprecated
SpriteInfo.new = function(params)
-- requireParams({"imageRect", "width", "height"}, param... |
boss.card = {}
function boss.card.New(name, t1, t2, t3, hp, drop, is_extra)
local c = {}
c.frame = boss.card.frame
c.render = boss.card.render
c.init = boss.card.init
c.del = boss.card.del
c.name = tostring(name)
if t1 > t2 or t2 > t3 then
error('t1<=t2<=t3 must be satisfied.')
e... |
--- Provides utility functions and constants.
-- @module utils
local cfg = require 'luarocks.core.cfg'
local fs = require 'luarocks.fs'
local dir = require 'luarocks.dir'
local utils = {}
assert(cfg.init())
fs.init()
--[[ CACHE ]]--
--- Cache directory.
utils.cache = nil
do
local cache = dir.dir_name(cfg.local... |
wrk.method = "POST"
wrk.body = '{"device_id":"a12345","account":"abcde056a","password":"129345","ver":666,"channel":999,"type":"777","pid":"56789"}'
wrk.headers["Content-Type"] = "application/json"
wrk -t2 -c100 -d10s -s /opt/workspace/src/microservice/jzapi/post.lua --latency "http://127.0.0.1:9908/user/login_acc... |
require 'Coat'
class 'Point3D'
extends 'Point'
has.z = {is = 'rw', isa = 'number', default = 0 }
function overload:__tostring ()
return '(' .. self.x .. ', ' .. self.y .. ', ' .. self.z .. ')'
end
|
--[[
Title: Beginner
Author(s): big
Date: 2020.11.27
Desc:
use the lib:
------------------------------------------------------------
local Beginner = NPL.load("(gl)Mod/WorldShare/cellar/Beginner/Beginner.lua")
------------------------------------------------------------
]]
-- libs
local KeepWorkItemManager = NPL.loa... |
--[[
This felt a bit verbose. Had to make a function to print out a binary string
for debugging. Filtering lists in lua is quite explicit but it sure is
straight forward.
]]
function tobinstring(n)
local s = ''
while n > 0 do
local r = math.fmod(n, 2)
s = tostring(math.floor(r)) .. s
n = (n-r)/2
... |
--- @module DeathmatchModeUI ๆญปๆๆจกๅผ็ฉๅฎถ็ซฏๆงๅถๆจกๅ
--- @copyright Lilith Games, Avatar Team
--- @author Sharif Ma
local DeathmatchModeUI, this = ModuleUtil.New('DeathmatchModeUI', ClientBase)
--- ๅๅงๅ
function DeathmatchModeUI:Init()
self.root = world:CreateInstance('DeathmatchGUI', 'DeathmatchGUI', localPlayer.Local)
se... |
local Ans = select(2, ...);
local TOTAL_TABS = 5;
AnsMainWindowFrameMixin = {};
function AnsMainWindowFrameMixin:Toggle()
if (self:IsShown()) then
self:Hide();
else
self:Show();
end
end
function AnsMainWindowFrameMixin:Init()
local this = self;
self.tabs = {};
self.views = {};... |
local PluginRoot = script:FindFirstAncestor("PluginRoot")
local function load(path)
assert(path, "Loader.load called with no arguments.")
local current = PluginRoot
for _, name in ipairs(string.split(path, "/")) do
current = current:FindFirstChild(name, true)
assert(current, ([[Path "%s" did not match a module.... |
local string = require "string"
local M = {}
function M.new() return string.format end
return M
|
if not game.Players.LocalPlayer.Character:FindFirstChild("Rig") then
game.StarterGui:SetCore("SendNotification",{
Title = "Project: Terminate",
Text = "Not Reanimated.",
})
return
end
if game.Players.LocalPlayer.Character:FindFirstChild("Anti") then
game.StarterGui:SetCore("SendNotification",{
Title = "Proje... |
-- This file is under copyright, and is bound to the agreement stated in the EULA.
-- Any 3rd party content has been used as either public domain or with permission.
-- ยฉ Copyright 2016-2017 Aritz Beobide-Cardinal All rights reserved.
ARCSlots = ARCSlots or {}
function ARCSlots.Msg(msg)
Msg("ARCSlots: "..tostring(msg... |
require('basic')
require('keymaps')
require('plugins').setup(function()
require('nvim-autopairs').setup{}
require('plugins.nvim-tree')
require('plugins.nvim-treesitter').setup({
parsers = {
'vim',
'lua',
'javascript',
'typescript',
'tsx',
... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="dns-prefetch" href="https://github.githubassets.com">
<link rel="dns-prefetch" href="https://avatars0.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars1.githubusercontent.com">
<link rel="dns-prefetch" hre... |
local skynet = require "skynet"
local service = require "service"
local logger = require "logger"
local iotmanager = {}
--ๅจ็บฟfdๅฏนๅบ็agent
local online_fd_agent = {}
local function new_agent()
-- todo: use a pool
return skynet.newservice "iotagent"
end
local function free_agent(agent)
-- kill agent, todo: put it into... |
require 'busted'
local ___dojogen___ = require '___dojogen___'
describe('Test ___dojogen___', function()
it('should test ___dojogen___', function()
assert.are.equal(1, 1)
end)
end)
|
local WIDGET_WIDTH = 800
local WIDGET_HEIGHT = 90
local BUTTON_SIZE = GuiDim.new(0, WIDGET_WIDTH, 0, WIDGET_HEIGHT)
local widgetTexture = game.getTexture("res/button.png")
local checkboxTexture_unchecked = game.getTexture("res/checkbox-unchecked.png")
local checkboxTexture_checked = game.getTexture("res/checkbox-checke... |
object_tangible_loot_beast_beast_steroid_roach_snake_mk2 = object_tangible_loot_beast_shared_beast_steroid_roach_snake_mk2:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_beast_beast_steroid_roach_snake_mk2, "object/tangible/loot/beast/beast_steroid_roach_snake_mk2.iff")
|
local pfs = {}
function pfs.exists(file)
local ok, err, code = os.rename(file, file)
if not ok then
if code == 13 then
-- Permission denied, but it exists
return true
end
end
return ok, err
end
--- Check if a directory exists in this path
function pfs.isdir(path)
-- "/" works on both Uni... |
function onCreate()
-- background shit
makeLuaSprite('stageback', 'lucas/street', -1500, -1000);
setScrollFactor('stageback', 1, 1);
--scaleObject('stageback', 0.8, 0.8);
makeLuaSprite('stageroof', 'lucas/roof', -1500, -1000);
setScrollFactor('stageback', 1, 1);
makeLuaSprite('stagechair', 'lucas/chair', 1580,... |
--
-- Created by IntelliJ IDEA.
-- User: alex
-- Date: 21/12/2014
-- Time: 03:48
-- To change this template use File | Settings | File Templates.
--
dofile(PYRO_PATH .. '/luabit/bit.lua')
dofile(PYRO_PATH .. '/api-lua3.2/utils/struct.lua')
dofile(PYRO_PATH .. '/api-lua3.2/configuration.lua')
dofile(PYRO_PATH .. '/sha1... |
local shakenote = false
local shakehud = false
local susshake = false
local sway = false
local funkysway = false
local spin = false
local originalx = {}
local originaly = {}
function start (song)
hudX = getHudX()
hudY = getHudY()
for i = 0, 7 do
table.insert(originalx, i.x)
table.insert(originaly, i.y)
e... |
--[[
ยฉ 2020 TERRANOVA do not share, re-distribute or modify
without permission of its author.
--]]
PLUGIN.name = "Consumables";
PLUGIN.description = "Stores all the consumable items that are used in TERRANOVA.";
PLUGIN.author = "Specky";
ix.util.Include("sv_hooks.lua")
ix.util.IncludeDir(PLUGIN.folder .. "/meta", t... |
local I18N = require("core.I18N")
I18N.add {
guild = {
none = {
name = "ใชใ",
},
mages = {
name = "้ญ่กๅฃซใฎใซใ",
},
fighters = {
name = "ๆฆๅฃซใฎใซใ",
},
thieves = {
name = "็่ณใฎใซใ",
},
},
}
|
pause = {}
function pause:draw()
love.graphics.draw(backgroundPause)
love.graphics.printf('PAUSE', 0, h / 2, w, 'center')
end
function pause:update(dt)
-- pauseTimer starts ticking
pauseTimer = pauseTimer + dt
end
function pause:keypressed(key)
-- wait a moment before checking agian if 'p' is pre... |
cmark = require('commonmark')
generic = require('commonmark.writer.generic')
local M = {}
function M.new(options)
local W = generic.new(options)
local escape = function(s)
return string.gsub(s, '[<>&"]',
function(c)
if c == '<' then return "<"
... |
-- Located at script/_lib/mod/
-- Taken from CA mod loader
function my_load_mod_script(filename)
local pointer = 1;
local filename_for_out = filename;
while true do
local next_separator = string.find(filename, "\\", pointer) or string.find(filename, "/", pointer);
if next_separator then
... |
local M = {}
local cfg = require 'config'
local util = require 'core.util'
local log = require 'core.log'
local worlds = {}
local left, left_min
local allocs = 0
local frees = 0
local function make_world(wi)
local self = {}
local tscl = 1
function self.alloc()
allocs = allocs + 1
... |
-- ======================================================================
-- menus.lua - Copyright (C) 2005-2006 Varol Kaptan
-- see LICENSE for more information
-- ======================================================================
-- vim: set ts=3 et:
-- everything related to menu management is contained in the
-... |
return {'srebrenica'} |
object_building_kashyyyk_myyydril_cave_luilrus_mushroom_cluster = object_building_kashyyyk_shared_myyydril_cave_luilrus_mushroom_cluster:new {
}
ObjectTemplates:addTemplate(object_building_kashyyyk_myyydril_cave_luilrus_mushroom_cluster, "object/building/kashyyyk/myyydril_cave_luilrus_mushroom_cluster.iff")
|
vkore = {
settings = {
game_mode = minetest.settings:get("vkore_game_mode") or "play", -- dev, play
world_size = 3200,
},
dev_priv = "voxel_knights_dev"
}
local dirs = {
vector.new(1, 0, 0),
vector.new(0, 1, 0),
vector.new(0, 0, 1),
vector.new(-1, 0, 0),
vector.new(0, -1, 0),
vector.new(0, 0, -1),
}
func... |
local M = { }
local me = ...
local FX = require("FunctionalX")
local T = (require("PackageToolkit")).module
M.main = function(...)
local m = {
T.import(me, "n2")
}
return unpack((FX.module.call(m, ...)))
end
return M
|
--[[--
slot.put_into(
slot_ident, -- name of a slot
string1, -- string to be written into the named slot
string2, -- another string to be written into the named slot
...
)
This function is used to write strings into a named slot.
NOTE: ACCELERATED FUNCTION
Do not change unless also you also update... |
---@class CS.UnityEngine.AudioSettings
---@field public driverCapabilities number
---@field public speakerMode number
---@field public dspTime number
---@field public outputSampleRate number
---@type CS.UnityEngine.AudioSettings
CS.UnityEngine.AudioSettings = { }
---@return CS.UnityEngine.AudioSettings
function CS.Uni... |
--
-- KEEPER.LUA
--
-- Keeper state logic
-- DEPRECATED BY THE EQUIVALENT C IMPLEMENTATION, KEPT FOR REFERENCE ONLY
-- SHOULD NOT BE PART OF THE INSTALLATION ANYMORE
--
-- This code is read in for each "keeper state", which are the hidden, inter-
-- mediate data stores used by Lanes inter-state communication objects.
-... |
function love.conf(t)
t.window.width = 1000
t.window.height = 700
t.modules.joystick = false
t.modules.physics = false
t.window.title = "For Affectus Corp : Mini Game 1"
end
|
local actions = require("scripts.gui.settings.actions")
local root = require("scripts.gui.settings.root")
local function handle_action(msg, e)
local player = game.get_player(e.player_index)
local player_table = global.players[e.player_index]
local gui_data = player_table.guis.settings
if not gui_data then ret... |
-- https://github.com/nodemcu/nodemcu-firmware/blob/master/lua_examples/ucglib/GraphicsTest.lua
-- rst pin tied +3.3
-- cs pin tied gnd
-- dc/a0 def d4 but can be other pin: define _A0=2 say before loading lib
-- clk d5
-- din d7
-- vcc to +5
-- led to +3.3 - instead you could use a gpio to turn on & off?
if (not sp... |
local argparse = grin.getPackageAPI("Team-CC-Corp/Grin", "argparse")
local parser = argparse.new()
parser
:argument"time"
:count"*"
local options = parser:parse({}, ...)
if not options then return end
if not options.time or #options.time == 0 then
error("No time specified", 0)
end
local time = 0
for _, ... |
local fs = require 'bee.filesystem'
local root = require 'backend.w2l_path'
local function string_proxy(key, concat)
return setmetatable({}, {
__tostring = function ()
local lang = require 'share.lang'
if concat then
return lang.raw[key] .. concat()
... |
local InvisibleBuff = class()
function InvisibleBuff:on_buff_added(entity, buff)
local monster_comp = entity and entity:is_valid() and entity:get_component('tower_defense:monster')
if monster_comp then
monster_comp:set_invisible(true)
end
end
function InvisibleBuff:on_buff_removed(entity, buff... |
project "Detective"
kind "StaticLib"
language "C++"
staticruntime "on"
targetdir ("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}")
objdir ("%{wks.location}/bin/intermediates/" .. outputdir .. "/%{prj.name}")
DetectiveIncludeDirs = {}
DetectiveIncludeDirs["Detective"] = "%{prj.location}/"
files
{
"*... |
local util = require 'packer.util'
local result = require 'packer.result'
local display = require 'packer.display'
local a = require 'packer.async'
local log = require 'packer.log'
local plugin_utils = require 'packer.plugin_utils'
local fmt = string.format
local async = a.sync
local await = a.wait
local config = nil... |
-- A Grid data structure
local grid = {_map = {}, _width = 0, _height = 0}
grid.__index = grid
function grid:new(map)
local g = setmetatable({},grid)
g._width, g._height = #map[1], #map
g._map = {}
for y = 1,#map do g._map[y] = {}
for x=1,#map[y] do
g._map[y][x] = {x = x, y = y, v = map[y][x]}
end
end
re... |
return function()
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Packages = ReplicatedStorage.Packages
local Llama = require(Packages.Llama)
local Dictionary = Llama.Dictionary
local every = Dictionary.every
it("should validate types", function()
local args = {
{ 0 },
{ {}, 0 },
... |
package = "blunty666.nodes.gui.objects"
imports = {
"blunty666.nodes.*",
"aloof.TypeChecker",
}
class = "Label"
extends = "Drawable"
local import = {
"Utils",
}
local ALIGNMENT = {
HORIZONTAL = {
LEFT = true,
MIDDLE = true,
RIGHT = true,
},
VERTICAL = {
TOP = true,
MIDDLE = true,
BOTTOM = true,
}... |
-- Plugin configuration: alpha-nvim
-- ============================================================================
local alpha = require('alpha')
local dashboard = require('alpha.themes.dashboard')
dashboard.section.header.val = {
[[โโโโ โโโ โโโโโโโโ โโโโโโโ โโโ โโโ โโโ โโโโ โโโโ]],
[[โโโโโ โโโ โโโโโโโโ... |
print("getpeer",srv_rt:getpeer())
print("srv_rt",srv_rt)
srv_rt=nil
rt_connect=nil
telnet_listener=nil
package=nil
d=nil
require=nil
pairs=nil
ipairs=nil
telnet_listener=nil
rt_retry=3
rt_connect()
|
return [[
${offset 10}${font Quicksand:size=40}${time %H:%M}${alignr}${font Quicksand:size=20}${execi 300 curl 'wttr.in/falkenstein%20(vogtland)?format=%t%20/%20%f' }${font}
$color3${hr}
${alignr}${font Quicksand:size=20}$color2${time %A} ${time %d.%m.%Y}$color
]]
|
--[[
Swaggy Jenkins
Jenkins API clients generated from Swagger / Open API specification
The version of the OpenAPI document: 1.1.2-pre.0
Contact: blah@cliffano.com
Generated by: https://openapi-generator.tech
]]
-- github_repositorylinks class
local github_repositorylinks = {}
local github_repositorylinks_... |
-- 'Class' representing a floor of a subfactory with individual assembly lines
Floor = {}
function Floor.init(line)
local floor = {
level = nil,
origin_line = line,
Line = Collection.init(),
valid = true,
class = "Floor"
}
-- Level becomes one more than the parent, ... |
log.info("this is an info log with ~tilde")
log.error("this is an error log with ~tilde")
log.debug("this is a debug log with ~tilde")
log.warning("this is a warning log ~tilde")
assert(true)
|
draw = {}
function draw.DrawText( value, font, x, y, color, alignment )
print( "[FAKE]", "draw.DrawText( " .. tostring(value) .. ", " ..tostring(font).. ", " ..tostring(x).. ", " ..tostring(y).. ", " ..tostring(color).. ", " ..tostring(alignment).. " )" )
end
function draw.GetFontHeight()
print( "[FAKE]", "$draw.G... |
require 'torch'
require 'nn'
local TorchModel = torch.class('TorchModel')
function TorchModel:__init(backend, imageSize, numClasses)
self:buildModel(backend, imageSize, numClasses)
self.imageSize = imageSize
self.numClasses = numClasses
self.backend = backend
end
function TorchModel:buildModel(backend, image... |
-- inheritance.lua
-- simple class inheritance test
require( "class" )
local print = print
-------------------------------------------------------------------------------
-- animal
-------------------------------------------------------------------------------
class( "animal" )
function animal:animal()
self.kingdo... |
local API_NPC = require(script:GetCustomProperty("API_NPC"))
local API_D = require(script:GetCustomProperty("APIDamage"))
local API_RE = require(script:GetCustomProperty("APIReliableEvents"))
local RANGE = 0.0 -- This spell doesn't care where the player target is
local EFFECTIVE_RANGE = 2500.0 -- The ground ci... |
--[[
Filename: StatsTextPanel.lua
Written by: dbanks
Description: Panel that shows a "Legend" for a graph, including:
- name of stat being displayed.
- current value of stat.
- target (suggested max) value of stat.
- average value of stat over the whole graph.
particular stat.
--]]
... |
-- admin_commands.lua
-- May 2019
--
-- Yay, admin commands!
require("lib/oarc_utils")
-- Give yourself or another player, power armor
commands.add_command("powerstart", "give a start kit", function(command)
local player = game.players[command.player_index]
local target = player
if player ~= ni... |
local UIDGenerator = {}
local index = 0
function UIDGenerator.generateUID()
index = index + 1
return index
end
return UIDGenerator |
-- lua script
module (..., package.seeall)
function main()
print("==================================")
print("==================================")
end
function main1(t1)
print("==================================")
print("in unit t1 = " .. t1)
print("==================================")
end
functi... |
--------------------------------
-- Script By: RakkorZ - ZxOxZ --
--------------------------------
ITEMS = {}
ITEMS.Command = "#additem"
function ITEMS.OnChat(event, player, message, type, language)
local ItemMessage = message:lower()
if (ItemMessage:find(ITEMS.Command.." ") == 1) then
if (player:GetGmRank() =... |
local class = require 'class'
local Array = require 'Array'
local request = require 'request'
return class {
constructor = function(self, api_key)
self.api_key = api_key
end;
search = function(self, query)
local url = ('http://api.giphy.com/v1/gifs/search?q=%s&api_key=%s'):format(Array(query:split ' '):j... |
--[[
POSIX library for Lua 5.1, 5.2 & 5.3.
Copyright (C) 2014-2020 Gary V. Vaughan
]]
--[[--
Legacy Lua POSIX bindings.
APIs for maintaining compatibility with previous releases.
@module posix
]]
local LOG_MASK = require 'posix.syslog'.LOG_MASK
local MODE_MAP = require 'posix._base'.MODE_MAP
local O_CREAT = re... |
local ffi = require("ffi");
local bit = require("bit");
local band = bit.band;
local core_string = require("core_string_l1_1_0");
local core_file = require("core_file_l1_2_0");
local errorhandling = require("core_errorhandling_l1_1_1");
local WinBase = require("WinBase");
local WinNT = require("WinNT");
local FsHandl... |
return {
test_basic = function()
local levee = require("levee")
local h = levee.Hub()
local err, serve = h.http:listen()
local err, addr = serve:addr()
local err, c = h.tcp:connect(addr:port())
c:write(
"" ..
"GET /some/path HTTP/1.1\r\n" ..
"H1: one\r\n" ..
"Repeat: first\r\n" ..
"Repeat:... |
local ffi = require("ffi")
ffi.cdef[[
#pragma pack(4)
struct Person {
int8_t age;
double nerd;
};
]]
print("Person Size: ", ffi.sizeof("struct Person"))
|
-- Simple example for what a client could look like using this system. The file could be named anything on the client.
local component = require("component")
local event = require("event")
local serial = require("serialization")
local m = component.modem
local fs = require("filesystem")
-- Port that we're going to sen... |
local River = require(game.ReplicatedStorage.River) :: River
local Query = River.Query
local Component = River.Component
local System = River.System
local Type = River.Type
local Pools = River.Pools
local TestComponent = Component(Type("string"))
return {
{
Name = "Stress Call - Query",
Calls = ... |
AmbiantSounds = {}
SoundsInstance = {}
AddEvent("OnObjectStreamIn", function(object)
CheckAmbiantSound(object)
end)
AddEvent("OnObjectStreamOut", function(object)
if AmbiantSounds[object] ~= nil then
DestroySound(AmbiantSounds[object])
AmbiantSounds[object] = nil
end
end)
fu... |
local context = G.botContext
-- DO NOT USE THIS CODE.
-- IT'S ONLY HERE FOR BACKWARD COMPATIBILITY, MAY BE REMOVED IN THE FUTURE
context.createWidget = function(name, parent)
if parent == nil then
parent = context.panel
end
g_ui.createWidget(name, parent)
end
context.setupUI = function(ot... |
print((2))
|
local transport_list = {}
local function get_fractional_time()
return minetest.get_us_time() / 1000 / 1000
end
minetest.register_entity("eco_transport:car1", {
visual = "cube",
textures = {
"mesecar_car1top.png",
"mesecar_carbase.png",
"mesecar_car1rightside.png",
"mesecar_... |
local Util = require(script.Parent.Parent.Shared.Util)
local combinedInputEnums = Enum.UserInputType:GetEnumItems()
for _, e in pairs(Enum.KeyCode:GetEnumItems()) do
combinedInputEnums[#combinedInputEnums + 1] = e
end
local userInputType = {
Transform = function (text)
local findEnum = Util.MakeFuzzyFinder(combi... |
function sysCall_info()
return {autoStart=false}
end
function sysCall_init()
sim.addLog(sim.verbosity_scriptinfos,"With this tool you are able to easily scale objects and models in an isometric fashion. Simply select a single object/model for the scaling dialog to appear.")
factor=1
currentFactor=1
... |
nadmin.motd = nadmin.motd or {}
function nadmin.motd:Open(data)
if IsValid(nadmin.motd.panel) then nadmin.motd.panel:Remove() end
nadmin.motd.panel = nadmin.vgui:DFrame(nil, {ScrW() * 0.9, ScrH() * 0.9})
local motd = nadmin.motd.panel
motd:Center()
motd:SetTitle("Message Of The Day")
... |
local inspect = require('inspect');
local mongo = require('mongo');
local dbRequest = function (dbconn, dbname)
local collection = 'peer';
local getVpbxId = function (peername)
local cursor = dbconn:query(dbname..'.'..collection, {
peername = peername
});
local user = cur... |
local a = require('vfiler/actions/cursor')
local u = require('tests/utility')
describe('cursor actions', function()
local vfiler = u.vfiler.start(u.vfiler.generate_options())
local action_sequence = {
move_cursor_down = a.move_cursor_down,
move_cursor_up = a.move_cursor_up,
move_cursor_bottom = a.move_... |
print("*************ๅคๅฝๆฐๆฟๆข*********************")
--xlua.hotfic(็ฑป๏ผ{ๅฝๆฐๅ = ๅฝๆฐ๏ผๅฝๆฐๅ = ๅฝๆฐ ใใใใ})
xlua.hotfix(CS.HotfixMain,{
Update = function (self)
print(os.time())
end,
Add = function (self,a,b)
return a+b
end,
Speak = function (a)
print(a)
end
})
xlua.hotfix(CS.HotfixTest... |
local cc = buildM.generators.create_component_from_ingredients
cc({name = "burner-unit", tier=0, ings = {{"stone-brick", 3}}, iconName = "burner-unit-0" })
cc({name = "boiler-component", tier=0, ings = {{"stone", 5}}, iconName = "boiler-component-0" })
cc({name = "industrial-engine", tier=0, ings = {{"iron-plate", 7},... |
if bobmods.config then
require("prototypes.bobsmods.item")
require("prototypes.bobsmods.recipe-chemistry")
require("prototypes.bobsmods.recipe-circuit")
require("prototypes.bobsmods.recipe-intermediate")
require("prototypes.bobsmods.recipe-logistics")
require("prototypes.bobsmods.recipe-power")
require("prototyp... |
--------------------------------
-- @module Touch
-- @extend Ref
-- @parent_module cc
--------------------------------
-- Returns the previous touch location in screen coordinates. <br>
-- return The previous touch location in screen coordinates.
-- @function [parent=#Touch] getPreviousLocationInView
-- @... |
return Def.Quad{InitCommand=cmd(xy,0,0;halign,0;valign,0;zoomto,SCREEN_WIDTH,30;diffuse,color("#00000099");fadebottom,0.8)}
|
-- plugin projects
group "plugins"
-----------------------------------------------------------------
-- IMGuiRhi
-----------------------------------------------------------------
-- Imgui rhi
create_plugin(
"imguiRhi",
{ PROJECT_RENDERER_NAME }, nil,
function(SOURCE_DIR)
-- Files
files
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.