content stringlengths 5 1.05M |
|---|
-- HYDRO_TURBINE
-- Water turbine:
-- Active if flowing >water< above it
-- (does not work with other liquids)
minetest.register_node("mesecons_hydroturbine:hydro_turbine_off", {
drawtype = "mesh",
mesh = "jeija_hydro_turbine_off.obj",
tiles = {
"jeija_hydro_turbine_sides_off.png",
"jeija_hydro_turbine_top_bott... |
local replicating_swift_transport_belt = {
type = "item-with-label",
name = "replicating-swift-transport-belt",
localised_name = {"replicating-belts.prefix", {[1] = "replicating-belts.swift-transport-belt-lower"}},
subgroup = "replicating-belt",
order = "d[replicating-transport-belt]-i[replicating-swift-... |
--
-- Copyright 2010-2016 Branimir Karadzic. All rights reserved.
-- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
--
project "shaderc"
uuid "f3cd2e90-52a4-11e1-b86c-0800200c9a66"
kind "ConsoleApp"
local GLSL_OPTIMIZER = path.join(BGFX_DIR, "3rdparty/glsl-optimizer")
local FCPP_DIR = path.join(B... |
-- this is a global. honkkkkkkkkkkkkk
TCP_sock = nil
local type_to_length = {G=1, H=1, N=1, E=4, P=121, O=121, I=2, Q=121, R=121, L=2, U=2}
local leftovers = ""
local wait = coroutine.yield
local floor = math.floor
local char = string.char
local byte = string.byte
function flush_socket()
if not TCP_sock then return ... |
require "include/protoplug"
local Upsampler = require("include/dsp/wavelet_up")
local Downsampler = require("include/dsp/wavelet_down")
local samplerate = 44100
local f = 1
stereoFx.init()
-- everything is per stereo channel
function stereoFx.Channel:init()
self.phase = 0
self.upsampler = Upsampler()
self.downs... |
------------------------------------------------------------------------------
-- Frame class
------------------------------------------------------------------------------
local ctrl = {
nick = "frame",
parent = iup.WIDGET,
creation = "I",
callback = {}
}
function ctrl.createElement(class, param)
return i... |
-- Copyright (c) 2016 Kim Alvefur
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
-- Base64 URL en-/decoding
local mime = require "mime";
local b64map = {
['+'] = '-', ['/'] = '_', ['='] = '',
['-'] = '+', ['_'] = '/'
};
local function encode(s)... |
return {
summary = 'Different storage formats for pixels in Textures.',
description = [[
Textures can store their pixels in different formats. The set of color channels and the number
of bits stored for each channel can differ, allowing Textures to optimize their storage for
certain kinds of image form... |
return {
SORT_TAG = {
{
spr = "sort_login",
tag = i18n("word_default"),
func = function (slot0, slot1)
table.sort(slot0, function (slot0, slot1)
if slot0.unreadCount == slot1.unreadCount then
if slot0.online == slot1.online then
if slot0.preOnLineTime == slot1.preOnLineTime then
... |
local F, C = unpack(select(2, ...))
-- create parents
local securehandler = CreateFrame("Frame", nil, nil, "SecureHandlerBaseTemplate")
local barparent = CreateFrame("Frame", nil, UIParent)
local void = CreateFrame("Frame", nil, UIParent)
void:SetScale(0.0001)
void:SetAlpha(0)
-- set parents
BonusActionBarFrame:SetPa... |
local map={
{id=1.0,name="大地图",pic="地图.大地图",desc=[[ 有人的地方,就是江湖! ]],
musics={ "音乐.逍遥", "音乐.逍遥1", "音乐.逍遥2", "音乐.逍遥3", "音乐.逍遥4", "音乐.天龙八部.佛音2", "音乐.天龙八部.佛音3", },musicEffect="",},
{id=2.0,name="龙门镖局",pic="地图.龙门镖局",desc=[[ 你的眼前是威武雄壮的洛阳龙门镖局,此处人声鼎沸、熙熙攘攘,南来北往的商旅都来这里求保平安。
几个粗壮的镖头正斜倚在镖局门口,用怀疑的眼光上下打量你。 ]],
musics={ "音乐.倚天.醉拳", ... |
local roman = { }
local map = {
I = 1,
V = 5,
X = 10,
L = 50,
C = 100,
D = 500,
M = 1000,
}
local numbers = { 1, 5, 10, 50, 100, 500, 1000 }
local chars = { "I", "V", "X", "L", "C", "D", "M" }
function roman.encode(s)
--s = tostring(s)
s = tonumber(s)
if not s or s ~= s then er... |
--------------------------------------------------------------------------------
-- TODO
--
-- - When infobox is not in use - display who holds a relic (or on the ground)
--------------------------------------------------------------------------------
-- Module Declaration
--
local mod, CL = BigWigs:NewBoss("Uu'nat, ... |
--[[
MIT License
Copyright (c) 2020 Ryan Ward
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, publish, di... |
log.info("main", "hi")
local func = loadfile("abc.lua")
log.info("func", func)
buff = zbuff.create(32*1024)
data = luf.dump(func, false, buff)
buff:write(data)
buff:seek(0, zbuff.SEEK_SET)
log.info("data", #data)
-- print(data:toHex())
io.writeFile("abc.luf", data)
io.writeFile("abc.luac", string.dump(func))
io.wr... |
-- !!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!
-- This file is automaticly generated. Don't edit manualy!
-- !!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!
---@class C_RecruitAFriend
C_RecruitAFriend = {}
---[Wowpedia documentation](https://wow.gamepedia.com/API_C_RecruitAFriend.ClaimActivityRewa... |
return {
id = 13,
name = "工枯加盟仍",
} |
local ui = require("ui.main")
local uiu = require("ui.utils")
local megacanvas = require("ui.megacanvas")
local uie = {}
ui.e = uie
-- Default element functions and values.
uie.default = {
base = false,
__template = false,
__updateID = false,
x = 0,
y = 0,
width = 0,
height = 0,
reflo... |
local mod_name = (...):match ( "^(.*)%..-$" )
local t_insert = table.insert
local t_concat = table.concat
local strformat = string.format
local strmatch = string.match
local strbyte = string.byte
local ll = require(mod_name..".ll")
local le_uint_to_num = ll.le_uint_to_num
local le_int_to_num = ll.le_int_to_num
local ... |
--[[Helper function convert a `flatIndex` to a row-column tuple
Parameters:
* `v` - matrix.
* `flatIndex` - index
Returns: row/column.
--]]
local function flatToRc(v, flatIndex)
local row = math.floor((flatIndex - 1) / v:size(2)) + 1
return row, (flatIndex - 1) % v:size(2) + 1
end
--[[ Class for managing th... |
-- ===========================================================================
-- Base File
-- ===========================================================================
include("TopPanel_Expansion2.lua");
include("toppanel_CQUI.lua"); |
-- // Information
--[[
Employee ESP for: https://www.roblox.com/games/2768379856/3008-2-7
]]
-- // Dependencies
local Manager = loadstring(game:HttpGet("https://raw.githubusercontent.com/Stefanuk12/ROBLOX/master/Universal/ESP/Archive/Manager.lua"))()
-- // Services
local Workspace = game:GetService("Workspace")
... |
require("/filterscripts/utility/utilis")
require("/filterscripts/utility/scriptLoader")
--I load the following scripts like this so I can reload them whenever using the rcon script
loadScript("rcon")
loadScript("playerSpawn")
loadScript("score")
setWorldMinuteDuration(1, 0) |
object_tangible_tcg_series5_hangar_ships_grievous_starship = object_tangible_tcg_series5_hangar_ships_shared_grievous_starship:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series5_hangar_ships_grievous_starship, "object/tangible/tcg/series5/hangar_ships/grievous_starship.iff") |
function fact (n)
if n == 0 then
return 1
else
return n * fact(n-1)
end
end
print("Tervetuloa kertoimeen")
print("----")
print("Aseta numero:")
a = io.read("*number")
print("----")
print("tulos: ", fact(a))
|
arr = {1, 2, 3, 4, 5}
print(arr[2]) |
object_mobile_exar_kun_tomb_guardian_f = object_mobile_shared_exar_kun_tomb_guardian_f:new {
}
ObjectTemplates:addTemplate(object_mobile_exar_kun_tomb_guardian_f, "object/mobile/exar_kun_tomb_guardian_f.iff")
|
local _R = debug.getregistry()
local buffer = {}
local setmetatable, Vector, next =
setmetatable, Vector, next
local ins, rm, Empty =
table.insert, table.remove, table.Empty
local TraceHull, TraceLine =
util.TraceHull, util.TraceLine
local rad, sin, cos =
math.rad, math.sin, math.cos
local DistToSqr, Length, GetNor... |
local NoCollideGroup = {}
function NoCollideGroup:new()
local self = {}
local _physics_service = game:GetService("PhysicsService")
local _character_group_name = "Characters"
local _character_group = _physics_service:CreateCollisionGroup(_character_group_name)
_physics_service:CollisionGroupSetCollidable(_ch... |
--[[
Luci statistics - iptables plugin diagram definition
(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
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.a... |
local string = string
local tonumber = tonumber
local setmetatable = setmetatable
local error = error
local ipairs = ipairs
local io = io
local table = table
local math = math
local assert = assert
local tostring = tostring
local type = type
local insert_tab = table.insert
local function meta(name, t)
t = t or {}
... |
-- This file will execute before every lua service start
-- See config
--print("PRELOAD", ...)
package.path = "./script/?.lua;"..package.path
require("tools/tool_log")
|
local Sort = {}
local function getLower(Former, Latter)
assert(type(Former) == "table", "Argument Former must be a table!")
assert(type(Latter) == "table", "Argument Latter must be a table!")
local formerIndex = 1
local latterIndex = 1
return function()
if not Latter[latterIndex] or Former[formerIndex] and Fo... |
modifier_sniper_headshot_lua_slow = class({})
--------------------------------------------------------------------------------
-- Classifications
function modifier_sniper_headshot_lua_slow:IsHidden()
return true
end
function modifier_sniper_headshot_lua_slow:IsDebuff()
return true
end
function modifier_sniper_head... |
-- This example is just here so that you can copy and paste the few lines
-- of code you need to output SVG. It doesn't draw anything interesting.
local Cairo = require "oocairo"
-- This check isn't normally necessary, but it can be used if you want to
-- write a program that works with or without SVG support. I th... |
local format_parameters = function(parameters)
local params = {}
for k,v in pairs(parameters) do
if isnumber(v) or isbool(v) then -- chat_id
v = tostring(v)
elseif istable(v) then -- reply_markup
v = util.TableToJSON(v)
end
params[k] = v
end
return params
end
local request = function(token, method, p... |
--No.99 希望皇ホープドラグナー
--Script by XyLeN
function c100342051.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,12,3,nil,nil,99)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100342051,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_Q... |
-- char/hero.lua
local imgPath = 'img/ff/hero32.png'
local charQuadInfo = {
-- {facing dir XCoord YCoord XPos YPos XScale YScale
{'left', 32, 0, -1, -1, 1, 1 }, -- facing left
{'right', 32, 0, 0, -1, -1, 1 }, -- facing right
{'forward', 32, 64, -1, -1, 1, 1 }, -- facing forward
{'backward', 32, 32, -1, -1, 1, 1 }... |
--- crush lets you report crashes in LOVE games.
-- This module provides functions that you can use to
-- collect crash reports in your LOVE games.
--
-- The crash reports consists of the error message and stack trace,
-- as well as any additional information that is provided (e.g. version,
-- os, etc.).
--
-- ... |
local posS = {-100, 720}
local posV = {0, 620}
local on = false
function onCreate()
for i=1,2 do
makeLuaSprite('bar'..i, nil, 0, posS[i])
makeGraphic('bar'..i, screenWidth, 100, '000000')
setObjectCamera('bar'..i, 'other')
addLuaSprite('bar'..i)
end
end
function onUpdate(elapsed)
if on then
for i=1,2 do
... |
-------------------------------------------------------------------------------------------------------------------------------------------------------------
-- VEAF radio menu script library for DCS Workd
-- By zip (2018)
--
-- Features:
-- ---------
-- Manage the VEAF radio menus in the F10 - Other menu
--
-- Prerequ... |
return require('lib/tap')(function (test)
test("read a file sync", function (print, p, expect, uv)
local fd = assert(uv.fs_open('README.md', 'r', tonumber('644', 8)))
p{fd=fd}
local stat = assert(uv.fs_fstat(fd))
p{stat=stat}
local chunk = assert(uv.fs_read(fd, stat.size, 0))
assert(#chunk ==... |
local function nSetPrimaryLoadout( len, ply )
if( GAMEMODE:GetState() != STATE_PREGAME ) then return end
local item = net.ReadUInt( 16 );
if( !ply.Inventory[item] ) then return end
local i = ply.Inventory[item];
if( GAMEMODE.Items[i.ItemClass].Secondary ) then return end
ply.PrimaryLoadout = item;
end
net.Re... |
function converMoney(amount)
local formatted = amount
while true do
formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1.%2')
if (k==0) then
break
end
end
return formatted
end |
return {
id = "icyhorns",
name = "Icy Horns of the Fridged Wastes",
description = "Cool!",
type = "hat",
rarity = 6,
hidden = false,
}
|
---
-- @module GroupUtils
-- @author Quenty
local require = require(script.Parent.loader).load(script)
local GroupService = game:GetService("GroupService")
local Promise = require("Promise")
local GroupUtils = {}
function GroupUtils.promiseRankInGroup(player, groupId)
assert(typeof(player) == "Instance" and playe... |
-------------------------------------
-- ADDON TABLES
-------------------------------------
local an, at = ...
-------------------------------------
-- VARIABLES
-------------------------------------
-- local variables
local G, L, C = at.G, at.L, at.C
--stuff from global scope
... |
local test = {}
local string = require 'string'
local msgpack = require 'msgpack'
function test.base()
assert(msgpack.decode(string.char(192)) == nil)
assert(msgpack.decode(string.char(194)) == false)
assert(msgpack.decode(string.char(195)) == true)
end
function test.float()
assert(msgpack.decode(string.char(203,... |
-- Types
-- Stephen Leitnick
-- December 20, 2021
export type Args = {
n: number,
[any]: any,
}
export type FnBind = (Instance, ...any) -> ...any
export type ServerMiddlewareFn = (Instance, Args) -> (boolean, ...any)
export type ServerMiddleware = {ServerMiddlewareFn}
export type ClientMiddlewareF... |
MenuLayer = Layer:extend()
function MenuLayer:new()
MenuLayer.super.new(self)
self.layer_name = "MenuLayer"
self.selected_index = 1
self.items = {"Play", "Controls", "Quit" }
end
-- CALLBACKS
-- 195x162
function MenuLayer:draw()
love.graphics.setFont(constants.big_font)
love.graphics.setColor(... |
AddCSLuaFile()
--
-- widget_axis_arrow
--
DEFINE_BASECLASS( "widget_arrow" )
local widget_axis_arrow = { Base = "widget_arrow" }
function widget_axis_arrow:Initialize()
BaseClass.Initialize( self )
end
function widget_axis_arrow:SetupDataTables()
BaseClass.SetupDataTables( self )
self:NetworkVar( "Int", 0, ... |
--[[
© 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 check if an entity can be static.
function cwStaticEnts:CanEntity... |
local http = {
post = function (url, data, next, _type)
end
}
return http
|
---------------------------------------------------------------
CPStatusTrackingBarMixin = { }
function CPStatusTrackingBarMixin:GetPriority()
return self.priority
end
--Override this in your bar.lua function
function CPStatusTrackingBarMixin:Update()
error("Implement an update function on your bar")
end
--Overr... |
-----------------------------------
-- Area: Buburimu Peninsula (118)
-- Mob: Shoal Pugil
-- Note: PH for Buburimboo
-----------------------------------
local ID = require("scripts/zones/Buburimu_Peninsula/IDs");
require("scripts/globals/regimes")
require("scripts/globals/mobs");
function onMobDeath(mob, player, isKi... |
#!/usr/bin/env texlua
-- The name of the module
module = "xelatexja"
-- Directories
maindir = "."
-- docfiledir = "."
-- sourcefiledir = "."
-- supportdir = maindir .. "/support"
-- testfiledir = "./testfiles"
-- testsuppdir = testfiledir .. "/support"
-- texmfdir = maindir .. "/texmf"
-- textfiledir = "."
-- Root d... |
local comp = require('component')
local modem = comp.modem
local term = require("term")
local event = require("event")
local computer = require('computer')
local gpu = comp.gpu
--Vars
local port = 12345
local full = true
local x_max, y_max = gpu.maxResolution()
local x_min, y_min = 1, 1
local speed = 1
local col = 0x... |
local statemTest = {}
local tag = "statemTest"
function statemTest.test()
if statem == nil then
log.error(tag, "this fireware is not support statem")
return
end
log.info(tag, "START")
log.info(tag, "DONE")
end
return statemTest
|
-- This function will be run in a child process
local child_code = string.dump(function ()
local p = require('lib/utils').prettyPrint
local uv = require('luv')
-- The parent is going to pass us the server handle over a pipe
-- This will be our local file descriptor at PIPE_FD
local pipe = uv.new_pipe(true)
... |
local server = {
announce_admin = {
Value = true,
Comment = "Announce to the server when an admin skips or removes videos from the playlist."
},
announce_error = {
Value = true,
Comment = "Will announce in chat addon specific lua errors to all admins on the server."
},
announce_warning = {
Value = true,... |
fx_version 'adamant'
game 'gta5'
description 'ESX Emergency System'
version '1.0.0'
files {
}
server_script "server.lua"
client_script "client.lua"
server_scripts {
'@mysql-async/lib/MySQL.lua',
'server/main.lua'
} |
if not modules then modules = { } end modules ['util-sci'] = {
version = 1.001,
comment = "companion to m-scite.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
}
local gsub, sub, find = ... |
local skynet = require "skynet"
require "Common.Util.util"
local ECS = require "ECS"
require "common.helper"
Time = require "game.scene.time"
Vector3 = require "game.util.Vector3"
local scene_helper = require "game.scene.scene_helper"
RequireAllLuaFileInFolder("./game/scene/System")
local BP = require "Blueprint"
loca... |
cooldown = 0
count = 0
MAX_TAGCOUNT = 2
MAX_TAG_RADIUS = 100
function clientTagWall(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement)
if (weapon==41) then
local team = getPlayerTeam(getLocalPlayer())
local ftype = getElementData(team, "type")
local tag = getElementData(source, "tag")
i... |
-- Faker = require('faker')
date = require('date')
-- global var
local startplaying = true
-- SEAL
if spoon.Seal then
spoon.Seal:bindHotkeys({ toggle = { {"cmd"}, "Space" }})
spoon.Seal:loadPlugins({"apps", "screencapture", "calc", "useractions", "pasteboard","urlformats"})
spoon.Seal.plugins.useractions.actions... |
local plugin = {}
plugin.name = "ESlint Wrapper"
plugin.version = "1.0"
local function script_path()
return debug.getinfo(1).source:match("@?(.*/)")
end
local function exec(cmd)
local handle = io.popen(cmd)
local result = handle:read("*a")
trimmed, idx = result:gsub("%s+$", "")
handle:close()
return trimm... |
for name, item in pairs(data.raw["item"]) do
if string.find(name, "filter%-miniloader") then
item.icons[1].icon = "__miniloader__/graphics/item/icon-base.png"
end
end
for name, loader in pairs(data.raw["loader-1x1"]) do
if string.find(name, "filter%-miniloader%-loader") then
loader.structur... |
Locales['en'] = {
['yusuf'] = 'Luxury skin',
['grip'] = 'Handles',
['flashlight'] = 'Flash light',
['silencieux'] = 'Silencer',
['bulletproof'] = 'Bullet proof',
['cagoule'] = 'Kidnapping Hood',
['clip'] = 'Ammunition magazi... |
--[[
- Sponge mod for Minetest
- water removal for survival
made by Benjie/Fiftysix - 27/8/18
updated 22/12/20
Soggy sponges can rarely be found deep in the sea where the darkness begins.
These can be cooked into dry sponges, and then placed near a liquid to remove an area of it
They will hold the water away un... |
dofile("test_setup.lua")
local file1 = [=[
return function()
return 5
end
]=]
local file2 = [=[
return function()
syntax error is here!!!
end
]=]
local func = DoFileString(file1)
assert(func() == 5)
WriteFileString(file2)
LuaReload.SetErrorHandler(function(fileName, errorMessage, i... |
return {
debug_stats = {}
}
|
local playsession = {
{"FAChyba", {734009}},
{"2kroketten", {2161}},
{"shoniko", {30939}},
{"MovingMike", {1372211}},
{"exabyte", {857432}},
{"christoharo", {2002}},
{"dog80", {872253}},
{"Lotek", {1285442}},
{"Menander", {2231623}},
{"Gerkiz", {446963}},
{"Mrog_163", {701165}},
{"cawsey21", {907754}},
{"c... |
local mod = foundation.new_module("foundation_binary", "2.0.0")
local insec = minetest.request_insecure_environment()
if insec then
foundation_binary.native_bit = insec.require("bit")
foundation_binary.ffi = insec.require("ffi")
else
minetest.log("warn", "foundation_binary requested an insecure environment but g... |
CreateMotel = function(player, motelUUID, motelData, isRented, callback)
local createSQL = [[
INSERT
INTO
renz_motels
(uuid, owner, name, lastRent)
VALUES
(@uuid, @owner, @name, @rent)
ON DUPLICATE KEY UPDATE
uuid = @uuid
... |
ITEM.name = "Bastard Gun"
ITEM.desc = "A fast yet inaccurate Submachinegun that fires 5.45mm Rounds"
ITEM.model = "models/arxweapon/bastardgun.mdl"
ITEM.class = "m9k_mrp_bastard"
ITEM.weaponCategory = "primary"
ITEM.width = 3
ITEM.height = 2
ITEM.price = 300
|
--[[
Color scheme for reference (copied from original repo):
+---------------------------------------------+
| Color Name | RGB | Hex |
|--------------+--------------------+---------|
| Black | rgb(40, 44, 52) | #282c34 |
|--------------+--------------------+---------|
| White | ... |
-----------------------------------
-- Area: Port Windurst
-- NPC: Kumama
-- Standard Merchant NPC
-----------------------------------
local ID = require("scripts/zones/Port_Windurst/IDs")
require("scripts/globals/shop")
function onTrade(player,npc,trade)
end
function onTrigger(player,npc)
local stock =
{
... |
console = console or {}
local function console_main_loop()
local stdin = socket.stdin()
if not stdin then
return
end
socket.lock(stdin)
while true do
local cmdline = socket.readline(stdin, "\n")
if cmdline ~= "" then
local func,err = load(cmdline)
... |
-- Copyright (c) 2010-2011 by Robert G. Jakabosky <bobby@neoawareness.com>
--
-- 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
-... |
-- KEYS: semaphoreKey
-- ARGV: semaphorerId, newPermits, totalPermits, currentTime, syncChannel, liveTime, force
-- return: nil(成功);waitingTime(失败,需等待的时间)
-- 数据结构(hash)
-- ${semaphoreKey}:
-- allPermits: ${所有permits}
-- allPermitsDeadline: ${allPermits的存活时间}
-- semaphorer-${semaphorerId1}: ${permits1}|${deadline... |
local info = debug.getinfo(1,'S');
local script_path = info.source:match[[^@?(.*[\/])[^\/]-$]]
loadfile(script_path .. "lib/reacoma.lua")()
if reacoma.settings.fatal then return end
local exe = reacoma.utils.wrap_quotes(
reacoma.settings.path .. "/fluid-hpss"
)
local num_selected_items = reaper.CountSelectedMedi... |
require 'common'
__set_window_size(1024,1024)
local aspect_ratio=1024/1024
local size=STATE.size
local oversample=1
local org_str="last_v.x*last_v.y*last_v.y"
local str_inner="(last_v.y*last_v.y*last_v.x/coord.x)"
local str_inner=org_str
str_x=str_x or string.format("last_v.x+(adif.x*lap.x-%s+feed*(1-last_v.x))*dt",s... |
function build_stats_win()
--blank window and re-add title bar
check (WindowRectOp (stats_win, 2, 0, 0, 0, 0, theme.WINDOW_BACKGROUND))
check (WindowRectOp (stats_win, 1, 0, 0, 0, 0, theme.WINDOW_BORDER))
AddMiniWindowTitleBar(stats_win,"current status")
--add empty container for x,y
local posX_1, pos... |
--[[
dead-simple publish-subscribe message bus
]]
local path = (...):gsub("pubsub", "")
local class = require(path .. "class")
local pubsub = class()
--create a new pubsub bus
function pubsub:new()
return self:init({
subscriptions = {},
})
end
--(internal; notify a callback set of an event)
function pubsub:_not... |
modernUI.showUpdateLog = function(self, badge)
local id = self.id
local player = self.player
local x = self.width/2 + 30
local y = 70
local version = 'v'..table_concat(version, '.')
local width = 520
local height = 300
showTextArea(id..'876', '', player, 5 - width/2, 0, 400, 400, 0x152d30, 0x152d30, 0, true) s... |
gpu = {};
love.graphics.setDefaultFilter("nearest", "nearest", 0)
gpu.FFONT = love.graphics.newFont("PSXBASIC.ttf",8)
love.graphics.setFont(gpu.FFONT)
gpu.DITHERPATTERN = love.graphics.newImage("libs/dither/dither.png")
gpu.DITHER = love.graphics.newShader("libs/dither/dither.glsl")
gpu.DITHERENABLE = 1
gpu.DITHER:s... |
for i,v in ipairs({
{12956,-1036.37952,-1048.40759,131.59709,0,0,25.80481,0,0,0, false},
{13638,-1108.51086,-1040.72607,130.78419,0,0,0,0,0,0, false},
{13638,-1101.57031,-1040.73022,138.95866,0,0,180,0,0,0, false},
{13636,-1085.01807,-1049.7627,146.74927,0,0,290.52551,0,0,0, false},
{18609... |
--[[
-- added by wsh @ 2017-01-10
-- 网络模块工具类
--]]
local NetUtil = {}
local unpack = unpack or table.unpack
local MsgIDMap = require "Net.Config.MsgIDMap"
local ReceiveSinglePackage = require "Net.Config.ReceiveSinglePackage"
local ReceiveMsgDefine = require "Net.Config.ReceiveMsgDefine"
local function XOR(seq, msgid,... |
--[[
module:ProxyTest
author:DylanYang
time:2021-02-11 01:08:05
]]
local ProxyImage = require("patterns.structural.proxy.ProxyImage")
local super = require("patterns.BaseTest")
local _M = Class("ProxyTest", super)
local public = _M.public
function _M.protected:DoExecTest()
local image = ProxyImage.new... |
--- Module implementing the luarocks "download" command.
-- Download a rock from the repository.
--module("luarocks.download", package.seeall)
local download = {}
package.loaded["luarocks.download"] = download
local util = require("luarocks.util")
local path = require("luarocks.path")
local fetch = require("luarocks.... |
-- $Id: testes/locals.lua $
-- See Copyright Notice in file all.lua
print('testing local variables and environments')
local debug = require"debug"
-- bug in 5.1:
local function f(x) x = nil; return x end
assert(f(10) == nil)
local function f() local x; return x end
assert(f(10) == nil)
local function f(x) x = ni... |
function read_file(filename)
local input = io.open(filename, 'r')
if input ~= nil then
io.input(input)
input_content = io.read()
io.close(input)
return input_content
end
return nil
end
function file_exists(filename)
f = io.open(filename, 'r')
if f ~= nil then
... |
local file,nodeStream,tokenStream;
file = io.open("./example/example.fls","r");
tokenStream = lexer.createStream(file:read("*a"));
nodeStream = paser.createStream(tokenStream);
lexer.printStream(tokenStream);
print("");
paser.printStream(nodeStream,0);
interpreter.runStream(nodeStream);
|
--[[
Copyright 2019-2021 ZwerOxotnik <zweroxotnik@gmail.com>
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 agree... |
VERSION = "1.0.0"
local micro = import("micro")
local microBuffer = import("micro/buffer")
local config = import("micro/config")
local shell = import("micro/shell")
local function errlog(msg, bufpane)
microBuffer.Log(("editorconfig error: %s\n"):format(msg))
bufpane:OpenLogBuf()
end
-- for debugging; use mic... |
local GameOverLayer = class("GameOverLayer", function()
return cc.Layer:create()
end)
GameOverLayerFactory = {}
function GameOverLayerFactory:create(score)
pRet = require("GameOverLayer").new()
pRet.score = score
pRet:init()
return pRet
end
function GameOverLayer:ctor()
self.score = nil... |
local identity = Device2.getIdentity(operation)
if identity.error then return identity end
local configIO = require("vendor.configIO")
local cio = identityState.state.config_io
if not cio or not cio.set or cio.set:sub(1, 2) == "<<" and configIO then
identity.state.config_io = {
timestamp = require("c2c.utils").g... |
local ok, diffview = pcall(require, 'diffview')
if not ok then
return
end
local cb = require'diffview.config'.diffview_callback
diffview.setup {
diff_binaries = false,
use_icons = false,
file_panel = {
width = 35,
},
key_bindings = {
disable_defaults = false,
view = {
["<tab>"] = cb... |
object_building_kashyyyk_decd_wroshyr_stump_dry_02 = object_building_kashyyyk_shared_decd_wroshyr_stump_dry_02:new {
}
ObjectTemplates:addTemplate(object_building_kashyyyk_decd_wroshyr_stump_dry_02, "object/building/kashyyyk/decd_wroshyr_stump_dry_02.iff")
|
-- This hasn't been used in a while, but does a gradient check for custom layer modules
paths.dofile('../net/setup.lua') -- Initialize options and load data
paths.dofile('../net/model.lua') -- Read in network model
local idx = 1
local batch_size = 2
local inp_dims = {{idx,idx+batch_size-1}}
for j = 1,dataDim:size... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.