content stringlengths 5 1.05M |
|---|
---@diagnostic disable: undefined-global
-- lush_jsx settings handler
local utils = require("lush_jsx.utils")
local settings = {
contrast_dark = "soft",
contrast_light = "hard",
bold = true,
italic = true,
undercurl = true,
underline = true,
inverse = true,
improved_strings = true,
improved_warnings = true,
... |
object_draft_schematic_vehicle_civilian_hoverlifter_speeder_crafted = object_draft_schematic_vehicle_civilian_shared_hoverlifter_speeder_crafted:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_vehicle_civilian_hoverlifter_speeder_crafted, "object/draft_schematic/vehicle/civilian/hoverlifter_speeder_crafted... |
--
-- Based heavily on MiddleClick, https://github.com/artginzburg/MiddleClick-Catalina
--
--
-- leaving here because linked to in https://github.com/Hammerspoon/hammerspoon/issues/2057
-- further work, cleanup, etc. being done at https://github.com/asmagill/hs._asm.undocumented.touchdevice/blob/master/Examples/middle... |
--local variables
local binds = {}
local call_translate_position = false
local cursor_start_x, cursor_start_y
local cursor_translate_x, cursor_translate_y
local moving = false
local PANEL = {PecanEditor = true}
local speed = 1
local translate_position = vector_origin
local think_time = RealTime()
local thinking_binds =... |
return [[
#81-717
[cz]
#Cameras:
Train.717.Breakers = Jističe
Train.717.VB = Baterie a OŘO
Train.717.VBD = VBD a UPPS
Train.717.VRD = VRD
Train.717.SOSD = SOSD
Train.717.PUAV = PUAV (RAV)
Train.717.PA = PA (Vlaková aparatura)
Train.717.PAScreen = Obrazovka PA
Train.714.Shunt ... |
nadmin:RegisterPerm({
title = "Manage Server Settings"
})
if CLIENT then
nadmin.serverConfig = nadmin.serverConfig or {}
nadmin.serverConfig.options = nadmin.serverConfig.options or {}
function nadmin.serverConfig:RegisterOption(cfg)
end
local content
nadmin.menu:Regis... |
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local S = E:GetModule('Skins')
--Cache global variables
--Lua functions
local _G = _G
--WoW API / Variables
--Global variables that we don't cache, list them here for mikk's FindGlobals script
-- GLOBALS:
local fu... |
-- Announce Scaleform to every players
local announce_title = "Flash Info" -- Set the title of the announcement here.
local AnnouncementScaleform
Scaleform = {}
local scaleform = {}
scaleform.__index = scaleform
function StartDraw(time)
Citizen.CreateThread(function()
local fading = false
while not Announcement... |
--[[
swords.register_sword("swords:sword", {
description = "A basic sword",
texture = "swords_sword.png",
damage = {fleshy = 3},
base_speed = 1.5,
glow = 1
})
]]--
function swords.register_sword(name, def)
minetest.register_tool(name, {
description = def.description,
inventory_image = def.texture,
g... |
local E = require "luevt"
local dispatcher1 = E.new()
dispatcher1:add_listener("TEST_DISPATCH_FUNC", function(args)
print("listener is fucntion, args =", args)
end)
dispatcher1:add_listener("TEST_DISPATH_CO", coroutine.create(function(args)
while true do
print("listener is coroutine, args =", args)
coroutine.yie... |
-----------------------------------------------------------------------------------------------------------------------------------------
-- VRP
-----------------------------------------------------------------------------------------------------------------------------------------
local Tunnel = module("vrp","lib/Tunn... |
local class = require("pl.class")
local ChannelAudience = require("core.ChannelAudience")
---@class AreaAudience : ChannelAudience
local M = class(ChannelAudience)
---@return Character[]
function M:getBroadcastTargets()
if not self.sender.room then return {} end
local area = self.sender.roo... |
--[[
RD2 BeamVars Extension
]]
AddCSLuaFile("BeamVarsExtensions/rd2.lua")
local meta = FindMetaTable( "Entity" )
-- Return if there's nothing to add on to
if (!meta) then return end
-- SetOOO (3 cap o's)
-- sets off/on/overdrive
if (SERVER) then
meta[ "SetOOO" ] = function ( self, value )
... |
--[[
LuCI - Network model - 6to4 & 6in4 protocol extension
Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
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... |
addIcon("dancing", {outfit={mount=0,feet=0,legs=0,body=176,type=128,auxType=0,addons=3,head=48}, hotkey=nil, text="dance"}, macro(80, "", function()
turn(0)
schedule(20, function() turn(1) end)
schedule(40, function() turn(2) end)
schedule(60, function() turn(3) end)
end))
addIcon("Random Outfit", {outfit={mo... |
local register = 1
local constant = 2
local register_or_constant = 3
local upval = 4
local bool = 5
local floating_byte = 6
local jump_pc_offset = 7
local other = 8
local param_types = {
register = register,
constant = constant,
register_or_constant = register_or_constant,
upval = upval,
bool = bool,
floa... |
if (SERVER) then
AddCSLuaFile( "shared.lua" )
SWEP.Weight = 5
SWEP.AutoSwitchTo = false
SWEP.AutoSwitchFrom = false
end
if ( CLIENT ) then
SWEP.DrawAmmo = true
SWEP.DrawCrosshair = false
SWEP.ViewModelFOV = 82
SWEP.ViewModelFlip = false
SWEP.CSMuzzleFlashes = fals... |
return PlaceObj("ModDef", {
"title", "Disable Achievements",
"id", "ChoGGi_DisableAchievements",
"steam_id", "1461207873",
"pops_any_uuid", "28dfa6d1-4f1f-460d-b2db-676a56bafb13",
"lua_revision", 1007000, -- Picard
"version", 2,
"version_major", 0,
"version_minor", 2,
"author", "ChoGGi",
"code", {
"Code/Scr... |
Config = {}
Config.DrawDistance = 100.0
--language currently available EN and SV
Config.Locale = 'en'
Config.Zones = {
PoliceDuty = {
Pos = { x = 442.5, y = -982.1, z = 29.600 },
Size = { x = 1.5, y = 1.5, z = 1.5 },
Color = { r =... |
print '-- basics'
-- reused in following tests
_G.simple = {
['nil'] = nil,
['boolean'] = true,
['number'] = 253,
['string'] = 'and my head is my only house unless it rains.',
['empty-table'] = {},
['simple-array'] = {1, 2, 3, 4, 5},
['simple-dict'] = {a=1, b=2, c=3},
['function'] = fun... |
if pcall(require, 'lldebugger') then
require('lldebugger').start()
end
local rect = {0, 0, 64, 64}
function love.update(dt)
rect[1] = rect[1] + 10 * dt
rect[2] = rect[2] + 10 * dt
end
function love.draw()
love.graphics.rectangle('fill', rect[1], rect[2], rect[3], rect[4])
end
function love.keypressed()
... |
animationguiline = class:new()
animationlist = {}
local toenter = {}
--TRIGGERS:
table.insert(toenter, {name = "mapload",
t = {
t="trigger",
nicename="on map load",
entries={
}
}
})
table.insert(toenter, {name = "animationtrigger",
t = {
t="trigger",
nicename="animation trigger",
entries={
{... |
module 'mock'
--------------------------------------------------------------------
CLASS: AnimatorValueTrack ( AnimatorTrack )
:MODEL{}
CLASS: AnimatorValueKey ( AnimatorKey )
:MODEL{}
--------------------------------------------------------------------
CLASS: AnimatorKeyNumber ( AnimatorValueKey )
:MODEL{
Fiel... |
return {
short_music_name = "song10",
bpm = 752,
offset_time = 0,
music_name = "bgm-song10",
left_track = {
{
begin_time = "1.196808",
key_flag = "K_LEFT",
end_time = "1.196808"
},
{
begin_time = "3.909575",
key_flag = "K_LEFT",
end_time = "3.909575"
},
{
begin_time = "6.462766",
... |
--[===[DOC
= intersecationtab
[source,lua]
----
function intersecationtab( firstTab, secondTab, selectFunc ) --> intersecationTab
----
Creates the `intersecationTab` table that contain the keys shared by the
`firstTab` and `secondTab` tables. By default, the value of the first table
will be used as value in the resu... |
-- Arrays are call be ref, therefore assignment of array members work without write-back
-- I assume that _G members are different from global and just represent a runtime variable(maybe it is _G.global)
-- also _G.global somehow does not survive saving the map, it seems factorio doc is wrong
-- remember this when inv... |
local decoderNet = {}
function decoderNet.model(params, enc)
local optionLSTM = nn.SeqLSTM(params.embedSize, params.rnnHiddenSize)
optionLSTM.batchfirst = true
local optionEnc = {}
local numOptions = 100
for i = 1, numOptions do
optionEnc[i] = nn.Sequential()
optionEnc[i]:add(nn.Se... |
function onPre(v)
vee.putreg(v, ESP, 32, 40000000)
vee.putreg(v, EAX, 32, 80808080)
for i=0,4096 do
vee.putmem(v, 80808080+i, 8, 20)
end
end
function onPost(v)
esp = vee.getreg(v, ESP, 32)
if esp ~= nil and esp > 80808080-16 and esp < 80808080+16 then
if vee.getexit(v) == ... |
local UnsubAck = require "lumina.protocol.packet.unsuback"
local test_utils = require "spec.test_utils"
local function round_trip_encode(v)
local source = test_utils.generate_source(assert(v:encode_packet()))
local back = assert(UnsubAck.decode_packet(source))
assert.are.same(v, back)
end
describe("UnsubAc... |
--------------------------------
-- @module TableView
-- @extend ScrollView,ScrollViewDelegate
-- @parent_module cc
--------------------------------
-- @function [parent=#TableView] updateCellAtIndex
-- @param self
-- @param #long long
--------------------------------
-- @function [parent=#TableView] setVer... |
BaseEntity = require("entities.core.baseentity")
NPCBullet = class("NPCBullet", BaseEntity)
NPCBullet.image = loadImage("sprites/bullet.gif")
function NPCBullet:initialize()
BaseEntity.initialize(self)
self.type = "BULLET"
self.nextDie = 5
playSound("smash.wav") -- fuck yo sound
end
function NPCBul... |
-- Copyright (c) 2010 Aleksey Yeschenko <aleksey@yeschenko.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 use, c... |
require 'nngraph'
require 'nn';
-- Part (a)
a = nn.Linear(4,2)()
a1 = nn.Power(2)(a)
a2 = nn.Tanh()(a1)
b = nn.Linear(5,2)()
b1 = nn.Power(2)(b)
b2 = nn.Sigmoid()(b1)
c = nn.CMulTable()({a2,b2})
d = nn.Identity()()
e = nn.CAddTable()({c,d})
q1 = nn.gModule({a,b,d},{e})
--Part (b)
x = torch.randn(4)
y = torch.randn(5)
... |
local redis = require 'vendor.redis-lua.redis'
RedisClient = {}
-- RedisClient constructor
function RedisClient.new()
local self = {}
local client = redis.connect('127.0.0.1', 6379)
function self.load()
end
function self.ping()
return client:ping()
end
function self.insert_score(score)
time = ... |
intcore_improve_autoattack_lua = class({})
LinkLuaModifier( "intcore_improve_autoattack_modifier", LUA_MODIFIER_MOTION_NONE )
function intcore_improve_autoattack_lua:OnUpgrade()
if IsServer() then
if self:GetToggleState() then
self:GetCaster():RemoveModifierByName("intcore_improve_autoattack_modifier")
self:A... |
fx_version 'cerulean'
game 'gta5'
author 'MiiMii1205'
description 'A simple script for enabling/disabling ragdolls on any aimed ped'
version '1.0.0'
repository 'https://github.com/MiiMii1205/ragdoller'
client_scripts { 'Scripts/rag.lua', 'Scripts/pedTag.lua' }
export 'CheckRagdoller' |
local path = (...):match('(.-)[^%./]+$')
return {
name = 'timer',
description = 'Provides an interface to the user\'s clock.',
types = {
},
functions = {
{
name = 'getAverageDelta',
description = 'Returns the average delta time (seconds per frame) over the last secon... |
local status_ok, neogen = pcall(require, "neogen")
if not status_ok then
return
end
neogen.setup({
snippet_engine = "luasnip",
languages = {
cs = {
template = {
annotation_convention = "xmldoc",
}
}
}
})
local wk = require("which-key")
wk.register({
n = {
name = "Generate documentation",
f = { ... |
local QuickAuctions = select(2, ...)
local Manage = QuickAuctions:NewModule("Manage", "AceEvent-3.0")
local L = QuickAuctions.L
local status = QuickAuctions.status
local reverseLookup, postQueue, scanList, tempList, stats = {}, {}, {}, {}, {}
local totalToCancel, totalCancelled = 0, 0
Manage.reverseLookup = reverseLoo... |
-- 官方模块
local ngx = require "ngx"
-- 自定义库模块
local http = require "http"
local urlencode = require "utils".urlencode
-- 应用模块
local config = require "config"
local response = require "response"
-- 将函数缓存下来
local ngx_encode_base64 = ngx.encode_base64
local _M = {}
_M._VERSION = "0.1"
_M.name = "orientdb"
local host ... |
green = Color.new(0, 255, 0)
yellow = Color.new(255, 255, 0)
cyan = Color.new(0, 255, 255)
monoSpaced = Font.createMonoSpaced()
proportional = Font.createProportional()
proportionalBig = Font.createProportional()
proportional:setPixelSizes(0, 32)
proportionalBig:setPixelSizes(0, 64)
monoSpaced:setPixelSizes(0, 14)
t = ... |
return function(utf8)
local cl = utf8.regex.compiletime.charclass.builder
return function(str, c, bs, ctx)
return cl.new():with_codes(c), utf8.next(str, bs) - bs
end
end
|
-- Theme is based on https://github.com/lcpz/awesome-copycats.git Powerarrow-dardk
local theme_assets = require("beautiful.theme_assets")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local gfs = require("gears.filesystem")
local gcol = require("gears.color")
local surface = requi... |
-- scaffolding entry point for zlib
return dofile("zlib.lua")
|
local math = require("math")
local os = require("os")
local random = {}
math.randomseed(os.time())
function random.string(length, allowed_chars)
length = length or 16
allowed_chars = allowed_chars or "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
local randomString = ''
for _ = 1, length do... |
--[[
/////// //////////////////
/////// PROJECT: MTA iLife - German Fun Reallife Gamemode
/////// VERSION: 1.7.2
/////// DEVELOPERS: See DEVELOPERS.md in the top folder
/////// LICENSE: See LICENSE.md in the top folder
/////// /////////////////
]]
-- #######################################
-- ## Project: MTA i... |
--settings.lua
local enable_connect_particles = {
type = "bool-setting",
name = "ret-enable-connect-particles",
setting_type = "runtime-global",
default_value = true,
order = "a-a"
}
local enable_failure_text = {
type = "bool-setting",
name = "ret-enable-failure-text",
setting_type = "runtime-global",
defaul... |
local BodyMetadata = require("octo.model.body-metadata").BodyMetadata
local TitleMetadata = require("octo.model.title-metadata").TitleMetadata
local autocmds = require "octo.autocmds"
local config = require "octo.config"
local constants = require "octo.constants"
local folds = require "octo.folds"
local gh = require "o... |
module("luci.controller.dect", package.seeall)
function index()
if not nixio.fs.access("/usr/sbin/dectmngr2") then
return
end
local users = { "admin", "support", "user" }
local page
for k, user in pairs(users) do
page = node(user, "services", "dect")
page.target = template("dect_status")
page.title = ... |
-- The MIT License (MIT)
-- Copyright (c) 2016 Colin Hall-Coates <yo@oka.io>
-- 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 righ... |
local cqs = require"cqueues"
local api = require"lacord.api"
local shard = require"lacord.shard"
local logger = require"lacord.util.logger"
local util = require"lacord.util"
local mutex = require"lacord.util.mutex"
local promise = require"cqueues.promise"
local signal = require"cqueues.signal"
local emitter = r... |
return function (ipt)
local transf = _G.Flags.Transformations
local x, y, z =
ipt.x,
ipt.y,
ipt.z
--scale
local tr_sc = transf.Scale
x, y, z = x*tr_sc.x, y*tr_sc.y, z*tr_sc.z
--rotate
local ang = transf.Rotate
if ang ~= 0 then
x, y =
... |
function create()
entity = getNewEntity("baseLuaEntity")
sizeMultiplier = getGlobalValue("sizeMultiplier")
setEntityLabel(entity, "student")
destinations = {{555, 566, 663}, {580, 654, 782}}
heights = {432, 266}
floor = rand() % 2 + 1
spawn = rand() % 3 + 1
door = rand() % 3 + 1
addE... |
local which_key_ok, which_key = pcall(require, "which-key")
if not which_key_ok then
vim.notify("which-key not found. Custom keybinds are disabled.", "warn")
return
end
-- Remap space as leader key
vim.api.nvim_set_keymap("", "<Space>", "<Nop>", { noremap = true, silent = true })
vim.g.mapleader = " "
vim.g.mapl... |
local function init()
require 'TheAltF4Stream.vim'.init()
require 'TheAltF4Stream.packer'.init()
end
return {
init = init,
}
|
---------------------------------------------------------------------------
--- Rules for clients.
--
-- This module applies @{rules} to clients during startup (via @{client.manage},
-- but its functions can be used for client matching in general.
--
-- All existing `client` properties can be used in rules. It is also ... |
commun = {}
commun.server = "spectre"
commun.setup = function(ssid, password)
wifi.sta.config(ssid, password)
end
commun.post = function(data)
http.put('http://'..commun.server..':3000/api/v1/devices',
'Content-Type: text/plain\r\nuid: 2zCpe4HRSho78T3\r\niv: ivivivivivivivi',
data,
fu... |
packs = {{
name = "First pack",
levels = 15
}, {
name = "Second pack",
levels = 15
}}
|
CONTOUR = {
Sharp = 101,
Glamour = 102,
Nose = 103,
Highlight = 104,
Round = 105,
Square = 106,
Long = 107
}
BLUSH = {
Light1 = 101,
Light2 = 102,
Edge1 = 103,
Edge2 = 104,
Edge3 = 105,
Edge4 = 106,
Apple1 = 107,
Apple2 = 108,
Apple3 = 109,
Apple4 = 110
}
EYE_COLOR = {
Oasis = 1,
Moist = 2,
Cryst... |
slot0 = class("ActivityMediator", import("..base.ContextMediator"))
slot0.register = function (slot0)
slot0.contextData.singleActivity = true
slot0:bind(ActivityMediator.EVENT_OPERATION, function (slot0, slot1)
slot0:sendNotification(GAME.ACTIVITY_OPERATION, slot1)
end)
slot0.bind(slot0, ActivityMediator.EVENT_... |
-- Decompiled using luadec 2.2 rev: for Lua 5.2 from https://github.com/viruscamp/luadec
-- Command line: A:\Steam\twd-definitive\scripteditor-10-31-20\s1_lighting_improvements\WDC_pc_WalkingDead101_data\env_clementineHouseExterior_temp.lua
-- params : ...
-- function num : 0 , upvalues : _ENV
require("Relighting.l... |
require('init');
require('gnuplot');
--[[
Plot Relative Error Criterion
--]]
function main()
local criterion = nnst.ErrorCriterionRelative(0.8, 0.16)
local e = 10
local xs = torch.linspace(e-12, e+12, 200)
local f = xs:clone()
f:apply(function (x)
return criterion:forward(torch.Tensor... |
function px(amount)
return amount.."px"
end
Lucene.ui = {}
Lucene.ui.sides = {} -- Holds all the different UI sides
Lucene.window = {}
Lucene.window.width, Lucene.window.height = getMainWindowSize()
-- Import them files
Lucene.import("ui/containers")
Lucene.import("ui/styles")
Lucene.import("ui/sides/left")
Luce... |
------------------------------------------------------------------
-- common.lua
-- Author : ChenJM
-- Version : 1.15
-- Date :
-- Description: 通用类,包含字体,颜色,适配位置等,
------------------------------------------------------------------
require("lib.ZyImage")
pWinSize=CCDirector:sharedDirecto... |
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getGlobalStorageValue(22549) ~= -1 then
s = string.explode(getGlobalStorageValue(22549), ",")
for i = 1, #s do
if getCreatureName(cid) == s[i] then
doPlayerSendTextMessage(cid, 20, "You are already registered in the Golden Aren... |
-- Read gpio pin
gpio.mode(3, gpio.INPUT);
level = gpio.read(3); -- read gpio level
print(level);
|
--行动前 阿尔
function onStart(target, buff)
if GetFightData().fight_id == 10100103 then
target[1211] = 200
target[1723] = 40 --初始能量
end
end
--大回合开始前
function afterAllEnter(target, buff)
if GetFightData().fight_id == 10100402 and GetFightData().round == 1 and target.side == 2 then
AddBat... |
local w = {}
w.Timer = 0
w.Drawing = {}
w.Size = 360/12
w.Scale = 20
w.Height = 50
function w:Init(n)
self.Music = love.audio.newSource(n, "static")
self.Music:setLooping(true)
self.Data = love.sound.newSoundData(n)
self.SampleRate = self.Data:getSampleRate()
end
function w:Update(dt)
self.Ti... |
local M = {}
-- define vars
-- assets dir
-- ----------------------------------------------------------------------------
-- private functions
-- ----------------------------------------------------------------------------
-- ----------------------------------------------------------------------------
-- public... |
local SwiftNode = require 'swiftnode'
local table = require 'table'
describe('Test Swift code generator.', function()
it('should work', function()
local result = 42
assert.is.equals(42, result)
end)
end)
|
--[[
Cops and Robbers: Vehicle Resource
Created by RhapidFyre
Contributors:
-
Created 12/29/2019
--]]
resource_manifest_version '05cfa83c-a124-4cfa-a768-c24a5811d8f9'
ui_page "nui/ui.html"
dependency 'cnrobbers'
files {
"nui/ui.html",
"nui/ui.js",
"nui/ui.css"
}
client_scripts {
"cl_config.lu... |
--パワー・ツール・ブレイバー・ドラゴン
--
--Script by Trishula9
function c100427005.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100427005,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE... |
local block = [[
Extract lines started with tags > or <
line 1
>line 2
line 3
> line 4
line 5
< line 6
< line 7
line > 8
line < 9
line <10>
I need to extract lines 2, 4, 6 and 7
]]
for tag, line in block:gmatch('\n([><])%s?(%C+)') do
print(tag, line)
end
|
--[[ Copyright (c) 2009 Peter "Corsix" Cawley
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, dis... |
function on_activate(parent, ability)
local targets = parent:targets():hostile():attackable()
local targeter = parent:create_targeter(ability)
targeter:set_selection_attackable()
targeter:add_all_selectable(targets)
targeter:add_all_effectable(targets)
targeter:activate()
end
function on_targe... |
local wibox = require("wibox")
local dpi = require("beautiful").xresources.apply_dpi
local clickableContainer = require("widgets.general.clickable-container")
-- Return function to create a widget group
return function(widgets, margins, height, spacing, clickable, vertical, bgColor)
-- Create layout widget which con... |
module(..., package.seeall)
NODE = {
fields = [[
-- Think twice before editing this ------------------------
fields = {0.0, proto="concat", activate="lua"}
title = {0.1 }
category = {0.2 }
actions = {0.3, proto="concat", activate="lua"}
action_hooks = {0.31, proto="concat", activ... |
local kong = kong
local find = string.find
local fmt = string.format
local CONTENT_TYPE = "Content-Type"
local ACCEPT = "Accept"
local TYPE_JSON = "application/json"
local TYPE_GRPC = "application/grpc"
local TYPE_HTML = "text/html"
local TYPE_XML = "application/xml"
local JS... |
local math = require_relative("math")
local Math = {}
Math.min = math.min
Math.max = math.max
Math.sqrt = math.sqrt
Math.modf = math.modf
function Math.clamp(n, min, max)
return Math.min(Math.max(n, min), max)
end
return Math
|
--------------------------------
-- @module EaseBounceOut
-- @extend ActionEase
-- @parent_module cc
---@class cc.EaseBounceOut:cc.ActionEase
local EaseBounceOut = {}
cc.EaseBounceOut = EaseBounceOut
--------------------------------
---
---@param action cc.ActionInterval
---@return cc.EaseBounceOut
function EaseBou... |
object_mobile_hologram_moncal_male = object_mobile_hologram_shared_moncal_male:new {
}
ObjectTemplates:addTemplate(object_mobile_hologram_moncal_male, "object/mobile/hologram/moncal_male.iff")
|
class 'RacingCheckpoint'
function RacingCheckpoint:__init(number, transform, start, finish, blueprint)
self.number = number
self.transform = transform
self.start = start
self.finish = finish
self.effect = nil
if SharedUtils:IsClientModule() then
self.effect = EntityManager:CreateEntity... |
--------------------------------
-- @module TransitionFlipX
-- @extend TransitionSceneOriented
-- @parent_module cc
---@class cc.TransitionFlipX:cc.TransitionSceneOriented
local TransitionFlipX = {}
cc.TransitionFlipX = TransitionFlipX
--------------------------------
--- Creates a transition with duration and inco... |
#!/usr/bin/env lua
function myfunction ()
print(debug.traceback("Stack trace"))
print(debug.getinfo(1))
print("Stack trace end")
return 10
end
myfunction ()
print(debug.getinfo(1))
function newCounter ()
local n = 0
local k = 0
return function ()
k = n
n = n + 1
re... |
--Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf.protobuf"
local PBVector3_pb = require("Protol.PBVector3_pb")
module('Protol.SyncPlayerPosReq_pb')
SYNCPLAYERPOSREQ = protobuf.Descriptor();
SYNCPLAYERPOSREQ_PLAYERID_FIELD = protobuf.FieldDescriptor();
SYNCPLAYERPOSREQ_POS_FIELD = protobuf.F... |
--[[
Copyright (c) 2019, Vsevolod Stakhov <vsevolod@highsecure.ru>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law ... |
local Panel = { }
Panel.x = 0
Panel.y = 0
Panel.width = 100
Panel.height = 100
Panel.backgroundColor = lui.theme.color.paneBackground
Panel.borderColor = lui.theme.color.borderInactive
Panel.borderWidth = 1
Panel.cornerRadius = 2
---------------------------------------------------------... |
local M = {}
-- Should we send commands to terminal buffers that we can't currently see?
M.get_term_use_current_tab = function ()
if vim.g.CompileMe_term_use_current_tab == nil then
return true
end
return vim.g.CompileMe_term_use_current_tab
end
-- Should we spawn a new cmd.exe window on Windows?
M.get_term... |
require 'nn'
require 'cunn'
local backend_name = opt.backend
local backend
if backend_name == 'cudnn' then
require 'cudnn'
backend = cudnn
else
backend = nn
end
local net = nn.Sequential()
net = nn.Sequential()
net:add(backend.SpatialConvolution(im_channel, 20, 5, 5))
net:add(nn.SpatialBatchNormalization(20,1... |
object_tangible_collection_rare_pistol_sr_combat = object_tangible_collection_shared_rare_pistol_sr_combat:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_rare_pistol_sr_combat, "object/tangible/collection/rare_pistol_sr_combat.iff") |
if spawners == nil then
_G.spawners = class({}) -- put spawners in the global scope
end
require('spawner_tables')
spawners.dire_unit_count = -1
--thinker that triggers dire spawns, it's called under function GameMode:OnGameRulesStateChange(keys) under events
function dire_thinker()
Timers:CreateTimer(
functio... |
local ran,err = ypcall(function()
plr = game:service'Players'.LocalPlayer
char = plr.Character
mouse = plr:GetMouse()
humanoid = char:findFirstChild("Humanoid")
torso = char:findFirstChild("Torso")
head = char.Head
ra = char:findFirstChild("Right Arm")
la = char:findFirstChild("Left Arm")
rl = char:findFirstChild("Righ... |
---------------------------------------------------------------------------------------------------
-- User story: TBD
-- Use case: TBD
--
-- Requirement summary:
-- [SDL_RC] TBD
--
-- Description: SDL shall not send OnRCStatus notifications to rc registered apps
-- by allocation module via GetInteriorVehicleData
-- In... |
function loadthings()
local txd = engineLoadTXD ( "speeds.txd" )
engineImportTXD ( txd, 1444 )
end
local dxlabel = {
{1692.41, -683.77, 45.4,"120 KM/H"},
{1723.19, -876.78, 57.81 ,"120 KM/H"},
{1671.93, -65.04, 35.92 ,"150 KM/H"},
{1595.1, 92.6, 37.79 ,"180 KM/H"},
{1732.59, 1632.17, 9.16 ,"90 KM/H"},
{457.93, 75... |
return {'kadaster','kadasterkaarten','kadastraal','kadastreren','kadastrering','kadaver','kadaverdiscipline','kaddisj','kade','kadee','kadegeld','kademuur','kaden','kader','kaderakkoord','kaderbrief','kadercursus','kaderen','kaderfunctie','kaderlid','kaderlijnen','kadernota','kaderopleiding','kaderovereenkomst','kaderp... |
Character = {}
Character.__index = Character
function Character:Create(def, map)
-- Look up the entity
local entityDef = gEntities[def.entity]
assert(entityDef) -- The entity should always exist!
local this =
{
mDef = def,
mEntity = Entity:Create(entityDef),
m... |
local AddonName = ...
local L = LibStub("AceLocale-3.0"):NewLocale(AddonName, "deDE")
if not L then return end
L.Updated = "Aktualisiert auf v%s"
L.Pulse = "Pulse"
L.Shine = "Shine" |
local rcvboxes = {
{ -3/16, -3/16, -8/16 , 3/16, 3/16 , -13/32 }, -- the smaller bump
{ -1/32, -1/32, -3/2 , 1/32, 1/32 , -1/2 }, -- the wire through the block
{ -2/32, -1/2 , -.5 , 2/32, 0 , -.5002+3/32 }, -- the vertical wire bit
{ -2/32, -1/2 , -7/16+0.002 , 2/32, -1... |
-- Intents for plot/endgame factions.
-- appease ram checker
-- ns:joinFaction()
local log = require 'log'
local fc = require 'intent.faction-common'
local factions = table.List {
-- TODO take into account how long it'll take to grind up these stats based on
-- character multipliers and stuff
{ name = "The Cov... |
--!strict
--[=[
@class Draw
]=]
local Draw = {}
local thickness = 0.5
local abs = math.abs
local function factorial(n : number) : number
if n == 0 then return 1 end
return n * factorial(n - 1)
end
local function binomial(n : number, i : number) : number
local x : number = nil
x = (factorial(n)) /
(factorial(n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.