content stringlengths 5 1.05M |
|---|
Path = {}
Path.splitPathAndName = function(path)
assert(type(path)=="string","'path' must be a non null string")
local parts = url.parse_path(path)
local fileName = parts[#parts]
table.remove(parts)
table.insert(parts,1,"")
return table.concat(parts,"/"), fileName
end
Path.getFileNameNoExtensio... |
RELOAD "plenary"
RELOAD "telescope"
local finders = require "telescope.finders"
local make_entry = require "telescope.make_entry"
local previewers = require "telescope.previewers"
local pickers = require "telescope.pickers"
local sorters = require "telescope.sorters"
local cwd = vim.fn.expand "~/build/neovim"
picker... |
includes("game") |
-- Contains the functionality used by all picker dialogs
picker = {groups_per_row = 6}
-- Adds a bar containing checkboxes to control whether enabled and hidden picks should be shown
function picker.refresh_filter_conditions(flow, disabled_state, hidden_state)
-- Create filter conditions from scratch if they don'... |
print(os.date("%c")) |
cfg.table("PersonEx", function(tb)
tb.layout = "TestExLayout"; --设置布局页(分部页),就是会继承TestLayout下的配置(包括策略配置),如果相同配置的会覆盖布局页配置的
tb.spolis.Add1 = {};
tb.spolis.Add1.clear = {
isUse = false, --不使用缓存清理策略
};
tb.sqls.Get = function ()
return "select * from Person where name=@name";
end
tb.sqls.Count = function (... |
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
local lsp = vim.lsp
local server_name = "jsonls"
local bin_name = "vscode-json-languageserver"
local installer = util.npm_installer {
server_name = server_name;
packages = {bin_name};
binaries = {bin_name};
}
configs[server_name] =... |
WorldLoaded = false
local DoorConfig = {
[6]=180,
[17]=180,
[18]=180,
[19]=180,
[26]=180,
[27]=180,
[28]=180,
[29]=180,
[30]=180,
[31]=180,
[32]=180,
[33]=180,
[34]=180,
[35]=0,
[36]=270,
[37]=270,
[38]=270,
[39]=270
}
function World_LoadWorld()
if WorldLoaded then return end
i... |
-------------------------------------------------------------------------------
-- ElvUI Professions Datatext By Lockslap (US, Bleeding Hollow)
-------------------------------------------------------------------------------
local debug = false
--[===[@debug@
debug = true
--@end-debug@]===]
local AceLocale = LibS... |
--[[
This file was extracted by 'EsoLuaGenerator' at '2021-09-04 16:42:25' 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... |
local K, C = unpack(select(2, ...))
if C["Arena"].Enable ~= true then
return
end
local Module = K:GetModule("Unitframes")
local oUF = oUF or K.oUF
assert(oUF, "KkthnxUI was unable to locate oUF.")
local _G = _G
local CreateFrame = _G.CreateFrame
local UnitFrame_OnEnter = _G.UnitFrame_OnEnter
local UnitFrame_OnLeave... |
--[[
ExportAsVirtualCopy.lua
--]]
local ExportAsVirtualCopy, dbg, dbgf = ExtendedExportFilter:newClass{ className='ExportAsVirtualCopy', register=true }
local dialogEnding
--- Constructor for extending class.
--
function ExportAsVirtualCopy:newClass( t )
return ExtendedExportFilter.newClass( self, t... |
--- Extracts Jester module actions using ldoc.
--
-- This script extracts a simple map of all Jester actions into a small module
-- that can be used by other modules/scripts needing a global map which
-- includes all parameters and their value types.
--
-- To re-generate the map, run the following from the root Jester ... |
--hide blizzard stuff
MainMenuBar:SetScale(0.00001)
MainMenuBar:EnableMouse(false)
VehicleMenuBar:SetScale(0.00001)
VehicleMenuBar:EnableMouse(false)
local FramesToHide = {
MainMenuBar,
MainMenuBarArtFrame,
BonusActionBarFrame,
VehicleMenuBar,
PossessBarFrame,
}
l... |
--Copyright (c) 2010 Sakarias Johansson
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include('shared.lua')
ENT.RaceStage = 0
ENT.RaceIsAboutToStart = false
ENT.RaceStarter = NULL
ENT.LastStrId = ""
ENT.LeftPed = NULL
ENT.RightPed = NULL
ENT.SpaceBetween = 100
ENT.DetectorTrigger = NULL
ENT.OldDist = 0
ENT.S... |
local Power = {}
ShadowUF:RegisterModule(Power, "powerBar", ShadowUF.L["Power bar"], true)
local function updatePower(self, elapsed)
local currentPower = UnitPower(self.parent.unit)
if( currentPower == self.currentPower ) then return end
self.currentPower = currentPower
self:SetValue(currentPower)
for _, fontStr... |
local HttpService = game:GetService("HttpService")
local Promise = require(script.Parent:FindFirstChild("Promise"))
local HttpWrapper = { }
function HttpWrapper:Request(requestOptions)
if requestOptions == nil then
return Promise.reject("Argument 1 missing or nil")
elseif requestOptions.Url == nil the... |
local w, h = term.getSize()
os.loadAPI("/zOS/System/API/zif.lua")
local tFiles = {}
local tFilePositions = {}
local selectedId = 0
local internetOkay = false
local scrollPos = 0
local maxY = 0
local alreadySet = false
local menu = 1
local selectedList
local dropdown = false
local listMaxX = 0
local lang = multishell.... |
local encoder = require "SheeryEncoder"
local config = require "Config"
for idx,originalFileNameItem in ipairs(config.file_encode_config.encode_map) do
local originalFileName = originalFileNameItem[1]
local encode_version = originalFileNameItem[2]
local encode_type = originalFileNameItem[3]
local encodedFileN... |
--[[
LuCI - Lua Development Framework
Copyright 2009 Steven Barth <steven@midlink.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id$
]]
local ip... |
return {'evident','evidentie','evi','evie','evita','evink','evidente','evidenter','evidentere','evidenties','evidentste','evis','evies','evitas'} |
-- module
local AnimatorTargetIdModule = {}
local insert = table.insert
---@class AnimatorTargetId
local AnimatorTargetId = CLASS: AnimatorTargetId ()
:MODEL {}
function AnimatorTargetId:get ( entity, scene )
end
function AnimatorTargetId:serialize ()
end
function AnimatorTargetId:deserialize ( data )
end
functi... |
-----------------------------------
-- Area: Windurst Woods
-- NPC: Rakoh Buuma
-- Starts Windurst Missions
-- !pos 106 -5 -23 241
-----------------------------------
local ID = require("scripts/zones/Windurst_Woods/IDs")
require("scripts/globals/keyitems")
require("scripts/globals/missions")
require("scripts/globals/... |
local M = {}
local conf_defaults = {
max_lines = 1000,
max_num_results = 20,
sort = true,
priority = 5000,
show_prediction_strength = true,
run_on_every_keystroke = true,
snippet_placeholder = '..',
ignored_file_types = { -- default is not to ignore
-- uncomment to ignore in lua:
-- lua = true
... |
local state = {}
state._NAME = ...
local Body = require'Body'
local util = require'util'
local vector = require'vector'
local t_entry, t_update
-- Neck limits
local headSpeed = 30 * DEG_TO_RAD * vector.ones(2)
local headThresh = 1 * DEG_TO_RAD * vector.ones(2)
function state.entry()
print(state._NAME..' Entry' )
... |
-------------------------------------------------------
-- CUSTOM SPAWNER BY MNEWRATH --
-------------------------------------------------------
-- Function to find items in a table
function FindInTable(tbl, keyname, keyvalue)
for i,v in ipairs(tbl) do
if (v[keyname] == keyvalue) then
return v
end
end
end
-- F... |
expand_pattern = function(pattern)
-- NOTE: Order matters. Higher patterns usually expand to lower patterns.
-- There is no loop to ensure everything expands.
-- :graph: - all printable characters, not including space
pattern = string.gsub(pattern, "%:graph%:", function(m)
return string.gsub(expand_pattern(":pri... |
-- KEYS - port name
-- ARGV[1] - profile name
-- ARGV[2] - new size
-- ARGV[3] - pg to add
local port = KEYS[1]
local input_profile_name = ARGV[1]
local input_profile_size = ARGV[2]
local new_pg = ARGV[3]
local function is_port_with_8lanes(lanes)
-- On Spectrum 3, ports with 8 lanes have doubled pipeline latency
... |
-- Script home: https://github.com/d87/mpv-persist-properties
local utils = require "mp.utils"
local msg = require "mp.msg"
local opts = {
properties = "volume,sub-scale",
}
(require 'mp.options').read_options(opts, "persist_properties")
local CONFIG_ROOT = (os.getenv('APPDATA') or os.getenv('HOME')..'/.config').... |
local utils = {}
-- Preprocess an image before passing it to a Caffe model.
-- We need to rescale from [0, 1] to [0, 255], convert from RGB to BGR,
-- and subtract the mean pixel.
function utils.preprocess(img)
local mean_pixel = torch.DoubleTensor({103.939, 116.779, 123.68})
local perm = torch.LongTensor{3, 2... |
if pcall(require, "chttp") and CHTTP ~= nil then
HTTP = CHTTP
end |
I = "LocalPlayer"
he = game.Workspace[I]
he["Left Arm"]:Remove()
he["Right Arm"]:Remove()
Player = game.Players[I]
local h = Instance.new("HopperBin")
h.Name = "Batman!"
h.Parent = Player.Backpack
local s = Instance.new("Script")
s.Parent = h
s.Name = "Script"
local bin = s.Parent
length = 5
away = 2
gap = 0
lo... |
object_tangible_collection_plant_05 = object_tangible_collection_shared_plant_05:new {
gameObjectType = 8211,}
ObjectTemplates:addTemplate(object_tangible_collection_plant_05, "object/tangible/collection/plant_05.iff") |
require 'hdf5'
local utils = require 'utils'
local DataLoader = torch.class('DataLoader')
function DataLoader:__init(opt)
-- open the hdf5 file
print('DataLoader loading h5 file: ', opt.h5_file)
self.h5_file = hdf5.open(opt.h5_file, 'r')
self.info = utils.read_json(opt.json_file)
-- extract image size from... |
local mod_name = minetest.get_current_modname()
local mod_path = minetest.get_modpath(mod_name)
dofile(mod_path .. "/api.lua")
dofile(mod_path .. "/content.lua")
|
describe("entity library", function()
local storage = require ("rotor.storage")
local entity = require ("rotor.entity")
local bitset_array = require ("rotor.bitset_array")
-- component constructors
local function new_point (x, y)
return {x = x, y = y}
end
local function new_name(n)
return {name =... |
core:import("CoreEngineAccess")
require("core/lib/utils/dev/tools/particle_editor/CoreParticleEditorUtil")
require("core/lib/utils/dev/tools/particle_editor/CoreParticleEditorProperties")
require("core/lib/utils/dev/tools/particle_editor/CoreParticleEditorEffect")
require("core/lib/utils/dev/tools/particle_editor/CoreP... |
DebuffFilter = LibStub("AceAddon-3.0"):NewAddon("DebuffFilter", "AceConsole-3.0", "AceEvent-3.0")
-- ButtonFacade library skins buttons (can change their display in many different ways)
local LBF = LibStub("LibButtonFacade", true)
-- time left in which tenths of a second are displayed
local DEBUFF_FILTER_TIMELEFT_TENTH... |
--[[
LuiExtended
License: The MIT License (MIT)
--]]
local SCB = LUIE.SpellCastBuffs
local strformat = zo_strformat
local optionsDataBuffsDebuffs = {}
local g_BuffsMovingEnabled = false -- Helper local flag
local rotationOptions = { "Horizontal", "Vertical" }
local rotationOptionsKeys = {... |
local rob = false
local robbers = {}
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
function get3DDistance(x1, y1, z1, x2, y2, z2)
return math.sqrt(math.pow(x1 - x2, 2) + math.pow(y1 - y2, 2) + math.pow(z1 - z2, 2))
end
RegisterServerEvent('esx_holdup:toofar')
AddEventHandler('esx_hol... |
function initInput()
-- define default keys
keysLeft = {"a", "left"}
keysRight = {"d", "right"}
keysUp = {"w", "up"}
keysDown = {"s", "down"}
hasInputLeft = function () return isKeyActuated(keysLeft) end
hasInputRight = function () return isKeyActuated(keysRight) end
hasInputUp = function () r... |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf"
module('BseRoleUseTool_pb', package.seeall)
local BSEROLEUSETOOL = protobuf.Descriptor();
local BSEROLEUSETOOL_SESSIONID_FIELD = protobuf.FieldDescriptor();
local BSEROLEUSETOOL_SLOT_FIELD = protobuf.FieldDescriptor();
local BSEROLEUSETOOL... |
local IsJailed = false
local unjail = false
local JailTime = 0
local fastTimer = 0
local JailLocation = Config.JailLocation
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
RegisterNetEvent('esx_jail:jail')
A... |
--[[Register]]--
RegisterNetEvent("ply_garages2:setGarages")
RegisterNetEvent("ply_garages2:setPlayerGarages")
RegisterNetEvent("ply_garages2:sellGaragesFalse")
RegisterNetEvent("ply_garages2:sellGaragesTrue")
RegisterNetEvent("ply_garages2:buyGaragesTrue")
RegisterNetEvent("ply_garages2:buyGaragesFalse")
RegisterNet... |
if ( SERVER ) then
AddCSLuaFile( "shared.lua" )
end
if ( CLIENT ) then
SWEP.PrintName = "Z6 Rotary Blaster Red"
SWEP.Author = "TFA"
SWEP.ViewModelFOV = 50
SWEP.Slot = 4
SWEP.SlotPos = 72
end
SWEP.HoldType = "crossbow"
SWEP.Base = "tfa_swsft_base_servius"
SWEP.Category = "TFA Star ... |
local NeP, g = NeP, NeP._G
local talents = {}
local rows = 7
local cols = 3
local function UpdateTalents()
g.wipe(talents) -- wipe the table specially for the pvp talents
for i = 1, rows do
for k = 1, cols do
local talent_ID, talent_name, _, selected = g.GetTalentInfo(i, k, 1) -- ActiveSpecGroup is alwa... |
test_object_record_module = {}
function test_object_record_module:reload()
end
function test_object_record_module:awake()
script_module:log_info("test_object_record_module awake!----");
test_object_record_module:reload()
end
function test_object_record_module:init()
script_module:log_info("test_object_record_modu... |
--!A cross-platform build utility based on Lua
--
-- 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 Apach... |
local skynetgo = require "skynetgo"
skynetgo.start(function()
local service = skynetgo.newservice("test_base")
local suc, ret = skynetgo.tell(0, service, os.date())
print(os.date(), suc, ret)
local suc, ret = skynetgo.ask(0, service, os.date())
print(os.date(), suc, ret)
local suc, ret = skynet... |
---@class mx.symbol.contrib:mx.symbol.gen_contrib
local M = {}
--
local ctypes = require('ctypes')
local uniform = require('mx.symbol.random').uniform
local gen = require('mx.symbol.gen_contrib')
local symbol = require('mx.symbol.symbol')
local Symbol = symbol.Symbol
local base = require('mx.base')
local _LIB, check_ca... |
-----------------------------------------------------------------------------------------------
local title = "Death Messages"
local version = "0.1.2"
local mname = "death_messages"
-----------------------------------------------------------------------------------------------
dofile(minetest.get_modpath("death_message... |
require 'game/Board'
require 'game/Stone'
require 'game/Characters'
require 'game/Scene'
battle = newScene({ -- constants
CURSOR_NORMAL = love.mouse.getSystemCursor('arrow'),
CURSOR_MOVE = love.mouse.getSystemCursor('sizeall'),
TREE = love.graphics.newImage('data/images/pine_tree.png'),
SFX_SWAP = love.audio.n... |
object_draft_schematic_camp_modules_crafting_weapon_module = object_draft_schematic_camp_modules_shared_crafting_weapon_module:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_camp_modules_crafting_weapon_module, "object/draft_schematic/camp/modules/crafting_weapon_module.iff")
|
local DATA_DIR = vim.fn.stdpath("data")
local CUSTOM_CMD_FILE = DATA_DIR .. "/" .. "run_code_custom_cmd"
local custom_command_filetype = 'run-code-custom-command'
local custom_command_default_split = '10split'
local custom_command_win = nil
local custom_command_buf = nil
-- TODO: validate if these commands are avail... |
function MasterMerchant.NewLink(itemLink, movement)
local subType, level = string.match(itemLink, '|H.-:item:.-:(%d-):(%d-):')
subType = tonumber(subType)
level = tonumber(level)
local newValue = {NewSubtype = nil, NewLevel = nil}
if ItemChangeData[subType] and ItemChangeData[subType][level] then
newValu... |
---
--- Http Client utils package
--- Created by jacobs.
--- DateTime: 2018/5/2 下午6:53
---
local upper = string.upper
local http = require("resty.http")
local Object = require("core.framework.classic")
local Http_Client =Object:extend()
---
--http client constructor
--@parameter timeout socket timeout(ms)
--@paramete... |
-- Display the player's coin amount
Task.Wait() -- Wait a tick for players to connect
local player = Game.GetLocalPlayer()
-- Every 0.1 seconds update the coin count display
function Tick()
Task.Wait(0.1)
local score = player:GetResource("Manticoin")
local displayString = player.name..": "..tostring(scor... |
pzCore = {}
pzCore.prefix = "[P.ZCore] >> "
ESX = nil
local function trace(mess)
print(pzCore.prefix..mess)
end
pzCore.trace = trace
Citizen.CreateThread(function()
Citizen.Wait(200)
pzCore.jobs.func.loadItems()
end)
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
|
local snowstorm = {}
snowstorm.flakeSize = 8 --base size for snow flakes
snowstorm.flakeSizeVariation = 2 --how much should the falkes vary in size
snowstorm.flakeSpeed = 100 --base speed
snowstorm.flakeSpeedVariation = 25 --how much should the falkes vary in speed
snowstorm.flakeRotationSpeed = 100 --max rotation
... |
-- --------------------
-- TellMeWhen
-- Originally by Nephthys of Hyjal <lieandswell@yahoo.com>
-- Other contributions by:
-- Sweetmms of Blackrock, Oozebull of Twisting Nether, Oodyboo of Mug'thol,
-- Banjankri of Blackrock, Predeter of Proudmoore, Xenyr of Aszune
-- Currently maintained by
-- Cybeloras of Aerie ... |
local ffi = require "ffi"
local bit = require "bit"
local imgui_ffi = require "imgui_ffi.mod"
local imgui = imgui_ffi.libs.imgui
local C = imgui_ffi.enums
local W = require "limgui"
local engine = require "engine.init"
local scene = require "scene.init"
local maf = require "mafex"
local app = require "app"
... |
--[[
Combuctor.lua
Some sort of crazy visual inventory management system
--]]
Combuctor = LibStub('AceAddon-3.0'):NewAddon('Combuctor', 'AceEvent-3.0', 'AceConsole-3.0')
local L = LibStub('AceLocale-3.0'):GetLocale('Combuctor')
local CURRENT_VERSION = GetAddOnMetadata('Combuctor', 'Version')
local playerN... |
local ELIZA -- A function set below. See http://en.wikipedia.org/wiki/ELIZA
-- Read a complete line from 'sock'
local function readline(sock)
local len=0
local tab={}
while true do
local data=sock:read()
-- If socket closed.
if not data then return nil end
table.insert(tab, data)
... |
---@class CppContainer.ArrayProxy.RoomConfigEntries @
local RoomConfigEntries = {}
--------------------
-- Operators
--------------------
--- The length (#) operation. Returns the size of this list.
---
---@return number @ (int)
function RoomConfigEntries:__len()
end
--------------------
-- Functions
---------------... |
-- I suggested to use busted --helper=.../bustedhelper instead of all the bustedhelper requires
-- but with the new cartridge-specific helper it's not that interesting, as you'd need a different command
-- for a different script depending on whether it's mostly used in ingame or titlemenu
-- in PICO-8, itests can be ... |
local fs = require 'goldsmith.fs'
local M = {}
function M.process_args(args)
args = args or {}
local current_pkg = fs.relative_to_cwd(vim.fn.expand '%')
local has_file_arg = false
for i, arg in ipairs(args) do
local before = args[i]
args[i] = vim.fn.expand(arg)
if before ~= args[i] then
has_... |
--//Written by @MemAddress
--//Visit me on GitHub, https://github.com/LuauProgrammer
--//Services
local HTTP = game:GetService("HttpService")
--//Variables
local Post = HTTP.PostAsync
local Decode = HTTP.JSONDecode
local Encode = HTTP.JSONEncode
--//Tables
local API = {}
--//Local Functions
local HTTPPost = fun... |
--Register LAM with LibStub
local MAJOR, MINOR = "LibItemInfo-1.0", 7
local lii, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not lii then return end --the same or newer version of this lib is already loaded into memory
local tEquipTypes = {
[ITEMTYPE_ARMOR] = {
--[ARMORTYPE_NONE] = {}, -- jewelry is excluded... |
local utils = require("../miscUtils")
return {
name = "members",
description = "Show how many members are in the server.",
usage = "members",
visible = true,
permissions = {},
run = function(self, message, argString, args, guildSettings, conn)
utils.sendEmbed(message.channel, "There are currently **".... |
--[[
Bagnon Void Storage Localization Information: French
--]]
local L = LibStub('AceLocale-3.0'):NewLocale('Bagnon-VoidStorage', 'frFR')
if not L then return end
L.ConfirmTransfer = 'Le dépôt de ces objets annulera toutes vos modifications et les rendra non échangeables et non remboursables.|n|nVoulez-vous continue... |
local dir = _mod.modpath
_mod.util = {}
_mod.new = {}
_mod.modules = {}
-- I might make this use libmtlog at some point.
local modname = _mod.modname
local logger = function(event, data)
local result = "# ["..modname.."] "..tostring(event)
for k, v in pairs(data) do
result = result.." "..tostring(k).."="..tostring... |
-- Object picking
-- <Resources>
-- models/t33.f3d
-- basic scene
view = UtilFunctions.simplerenderqueue()
view.rClear:colorvalue(0.0,0.0,0.0,0)
actor = actornode.new("t33",0,10,0)
actor:rotdeg(40,-20,40)
local t33 = model.load("t33.f3d")
actor.l3d = l3dmodel.new("t33",t33)
actor.l3d:linkinterface(actor)
-- pickin... |
-- This file is automatically generated, do not edit!
-- Path of Building
--
-- Intelligence support gems
-- Skill data (c) Grinding Gear Games
--
local skills, mod, flag, skill = ...
skills["SupportAddedChaosDamage"] = {
name = "Added Chaos Damage",
description = "Supports any skill that hits enemies.",
color = 3,... |
local function f() end
local a, b = f()
f(b)
local x, y, z = f(), f()
f(y)
local t, o = {}
o = 5
print(o)
o, t[1] = f()
f(t)
|
local _, ns = ...
----------------------------------------------------------------------------------------
-- Combat Settings for DarkUI Option GUI
----------------------------------------------------------------------------------------
ns.Categories[12] = L_CATEGORIES_COMBAT
ns.Hooks[12] = function()
ns.opt_wid... |
return {
tag = 'world',
summary = 'Create a new World.',
description = [[
Creates a new physics World, which tracks the overall physics simulation, holds collider
objects, and resolves collisions between them.
]],
arguments = {
{
name = 'xg',
type = 'number',
default = '0',
... |
local frame = require'tasks/http-server/websocket/frame'
local handshake = require'tasks/http-server/websocket/handshake'
local http_util = require'tasks/http-server/http-util'
local base64_encode = require 'tasks/http-server/base64'.encode
local tinsert = table.insert
local tconcat = table.concat
local mrandom = mat... |
local receivedLetters, currentPath = ...
local fourLettersCombinations = require(string.format("%smodels.value.FourLettersCombinations", currentPath))
local fiveLettersCombinations = require(string.format("%smodels.value.FiveLettersCombinations", currentPath))
local sixLettersCombinations = require(string.format("%smod... |
WireToolSetup.setCategory( "Chips, Gates", "Visuals/Screens", "Advanced" )
WireToolSetup.open( "gpu", "GPU", "gmod_wire_gpu", nil, "GPUs" )
if CLIENT then
language.Add("Tool.wire_gpu.name", "GPU Tool (Wire)")
language.Add("Tool.wire_gpu.desc", "Spawns a graphics processing unit")
language.Add("Tool.wire_gpu.0", ... |
local function get_value_from_json(json_str, field)
return cjson.decode(json_str)[field]
end
|
local weapon_ignore = {
'gmod_camera',
'weapon_fists',
'weapon_medkit',
'gmod_tool',
'hands_obs',
'weapon_physgun',
'weapon_physcannon',
}
hook.Add('BGN_StealFinish', 'BGN_Sandbox_StealMoney', function(actor, target, success)
if not success then return end
if engine.ActiveGamemode() ~= 'sand... |
#!/usr/bin/env tarantool
test = require("sqltester")
test:plan(78)
--!./tcltestrunner.lua
-- 2001 September 15
--
-- The author disclaims copyright to this source code. In place of
-- a legal notice, here is a blessing:
--
-- May you do good and not evil.
-- May you find forgiveness for yourself and forgive oth... |
------------------------------------------------------------------------------------
-- CSG
-- v1.0
-- gps_s.lua (server-side)
-- GPS / Pathfinding System
-- Priyen Patel, arc_
------------------------------------------------------------------------------------
|
modifier_enchantress_untouchable_lua = class({})
--------------------------------------------------------------------------------
-- Classifications
function modifier_enchantress_untouchable_lua:IsHidden()
return true
end
function modifier_enchantress_untouchable_lua:IsPurgable()
return false
end
-----------------... |
-- lightline
vim.g.lightline = {
enable = {
statusline = 1,
tabline = 0
},
colorscheme = 'onedark',
active = {
left = { { 'mode', 'paste' }, { 'readonly', 'filename', 'modified' } }
}
}
-- bufferline
require'bufferline'.setup {
options = {
diagnostics = 'nvim_l... |
local ngx = require('ngx')
local json = require('json')
local path = ngx.var.request_uri
local body = ngx.req.get_body_data()
local headers = ngx.req.get_headers()
local rid = headers["x-fc-request-id"]
if body == nil then
body = ""
end
if path == '/invoke' or path == '/' then
print("FC Invoke Start RequestId: ... |
-----------------------------------------
-- LOCALIZED GLOBAL VARIABLES
-----------------------------------------
local ZGV = _G.ZGV
-- ??
ZGV._QuestStepDataCommon = {
[3360001] = {
[1]={
[[Q1 I died, but___eternity.]],
[[S1 I awoke to a strange voice in some kind ___y to find a way out.]],
[[S1C1 =... |
-- Copyright (c) Jérémie N'gadi
--
-- All rights reserved.
--
-- Even if 'All rights reserved' is very clear :
--
-- You shall not use any piece of this software in a commercial product / service
-- You shall not resell this software
-- You shall not provide any facility to install this particular software in a c... |
--##
local util = require("factorio-plugin.util")
---@param event_id_param string
---@return string
local function get_class_name(event_id_param)
---@type string
local id = event_id_param:match("[a-zA-Z_][a-zA-Z0-9_]*$")
if id and (id:find("^on_") or id:find("^script_")) then
return id
end
if event_id_p... |
#!/usr/bin/lua
require 'nixio'
require 'luci.sys'
local luci = luci
local ucic = luci.model.uci.cursor()
local jsonc = require "luci.jsonc"
local i18n = require "luci.i18n"
local name = 'passwall'
local arg1 = arg[1]
local b64decode = nixio.bin.b64decode
local rule_path = "/usr/share/" .. name .. "/rules"
local reboo... |
#include !/Analytics
#include !/common/SHA256
#include !/data/CardInfo_new
#include !/data/ListBuilder
#include !/data/MiniInfo
#include !/UI
function onSave()
local chessClocksActive = UI.getAttribute("floatingChessClockUI", "active") == "true"
return JSON.encode({
clocks = chessClocksActive,
})
end
functi... |
local keymap = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }
local keymap = vim.api.nvim_set_keymap
-- set leader key to spacebar
keymap('n', '<Space>', '<NOP>', { noremap = true, silent = true })
vim.g.mapleader = ' '
-- Split window
keymap('n', 'ss', ':split<Return><C-w>w', { noremap = fal... |
-- Test Shield Inventory Asset
do
am.gfx_engine.asset(am.asset.new("main")
:add_texture("data/textures/items/shield.png"))
end
|
local util = require 'util'
local Subscription = require 'subscription'
--- @class CooperativeScheduler
-- @description Manages Observables using coroutines and a virtual clock that must be updated
-- manually.
local CooperativeScheduler = {}
CooperativeScheduler.__index = CooperativeScheduler
CooperativeScheduler.__t... |
--[[entry
utype 推荐人类型 会长/副会长
usharingrate 会长/副会长 分成占比
psharingrate 代理分成占比
ursharingrate 工会会长分成占比
price 当前价格
]]--
function entry(psharingrate,ursharingrate,price)
psharingrate = tonumber(psharingrate)
price = tonumber(price)
return price*ursharingrate*psharingrate / 10000
end
--[[ test
print (e... |
local saveData = {}
local function serialize(dataTable)
local str = ""
for i, v in pairs(dataTable) do
if not (type(v) == "number" or type(v) == "string" or type(v) == "boolean" or type(v) == "nil") then break end
if type(v) == "boolean" then
v = tostring(v)
end
... |
require("stategraphs/commonstates")
local events=
{
EventHandler("attacked", function(inst) end),
EventHandler("death", function(inst) end),
}
local states=
{
State{
name = "idle_off",
tags = {"idle"},
onenter = function(inst)
end,
onexit = function(inst)
... |
MSD.Language["ru"] = {
-- UI
lang_name = "Русский",
ok = "ОК",
map = "Карта",
off = "Выкл",
on = "Вкл",
time_add = "Добавить время",
type = "Тип",
delay = "Задержка",
cancel = "Отменить",
enable = "Активировать",
model = "Модель",
name = "Название",
settings = "Настройки",
editor = "Редактор",
red = ... |
--- Bio Tweaks
data:extend(
{
{
type = "recipe",
name = "bi-burner-mining-drill-disassemble",
icon = "__Bio_Industries__/graphics/icons/burner-mining-drill_disassemble.png",
subgroup = "extraction-machine",
category = "advanced-crafting",
order = "a[items]-a[burner-mining-drill]",
energy_r... |
local M = require "libMYNAME"
return M
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.