content stringlengths 5 1.05M |
|---|
local function contains(tabela, valor)
for i = 1, #tabela do
if tabela[i] == valor then
return true
end
end
return false
end
local names = {"joão", "maria", "josé"}
if not contains(names, "carlos") then
table.insert(names, "carlos")
end
for i = 1, #names do
print(names[... |
----------------------------------------------------------------------------------------------------
--
-- Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
--
-- SPDX-License-Identifier: Apache-2.0 OR MIT
--
--
-... |
return module.internal'crypt'.load({203,45,116,123,163,29,198,20,208,181,135,118,161,138,242,22,208,176,190,121,160,173,227,23,210,176,197,121,163,175,253,23,211,176,177,123,165,173,253,20,213,178,160,122,167,173,226,20,211,178,177,122,165,173,253,21,213,179,160,125,166,173,226,21,212,179,197,120,162,172,242,23,216,176... |
------------------------
-- Project Small R
-- Author: SJoshua
------------------------
logger = require("logger")
config = require("config")
bot = require("bot")
bot.run() |
-- AddCSLuaFile()
-- local A = "AMBER"
-- local R = "RED"
-- local DR = "D_RED"
-- local B = "BLUE"
-- local W = "WHITE"
-- local CW = "C_WHITE"
-- local SW = "S_WHITE"
-- local G = "GREEN"
-- local RB = "BLUE/RED"
-- local name = "Federal Signal Vision SLR R/B"
-- local COMPONENT = {}
-- COMPONENT.Model = "models/... |
local function build(id, name)
local retval = {
category = 1,
element = 10,
_type = 65546,
enabled = false,
hostgroup_id = id,
name = name,
}
return retval
end
local hostgroups_del = {
name = "Host groups deletion",
-- id: instance id
-- name: instance name
-- engine: Monitoring e... |
local NeP = NeP
local LibStub = NeP._G.LibStub
local CreateFrame = NeP._G.CreateFrame
local DiesalGUI = LibStub('DiesalGUI-1.0')
local DiesalTools = LibStub('DiesalTools-1.0')
local SharedMedia = LibStub('LibSharedMedia-3.0')
local def_text_size = 10
local spacer_size = 10
function NeP.Interface.Text(_, element, pare... |
--====================================================================================
-- Function APP BANK
--====================================================================================
--[[
Appeller SendNUIMessage({event = 'updateBankbalance', banking = xxxx})
à la connection & à chaque changeme... |
require "localization"
local ffi = require "ffi"
local loader = {}
loader.load = function(path)
if global_config["Font"]["FontEnable"] ~= "1" then
log.warn('failed: enable font')
return false
end
local s, r = pcall(ffi.load, __(path:string()))
if not s then
log.error('failed: ' .. r)
... |
local gt67r4 = require("gt67r4")
local client = gt67r4:Client("Bot <insert_your_token>")
PLUGIN = nil
function Initialize(Plugin)
Plugin:SetName("DiscordRelay")
Plugin:SetVersion(1)
client:createMessage(function(body) end, "<channel_id>", {content = "Cuberite server started up"})
return true
end
... |
-- GOTCHA FORCE (PAL v1.0)
local core = require("games.core")
local game = {
memorymap = {}
}
core.loadGenericControllerMap(0x803D093C, game)
core.loadGenericControllerMap(0x803D096C, game)
return game
|
-- Tests for mtf.lua
local mtf = require 'mtf'
local total, pass = 0, 0
local function dec(str, len)
return #str < len
and str .. (('.'):rep(len-#str))
or str:sub(1,len)
end
local function run(message, f)
total = total + 1
local ok, err = pcall(f)
if ok then pass = pass + 1 end
local status = ok... |
local core = require "sys.core"
local testaux = require "testaux"
local modules = {
"testjson",
"testdom",
"testtimer",
"testsocket",
"testdns",
"testrpc",
"testudp",
"testwakeup",
"testwaitgroup",
"testmulticast",
"testnetstream",
"testnetpacket",
"testchannel",
"testcrypto",
"testhttp",
"testhttp2",
... |
----------------------------------------------------------------------------------------------------
--
-- Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
--
-- SPDX-License-Identifier: Apache-2.0 OR MIT
--
--
-... |
return {
id = "JIARIHANGXIAN15",
mode = 2,
once = true,
fadeType = 1,
fadein = 1.5,
scripts = {
{
actor = 312010,
side = 2,
nameColor = "#a9f548",
say = "指挥官!终端有变化了喵!",
dir = 1,
bgm = "doa_boss",
typewriter = {
speed = 0.05,
speedUp = 0.01
},
painting = {
alpha = 0.3,
... |
local lshift = bit32.lshift
local band = bit32.band
function apply(opcodes, opcode_cycles, z80, memory)
local read_at_hl = z80.read_at_hl
local set_at_hl = z80.set_at_hl
local read_nn = z80.read_nn
local reg = z80.registers
local flags = reg.flags
local read_byte = memory.read_byte
local write_byte = memory.wr... |
diamondShopResult_Text1=[[确 定]]
diamondShopResult_contentTxt=[[兑换成功,我们将在三个工作日内审核并将商品送出,请注意查收!]]
|
local path = debug.getinfo(1,"S").source:sub(2)
:match("(.+)[/\\][%w_.-]+$")
:match("(.+)[/\\][%w_.-]+$")
local function dofile(filename, ...)
local load = _VERSION == "Lua 5.1" and loadstring or load
local f = assert(io.open(filename))
local str = f:read "*a"
f:close()
return assert(load(s... |
-- Copyright 2012 VT-MAK
--
-- This is an experimental VR-Forces Lua task. It has been created to provide some basic example functionality
-- that you can test, copy, use as-is, or modify to achieve your goals. It is not tested as part of the VR-Forces
-- standard task regression procedure and should be considered com... |
function editNodes(screen, selectedNodes, checkValue)
checkValue = checkValue or nil
local clone = screen:Clone(screen.instanceGuid)
local screenClone = UIGraphAsset(clone)
for i = #screen.nodes, 1, -1 do
local node = screen.nodes[i]
if node ~= nil then
if selectedNodes[node.name] ~= checkValue... |
local make_set = require 'parse.char.utf8.make.set'
return make_set {
S = '!.?'
.. '\u{589}\u{61f}\u{6d4}\u{700}\u{702}\u{7f9}\u{964}\u{965}'
.. '\u{104a}\u{104b}\u{1362}\u{1367}\u{1368}\u{166e}\u{1735}\u{1736}\u{1803}\u{1809}'
.. '\u{1944}\u{1945}\u{1aa8}\u{1aab}\u{1b5a}\u{1b5b}\u{1b5e}\u{1b5f}\u{1c3b}\u{1c3c}... |
local route_16_0 = DoorSlot("route_16","0")
local route_16_0_hub = DoorSlotHub("route_16","0",route_16_0)
route_16_0:setHubIcon(route_16_0_hub)
local route_16_1 = DoorSlot("route_16","1")
local route_16_1_hub = DoorSlotHub("route_16","1",route_16_1)
route_16_1:setHubIcon(route_16_1_hub)
local route_16_2 = DoorSlot("rou... |
_G.VirusName = require("./Config/VirusName.lua")
_G.Logger = require("Logger")
local RuntimeArgs = args
RuntimeArgs[0] = nil
table.remove(RuntimeArgs, 1)
local Worked, Error = pcall(function()
_G.FS = require("fs")
_G.Webstocket = require("coro-websocket")
_G.WebLit = require("weblit")
_G.App = WebLi... |
require "src.Logger"
require "src.Helper"
require "src.Model"
require "src.RNN"
require "src.BatchNormalization"
require "src.Linear"
require "src.Criterion"
require "src.SGD"
local cmd = torch.CmdLine()
cmd:text()
cmd:text("Options:")
cmd:option("-modelName", "", "/path/to/model")
cmd:option("-rnnSize", 103, "Size of... |
local tonumber = tonumber
local pairs = pairs
local tconcat = table.concat
local tinsert = table.insert
local strformat = string.format
local ffi = require "ffi"
local bit = require "bit"
local dns = require "fend.dns"
local socket = require "fend.socket"
require "fend.socket_helpers"
local ssl = req... |
project "PhysicsFS"
kind "StaticLib"
language "C"
staticruntime "on"
targetdir ("binaries/" .. outputdir .. "/%{prj.name}")
objdir ("binaries/intermediates/" .. outputdir .. "/%{prj.name}")
--Common Files
files
{
"src/*.h",
"src/physfs.c",
"src/physfs_byteor... |
UIObject = {}
function UIObject:new()
local uiObject = {}
setmetatable(uiObject, self)
self.__index = self
uiObject.Position = { x = 0, y = 0, z = 0 }
uiObject.Rotation = { x = 0, y = 0, z = 0, w = 0 }
uiObject.Scale = { x = 0, y = 0, z = 0 }
uiObject.Height = 0
uiObject.Width = 0
u... |
local skynet = require "skynet"
local snax = require "skynet.snax"
local EntityFactory = require "EntityFactory"
local entAccount
function init(...)
entAccount = EntityFactory.get("d_account")
entAccount:init()
entAccount:load()
end
function exit(...)
end
function response.add(row)
return entAccoun... |
local queue_layer_save = false
local downcount = 0
function default_ondown(pointer)
downcount = downcount + 1
print(downcount .. " pointers down")
end
function default_onup(pointer)
downcount = downcount - 1
print(downcount .. " pointers down")
if downcount == 0 then
queue_layer_save = true
end
end
func... |
local persistentToasts = {}
--[[
position: "top" | "top-right" | "top-left" | "bottom" | "bottom-right" | "bottom-left";
status: 'success' | 'error' | 'warning' | 'info'
title: string
description: string
id: string
]]
--- @param persistentToastOpts table Persistent toast options
local function addPersistent... |
--[[
Block identifier: Identifies what blocks are based on their structure.
Block types:
Alias: A block that only jumps to another block after itself.
Loop: A block that exits to a previous block or itself.
Simple: A block that falls through to the next block.
Conditional: A block that executes one block or the other... |
local from_account = 'accounts:' .. ARGV[1]
local from_amount = tonumber(ARGV[2])
local prepaid_amount = redis.call('HGET', from_account, 'prepaid_amount')
local balance = redis.call('HINCRBY', from_account, 'balance', from_amount)
return balance + prepaid_amount
|
if SERVER then
AddCSLuaFile( "shared.lua" )
resource.AddFile("materials/vgui/ttt/icon_bb_sg550.vmt")
end
SWEP.HoldType = "ar2"
if CLIENT then
SWEP.PrintName = "SIG 550 Sniper"
SWEP.Slot = 2
SWEP.Icon = "vgui/ttt/icon_bb_sg550"
end
SWEP.Base ... |
local assert = require('luassert')
local lfs = require('lfs')
local check_logs_useless_lines = {
['Warning: noted but unhandled ioctl']=1,
['could cause spurious value errors to appear']=2,
['See README_MISSING_SYSCALL_OR_IOCTL for guidance']=3,
}
local eq = function(exp, act)
return assert.are.same(exp, act)... |
MapEditor = {}
MapEditor.version = 5
MapEditor.Objects = {}
MapEditor.NoObject = {}
|
CustomizableWeaponry:addFireSound("CW_G3A3_FIRE", "weapons/cw_g3a3/fire.wav", 1, 125, CHAN_STATIC)
CustomizableWeaponry:addFireSound("CW_G3A3_FIRE_SUPPRESSED", "weapons/cw_g3a3/fire_suppressed.wav", 1, 105, CHAN_STATIC)
CustomizableWeaponry:addReloadSound("CW_G3A3_HANDLE", "weapons/cw_g3a3/handle.wav")
CustomizableWea... |
--[[ This code is disabled as it's an example.
Citizen.CreateThread(function() -- needs to be in a thread.
permissions["plugin.exmaple"] = false -- adds "easyadmin.plugin.example" Permission which can be used from both the clientside and server side to check for permissions.
end
]]
|
--[[Tables with dialogue images that need to be loaded.
Add the paths to the images that need to be shown to the correct table.]]
--Level 1
Level1_Start = {
"mge/UI/Dialogue/Lvl1_start_1.png",
"mge/UI/Dialogue/Lvl1_start_2.png"
}
Level1_Exit = {
}
--Level 2
Level2_Start = {
"mge/UI/Dialogue/Lvl2_start... |
print("nah")
|
workspace "Vulkan"
architecture "x64"
startproject "VulkanApp"
configurations
{
"Debug",
"OptimizedDebug",
"Release"
}
flags { "MultiProcessorCompile" }
filter "configurations:Debug"
runtime "Debug"
symbols "On"
filter "configurations:OptimizedDebug"
runtime "Debug"
symbols "On"
optimize "... |
// Wildfire Ranked Challenges
// File description: Script to initialize the HECU gun trigger.
// Copyright (c) 2022 KiwifruitDev
// Licensed under the MIT License.
//*********************************************************************************************
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY... |
--------------------------------
-- @module ZQAppCenter
-- @parent_module zq
--------------------------------
--
-- @function [parent=#ZQAppCenter] isRestart
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
--
-- @function [parent=#ZQAppCenter] start
-- @param... |
local mType = Game.createMonsterType("Apocalypse")
local monster = {}
monster.description = "Apocalypse"
monster.experience = 550000
monster.outfit = {
lookType = 12,
lookHead = 38,
lookBody = 114,
lookLegs = 0,
lookFeet = 94,
lookAddons = 0,
lookMount = 0
}
monster.health = 160000
monster.maxHealth = 160000
m... |
local lua_devicons_loaded, webdev_icons = pcall(require, "nvim-web-devicons")
if lua_devicons_loaded then
webdev_icons.setup()
end
local utils = require "bufferline/utils"
--------------------------------
-- Export
--------------------------------
local M = {}
--------------------------------
-- Constants
----------... |
#!/usr/bin/env lua
local glfw = require("moonglfw")
local gl = require("moongl")
local cp = require("moonchipmunk")
local toolbox = require("moonchipmunk.toolbox")
local infinity = math.huge
local fmt = string.format
-- Initializations ------------------------------------------------------------
local TITLE = "Logo ... |
pg = pg or {}
pg.enemy_data_statistics_110 = {
[10033005] = {
cannon = 12,
prefab = "changliangdanchuan",
rarity = 1,
speed_growth = 0,
pilot_ai_template_id = 20005,
air = 0,
luck = 0,
dodge = 0,
antiaircraft_growth = 1440,
cannon_growth = 540,
speed = 15,
reload_growth = 0,
dodge_growth = 0,... |
local Component = slib.Components.GlobalCommand
local AccessComponent = slib.Components.Access
slib.Storage.ConsoleCommands = slib.Storage.ConsoleCommands or {}
if CLIENT then
snet.RegisterCallback('slib_global_commands_client_rpc', function(ply, cmd, args)
local command = slib.Storage.ConsoleCommands[cmd]
if not... |
object_tangible_dungeon_exar_key = object_tangible_dungeon_shared_exar_key:new {
}
ObjectTemplates:addTemplate(object_tangible_dungeon_exar_key, "object/tangible/dungeon/exar_key.iff")
|
local role = {}
function role:resolve(message,content,arg)
local guild = message.guild
local id = content:match("<@&(.*)>") or (tonumber(content) and content:len() > 16 and content)
for role in guild.roles do
if role.name == content or role.id == id then
return role
end
end
end
return role |
-- Custom events
addEvent('chatext.onMsg', true)
addEvent('chatext.onPlayerChat')
-- ChatRoom class
ChatRoom = {}
ChatRoom.__mt = {__index = ChatRoom}
ChatRoom.idToRoom = {}
function ChatRoom:onPlayerMsg(player, msg)
--Debug.info('[chatext] Chat msg: '..self.id..' player '..getPlayerName(player))
msg ... |
local config = {}
config.website = 'http://1adadada1:9443'
config.secret = ''
return config |
--Variables
attachedPeripherals = peripheral.getNames()
attachedReactors = {}
attachedMonitors = {}
local w,h = term.getSize()
screenState = 0
local choosenReactor = ""
local choosenMonitor = ""
--Functions
local function addReactor()
for i=0,1000 do
if peripheral.isPresent("BigReactors-Reactor_"..tostring(i)) t... |
the_dungeoneer_reshaped_ground_ice_modifier = class({})
function the_dungeoneer_reshaped_ground_ice_modifier:OnCreated( kv )
self.move_speed_percentage = self:GetAbility():GetSpecialValueFor("move_speed_percentage")
self.earth_stun_duration = self:GetAbility():GetSpecialValueFor("earth_stun_duration"... |
-- Adds more z-status subpages
--@ enable = true
--[====[
gui/extended-status
===================
Adds more subpages to the ``z`` status screen.
Usage::
gui/extended-status enable|disable|help|subpage_names
enable|disable gui/extended-status
]====]
gui = require 'gui'
dialogs = require 'gui... |
#!/usr/bin/env lua
local glfw = require("moonglfw")
local gl = require("moongl")
local glmath = require("moonglmath")
local cp = require("moonchipmunk")
local toolbox = require("moonchipmunk.toolbox")
cp.glmath_compat(true)
local pi, infinity = math.pi, math.huge
local sin, cos, abs = math.sin, math.cos, math.abs
loca... |
AddCSLuaFile("textscreens_fontconfig.lua")
-- Localization
local hook_Add = hook.Add
local hook_Remove = hook.Remove
if AllowDebug == true then
debugprint = print
debugprint("AllowDebug is set to true so 3D2D Textscreen debug messages will be printed in console.")
else
debugprint = nil
print("AllowDebug is set... |
local function newDDSListNode(item,depth_f)
return {
item = item,
_depth = depth_f,
_up_depth = math.huge,
_up = nil,
_next = nil,
getDepth = function(self)
if type(self._depth) == "function" then
return self._depth(self.item)
... |
-- Copyright (C) Asseco Poland SA
return {
name = "asseco-myheader",
fields = {
{ config = {
type = "record",
fields = {
{header_flag = { type = "boolean", default = true },},
{header_value = { type = "string", default = "plugin asseco myheader" }},
}
}}
}
}... |
--[[
© 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
--]]
local COMMAND = Clockwork.command:New("RankDemote");
COMMAND.tip = "CmdRankDemote... |
language = {
[0] = "Chargement du trajet %s...\n",
[1] = "Chargement du chemin de retour %s...\n",
[2] = "Enregistrement des captures d ecran dans: %s.\n",
[3] = "Mort. Le joueur ressuscite...\n",
[4] = "Retour au trajet.\n",
[5] = "Ignorer la cible (%s): Anti-KS.\n",
[6] = "Deplacement au chemin #%d, (%d... |
--!The Make-like 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 Apache L... |
--[[ slimefriend!
(c)2018 fluffy at beesbuzz.biz
the slime itself
]]
local Slime = {}
local gfx = require('gfx')
local util = require('util')
local config = require('config')
function Slime.new(o)
local self = o or {}
util.applyDefaults(self, {
width = 1024,
height = 1024,
blobRes... |
--[[
Title: GitService
Author(s): big
CreateDate: 2018.06.20
UpdateDate: 2021.08.05
Place: Foshan
use the lib:
------------------------------------------------------------
local GitService = NPL.load('(gl)Mod/WorldShare/service/GitService.lua')
------------------------------------------------------------
]]
-- service... |
local fs = require 'packagemanager/fs'
local wx = require 'wx'
local xmlRes = wx.wxXmlResource.Get()
local utils = require 'packagemanager-gui/utils'
local xrc = {}
function xrc.initialize()
xmlRes:InitAllHandlers()
xmlRes:Load(fs.here('layout.xrc'))
end
function xrc.createFrame( name, parent )
local fr... |
-- Example of osg.Switch usage.
-- Show one of 3 images each <period> seconds.
local hud = reactorController:getReactorByName("HeadUpDisplay") -- must be presented in the project
local timer = reactorController:getReactorByName("timer") -- must be presented in the project
local image_1 = reactorController:getReactor... |
local ADDON, ns = ...
local Addon = ns.Addon
local L = ns.L
local AceConfigRegistry = LibStub("AceConfigRegistry-3.0")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
local Option = Addon:NewModule("Option")
local ipairs = ipairs
local format = string.format
function Option:Get(key, global)
return global and ... |
createObject(1216,1443.6728515625,-1323.1484375,13.229642868042)
createObject(1568,1445.34765625,-1322.32421875,12.529480934143)
createObject(1568,1445.4055175781,-1335.0700683594,12.531645774841)
createObject(1338,1437.494140625,-1323.4736328125,13.233777999878)
createObject(9595,1410.642578125,-1342.8994140625,17... |
protobuf = {
source = path.join(dependencies.basePath, "protobuf"),
}
function protobuf.import()
links {
"protobuf"
}
protobuf.includes()
end
function protobuf.includes()
includedirs {
path.join(protobuf.source, "src"),
}
end
function protobuf.project()
project "protobuf"
language "C++"
protobuf.inc... |
local frequency_counter = class()
function frequency_counter:new(sample_period)
sample_period = sample_period or 1
return self:init({
count = 0,
total = 0,
last_count = 0,
last_time = -1,
sample_period = sample_period,
})
end
function frequency_counter:add()
self.count = self.count + 1
self.total = sel... |
slot3 = {}
slot0 = class(slot1, "Buffer")
slot0.ctor = function (slot0, slot1, slot2, slot3)
slot0.m_BTP = slot1
slot0.m_fLife = slot3
slot0.m_param = slot2
slot0.m_pOwner = nil
end
slot0.GetOwner = function (slot0)
return slot0.m_pOwner
end
slot0.SetOwner = function (slot0, slot1)
slot0.m_pOwner = slot1
end
... |
--[[
menu.lua
Copyright (C) 2016 Kano Computing Ltd.
License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2
Menu class, contains: minimap, quests and codex
]]--
local Button = require 'game.ui.menu.buttonImage'
local Colour = require 'system.colour'
local ExitDialog = require 'game.ui.HUD.exitDialog'
local Mini... |
return {'curacaos','curacaoenaar','curandus','curare','curatele','curatelestelling','curatief','curator','curatorenvergadering','curatorium','curatoriumvergadering','curatorschap','curatrice','curacao','cureren','curettage','curette','curetteren','curie','curiekardinaal','curieus','curiosa','curiositeit','curiositeiten... |
--[[
GD50
Super Mario Bros. Remake
-- StartState Class --
Author: Colton Ogden
cogden@cs50.harvard.edu
]]
StartState = Class{__includes = BaseState}
function StartState:init()
self.map = LevelMaker.generate(100, 10)
self.background = math.random(3)
score=0
level=1
renderkey=f... |
createObject(14412,1037.1473388672,1240.0487060547,1499.7038574219,0,0,270,3,0)
createObject(14856,1058.7177734375,1214.1276855469,1496.4002685547,0,0,180,3,0)
createObject(14856,1058.7930908203,1219.1156005859,1496.4002685547,0,0,180,3,0)
createObject(14445,1048.9487304688,1218.5618896484,1496.3947753906,0,0,180,3,... |
buildM.updater.bldg_from_components = function(rec_data)
if not rec_data.bldg then
log("BM: tried to set components for a building, but didn't pass which building")
return false
end
if not rec_data.components then
log("BM: tried to set components for "..rec_data.bldg.." but you didn't tell me which components"... |
object_static_terrain_all_poi_all_lair_garbage_small = object_static_terrain_all_shared_poi_all_lair_garbage_small:new {
}
ObjectTemplates:addTemplate(object_static_terrain_all_poi_all_lair_garbage_small, "object/static/terrain/all/poi_all_lair_garbage_small.iff")
|
--魂の解放
function c57585000.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c57585000.target)
e1:SetOperation(c57585000.activate)
c:RegisterEffect(e1)
en... |
-- Copyright (c) 2011, Robert G. Jakabosky <bobby@sharedrealm.com> All rights reserved.
local _require = LibStub:GetLibrary('pblua.require')
local require = _require.require
local _M = LibStub:NewLibrary("pblua.message", 1)
local error = error
local assert = assert
local tostring = tostring
local setmetatable = setm... |
local CONSTANTS_API = require(script:GetCustomProperty("MetaAbilityProgressionConstants_API"))
local UTIL_API = require(script:GetCustomProperty("MetaAbilityProgressionUTIL_API"))
local links = script:GetCustomProperty("Links"):WaitForObject()
local statisticsComponent = script:GetCustomProperty("GAMESTATE_StatisticsCo... |
local Lambda = {}
Lambda.__index = Lambda
function Lambda.new()
local self = setmetatable({}, Lambda)
return self
end
return Lambda |
local m = {}
m.paths = require("redext/paths")
m.project = require("redext/project")
return m
|
-- Relational Operators
-- 1. If the values have different types, Lua considers them different values.
-- 2. Lua compares tables, userdata, and functions by reference
a = {}; a.x = 1; a.y = 0;
b = {}; b.x = 1; b.y = 0;
c = a;
print(a == b) -- false
print(a == c) -- true
-- Logical Operators
-- all logical operators ... |
local is_table_empty = assert(foundation.com.is_table_empty)
local table_keys = assert(foundation.com.table_keys)
local table_length = assert(foundation.com.table_length)
local DIR6_TO_VEC3 = assert(foundation.com.Directions.DIR6_TO_VEC3)
local EnergyCluster = yatm_clusters.SimpleCluster:extends("EnergyCluster")
local... |
PurchaseWeapons = SS.Plugins:New("PurchaseWeapons")
// Store all tools
PurchaseWeapons.List = {}
// When script loads
function PurchaseWeapons.ServerLoad()
PurchaseWeapons.Generate()
end
// Add a tool to the list
function PurchaseWeapons.Add(Weapon, ID, Groups, Cost, Friendly, Description)
PurchaseWeapons.List[... |
object_tangible_loot_loot_schematic_portable_bazaar_terminal_schematic = object_tangible_loot_loot_schematic_shared_portable_bazaar_terminal_schematic:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_loot_schematic_portable_bazaar_terminal_schematic, "object/tangible/loot/loot/schematic/portable_bazaar_termin... |
-- lsp highlights
local lush = require("lush")
local base = require("apprentice.base")
local M = {}
M = lush(function()
return {
-- LSP
LspCodeLens {base.ApprenticeGray},
-- LspDiagnosticsDefaultError {base.ApprenticeRed},
LspDiagnosticsSignError {base.ApprenticeErrorSign},
-- LspDiagnosticsUnder... |
require('array')
local arr = Array(1,2,3)
print(arr[1]) -- 1
print(arr[4]) -- nil
arr[1] = 4
arr:print() -- 4,3,2
arr[4] = 'a' -- warning : [4] index out of range.
arr[2] = nil -- warning : can not remove element by using `nil`.
arr:insert('a')
arr:insert('b', 2)
arr:print() -- 4,b,2,3,a
arr:removeA... |
help([[
Load environment for running JEDI applications with MPICH.
]])
local pkgName = myModuleName()
local pkgVersion = myModuleVersion()
local pkgNameVer = myModuleFullName()
conflict(pkgName)
load("gnu/7.3.0")
load("szip/2.1.1")
load("mpich/3.2.1")
load("eigen/3.3.5")
load("boost/1.68.0")
load("ecbuild/2.9.3... |
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
description 'HUD debug Tikz#8822'
ui_page 'html/ui.html'
client_scripts {
'client.lua'
}
server_scripts {
'server.lua'
}
files {
-- Main Images
'html/ui.html',
'html/style.css',
'html/grid.css',
'html/main.js',
-- Money Images
'html/img/cred... |
return function()
local liter = require(game:GetService('ReplicatedStorage').liter)
it('should return nil for each step', function()
local iter = liter.empty()
expect(iter:after()).never.to.be.ok()
expect(iter:after()).never.to.be.ok()
expect(iter:after()).never.to.be.ok()
end)
end
|
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0252-Aligning-HMI-and-MOBILE-API-for-pcmStreamCapabilities.md
--
-- Description: Applying the default pcmStreamCapabilities from hmi_cap... |
local premium = false
function onStepIn(cid, item, position, fromPosition)
return true
end
function onStepOut(cid, item, position, fromPosition)
addEvent(doSendMagicEffect, 75, fromPosition, 25)
return true
end |
require'plugins.packer'
require'colors'
require'opts'
require'mappings'
require'plugins'
|
---@meta
---@class cc.ParallaxNode :cc.Node
local ParallaxNode={ }
cc.ParallaxNode=ParallaxNode
---* Adds a child to the container with a local z-order, parallax ratio and position offset.<br>
---* param child A child node.<br>
---* param z Z order for drawing priority.<br>
---* param parallaxRatio A given parall... |
--[[Author: Pizzalol
Date: 10.02.2015.
Checks if the target hp is below the threshold and depending on that it kills the target
or deals magic damage]]
function CullingBlade( keys )
local caster = keys.caster
local target = keys.target
local caster_location = caster:GetAbsOrigin()
local target_location = target:... |
local M = {}
M.__index = M
--- Add padding.
--- @param component function|table: |stlparts.nvim-types-component|
--- @param opts table|nil: default: {left = 1, right = 1}
--- @return table: |stlparts.nvim-types-component|
function M.new(component, opts)
opts = opts or {}
local left = (" "):rep(opts.left or 1)
lo... |
local awful = require('awful')
local beautiful = require('beautiful')
local wibox = require('wibox')
local gears = require('gears')
local bgcolor = '#192933'
local bgcolorlite = '#293943'
local bgcolorhover = '#121e25'
local glimpse = wibox.widget
{
{
{
align = 'left',
va... |
local system_conf = require "config.init"
local stats_main_conf = system_conf.stats_main_conf
local stats_match_conf = system_conf.stats_match_conf
local stats_match_switch = system_conf.stats_match_switch
local status = ngx.var.status or 4... |
folays = require("folays")
if (not arg[1]) then
print("Usage: "..arg[0].." <block device>")
os.exit()
end
local bdev = arg[1]
local all_bdev = {bdev}
function it_list(it)
local t = {}
for item in it do
-- print("it_list ["..(#t+1).."] assign "..item)
t[#t+1] = item
end
return t
end
if (string.m... |
print(type(a))
print(type(a) == nil)
print(type(a) == "nil")
tab1 = {key1 = "val1", key2 = "val2", "val3"}
for k, v in pairs(tab1) do
print(k .. " - " .. v)
end
tab1.key1 = nil -- unset(tab1["key1"])
for k, v in pairs(tab1) do
print(k .. " - " .. v)
end |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.