content stringlengths 5 1.05M |
|---|
-- Copyright 2016-2022 Christian Hesse. See LICENSE.
-- systemd unit file LPeg lexer.
local lexer = require('lexer')
local token, word_match = lexer.token, lexer.word_match
local P, S = lpeg.P, lpeg.S
local lex = lexer.new('systemd', {lex_by_line = true})
-- Whitespace.
lex:add_rule('whitespace', token(lexer.WHITESP... |
--[[
[] Author: Martynas Petuska
[] E-mail: martynas.petuska@outlook.com
[] Date: January 2018
--]]
---------------- NAMESPACE ----------------
local UI = ADDON.UI;
local UpdateInfo = ADDON.UpdateInfo;
local Sizes = ADDON.Sizes;
local Settings = ADDON.Settings;
-------------------------------------------
---Ch... |
DarkRP.declareChatCommand{
command = "give",
description = "Give money to the player you're looking at.",
delay = 1.5
}
DarkRP.declareChatCommand{
command = "dropmoney",
description = "Drop money on the floor.",
delay = 1.5
}
DarkRP.declareChatCommand{
command = "moneydrop",
description = "Drop ... |
function onBeatHit()
if curBeat == 32 then
setProperty('defaultCamZoom', 0.7);
doTweenAlpha('lightTween', 'vignette2', 0, 1, 'circOut')
end
if curBeat == 160 then
setProperty('defaultCamZoom', 0.9);
doTweenAlpha('lightTween', 'vignette2', 0.7, 1, 'circOut')
end
if curBeat == 192 then
setPropert... |
-- Stormworks Addon Lua Definitions
-- Stormworks v1.4.7 64bit
-- Recommended extension: https://marketplace.visualstudio.com/items?itemName=sumneko.lua
---@diagnostic disable: lowercase-global, unused-local, undefined-global
---Persistent data table saved to the world's save file
g_savedata = {}
server = {}
matrix... |
local utils = {}
utils.predefinedSideLengths = {100,170,140}
utils.predefinedAngle = {55,35, 90}
utils.masterPoint1 = Point.create(0, 0, 0)
utils.masterPoint2 = Point.create(0, 0, 0)
utils.masterPoint3 = Point.create(0, 0, 0)
utils.slavePoint1 = Point.create(0, 0, 0)
utils.slavePoint2 = Point.create(0, 0, 0)
... |
---@class UI.ItemSlot
---@field imgItem CS.UnityEngine.UI.Image @物品图片
---@field txtCount CS.UnityEngine.UI.Text @物品数量
local M = class()
function M:awake()
end
return M |
--[[
-------------------------------------------------------------------------------
Menori
@author rozenmad
2022
-------------------------------------------------------------------------------
]]
--[[--
Camera for 2D scenes.
]]
-- @classmod Camera
local modules = (...):match('(.*%menori.modules.)')
--local Appli... |
local Dictionary = script.Parent
local copy = require(Dictionary.copy)
local Llama = Dictionary.Parent
local t = require(Llama.t)
local function noUpdate(value)
return value
end
local function call(callback, ...)
if type(callback) == "function" then
return callback(...)
end
end
local optionalCallbackType = t.o... |
return {
Common = {
Success = 100,
NotReady = 200,
},
}
|
-- @Author:pandayu
-- @Version:1.0
-- @DateTime:2018-09-09
-- @Project:pandaCardServer CardGame
-- @Contact: QQ:815099602
local config = require "game.config"
local math_random = require "include.random"
local table_insert = table.insert
local math_floor = math.floor
local rankMgr = require "manager.rankMgr"
local min ... |
local CRC32 = {};
local function cache(table,fn)
return setmetatable(table,{
__index=function(t,k)
local val = fn(k);
t[k] = val;
return val;
end
})
end
local function computeByteTableFunction(polynomial)
return function(byte)
local crc = byte;
for _=1,8 do
... |
--[[
Copyright (C) 2013 PilzAdam
Copyright (C) 2020 lortas
Copyright (C) 2020 Treer
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all copies.
... |
sendFileContents = function(conn, filename)
if file.open(filename, "r") then
--conn:send(responseHeader("200 OK","text/html"));
repeat
local line=file.readline()
if line then
conn:send(line);
end
until not line
file.close();
... |
PrivateRoomConstant = class()
-- 私人房类型
PrivateRoomConstant.PRIVATE_ROOM_TYPE_MONEY = 0; -- 银币房
PrivateRoomConstant.PRIVATE_ROOM_TYPE_CRYSTAL = 1; -- 金条房
PrivateRoomConstant.PRIVATE_ROOM_TYPE_SCORE = 3; -- 积分房
PrivateRoomConstant.UNIT_MAP = {
[PrivateRoomConstant.PRIVATE_ROOM_TYPE_MONEY] = "银币",
[Privat... |
local SEE_DIST = 30
FindFlower = Class(BehaviourNode, function(self, inst)
BehaviourNode._ctor(self, "FindFlower")
self.inst = inst
end)
function FindFlower:DBString()
return string.format("Go to flower %s", tostring(self.inst.components.pollinator.target))
end
function FindFlower:Visit()
if sel... |
object_tangible_furniture_nym_themepark_nym_themepark_plant_07 = object_tangible_furniture_nym_themepark_shared_nym_themepark_plant_07:new {
}
ObjectTemplates:addTemplate(object_tangible_furniture_nym_themepark_nym_themepark_plant_07, "object/tangible/furniture/nym_themepark/nym_themepark_plant_07.iff")
|
--[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.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-2.0
$Id$
]]--
modu... |
--#region GLOBAL VARIABLES
expomod = {}
expomod.gameui = {
model=2,
nbmodel=5
}
expomod.modname = minetest.get_current_modname()
expomod.modpath = minetest.get_modpath(expomod.modname)
expomod.modstorage = minetest.get_mod_storage()
print ('###############################################')
print ('# EXPO START')
p... |
local list = {}
-- apply function to all elements in an array and return result
function list.map(fun, arr)
assert(fun)
assert(arr)
local results = {}
for i,val in ipairs(arr) do
results[i] = fun(val)
end
return results
end
return list
|
require("prototypes.fluid.lubricant")
data:extend(
{
{
type = "fluid",
name = "refined-lubricant",
default_temperature = 25,
heat_capacity = "0.1KJ",
base_color = {r=0.32, g=0.32, b=0.03},
flow_color = {r=0.75, g=0.75, b=0.31},
max_temperature = 100,
icon = "__spicy-teeth-core_assets_... |
-- Copyright (C) Yuansheng Wang
local lru_new = require("resty.lrucache").new
local setmetatable = setmetatable
local getmetatable = getmetatable
local type = type
-- todo: support to config it in YAML.
local GLOBAL_ITEMS_COUNT= 1024
local GLOBAL_TTL = 60 * 60 -- 60 min
local PLUGIN_TTL = 5 * 6... |
local function colorscheme_switcher(opts)
local pickers, finders, previewers, actions, action_state, utils, conf
if pcall(require, "telescope") then
pickers = require("telescope.pickers")
finders = require("telescope.finders")
previewers = require("telescope.previewers")
actions = require("telescope.actions")... |
return {
[0x00] = "NOP",
[0x01] = { nn = { nn = "LD BC,nn" } },
[0x02] = "LD (BC),A",
[0x03] = "INC BC",
[0x04] = "INC B",
[0x05] = "DEC B",
[0x06] = { n = "LD B,n" },
[0x07] = "RLCA",
[0x08] = "EX AF,AF'",
[0x09] = "ADD HL,BC",
[0x0a] = "LD A,(BC)",
[0x0b] = "DEC BC",
[0x0c] = "INC C",
[0x0d] = "DEC C",... |
--- The class to handle web elements
--
-- @classmod Element
local ElementClient = require("web-driver/element-client")
local ElementSet = require("web-driver/element-set")
local Searchable = require("web-driver/searchable")
local pp = require("web-driver/pp")
local base64 = require("base64")
local Element = {}
local ... |
function md5zip(filename)
jam_print("md5zip: Calculating " .. filename .. "...")
local md5 = require 'md5'
local struct = require 'struct'
local ziparchive = require 'ziparchive'
local archive = ziparchive.open(filename)
if not archive then
return nil
end
local md5sum = md5.new()
for index = 1, archive:fi... |
-- game application for state: stage_intro
-- used by main and itest_main
-- this really only defines used gamestates
-- and wouldn't be necessary if we injected gamestates from main scripts
local picosonic_app_base = require("application/picosonic_app_base")
local stage_intro_state = require("stage_intro/stage_int... |
Citizen.CreateThread(function()
SetDiscordAppId(Options.AppID)
SetDiscordRichPresenceAsset(Options.AssetName)
SetDiscordRichPresenceAssetText("")
while true do
SetRichPresence(Discord:GetStatus())
Citizen.Wait(2500)
end
end) |
-- This script needs to be loaded before other scripts that use it.
local PlayerDefaults = {
__index = {
initialize = function(self)
self.ActiveModifiers = {
JudgmentGraphic = "!!default!!",
ComboColor = color("#FFFFFF"),
ComboColorstring = "White",
HideBG = "Nope",
FilterPlayer = "Nope",
... |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('XTemplate', {
group = "InGame",
id = "PhotoMode",
PlaceObj('XTemplateWindow', {
'__context', function (parent, context) return PhotoObjectCreateAndLoad() end,
'__class', "XDialog",
'InitialMode', "properties",
'InternalModes', "prop... |
local cmp = require('cmp')
local t = function(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
end
cmp.setup({
snippet = {
expand = function(args) vim.fn["UltiSnips#Anon"](args.body) end,
},
mapping = {
["<Tab>"] = cmp.mapping({
c = function(fallback)
if cmp.visible() ... |
--[[
Author: Noya
Date: 9.1.2015.
Plays the slardar_amp_damage particle and destroys it later
]]
function AmplifyDamageParticle( event )
local target = event.target
local location = target:GetAbsOrigin()
local particleName = "particles/units/heroes/hero_slardar/slardar_amp_damage.vpcf"
-- Particle. Need to wait ... |
local paths = require 'paths'
local transform = require 'data/transforms'
local M = {}
local imagenet50k = torch.class('sr.imagenet50k', M)
function imagenet50k:__init(opt, split)
self.opt = opt
self.split = split
self.scale = self.opt.scale
self.dataSize = 50000
self.nVal = 5 ... |
function melee_kill(event)
--PrintTable(event)
local target = event.target
local caster = event.caster
local table_toBeKilled = table_npc_values[NPC_TO_BE_KILLED]
if target:GetUnitName() == NPC_TO_BE_KILLED then
--particles
local blood_particle = ParticleManager:CreateParticle("particles/units/h... |
help(
[[
This module loads the lua interpretor.
]])
add_property("type_","script")
local version = "5.1.4.6"
local base = pathJoin("/software6/apps/lua/", version)
whatis("(Website________) http://www.lua.org/")
prepend_path("PATH", pathJoin(base, "bin"))
prepend_path("MANPATH", pathJoin(base, "ma... |
local skynet = require "skynet"
local socket = require "skynet.socket"
local socketchannel = require "skynet.socketchannel"
local table = table
local string = string
local assert = assert
local redis = {}
local command = {}
local meta = {
__index = command,
-- DO NOT close channel in __gc
}
--------... |
local StateManager = require('src/states/StateManager')
local SoundManager = require('src/SoundManager')
function TitleState()
local self = State()
local shouldDrawPress = true
local timeSinceLastDrawPressChange = 0
function self.update(dt)
timeSinceLastDrawPressChange = timeSinceLastDrawPre... |
--- === cp.ui.Slider ===
---
--- Slider Module.
local require = require
local axutils = require("cp.ui.axutils")
local Element = require("cp.ui.Element")
local Slider = Element:subclass("cp.ui.Slider")
--- cp.ui.Slider.matches(element) -> boolean
--- Function
--- Checks if the provided `hs._asm.axuiele... |
--------------------------------------------------------------------------
-- This class holds the "cosmic" class. It is responsible for initializing
-- global variables used in Lmod. It remembers the default values as well as
-- the current values. This class exists to make it easier to know when a
-- site is using ... |
return _csharp_getType("system.LuaTimeSpan"); |
for index, force in pairs(game.forces) do
local technologies = force.technologies
local recipes = force.recipes
recipes["atomic-cannon-shell"].enabled = technologies["californium-processing"].researched
--if mods["SchallTankPlatoon"] then
--recipes["atomic-autocannon-shell"].enabled = technologies["califor... |
-- Project: Ice
--
-- Version: 1.0
--
-- Author: Graham Ranson
--
-- Support: www.monkeydeadstudios.com or www.grahamranson.co.uk
--
-- Copyright (C) 2011 MonkeyDead Studios Limited. All Rights Reserved.
version = 1.0
-- INCLUDES --
local json = require( "json" )
require( "sqlite3" )
-- LOCAL FUNCTIONS --
local ... |
local t = setmetatable({ name="test" },
{
__index=function(self, k)
if k == "metaname" then return "fromindex" end
if k == "tabval" then return setmetatable({1234},
{__index={inner=true}}) end
end,
})
assert(t.metaname == "fromindex")
assert(#t.tabval == 1, #t.tabval)
assert(t... |
local spy = require("luassert.spy")
local util = require("luassert.util")
local match = require("luassert.match")
local assert = require("luassert.assert")
local namespace = require("luassert.namespaces")
local SELF_STATE_KEY = "__self_state"
local SPY_STATE_KEY = "payload"
local function mod_self(state, _, level)
... |
-- えも側、共通アクション
local o = require "talks.o"
local _ = require "talks.word_dic"
local builder = require "talks.builder"
local えも={}
local function SEL(talk, array)
local C, S, T = talk.get()
C(1, 150)
local entry = o.SEL(array)
if entry then return entry(S,T) end
end
local 評価オチ = {
function(S,T... |
local Plugin = script.Parent.Parent.Parent.Parent
local Libs = Plugin.Libs
local Roact = require(Libs.Roact)
local RoactRodux = require(Libs.RoactRodux)
local Utility = require(Plugin.Core.Util.Utility)
local Constants = require(Plugin.Core.Util.Constants)
local ContextGetter = require(Plugin.Core.Util.ContextGetter)... |
{data={name="HexGun", author="Maguns siiftun1857 Frankline"}, blocks={
{0x132e28, {-5.774, 0}, command={faction=1257}},
{0x132e2b, {-2.887, -5}, 3.142},
{0x132e2b, {2.887, -5}},
{0x132e2b, {5.773, 0}, -3.142},
{0x132e2b, {2.887, 5}},
{0x132eed, {6.495, 11.25}, 1.047, bindingId=2},
{0x132e6f... |
-- Program to solve Two-Fluid equations
Pi = Lucee.Pi
log = Lucee.logInfo
-- decomposition object to use
decomp = DecompRegionCalc2D.CartGeneral {}
-- global parameters
gasGamma = 5./3.
elcCharge = -1.0
ionCharge = 1.0
ionMass = 1.0
elcMass = ionMass/25.0
epsilon0 = 1.0
mu0 = 1.0
lightSpeed = 1/math.sqrt(epsilon0*mu0... |
Reflecteer = GameObject:extend()
function Reflecteer:new(area, x, y, opts)
Reflecteer.super.new(self, area, x, y, opts)
local direction = table.random({-1, 1})
self.x = gw/2 + direction*(gw/2 + 48)
self.y = random(16, gh - 16)
self.w, self.h = 16, 16
self.shape = HC.circle(self.x, self.y,... |
return {
{"x1","x1","x1","x1","x1","x1","x1","x1","x1","x1","x1","x1","x1","x1","x1","x1","x1","x1","x1","x1","x1","x1","x1","x1","x1"},
{"x1","f5","f5","f5","f5","f5","f5","f5","f5","f5","f5","f5","f5","f5","f5","f5","f5","f5","f5","f5","f5","f5","f5","f5","x1"},
{"x1","f5","f5","f5","f5","... |
-- Volume Control
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local naughty = require("naughty")
-- compatibility fallbacks for 3.5:
local timer = gears.timer or timer
local spawn = awful.spawn or awful.util.spawn
local watch = awful.spawn and awful.spawn.with_line_call... |
player_manager.AddValidModel( "PMC3_07", "models/player/PMC_3/PMC__07.mdl" ) list.Set( "PlayerOptionsModel", "PMC3_07", "models/player/PMC_3/PMC__07.mdl" ) |
--[[
-- Copyright(c) 2018-2025, 武汉舜立软件 All Rights Reserved
-- brief LUA模块加载入口, 注意本文件的精简, 将各个模块初始化动作放在各自模块
-- @author 李绍良
-- note 1.本文件头引用必须为内置模块!
-- 2.第一.加载本文件, C部分并未完全准备好,不得胡乱引用头文件
-- 3.第二.调用setup函数, 仅可以调用配置函数 及 设置各个模块参数
-- 4.第三.调用init函数, C部分完全准好了, 可以调用所有接口
-- 5.第四.软件主生命期
-- 6.第五.软件退出时,调用quit函数... |
SWEP.Base = "weapon_base";
SWEP.PrintName = "COI Base";
SWEP.SwayScale = 0;
function SWEP:Attack()
local bull = { };
bull.Attacker = self.Owner;
bull.Damage = self.Primary.Damage or 10;
bull.Dir = self.Owner:GetAimVector();
bull.Spread = Vector( self.Primary.Spread, self.Primary.Spread, 0 );
bull.Src = self.Ow... |
--
-- 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 License, Version 2.0
-- (the "License"); you may ... |
local ssl_fixtures = require "spec.fixtures.ssl"
local helpers = require "spec.helpers"
local cjson = require "cjson"
local utils = require "kong.tools.utils"
local Errors = require "kong.db.errors"
local function it_content_types(title, fn)
local test_form_encoded = fn("application/x-www-form-urlencoded")
local... |
--Runs with no error. Still no actual script running--
script.Parent = nil
Character = game.Players.localPlayer.Character
Humanoid = Character.Humanoid
if Humanoid:findFirstChild("Animate") then
Humanoid:findFirstChild("Animate"):Destroy()
end
TagService = require(game:GetService("ReplicatedStorage"):WaitForChild("T... |
ConfigGaragens = {}
ConfigGaragens.spawn = {
[1] = { ['x'] = 53.98, ['y'] = -878.08, ['z'] = 30.38, ['name'] = "Garagem",
[1] = { ['x'] = 51.26, ['y'] = -892.13, ['z'] = 30.17, ['h'] = 336.98 },
[2] = { ['x'] = 47.94, ['y'] = -891.2, ['z'] = 30.17, ['h'] = 336.98 },
[3] = { ['x'] = 44.6, ['y'] = -889.82, ['z'] ... |
object_tangible_loot_undead_outbreak_undead_deathtrooper_belt = object_tangible_loot_undead_shared_outbreak_undead_deathtrooper_belt:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_undead_outbreak_undead_deathtrooper_belt, "object/tangible/loot/undead/outbreak_undead_deathtrooper_belt.iff")
|
local class = require "lib.lua-oop"
local Behavior = require "amour.stage.behavior"
local Lvl2 = class("Behavior-Lvl2", Behavior)
function Lvl2:constructor()
Behavior.constructor(self)
end
function Lvl2:init()
self.rectsGame = self:getCurrentStage().rectsGame
self.rectA = ObjectsBasic.RectangleObj:ne... |
--[[
Copyright (c) 2011-2014 chukong-inc.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, copy, modify, merge, publish, dis... |
--[[
TheNexusAvenger
Displays the navigation tools on the side of the screen.
--]]
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local StarterGui = game:GetService("StarterGui")
local ReplicatedStorageProject = require(ReplicatedStorage:WaitForChild("Projec... |
module(...,package.seeall)
-- For more information about huge pages checkout:
-- * HugeTLB - Large Page Support in the Linux kernel
-- http://linuxgazette.net/155/krishnakumar.html)
-- * linux/Documentation/vm/hugetlbpage.txt
-- https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt)
local ffi = require("ffi"... |
--***********************************************************
--** ROBERT JOHNSON **
--***********************************************************
require "TimedActions/ISBaseTimedAction"
---@class ISLightFromLiterature : ISBaseTimedAction
ISLightFromLiterature = ISBaseTimedActi... |
local lvfx = require "lvfx"
local banana = lvfx.newView()
local mango = lvfx.newView()
local overlay = lvfx.newView()
banana:setClear(0.25, 0.25, 0.25, 1.0)
mango:setClear(0.0, 0.0, 1.0, 0.25)
mango:setCanvas(love.graphics.newCanvas(256, 256))
local mvp = lvfx.newUniform("u_modelViewProjection")
local shader = lvf... |
-- thread: https://v3rmillion.net/showthread.php?tid=1141680
local ScreenGui = Instance.new("ScreenGui")
local Main = Instance.new("Frame")
local UIAspectRatioConstraint = Instance.new("UIAspectRatioConstraint")
local Body = Instance.new("Frame")
local PlayerList = Instance.new("ScrollingFrame")
local UIGridLayout = I... |
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Main = require(ReplicatedStorage.Components.Main)
local Roact = require(ReplicatedStorage.Vendor.Roact)
return function(Target: Instance): () -> nil
local Handle = Roact.mount(Roact.createElement(Main), Target, "MainFrame")
return function(): nil
... |
require 'cutorch'
require 'nn'
require 'cunn'
require 'image'
require 'optim'
require 'nngraph'
require 'src/InstanceNormalization'
require 'src/utils'
local cmd = torch.CmdLine()
--60-texture noise_dim = 2
cmd:option('-noise_dim', 2)
cmd:option('-pretrain_model', 'data/train_out/model_texture60.t7')
cmd:option('-gp... |
--- === cp.apple.finalcutpro.timeline.Role ===
---
--- *Extends [Row](cp.ui.OldRow.md)*
---
--- Represents a Role in the [Timeline Index](cp.apple.finalcutpro.timeline.Index.md).
-- local log = require "hs.logger" .new "Row"
local localeID = require "cp.i18n.localeID"
local axutils ... |
local gpath = {}
return gpath
|
--[[
--=====================================================================================================--
Script Name: Vehicle Block Utility v2, for SAPP (PC & CE)
Implementing API version: 1.12.0.0
Description: Block Vehicle Entry on a per map basis
See Vehicle Settings function on line 141 for... |
Beam = Base:extend()
function Beam:constructor(params)
self.x = params.x
self.y = params.y
self.width = params.width or 5
self.height = params.height or 10
self.velocity = params.velocity or 500
self.hasHit = false
end
function Beam:update(dt)
self.y = self.y - self.velocity * dt
Event.dispatch('bea... |
local dev = GetSelf()
local update_time_ms = 1.0/20.0
local dt = update_time_ms
make_default_activity(update_time_ms)
local sensor_data = get_base_data()
local mColor_On_Off = get_param_handle("Color_On_Off")
local mWhite_On_Off = get_param_handle("White_On_Off")
local W... |
print(table.concat({...}, " "))
return true |
--
-- Created by IntelliJ IDEA.
-- User: Noneatme
-- Date: 09.02.2015
-- Time: 00:03
-- To change this template use File | Settings | File Templates.
--
cOOCChat = {};
--[[
]]
-- ///////////////////////////////
-- ///// New //////
-- ///// Returns: Object //////
-- ///////////////////////////////
function cOOC... |
-- RFC2544 Throughput Test
-- as defined by https://www.ietf.org/rfc/rfc2544.txt
-- SPDX-License-Identifier: BSD-3-Clause
package.path = package.path ..";?.lua;test/?.lua;app/?.lua;../?.lua"
require "Pktgen";
-- define packet sizes to test
local pkt_sizes = { 64, 1518, 1280, 512, 128 };
-- local pkt_sizes = { 64,... |
local composer = require("composer")
local scene = composer.newScene()
local physicsEngine = require( "physics" )
physicsEngine.start()
physicsEngine.setGravity(0,0)
physicsEngine.setScale(60)
local IMAGEWIDTH = 1912
local navigationFactor
local constantSpeed
local updatesList
local loopTimer
local M... |
local assets =
{
Asset("ANIM", "anim/fertilizer.zip")
}
local prefabs =
{
}
local function OnFinished(inst)
inst:Remove()
end
local function fn()
local inst = CreateEntity()
inst.entity:AddTransform()
inst.entity:AddAnimState()
inst.entity:AddSoundEmitter()
MakeInventoryPhysics(inst)
inst.AnimS... |
local M = {}
local plugin_name = "tsnip"
local Input = require("nui.input")
local event = require("nui.utils.autocmd").event
local function remove_word()
vim.cmd('call feedkeys("\\<Esc>bcw", "n")')
end
function M.input(label)
local input = Input({
relative = "cursor",
position = {
row = 0,
co... |
--- Extends PartTouchingCalculator with generic binder stuff
-- @classmod BinderTouchingCalculator
-- @author Quenty
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))
local PartTouchingCalculator = require("PartTouchingCalculator")
local BinderUtil = require("BinderUtil")
local ... |
local Color, colors, Group, groups, styles = require("colorbuddy").setup()
Color.new('background', "#3B4252")
Color.new('fg', "#292929")
Color.new('nord_0', "#2E3440")
Color.new('nord_1',"#3B4252")
Color.new('nord_2', "#434C5E")
Color.new('nord_3', "#4C566A")
Color.new('nord_3_light', "#616E88")
Color.new('nord_4', "#... |
data:extend(
{
{
type = "recipe",
name = "underground-belt-5",
category = "crafting-with-fluid",
enabled = false,
energy_required = 4,
ingredients =
{
{"steel-gear-wheel", 40},
{"underground-belt-4", 2},
{type="fluid", name="refined-lubricant", amount=60}
},
resul... |
--[[
Assuming that a goto could jump out of a function, explain what the program in Listing 4.3 would do. (Try to reason about the label using the same scoping rules used for local variables.)
]]
--[[
function getlabel()
return function() goto L1 end
:: L1::
return 0
end
function f(n)
if n == 0 then return g... |
deathspeaker_xunra_soulcatcher_checker_modifier = class({})
function deathspeaker_xunra_soulcatcher_checker_modifier:OnCreated( kv )
self.link_break_range = self:GetAbility():GetSpecialValueFor("link_break_range")
end
function deathspeaker_xunra_soulcatcher_checker_modifier:DeclareFunctions()
local func... |
q = Queue.new()
Queue.push( q, 5 )
Queue.push( q, "abc" )
while not Queue.empty( q ) do
print( Queue.pop( q ) )
end
|
return {
-- add new here if you can't sort
} |
local dip = -math.pi / 3.0
local mu0 = 1.0
local S = 1.0
local nu = 0.25
local gamma = 0.5
-- compute constants
local A_1, A_2, A_3, A_4, B_1, B_2, B_3, B_4
do
local x0 = math.pi*((1.0/3.0)*gamma + 1.0/3.0)
local x1 = math.sin(x0)
local x2 = 2*x1
local x3 = math.pi*((7.0/3.0)*gamma + 1.0/3.0)
local... |
#!/usr/bin/env lua
-- FUNCTIONS
-- (all functions are borrowed from other projects; see citations above each)
-- Got this function from picolove!
-- https://github.com/picolove/picolove/blob/d5a65fd6dd322532d90ea612893a00a28096804a/main.lua#L820
-- PICOLOVE is licensed under the Zlib license:
-- Copyright (c) 2015 J... |
function PrototypeLab:GetItemSlotNames()
return {
Locale.ResolveString("JETPACK"),
Locale.ResolveString("EXOSUIT")
}
end |
local vdom = require('vdom')
-- start_game: () => ()
return function(props)
return vdom.create_element('panel', { width = '100%', height = '100%', texture = 'background' },
vdom.create_element('panel', { width = 800, height = 48, halign = 'center', bottom = 600, color = '#0008' },
vdom.create_e... |
return {
include_dir = {".."}
}
|
local heart = require("heart")
local M = heart.class.newClass()
function M:init(engine, config)
self.engine = assert(engine)
self.physicsDomain = assert(self.engine.domains.physics)
self.raySensorComponents = assert(self.engine.componentManagers.raySensor)
self.color = config.color or {0, 1, 0, 1}
self.scal... |
-- 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\definitive_lighting_improvements\WDC_pc_WalkingDead401_data\BoardingSchoolExterior_temp.lua
-- params : ...
-- function num : 0 , upvalues : _ENV
require("Relighti... |
for i,v in ipairs({
{6959,21.79981,492,1,0,0,0},
{6959,63.15,492,1,0,0,0},
{6959,-19.5,492,1,0,0,0},
{6959,-19.5,452,1,0,0,0},
{6959,21.79981,452,1,0,0,0},
{6959,63.15,452,1,0,0,0},
{6959,-19.4,412,1,0,0,0},
{6959,21.90039,412,1,0,0,0},
{6959,63.2002,412,1,0,0,0},
{6959,-19.4,372... |
-- Tool should return true if freezing the view angles
function ToolObj:FreezeMovement()
return false
end
-- The tool's opportunity to draw to the HUD
function ToolObj:DrawHUD()
end
|
-- Copyright (c) 2015 Adobe Systems Incorporated. All rights reserved.
--
-- 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 r... |
local Floor = {}
Floor.__index = Floor
Floor.isFloor = true
function Floor.new(node, collider)
local floor = {}
setmetatable(floor, Floor)
--If the node is a polyline, we need to draw a polygon rather than rectangle
if node.polyline or node.polygon then
local polygon = node.polyline or node.po... |
local m, s, o
local sid = arg[1]
local yeelight_devices = {
"ColorLEDBulb",
"DeskLamp",
"ColorLedStrip",
"CeilingLamp",
"WhiteBulb"
}
local airpurifier_devices = {
"MiAirPurifier",
"MiAirPurifier2",
"MiAirPurifierPro",
"MiAirPurifier2S"
}
local philips_light_devices = {
"MiPhilipsSmartBulb",
"MiPhilipsTab... |
VERSION = "0.8.2"
MANIFEST = {
lib = {"Audio.lua", "Basics.lua", "Entity.lua", "Globals.lua", "JSON.lua", "Natives.lua", "Player.lua", "PTFX.lua", "Session.lua", "Stats.lua", "Trolling.lua", "Vector.lua", "Vehicle.lua"},
resources = {"Crosshair.png"}
}
Ryan = {}
-- Requirements --
function exists(name) retur... |
HelloScene = class("HelloScene", function()
return cc.Scene:create()
end)
function HelloScene:create()
local scene = HelloScene.new()
scene:addChild(scene:createLayer())
return scene
end
function HelloScene:ctor()
end
function HelloScene:createLayer()
local layer = cc.Layer:create()
local function toLoading... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.