content stringlengths 5 1.05M |
|---|
local config = {}
function config.code_runner()
require('code_runner').setup{
term = {
position = "belowright",
tab = false,
mode = ""
},
filetype = {
java = "cd $dir && javac $fileName && java $fileNameWithoutExt",
python = "pytho... |
ENT.Type = "anim"
ENT.Base = "base_gmodentity"
ENT.PrintName = "Printer Paper"
ENT.Category = "real_print"
ENT.Spawnable = true
ENT.Author = "MrRalgoman" |
timer.Simple(0.0,function()
if not file.Exists("metrostroi_data","DATA") then
file.CreateDir("metrostroi_data")
end
local SIGNS = [[{"1":{"Pos":"[10057.916 -2351.9995 -4380.4741]","TrafficLights":9,"Class":"gmod_track_signal","LightsStyle":0,"Angles":"{-0 90 0}","Settings":196612},"2":{"Pos":"[-9296.2793 -4120... |
local DEBUG =
function() end
-- d
local function _tr(str)
return str
end
if not InventoryManager then InventoryManager = {} end
local IM = InventoryManager
local RE = IM.UI.RuleEdit
local function getChoiceboxLists(structure, fun)
local _new = { }
local _reverse = { }
local _order = { }
for... |
require('prototypes.categories.ammo-category')
require('prototypes.categories.resource-category')
require('prototypes.categories.recipe-category')
|
-- bg = bludGraphics();
--
-- function test()
-- local s;
-- s = bludSynth()
-- s:load('low_bell.wav');
-- s:trigger();
-- end
--
-- test()
--
-- function blud.draw()
-- bg:setColor(0,0,0,255)
-- bg:drawRect(10,10,100,100)
-- end
function blud.touch.down(x, y, id)
-- s:setNote(y/bg:getHeight()*30... |
--[[
Definition file for shops.
Data-folder architecture.
--]]
|
local Class = require "lib.hump.Class"
local Vector = require "lib.hump.Vector"
local Component = require "component.Component"
local Constants = require "constants.Constants"
local OptimizedTrailEffectComponent = Class{}
OptimizedTrailEffectComponent:include(Component)
function OptimizedTrailEffectComponent:... |
return {'jaqueline','jaquet','jaquelines'} |
local function GetChatMessage(...)
local chatMessage = StringConcatArgs(...)
if chatMessage then
return string.sub(chatMessage, 1, kMaxChatLength)
end
return ""
end
local function ProcessChatCommand(sourceClient, channel, command, message)
local label = channel.label
local sourceClientCanReceiveMessagesOnChann... |
require 'lib_end2end/NonparametricPatchAutoencoderFactory'
local InnerSwap_unetPart, parent = torch.class('nn.InnerSwap_unetPart', 'nn.Module')
function InnerSwap_unetPart:__init(cls, swap_sz, threshold, mask_thred)
parent.__init(self)
self.cls = cls
self.swap_sz = swap_sz -- for layer near fc, it shou... |
describe("EventDispatcher", function()
local EventDispatcher = require "src/EventDispatcher"
it("passes arguments given to fire", function()
local events = EventDispatcher:new{}
local callback = spy.new(function() end)
events:on("EventName", callback)
events:fire("EventName",... |
--[[-----------------------------------------------------------------------------------------------------------------------
Player Info
-----------------------------------------------------------------------------------------------------------------------]]--
local PLUGIN = {}
PLUGIN.Title = "Player Info"
PLUGIN.Desc... |
local get_hex = require('cokeline/utils').get_hex
require('cokeline').setup({
default_hl = {
focused = {
fg = get_hex('ColorColumn', 'bg'),
bg = get_hex('Normal', 'fg'),
},
unfocused = {
fg = get_hex('Normal', 'fg'),
bg = get_hex('ColorColumn', 'bg'),
},
},
components = {... |
return
{
name="Build Road",
description="Construct a road from the current list of waypoints.",
options=
{
{name="Paving Width", type="value", value=5},
{name="Segment steps", type="value", value=10},
{name="Length scale", type="value", value=0.1},
},
execute=function(self)
--print("1")
print("Depreca... |
-- Copyright 2012 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.commands", package.seeall)
function index()
entry({"admin", "system", "commands"}, firstchild(), _("Custom Commands"), 80)
entry({"admin", "system", "commands", "dashboard"}, template(... |
local __exports = LibStub:NewLibrary("ovale/scripts/ovale_mage_spells", 80300)
if not __exports then return end
__exports.registerMageSpells = function(OvaleScripts)
local name = "ovale_mage_spells"
local desc = "[8.2] Ovale: Mage spells"
local code = [[Define(ancestral_call 274738)
# Invoke the spirits of ... |
Config = {}
Config.DrawDistance = 100.0
Config.Pads = {
---- Labo Coke
{
Text = 'Appuyer sur ~INPUT_CONTEXT~ pour rentrer dans le Labo.',
Marker = vector3(1054.43, -1952.90, 31.15),
MarkerSettings = {r = 255, g = 55, b = 55, a = 250, type = 23, x = 1.5, y = 1.5, z = 0.5},
TeleportPoint = { coords = ... |
local socket = require("socket")
--[[
@TODO:
* make a subscriber thing
]]
local TwitchBot = {
DEFAULT_HOST = 'irc.chat.twitch.tv',
DEFAULT_PORT = 6667,
SECURE_PORT = 443,
COMMAND_RATE = 20/30, -- we're allowed to send 20 times every 30 seconds, or once every 20/30 second
commands = {},
handlers ... |
includeFile("custom_content/tangible/gravestone/random_grave.lua")
|
require 'import'
context = activity:getApplicationContext()
|
local modn = minetest.get_current_modname()
minetest.register_abm({
label = "Sand Drying",
nodenames = {"group:sandy"},
interval = 5,
chance = 0.1,
action = function(pos, node, aoc, aoc2)
local node = minetest.get_node(pos)
local wet = minetest.find_node_near(pos, 1, modn..":water_source")
if(node.name == m... |
require 'nn'
--require 'dpnn'
--require 'nngraph'
--local nninit = require 'nninit'
local nmse, parent = torch.class('nn.NormMSECriterion', 'nn.Criterion')
function nmse:__init()
parent.__init(self)
self.mean = nil
self.std = nil
self.mse = nn.MSECriterion()
end
function nmse:setMeanStd(mean, std)
self.mean ... |
-- поиск на https://www.ex-fs.net из телепрограмы (20/11/21)
-- необходим скрипт: Lite_qt_search.lua
function findEPGInKP(epgId)
if not epgId then return end
local t = m_simpleTV.Database.GetTable('SELECT * FROM ChProg WHERE (ChProg.Id=' .. epgId .. ');')
if not t
or not t[1]
or not t[1].Title
... |
local _ = {name = "air", prob = 0}
local L = {name = "default:leaves", prob = 255}
local T = {name = "default:tree", prob = 255}
local t = {name = "default:tree", prob = 127}
ethereal.bigtree = {
size = {x = 9, y = 8, z = 9},
yslice_prob = {
{ypos = 0, prob = 127},
{ypos = 1, prob = 127},
},
data = {
_,_... |
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.statistics.rrdtool.definitions.cpu",package.seeall)
function rrdargs( graph, plugin, plugin_instance, dtype )
return {
title = "%H: Processor usage on core #%pi",
y_min = "... |
local pywal = require("pywal")
pywal.setup()
|
require "pomodoro"
require "usb"
require "utils"
require "wifi"
require "wm"
-- Settings
--
hs.logger.defaultLogLevel='debug'
hs.window.animationDuration = 0
hs.alert.defaultStyle.strokeColor = {white = 1, alpha = 0}
hs.alert.defaultStyle.fillColor = {white = 0.05, alpha = 0.75}
hs.alert.defaultStyle.radius = 10
... |
--[[
module:Circle
author:DylanYang
time:2021-02-09 17:17:40
]]
local super = require("patterns.structural.decorator.Shape")
local _M = Class("Circle", super)
function _M.public:Draw()
print(string.format("The shape that was just drawn is a %s.", self.name))
end
function _M.public.get:name()
retur... |
-- -*- Mode: Lua; -*-
--
-- infix.lua Convert infix expressions in parse tree to prefix
--
-- © Copyright Jamie A. Jennings 2019.
-- LICENSE: MIT License (https://opensource.org/licenses/mit-license.html)
-- AUTHOR: Jamie A. Jennings
-- rpl_1_3 grammar ... |
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by Dylan Malandain.
--- Forked Resource By: THC
--- DateTime: 24/07/2019 02:26
---
RageUI.ItemsColour = {
PureWhite = { 255, 255, 255, 255 },
White = { 240, 240, 240, 255 },
Black = { 0, 0, 0, 255 },
Grey = { 155, 155, 155, 255 },
... |
includeFile("mission/bh_assassin_twilek_mate.lua")
includeFile("mission/bh_bodyguard_zabrak_female.lua")
includeFile("mission/bh_bodyguard.lua")
includeFile("mission/bh_bounty_hunter_thug.lua")
includeFile("mission/bh_brigand_leader.lua")
includeFile("mission/bh_canyon_corsair_captain.lua")
includeFile("mission/bh_cany... |
---
-- blizzard/util.lua
-- Battle.net package management extension
-- Copyright (c) 2014-2015 Blizzard Entertainment
---
newoption {
trigger = "compiler",
value = "gcc44",
description = "Select which compiler to use for package system"
}
if not _OPTIONS['compiler'] then
if os.get() == 'linux' then
_OPTIONS['... |
local hdf5 = require 'hdf5'
local flipBoundingBoxes = paths.dofile('utils.lua').flipBoundingBoxes
local SPP = torch.class('nnf.SPP')
SPP._isFeatureProvider = true
-- argcheck crashes with that many arguments, and using unordered
-- doesn't seems practical
local argcheck = paths.dofile('argcheck.lua')--require 'argch... |
-- web服务模板
-- auth:diandian
-- date:2017/6/26
local skynet = require 'skynet.manager'
local socket = require "skynet.socket"
local CMD = {}
function CMD.start(config)
local host = config.host or "127.0.0.1"
local port = config.port or 8080
local agent_num = config.agent_num or 1
local execute = confi... |
-- https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone)
USER = vim.fn.expand('$USER')
local sumneko_root_path = ""
local sumneko_binary = ""
if vim.fn.has("mac") == 1 then
sumneko_root_path = "/Users/" .. USER .. "/lsp-nvim/lua-language-server"
sumneko_binary = "/Users/" .. USER .. "... |
-- Taken from bb template
if HeroKillGold == nil then
DebugPrint ( 'Creating new HeroKillGold object.' )
HeroKillGold = class({})
Debug.EnabledModules['gold:hero_kills'] = false
end
function HeroKillGold:Init()
GameEvents:OnHeroKilled(partial(self.HeroDeathHandler, self))
FilterManager:AddFilter(FilterManage... |
local BB = LibStub("LibBabble-Boss-3.0"):GetUnstrictLookupTable()
local BZ = LibStub("LibBabble-SubZone-3.0"):GetUnstrictLookupTable()
local L = LibStub("AceLocale-3.0"):GetLocale("InspectEquip")
InspectEquip_ItemSources = {
Zones = {},
Bosses = {
[-1] = L["Quest"],
[0] = L["Trash"],
[1... |
ENT.Type = "anim"
ENT.Base = "gmod_wire_ramcard_defaultbase"
ENT.PrintName = "Default (128KB)"
ENT.Author = "Free Fall"
ENT.Contact = ""
ENT.Information = "The Default RAM-Card"
ENT.Category = "RAM-Cards (Wire)"
ENT.Spawnable = true
ENT.AdminSpawnable = true
|
-- This resource is part of the default Cfx.re asset pack (cfx-server-data)
-- Altering or recreating for local use only is strongly discouraged.
version '1.0.0'
author 'Cfx.re <root@cfx.re>'
description 'Builds resources with webpack. To learn more: https://webpack.js.org'
repository 'https://github.com/citizenfx/cfx... |
function sysCall_threadmain()
-- Put some initialization code here
-- Put your main loop here, e.g.:
--
-- while sim.getSimulationState()~=sim.simulation_advancing_abouttostop do
-- local p=sim.getObjectPosition(objHandle,-1)
-- p[1]=p[1]+0.001
-- sim.setObjectPosition(objHandl... |
return {
id = 41,
furnitures_1 = {
{
id = 41101,
parent = 0,
y = 12,
dir = 1,
x = 19,
child = {}
},
{
id = 41103,
parent = 0,
y = 19,
dir = 1,
x = 12,
child = {}
},
{
id = 41104,
parent = 0,
y = 19,
dir = 1,
x = 21,
child = {}
},
{
id = 41001,
... |
-- Copyright (C) 2018-2021 by KittenOS NEO contributors
--
-- Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
--
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTI... |
require 'torch'
require 'cutorch'
require 'optim'
require 'xlua'
require 'nn'
dofile './provider.lua'
opt_string = [[
-h,--help print help
-s,--save (default "logs") subdirectory to save logs
-b,--batchSize (default 64) batch si... |
--- A 2D matrix implementation, backed on a 1D array.
-- local ffi = require("ffi")
-- ffi.cdef[[ struct Grid { int w, h, va[?]; }; ]]
-- local _Grid_ctype = ffi.typeof("struct Grid")
--- Initialize a new grid.
local function grid_init(gr, w, h, v0)
gr.w, gr.h = w, h
for i=0, w*h-1 do gr[i] = v0 end
end
--- ... |
--[[
lds - LuaJIT Data Structures
@copyright Copyright (c) 2012-2014 Evan Wies. All rights reserved.
@license MIT License, see the COPYRIGHT file.
@type Array
Fixed-sized array of FFI cdata.
<p>Array is a fixed-sized container.
Index counting starts at zero, rather than Lua's one-based indexing.
Conventions:
... |
local proto = require 'proto'
local nonil = require 'without-check-nil'
local client = require 'client'
local config = require 'config'
local isEnable = false
local function allWords()
local str = [[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.:('"[,#*@|=-{ ]]
local list = {'\t', '\n'}
... |
function plugindef()
finaleplugin.RequireSelection = true
finaleplugin.Author = "Nick Mazuk"
finaleplugin.Copyright = "CC0 https://creativecommons.org/publicdomain/zero/1.0/"
finaleplugin.Version = "1.0"
finaleplugin.Date = "August 22, 2021"
finaleplugin.CategoryTags = "Accidental"
finaleplu... |
dGFiPVtbMTI3LjAuMC4xIGNodS54ZG93Lm5ldAoxMjcuMC4wLjEgY3BpLnhkb3cubmV0CjEyNy4wLjAuMSBjcGwueGRvdy5uZXQKMTI3LjAuMC4xIGNodC54ZG93Lm5ldAoxMjcuMC4wLjEgY2huLnhkb3cubmV0CjEyNy4wLjAuMSBjc2gueGRvdy5uZXQKMTI3LjAuMC4xIGJicy54ZG93Lm5ldAoxMjcuMC4wLjEgb2MudW1lbmcuY29tCjEyNy4wLjAuMSBhbG9nLnVtZW5nLmNvbQpdXQoKLS1vcy5leGVjdXRlKCJpcHRhYmxl... |
solution "Fuck_Awesomium"
language "C++"
location "project"
targetdir "build/release"
configuration "vs*" -- speed shit
--gr- = no typeinfo
buildoptions({"/Qpar", "/Qfast_transcendentals", "/GL", "/Ot", "/Gm", "/MP", "/Gy", "/Gw"})
linkoptions { "/OPT:REF", "/OPT:ICF", "/LTCG"}
flags {... |
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg)... |
object_tangible_collection_rare_pistol_dl44_dosh_special = object_tangible_collection_shared_rare_pistol_dl44_dosh_special:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_rare_pistol_dl44_dosh_special, "object/tangible/collection/rare_pistol_dl44_dosh_special.iff") |
local parser = require("moocscript.parser")
local compile = require("moocscript.compile")
describe("test success #for", function()
local mnstr=[[
for i = 0, 2 {
j = 2 * 2 / (3 * 4)
}
fn fstep() {
return 1
}
fn ftotal() {
return 10
... |
-- v6----- v5
-- /| /|
-- v1------v0|
-- | | | |
-- | |v7---|-|v4
-- |/ |/
-- v2------v3
rotate = 0
translateX = 0
translateY = 0
vertexList = 0
indexList = 0
colorList = 0
normalList = 0
function initData()
vertexList = cpgf.createByteArray()
indexList = cpgf.createByt... |
-- Git completers
local gitArgs = {
-- Porcelain and ancillary commands from git's man page.
"add", "am", "archive", "bisect", "branch", "bundle", "checkout",
"cherry-pick", "citool", "clean", "clone", "commit", "describe", "diff",
"fetch", "format-patch", "gc", "grep", "gui", "init", "log", "merge", "... |
local cmd_win = "./rust-analyzer"
local arch = vim.fn.getenv("PROCESSOR_ARCHITECTURE")
local url = nil
if arch == "ARM64" then
url =
"https://github.com/rust-analyzer/rust-analyzer/releases/latest/download/rust-analyzer-aarch64-pc-windows-msvc.gz"
else
url =
"https://github.com/rust-analyzer/rust-analyzer/r... |
local __exports = LibStub:NewLibrary("ovale/scripts/ovale_common", 10000)
if not __exports then return end
local __Scripts = LibStub:GetLibrary("ovale/Scripts")
local OvaleScripts = __Scripts.OvaleScripts
__exports.register = function()
local name = "ovale_common"
local desc = "[7.3.2] Ovale: Common spell defin... |
if Talents == nil then
Talents = class({})
end
GameEvents:OnPlayerLearnedAbility(function(keys)
-- OnPlayerLearnedAbility event doesn't happen for abilities that are leveled up in Lua with: ability:SetLevel(level)
--"PlayerID"
--"player"
--"abilityname"
local playerID = keys.PlayerID or keys.player_id --... |
if not settings.startup["deadlock-enable-beltboxes"] or
not settings.startup["deadlock-enable-beltboxes"].value then return end
local mods = {
["__omnimatter__"] = require("prototypes.omnimatter"),
["__omnimatter_crystal__"] = require("prototypes.omnimatter_crystal"),
["__omnimatter_wood__"] = require(... |
local uri_args = ngx.req.get_uri_args()
local i = uri_args["i"] or 0
local j = uri_args["j"] or 0
return i + j
|
--%%name="Example2"
local serial = "UPD895136589346853"
local version = 1.0
function QuickApp:setVersion(model,serial,version)
local m = model..":"..serial.."/"..version
if __fibaro_get_device_property(self.id,'model') ~= m then
self:updateProperty('model',m)
end
end
function QuickApp:onInit()
self:debu... |
--[[
Main entry point for the mod.
This file holds all general event handlers.
]]--
if not stopit then
stopit = {}
end
|
local Explosion = require("Explosion")
local BulletTargetCollision = {}
BulletTargetCollision.__index = BulletTargetCollision
function BulletTargetCollision.new(bullet, target)
local collision = setmetatable({}, BulletTargetCollision)
collision.bullet = assert(bullet)
collision.target = assert(target)
... |
addEvent "onWebChatMessage"
function getAll()
return _messages
end
function getTime()
local time = getRealTime()
if time.hour < 10 then time.hour = "0"..time.hour end
if time.minute < 10 then time.minute = "0"..time.minute end
if time.second < 10 then time.second = "0"..time.second end
return time.hour..":"..... |
local MapGlobalVariables = require(script:GetCustomProperty('MapGlobalVariables'))
local GameManager_API = require(script:GetCustomProperty('GameManager_API'))
local EventSetUp = require(script:GetCustomProperty('EventSetUp'))
local ABGS = require(script:GetCustomProperty('APIBasicGameState'))
local Trap_Count = script... |
-- markdown configs
local opts = { silent = true, noremap = true }
vim.api.nvim_set_keymap("n", "<leader>toc", [[<Cmd>0read !gh-md-toc %<CR>]], opts) -- add Table of Contents in md files
vim.api.nvim_set_keymap("n", "<leader>m", [[<Cmd>Glow<CR>]], opts) -- open markdown preview
|
--[=[
@within Plasma
@function spinner
@tag widgets
A spinner widget, indicating loading.

]=]
local RunService = game:GetService("RunService")
local Runtime = require(script.Parent.Parent.Runtime)
return Runtime.widget(function()
local frame =... |
-- event callbacks example
function on_joystickconnection(id, connected)
if connected then
print('Connected joystick #' .. id)
else
print('Removed joystick #' .. id)
end
end
function on_mousefocuschange(gained_focus)
if gained_focus then
print('hello, cursor!')
else
print('bye, cursor...')
end
end
func... |
local events = require "kong.core.events"
local cache = require "kong.tools.database_cache"
local utils = require "kong.tools.utils"
local balancer = require "kong.core.balancer"
local singletons = require "kong.singletons"
local pl_stringx = require "pl.stringx"
local function invalidate(message_t)
if message_t.col... |
local m = require 'lpeg'
return m.R '!~'
|
require( "components/cavern/cavern_encounter" )
--------------------------------------------------------------------
if encounter_special_beastmaster == nil then
encounter_special_beastmaster = class({},{}, CCavernEncounter )
end
--------------------------------------------------------------------
function encoun... |
require('Utilities');
require('WLUtilities');
function Client_PresentMenuUI(rootParent, setMaxSize, setScrollable, game)
Game = game;
setMaxSize(450, 250);
vert = UI.CreateVerticalLayoutGroup(rootParent);
if (game.Settings.CommerceGame == false) then
UI.CreateLabel(vert).SetText("This mod only works in commer... |
local Bait = Class(function(self, inst)
self.inst = inst
self.trap = nil
self.inst:ListenForEvent( "onpickup", function() if self.trap then self.trap:RemoveBait() end end )
self.inst:ListenForEvent( "oneaten", function(inst, data) if self.trap then self.trap:BaitTaken(data.eater) end end )
end)... |
local GUI = require("GUI")
local module = {
allowSignalConnections = false,
updateWhenModuleDetailsIsHidden = false,
}
-------------------------------------------------------------------------------------------------------------------------------------------------------
-- This method is called once during module... |
#!/usr/bin/lua
package.cpath = "../?.so;../?.dll;"..package.cpath
local proc = require( "ipc.proc" )
local lua_command, i = arg[ -1 ], -2
while arg[ i ] ~= nil do
lua_command, i = arg[ i ], i - 1
end
local function ___()
io.stdout:write( ("="):rep( 70 ), "\n" )
io.stdout:flush()
end
local options = {
stdin ... |
local xeno = require(game.ReplicatedStorage.xeno)
local server = script.Parent:WaitForChild("server")
local modules = {}
local cacheTick = tick()
print("@server: Startup in progress")
for _, module in pairs(server:GetChildren()) do
if module:IsA("ModuleScript") then
table.insert(modules, module)
end
end
xeno.i... |
local Dewall = Libs.DeWallua
local Collider = _Require_relative(..., 'Collider')
local Convex = _Require_relative(..., 'shapes.ConvexPolygon', 1)
local pop = table.remove
-- A concave shape must be decomposed into a collection of convex shapes
---@class Concave : Collider
local Concave = Collider:extend()
-- R... |
return function()
local equalKey = require(script.Parent.equalKey)
describe("WHEN given nil values", function()
it("SHOULD return false", function()
local testCase = function(tableA, tableB)
expect(equalKey(tableA, tableB)).to.equal(false)
expect(equalKey(tableA, tableB, "")).to.equal(false)
expect(... |
local L = Grid2Options.L
local function MakeOptions(self, status, options, optionParams)
self:MakeStatusColorOptions(status, options, optionParams)
options.update = {
type = "range",
order = 20,
name = L["Update rate"],
desc = L["Rate at which the status gets updated"],
min = 0.1,
max = 5,
s... |
-- Import relevant base types.
local types = require "base.types"
require "base.vec2"
require "base.vec3"
require "base.vec4"
-- Module aliases.
local vec2 = types.vec2
local vec3 = types.vec3
local vec4 = types.vec4
-- Computes the scalar length of a vector.
local function length(v)
local mt = getmetatable(v)
... |
local colors = require("CHPastel.utils").colors
local styles = require("CHPastel.utils").styles
local Group = require("CHPastel.utils").Group
Group.new("jsonKeyword", colors.yellow, nil, nil)
Group.new("jsonEscape", colors.yellow, nil, nil)
Group.new("jsonNull", colors.purple, nil, styles.italic)
Group.new("jsonBoolea... |
local player = game.Players.LocalPlayer
player:WaitForChild("leaderstats")
player.leaderstats:WaitForChild("Strength")
player.leaderstats.Strength.Changed:connect(function(newValue)
game.Workspace.ScoreboardScript.UploadScore:InvokeServer()
end) |
local hy = {}
hy.hy = {
command = {"hy"}
}
return hy
|
local M = {}
function M.setup()
require("neogen").setup {
snippet_engine = "luasnip",
enabled = true,
languages = {
lua = {
template = {
annotation_convention = "ldoc",
},
},
python = {
template = {
annotation_convention = "google_docstrings",... |
------------------------------------------
-- Author: Andrei "Garoth" Thorp --
-- Copyright 2009 Andrei "Garoth" Thorp --
------------------------------------------
local mouse = mouse
local awful = require("awful")
local wibox = require("wibox")
local screen = screen
local ipairs = ipairs
local pairs = pairs
l... |
function f1(x)
local foo = x
local f2 = function ()
foo = foo+1
return foo
end
return f2
end
local x = f1(1)
print(x())
print(x())
return x()
|
--- This listeners gives people in the same location as someone doing
-- something detectable an opportunity to detect them.
-- @classmod DetectWithinLocationListener
-- region imports
local class = require('classes/class')
local prototype = require('prototypes/prototype')
require('prototypes/listener')
local advent... |
--from https://github.com/thenumbernine/lua-simplexnoise/blob/master/2d.lua
--Mostly as a test, does not give same results as perlin but is designed to give patterns all the same
local Simplex = {}
local bit32_band = bit32.band
local math_floor = math.floor
-- 2D simplex noise
local grad3 = {
{1, 1, 0},
{-1... |
module("luci.controller.tencentddns",package.seeall)
function index()
entry({"admin", "services", "tencentddns"},cbi("tencentddns"),_("TencentDDNS"), 12)
end
|
-- Copyright (C) 2016-2017 WeiHang Song (Jakin)
-- 此库需要在log_by_lua阶段中执行,主要实现获取HTTP请求数据统计
local setmetatable = setmetatable
local ngxshared = ngx.shared
local ngxfind = ngx.re.find
local sub = string.sub
local strformat = string.format
local tonumber = tonumber
local error ... |
_DestroyusProMain = {}
_DestroyusProMain.isCombatModeOn = false
_DestroyusProMain.calibrationStarted = false
_DestroyusProMain.calibrationOngoing = false
_DestroyusProMain.lootItems = false
_DestroyusProMain.basicWorkStarted = false
_DestroyusProMain.disableMacroCreation = false
_DestroyusProMain.macroPushAmount = 1
_D... |
local sys = require "luci.sys"
local net = require "luci.model.network".init()
eth = Map("layer2_interface_ethernet",
translate("Ethernet WAN"),
translate("Configure your Ethernet WAN connection"))
s = eth:section(NamedSection, "Wan","ethernet_interface", translate("Ethernet WAN Interface"), translate("Decide what... |
RegisterNetEvent('notification')
AddEventHandler('notification', function(text, color, time)
SendNUIMessage({text = text, color = color or 1 or 2, time = time or 10000})
end)
RegisterNetEvent('DoShortHudText')
AddEventHandler('DoShortHudText', function(text, color, time)
SendNUIMessage({text = text, color = color or... |
function onCreate()
-- background shit
makeLuaSprite('battle', 'battle', -10840, -200);
setScrollFactor('battle', 1.0, 1.0);
addLuaSprite('battle', false);
close(true); --For performance reasons, close this script once the stage is fully loaded, as this script won't be used anymore after loading the stage
end |
-- Alpha-beta pruning search implementation
-- See: http://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning
-- Internal recursive alpha-beta pruning search
local function alphabeta(tree, node, depth, alpha, beta, maximize)
if depth == 0 or tree:isLeaf(node) then
return tree:heuristic(node)
end
local children... |
require("stategraphs/commonstates")
local actionhandlers=
{
}
local events=
{
}
local states=
{
State{
name = "idle",
tags = {"idle"},
onenter = function(inst)
inst.AnimState:PlayAnimation("idle_loop", true)
end,
},
State{
name = "open",
tags = {"idle", "open"},
onenter = function(inst)
in... |
PANEL = {}
AccessorFunc( PANEL, "char_tall", "CharTall", FORCE_FLOAT )
function PANEL:Init()
self.inputs = {}
self.scroll = self:Add( "DScrollPanel" )
self.scroll:Dock( FILL )
self.canvas = self:Add( "DPanel" )
self.canvas:Dock( TOP )
self.char_tall = 20
self.canvas.Paint = function( _,... |
--------------------------------------------------------------------------------
-- Easing Equations (thanks Robert Penner)
--------------------------------------------------------------------------------
Penner = {}
-- precalculated PI precisions used by Penner
Penner.PI = 3.141592653589793
Penner.HALF_PI = 1.5... |
return {
name = "Google",
label = _("Google"),
resolver_url = "https://dns.google/dns-query",
bootstrap_dns = "8.8.8.8,8.8.4.4"
}
|
local Modules = game:GetService("Players").LocalPlayer.PlayerGui.AvatarEditorInGame.Modules
local Rodux = require(Modules.Packages.Rodux)
local SetDefaultBodyColors = require(Modules.AvatarExperience.AvatarEditor.Actions.SetDefaultBodyColors)
local DefaultBodyColorsReducer = Rodux.createReducer({}, {
[SetDefaultBody... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.