content stringlengths 5 1.05M |
|---|
local _M = {}
local cjson = require("cjson");
_M.DRM_SYSTEM_ID = {
[ "61941095315515465232184672216011011419644" ] = function (param)
if param.contentID ~= nil then
if ngx.ctx.contentID == nil then
ngx.ctx.contentID = {};
end
ngx.ctx.contentID[#ngx.ctx.contentID + 1] = param.contentID;
return tru... |
local BannZayLib = LibStub:GetLibrary("BannZayLib-1.0")
local Array = BannZayLib.Array;
local KVP = BannZayLib.KVP;
local Logger = BannZayLib.Logger;
local Utils = BannZayLib.Utils;
local Namespace = BannZayLib.Namespace;
local db;
local logger = Logger:New("TrinketAlerter", 3);
local TrinketAlerter = LibStub("AceAdd... |
local export = {}
local consonants = {
["ক"]="k", ["খ"]="kh", ["গ"]="g", ["ঘ"]="gh", ["ঙ"]="ṅ", ["চ"]="c", ["ছ"]="ch", ["জ"]="j", ["ঝ"]="jh", ["ঞ"]="ñ", ["ট"]="ṭ", ["ঠ"]="ṭh", ["ড"]="ḍ", ["ড়"]="ṛ", ["ঢ"]="ḍh", ["ঢ়"]="ṛh", ["ণ"]="ṇ", ["ত"]="t", ["থ"]="th", ["দ"]="d", ["ধ"]="dh", ["ন"]="n", ["প"]="p", ["ফ"]="ph", ["ব... |
-- Translate this addon to your language at:
-- https://wow.curseforge.com/projects/kibs-item-level-continued/localization
local addonName = "KibsItemLevelContinued"
local addonNamespace = LibStub and LibStub(addonName .. "-1.0", true)
if not addonNamespace then return end
local L = LibStub and LibStub('AceLoc... |
require 'nn'
require 'loadcaffe'
require 'src/SpatialCircularPadding'
----------------------------------------------------------
-- Shortcuts
----------------------------------------------------------
function conv(in_,out_, k, s, m)
m = m or 1
s = s or 1
local to_pad = (k-1)/2*m
if to_pad == 0 then... |
-- с сервера на клиент пришли события
local events_client=function(data,clientId)
log("received events:"..pack(data))
local events=data.events
--local login=Server.loginByClient[clientId]
for k,event in pairs(events) do
--event.isRemote=true
Event.register(event)
end
end
return events_client
|
local mod_groups = module:depends("groups_internal");
module:hook("user-registered", function(event)
local validated_invite = event.validated_invite or (event.session and event.session.validated_invite);
if not validated_invite then
-- not registered via invite, nothing to do
return
end
local groups = validate... |
-- defined below
local close
-- metatable to allow garbage-collecting file descriptors
local fd_mt = {
__index = {
close = function(wrapper)
close(wrapper.fd)
wrapper.fd = nil
--print("Manually closed "..wrapper.fd)
end
},
__gc = function(wrapper)
close(wrapper.fd)
--print("GC: closed "..wrapper.f... |
api_version = "1.0.0"
kills = 0;
deaths = 0;
lastKilledBy = -1
timedSpree = 0
lastKillTime = 0
spree = 0
lastDeath = 0
spreeCounters = {}
lastKillTimes = {}
captures = 0
deathSpree = 0
queued = 0
function register_callbacks()
mute_announcer()
register_callback(cb['PLAYER_KILLS'], "player_kills")
register_callback(... |
local K, C = unpack(select(2, ...))
local Module = K:GetModule("Miscellaneous")
-- Credit Baudzilla
local _G = _G
local sin, cos, rad = _G.math.sin, _G.math.cos, _G.rad
local CreateFrame = _G.CreateFrame
local GetNumGroupMembers = _G.GetNumGroupMembers
local UnitIsGroupLeader = _G.UnitIsGroupLeader
local UnitIsGroup... |
--# selene: allow(unused_variable)
---@diagnostic disable: unused-local
-- Various hashing algorithms
---@class hs.hash
local M = {}
hs.hash = M
-- Calculates an HMAC using a key and an MD5 hash
--
-- Parameters:
-- * key - A string containing a secret key to use
-- * data - A string containing the data to hash
--
... |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('StoryBit', {
ActivationEffects = {
PlaceObj('PauseExpedition', nil),
},
Effects = {
PlaceObj('ResumeExpedition', nil),
},
Prerequisites = {
PlaceObj('IsCustomAnomaly', {
'id', "XMarksTheSpot",
}),
},
ScriptDone = true,
Text ... |
local System = require 'System'
local Target = require 'Target'
local P = {}
local function write_pkg_var(w, prefix, name, value)
if not value then return end
local tp = type(value)
if tp == 'string' or tp == 'number' then
w("pkg_%s%s='%s'", prefix, name, value)
elseif tp == 'boolean' then
... |
local Class = require 'lib.hump.class'
local Command = getClass 'wyx.command.Command'
local ConsoleEvent = getClass 'wyx.event.ConsoleEvent'
local property = require 'wyx.component.property'
local message = require 'wyx.component.message'
-- AttachCommand
--
local AttachCommand = Class{name='AttachCommand',
inherits=... |
local server_conf = require "global.server_conf"
local server_mgr = require "server.server_mgr"
local timer_mgr = require "timer.timer"
local Log = require "log.logger"
local g_funcs = require "global.global_funcs"
local class = require "util.class"
local cutil = require "cerberus.util"
local msg_def = require "global... |
--[[
Copyright (C) 2013-2018 Draios Inc dba Sysdig.
This file is part of sysdig.
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 ... |
--
-- Please see the license.html file included with this distribution for
-- attribution and copyright information.
--
function onInit()
if not User.isHost() then
TokenManager.addDefaultHealthFeatures(getHealthInfo, {"hp", "hptemp", "nonlethal", "wounds", "status"});
else
TokenManager.addDefaultHealt... |
module("inbound.fcdns", package.seeall)
require("msys.core");
require("msys.pbp");
require("inbound.limits");
local mod = {}
inbound.fcdns.conf = {
-- Limits to apply when FCDNS failed. Note that the current behavior is to
-- completely fail the connection if RDNS fails, so there are no limits
-- for that case... |
local object = {}
local php
function object.setupInterface( options )
-- Remove setup function
object.setupInterface = nil
-- Copy the PHP callbacks to a local variable, and remove the global
php = mw_interface
mw_interface = nil
-- Install into the mw global
mw = mw or {}
mw.ext = mw... |
local drop = function(pos, itemstack)
local it = itemstack:take_item(itemstack:get_count())
local obj = core.add_item(pos, it)
if obj then
obj:setvelocity({x=math.random(-1,1), y=5, z=math.random(-1,1)})
local remi = minetest.setting_get("remove_items")
if remi and remi == "true" then
obj:remov... |
local minimap_button = LibDBIcon10_TwitchEmotes
local menu_width = 600
local menu_height = 400
-- NOTICE: BUILD MENU ITEMS FROM TWITCHEMOTESMENU LOCAL DEFAULTPACK, COPY THE CODE AS FOLLOWS (Javascript)
-- > let table = `{INSERT local defaultpack = {} HERE}`
-- > let replaced = table.replaceAll(/ \[/g, ' [')... |
local ltn12 = require("resty.smtp.ltn12")
local mime = require("resty.smtp.mime")
local smtp = require("resty.smtp")
local ssl = require 'ssl'
local https = require 'ssl.https'
local socket = require("socket")
local config = require("lua.config")
local _M = {}
local function sslCreate()
local sock = socket.tcp()
... |
local LSM = LibStub("LibSharedMedia-3.0")
local ruRU, western = LSM.LOCALE_BIT_ruRU, LSM.LOCALE_BIT_western
local flag = ruRU + western
local FONT = LSM.MediaType.FONT
local STATUSBAR = LSM.MediaType.STATUSBAR
local BACKGROUND = LSM.MediaType.BACKGROUND
local BORDER = LSM.MediaType.BORDER
local path = "Interface\\AddO... |
option("ffmpeg")
set_default(false)
set_showmenu(true)
set_description("Build FFmpeg plugin")
option_end()
if has_config("ffmpeg") then
add_requires("ffmpeg", { configs = { shared = true } })
target("PluginFFmpeg")
set_kind("shared")
set_group("Plugins")
add_rpathdirs("$ORIGIN")
add_deps("NazaraUtility... |
return function(room)
local hotspot
hotspot = Hotspot.new("doorback", 2, "Back", true,
Polygon.new({
2, 615,
1278, 610,
1279, 718,
0, 718,
}) , 0)
hotspot:setWalkspot(680, 595)
room:addHotspot(hotspot)
hotspot = Hotspot.new("wibbly",... |
--***********************************************************
--** THE INDIE STONE **
--***********************************************************
require "Vehicle/ISVehiclePartMenu"
--Hydrocraft.HCPropanetankempty
function ISVehiclePartMenu.getPropaneTankNotFull(playerObj, type... |
local priority_queue = require "src/core/priority_queue"
local test = {}
test[#test + 1] = function()
local pq = priority_queue.new(math.min)
pq:push(3)
assert(3 == pq:top())
assert(1 == pq:height())
pq:push(4)
assert(3 == pq:top())
assert(2 == pq:height())
pq:push(5)
assert(3 =... |
local classic = require 'classic'
local Env = require 'rlenvs/Env'
local Catch, super = classic.class('Catch', Env)
-- Constructor
function Catch:_init(opts)
opts = opts or {}
super._init(self, opts)
-- Difficulty level
self.level = opts.level or 2
-- Probability of screen flickering
self.flickering = op... |
require("dialogue")
local d = Dialogue:new()
ch = {
{text = "First Choice", next = "firstSelected"},
{text = "Second Choice", next = "secondSelected"}
}
d:add {
id = "choice",
text = "What do you choose?",
choices = ch,
start = true
}
d:add {id = "firstSelected", text = "First Selected!"}
d:... |
require("Framework.Utilitys.Log")
require("Framework.Extension.String")
require("Framework.Extension.Table")
require("Framework.Foundation.Class")
require("Framework.Foundation.LuaUpdate")
require("Framework.Foundation.LuaTimer")
require("Framework.Foundation.Coroutine")
require("Framework.Foundation.Misc")
req... |
up=vec3(0,1,0)
inp=vec3(0,0,0);ay=0;ax=0
input=script();menu=script()
dt=0.02;zoom=40
euler= Quat.fromEuler
rotate=Quat.rotate
trans=-1;tolevel="next"
trandir=1
transition=function()
if trans<=1 and trans >=0 then
trans=trans+trandir*dt*3
findEntity('black').button.alpha=trans
elseif trans>1 then
tra... |
-- Gaster <3
-- Somewhat The Same Problem I Had With Gakisera.
wait(0.016666666666667)
Effects = {}
local Player = game.Players.localPlayer
local Character = Player.Character
local Humanoid = Character.Humanoid
local mouse = Player:GetMouse()
local m = Instance.new("Model", Character)
m.Name = "WeaponModel"
local effe... |
local REQUEST_NOTIFY_MESSAGE_MSG_NAME = "TGNSMenuDisplayer_RequestNotifyMessage"
TGNS.RegisterNetworkMessage(REQUEST_NOTIFY_MESSAGE_MSG_NAME, { prefix = "string(100)", text = "string(900)" })
if Server then
TGNS.HookNetworkMessage(REQUEST_NOTIFY_MESSAGE_MSG_NAME, function(client, message)
local md = TGNSMessageDis... |
props = {
{"Part", "Body", BrickColor.new("White"), Enum.Material.SmoothPlastic, 0.5, 0.5, true, Enum.FormFactor.Custom, Enum.PartType.Block, Vector3.new(0.400000006, 2.60000038, 8.99999619), Enum.SurfaceType.Smooth, Enum.SurfaceType.Smooth, Enum.SurfaceType.Smooth, Enum.SurfaceType.Smooth, Enum.SurfaceType.Smooth, Enu... |
local cfg = {}
cfg.remove_interval = 1000 -- number of milliseconds between two remove check
-- Veh model blacklist, names (string) or hashes (number)
cfg.veh_models = {
"police",
"ambulance",
"policeb",
"police2",
"police3",
1938952078 --FireTruck (firetruk <= model name)
}
return cfg
|
package.path = package.path .. ";/home/irocha/.luarocks/share/lua/5.1/?.lua;"
package.cpath = package.cpath .. ";/home/irocha/.luarocks/lib/lua/5.1/?.so;"
local apr = require "apr"
local cassandra = require "cassandra"
local session = cassandra.new()
session:set_timeout(1000) -- 1000ms timeout
local connected, err =... |
--[[
Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com>
This code is licensed under the MIT. See LICENSE for details.
]]
local captionbotai = {}
local mattata = require('mattata')
local https = require('ssl.https')
local ltn12 = require('ltn12')
function captionbotai:on_new_message(message,... |
function love.conf(t)
t.releases = {
title = "candyclicker",
package = "candyclicker",
loveVersion = "0.10.2",
version = "0.1",
author = "Egor Dorichev",
email = "egordorichev@gmail.com",
description = "CANDIES!",
homepage = nil,
identifier = "candyclicker",
excludeFileList = {},
releaseDirectory... |
local helpers = require('test.unit.helpers')(nil)
local cimport = helpers.cimport
local to_cstr = helpers.to_cstr
local ffi = helpers.ffi
local eq = helpers.eq
local eval = cimport('./src/nvim/eval.h', './src/nvim/eval/typval.h',
'./src/nvim/hashtab.h')
local null_string = {[true]='NULL string'}... |
local DanceFloorArea = {}
local SIZE = 50 --x and z size of the dancefloor.
local CENTER = Vector2.new(30, 0) --the center of the dance floor.
local HALFSIZE = SIZE/2
--[[
@return Whether or not the Player's Character is within the DanceArea bounds.
false if their Character does not exist.
]]
function DanceFloor... |
--[[
/////// //////////////////
/////// 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: iL... |
local replicating_swift_transport_belt = {
type = "technology",
name = "replicating-swift-transport-belt",
localised_name = {"replicating-belts.prefix", {[1] = "replicating-belts.swift-transport-belt-lower"}},
localised_description = {"replicating-belts.technology-description", {[1] = "replicating-belts.swi... |
local composer = require( "composer" )
local scene = composer.newScene()
-- -----------------------------------------------------------------------------------
-- Code outside of the scene event functions below will only be executed ONCE unless
-- the scene is removed entirely (not recycled) via "composer.removeScen... |
--[[
##############################################################################
S V U I By: Failcoder
##############################################################################
##########################################################
LOCALIZED LUA FUNCTIONS
###################################################... |
--[[
For title screen. Will show InternalName:Version
Ex:
RIO:2018-10-04
DISPLAY TYPE: HD
]]
SysInfo = {
InternalName = "RIO4W",
Version = "2021-06-26",
}
RIO_FOLDER_NAMES = {
EasyFolder = "99-Easy",
--SpecialFolder = "99-Special",
SnapTracksFolder = "00-Snap Tracks",
FullTracksFolder = "80-Full T... |
-- @group Animation
-- @brief Spine integration.
-- @brief Gets the path to the asset with the JSON skeleton data from JSON name.
-- @param name The skeleton name.
-- @return The path.
function spine.getJsonPath(name)
return name .. '.json'
end
-- @brief Gets the path to the asset with the texture atlas... |
object_mobile_coa_aclo_saboteur_nautolan = object_mobile_shared_coa_aclo_saboteur_nautolan:new {
}
ObjectTemplates:addTemplate(object_mobile_coa_aclo_saboteur_nautolan, "object/mobile/coa_aclo_saboteur_nautolan.iff")
|
require "/scripts/vec2.lua"
require "/interface/navigationtools/markers.lua"
require "/scripts/navigationtools/minimap.lua"
require "/interface/navigationtools/buttons.lua"
require "/interface/navigationtools/tilestore.lua"
-- COLOURS = {
-- [TileStore.tileTypes.UNKNOWN] = {0, 0, 0, 255},
-- [TileStore.tileTypes.NOT... |
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0213-rc-radio-climate-parameter-update.md
-- Description:
-- Preconditions:
-- 1) SDL got RC.GetCapabilities("climateEnableAvailable" = ... |
kObservatoryBuildTime = 12 -- was 15
kRoboticsFactoryBuildTime = 15 -- was 10
|
ITEM.name = "PTRS-41"
ITEM.description= "A humongous anti-tank rifle. Fires 14.5x114mm."
ITEM.longdesc = "The PTRS-41 is an anti-tank rifle developed during World War II. While it no longer puts up a threat against anything larger than an early BTR, it will take out any of the beasts or armored figures in the Zone with... |
insulate("documentation on Menu", function()
require "init"
require "spec.mocks"
require "spec.asserts"
require "spec.universe"
it("new", function()
withUniverse(function()
-- tag::basic[]
local player = PlayerSpaceship():setPosition(0, 0)
Player:withMen... |
--[[ Copyright (c) 2011 Manuel "Roujin" Wolf
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, dist... |
--[[=============================================================================
Commands received from the thermostatV2 proxy (ReceivedFromProxy)
Copyright 2015 Control4 Corporation. All Rights Reserved.
===============================================================================]]
-- This macro is... |
local _actions = require("telescope.actions")
local trouble = require("trouble.providers.telescope")
local telescope = require("telescope")
telescope.setup {
defaults = {
mappings = {
i = { ["<c-t>"] = trouble.open_with_trouble },
n = { ["<c-t>"] = trouble.open_with_trouble },
},
},
}
|
object_tangible_tcg_series5_hangar_ships_hutt_fighter_light_02 = object_tangible_tcg_series5_hangar_ships_shared_hutt_fighter_light_02:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series5_hangar_ships_hutt_fighter_light_02, "object/tangible/tcg/series5/hangar_ships/hutt_fighter_light_02.iff") |
local MakeRequest = require(script.Parent.HTTP).MakePlayFabApiCall
local Promise = require(script.Parent.Promise)
local Settings = require(script.Parent.Settings)
local TS = require(script.Parent.TS)
local CancelAllMatchmakingTicketsForPlayer = Promise.promisify(function(request)
if Settings._internalSettings.entityT... |
local wezterm = require 'wezterm';
return {
color_scheme = "Builtin Solarized Light",
keys = {
{key="-", mods="SUPER",
action=wezterm.action{SplitVertical={domain="CurrentPaneDomain"}}},
{key="|", mods="SUPER|SHIFT",
action=wezterm.action{SplitHorizontal={domain="CurrentPaneDomain"}}},
... |
local _,_,slot = ...
local inv = openInventory()
local map = inv.getMap()
local slot = inv.getSlot(map.hotbar[slot])
if slot and slot.id == "minecraft:fishing_rod" then
bobberId = nil
end |
local f = string.format
local t = My.Translator.translate
My.Translator:register("en", {
comms_generic_hail = function(person)
return Util.random({
"Hello.",
"Hi.",
"Good day.",
"Greetings.",
}) .. " " .. t("comms_generic_introduction", person)
en... |
-----------------------------------------------------------
-- Telescope configuration file
-----------------------------------------------------------
-- Plugin: telescope.nvim
-- https://github.com/nvim-telescope/telescope.nvim
require('telescope').setup {
extensions = {
fzf = {
fuzzy = true, ... |
local core = require "reload.core"
local skynet = require "skynet"
local function get(f, name)
local i = 1
repeat
local n, v = debug.getupvalue(f, i)
if n == name then
return v
end
i = i+1
until n == nil
end
local function raise_error()
local session_coroutine_id = get(skynet.exit, "session_coroutine_i... |
--- True if you would like to log message that pass through an interface.
-- the received message, response sent, sent message, and response received
-- are all appended to the end of the newest log file
LOG_MESSAGES=true
--- True if you would like received messages to be stored to disk before
-- processing on all cha... |
--[[
Model - Usual/Unusual work place
Type - MNL
Authors - Siyu Li
]]
-- all require statements do not work with C++. They need to be commented. The order in which lua files are loaded must be explicitly controlled in C++.
--require "Logit"
--Estimated values for all betas
--Note: the betas that not estima... |
entities = {}
entity_queue = {}
function criteria_closest(pos, entity)
return -Vector.distance(pos, entity:get_pos())
end
function criteria_first(pos, entity)
return entity.progress
end
function criteria_last(pos, entity)
return -entity.progress
end
function criteria_strongest(pos, entity)
return... |
local gumbo = require "gumbo"
drive = {}
local tinsert = table.insert
local tconcat = table.concat
local printf = util.printf
-- Retreive a web resource by URL. The downloaded file and its associated
-- response headers (extension '.hdr') will be cached in the specified cache
-- directory. An attempt to download the... |
---@meta
---@class ccui.Helper
local Helper={ }
ccui.Helper=Helper
---* brief Get a UTF8 substring from a std::string with a given start position and length<br>
---* Sample: std::string str = "中国中国中国"; substr = getSubStringOfUTF8String(str,0,2) will = "中国"<br>
---* param str The source string.<br>
---* param st... |
DBTable = {
input_type = "db",
icon = "database.png",
}
function DBTable:call_action(call_args)
self.status = "Done"
end
|
#!/usr/bin/env lua5.1
local lib = "com.github.thetaepsilon.minetest.libmthelpers"
local stack =
mtrequire(lib..".datastructs.stack")
local n = stack.new
-- bad behaviour testing:
-- ensure errors are thrown when the constructor values are invalid.
local e = "err.args.expected_t.numeric.natural_or_zero"
local exp... |
fx_version 'cerulean'
games { 'gta5' }
author 'Titanium Development'
description 'In-game integration for TitaniumCAD!'
version '1.0.0'
client_scripts {
'/client/client.lua'
}
server_scripts {
'config.lua',
'/server/server.lua'
}
files {
'/ui/index.html',
'/ui/main.js',
'/ui/iPad-Frame.png'... |
local lp = love.physics
local function removeDestroyed (t)
if not t then return {} end
for i = #t, 1, -1 do
if t[i]:isDestroyed() then
table.remove(t, i)
end
end
return t
end
-- Shape
local function ChainShape (t)
local shape = lp.newChainShape(false, t.points)
sha... |
--[[
Copyright 2015 MongoDB, Inc.
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, software
... |
local type, tostring = type, tostring
local string_byte, string_char, string_sub = string.byte, string.char, string.sub
local band, bor, bxor, lshift, rshift = bit.band, bit.bor, bit.bxor, bit.lshift, bit.rshift
local table_concat, math_random, math_ceil = table.concat, math.random, math.ceil
local exports = {}
local... |
#!/usr/bin/luvit
_G.require = require
package.path=package.path:gsub("/local", "")
package.cpath=package.cpath:gsub("/local", "")
local uv = require "uv"
local argparse = require "argparse"
local timer = require 'timer'
local Json = require "cjson"
local Thread = require "thread"
local posix = require "posix"
local Re... |
------------------------------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0189-Restructuring-OnResetTimeout.md
------------------------------------------------------------------------------... |
---------------------------------------------------------------------------------------------------
-- Proposal:
-- https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0221-multiple-modules.md
-- Description:
-- HMI sent all modules capabilities to the SDL. Mobile App consequently sends "SetInterior... |
-- Configure this as a double-wide frame to stop the UIParent trampling on it
UIPanelWindows["QuestLogFrame"] = { area = "override", pushable = 0, xoffset = -16, yoffset = 12, bottomClampOverride = 140+12, width = 724, height = 513, whileDead = 1 };
function GetElvUI()
local elvEnabled = IsAddOnLoaded("ElvUI")
... |
-------------------------------------------------------------------------------
-- create an erosion sim object
function erosion(arg)
local res = arg.res or 32
local tw, th = arg.terrain:getDimensions()
local r = {
--erosion params
dissolve_rate = arg.dissolve_rate or 0.1,
sediment_rate = arg.sediment_rate or ... |
-- This is an information file. No code of this file is called in the game.
-- This is an information file. No code of this file is called in the game.
-- This is an information file. No code of this file is called in the game.
---- Check if a player has the keys to a vehicle
-- Works with a callback. This function is... |
data:extend{
{
type = "tips-and-tricks-item-category",
name = "RateCalculator",
order = "l-[RateCalculator]"
},
{
type = "tips-and-tricks-item",
name = "rcalc-introduction",
category = "RateCalculator",
order = "a",
is_title = true,
image = "__RateCalculator__/graphics/tips-and... |
require "luacom"
local vt = luacom.CreateObject("Dragon.VTxtCtrl.1")
vt:Register("","luaorb")
print(vt.Speed)
print(vt.SpeedMin)
print(vt.SpeedMax)
vt:Speak("Oh Hi Manuel Roman")
vt:Speak("I am Hal.")
vt:Speak("I became operational in Urbana, Illinois, on November 5, 2001.")
|
fx_version 'cerulean'
games { 'gta5' }
author 'MasiBall'
description 'Simple blackout resource'
shared_scripts {
'@es_extended/imports.lua',
'config.lua'
}
client_scripts {
'client/cl_bo.lua'
}
server_scripts {
'server/sv_bo.lua'
} |
object_tangible_quest_naboo_theed_refining_station = object_tangible_quest_shared_naboo_theed_refining_station:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_naboo_theed_refining_station, "object/tangible/quest/naboo_theed_refining_station.iff")
|
require('prototypes/pipe-pictures')
if settings.startup["enable-moreshinybobs"] and settings.startup["enable-moreshinybobs"].value == true then
require('prototypes/moreshinybobs/order/pole-order')
end
if settings.startup["enable-tuonelatweaks"] and settings.startup["enable-tuonelatweaks"].value == true then
if data... |
function fmtTable(tab, indent)
local result = ""
for k, v in pairs(tab) do
for j = 1, indent do
result = result .. " "
end
result = result .. tostring(k) .. " : "
if type(v) == "table" then
result = result .. "<br />" .. fmtTable(v, indent+2)
... |
require("Menu/settings.lua")
require("Menu/MainMenu/mainMenuStyle.lua")
require("MapEditor/mapSettingsTable.lua")
--this = SceneNode()
DeafultCameraPosition = {}
function DeafultCameraPosition.new()
local self = {}
local camera = nil
local form = nil
local keyBinds = Core.getBillboard("keyBind");
... |
return function()
local result = {}
if not game.active_mods['bobinserters'] then
return nil
end
return {
categories = {
inserters = {
groups = {
express = {
order = 1200,
items = {
... |
local M = {}
local api
local line_text = { here = "hey" }
local test_tbl = {
num = 0,
bool = true,
str = "aye!",
something = line_text.here
}
--- @class example
-- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean accumsan dapibus ex,
-- duis tincidunt consectetur nisl at auctor. Mauris et dictum ur... |
require('components/filters/filtermanager')
-- filters
require('components/filters/bottlecounter')
require('components/filters/sellblacklist')
--require('components/filters/statusresistance')
require('components/filters/bountyrunepick')
--require('components/filters/shadowtowers')
require('components/filters/modifyabi... |
data:extend({
--ENTITY
{--Cargo Wagon R1
type = "cargo-wagon",
name = "cargo-wagon-r1",
icon = "__RERailworld__/graphics/icons/wagon/cargo-wagon-r1.png",
icon_size = 32,
flags = {"placeable-neutral", "player-creation", "placeable-off-grid", },
inventory_size = 150,
minable = {mining_time = 1, result = "cargo-wa... |
-- 测试全局别名不允许二次修改
local skynet = require "skynet"
-- local skynetmanager = require "skynet.manager"
require "skynet.manager"
local skynethabor = require "skynet.harbor"
skynet.start(function ()
local handler = skynet.newservice("test5call")
skynet.error("准备命名1", type(skynethabor))
for k,v in pairs(sky... |
local awful = require('awful')
local wibox = require('wibox')
local gears = require('gears')
local beautiful = require('beautiful')
local dpi = beautiful.xresources.apply_dpi
local clickable_container = require('widget.clickable-container')
local config_dir = gears.filesystem.get_configuration_dir()
local widget_ico... |
local PLUGIN = PLUGIN;
-- Called just after a player spawns.
function PLUGIN:PostPlayerSpawn(player, lightSpawn, changeClass, firstSpawn)
if (!lightSpawn) then
player.mineReady = false;
end;
end;
-- Called when a player presses a key.
function PLUGIN:KeyPress(player, key)
if (key == IN_DUCK) then
if (Schema.sc... |
local trigger = {}
trigger.name = "MaxHelpingHand/OneWayCameraTrigger"
trigger.placements = {
name = "trigger",
data = {
left = true,
right = true,
up = true,
down = true,
flag = "",
blockPlayer = false
}
}
return trigger |
a = {{x=0, y=0}, {x=8, y=21}, {x=3, y=5}}
b = a; -- copies the reference: b and a share
c = {}
for key, value in pairs(a) do
c[key] = value
end -- makes a shallow copy of a into c
b[1] = 100
assert(a[1] == 100) -- demonstrate a and b are shared
c[2] = 200
assert(a[2].x == 8) ... |
-- Copyright (C) 2017-2020 DBotThePony
-- 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, publis... |
--[[
This module handles the behavior of "cards" which includes pet cards, notes
and win records. Preferences and possibly team cards will become cards in
the future.
These cards are hybrid tooltips and dialogs. When the mouse is over a button
that displays a card, the card will behave like a tooltip: moving the... |
local actions = require('telescope.actions')
require('telescope').setup {
find_command = {
'rg', '--no-heading', '--with-filename', '--line-number', '--column',
'--smart-case'
},
use_less = true,
file_previewer = require'telescope.previewers'.vim_buffer_cat.new,
grep_previewer = re... |
local obj={}
obj.__index = obj
obj.name = "browserTabs"
obj.version = "1.0"
obj.author = "ashfinal <ashfinal@gmail.com>"
-- Internal function used to find our location, so we know where to load files from
local function script_path()
local str = debug.getinfo(2, "S").source:sub(2)
return str:match("(.*/)")
en... |
local u = require("nvim-lsp-ts-utils.utils")
local lsp = vim.lsp
local exec_first = function(actions)
if not actions or not actions[1] then
u.print_no_actions_message()
return
end
local action = actions[1]
lsp.buf.execute_command(type(action.command) == "table" and action.command or a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.