content stringlengths 5 1.05M |
|---|
--! rocketnn
--@ commonstargets commonsweapons commons eventdriver firstrun weapontypes neuralnet secant shuffle debug
-- Neural net-based rocket turret predictor
Main = EventDriver.new()
NN = NeuralNet.new(1, 3, 1)
NN:Randomize()
TrainingSets = {}
TrainingSamplesCaptured = 0
TrainingEpoch = 0
TrainingSetIndex = 0
La... |
vim.opt.breakindent = true -- make wrapped lined match previous indentation
vim.opt.breakindentopt = "shift:2" -- emphasize broken lines by indenting them
vim.opt.clipboard = "unnamedplus" -- use system clipboard
vim.opt.colorcolumn = "80" -- display vertical gray line at 80 columns
vim.opt.cursorline = true -- enable ... |
local Objects = require ('map.file.objects')
local W3Q = {}
function W3Q.unpack (input)
return Objects.unpack (input, true)
end
function W3Q.pack (input)
return Objects.pack (input, true)
end
return W3Q
|
local Map = require("game.Map")
local Server = require("net.Server")
local TextButton = require("ui.TextButton")
local SelectButton = require("ui.SelectButton")
local TextBox = require("ui.TextBox")
local MenuScene = Object:extend()
function MenuScene:new(game, font)
self.ip = TextBox(game, font, "ENTER IP...", 4, ... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:28' using the latest game version.
NOTE: This file should only be used as IDE support; it should NOT be distributed with addons!
****************************************************************************
CONTENTS OF THIS FILE IS COPYRI... |
minetest.register_node("yatm_decor:vent", {
description = "Vent",
groups = {cracky = 1},
tiles = {
"yatm_vents_vent.png",
},
paramtype = "none",
paramtype2 = "facedir",
sounds = yatm.node_sounds:build("metal"),
})
|
-- 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_WalkingDead201_data\RiverWoods_temp.lua
-- params : ...
-- function num : 0 , upvalues : _ENV
local kScript = "RiverWoods"
lo... |
mosespa_conversationtemplate = ConvoTemplate:new {
initialScreen = "mosespa_initial",
templateType = "Lua",
luaClassHandler = "mosespa_racetrack_convo_handler",
screens = {}
}
mosespa_initial = ConvoScreen:new {
id = "mosespa_initial",
leftDialog = "@conversation/racing_mosespa:s_e0de16cc",
stopConversation = "... |
local M = {}
function M.setup()
require("toggleterm").setup {
size = 20,
hide_numbers = true,
open_mapping = [[<C-\>]],
shade_filetypes = {},
shade_terminals = false,
shading_factor = 0.3,
start_in_insert = true,
persist_size = true,
direction = "horizontal",
}
end
return M
|
-- This file is subject to copyright - contact swampservers@gmail.com for more information.
-- INSTALL: CINEMA
SS_Tab("Construction", "bricks")
SS_Heading("Tools")
local function CannotBuyTrash(self, ply)
if SERVER then return CannotMakeTrash(ply) end
end
SS_WeaponProduct({
class = "weapon_trash_paint",
... |
local function mangle(text)
return text:gsub('[\128-\255]', function(s)
local b = string.byte(s)
if b >= 128 and b <= 191 then
return '\194' .. s
else
return '\195' .. string.char(128 + b - 192)
end
end)
end
local pp = require 'pl.pretty'.write
local function zip(...)
local iters, consts, initials = ... |
--[[--
request.set_cache_time(
seconds -- duration in seconds
)
Sets the expiration timeout for static content.
--]]--
function request.set_cache_time(seconds)
request.configure(function()
request._cache_time = seconds
end)
end
|
local reset = function(self)
self._t0 = nil
self._t1 = nil
self._delta_t = nil
self._grep = false
end
local calculate_delta_t = function(self)
self._delta_t = (vci.me.Time - self._t0).Milliseconds * 0.001
end
local is_double_grip = function(self)
if not self:on_grip() then return false end
if s... |
local t = Def.ActorFrame {
};
local PColor = {
P1 = "#00dcff",
P2 = "#ff00cf"
};
local xPosPlayer = {
P1 = -158,
P2 = -153
};
--lights
--ex wheel lights aren't necessary here and look weird
--score underlay
if GAMESTATE:GetCoinMode() == 'CoinMode_Home' and SCREENMAN:GetTopScreen() ~= "ScreenNetRoom" then
... |
-- Internal custom properties
local COMPONENT_ROOT = script:GetCustomProperty("ComponentRoot"):WaitForObject()
-- User exposed properties
local STAMINA_DURATION = COMPONENT_ROOT:GetCustomProperty("StaminaDuration")
local RECOVERY_COOLDOWN = COMPONENT_ROOT:GetCustomProperty("RecoveryCooldown")
local RECOVERY_SPEED = CO... |
if string.compare_version(sys.xtversion(), "1.2-10") < 0 then
sys.alert("此示例内容仅支持 XXTouch v1.2-10 及以上版本")
return os.exit()
end
local defaultsKey = "com.yourcompany.A-Script-Bundle"
-- 获取 Button 组件 LaunchScript: 额外参数
local operation
local args = utils.launch_args()
if args ~= nil then
operation = args.envp['ope... |
fx_version 'adamant'
game 'gta5'
description 'Paradise Heists'
version '1.0.0'
-- server_scripts {
-- '@mysql-async/lib/MySQL.lua',
-- '@es_extended/locale.lua',
-- 'server/main.lua'
-- }
client_scripts {
'@es_extended/locale.lua',
'config.lua',
'client/client.lua',
'client/fleeca.lua',
... |
-- 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_WalkingDead103_data\env_epilogue_temp.lua
-- params : ...
-- function num : 0 , upvalues : _ENV
require("Relighting.lua")
re... |
local HooI
return function(lib)
HooI = lib
local TooltipComponent = HooI.component.create("TooltipComponent")
function TooltipComponent:initialize(...)
HooI.initComponent(self, {
{name = "widget", varType = "Entity"},
}, ...)
self.init = false
end
ret... |
-- _.isBoolean.lua
--
-- Checks if value is classified as a boolean primitive.
-- @usage _.print(_.isBoolean(false))
-- --> true
-- _.print(_.isBoolean('x'))
-- --> false
--
-- @param value the value to check
-- @return Returns true if value is correctly classified, else false.
_.isBoolean = function(value)
return ... |
-- Стример местности
--<[ Модуль Terrain ]>
Terrain = {
init = function()
end;
}
addEventHandler( "onClientResourceStart", resourceRoot, Terrain.init ) |
function Rodotuk.main()
end
function Rodotuk.LaunchDamageSound(_ARG_0_)
end
|
-- contrib/btc_all.lua
-- Copyright (C) 2017 0x5b <dragen15051@gmail.com>
-- Copyright (C) 2017 Joerg Thalheim <joerg@thalheim.io>
-- Copyright (C) 2019 Nguyễn Gia Phong <vn.mcsinyx@gmail.com>
--
-- This file is part of Vicious.
--
-- Vicious is free software: you can redistribute it and/or modify
-- it under the te... |
local Roact = require(script.Parent.Packages.Roact)
return {
name = script.Parent.Name,
summary = "The one (and only) storybook for flipbook",
storyRoots = {
script.Parent.Components,
},
roact = Roact,
}
|
--
-- Utility functions for KaitaiStruct
--
local utils = {}
local function array_compare(arr, fn, subscript_fn)
if #arr == 0 then
return nil
end
local ret = subscript_fn(arr, 1)
for i = 2, #arr do
local el = subscript_fn(arr, i)
if fn(el, ret) then
ret = el
... |
local loaded = pcall(require, 'openssl')
if not loaded then return end
local _common_tls = require('tls/common')
local net = require('net')
local DEFAULT_CIPHERS = _common_tls.DEFAULT_CIPHERS
local extend = function(...)
local args = {...}
local obj = args[1]
for i = 2, #args do for k, v in pairs(args[i]... |
-----------------------------------
-- Area: Navukgo Execution Chamber
-- BCNM: TOAU-22 Shield of Diplomacy
-----------------------------------
require("scripts/globals/battlefield")
require("scripts/globals/missions")
local ID = require("scripts/zones/Navukgo_Execution_Chamber/IDs")
-----------------------------------... |
--[[
Addon: Lib
For: G-Core
By: SlownLS ( www.g-core.fr )
]]
local PANEL = {}
function PANEL:Init()
self.tblCheckBoxs = {}
self:SetVisible(false)
self:SetSize(0,0)
self.intCheckBoxSelected = 0
end
function PANEL:Select(id)
if !self.tblCheckBoxs[id] then return end
... |
--[[ Shattrath City -- Aldor Vindicator.lua
This script was written and is protected
by the GPL v2. This script was released
by BlackHer0 of the BLUA Scripting
Project. Please give proper accredidations
when re-releasing or sharing this script
with others in the emulation community.
~~End of License Agreement
-- Bla... |
-- ----------------------------------------------------------------------------
--
-- Mainframe
--
-- ----------------------------------------------------------------------------
local wx = require("wx") -- uses wxWidgets for Lua
local Timers = require("lib.ticktimer") -- timers
local trace = require(... |
return {
corgant = {
acceleration = 0,
brakerate = 0,
buildcostenergy = 377452,
buildcostmetal = 17151,
builder = true,
buildinggrounddecaldecayspeed = 0.01,
buildinggrounddecalsizex = 10,
buildinggrounddecalsizey = 10,
buildinggrounddecaltype = "corgant_aoplane.dds",
buildpic = "corgant... |
local playsession = {
{"mewmew", {32297}},
{"Pandarnash", {35055}},
{"_Mash_", {34872}},
{"Akhrem", {34730}},
{"Revar", {34691}},
{"cogito123", {34443}},
{"loutanifi", {23078}},
{"BallisticGamer04", {2419}},
{"dpoba", {31720}},
{"lyman", {30804}},
{"Nukesman", {4121}},
{"Zory", {29966}},
{"Timfee", {29741}... |
-- Copyright (C) 2011 - 2013 David Reid. See included LICENCE file.
function GTGUI.Element:SceneEditorPropertiesPanel(sceneEditor)
self:EditorPanel();
self.Body.MessageContainer = GTGUI.Server.CreateElement(self.Body, "scene-editor-properties-panel-body-message");
self.Body.PanelsContainer = GTGUI.Server... |
-----------------------------------
-- Area: Bastok Markets
-- NPC: Malene
-- Type: Quest NPC
-- !pos -173 -5 64 235
-----------------------------------
require("scripts/globals/npc_util")
require("scripts/globals/quests")
require("scripts/globals/titles")
function onTrade(player, npc, trade)
if (player:getQuestS... |
--[=[
Intended for classes that extend BaseObject only
@class PromiseRemoteEventMixin
]=]
local require = require(script.Parent.loader).load(script)
local promiseChild = require("promiseChild")
local PromiseRemoteEventMixin = {}
--[=[
Adds the remote function mixin to a class
```lua
local BaseObject = require... |
--- An ordered, linear, last in first out @{Collection} of items.
-- Stacks have a distinct ordering of their elements and can be added to at the
-- back and removed from in the back. The combination of these ensures that
-- the last elements added are the first ones out of the Stack.
--
-- The Stack interface provides... |
Clockwork.config:Add("context_menu_always", false, true);
|
local vehicleLogs = {}
function loadHandlingLog ( )
local data = getElementData ( root, "hedit:vehicleLogs" )
if data then
vehicleLogs = data
end
return true
end
function unloadHandlingLog ( )
setElementData ( root, "hedit:vehicleLogs", vehicleLogs, false )
return true
end
functi... |
_=loadfile and loadfile("TQAE.lua"){
user="admin",
pwd="admin",
host="192.168.1.57",
temp = "temp/",
}
--[[
Test WebSocket QA to control Samsung Q7 TV
Power off works...
--]]
--%%name="SamsungTV"
--%%type="com.fibaro.philipsTV"
--%%quickVars={ IP = "192.168.1.175", name = "HC3" }
--%%u1={button="Power", ... |
-- 20120302 mvh Created
-- 20141102 mvh Used studyUID as passed to support CC without relational queries
function getmodality()
local a,b,s;
if CGI('source')=='(local)' then
s = servercommand('get_param:MyACRNema')
else
s = CGI('source')
end
b=newdicomobject();
b.PatientID = CGI('patientidmatch... |
return function()
return {
onBeforeRender = function(_, _)
return true
end,
onRender = function(_, worldPart, viewportPart, highlight)
viewportPart.CFrame = worldPart.CFrame
viewportPart.Color = highlight.color
end,
onAdded = function(_, viewportPart, highlight)
local function clearTextures(ins... |
-- See LICENSE for terms
local mod_SpaceCount
local EnableMarker
-- fired when settings are changed/init
local function ModOptions()
mod_SpaceCount = CurrentModOptions:GetProperty("SpaceCount")
-- no sense in updating unless it's a cold wave
if g_ColdWave then
local objs = UICity.labels.LandscapeConstructionSit... |
if (SERVER) then
AddCSLuaFile( "shared.lua" );
end
if (CLIENT) then
--[[ Basic SWEP Information to display to the client. ]]--
SWEP.PrintName = "Scout"
SWEP.Author = "Zig"
SWEP.Purpose = "A firearm used to harm beings."
SWEP.Instructions = "Press LMB to fire and R to reload."
SWEP.Contact = "Cl... |
-- 导入第三方包和系统包
local lunajson = require 'lunajson'
local io = require 'io'
local os = require 'os'
-- 全局变量
-- 默认配置文件位置,请直接修改config_file_ostype()
local config_file = ''
local autosave_dir_os = ''
local ostype = ''
local conf_content = {}
local running = false
-- 工程结构
local project_template = {
-- 硬编码部分:... |
return function()
local Reducer = require(script.Parent.InspectAndBuyReducer)
it("has the expected fields, and only the expected fields", function()
local state = Reducer(nil, {})
local expectedKeys = {
view = true,
playerId = true,
playerName = true,
assets = true,
bundles = true,
equippedAss... |
PointGenerator = {}
setmetatable(PointGenerator, {__index = HiveBaseModule})
PointGenerator.new = function (varname)
local this = HiveBaseModule.new(varname)
this.gen = PrimitiveGenerator()
setmetatable(this, {__index=PointGenerator})
return this
end
function PointGenerator:Do()
self:UpdateValue... |
-----------------------------------------------------------------
-- lua-capnproto compiler
-- @copyright 2013-2016 Jiale Zhi (vipcalio@gmail.com)
-----------------------------------------------------------------
local cjson = require("cjson")
local encode = cjson.encode
local util = require "capnp.util"
local insert... |
-- - - - - - - - - - - - - - - - - - - - -
-- first, reset the global SL table to default values
-- this is defined in: ./Scripts/SL_Init.lua
InitializeSimplyLove()
--GAMESTATE:UpdateDiscordMenu("Title Menu: Simply "..ThemePrefs.Get("VisualStyle"))
if ThemePrefs.Get("VisualStyle") == "SRPG6" then
SL.SRPG6:May... |
--[[
The Vapour registry, as its name implies is used to register 'vapour'-ized recipes.
The vapour in question is treated as a normal fluid, so register it there first.
Note currently vapour > fluid is a 1:1 mapping, both back and forth, this may change in the future, if I feel so inclined.
]]
local VapourRe... |
--!NEEDS:luac_loader.lua
local debug=false
local codeName={
"MOVE",
"LOADK",
"LOADBOOL",
"LOADNIL",
"GETUPVAL",
"GETGLOBAL",
"GETTABLE",
"SETGLOBAL",
"SETUPVAL",
"SETTABLE",
"NEWTABLE",
"SELF",
"ADD",
"SUB",
"MUL",
"DIV",
"MOD",
"POW",
"BOR",
"BAND",
"OP_... |
--[[
table
]]
local string_format = string.format
local pairs = pairs
local ok, table_new = pcall(require, "table.new")
if not ok or type(table_new) ~= "function" then
function table:new()
return {}
end
end
local _copy
_copy = function(t, lookup)
if type(t) ~= "table" then
return t
e... |
-------------------------------------------------
-- Volume Widget for Awesome Window Manager
-- Shows the current volume level
-- More details could be found here:
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/volume-widget
-- @author Pavel Makhov
-- @copyright 2018 Pavel Makhov
------------------... |
--[[
Reference renderer intended for use in tests as well as for documenting the
minimum required interface for a Roact renderer.
]]
local NoopRenderer = {}
function NoopRenderer.isHostObject(target)
-- Attempting to use NoopRenderer to target a Roblox instance is almost
-- certainly a mistake.
return ... |
--[[
The MIT License (MIT)
Copyright (c) 2015 ediiknorand
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... |
Script.ReloadScript("SCRIPTS/Entities/actor/BasicActor.lua");
Script.ReloadScript("SCRIPTS/Entities/AI/Shared/BasicAI.lua");
Flyer_x =
{
AnimationGraph = "",
AIType = AIOBJECT_2D_FLY,
PropertiesInstance =
{
aibehavior_behaviour = "FlyerIdle",
},
Properties =
{
esBehaviorSelectionTree = "Flyer",
... |
Technology = {name = nil, cost_production = 0, cost_gold = 0, icon = nil}
function Technology:new(o)
o = o or {}
setmetatable(o, self)
self.__index = self
return o
end |
slot2 = "FishingJoyBuffSpeed"
slot5 = "entity.FishingJoyBuffBase"
FishingJoyBuffSpeed = class(slot1, FishingJoyRequireLua(slot4))
FishingJoyBuffSpeed.ctor = function (slot0)
slot3 = slot0
FishingJoyBuffSpeed.super.ctor(slot2)
slot4 = FISHINGJOY_BUFF_TYPE.CHANGESPEED
slot0.setBuffType(slot2, slot0)
end
FishingJ... |
-- FUNCTIONAL
require 'Q/UTILS/lua/strict'
local Q = require 'Q'
local Scalar = require 'libsclr' ;
local tests = {}
tests.t1 = function()
local x = Q.mk_col({1, 0, 1, 0, 1, 0, 1}, "B1")
local y = Q.mk_col({1, 2, 3, 4, 5, 6, 7}, "I4")
local z = Q.mk_col({-1, -2, -3, -4, -5, -6, -7}, "I4")
local exp_w = Q.mk_c... |
local index = {}
function index:enter(from)
Signal.register("pressed-a", function(...) self:pressed_a(...) end)
Signal.register("pressed-b", function(...) self:pressed_b(...) end)
Signal.register("pressed-x", function(...) self:pressed_x(...) end)
Signal.register("pressed-y", function(...) self:pressed... |
local handler = call ( getResourceFromName ( "rp_mysql" ), "getDbHandler")
addEventHandler ( "onResourceStart", resourceRoot, function() outputDebugString("[startup] Załadowano system obiektów") end )
-- Branch: KYLO
-- Zmiana działania obiektów, są trzymane po stronie serwera i wysyłane klientowi w ramach streamera
o... |
local unformat = {}
local mattata = require('mattata')
local utf8 = require('lua-utf8')
function unformat:init(configuration)
unformat.arguments = 'unformat'
unformat.commands = mattata.commands(self.info.username, configuration.commandPrefix):c('unformat').table
unformat.help = configuration.commandPrefix .. 'unfo... |
local Spell = { }
Spell.LearnTime = 180
Spell.Description = [[
Knocks down your opponent.
Useful in duels.
]]
Spell.Category = HpwRewrite.CategoryNames.Fight
Spell.FlyEffect = "hpw_sectumsemp_main"
Spell.ImpactEffect = "hpw_white_impact"
Spell.ApplyDelay = 0.5
Spell.ForceAnim = { ACT_VM_PRIMARYATTACK_1, ACT_VM_PRIMAR... |
local nvim = require("nvim")
local fs = require("arshlib.fs")
local colour = require("arshlib.colour")
local quick = require("arshlib.quick")
local lsp = require("arshlib.lsp")
local listish = require("listish")
local reloader = require("plenary.reload")
local fzf = require("fzf-lua")
local fzfcore = require("fzf-lua.c... |
vim.g.moonflyCursorColor = 1
vim.g.moonflyItalics = 1
vim.g.moonflyNormalFloat = 1 -- visit repo for more settings
vim.g.moonflyTerminalColors = 1
vim.g.moonflyTransparent = 1
vim.g.moonflyUndercurls = 0
vim.g.moonflyVertSplits = 1
|
-- @Author: Ritesh Pradhan
-- @Date: 2016-04-13 23:28:21
-- @Last Modified by: Ritesh Pradhan
-- @Last Modified time: 2016-04-21 14:48:28
-- This collectible is used for long term bonus items during game play; power up levels and get more health, ammo and fuel
-- coin
-- medal
local physics = require("physics")
... |
ITEM.name = "Аккумулятор"
ITEM.desc = "Источник электричества для автономного питания. Рабочее напряжение: 1.5V. Продолжительность работы: 300 секунд. \n\nХАРАКТЕРИСТИКИ: \n-электроника \n-используется для: работы фонарика"
ITEM.price = 1040
ITEM.permit = "Разное"
ITEM.weight = 0.17
ITEM.model = "models/kek1ch/... |
format_version = "1.0"
local Axes = { r=180,g=180,b=180 }
local Rect = { r=80,g=80,b=80,a = 64 }
local Graph = { r=0,g=255,b=0 }
function clip(value)
return math.max(0,math.min(1,value))
end
function drawVolume(property_values,display_info,dirty_rect)
local volume=clip(property_values[1])
local w = display_i... |
--[[
Planetfall: Catmull-Rom Cutscene Camera Track System
by Olivier 'LuaPineapple' Hamel
I'll be nice and release a stand alone version for you guys.
BUT I EXECPT A GODS AWFUL AMOUNT OF COOKIES!
If I don't I'll get annoyed and when I get annoyed I become irritable and when I become irritable people DIE! [/quo... |
#!/usr/bin/env luajit
require 'ext'
local env = setmetatable({}, {__index=_G})
if setfenv then setfenv(1, env) else _ENV = env end
require 'symmath'.setup{env=env, implicitVars=true, fixVariableNames=true, MathJax={title='Gravitation 16.1 - expression'}}
local deta_eq_0 = eta'_ab,c':eq(0)
local ddelta_eq_0 = delta'_ab... |
local tasks = require("utils.tasks")
local utils = require("utils")
local mapStruct = require("structs.map")
local sideStruct = {}
local decoderBlacklist = {
Filler = true,
Style = true,
levels = true
}
local encoderBlacklist = {
map = true,
_type = true
}
local function tableify(data, t)
t ... |
local FixedNumber = {}
local function checkInt(x)
local _, dec = math.modf(x)
assert(dec == 0)
end
local function toInt(x)
local t = math.modf(x)
return t
end
FixedNumber.FRACTIONAL_BITS = 24
FixedNumber.FRACTIONAL_BASE = 1 << FixedNumber.FRACTIONAL_BITS
FixedNumber.FRACTIONAL_MASK = (1 << FixedNumbe... |
--[[ create zip archive sample ]]
assert(Zip.compress(package.__dir .. "/iosample", package.__dir .. "/iosample.zip"))
print "✅ OK: Zip.compress: iosample/ => iosample.zip"
--[[ read zip archive sample ]]
local zip = Zip.Archiver.new(package.__dir .. "/iosample.zip", "r")
assert(zip:getState() ~= Object.State.FAILED)... |
return {
["end"] = "test passed?",
["notnull"] = true,
["test"] = "A test for null values"
}
|
return {
name = 'stanley',
--[[ Config file handling ]]
config_schema = {'name','description','version','author','autoload','require'},
config_file_name = 'package.yaml',
config = {},
-- Load configuration and build queue
initialize = function(self)
if File.exists(self.config_file_... |
comp = {"najduži", "najkraći"}
year = {"trećina", "četvrtina", "petina", "šestina", "sedmina", "osmina"}
msg_day = " dana"
msg_week = {" nedelja", " nedelje"}
msg_month = {" meseci", " meseca"}
msg_year = " godine"
|
local response = require "resty.kafka.response"
local request = require "resty.kafka.request"
local bxor = bit.bxor
local to_int32 = response.to_int32
local pid = ngx.worker.pid
local _M = {}
local mt = { __index = _M }
local MECHANISM_PLAINTEXT = "PLAIN"
local MECHANISM_SCRAMSHA256 = "SCRAM-SHA-256"
local SEP = str... |
return {
sound = "sounds/footsteps/grassright.wav",
volume = 0.25
}
|
--- @module IFactioned
local Enum = require("api.Enum")
local ICharaParty = require("api.chara.ICharaParty")
local IObject = require("api.IObject")
local IFactioned = class.interface("IFactioned", {}, IObject)
function IFactioned:init()
self.personal_relations = {}
end
--- Clears a personal relations on this cha... |
local _M = { }
function _M.no_credentials(service)
ngx.log(ngx.INFO, 'no credentials provided for service ', service.id)
ngx.var.cached_key = nil
ngx.status = service.auth_missing_status
ngx.header.content_type = service.auth_missing_headers
ngx.print(service.error_auth_missing)
return ngx.exit(ngx.HTTP_OK... |
RPGM.RegisterScaledConstant("HUD.Padding", 30)
RPGM.RegisterScaledConstant("HUD.ContentPadding", 12) |
package.path = './src/?.lua;' .. package.path
local lu = require 'luaunit'
local Board = require 'board'
local Tetromino = require 'tetromino'
local TetrisGame = require 'tetrisgame'
local Point = require 'util'.point
local Dimension = require 'util'.dimension
function control_tetromino(tetromino, commands)
local act... |
function Precache( context )
PrecacheResource("soundfile", "soundevents/game_sounds_heroes/game_sounds_alchemist.vsndevts", context )
PrecacheResource("soundfile", "soundevents/game_sounds_custom.vsndevts", context )
end
if AIGameMode == nil then
_G.AIGameMode = class({}) -- put in the global scope
end
require('ti... |
------------------------------------------------------
-- cgi.lua
--
-- A CGI handler for Kirk.
------------------------------------------------------
------------------------------------------------------
-- CGI {}
--
-- Table containing values where found from above.
-- All of these need to be stored in like data.... |
---------
-- Proxy script for OAuth 2.0.
local config = require 'ngx-oauth.config'
local Cookies = require 'ngx-oauth.Cookies'
local either = require 'ngx-oauth.either'
local nginx = require 'ngx-oauth.nginx'
local oauth = require 'ngx-oauth.oauth2'
local util = require 'ngx-oauth.util'
local log = nginx.log... |
return function(packedColor3: {R: Number, G: Number, B: Number}): Color3
return Color3.new(unpack(packedColor3))
end |
includeFile("tangible/furniture/house_cleanup/cts_valcyn_painting.lua")
includeFile("tangible/furniture/house_cleanup/cts_wanderhome_painting.lua")
includeFile("tangible/furniture/house_cleanup/cts_kauri_painting.lua")
includeFile("tangible/furniture/house_cleanup/cts_tarquinas_painting.lua")
includeFile("tangible/furn... |
local on_key_releases,nr = {},0
function minetest.register_on_key_release(func)
nr = nr+1
on_key_releases[nr] = func
end
local on_key_presses,np = {},0
function minetest.register_on_key_press(func)
np = np+1
on_key_presses[np] = func
end
local playerkeys = {}
minetest.register_globalstep(function()
for _,playe... |
local tenant = ngx.shared.tenant;
tenant:set("a", "121112");
|
--------------------------------------------------------------------------------
--- String-related tools
-- @module lua-nucleo.string
-- This file is a part of lua-nucleo library
-- @copyright lua-nucleo authors (see file `COPYRIGHT` for the license)
--------------------------------------------------------------------... |
local ubus = require "ubus".connect()
local specs
if ubus then
specs = ubus:call("router", "quest", { info = "specs" })
ubus:close()
end
m = Map("layer2_interface", translate("xDSL Settings"), translate("xDSL Line settings and profiles"))
s = m:section(NamedSection, "capabilities", translate("Capabilities")) -- C... |
g_Root = getRootElement()
g_Me = getLocalPlayer()
g_ResRoot = getResourceRootElement()
g_ScrW, g_ScrH = guiGetScreenSize()
local function initDelayed()
import("roommgr")
import("dxgui")
addEvent("onDxGUIClick",true)
triggerServerEvent("main_onReady", g_ResRoot)
end
local function init()
setTimer(ini... |
-- the best way to spread holiday cheer is singing loud for all to hear
if PREFSMAN:GetPreference("EasterEggs") and MonthOfYear() == 11 then
return LoadActor(THEME:GetPathB("", "_shared background normal/snow.lua"))
end
local file = THEME:GetPathB("", "_shared background normal/" .. ThemePrefs.Get("VisualTheme") .. "... |
--[[
module:Rectangle
author:DylanYang
time:2021-02-09 17:14:32
]]
local super = require("patterns.structural.decorator.Shape")
local _M = Class("Rectangle")
function _M.public:Draw()
print(string.format("The shape that was just drawn is a %s.", self.name))
end
function _M.public.get:name()
return... |
--- @type StdUi
local StdUi = LibStub and LibStub('StdUi', true);
if not StdUi then
return;
end
--- @param frame Frame
function StdUi:MarkAsValid(frame, valid)
if not valid then
frame:SetBackdropBorderColor(1, 0, 0, 1);
else
frame:SetBackdropBorderColor(
self.config.backdrop.border.r,
self.config.backdrop.... |
local __DebugAdapter = __DebugAdapter
local luaObjectLines = {
---@param stack LuaItemStack
---@param short boolean | nil
LuaItemStack = function(stack,short)
if stack.valid_for_read then
if not short then
return __DebugAdapter.stringInterp([[<LuaItemStack>{[}name={name}, count={count}{]}... |
--most simple entity ever
coin = class:new()
function coin:init(x, y)
self.cox = x
self.coy = y
self.active = false
self.static = true
end
function coin:draw()
love.graphics.draw(coinimage, coinquads[spriteset][coinframe], math.floor((self.cox-1-xscroll)*16*scale), ((self.coy-1-yscroll)*16-8)*scale, 0, scale,... |
local TreeSitter = require("refactoring.treesitter.treesitter")
local Nodes = require("refactoring.treesitter.nodes")
local InlineNode = Nodes.InlineNode
local StringNode = Nodes.StringNode
local FieldNode = Nodes.FieldNode
local JavaScript = {}
function JavaScript.new(bufnr, ft)
return TreeSitter:new({
f... |
------------------------------------------------------------------
--
-- Author: Alexey Melnichuk <alexeymelnichuck@gmail.com>
--
-- Copyright (C) 2015 Alexey Melnichuk <alexeymelnichuck@gmail.com>
--
-- Licensed according to the included 'LICENSE' document
--
-- This file is part of lua-lluv-websocket library.
--
... |
------------------------------------------
-------- Language Server Protocol --------
------------------------------------------
local lsp = require ('lspconfig')
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
-------- C/C++ -... |
-----------------------------------
-- Area: Mhaura
-- NPC: Numi Adaligo
-- Involved In Quest: RYCHARDE_THE_CHEF
-----------------------------------
require("scripts/globals/settings")
-----------------------------------
function onTrade(player, npc, trade)
end
function onTrigger(player, npc)
local rovOptionEna... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.