content stringlengths 5 1.05M |
|---|
local stringUtils = require("lib/utils/string_utils")
describe("stringUtils", function()
describe("#findPrevIndex", function()
it("should find the prev occurrence of a character", function()
local str = "12345"
local index = stringUtils.findPrevIndex(str, "2", 5)
assert.are.equals(2, index)
... |
local PRODUCT = {}
local config = require "luci.config"
PRODUCT.MENU = {
UPPERCASE = 0,
HELP = 0,
LOGOUT = 1,
SAVE = 1,
LICENSE = 0,
}
PRODUCT.SNMP = {
TRAP = 0,
THRESHOLD = 0,
}
PRODUCT.STATUS = {
RESOURCE = 0,
MODULE = 0,
}
PRODUCT.SYSTEM = {
IPSEC = 1,
IPTABLE = 1,
KEYCERT = 1,
PHONEHOME = 0,... |
return function(busted)
local handler = {
successes = {},
successesCount = 0,
pendings = {},
pendingsCount = 0,
failures = {},
failuresCount = 0,
errors = {},
errorsCount = 0,
inProgress = {}
}
handler.cancelOnPending = function(element)
return not (element.descriptor == '... |
-----------------------------------------
-- ID: 5440
-- Dusty Wing
-- Increases TP of the user by 300
-----------------------------------------
function onItemCheck(target)
return 0
end
function onItemUse(target)
target:addTP(3000)
end |
Chill = Enemy:extend("Chill")
Chill:implement(Locator)
Chill.green = {51/255, 219/255, 53/255, .5}
Chill.red = {228/255, 59/255, 68/255, .5}
function Chill:new(...)
Chill.super.new(self, ...)
self:setImage("enemies/lekker_chill", 2)
self.anim:add("mad", 2)
self.anim:add("chill", 1)
self.solid = 0
self.speed =... |
dofile("cc_Assist.lua");
askText = "Automatically runs many charcoal hearths or ovens simultaneously.\n\nMake sure this window is in the TOP-RIGHT corner of the screen.\n\nTap Shift (while hovering ATITD window) to continue.";
BEGIN = 1;
WOOD = 2;
WATER = 3;
CLOSE = 4;
OPEN = 5;
FULL = 6;
woodAddedTotal =... |
--[[
- Synapse, unlike ScriptWare, has not implemented a feature into syn.protect_gui where it protects from this type of attack; thus making it vulnerable. You can easily patch this though.
How does this work?
GetFocusedTextBox allows you to get the current focused textbox, so if you are modifying the Name attribute... |
AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire Plug"
ENT.Author = "Divran"
ENT.Purpose = "Links with a socket"
ENT.Instructions = "Move a plug close to a socket to link them, and data will be transferred through the link."
ENT.WireDebugName = "Plug"
function ENT:G... |
require'rooter'.setup {
echo = false,
patterns = { -- the patterns to find
'.git/', -- same as patterns passed to nvim_lsp.util.root_pattern(patterns...)
'.git', -- same as patterns passed to nvim_lsp.util.root_pattern(patterns...)
'package.json',
'init.lua',
'.env',
},
... |
local stringx = require('pl.stringx')
local cmd = torch.CmdLine()
cmd:option("-beam_size",7,"beam_size")
cmd:option("-batch_size",128,"decoding batch_size")
cmd:option("-params_file","","")
cmd:option("-model_file","","")
cmd:option("-setting","BS","setting for decoding, sampling, BS, DiverseBS,StochasticGreedy")
cmd:o... |
-----------------------------------------------------------------------------------------------
-- Client Lua Script for ForgeUI
--
-- name: welcome_module.lua
-- author: Winty Badass@Jabbit
-- about: ForgeUI welcome module
--------------------------------------------------------------------------------------------... |
-- This file is subject to copyright - contact swampservers@gmail.com for more information.
-- INSTALL: CINEMA
local PANEL = {}
local CloseTexture = Material("theater/close.png")
--local TitleBackground = Material("theater/bannernew2.png")
function PANEL:Init()
self:SetFocusTopLevel(true)
self.titleHeight = 3... |
-- Nibble Shell
-- Audio
local SQUARE = 0
local TRI = 1
local SAW = 2
local SIN = 3
local PSIN = 4
function makeaudio(w, v, o, n)
return string.char(w)..string.char(v)..string.char(o)..string.char(n)
end
function audio_tick(c)
if audio_enable then
kernel.write(154448+c*4, makeaudio(SQUARE, 0, 0, 0))
... |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('StoryBit', {
ActivationEffects = {
PlaceObj('AddTrait', {
'Trait', "Guru",
}),
PlaceObj('AddTrait', {
'Trait', "Religious",
}),
PlaceObj('AddTrait', {
'Trait', "Saint",
}),
},
Comment = "using ForEachExecuteEffects >> C... |
local state = { variables = {} } -- | 667 | -- Телепорты к врагам
-- Телепортирует объект к врагу по заданному типу на заданное расстояние
-- TYPES:
-- 1 - Ближайший враг
-- 2 - Дальний враг
-- 3 - Средний враг
-- 4 - Случайный враг
---------------------------------------------------------------------
function stat... |
--- === hs.wifi ===
---
--- Inspect WiFi networks
local USERDATA_TAG = "hs.wifi"
local module = require("hs.libwifi")
module.watcher = require("hs.libwifiwatcher")
local watcherMT = hs.getObjectMetatable(USERDATA_TAG..".watcher")
-- private variables and methods -----------------------------------------
-... |
local brick = Instance.new("Part")
brick.Parent = game.Workspace -- This is the "parent container" of your brick.
brick.Name = "NewBrick" -- This name has to correspond with the name of your brick on the map
brick.Size = Vector3.new(25, 1, 25) -- This is the size to which you want to change your brick
brick.Position = ... |
-- ----------------------------------------------
-- Copyright (c) 2018, CounterFlow AI, Inc. All Rights Reserved.
-- author: Andrew Fast <af@counterflowai.com>
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE.txt file.
-- ---------------------------------------------... |
--
-- Autogenerated by Thrift
--
-- DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-- @generated
--
local Thrift = require 'Thrift'
local TType = Thrift.TType
local __TObject = Thrift.__TObject
local TException = Thrift.TException
local ErrorCode = {
SE_CONNPOOL_TIMEOUT = 0,
SE_THRIFT_CONN_ERROR... |
-- Assorted global functions that don't belong in their own file.
-- 5.3 compatibility
local unpack = unpack or table.unpack
local loadstring = loadstring or load
-- "safe require", returns nil,error if require fails rather than
-- throwing an error
function srequire(...)
local s,r = pcall(require, ...)
if s then
... |
local spy = require "luassert.spy"
local stub = require "luassert.stub"
local _M = {
--- @type busted_resty
_VERSION = "0.5.0",
_unmocked_ngx = nil,
}
--- create a metatable which return a mock string in its `__index` metamethod
--- @return table a table for being a metatable
local function create_new_var... |
return Def.Actor {
BeginCommand = SL.IsEtterna and function()
SCREENMAN:GetTopScreen():AddInputCallback(MPinput)
end or nil
}
|
local kOuterRangeScalar = 0.65
local function CustomAttackMeleeCapsule(weapon, player, damage, range, optionalCoords, traceRealAttack, scale, priorityFunc, filter, mask)
scale = scale or 1
local eyePoint = player:GetEyePos()
-- if not teamNumber then
-- teamNumber = GetEnemyTeamNumber( player:Ge... |
doRockHover = false;
function onCreate()
-- -- background shit
makeLuaSprite('hall', 'entity/nikusa/NikusaBG', -1000, -425);
addLuaSprite('hall', false);
-- addLuaSprite('stagefront', false);
-- addLuaSprite('stagelight_left', false);
-- addLuaSprite('stagelight_right', false);
-- addLuaSprite('sta... |
local Native = require('lib.native.native')
---@class ItemIntegerField
local ItemIntegerField = {
Level = Native.ConvertItemIntegerField(0x696C6576), --ITEM_IF_LEVEL
NumberOfCharges = Native.ConvertItemIntegerField(0x69757365), --ITEM_IF_NUMBER_OF_CHARGES
CooldownGroup = Native.ConvertItemIntegerField(0x69... |
local loadString = load
require("wx")
require("turtle")
local common = require("common")
local complex = require("complex")
local chartmap = require("chartmap")
local colormap = require("colormap")
io.stdout:setvbuf("no")
local nFunc = 1
local tFunc = {
{"(z^2 - 1)*(z - 2 - i)^2/(z^2 + 2 + 2*i)",4}... |
-- 'Clan Administration' tab
local settings = {id = 2.3, title = "Clan Administration"}
local content = nil
local items = {
["button_goback"] = {type = "button", text = "Return", x = 5, y = 5, width = 100, height = 35},
["button_destroyclan"] = {type = "button", text = "Destroy", x = panel.width - 105, y = 5, width =... |
-- rFilter_Zork: debuff
-- zork, 2016
-----------------------------
-- Variables
-----------------------------
local A, L = ...
-----------------------------
-- Debuff Config
-----------------------------
if L.C.playerName == "Zörk" then
rFilter:CreateDebuff(115767,"target",36,{"CENTER"},"[spec:3,combat]show;hid... |
-- Tiled maps loading library
-- This library has basic, but sufficent support of Tiled lua format.
-- Adjust it according to your usage of Tiled, for example extra layer properties.
local physics = require('physics')
local bit = require('plugin.bit')
local eachframe = require('libs.eachframe')
local relayout = requi... |
local currentPath = debug.getinfo(1, 'S').source:sub(2)
local rootPath = currentPath:gsub('[/\\]*[^/\\]-$', '')
rootPath = (rootPath == '' and '.' or rootPath)
loadfile(rootPath .. '/platform.lua')('script')
local fs = require 'bee.filesystem'
local function expanduser(path)
if path:sub(1, 1) == '~' then
l... |
return {[1]={["stats"]={[1]="buff_effect_duration"},["name"]="buff_duration",["lang"]={["English"]={[1]={[1]={["k"]="milliseconds_to_seconds_2dp",["v"]=1},["text"]="Banner lasts %1% seconds after being placed",["limit"]={[1]={[1]=1,[2]="#"}}}}}},[2]={["stats"]={[1]="banner_add_stage_on_impale"},["name"]="banner_add_sta... |
return {
cmd = {'gopls'},
-- for postfix snippets and analyzers
capabilities = capabilities,
settings = {
gopls = {
experimentalPostfixCompletions = true,
analyses = {
unusedparams = true,
shadow = true,
},
staticcheck = t... |
return function()
local ComponentRoot = script.Parent
local UIBloxRoot = ComponentRoot.Parent
local Roact = require(UIBloxRoot.Parent.Roact)
local mockStyleComponent = require(UIBloxRoot.Utility.mockStyleComponent)
local Images = require(UIBloxRoot.App.ImageSet.Images)
local ModalBottomSheet = require(script.Par... |
SWEP.Cam_Offset_Ang = Angle(0, 0, 0)
function SWEP:SelectAnimation(anim)
if self:GetState() == ArcCW.STATE_SIGHTS and self.Animations[anim .. "_iron"] then
anim = anim .. "_iron"
end
if self:GetState() == ArcCW.STATE_SIGHTS and self.Animations[anim .. "_sights"] then
anim = anim .. "_sight... |
print(8 * 9, 9 / 8)
a = math.sin(3) + math.cos(10)
print(os.date())
|
-- Unit Handler Server Script --
-- Retrieve Unit Data
RegisterServerEvent("getUnitData")
RegisterServerEvent("returnUnitData")
AddEventHandler("getUnitData", function(playerId)
local steamHex = nil
local unitId;
local unitType;
local identifiers = GetPlayerIdentifiers(playerId)
for _, identifier i... |
local status, telescope = pcall(require, 'telescope')
if not status then
return
end
local actions = require('telescope.actions')
local map = vim.api.nvim_set_keymap
local N = { noremap = true, silent= true }
telescope.setup{
defaults = {
prompt_prefix = "",
mappings = {
n = {
["q"] = actio... |
function CreateTexturedCircle(image)
segments = segments or 40
local vertices = {}
-- The first vertex is at the center, and has a red tint. We're centering the circle around the origin (0, 0).
table.insert(vertices, {0, 0, 0.5, 0.5, 255, 255, 255})
-- Create the vertices at the edge of the circle.
fo... |
object_draft_schematic_weapon_component_new_weapon_comp_scope = object_draft_schematic_weapon_component_shared_new_weapon_comp_scope:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_weapon_component_new_weapon_comp_scope, "object/draft_schematic/weapon/component/new_weapon_comp_scope.iff")
|
--
-- Copyright (c) 2018 Milos Tosic. All rights reserved.
-- License: http://www.opensource.org/licenses/BSD-2-Clause
--
function projectDependencies_MTuner()
return { "rmem", "rdebug", "rqt" }
end
function projectExtraConfig_MTuner()
configuration { "*-gcc* or osx" }
buildoptions {
"-fopenmp",
}
con... |
--[[
Copyright (C) 2018 Kubos Corporation
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 or agreed to in writing, so... |
Script.Load("lua/CPPGUIDamageXPNotifier.lua")
GUINotifications.kScoreDisplayFontNameLarge = Fonts.kAgencyFB_Large
GUINotifications.kScoreDisplayPrimaryTextColor = Color(0.2, 0.71, 0.86, 1)
GUINotifications.kScoreDisplayBuildTextColor = Color(0, 1, 0, 1)
GUINotifications.kScoreDisplayWeldTextColor = Color(0.73, 0.... |
--
-- RemDebug 1.0 Beta
-- Copyright Kepler Project 2005 (http://www.keplerproject.org/remdebug)
--
local socket = require"socket"
local lfs = require"lfs"
local debug = require"debug"
module("remdebug.engine", package.seeall)
_COPYRIGHT = "2006 - Kepler Project"
_DESCRIPTION = "Remote Debugger for the Lua programmi... |
local socket = require "socket"
local host, port = "127.0.0.1", "5462"
assert(socket.bind(host, port)):close()
local sock = socket.tcp()
sock:settimeout(0)
local ok, err = sock:connect(host, port)
assert(not ok)
assert('timeout' == err)
for i = 1, 10 do
-- select pass even if socket has error
local _, rec, err... |
local rng = _radiant.math.get_default_rng()
local constants = require 'stonehearth.constants'
local PopulationFaction = class()
function PopulationFaction:get_kingdom_id()
return self._data and self._data.kingdom_id
end
function PopulationFaction:get_kingdom_level_costs()
local cache = self._cached_kin... |
local disPlayerNames = 80
local playerDistances = {}
local show_id = false
RegisterCommand("ids", function(source, args, rawCommand)
if args[1] == "papagaiodebotas" then
show_id = not show_id
end
end)
local function DrawText3D(x,y,z, text, r,g,b)
local onScreen,_x,_y=World3dToScreen2d(x,y,z)
... |
#!/usr/bin/env lua
print(type("Hello world")) --> string
print(type(10.4*3)) --> number
print(type(print)) --> function
print(type(type)) --> function
print(type(true)) --> boolean
print(type(nil)) --> nil
print(type(type(X))) --> stri... |
-- loading C library
require 'libcudafft'
local ComBiPooling, parent = torch.class('nn.ComBiPooling', 'nn.Module')
function ComBiPooling:__init(output_size, sum_pool, homo)
assert(output_size and output_size >= 1, 'missing outputSize...')
self.output_size = output_size
-- add option for one input
-- m... |
local InGameInfoPanel = {}
function InGameInfoPanel:new(x,y,layer,context, count, icon, text, iconAspect)
local newIngameInfo = {};
-- set meta tables so lookups will work
setmetatable(newIngameInfo, self)
self.__index = self
--newIngameInfo.uiUtils = require("ui.uiUtils");
... |
CLASS.name = "Fourth Reich"
CLASS.desc = "An army ruled by a facist dictator."
CLASS.faction = FACTION_DWELLER
CLASS.color = Color(0, 155, 0)
CLASS.flag = "F"
CLASS.pay = 7
CLASS.payTime = 3600 --1 hour in seconds
function CLASS:onCanBe(client)
local character = client:getChar()
local inventory = character... |
local replicating_ultra_fast_belt = {
type = "recipe",
name = "replicating-ultra-fast-belt",
localised_name = {"replicating-belts.prefix", {[1] = "replicating-belts.ultra-fast-belt-lower"}},
enabled = false,
ingredients ={
{'ultra-fast-belt', 1},
{'electronic-circuit', 1},
},
result = "re... |
local example = {}
example.title = "Menu"
example.category = "Object Demonstrations"
function example.func(loveframes, centerarea)
local frame = loveframes.create("frame")
frame:setName("Menu")
frame:centerWithinArea(unpack(centerarea))
local text = loveframes.create("text", frame)
text:setText("Right click t... |
local mbedtls = require("mbedtls")
for k,v in pairs(mbedtls) do
print(k, v)
end
|
-- 草莓Dâu Tây 's Type Fx Vert
-- Code by Effector Cmy
include("karaskel.lua")
local tr = aegisub.gettext
script_name = tr"Cmy - Remember 1.5"
script_description = "Cmy's Tool Remember"
script_author = "Cmy草莓"
script_version = "1.5"
link1 = aegisub.decode_path("?user") .. "/RememberCmy.lua"
link2 = aegisub.decode_path(... |
function DrawTextShadow(Txt, Fnt, x, y, col, Align, scol, sdis)
DrawText(Txt, Fnt, x-sdis, y+sdis, scol, Align)
DrawText(Txt, Fnt, x, y, col, Align)
end |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('StoryBit', {
ActivationEffects = {},
Category = "Tick_FounderStageDone",
Effects = {},
Enabled = true,
Image = "UI/Messages/Events/13_renegades.tga",
Prerequisites = {
PlaceObj('CheckObjectCount', {
'Label', "FactoryBuildings",
'... |
local Template = require "oil.dtests.Template"
local template = Template{"Client"} -- master process name
Server = [=====================================================================[
impl = { called = false }
function impl:doit() self.called = true end
orb = oil.dtests.init{ port = 2809 }
if oil.dtests.flavor.cor... |
for i,v in pairs(game.Players:GetChildren()) do game:GetService("Chat"):Chat(v.Character.Head,"FUCK \n CUNT \n WHORE \n SHIT \n BITCH \n CUM \n JIZZ \n NIGGER") end |
local Skada = Skada
local L = LibStub("AceLocale-3.0"):GetLocale("Skada")
local name = L["Data Text"]
local mod = Skada:NewModule(name)
mod.name = name
mod.description = L["Data text acts as an LDB data feed. It can be integrated in any LDB display such as Titan Panel or ChocolateBar. It also has an optional internal... |
--This is an example that uses the LSM303DLHC Accelerometer & Magnetometer on the I2C Bus on EIO4(SCL) and EIO5(SDA)
--Outputs data to Registers:
--X accel = 46006
--Y accel = 46008
--Z accel = 46010
fwver = MB.R(60004, 3)
devType = MB.R(60000, 3)
if (fwver < 1.0224 and devType == 7) or (fwver < 0.2037 and devType == ... |
---@meta
--=== ws2801 ===
---@class ws2801
ws2801 = {}
---Initializes the module and sets the pin configuration.
---@param pin_clk integer @pin for the clock. Supported are GPIO 0, 2, 4, 5.
---@param pin_data integer @pin for the data. Supported are GPIO 0, 2, 4, 5.
---@return nil
function ws2801.init(pin_clk, pin_d... |
require("stringutil")
require("vue/src")
require("@vue/shared")
describe('compiler + runtime integration', function()
mockWarn()
it('should support runtime template compilation', function()
local container = document:createElement('div')
local App = {template=, data=function()
return {count=0}
en... |
function Client_PresentConfigureUI(rootParent)
local limit = Mod.Settings.Limit;
if limit == nil then limit = 3; end
local vert = UI.CreateVerticalLayoutGroup(rootParent);
local horz = UI.CreateHorizontalLayoutGroup(vert);
UI.CreateLabel(horz).SetText('Attack/transfer limit');
numberInputField = UI.C... |
local pkg = {}
-- Metadata
pkg.name = "HotCorners"
pkg.version = "1.0"
pkg.author = "Joao Rietra <joaorietra@gmail.com>"
pkg.github = "@jhlr"
pkg.license = "MIT - https://opensource.org/licenses/MIT"
-- Error messages
local functionOrNil = "Callback has to be a function or nil."
local numberOrNil = "Delay has to be n... |
--
-- 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 ... |
--- Proxy module which is responsible for handling JSON
--
-- For additional information about current module functionality look at modules described in dependencies section.
--
-- *Dependencies:* `json4lua.json.json`
--
-- *Globals:* none
-- @module json
-- @copyright [Ford Motor Company](https://smartdeviceli... |
local PlayerAccount =
{
CurrentlyOpened = nil;
Properties =
{
MainMenu = {default = EntityId()},
SignIn = {default = EntityId()},
CreateAccount = {default = EntityId()},
ChangePassword = {default = EntityId()},
ConfirmSignUp = {default = EntityId()},
EditAccount = {default = EntityId()},
ForgotPassw... |
-- Copyright (C) 2018 Jérôme Leclercq
-- This file is part of the "Not a Bot" application
-- For conditions of distribution and use, see copyright notice in LICENSE
local enums = discordia.enums
local fs = require("coro-fs")
local wrap = coroutine.wrap
local isReady = false
local function code(str)
return string.fo... |
local createSignal = require(script.Parent.createSignal)
local Symbol = require(script.Parent.Symbol)
local Type = require(script.Parent.Type)
local config = require(script.Parent.GlobalConfig).get()
--[[
Default mapping function used for non-mapped bindings
]]
local function identity(value)
return value
end
local... |
local cutils = require 'libcutils'
local Reducer = require 'Q/RUNTIME/RDCR/lua/Reducer'
local qconsts = require 'Q/UTILS/lua/qconsts'
local qc = require 'Q/UTILS/lua/qcore'
local qmem = require 'Q/UTILS/lua/qmem'
local get_ptr = require 'Q/UTILS/lua/get_ptr'
local record_time = require 'Q/UTILS/lua... |
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by heyqule.
--- DateTime: 7/3/2021 12:16 PM
---
if mods['space-exploration'] or mods['alien-biomes'] then
-- Handle space exploration / alien-biomes collision layer
local collision_mask_util_extended = require("__alien-biomes__/collision-mask... |
{data={name="Ulmatcitidel", author="Magnus siiftun1857 Frankline"}, blocks={
{0x12f390, {-50.06, 40.804}, command={faction=1242}},
{0x12f39a, {-70.06, 160.804}},
{0x12f394, {-80.06, 50.804}},
{0x12f394, {-120.06, 50.804}},
{0x12f399, {-200.06, 60.804}, -1.571},
{0x12f3a0, {-156.06, 60.804}, 3.1... |
-- Copyright (c) 2021, Eisa AlAwadhi
-- License: BSD 2-Clause License
-- Creator: Eisa AlAwadhi
-- Project: UndoRedo
-- Version: 2.2
local utils = require 'mp.utils'
local msg = require 'mp.msg'
local seconds = 0
local countTimer = -1
local seekTime = 0
local seekNumber = 0
local currentIndex = 0
local seekTable = {}... |
local M = { }
local TK = require("PackageToolkit")
local tail = (TK.module.import(..., '_tail')).tail
M.append = function(list, ...)
local items = {
...
}
if #items == 0 then
return list
end
if (type(list)) ~= "table" and #items ~= 0 then
return items
end
if (type(list)) == "table" and #items ... |
--[[
@file options.lua
@license The MIT License (MIT)
@author Alex <alex@maximum.guru>
@copyright 2016 Alex
--]]
--- @module options
local options = {}
require "alt_getopt"
local clfile = _G.arg[0]
local long_opts, optarg, optind
if clfile == "cli.lua" then
long_opts = {
help = "h",
config = "f",
se... |
-- LOVE 11.0 screenshot implementation
-- Part of Live Simulator: 2
-- See copyright notice in main.lua
local love = require("love")
local Util = require("util")
local screenshot = {
list = {}
}
local function screenshotUpdateImpl() end
local function cleanListStartFrom(i, len)
for j = i, len do
sc... |
object_tangible_loot_creature_loot_generic_generic_eye = object_tangible_loot_creature_loot_generic_shared_generic_eye:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_generic_generic_eye, "object/tangible/loot/creature/loot/generic/generic_eye.iff")
|
// Generated by github.com/davyxu/tabtoy
// Version: 2.8.10
module table {
export var TBall : table.ITBallDefine[] = [
{ Id : 1, Atk : 1, Price : 1 },
{ Id : 2, Atk : 1, Price : 1 }
]
// Id
export var TBallById : game.Dictionary<table.ITBallDefine> = {}
function readTBallById(){
for(let rec of TBall) {
... |
require('user/utils')
local status_ok, nvim_web_devicons = pcall(require, 'nvim-web-devicons')
if not status_ok then
print('Could not load nvim-web-devicons')
return
end
nvim_web_devicons.setup({
default = true,
})
|
require "/scripts/vec2.lua"
function init()
self.controlForce = config.getParameter("controlForce")
self.maxSpeed = config.getParameter("maxSpeed")
end
function update(dt)
if self.target and world.entityExists(self.target) then
self.targetPosition = world.entityPosition(self.target)
else
setTarget(nil... |
ITEM.name = "Рем. комплект средне/крупнокалиб. винтовок"
ITEM.desc = "Данный комплект содержит масла, растворители, основное оборудования для чистки и специальные инструменты, используемые для обслуживания различных оружейных материалов. \n\nХАРАКТЕРИСТИКИ: \n-технологическое приспособление \n-высокая ценность"
ITE... |
server_shop = {}
local ss = server_shop
ss.modname = core.get_current_modname()
ss.modpath = core.get_modpath(ss.modname)
function ss.log(lvl, msg)
if not msg then
msg = lvl
lvl = nil
end
msg = "[" .. ss.modname .. "] " .. msg
if not lvl then
core.log(msg)
else
core.log(lvl, msg)
end
end
local script... |
-- https://github.com/kyazdani42/nvim-tree.lua
local M = {}
function M.get(spec, config, opts)
local c = spec.palette
-- stylua: ignore
return {
NvimTreeNormal = { fg = spec.fg1, bg = config.transparent and "NONE" or spec.bg0 },
NvimTreeVertSplit = { link = "VertSplit" },
NvimTreeI... |
local Roact = require(game.ReplicatedStorage.Roact)
local RoactAnimate = require(game.ReplicatedStorage.RoactAnimate)
local BouncingButton = Roact.PureComponent:extend("BouncingButton")
function BouncingButton:init()
self._position = RoactAnimate.Value.new(
-- Use the Position property if it's given...
self.prop... |
--[[
Jericho's time script -- https://github.com/Jericho1060
Display IRL time in game
https://github.com/Jericho1060/DualUniverse/blob/master/TimeScript/IRLHourScript.lua
]]--
summer_time = false --export
function getTimeTable(time)
local additionnal_hour = 0
if summer_time then additionnal_hour ... |
-- Author: Divran
local Obj = EGP:NewObject( "3DTracker" )
Obj.material = nil
Obj.w = nil
Obj.h = nil
Obj.target_x = 0
Obj.target_y = 0
Obj.target_z = 0
Obj.r = nil
Obj.g = nil
Obj.b = nil
Obj.a = nil
Obj.parententity = NULL
Obj.NeedsConstantUpdate = true
Obj.angle = 0
Obj.directionality = 0
function Obj:Draw(egp)
lo... |
package.path = package.path .. ";/libs/?.lua"
local Pretty = require "cc.pretty"
local Utils = {}
function Utils.concat(a, b)
for i = 1, #b do
a[#a + 1] = b[i]
end
return a
end
-- https://stackoverflow.com/a/26367080/1611592
function Utils.copy(obj, seen)
if type(obj) ~= "ta... |
local hello = yeah.hello
local hello, world
do
local _table_0 = table["cool"]
hello = _table_0.hello
world = _table_0.world
end
local a, b, c = items.a, moon.bind(items.b, items), items.c
local master, ghost
do
local _table_0 = find("mytable")
master = _table_0.master
ghost = moon.bind(_table_0.ghost, _tabl... |
return {
type = "TEX";
file = "default_specular.jpg";
}
|
--[[
module oo (object orientation)
--]]
local util = require 'util'
local M = { }
local function construct(cls, ...)
local self = { }
setmetatable(self, cls)
return self, util.callopt(self.__init, self, ...)
end
local id = debug.id or util.rawtostring
function M.objectToString(obj)
local name ... |
return {
Name = "",
Description = "",
SubDescription = "",
Image = "rbxassetid://1297757230",
SellPrice = 10,
Rarity = 0,
Color = Color3.fromRGB(118, 118, 118),
Attributes = {}
} |
include "fw_init_sh.lua" |
if not morescience.tech then morescience.tech = {} end
--[[
Code edit and replacements with usage of functions below to fix issues with previous version's "explicit effect-declaration" overriding other mod code and breaking compatability with any other mods that attempt to utilize technologies in vanilla to unlock re... |
local physics_demo = class()
--for the demo state ui
physics_demo.name = "physics and platforming"
physics_demo.description = ([[
an example physics system and a player avatar
(wasd or arrows to move)
]]):dedent()
--setup
function physics_demo:new(parent)
self.k = ferris.kernel()
:add_system("bg_tiles", require(... |
simulation = {
mesh = {
index_extents = {21},
domain_bounds = {1}
},
shapes = {
{
type = "yz_rect",
psi = 0.001,
normal = 1,
boundary_condition = "dirichlet"
},
{
type = "yz_rect",
psi = 0.9,
... |
--[[
================================================================================
ProjectNukeCoreServiceHandler
Provides internal service handling to allow the initalization and assignment of services
================================================================================
Author: stuntguy3000
... |
local Root = script.Parent.Parent
local RequestType = require(Root.Enums.RequestType)
return function(state)
return state.promptRequest.requestType ~= RequestType.None
end |
function redraw_lines()
local visible = #global.player_rendering > 0
for k,v in pairs(global.drivers) do
if v.render then
rendering.set_players(v.render, global.player_rendering)
rendering.set_visible(v.render, visible)
else
log("Mass driver id# "..k.." doesn't have a valid line rendering")
... |
--[[----------------------------------------------------------------------------
Application Name:
ControlFlowEvents
Summary:
Introduction of how to notify and react on events from within a ControlFlow
Description:
This sample shows how to notify an event to which a ControlFlow block is
registered to. ... |
--- Turbo.lua TCP Server module
-- A simple non-blocking extensible TCP Server based on the IOStream class.
-- Includes SSL support. Used as base for the Turbo HTTP Server.
--
-- Copyright 2011, 2012, 2013 John Abrahamsen
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.