content stringlengths 5 1.05M |
|---|
--- AnimationEntry wrapper
WrapEntry = {}
WrapEntry.__index = WrapEntry
function WrapEntry:new(o)
return setmetatable(o or {}, self)
end
function WrapEntry:_then(args)
if type(args) ~= 'table' then
args = { property = args }
end
return WrapEntry:new {
entry = self.entry:Then(
... |
return {
summary = 'A pseudo-random number generator.',
description = [[
A RandomGenerator is a standalone object that can be used to independently generate
pseudo-random numbers. If you just need basic randomness, you can use `lovr.math.random` without
needing to create a random generator.
]],
cons... |
function onCreate()
-- background shit
makeLuaSprite('metal', 'metal', -600, -300);
setScrollFactor('metal', 0.9, 0.9);
addLuaSprite('metal', false);
close(true); --For performance reasons, close this script once the stage is fully loaded, as this script won't be used anymore after loading the stage
... |
return PlaceObj("ModDef", {
"title", "Permanent Dreamers Lightmodel",
"version", 5,
"version_major", 0,
"version_minor", 5,
"id", "ChoGGi_PermanentDreamersLightmodel",
"author", "ChoGGi",
"image", "Preview.png",
"steam_id", "1433249476",
"pops_any_uuid", "1df82b63-e65e-4d4f-b22e-cfc33556fdf0",
"code", {
"Co... |
data:extend({
{
type = "item",
name = "heli-remote-equipment",
icon = "__Helicopters__/graphics/icons/heli-remote-icon.png",
icon_size = 32,
placed_as_equipment_result = "heli-remote-equipment",
flags = {"goes-to-main-inventory"},
subgroup = "equipment",
... |
local ModOverride = require('ModOverride')
local UI = require('UI')
registerForEvent('onInit', function()
ModOverride.Init()
UI.Init()
UI.OnReadyCheck(ModOverride.IsReady)
UI.OnListItems(function(filter)
return ModOverride.GetItems(filter)
end)
UI.OnAddToInventory(function(iconicMod)
local player = Game.... |
local BasePlugin = require "kong.plugins.base_plugin"
local access = require "kong.plugins.bcgov-gwa-endpoint.access"
local singletons = require "kong.singletons"
local cache = singletons.cache
local crud = require "kong.api.crud_helpers"
local BcGovGwaHandler = BasePlugin:extend()
function BcGovGwaHandler:new()
Bc... |
local _ = 121
_ = 121.2323
_ = 121.2323e-1
_ = 121.2323e13434
_ = 2323E34
_ = 0x12323
_ = 0xfF2323
_ = 0xabcdef
_ = 0xABCDEF
_ = [[ hello world ]]
_ = [=[ hello world ]=]
_ = [====[ hello world ]====]
_ = "another world"
_ = 'what world' |
--[ FeedM - edited by szymczakovv & elfeedo ]--
-- Name: FeedM-Reworked
-- Author: szymczakovv#1937, elfeedoo#6093
-- Date: 05/01/2021
-- Version: 0.1.6
-- Informations
fx_version 'adamant'
game 'gta5'
description 'FeedM'
author 'Karl Saunders reworked by elfeedoo & szymczakovv'
version '0.0.6 (rework version 0.1.6)'... |
local fio = require('fio')
local t = require('luatest')
local g = t.group()
local helpers = require('test.helper')
g.before_all = function()
g.server = helpers.Server:new({
workdir = fio.tempdir(),
alias = 'dummy',
command = helpers.entrypoint('srv_basic'),
http_port = 8181,
... |
local obj = {}
local vim_icon = hs.menubar.new()
local inputEnglish = "com.apple.keylayout.ABC"
local cfg = {
key_interval = 100,
icon = { vim = "𝑽", novim = "" },
}
local mode = {
on = false,
triggered = false,
}
function obj:init(mode)
local function vim_end()
mode.triggered ... |
local depth, tunnelSize = ...
shell.run("./driller", depth)
shell.run("tunnel", tunnelSize)
|
-- https://github.com/Planimeter/lassimp
-- LuaJIT FFI bindings for Assimp by Planimeter on GitHub
--[[
MIT License
Copyright (c) 2017 Planimeter
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 S... |
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
combat:setParameter(COMBATPARAM_USECHARGES,... |
_ANA.ana.acc = 0 -- nd accesses
_ANA.ana.abrt = 0 -- nd flows
_ANA.ana.excpt = 0 -- nd excpt
-- any variable access calls this function
-- to be inserted on parent Parallel sub[i] or Class
function iter (n)
local par = n.__par and n.__par.tag
return par=='ParOr' or par=='ParAnd' or par... |
-- Minetest 0.4 mod: bones
-- See README.txt for licensing and other information.
bone_file = minetest.get_worldpath().."/player_bones"
player_bones = default.deserialize_from_file(bone_file)
local replaceable_node_types = {
"default:lava_source",
"default:lava_flowing",
"default:water_source",
"default:water_... |
--
-- Prepare a new Premake release. This is still incomplete and some manual
-- work is needed to get everything packaged up.
--
-- BEFORE RUNNING THIS SCRIPT:
-- * Make sure all tests pass on Windows AND Posix systems
-- * Update CHANGELOG.txt
-- * Run `premake4 embed`
-- * Commit all changes to premake-stable
--... |
-- =====================================================================================
-- Name: proxy.lua
-- Author: Gurpreet Singh
-- Url: https://github.com/ffs97/bluez-dbus-lua/proxy.lua
-- License: The MIT License (MIT)
--
-- This submodule implements a wrapper for Dbus Proxies
-- ==... |
-- == Rm(Remove) ==
-- Copyright (c) 2018 by Rene K. Mueller <spiritdude@gmail.com>
-- License: MIT License (see LICENSE file)
-- Description: remove file(s)
--
-- History:
-- 2018/01/08: 0.0.2: multiple files
-- 2018/01/03: 0.0.1: first version
return function(...)
table.remove(arg,1)
for i,f in ipairs(arg) do
... |
local token = {}
local validator = require('authman.validator')
-----
-- oauth access token
-- oauth_token (access_token, consumer_key, refresh_token, redirect_url, scope, expires_in, created_at)
-----
function token.model(config)
local model = {}
model.SPACE_NAME = config.spaces.oauth_token.name
mode... |
ENT.Type = "anim"
ENT.Base = "base_gmodentity"
ENT.PrintName = "Armory"
ENT.Author = "Owain Owjo"
ENT.Category = "The XYZ Network Custom Stuff"
ENT.RenderGroup = RENDERGROUP_BOTH
ENT.Spawnable = true
ENT.AdminSpawnable = true
function ENT:SetupDataTables()
self:NetworkVar("Int", 0, "Cooldown")
self:NetworkVar("Int",... |
object_mobile_dressed_tatooine_keska = object_mobile_shared_dressed_tatooine_keska:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_tatooine_keska, "object/mobile/dressed_tatooine_keska.iff")
|
UIPanel = Class(LuaBehaviour)
function UIPanel:Awake()
local _, viewCanvas = self.transform:TryGetComponent(typeof(Canvas))
self.viewCanvas = viewCanvas
local _, viewCanvasGroup = self.transform:TryGetComponent(typeof(CanvasGroup))
self.viewCanvasGroup = viewCanvasGroup
local _, viewGrap... |
--configure gpio
--configure int handler / or timer
--configure email / sms |
-- license:BSD-3-Clause
-- copyright-holders:MAMEdev Team
---------------------------------------------------------------------------
--
-- tiny.lua
--
-- Small driver-specific example makefile
-- Use make SUBTARGET=tiny to build
--
---------------------------------------------------------------------------
--... |
require("php/phpCmd");
require("hall/php/phpManager");
local getIndex = function(self)
return PhpManager.getInstance():getPhpCmdValue();
end
PHP_CORE_LOGIN = PHP_CMD_CONSTANT + 0x0001;---!!!此处必须为0x01,server会去理解此cmd
PHP_UPDATE_USERINFO = getIndex(); --用户信息更新
PHP_NOTICE = getIndex();
PHP_MODIFY_PWD = g... |
local VARS = {}
if not _ANA then
return -- isTmp=false for all vars
end
F = {
Dcl_var_pre = function (me)
local var = me.var
if var.pre~='var' or var.cls or var.inTop then
return -- only normal vars can be tmp
end
VARS[var] = tr... |
object_tangible_loot_creature_loot_collections_col_meatlump_rank_01 = object_tangible_loot_creature_loot_collections_shared_col_meatlump_rank_01:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_col_meatlump_rank_01, "object/tangible/loot/creature/loot/collections/col_meatlump_rank_01... |
-- Gemeinschaft 5 module: log
-- (c) AMOOMA GmbH 2012-2013
--
module(...,package.seeall)
Log = {}
-- Create logger object
function Log.new(self, arg)
arg = arg or {}
object = arg.object or {}
setmetatable(object, self);
self.__index = self;
self.disabled = arg.disabled or false;
self.buffer = arg.buffer... |
--[[ entry structure
{
r = number,
g = number,
b = number,
a = number,
entity = entity
}
]]
--locals
local render_target_art = render.GetScreenEffectTexture(0)
local render_target_outline = render.GetScreenEffectTexture(1)
--render parameters
local blip_period = 2
local outline_scale = 4
local outline_step = 1
... |
local backend = {}
local response = require 'http_ng.response'
local METHODS = {
["GET"] = ngx.HTTP_GET,
["HEAD"] = ngx.HTTP_HEAD,
["PATCH"] = ngx.HTTP_PATCH,
["PUT"] = ngx.HTTP_PUT,
["POST"] = ngx.HTTP_POST,
["DELETE"] = ngx.HTTP_DELETE,
["OPTIONS"] = ngx.HTTP_OPTIONS
}
local PR... |
local class = require 'modules/oops'
Ball = class {
__init = function(self, x, y, width, height)
self.x = x
self.y = y
self.width = width
self.height = height
self.dx = math.random(2) == 1 and -100 or 100
self.dy = math.random(-50, 50) * 1.5
end,
-- Reset b... |
--[[
Copyright © 2017, SirEdeonX
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
... |
-------------------- THIS CODE WILL FUCK MECHANIC JOB
local LVM = createColRectangle( 1937.48, 2139.54, 40, 40 ) -- LV mechanic
local LSM = createColRectangle( 1670.93, -1062.47, 20, 20 ) -- LV mechanic
local SFM = createColRectangle( -1995.35, 240.06, 20, 20 ) -- LV mechanic
local SFPM = createColTube( -1187.39,... |
-- arm64 syscall numbers are the new architecture defaults
-- so we could reuse this file for other architectures
-- note that there are some name differences for new 32 bit architectures
local nr = {
SYS = {
io_setup = 0,
io_destroy = 1,
io_submit = 2,
io_cancel = 3,
io_getevents = 4,
setxattr = 5,
ls... |
require("ZZBase64")
require("TSLib")
require("ocr")
local ts = require("ts")
local image = require("tsimg")
function duociGet(base64,timestamp,ltype,page,min,max)
duociGetStr = "";
local subString = string.sub(base64,min,max)
if(string.len(subString) == 5000)
then
nextMin = page*5000 + 1
nextMax = nextMi... |
object_mobile_dressed_dark_jedi_master_female_twk_01 = object_mobile_shared_dressed_dark_jedi_master_female_twk_01:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_dark_jedi_master_female_twk_01, "object/mobile/dressed_dark_jedi_master_female_twk_01.iff")
|
object_tangible_item_beast_barn_lite_beast_dna_storage_device = object_tangible_item_beast_barn_lite_shared_beast_dna_storage_device:new {
}
ObjectTemplates:addTemplate(object_tangible_item_beast_barn_lite_beast_dna_storage_device, "object/tangible/item/beast/barn_lite/beast_dna_storage_device.iff")
|
--[[ Credit for these translations goes to:
StingerSoft
Alphabot
zuko3d
Ivlin
Ant1dotE
KizEY
--]]
local L = LibStub("AceLocale-3.0"):NewLocale("TellMeWhen", "ruRU", false)
if not L then return end
L["ABSORBAMT"] = "Количество поглощаемого урона" -- Needs review
L["ABSORBAMT_DESC"] = "Проверяет общ... |
--====================================================================--
-- dmc_ui/dmc_widget/widget_background/nice_slice_view.lua
--
-- Documentation: http://docs.davidmccuskey.com/
--====================================================================--
--[[
The MIT License (MIT)
Copyright (c) 2015 David McCuskey... |
-- base16-vim (https://github.com/chriskempson/base16-vim)
-- by Chris Kempson (http://chriskempson.com)
-- Adapted by Max Rossmannek (https://gitlab.com/mrossinek)
-- Colors were adapted from the PaperColor and OceanicNext schemes
-- GUI color definitions
local gui00 = "#1b1b1b"
local gui01 = "#343434"
local gui02 = ... |
tcp_cnn_logic = tcp_cnn_logic or {}
function tcp_cnn_logic.on_close()
end
function tcp_cnn_logic.on_open()
end
function tcp_cnn_logic.on_recv()
end
g_listen_handler = nil
g_cnn_handler_connect = nil
g_cnn_handler_accept = nil
function test_net_open(t, err_num)
print("test_net_open t", t:netid())
print(... |
require 'cunn'
-- example of matching descriptors on GPU
N = 76 -- the number of patches to match
patches = torch.rand(N,2,64,64):cuda()
-- load the network and move to cuda
net = torch.load'../networks/2ch/2ch_liberty_nn.t7':cuda()
-- in place mean subtraction
local p = patches:view(N,2,64*64)
p:add(-p:mean(3):exp... |
--!A cross-platform build utility based on Lua
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apach... |
--[[
Author: tochonement
Email: tochonement@gmail.com
23.07.2021
--]]
whoi.util = whoi.util or {}
local lib = whoi.util
do
local function setter(tbl, key, name)
tbl["Set" .. name] = function(self, value)
self[key] = value
return self
end
end
local function get... |
local ffi = require("ffi")
local common = require("openflow_common")
local OFP_ASSERT = common.OFP_ASSERT
require("openflow_1_2")
local exports = {}
ffi.cdef[[
enum ofp13_instruction_type {
OFPIT13_METER = 6 /* Apply meter (rate limiter) */
};
]]
ffi.cdef[[
/* Instruction structure for OFPIT_METER *... |
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
local area = createCombatArea(AREA_WAVE4, AREADIAGONAL_WAVE4)
combat:setArea(area)
function onGetFormulaValues(player, level, maglevel)
min = -((level * 2) + (maglevel * 3)) ... |
return {
{
effect_list = {
{
type = "BattleSkillAddBuff",
casterAniEffect = "",
target_choise = "TargetSelf",
targetAniEffect = "",
arg_list = {
buff_id = 10862
}
},
{
type = "BattleSkillFire",
casterAniEffect = "",
target_choise = "TargetNil",
targetAniEffect = ... |
-- One click toggles a device
-- Define the names on your devices here:
local remotecontrol = "WallMote"
Devices = {}
Devices[1] = "Office"
Devices[2] = "Kitchen"
Devices[3] = "Garage"
Devices[4] = "Window"
debug = true
local sequence = 0
local action = 0
local scene = 0
-- DO NOT EDIT BELOW THIS LINE --
KEY_PRESS = ... |
input =
[[Given$a$text$file$of$many$lines,$where$fields$within$a$line$
are$delineated$by$a$single$'dollar'$character,$write$a$program
that$aligns$each$column$of$fields$by$ensuring$that$words$in$each$
column$are$separated$by$at$least$one$space.
Further,$allow$for$each$word$in$a$column$to$be$either$left$
justified,$right... |
default.chest_formspec =
"size[9,9]"..
"background[-0.19,-0.25;9.41,10.48;default_wood.png]"..
"bgcolor[#080808BB;true]"..
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
'list[current_name;storage;3,1.5;3,3;]'..
'list[current_player;main;0.5,6.5;8,4;]'
local nightstand_inv_size = 9,10.5
local nigh... |
local sensors = {}
return sensors |
CLASS.name = "Civil Protection Elite"
CLASS.desc = "The top officers of the Civil Protection."
CLASS.faction = FACTION_CP
function CLASS:onCanBe(client)
return client:isCombineRank(SCHEMA.eliteRanks)
end
CLASS_CP_ELITE = CLASS.index |
-- premake5.lua
-- version: premake-5.0.0-alpha14
-- %TM_SDK_DIR% should set to the directory of The Machinery SDK
workspace "hello_world"
configurations { "Debug", "Release" }
language "C++"
cppdialect "C++11"
flags { "FatalWarnings", "MultiProcessorCompile" }
warnings "Extra"
inlining "Auto"... |
-- @param {o} itable
local function pop(o)
local r = o[#o]
o[#o] = nil
return r
end
return pop
|
-- Tests for correct display (cursor column position) with +conceal and
-- tabulators.
local helpers = require('test.functional.helpers')(after_each)
local feed, insert, clear, feed_command =
helpers.feed, helpers.insert, helpers.clear, helpers.feed_command
local expect_pos = function(row, col)
return helpers.eq(... |
slot0 = class("WorldStoryGroup")
slot1 = pg.memory_group
slot0.Ctor = function (slot0, slot1)
slot0.id = slot1.id
slot0.configId = slot1.id
slot0.config = slot0[slot0.configId]
slot0.storyIds = slot0.config.memories
end
slot0.getStoryIds = function (slot0)
return slot0.storyIds
end
return slot0
|
local Encode = require("t.enc")
return Encode.crc
|
style = ... |
require("common/popupWindow");
local match_hall_record_reward_tips_layout = require(ViewPath .. "hall/matchHall/widget/match_hall_record_reward_tips_layout");
-- 战绩奖励提示
local GameMatchHallRecordRewardTips = class(PopupWindow, false);
local h_index = 0;
local getIndex = function(self)
h_index = h_index + 1... |
-- Modified from https://github.com/Kong/kong/blob/0.14.1/kong/plugins/log-serializers/basic.lua
local tablex = require "pl.tablex"
local list = require "pl.List"
local stringx = require "pl.stringx"
local cjson = require "cjson.safe"
local _M = {}
local EMPTY = tablex.readonly({})
function _M.serialize(ngx, filters... |
-- require("foo")
-- print(pcall(require, "error"))
-- syntax error
local function trace3()
-- local e = {}
-- setmetatable(e, {__tostring = function() return "runtime error" end})
error(e or "runtime error")
end
local function trace2()
trace3()
end
local function trace1()
trace2()
end
trace1()
|
dofile("staff.lua")
global{
ROOT='http://www.tecgraf.puc-rio.br',
EMAIL="|LOGIN|@tecgraf.puc-rio.br",
WWW="|ROOT|/~|LOGIN|",
webmast='|ROOT|/webmaster.html',
TECGRAF='<A HREF="http://www.tecgraf.puc-rio.br">TeCGraf</A>',
CS='<A HREF="http://www.inf.puc-rio.br">Computer Science Department</A>',
PUCRIO='<A... |
local _, private = ...
if private.isClassic then return end
--[[ Lua Globals ]]
-- luacheck: globals next
--[[ Core ]]
local Aurora = private.Aurora
local Base, Hook, Skin = Aurora.Base, Aurora.Hook, Aurora.Skin
do --[[ FrameXML\FloatingGarrisonFollowerTooltip.lua ]]
function Hook.GarrisonFollowerAbilityTooltipT... |
--[[ Copyright (c) 2013 Mark (Mark L) Lawlor
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, dist... |
return function (request, next_middleware)
local response = next_middleware()
local api_key = "YOUR-KEEN-IO-API-KEY-HERE"
local size = base64.encode(json.encode({ size = #response.body }))
http.get('https://api.keen.io/3.0/projects/<PROJECT_ID>/events/<EVENT_COLLECTION>?api_key=' .. api_key .. '&data=' .. size)... |
return Def.ActorFrame{
Def.Quad{
InitCommand=cmd(Center;FullScreen;diffuse,Color.Blue)
}
}
|
local status_ok, web_devicons = pcall(require, "which-key")
if not status_ok then
return
end
|
include("CQUICommon.lua");
-- ===========================================================================
-- Cached Base Functions
-- ===========================================================================
BASE_CQUI_AddCityStateRow = AddCityStateRow;
-- =============================================================... |
local Util = require "lib.util"
--RESOLUTIONMANAGER--
--adds a menu to quickly change screen resolutions
--TODO individual resolution for multiple screens
local ResolutionManager = {
menu = hs.menubar.new(),
menuIcon = hs.image.imageFromName("NSActionTemplate")
}
function ResolutionManager:getResolutionsMenuTabl... |
require("compatibility.more-science-pack.recipe")
require("compatibility.more-science-pack.recipe-science-pack")
require("compatibility.underground-pipe-pack")
require("prototypes.updates-solar")
require("prototypes.updates-misc-recipe")
require("prototypes.updates-recipe-science-components")
require("prototypes.updat... |
local require_safe = require("utils").require_safe
local M = {}
M.setup = function()
local config = {
virtual_text = false, -- disable text that appears beside code
signs = false,
update_in_insert = true,
underline = true,
severity_sort = true,
float = {
focusable = false,
styl... |
object_tangible_loot_creature_loot_collections_eow_defective_holoshroud = object_tangible_loot_creature_loot_collections_shared_eow_defective_holoshroud:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_eow_defective_holoshroud, "object/tangible/loot/creature/loot/collections/eow_defe... |
local DIR_ROOT = (path.getabsolute('..') .. '/')
dofile('genie_common.lua')
function unet_project(options)
options = unet_verify_options(options)
project 'unet'
kind 'StaticLib'
includedirs {
DIR_ROOT .. 'include/',
}
pchheader 'Unet_common.h'
pchsource(DIR_ROOT .. 'src/Unet_common.cpp')
unet_def... |
if not modules then modules = { } end modules ['regi-8859-4'] = {
version = 1.001,
comment = "companion to regi-ini.mkiv",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files"
}
return { [0] =
0... |
function SparseVolumeToVolumeFunc(property)
local rs = property.resample
if rs == '' then
rs = 1.0
end
local vm = require("SparseVolumeToVolume")();
vm:Create(property.sparsevolume, rs)
function volume()
return vm:VolumeData()
end
return { volume = volume }
end
|
minetest.register_craft({
output = 'uscurrency:safe',
recipe = {
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'default:steel_ingot', '', 'default:steel_ingot'},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
}
})
minetest.register_craft({
output = ... |
local PANEL = {}
function PANEL:Init()
local slider = vgui.Create("DSlider", self)
local label = vgui.Create("DLabel", self)
local wang = vgui.Create("DNumberWang", self)
label:SetTextColor(Color(0, 0, 0, 255))
slider:SetLockY(0.5)
slider:SetTrapInside(true)
Derma_Hook(slider, "Paint", "Paint",... |
-- List of commonly used variables all across the library
return {
engineInit = {
gravity = Vector2.new(0, .3),
friction = 0.99,
airfriction = 0.99,
bounce = 0.8,
timeSteps = 1,
canvas = {
topLeft = Vector2.new(0, 0),
size = workspace.CurrentCamera.ViewportSize,
},
},
universalMass = 1,
speed =... |
--地心抵抗军·普罗米修斯
local m=14000228
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),4,2,nil,nil,99)
c:EnableReviveLimit()
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(... |
aliveai_electric={player={}}
aliveai_electric.pos_between=function(pos1,pos2,density)
if not ((pos1 and pos1.x and pos1.y and pos1.z) or (pos2 and pos2.x and pos2.y and pos2.z)) then return end
local d=aliveai.distance(pos1,pos2)
density=density or 1
local allpos={}
local v = {x = pos1.x - pos2.x, y = pos1... |
--
-- Copyright (c) 2015, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--
-- Author: Alex... |
--[[
A multi line
comment call out box
]]--
-- This is a local variable
local total = 0
-- Here is a function
function Init()
-- This is a call out example
-- Here is a loop
for i = 1, total do
-- Here is a condition in a for loop
if (Tile(pos.x, pos.y).SpriteId > -1) then
... |
AuctionatorBagItemContainerMixin = {}
function AuctionatorBagItemContainerMixin:OnLoad()
self.iconSize = Auctionator.Config.Get(Auctionator.Config.Options.SELLING_ICON_SIZE)
self.items = {}
self.buttons = {}
self.buttonPool = CreateAndInitFromMixin(Auctionator.Utilities.PoolMixin)
self.buttonPool:SetCreator... |
ENT.Type = "anim"
ENT.Base = "base_gmodentity"
ENT.PrintName = "Radio"
ENT.Category = "CityRP"
ENT.Spawnable = true
ENT.Model = "models/props_lab/citizenradio.mdl"
function ENT:SetupDataTables()
self:NetworkVar("Int", 0, "price")
self:NetworkVar("Entity", 1, "owning_ent")
end
function ENT:GitPos()
return ... |
--電脳堺悟-老々
--
--Script by JustFish
function c101102011.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102011,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_GRAVE_ACTION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e... |
--[[-----------------------------------------------------------------------------
* Infected Wars, an open source Garry's Mod game-mode.
*
* Infected Wars is the work of multiple authors,
* a full list can be found in CONTRIBUTORS.md.
* For more information, visit https://github.com/JarnoVgr/InfectedWars
*
* Inf... |
--Remap escape to leave terminal mode
vim.api.nvim_exec([[
augroup SpellCheck
autocmd!
autocmd BufNewFile,BufRead *.md setlocal spell
augroup end
]], false)
|
AddCSLuaFile()
--Entity only for spawner!
function ENT:Initialize() self:Remove() end
ENT.Type = "anim"
ENT.Base = "gmod_subway_base"
ENT.PrintName = "81-717 SPB Custom"
ENT.SkinsType = "81-717_spb"
ENT.Spawnable = false
ENT.AdminSpawnable = false
ENT.SubwayTrain = {
Type = "81",
... |
-- Token
-- Represents a token from lexing/parsing a NameList text. The grammar is described in more detail in grammar_example.txt
local Token = {}
Token.types =
{
eof=0,
identifier=1,
string=2,
literal=3,
list_placeholder=4,
parentheses_block=5,
list_block=6,
weight_block=7,
sepa... |
-------------------------
--EMA
shiftEMASettings = {
period = 0,
period2 = 0,
shift = 1,
Size = 0
}
function iterateShiftEMA(iSec, cell)
iterateSLTP = false
local param1Min = 20
local param1Max = 120
local param1Step = 1
local param2Min = 20
local param2Max = 180
lo... |
local make_layered_icon = require("icon")
local function get_parent_technology(recipe_name)
for _, technology in pairs(data.raw.technology) do
--log(technology.name)
if (technology.enabled or technology.enabled == nil) and technology.effects then
for _, effect in pairs(technology.effects) do
if effect.type... |
local oldMarineBuy_GetEquipped = MarineBuy_GetEquipped
function MarineBuy_GetEquipped()
local equipped = oldMarineBuy_GetEquipped()
local player = Client.GetLocalPlayer()
local items = GetChildEntities(player, "ScriptActor")
for _, item in ipairs(items) do
local techId = item:GetTec... |
describe('unwrap', function()
it('produces an error if its parent errors', function()
local observable = Rx.Observable.of(''):map(function(x) return x() end)
expect(observable.subscribe).to.fail()
expect(observable:unwrap().subscribe).to.fail()
end)
it('produces any multiple values as individual valu... |
---@class vm
local vm = require 'vm.vm'
local searcher = require 'core.searcher'
function vm.getDefs(source, field)
return searcher.requestDefinition(source, field)
end
function vm.getAllDefs(source, field)
return searcher.requestAllDefinition(source, field)
end
|
-- Copyright (c) 2021 Trevor Redfern
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
describe("game.ui.camera.actions.set_dimensions", function()
local set_dimensions = require "game.ui.camera.actions.set_dimensions"
it("takes a width and height for the camera... |
require_ 'macro.do'
-- unrolling a loop
y = 0
do_( i,1, 10,
y = y + i
)
assert(y == 55)
-- do_ defined a _local_ macro 'i'
assert(i == nil)
-- tuples usually expand to A_1,A_2,A_3 and so forth
tuple(3) A,B
B = 10,20,30
print(B)
def_ do3(v,s) do_(v,1,3,s)
-- but inside a do_ statements with tup... |
local Native = require('lib.native.native')
---@class AbilityIntegerLevelArrayField
local AbilityIntegerLevelArrayField = {
}
return AbilityIntegerLevelArrayField
|
--------------------------------
-- @module Source
-- @extend Ref
-- @parent_module audio
---@class audio.Source:cc.Ref
local Source = {}
audio.Source = Source
--------------------------------
--- Creates an identical copy of the Source in the stopped state.
--- Will save memory and time when the Source is static.
--... |
--[=[
Sets up `require.optional("Name")`.
Errors are still preserved because Roblox reports errors of module scripts regardless of caller
execution context.
```lua
local BasicPane = require.optional("BasicPane")
```
@class optional
]=]
--[=[
Optional require, if the instance does not exist, or errors while loading... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.