content stringlengths 5 1.05M |
|---|
local functions = {}
--可变参数函数
function functions.func(...)
for k,v in ipairs{...} do
print(k .. "->" .. v)
end
--通过下标获取指定参数
local a = select (3,...)
print(a)
--获取参数长度
print(select('#',...))
end
--多重返回值函数
function functions.foo()
return "a","b"
end
--内嵌函数
function functions.newCounter()
local i ... |
local p = peripheral.find("variableStore")
test.assert(p, "store not found")
test.assert(p.list(), "nothing to read")
test.eq({ dynamic = false, id = 0, type = "string", value = "test1" }, p.read(1), "first variable error")
test.eq({ dynamic = false, id = 1, type = "string", value = "test2" }, p.read(2), "second variab... |
---@class CS.FairyEditor.Framework.Gears.FGearFontSize : CS.FairyEditor.Framework.Gears.FGearBase_CS.System.Int32
---@type CS.FairyEditor.Framework.Gears.FGearFontSize
CS.FairyEditor.Framework.Gears.FGearFontSize = { }
---@return CS.FairyEditor.Framework.Gears.FGearFontSize
---@param owner CS.FairyEditor.FObject
funct... |
local matBulge = Material("Effects/strider_bulge_dudv")
local matBlueBeam = Material("Effects/blueblacklargebeam")
function EFFECT:Init(data)
self.Shooter = data:GetEntity():GetOwner()
self.EndPos = data:GetOrigin()
self.Attachment = data:GetAttachment()
self.WeaponEnt = self.Shooter:G... |
-- license:BSD-3-Clause
-- copyright-holders:MAMEdev Team
defines {
"OSD_UWP=1",
"USE_QTDEBUG=0",
"SDLMAME_NOASM=1",
"USE_OPENGL=0",
"NO_USE_MIDI=1",
"WINVER=0x0603",
"_WIN32_WINNT=0x0603",
"NTDDI_VERSION=0x06030000",
"MODERN_WIN_API",
"WIN32_LEAN_AND_MEAN",
"NOMINMAX",
}
flags {
"Unicode",
}
|
--
-- Created by IntelliJ IDEA.
-- User: chen0
-- Date: 20/8/2017
-- Time: 3:02 PM
-- To change this template use File | Settings | File Templates.
--
local network = {}
network.__index = network
network.FlowEdge = {}
network.FlowEdge.__index = network.FlowEdge
network.FlowNetwork = {}
network.FlowNetwork.__index = ... |
local xmlns_last = "jabber:iq:last";
local function set_uptime(self, uptime_info)
self.starttime = uptime_info.starttime;
end
function verse.plugins.uptime(stream)
stream.uptime = { set = set_uptime };
stream:hook("iq/"..xmlns_last, function (stanza)
if stanza.attr.type ~= "get" then return; end
local reply = ... |
-- LoveMenu/PageObject.lua
module("LoveMenu.PageObject", package.seeall)
require "Tools/Object"
require "Tools/String"
require "Math/Position"
require "LoveHud/HudObject"
-- Extends HudObject class
local PageObject = LoveHud.HudObject.getClass()
function PageObject.initialize(id, page)
local obj = LoveHud.HudObjec... |
--------------------------------------------------------------------------------
local _ = require 'cherry.libs.underscore'
--------------------------------------------------------------------------------
local ProgressionRecorder = {}
--------------------------------------------------------------------------------... |
data:extend({
{
type = "item-group",
name = "defense",
order = "gv",
inventory_order = "gv",
icon = "__5dim_core__/graphics/icon/defense.png",
icon_size = 64,
},
{
type = "item-subgroup",
name = "defense-burner",
group = "defense",
order = "a"
},
{
type = "item-subg... |
local reliableEvents = require(script:GetCustomProperty("ReliableEvents"))
local tankEquipment = script:GetCustomProperty("TankEquipment"):WaitForObject()
local tankSettings = script:GetCustomProperty("TankSettings"):WaitForObject()
local tankProjectile = script:GetCustomProperty("TankProjectile01")
local explosionVF... |
--string purifier library
local purify = {}
purify.purify_pings = function(msg,input)
local text = input
while text:match("<@(%D*)(%d*)>") do
local obj,id = text:match("<@(%D*)(%d*)>")
local substitution = ""
if obj:match("!") then
local member = msg.guild:getMember(id)
if member then
... |
local Snowflake = require('../Snowflake')
local format = string.format
local wrap, yield = coroutine.wrap, coroutine.yield
local User, property, method = class('User', Snowflake)
User.__description = "Represents a Discord user."
function User:__init(data, parent)
Snowflake.__init(self, data, parent)
end
function U... |
local version = "1.26"
whatis("Name: Gotoblas")
whatis("Version: " .. version)
whatis("Category: library, mathematics")
whatis("Description: Blas Level 1, 2, 3 routines")
whatis("URL: http://www.tacc.utexas.edu")
local pkgRoot = "/vol/pkg"
local pkgName = pathJoin("gotoblas",version)
local base = pa... |
local awful = require('awful')
local beautiful = require('beautiful')
local wibox = require('wibox')
local xresources = require('beautiful.xresources')
local dpi = xresources.apply_dpi
require('widgets.decoration')
local top_left = {}
awful.screen.connect_for_each_screen(function(s)
s.top_left = awful.wibar(
... |
TrialsSearchObjectMenuComponent = {}
function TrialsSearchObjectMenuComponent:fillObjectMenuResponse(pSceneObject, pMenuResponse, pPlayer)
local menuResponse = LuaObjectMenuResponse(pMenuResponse)
local trialOwnerID = readData(SceneObject(pSceneObject):getObjectID() .. ":ownerID")
local playerID = SceneObject(pPlay... |
require 'torch'
require 'cutorch'
require 'LSTM'
require 'LanguageModel'
local wzlstm = require 'test.wojzaremba_lstm'
--[[
To make sure our LSTM is correct, we compare directly to Wojciech Zaremba's
LSTM implementation found in https://github.com/wojzaremba/lstm.
I've modified his implementation to fit in a single... |
--- Responsive layout.
-- @module crit.layout
-- @todo
-- luacheck: globals safearea
local M = {}
local h_window_change_size = hash("window_change_size")
local h_size = hash("size")
local design_width = tonumber(sys.get_config("display.width", "960"))
local design_height = tonumber(sys.get_config("display.height", ... |
--- StateBreakable is the @{Entity} definition for a scriptable @{Breakable} object.
-- Subclass of @{Breakable}.
-- @entity StateBreakable
--- On returns true if the breakable is triggered.
-- @return A boolean indicating if the breakable is triggered.
function StateBreakable:On()
end
|
local path = select(1, ...)
local success, reason = require("archive").unpack(path, require("filesystem").path(path))
if not success then
require("GUI").alert(reason)
end
require("computer").pushSignal("MineOSCore", "updateFileList") |
function GM:GetActivePlayers()
local players = { }
for _, v in pairs(player.GetAll()) do
if IsValid(v) and v:Alive() then
table.insert(players, v)
end
end
return players
end
function GM:CheckForWinner()
if self:GetGameState() == 3 then
local count = 0
local winner = nil
for _, v in pa... |
_hx_bind = function(o,m)
if m == nil then return nil end;
local f;
if o._hx__closures == nil then
_G.rawset(o, '_hx__closures', {});
else
f = o._hx__closures[m];
end
if (f == nil) then
f = function(...) return m(o, ...) end;
o._hx__closures[m] = f;
end
return f;
end
|
vim.bo.tabstop = 2
vim.bo.expandtab = true
|
--MIT License
--
--Copyright (c) 2019 @ym2601 (https://github.com/sanwabear)
--
--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
--... |
if io.load then
return
end
local uni = require 'ffi.unicode'
local real_io_open = io.open
function io.open(path, ...)
return real_io_open(uni.u2a(path:string()), ...)
end
function io.load(file_path)
local f, e = io.open(file_path, "rb")
if f then
if f:read(3) ~= '\xEF\xBB\xBF' t... |
local settings_key = KEYS[1]
local running_key = KEYS[2]
local executing_key = KEYS[3]
local now = tonumber(ARGV[1])
local clear = tonumber(ARGV[2])
local limiter_version = ARGV[3]
if clear == 1 then
redis.call('del', settings_key, running_key, executing_key)
end
if redis.call('exists', settings_key) == 0 then
-... |
return {'ostensief','ostensorium','ostentatie','ostentatief','osteologie','osteopathie','osteoporose','ostracisme','ostrogotisch','ostrogoten','osteoma','osteopaat','ostaijen','ostendorf','ost','ostentatieve','ostentatiever','osteopaten','ostrogotische','ostentatiefst','ostensieve','ostentaties','osteomata'} |
--[[
This file implements a ProgressBar using the datastore.
]]
local LocalPlayerData = require(game:GetService("ReplicatedStorage"):WaitForChild("LocalPlayerData"))
----------------------------------------------------------------
local module = {}
module.__index = module
--[[
Configures a new progress bar.
@root is... |
--スクイブ・ドロー
--Squib Draw
--Scripted by Eerie Code
function c101002055.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101002055+EFFEC... |
-- Add, remove, or edit the preferences of a unit
-- Not to be confused with "pref_adjust" and "prefchange"
--@ module = true
local help = [====[
modtools/pref-edit
==================
Add, remove, or edit the preferences of a unit.
Requires a modifier, a unit argument, and filters.
- ``-unit <UNIT ID>``:
The giv... |
--Made by Sander#2211
Config = {}
Config.Coords = {x= 299.75329589844, y= -576.01910400391, z= 42.260848999023}
Config.Price = 1000
Config.Blipname = 'Revive-Station'
|
--
-- gh-5430: when MVCC was enabled for memtx, new replica registration attempt
-- could fail with 'duplicate error' in _cluster space. This was happening,
-- because _cluster is memtx. Changes to it were not visible for newer requests
-- until commit.
-- New replica ID was looked up in the space by its full scan. The... |
--[[
tp8_bend
Uses:
Todo: rotation problem, make the up rock spell
Models: shoe: models/props_junk/Shoe001a.mdl
hula: models/props_lab/huladoll.mdl
soda: models/props_junk/PopCan01a.mdl
kettle: models/props_interiors/pot01a.mdl
alcohol: models/props_junk/garbage_glassbottle002a.mdl
... |
buffer = Procedural.TextureBuffer(128)
Procedural.Image(buffer):setFile("red_brick.jpg"):process()
Procedural.Flip(buffer):setAxis(Procedural.Flip_FLIP_HORIZONTAL):process()
tests:addTextureBuffer(buffer)
dotfile = tests:getDotFile("texture_14c", "Flip_horizontal_Demo")
dotfile:set("Image", "texture_image", "Flip", "te... |
-- shared
--[[
duck typing:
]]--
local _={}
_.do_grow=function(entity,sprite_name)
-- log("Growable.do_grow. sprite:"..sprite_name.." ent:"..Inspect(entity))
entity.sprite=sprite_name
entity.grow_phase_index=entity.grow_phase_index+1
end
return _ |
object_mobile_dressed_dathomir_nightsister_sage = object_mobile_shared_dressed_dathomir_nightsister_sage:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_dathomir_nightsister_sage, "object/mobile/dressed_dathomir_nightsister_sage.iff")
|
local Scene = require("lib.scene")
local ep = require("Advice.allep")
local MM = Scene:derive("message1")
local img = love.graphics.newImage("Advice/invierno.png")
function MM:new(scene_mngr)
self.super.new(self,scene_mngr)
self.ep_ = ep()
self.em:add(self.ep_)
end
local entered = false
function MM:... |
require("lib/path")
-- Global libraries
local turtle = require("turtle" )
local common = require("common" )
local complex = require("complex" )
local colormap = require("colormap")
-- Local project libraries
local keys = require("lib/keys" )
local level = require("lib/level")
local logS... |
local ice = {
surface = material.refractive {
ior = 1.30144,
dispersion = 0.00287,
color = 1,
},
}
local background = {
surface = material.diffuse {
color = spectrum {
format = "curve",
points = {{400, 0.025}, {600, 0.0175}, {700, 0.01}},
} * ... |
local base = require 'calc.base'
local air_helper = require 'hj212.calc.air_helper'
local calc = base:subclass('HJ212_CALC_AIR_DRYC')
function calc:calc(value)
local cems = self:station():cems()
assert(cems)
return air_helper.DryC(value, cems:Xsw())
end
return calc
|
local K, C, L, _ = unpack(select(2, ...))
C["position"] = {
["achievements"] = {"TOP", UIParent, "TOP", 0, -22},
["bag"] = {"RIGHT", UIParent, "RIGHT", -140, -20},
["bagsbar"] = {"TOPLEFT", UIParent, "TOPLEFT", 270, -2},
["bank"] = {"LEFT", UIParent, "LEFT", 23, 150},
["bgscore"] = {"BOTTOMLEFT", "ActionButton12"... |
return {'alk','alkali','alkalimetaal','alkalimetalen','alkaline','alkalisch','alkaliseren','alkaloide','alkaloiden','alkanna','alkoof','alkalinebatterij','alkemade','alken','alkmaar','alkmaarder','alkmaars','alkema','alkan','alkalinebatterijen','alkalische','alkalischer','alkaliseert','alkalien','alken','alkoven','alka... |
-- Translated by @// Parintele //®#0069
Locales = {
-- NUI
Nui = {
-- LeftNav
leftNav = {
actions = 'Actiuni',
savingAccountCont = 'Se salveaza contul',
creditCardsCont = 'Card Credit/Debit',
cryptoCurrencyCont = "Monede Virtuale <sup class='text-... |
return {'umbrisch','umbrie','umbrier','umberto'} |
require 'lib.astar.astar'
-- Caches area objects
area_manager = {
areas = {},
get = function(areaname)
if not area_manager.areas[areaname] then
area_manager.areas[areaname] = Area(areaname)
end
return area_manager.areas[areaname]
end
}
Area = leaf.Object:extend()
loca... |
-- server scripts
server_scripts{
"deletepoliceweapons-server.lua"
}
-- client scripts
client_scripts{
"crouch-client.lua",
"pointfinger-client.lua",
"handsup-client.lua",
"lockcar-client.lua",
"stopwanted-client.lua",
"names-client.lua",
"gameui-client.lua",
"deletepoliceweapons-client.lua",
"tax... |
-- Slightly Improved™ Dialogues
-- The MIT License © 2016 Arthur Corenzan
local NAMESPACE = "SlightlyImprovedDialogues"
-- Uncomment to prevent debug messages
local function d() end
local function df() end
-- See esoui/ingame/interactwindow/keyboard/interactwindow_keyboard.lua:2
local chatterOptionIndent = 30
-- S... |
-- This is a language file for mattata
-- Language: scottish
-- Author: LKD70
-- DO NOT CHANGE ANYTHING THAT BEGINS OR ENDS WITH A %
-- THESE ARE PLACEHOLDERS!
-- DO NOT CHANGE ANY MARKDOWN/HTML FORMATTING!
-- IF YOU ARE UNSURE, ASK ON TELEGRAM (t.me/flaunt_and_dither)
return {
['errors'] = {
... |
local floor = math.floor
local encode, decode
do
local ok, l = pcall(require, 'base64')
if ok then
encode = l.encode
decode = l.decode
else
encode = function()
error('base64 encode is not implemented')
end
decode = function()
error('base64 dec... |
LEntity = SimpleClass()
function LEntity:__init(uid,data)
self:__init_self()
self.data = data
self.uid = uid
end
function LEntity:__init_self()
self.uid = nil --实体id
self.eType = nil --实体类型
self.data = nil --实体配置
self.root = nil --实体obj根节点
self.csEntity = nil --CEntity
self.audioListener ... |
ITEM.name = "5.45x39mm Hollow-Point"
ITEM.model = "models/lostsignalproject/items/ammo/545x39.mdl"
ITEM.width = 2
ITEM.height = 1
ITEM.ammo = "5.45x39MM -HP-" // type of the ammo
ITEM.ammoAmount = 60 // amount of the ammo
ITEM.description = ""
ITEM.quantdesc = "A box that contains %s rounds of Hollow-Point 5.45x39mm a... |
data.raw.item["gun-turret"].icon = "__5dim_battlefield__/graphics/icon/icon-normal-gun-turret.png"
data.raw.item["laser-turret"].icon = "__5dim_battlefield__/graphics/icon/icon-normal-laser-turret.png"
require("prototypes.atack-parameters")
require("prototypes.scalecolor")
require("prototypes.damage")
require ("prototy... |
local GSE = GSE
local Statics = GSE.Static
local L = GSE.L
local ldb = LibStub:GetLibrary("LibDataBroker-1.1")
local dataobj = ldb:NewDataObject(L["GSE"] .." ".. L["GnomeSequencer-Enhanced"], {
type = "data source",
text = "GSE",
icon = "Interface\\Icons\\INV_Chest_Cloth_17",
OnLeave = dataObject_OnLeave
})
l... |
require('helper')
local path = require('path')
local spawn = require('childprocess').spawn
local os = require('os')
local childPath = path.join(__dirname, 'fixtures', 'parent-process-nonpersistent.lua')
local persistentPid = -1
if os.type() == 'win32' then
return
end
local child = spawn(process.execPath, { child... |
-- ... purescript.lua
|
cflags{
'-std=c99', '-pedantic', '-Wall', '-Wextra',
'-D _DEFAULT_SOURCE',
'-I $builddir/pkg/libjpeg-turbo/include',
'-I $builddir/pkg/libpng/include',
}
cc('util.c')
exe('png2ff', {'png2ff.c', 'util.c.o', '$builddir/pkg/libpng/libpng.a.d'}, {'pkg/libpng/headers'})
exe('ff2png', {'ff2png.c', 'util.c.o', '$builddi... |
local collation = require "tools.collation"
local serpent = require "tools.serpent"
local collator = collation.new()
local ducet_file = io.open("data/allkeys.txt", "r")
local content = ducet_file:read("*all")
collator:load_ducet(content)
ducet_file:close()
print(serpent.dump(collator.keys))
|
yatm_reactors:require("items/nuclear_pellets.lua")
|
next_file_load = os.time() + math.random(60500, 90500)
local files = {
--[[
File values:
- maps (1)
- webhooks (1 and 2)
- update (1)
- ranks (1)
- banned (2)
- ranking (2)
- suspects (2)
]]
[1] = 1, -- maps, update, ranks
[2] = 2 -- ranking, banned, suspects
}
local total_files = 2
... |
-- Copyright (c) 2016 Thermo Fisher Scientific
--
-- 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, ... |
local helpers = require "spec.helpers"
local cjson = require "cjson"
describe("Plugin: hmac-auth (API)", function()
local client, credential, consumer
setup(function()
helpers.prepare_prefix()
assert(helpers.start_kong())
client = helpers.admin_client()
end)
teardown(function()
if client then ... |
return {
id = "oreAdurite",
name = "Adurite Ore",
tier = 7,
spriteSheet = "materials",
spriteCoords = Vector2.new(8,1),
tags = {
"material",
}
} |
--[[------------------------------------------------------
xml bindings generator
------------------------
This uses the 'dub' tool and Doxygen to generate the
bindings for mimas.
Input: headers in 'include/xml'
Output: cpp files in 'src/core'
--]]------------------------------------------------------
... |
--!A cross-toolchain build utility based on Lua
--
-- 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 la... |
--[[
Skeleton
A simple containment data structure for bones, animations, and skins.
Actors hold a reference to a skeleton, which defines what animations and skins it can use.
--]]
local util = RequireLibPart("util");
local newBone = RequireLibPart("bone");
local SKELETON_ROOT_NAME = util.SKELETON_ROOT_NAME;
local ... |
--[[
Copyright (c) 2014 by Adam Hellberg.
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, mer... |
local utf8 = require "utf8"
local dic = {}
local cache = {}
-- 辞書エントリの取得または初期化
local function get_entry(key)
if dic[key] == nil then
dic[key] = {}
end
return dic[key]
end
-- 辞書初期化
local function init_dic()
local function INSERT(entry, value)
local tp = type(value)
if tp == "fun... |
local fun = require('functional')
local http = {}
local map = fun.map
local each = fun.each
local PROXY_LOCATION = "/___http_call"
local METHODS = {
["GET"] = ngx.HTTP_GET,
["HEAD"] = ngx.HTTP_HEAD,
["PATCH"] = ngx.HTTP_PATCH,
["PUT"] = ngx.HTTP_PUT,
["POST"] = ngx.HTTP_POST,
["DELET... |
local msg, key = ...
assert((type(msg) == "string") and (type(key) == "string"), "Invalid Input")
function unsafePad(txt, length)
if #txt > length then
error("Text to pad is too long."
elseif #txt < length then
return txt .. string.rep(" ", length - #txt)
end
return txt
end
function ra... |
local present, treesitter = pcall(require, 'nvim-treesitter.configs')
if not present then
return
end
treesitter.setup {
ensure_installed = { 'gomod' },
highlight = {
enable = true,
use_languagetree = true,
disable = { 'cpp', 'c' }
},
rainbow = {
enable = true,
... |
local EVENT = {}
EVENT.Chance = 0.50
EVENT.Type = EVENT_BAD
EVENT.TimeText = { "rd_notices_nuclear_fallout_time", "rd_notices_nuclear_fallout_time2" }
EVENT.Times = { 30, 60 }
function EVENT:Start()
local num = math.random(1,2)
EVENT.Delay = CurTime() + 15
EVENT.RadTime = CurTime() + EVENT.Times[ num ] + ... |
object_tangible_collection_rock_bubbling_05 = object_tangible_collection_shared_rock_bubbling_05:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_rock_bubbling_05, "object/tangible/collection/rock_bubbling_05.iff") |
NPC.Class = "npc_dragzombie"
NPC.Name = translate.Get("npc_class_drifter")
NPC.Description = translate.Get("npc_description_drifter")
NPC.Icon = "VGUI/zombies/info_drifter"
NPC.Flag = FL_SPAWN_DRIFTER_ALLOWED
NPC.Cost = GetConVar("zm_cost_drifter"):GetInt()
NPC.PopCost = GetConVar("zm_popcost_immolator"):GetInt()
NPC.H... |
local module = {}
local TweenService = game:GetService("TweenService")
function module.new(object: Instance, tweeninfo: TweenInfo, goal): Tween
local tween = TweenService:Create(object, tweeninfo, goal)
tween.Completed:Connect(function()
tween:Destroy()
end)
tween:Play()
return tween
end
return module |
AddCSLuaFile()
if CLIENT then
SWEP.PrintName = "VBRP Stun Stick"
SWEP.Slot = 0
SWEP.SlotPos = 1
SWEP.DrawCrosshair = true
end
SWEP.Spawnable = true
SWEP.ViewModel = Model("models/weapons/v_stunstick.mdl")
SWEP.WorldModel ... |
Citizen.CreateThread(function()
exports.NotyFive:SetQueueMax("global", Config.MaxNotifications)
end) |
require'lightspeed'.setup {
jump_on_partial_input_safety_timeout = 400,
-- This can get _really_ slow if the window has a lot of content,
-- turn it on only if your machine can always cope with it.
highlight_unique_chars = false,
grey_out_search_area = true,
match_only_the_start_of_same_char_seq... |
local state = require("../state")
local music = require("../music")
local event = require("../event")
local coin = require("../coin")
local image = require("../image")
local savefile = require("../savefile")
local game = {}
game.load = function(loadSave)
state.initializeState(loadSave)
--event.printEventTable()
en... |
local exec = require 'espeon.util.exec'
local detect_serial_port = require 'espeon.util.detect_serial_port'
return {
description = 'Format the filesystem of a connected ESP8266 running NodeMCU',
execute = function()
local serial_port = detect_serial_port()
exec('nodemcu-uploader --port ' .. serial_port ..... |
---@diagnostic disable: undefined-global
local palette = require 'nord-palette'
local base = require 'base'
local clrs = palette.clrs
local lang = function()
return {
markdownBlockquote {fg = clrs.nord7},
markdownCode {fg = clrs.nord7},
markdownCodeDelimiter {fg = clrs.nord7},
markdownFootnote {fg = ... |
-----------------------------------
--
-- tpz.effect.MADRIGAL
-- getPower returns the TIER (e.g. 1, 2, 3, 4)
-----------------------------------
require("scripts/globals/status")
-----------------------------------
function onEffectGain(target, effect)
target:addMod(tpz.mod.ACC, effect:getPower())
end
function... |
local LINES_PARALLEL_EPS = 0.05;
local function Vector(x, y)
if y then
return {x = x, y = y}
else -- clone vector
return {x = x.x, y = x.y}
end
end
local function length(vector)
return math.sqrt(vector.x * vector.x + vector.y * vector.y)
end
local function normal(out, vector, scale)
out.x = -vector... |
local knownSymbols = {}
function Symbol(this, name)
if this ~= nil then
error("Symbol is not a constructor")
end
local fullName = "Symbol(" .. name .. ")"
return {
constructor = Symbol,
toString = function()
return fullName
end
}
end
Symbol.__js = true
Symbol["for"] = function(_, name... |
-- Copyright (c) 2012 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
-- to ... |
-------------------------------------------------------------------------------
-- Filesystem helpers
-------------------------------------------------------------------------------
--- Checks if specified file exists.
--- @param fileName string
--- @return boolean
function isFileExists(fileName)
local f = io.open... |
function GravekeeperScorpion_Child121200Battle_Activate(arg0, arg1)
Common_Clear_Param({}, {}, {})
if arg0:GetNumber(0) == 1 then
arg1:AddSubGoal(GOAL_COMMON_Wait, 10, TARGET_ENE_0, 0, 0, 0)
elseif arg0:GetRandam_Int(1, 100) <= 50 then
arg1:AddSubGoal(GOAL_COMMON_AttackTunableSpin, 10, 3000,... |
module("luci.controller.overture.overture", package.seeall)
function index()
if not nixio.fs.access("/usr/bin/overture") then
return
end
entry({"admin", "services", "overture"},alias("admin", "services", "overture", "base"), _("Overture")).dependent = true
entry({"admin", "services", "overture", "ba... |
for line in io.lines(arg[1]) do
if #line > 55 then
local i, p = 0, 41
while true do
i = string.find(line, " ", i+1)
if not i or i > 40 then break end
p = i
end
line = line:sub(1, p-1) .. "... <Read More>"
end
print(line)
end
|
local K = unpack(select(2, ...))
local Module = K:GetModule("AurasTable")
-- 战士的法术监控
local list = {
["Player Aura"] = { -- 玩家光环组
--{AuraID = 32216, UnitID = "player"}, -- 胜利
},
["Target Aura"] = { -- 目标光环组
{AuraID = 355, UnitID = "target", Caster = "player"}, -- 嘲讽
{AuraID = 772, UnitID = "target", Caster ... |
local market_pin_map = require("qnFiles/qnPlist/hall/market_pin");
local userInfo_pin_map = require("qnFiles/qnPlist/hall/userInfo_pin");
local vipTypeItem=
{
name="vipTypeItem",type=0,typeName="View",time=0,report=0,x=0,y=0,width=304,height=200,visible=1,fillParentWidth=0,fillParentHeight=0,nodeAlign=kAlignTopLeft,
... |
local parent, ns = ...
local CallbackHandler = LibStub and LibStub("CallbackHandler-1.0", true)
if not CallbackHandler then return end
local Compat = ns.Compat
Compat.callbacks = Compat.callbacks or CallbackHandler:New(Compat)
local WithinRange = Compat.WithinRange
local type = type
local assert = assert
local setm... |
local assert_error = require("lapis.application").assert_error
local yield_error = require("lapis.application").yield_error
local mime = require "mime"
local models = require "models"
local Users = models.users
return function(self)
if self.req.headers["Authorization"] then
-- Decode auth in... |
local AddonName, AddonTable = ...
AddonTable.rfd = {
-- Aarux
10776, -- Silky Spider Cape
10775, -- Carapace of Tuten'kash
10777, -- Arachnid Gloves
-- Mordresh Fire Eye
10770, -- Mordresh's Lifeless Skull
10769, -- Glowing Eye of Mordresh
10771, -- Deathmage Sash
-- Mushlump
... |
#!/usr/bin/env tarantool
test = require("sqltester")
test:plan(19)
-- This file implements regression tests for foreign keys.
test:do_execsql_test(
"fkey1-1.1",
[[
CREATE TABLE t1(
a INTEGER PRIMARY KEY,
b INTEGER
REFERENCES t1 ON DELETE CASCADE
... |
command.Register("buy", "Purchase an item from the shop with :star:", "economy", function(msg, args)
local DB = require('../handler/items.lua')
local starDB = require('../handler/economy.lua')
local shopitems = DB.KnownItems
local id = DB.CreateRowUser(msg.author)
local items = DB.GetUserItems(id)
... |
-- https://bitbucket.org/Jonjonsson/google-analytics-for-corona-sdk/
local ga = require("GoogleAnalytics.ga")
local ControlGa = {}
ga.init({ -- Only initialize once, not in every file
isLive = false, -- REQUIRED
testTrackingID = "UA-61775216-1", -- REQUIRED Tracking ID from Google
debug = false, -- Recom... |
local m = {
sizes = {1, 2, 4, 8, 16, 32, 64},
}
sbp_memory = m
function m.nn(x)
return "sbp_memory:" .. x
end
-- Boxes from Digiline RTC.
local chip_nodebox = {
type = "fixed",
fixed = {
{-8/16, -8/16, -8/16, 8/16, -7/16, 8/16},
{-7/16, -7/16, -7/16, 7/16, -5/16, 7/16},
}
}
local... |
--[[
Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com>
This code is licensed under the MIT. See LICENSE for details.
]]
local help = {}
local mattata = require('mattata')
local utf8 = utf8 or require('lua-utf8') -- Lua 5.2 compatibility.
function help:init(configuration)
help.commands = mattata.... |
-- Implements the A* algorithm.
-- First base of inspiration from http://www.redblobgames.com/pathfinding/a-star/implementation.html#orgheadline18
local heap = require("main/astar/scripts/heap")
local M = {}
function M.manhattan_distance(x1, y1, x2, y2)
local dist = math.abs(x1 - x2) + math.abs(y1 - y2)
retu... |
while not _G.META_GAME_MODES do Task.Wait() end
local GamemodeName = script:GetCustomProperty("GamemodeName"):WaitForObject()
local LOCAL_PLAYER = Game.GetLocalPlayer()
local GamemodeManager = _G.META_GAME_MODES
local LastId
function Tick()
if LastId ~= LOCAL_PLAYER.clientUserData.gameModeInfo then
Las... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.