content stringlengths 5 1.05M |
|---|
modifier_ghost_slow = class({})
--------------------------------------------------------------------------------
function modifier_ghost_slow:GetEffectName()
return "particles/generic_gameplay/generic_slowed_cold.vpcf"
end
--------------------------------------------------------------------------------
function m... |
gui appearance:
-- pending craft
<item name>
- R <amount required>
<item name>
- R <amount required> M <amount missing (cannot start crafting)>
<item name>
- C <amount to craft>
<item name>
- R <amount required> C <amount to craft>
-- active craft
-- note, AE2 does a stored/crafting/scheduled kind of t... |
-- Test an algorithm to draw pixel-perfect lines
local ffi = require "ffi"
local gl = require "opengl"
local glfw = require "glfw3"
local glapp = require "glfw3app"
local glu = require "glutils"
local sscale = 8
local swidth,sheight = 128, 128
local wwidth,wheight = swidth*sscale, sheight*sscale
local app... |
-- Copyright 2016 The Arken Platform Authors.
-- All rights reserved.
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file.
local driver = require "luasql.sqlite3"
local empty = require('arken.empty')
local toboolean = require('arken.toboolean')
local Class ... |
local Subject = require 'subjects/subject'
local Observer = require 'observer'
local util = require 'util'
--- @class ReplaySubject
-- @description A Subject that provides new Subscribers with some or all of the most recently
-- produced values upon subscription.
local ReplaySubject = setmetatable({}, Subject)
ReplayS... |
-- define all language properties
local lang = {
common = {
welcome = "Willkommen auf dem Server. Menu = K",
no_player_near = "~r~Kein Spieler in der Nähe.",
invalid_value = "~r~Ungültiger Wert.",
invalid_name = "~r~Ungültiger Name.",
not_found = "~r~Nicht vorhanden.",
request_refused = "~r~... |
local routines = {}
function addRoutine(f)
local co = coroutine.create(f)
routines[#routines+1] = {routine=co,filter=nil}
return #routines
end
function removeRoutine(id)
table.remove(routines,id)
end
local running = false
function run()
if running then error("A taskmanager is already running",0) end
os.queueE... |
require 'lide.core.init'
lide.sql = require 'lide.sql'
sqll = lide.sql.database ('sqlite3', 'testx.db')
sqll:create_table { lua_packages = {
package_checksum = "Text",
package_date = "Text",
package_description = "Text",
package_name = "Text",
package_prefix = "Text",
package_url = "Text",
... |
local api = vim.api
local fun = vim.fn
local function expand(path)
if path then
return fun.fnamemodify(fun.expand(string.gsub(string.gsub(path, "%s+", ""), "\"", "")), ":p")
else
return expand("%")
end
end
local function preview(file)
local file0 = expand(file)
local ceil = math.ceil
local vim_width... |
-- Initialize Lua environment and global utilities
local lua_version = _VERSION:sub(-3)
if lua_version < "5.3" then require("compat53") end -- Backport of lots of Lua 5.3 features to Lua 5.[12]
bit32 = bit32 or require("bit32") -- Backport of Lua 5.2+ bitwise functions to Lua 5.1
pl = require("pl.import_into")() -- Pen... |
local grammar = require 'parser.grammar'
local lang = require 'lang'
local jass
local ast
local messager
local parse_exp
local parse_lines
local function parser_error(str)
local line = ast.current_line
local start = 1
while true do
start = jass:find('[\r\n]', start)
if not start then
... |
-- Automatically generated from garcello_assets.xml
return Sprite (
love.graphics.newImage("images/vsGarcello/garcello_assets.png"),
{
{x = 5624, y = 2812, width = 700, height = 700, offsetX = 0, offsetY = -80, offsetWidth = 800, offsetHeight = 800}, -- 1: garcello Sing Note DOWN0000
{x = 4921, y = 2812, ... |
local inline_options = require "luacheck.inline_options"
local options = require "luacheck.options"
local core_utils = require "luacheck.core_utils"
local utils = require "luacheck.utils"
local filter = {}
-- A global is implicitly defined in a file if opts.allow_defined == true and it is set anywhere in the file,
--... |
require("util")
local isMain = Util.isMain()
--[[
Render to texture + glitch art.
Also a good demo of what textures can do currently
]]
function Start()
music, err = Music.new("test.ogg")
print(music, err)
paused = false
music:play(-1)
static.framedelay(1000)
end
--[[
draw some random colored... |
-- inculdes
local Dialog = require 'dialog'
local sound = require 'vendor/TEsound'
local prompt = require 'prompt'
local Timer = require('vendor/timer')
local Quest = require 'quest'
local telescope = require 'npcs/quests/telescopejuanquest'
local quests = require 'npcs/quests/alienquest'
local player = require 'player... |
local PUMPKIN = 2683
local PUMPKINHEAD_LIGHT_OFF = 2096
local PUMPKINHEAD_LIGHT_ON = 2097
local CANDLE = 2048
local KNIFE = 2566
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.itemid == PUMPKINHEAD_LIGHT_OFF and itemEx.itemid == CANDLE) then
doTransformItem(item.uid, PUMPKINHEAD_LIGHT... |
----------------------------------
-- Activation functions ----------
----------------------------------
local Activation = _G.LuaNNs.Object:subclass {}
function Activation.init(act)
assert(act.Name, "activation requires name to be provided")
assert(act.activation and type(act.activation) == "function", "act... |
print("1"+2)
print(pcall(function()
print("a"+2)
end))
|
--[[ Depends on the functions:
- ipairs
- string.sub
- string.byte
- string.lower
- table.insert
]]
-- Provides string.find, string.match
-- TODO: Captures, string.gmatch, string.gsub, remove string.charat
function string:charat(i) return self:sub(i, i) end
-- Basic classes
local function digit (code) ret... |
--[[-- Implementation of Roblox's event API using a @{rbx:class/BindableEvent|BindableEvent}.
Event re-implements Roblox's event API (connect, fire, wait) by wrapping a
@{rbx:class/BindableEvent|BindableEvent}.
This Event implementation is based on the [Signal from Nevermore Engine by
Quenty](https://github.com/Quenty... |
local getAdorneeBasePart = require(script.Parent.getAdorneeBasePart)
local function getAdorneeBasePartPosition(adornee: Instance)
local part = getAdorneeBasePart(adornee)
return if part then part.Position else nil
end
return getAdorneeBasePartPosition
|
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local NP = E:GetModule('NamePlates')
local NPCT = E:GetModule('NameplateTweaks')
local EP = LibStub("LibElvUIPlugin-1.0")
local addon, ns = ...
--------------
-- Upvalues --
--------------
local C_TimerAfter = C_Timer.After... |
---- -*- Mode: Lua; -*-
----
---- functions for testing
----
---- © Copyright IBM Corporation 2016.
---- LICENSE: MIT License (https://opensource.org/licenses/mit-license.html)
---- AUTHOR: Jamie A. Jennings
-- color_write comes from color_ou... |
local function printResult(a)
for i = 1, #a do
io.write(a[i], " ")
end
io.write("\n")
end
local function permgen(a, n)
n = n or #a
if n <= 1 then
printResult(a)
else
for i = 1, n do
a[n], a[i] = a[i], a[n]
permgen(a, n - 1)
a[n], a[i] = a[i], a[n]
... |
--proc/resources/font: font resources (the old API)
--Written by Cosmin Apreutesei. Public Domain.
setfenv(1, require'winapi')
require'winapi.winuser'
require'winapi.gdi'
require'winapi.logfonttype'
ffi.cdef[[
HFONT CreateFontIndirectW(const LOGFONTW *);
]]
--weights
FW_DONTCARE = 0
FW_THIN = ... |
--
-- Provides configuration an individiual mediation network.
--
-- @copyright (c) 2015 Upstart Illustration LLC. All rights reserved.
--
local AdConfig = Class()
function AdConfig.new(self)
local adNetwork
local adType
local adImpressionType
local frequency
local impression
local click
... |
local sc = {}
sc.__index = sc
local function norm_to_sec(value, max)
return util.linlin(0, 1, 0, max, value)
end
local function sec_to_norm(value, max)
return util.linlin(0, max, 0, 1, value)
end
local function initialize(self)
local set_loop_end_point = function(_, position)
self.loop_end_point ... |
if CLIENT then
include("pointcloud/cl_enums.lua")
include("pointcloud/cl_main.lua")
include("pointcloud/cl_ui.lua")
include("pointcloud/cl_hooks.lua")
else
for _, v in pairs(file.Find("pointcloud/cl_*.lua", "LUA")) do
AddCSLuaFile("pointcloud/" .. v)
end
include("pointcloud/sv_input.lua")
end
|
-----------------------------------
-- Area: Konschtat Highlands
-- NM: Ghillie Dhu
-----------------------------------
require("scripts/globals/regimes")
require("scripts/globals/status")
require("scripts/globals/utils")
require("scripts/globals/mobs")
-----------------------------------
function onMobInitialize(mo... |
--[[
Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com>
This code is licensed under the MIT. See LICENSE for details.
]]
local statistics = {}
local mattata = require('mattata')
local redis = require('libs.redis')
function statistics:init()
statistics.commands = mattata.commands(self.info.usernam... |
-- run with it:
-- $ CUDA_VISIBLE_DEVICES=0 th eval_esc50.lua -fold 1
-- $ CUDA_VISIBLE_DEVICES=0 th eval_esc50.lua -fold 2
-- $ CUDA_VISIBLE_DEVICES=0 th eval_esc50.lua -fold 3
-- $ CUDA_VISIBLE_DEVICES=0 th eval_esc50.lua -fold 4
-- $ CUDA_VISIBLE_DEVICES=0 th eval_esc50.lua -fold 5
-- The results will be written int... |
--
-- Created by IntelliJ IDEA.
-- User: mak
-- Date: 8/6/17
-- Time: 7:18 AM
-- Class: ${PACKAGE_NAME}
-- To change this template use File | Settings | File Templates.
--
local Relation = {
type = 'Relation',
}
Relation.__index = Relation -- get indices from the table
Relation.__metatable = Relation -- protect t... |
XLIB.Tests = XLIB.Tests or {}
XLIB.Tests.Started = XLIB.Tests.Started or false
-- FIXME: Lazy design, I apologize
XLIB.Tests.Queue = XLIB.Tests.Queue or {}
XLIB.Tests.Errored = XLIB.Tests.Errored or {}
XLIB.Tests.Succeeded = XLIB.Tests.Succeeded or {}
-- FIXME: Currently assigned but never used.
XLIB.Tests.QUEUED = 1... |
local unpack = unpack or table.unpack
CSS.loaded_packages = {}
local loaded_packages = CSS.loaded_packages
function CSS.Register(name, package)
CSS.loaded_packages[name] = package
end
function CSS.Load(...)
local names = {...}
assert(#names > 0, "CSS.Load() - invalid package names")
local packages =... |
local util = require("sourcery.util")
local M = {}
---@param config Config
---@return ColorScheme
function M.setup(config)
config = config or require("sourcery.config")
-- Color Palette
---@class ColorScheme
local colors = {}
colors = {
none = "NONE",
dark0 = "#292f3a",
dark1 = "#2e3440", -... |
require "resources/mysql-async/lib/MySQL"
---------------------------------- FUNCTION ----------------------------------
-- FR -- Fonction : Permet d'ajouter une vente à la bourse, quand une ressource est vendu est doit être ajouté à la bourse
-- FR -- Paramètre(s) : id = ID de la ressource
------------------------... |
function isDivisible(n)
local t = n
local a = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
while t ~= 0 do
local r = t % 10
if r == 0 then
return false
end
if n % r ~= 0 then
return false
end
if a[r + 1] > 0 then
return false
end... |
local AddonData, privateTable = ...
if LibVersionCheck then
return
end
LibVersionCheck={}
local function L(x) return Translations.LibVersionCheck.L(x) end
local debugMode=false
-- Function to hand over to Command.Message.Send when we're not really
-- interested in whether the message arrives or not.
local func... |
local IInput = require("api.gui.IInput")
local IConfigMenu = require("api.gui.menu.config.IConfigMenu")
local InputHandler = require("api.gui.InputHandler")
local Gui = require("api.Gui")
local UiTheme = require("api.gui.UiTheme")
local Ui = require("api.Ui")
local UiWindow = require("api.gui.UiWindow")
local UiList = ... |
require("lmemprof")
local ffi = require("ffi")
ffi.cdef([[
bool IsEnabled();
const char* GetZone();
void Enable();
void Disable();
void SetZone(const char* name);
void ClearZone();
void IncrementCounter(size_t number);
void DecrementCounter(size_t number);
void ResetCounter();
void ResetCounterFor(const cha... |
local insert = table.insert
module "loco"
commands = {
description = {args = 0,
f = function(doc, line)
doc.description = doc.description or {}
insert(doc.description, line)
end
};
param = {args = 1,
f = function(doc, parameter, desc)
doc.args = doc.args or {}
doc.args[parameter] = doc.args[par... |
local Name, Addon = ...
local L = LibStub("AceLocale-3.0"):GetLocale(Name)
local LibExtraTip = LibStub("LibExtraTip-1")
local Price, Models, Store, Unit, Util = Addon.Price, Addon.Models, Addon.Store, Addon.Unit, Addon.Util
local Self = Addon.GUI.Tooltip
function Self:OnEnable()
LibExtraTip:AddCallback(Self.OnTool... |
local skynet = require "skynet"
require "skynet.manager"
local log = require "chestnut.skynet.log"
local service = require "service"
local client = require "client"
local traceback = debug.traceback
local assert = assert
local users = {} -- 全服聊天
local rooms = {} -- 房间聊天
local CMD = {}
function CMD.s... |
local vtmp1
local vtmp2
return {
init = function()
vtmp1 = vec2()
vtmp2 = vec2()
end,
type = {
__call = function(_, x, y)
return setmetatable({ x = x or 0, y = y or 0 }, vec2)
end,
__tostring = function(v)
return string.format('(%f, %f)', v.x, v.y)
end,
__add = function(v... |
-- Thanks to Ulydev for push https://github.com/Ulydev/push
push = require 'push'
-- Thanks to Matthias Richter for Class https://github.com/vrld/hump/blob/master/class.lua
Class = require 'Class'
require 'CenterBlock'
require 'TetriminoManager'
require 'Util'
-- NOTE:
-- In multiple places we pass in actual coords r... |
--[[
This file samples characters from a trained model
Code is based on implementation in
https://github.com/oxford-cs-ml-2015/practical6
Changes (raymondhs):
Beam search are parallelized on GPU
UTF8 character handling
]]--
require 'torch'
require 'nn'
require 'nngraph'
require 'optim'
require 'lfs'
require 'uti... |
answ = {"=", "<", ">"}
br1 = math.random(10);
ind1 = math.random(2)
br2 = math.random(10);
ind2 = math.random(2)
if (br2 == br1) then
if (ind2 == 1) then
ind1 = 2
else
ind1 = 1
end
end
if (ind1 == 1) then
broj1 = br1 * 1000
else
broj1 = br1 * 10000
end
if (ind2 == 1) the... |
require "Window"
local IconOverlay = {}
IconOverlay .__index = IconOverlay
setmetatable(IconOverlay, {
__call = function (cls, ...)
return cls.new(...)
end,
})
function IconOverlay.new(icon)
local self = setmetatable({}, IconOverlay)
self.icon = icon
self.overlayColor = CColor.new(1, 0, 0, 0.75)
self.o... |
---------------------------------------------------------------------------------------------------
-- Precondition:
-- 1) app1 is registered on SDL
--
-- Steps:
-- 1) app1 sends a sends a CreateInteractionChoiceSet RPC
-- 2) app1 sends a sends a PerformInteraction RPC
-- 3) app1 sends a CancelInteraction Reques... |
-------------------------------------------------------------------------------
-- Spine Runtimes License Agreement
-- Last updated January 1, 2020. Replaces all prior versions.
--
-- Copyright (c) 2013-2020, Esoteric Software LLC
--
-- Integration of the Spine Runtimes into software or otherwise creating
-- der... |
local modConfig = {}
-- TechA
--to support other mods
--table initialized and unitList is needed!
modConfig["TA"] = {}
modConfig["TA"]["unitList"] =
{
--Arm
--Ground Weapons--
armclaw = { weapons = { 1 } },
--amortor = { weapons = { 1 } },
armllt = { weapons = { 1 } },
... |
-- ------ extra functions ------ --
function policyCheck() -- check to see if this policy's name exceed the maximum of 15 characters
policyNameLength = string.len(arg[1])
if policyNameLength > 15 then
nameTooLong = 1
end
end
function policyWarn() -- display status and warning messages at the top of the page
if ... |
-- Slot.lua
-- @Author : Dencer (tdaddon@163.com)
-- @Link : https://dengsir.github.io
-- @Date : 8/31/2019, 3:29:19 AM
local InCombatLockdown, PickupContainerItem = InCombatLockdown, PickupContainerItem
---@type ns
local ns = select(2, ...)
---@class Slot: Base
local Slot = ns.Addon:NewClass('Slot', ns.Base)
ns... |
local reports = require "kong.core.reports"
describe("reports", function()
describe("get_system_infos()", function()
it("gets infos about current host", function()
local infos = reports.get_system_infos()
assert.is_number(infos.cores)
assert.is_string(infos.hostname)
assert.is_string(info... |
C_ResearchInfo = {}
---[Documentation](https://wowpedia.fandom.com/wiki/API_C_ResearchInfo.GetDigSitesForMap)
---@param uiMapID number
---@return DigSiteMapInfo[] digSites
function C_ResearchInfo.GetDigSitesForMap(uiMapID) end
---@class DigSiteMapInfo
---@field researchSiteID number
---@field position Vector2DMixin
-... |
-- ============================= --
-- Copyright 2018 FiatAccompli --
-- ============================= --
-- File must be named ModLens_XYZ in order for MoreLenses to find it.
-- Lense that shows attrition per turn for the local player, both by shading and by writing the
-- exact amount of attrition in each hex.
in... |
--TestMove
--author: SukaiPoppuGo
local tArgs = {...}
--
local programName = fs.getName( shell.getRunningProgram() )
settings.load("/settings/"..programName)
os.loadAPI("/api/pos/turtle.lua")
os.loadAPI("/api/utils.lua")
os.loadAPI("/api/ui.lua")
--os.loadAPI("move")
utils.require_once("/class/Point.lua")
utils.req... |
local TestWidget = require "dev.demo.test.TestWidget"
local TestAni = require "dev.demo.test.TestAni"
local TestMore = require "dev.demo.test.TestMore"
local TestServer = require "dev.demo.test.TestServer"
local TestHttp = require "dev.demo.test.TestHttp"
local TestDownload = require "dev.demo.test.TestDownload"
local ... |
local base64 = require "base64"
local brute = require "brute"
local creds = require "creds"
local http = require "http"
local shortport = require "shortport"
local stdnse = require "stdnse"
description = [[
Performs brute force password guessing against HTTP proxy servers.
]]
---
-- @usage
-- nmap --script http-proxy... |
require 'depparser_rerank'
require 'utils'
require 'dict'
require 'xlua'
require 'dpiornn_gen'
require 'dp_spec'
torch.setnumthreads(NUM_THREADS)
if #arg == 5 then
dic_dir_path = arg[1]..'/'
data_path = arg[2]..'/'
------------------ load dics and wemb ----------------
init_wemb_type = nil
dim = tonumber(arg[3])... |
local plymeta = FindMetaTable( "Player" )
if SERVER then
util.AddNetworkString( "DNA" )
function plymeta:AddDNA( amount )
local dnapoints = self:GetDNA()
self:SetDNA(dnapoints + amount)
end
function plymeta:SetDNA( amount )
self.stats["DNA"] = amount
net.Start("DNA")
net.WriteDouble(amoun... |
local is_healthcheck_room = module:require "util".is_healthcheck_room;
module:hook("muc-occupant-joined", function (event)
local room, occupant = event.room, event.occupant;
if is_healthcheck_room(room) then
return;
end
room:set_affiliation(true, occupant.bare_jid, "owner");
end, 2);
module:... |
include('shared.lua')
function ENT:Draw()
self:DrawModel()
if LocalPlayer():GetPos():DistToSqr(self:GetPos()) <= 200 *200 then
local ang = self:GetAngles()
local pos = self:GetPos() +ang:Up() *0.9 -ang:Forward() *4 -ang:Right() *1.8
local amount = self:GetAmount()
cam.Start3D2D(pos, ang, 0.1)
surf... |
require("ItemTweaker_Copy_CC");
--AXESRECRAFTING
--Crafting
TweakItem("AxeRecrafting.AxeHandle","DisplayCategory","Craft");
TweakItem("AxeRecrafting.FireAxeHead","DisplayCategory","Craft");
TweakItem("AxeRecrafting.WoodAxeHead","DisplayCategory","Craft");
TweakItem("AxeRecrafting.HandAxeHead","DisplayCategory","Craft"... |
local services = {"Workspace", "Players", "CoreGui", "CorePackages", "Lighting",
"PluginGuiService", "ReplicatedFirst", "ReplicatedScriptService", "ReplicatedStorage",
"RobloxPluginGuiService", "ServerScriptService", "ServerStorage", "StarterGui",
"StarterPack", "StarterPlayer", "SoundService", "Chat", "Localizatio... |
--// KingCh1ll //--
--// 12/12/2020 //--
--// Module Table //--
local PluginModule = {}
PluginModule.__index = PluginModule
--// Services //--
local HTTP = game:GetService("HttpService")
local CoreGui = game:GetService("CoreGui")
local Players = game:GetService("Players")
local TextService = game:GetService("TextServ... |
object_mobile_costume_exar_kun_cultist = object_mobile_shared_costume_exar_kun_cultist:new {
}
ObjectTemplates:addTemplate(object_mobile_costume_exar_kun_cultist, "object/mobile/costume_exar_kun_cultist.iff")
|
local slt = require "/libs/slt2"
local gen = {}
function string.insert(value, insert, place)
if place == nil then
place = string.len(value) + 1
end
return string.sub(value,1,place-1) .. tostring(insert) .. string.sub(value,place,string.len(value))
end
gen.processLine = function(procLine, line)
local ... |
#!/usr/bin/env tarantool
test = require("sqltester")
test:plan(83)
--!./tcltestrunner.lua
-- 2006 January 31
--
-- The author disclaims copyright to this source code. In place of
-- a legal notice, here is a blessing:
--
-- May you do good and not evil.
-- May you find forgiveness for yourself and forgive other... |
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
ui_page "ui/index.html"
description "XGC Tuner Chip"
client_script {
"client/main.js",
"client/client.lua"
}
server_script {
"server/server.lua"
}
files {
"ui/index.html",
"ui/style.css",
"ui/app.js",
"ui/tablet.png"
} |
local _M = {
VERSION = "3.5.0.2"
}
local json = require "cjson"
local mp = require "multipart-post"
local ltn12 = require "ltn12"
local resty_http, ssl_https
local function decode_reply(body, status, method)
-- ngx.log(ngx.DEBUG, "Incoming reply:", ok.body)
local tab = json.decode(body)
if status ~= 200 or n... |
local lpeg = require'lpeg'
--local pp = require'pretty'
local number = lpeg.R'09' ^ 1 / tonumber
local marker = lpeg.Ct("(" * number * "x" * number * ")")
local letter = lpeg.R('AZ')
local data = lpeg.C((letter + marker) ^ 0)
local pattern = lpeg.C(letter) * data + marker * data
local function length_1(s)
local ac... |
local redisKey = "sentinel:token:"..KEYS[1];
local configKey = "sentinel:config:"..KEYS[1];
local acq = tonumber(string.sub(KEYS[2], 0, #KEYS[2] - #KEYS[1]));
redis.replicate_commands();
-- get config from redis
local config = redis.call("HGETALL", configKey);
if(next(config) == nil)
then
return -2;
end;
local sa... |
class "RenderFrame"
function RenderFrame:__getvar(name)
if name == "viewport" then
local retVal = Polycode.RenderFrame_get_viewport(self.__ptr)
if retVal == nil then return nil end
local __c = _G["Rectangle"]("__skip_ptr__")
__c.__ptr = retVal
return __c
end
end
function RenderFrame:__setvar(name,value)
... |
--[[
TheNexusAvenger
Implementation of a command.
--]]
local BaseCommand = require(script.Parent.Parent:WaitForChild("BaseCommand"))
local CommonState = require(script.Parent.Parent:WaitForChild("CommonState"))
local Command = BaseCommand:Extend()
--[[
Creates the command.
--]]
function Command:__new()
self:In... |
c1_count = 0
c2_count = 0
c1 = coroutine.create(function()
while true do
c1_count = c1_count + 1
coroutine.yield()
end
end)
c2 = coroutine.create(function()
c2_count = c2_count + 1
coroutine.resume(c1)
coroutine.yield()
end)
coroutine.resume(c1)
coroutine.resume(c2)
--print(c1_co... |
-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local netmod = luci.model.network
local device = luci.util.class(netmod.interface)
netmod:register_pattern_virtual("^relay-%w")
local proto = netmod:register_protocol("relay")
function proto.get_i18n(self)
r... |
data:extend({
{
type = "item",
name = "enhanced-combinator-1",
icon = "__enhanced-combinators__/graphics/icons/enhanced-combinator-1.png",
icon_size = 32,
flags = { "goes-to-quickbar" },
subgroup = "circuit-network",
place_result = "enhanced-combinator-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.)
https://creativecommons.org/licenses/by-nc-nd/3.0/legalcode
--]]
--[[
You don't have to do this, but I think it's nicer.
Alternatively, yo... |
--[[
Title: An area is a non-overlaping space inside a screen
Author(s): LiXizhi
Date: 2010.10.23
Desc:
use the lib:
------------------------------------------------------------
NPL.load("(gl)script/apps/Taurus/Editors/Screen/area.lua");
local wmArea = commonlib.gettable("PETools.WindowManager.wmArea");
--------------... |
dofile 'tsys.lua'
--__go_import "math/rand"
--__go_import "fmt"
--__go_import "time"
__type__.anon_sliceType = __sliceType(__type__.float64); -- 'IMMEDIATE' anon type printing. utils.go:506
__type__.Matrix = __newType(0, __kindStruct, "main.Matrix", true, "main", true, nil);
__type__.anon_sliceType_1 = __sliceType(... |
--[================================[
@Language.ko-KR
@Summary
[Player]의 [Unit]의 유닛보유수를 [Amount]만큼 [Modifier]합니다.
@Group
유닛보유수
@param.Unit.TrgUnit
@param.Player.TrgPlayer
@param.Modifier.TrgModifier
@param.Amount.Number
@Language.us-EN
@Summary
[Player]의 [Unit]의 유닛보유수를 [Amount]만큼 [Modifier]합니다.
@Group
유닛보유수
@param.Uni... |
--allows loading of api's with .lua on the end of the file name
--author: theoriginalbit
--post link: http://www.computercraft.info/forums2/index.php?/topic/19383-loading-api-help/page__view__findpost__p__185496
local function loadAPI(path)
--# check the file exists
if not fs.exists(path) then
error("File ... |
--[[ REQUESTOR ]]
require "lookup"
request = {}
--[[request.clientIP = "127.0.0.1"
request.clientPort = conf.randPort()]]
local chat = {}
chat.reged = false --if the client is registrated at chat queue at QS
chat.cname = "" --the name of this client at the chat queue
chat.socket = 0 --socket
chat.pool = {} --store al... |
local abs = math.abs
local vec
local metatable
vec = {
__call = function(self, x, y, z)
if not x then
return setmetatable({0, 0, 0}, metatable)
elseif type(x) == "number" then
return setmetatable({x, y, z}, metatable)
else
return setmetatable(x, metatable)
end
end,
}
metatable = {
__add = function... |
--New
object_tangible_sign_player_shared_efol_hanging_sign_01 = SharedTangibleObjectTemplate:new {
clientTemplateFileName = "object/tangible/sign/player/shared_efol_hanging_sign_01.iff"
}
ObjectTemplates:addClientTemplate(object_tangible_sign_player_shared_efol_hanging_sign_01, "object/tangible/sign/player/shared_efol... |
local adam = require("adam.adam")
local actions = require("adam.actions")
local mock = require("deftest.mock.mock")
local events = {
INITIAL = function() end,
STATE1 = function() end,
STATE2 = function() end,
FROMANY = function() end,
}
return function()
describe("Basic Adam systems", function()
local adam_in... |
-----------------------------------------
-- ID: 5638
-- Item: pogaca_+1
-- Food Effect: 5Min, All Races
-----------------------------------------
-- Lizard Killer +12
-- Resist Paralyze +12
-- HP Recovered While Healing 6
-- MP Recovered While Healing 6
-----------------------------------------
require("scripts/global... |
utils = {}
function utils.get_property(action, key)
if type(key) == "table" then
path = ""
property = action
for i,v in ipairs(key) do
if property == nil then
return nil
end
property = property[v]
path = path .. "." .. v
... |
--[[
Wide residual networks blocks.
Source: https://github.com/szagoruyko/wide-residual-networks/blob/master/models/wide-resnet.lua
]]
local Convolution = nn.SpatialConvolution
local Avg = nn.SpatialAveragePooling
local ReLU = nn.ReLU
local Max = nn.SpatialMaxPooling
local SBatchNorm = nn.SpatialBatchNormaliza... |
vim.g.nvim_tree_indent_markers = 1
vim.g.nvim_tree_git_hl = 1
vim.g.nvim_tree_respect_buf_cwd = 1
require("nvim-tree").setup({
update_to_buf_dir = {
enable = false,
auto_open = false,
},
ignore_ft_on_setup = { "dashboard", "startify" },
disable_netrw = 1,
diagnostics = {
enable = true,
},
upd... |
-- Trie search tests
context("Trie search functions", function()
local t = require "rspamd_trie"
local logger = require "rspamd_logger"
local patterns = {
'test',
'est',
'he',
'she',
'str\1ing'
}
local trie = t.create(patterns)
local cases = {
{'test', true, {{4, 1}, {4, 2}}},
... |
require 'Q/CSERVER/src/lua/to_cdef'
mk_config = require 'Q/CSERVER/src/lua/mk_config'
|
local png = require "toy.file.export.png"
local bug = require "toy.debug"
local fs = require "toy.file"
local function load_image_file(folder,filename)
local stream = fs.create_stream("default") -- Create a file stream using <cstdio>.
local buffer = fs.create_image_buffer() -- Create a buffer for loading ... |
function Client_SaveConfigureUI(alert)
Mod.Settings.PestilenceStrength = numberInputField1.GetValue();
end
|
local mapping = require("lib.keymapping")
require("fzf-lua").setup({
winopts = {
hl_normal = "Normal",
hl_border = "FloatBorder",
},
})
mapping.nnoremap("<C-t>", ":FzfLua files<CR>")
|
-- This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild
--
-- This file is compatible with Lua 5.3
local class = require("class")
require("kaitaistruct")
local enum = require("enum")
--
-- describes the first 4 header bytes of a TS Packet header
TsPacketHeader = class.clas... |
-- Copyright (c) 2020-2021 shadmansaleh
-- MIT license, see LICENSE for more details.
local utils = require('lualine.utils.utils')
local Branch = require('lualine.component'):new()
-- vars
Branch.git_branch = ''
Branch.git_dir = ''
-- os specific path separator
Branch.sep = package.config:sub(1, 1)
-- event watcher to ... |
ENT.Type = "anim"
ENT.PrintName = "Underglow Light"
ENT.Author = "TheAsian EggrollMaker"
ENT.Contact = "theasianeggrollmaker@gmail.com"
ENT.Purpose = ""
ENT.Instructions = ""
ENT.Spawnable = false
ENT.AdminSpawnable = false
function ENT:SetupDataTables( )
self:NetworkVar( "Int", 0, "Red" )
self:NetworkVar( "Int", 1,... |
local K, C, L, _ = select(2, ...):unpack()
if C["ActionBar"].Enable ~= true then return end
local _G = _G
local GetCVarBool = GetCVarBool
local SetCVar = SetCVar
local CreateFrame = CreateFrame
local NUM_ACTIONBAR_BUTTONS = NUM_ACTIONBAR_BUTTONS
-- Show empty buttons
local ShowGrid = CreateFrame("Frame")
ShowGrid:Reg... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.