content stringlengths 5 1.05M |
|---|
return {
Manager = require 'particles.pmanager',
System = require 'particles.psystem',
Particle = require 'particles.particle',
Emitter = require 'particles.pemitter'
}
|
test = "My name is Lua."
pattern = ".*name is (%a*).*"
if test:match(pattern) then
print("Name found.")
end
sub, num_matches = test:gsub(pattern, "Hello, %1!")
print(sub)
|
local base = require 'hj212.client.handler.base'
local types = require 'hj212.types'
local handler = base:subclass('hj212.client.handler.min_data')
function handler:process(request)
local params = request:params()
local stime, err = params:get('BeginTime')
if not stime then
return nil, err
end
local etime, er... |
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ==========
PlaceObj('StoryBit', {
ActivationEffects = {},
Effects = {
PlaceObj('ModifyLabel', {
'Label', "WindTurbine",
'Prop', "electricity_production",
'Percent', "<power_production_boost>",
'ModifyId', "DesignFlaw",
}),
PlaceObj('LockUnlockB... |
DxInput = inherit(DxElement)
function DxInput:constructor(x, y, width, height, text)
self.type = "dx-input"
self.text = {
text = text,
visibleText = text,
maxCaretIndex = 0,
offsetIndex = 0,
padding = {
left = 10,
right = 10,
top = 0,
bottom = 0
}
}
self.selection = {
dragging = false... |
ENT.Contact = "https://space.bilibili.com/3761568/"
ENT.Base = "npc_vj_human_base"
ENT.Type = "ai"
ENT.Author = "Tamill"
ENT.Category = "Anime Bodyguard"
ENT.Purpose = ""
ENT.Instructions = ""
ENT.PrintName = "Izuku Midoriya"
ENT.AssetName = "npc_ab_izuku_midoriya"
ENT.ChineseName = "绿谷出久"
ENT.Web = "http://steamcommu... |
local selection = {0, 0}
local textDirections = { alpha = 255, str = "MOUSE BUTTONS / MOUSE WHEEL / WASD to shift circles\n\nMIDDLE MOUSE / SHIFT / SPACE to advance\n\nShift circles into shapes\nDon't let them stack up!" }
local textGameOver = { alpha = 0, str = "\n\nGame Over\n\nPress any keyboard button to start a ne... |
ITEM.name = "MP40"
ITEM.description= "A submachinegun chambered for 9x19mm."
ITEM.longdesc = "The MP 40 (Maschinenpistole 40) is a submachine gun chambered for the 9×19mm Parabellum cartridge. It was developed in Nazi Germany and used extensively by the Axis powers during World War II. \n\nAmmo: 9x19mm \nMagazine Capa... |
--[[
--==Contributers==--
- Egor Dorichev (egordorichev)
]]
local sfx = {}
function sfx:_init()
end
function sfx:_update()
end
function sfx:_draw()
end
sfx:_init()
return sfx |
local mail = require "resty.mail"
describe("mail", function()
it("returns connection error (port)", function()
local mailer = mail.new({
host = "127.0.0.1",
port = 1026,
})
local ok, err = mailer:send({
from = "from@example.com",
to = { "to@example.com" },
subject = "Subject... |
-- This file enable device data transformation for the template user
--
-- This file is in the 'vendor' safeNamespace and changes will persists upon template updates
local transform = {}
local bit = require("vendor.bit")
function transform.data_in(cloud_data)
-- Transform data from the 3rd party service to Murano
... |
local ffi = require("ffi")
local mecab = require("mecab_ffi")
local function set(arr)
local tbl = {}
for _, k in ipairs(arr) do
tbl[k] = true
end
return tbl
end
local vars = set {
"id",
"length",
"rlength",
"posid",
"char_type",
"stat",
}
local node = {}
node.__index = node
local... |
--[[
LuiExtended
License: The MIT License (MIT)
--]]
local SCB = LUIE.SpellCastBuffs
local E = LUIE.Effects
local A = LUIE.GetAbility()
-- Handles long term Disguise Item Icon (appears when wearing a disguise even if not in a disguised state)
local g_currentDisguise -- Tracks the currently equippe... |
#!/usr/bin/env tarantool
test = require("sqltester")
test:plan(60)
--!./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 ot... |
local comm = require "comm"
local shortport = require "shortport"
local nmap = require "nmap"
local bin = require "bin"
local stdnse = require "stdnse"
description = [[
Detects the TeamSpeak 2 server UDP voice communication service.
A single UDP packet (a login request) is sent. If the server does not have a
password... |
LinkLuaModifier( "modifier_core_shrine", "abilities/misc/core_shrine.lua", LUA_MODIFIER_MOTION_NONE )
core_guy_score_limit = class(AbilityBaseClass)
function core_guy_score_limit:GetIntrinsicModifierName()
return "modifier_core_shrine"
end
function core_guy_score_limit:OnSpellStart()
local caster = self:GetCaste... |
require("antifreeze") |
local cache = {}
local module = { cache = cache }
-- modifiers in use:
-- * cltr+alt: move focus between windows
-- * ctrl+shift: do things to windows
-- * ultra: custom/global bindings
module.start = function()
hs.fnutils.each(bindings.enabled, function(binding)
cache[binding] = require('bindings.' .. binding... |
LinkLuaModifier("modifier_defense_tower", "items/azazel_tower_defense.lua", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_defense_tower_true_sight", "items/azazel_tower_defense.lua", LUA_MODIFIER_MOTION_NONE)
item_azazel_tower_defense_1 = class(ItemBaseClass)
function item_azazel_tower_defense_1:CastFilterResul... |
-- luacheck: std max+busted
local both_error_messages =
{
CREATE_BAD_DIRECTORY =
{
"mmapfile.create: Error creating 'there_is_no_directory_with_this_name/test':"..
" No such file or directory",
"mmapfile.create: Error creating 'there_is_no_directory_with_this_name/test':"..
" The system cannot ... |
-- object based pets renderer, default renderer for pets.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local common = ReplicatedStorage:WaitForChild("common")
local Assets = require(common:WaitForChild("Assets"))
local PetRenderer = require(script.Parent.PetRenderer)
local getAssetModel = require(c... |
local ENT = FindMetaTable("Entity")
if not ENT.RealSetParent then
ENT.RealSetParent = ENT.SetParent
end
function ENT:SetParent(other)
if self:IsVehicle() then
return
end
self:RealSetParent(other)
end
|
--
-- from src/epsplot.c
--
-- void plot_start(int, int) to epsPlot; :plotStart
-- void plot_end(int) to epsPlot; :plotEnd
-- void move(double, double) to epsPlot; :move
-- void move_rel(double, double) to epsPlot; :moveRel
-- void draw(double, double) to epsPlot; :draw
-- void draw_rel(double, double) to epsPlo... |
local log = require("log")
local Api = require("coreApi")
local json = require("json")
local http = require("http")
function ReceiveFriendMsg(CurrentQQ, data)
return 1
end
function ReceiveGroupMsg(CurrentQQ, data)
if data.FromUserId ==2986807981 then--防止自我复读
return 1 end
if string.find(data.Content, "PM2.5") ... |
local path = minetest.get_modpath"trinium_machines" .. "/research/"
local M = trinium.materials.materials
local research = trinium.research
local S = research.S
research.add_chapter("Chemistry2", {
texture = M.abs:get"ingot",
x = 1,
y = 1,
name = S"Advanced Chemistry",
tier = 2
})
dofile(path .. "chemical_reacto... |
require('engine.common')
local Selection = GameObject:derive("Selection")
local font = love.graphics.newFont("fonts/press-start-2p/PressStart2P-Regular.ttf", 12)
function Selection:_init(x,y,w,h)
GameObject._init(self)
self.x, self.y, self.w, self.h = x, y, w, h
self.msg = "Press any key to select"
self.mode ... |
constants = {
big_font = love.graphics.newFont("deps/m5x7.ttf", 72),
smol_font = love.graphics.newFont("deps/m5x7.ttf", 36),
db16_col1 = { r = 20/255, g = 12/255, b = 28/255 },
db16_col2 = { r = 68/255, g = 36/255, b = 52/255 },
db16_col3 = { r = 48/255, g = 52/255, b = 109/255 },
db16_col4... |
local SETTINGS = _G.CONTROL_SETTINGS
local CONTROLS = _G.CONTROL_MAPPING
-------------------------------------------------------------------------------
local function GetSpeedMultiplier()
local fastNormal = GetSmartControlNormal(CONTROLS.MOVE_FAST)
local slowNormal = GetSmartControlNormal(CONTROLS.MOVE_SLOW)
... |
---------------------------------------------------------------------------------------------
-- Requirement summary:
-- [GetVehicleData] "vin" storage into PolicyTable
--
-- Description:
-- Getting "vin" via VehicleInfo.GetVehicleData on SDL start and storing it in policy table
-- 1. Used preconditions:
-- SDL and HMI... |
local function isSerializedCFrame(object)
return type(object) == "table" and #object == 12
end
return isSerializedCFrame
|
object_tangible_quest_township_exar_kun_intro_communication_terminal = object_tangible_quest_township_shared_exar_kun_intro_communication_terminal:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_township_exar_kun_intro_communication_terminal, "object/tangible/quest/township/exar_kun_intro_communication_term... |
local AvatarEditorService = game:GetService("AvatarEditorService")
local AvatarEditorPrompts = script.Parent.Parent
local CloseOpenPrompt = require(AvatarEditorPrompts.Actions.CloseOpenPrompt)
local GetConformedHumanoidDescription = require(AvatarEditorPrompts.GetConformedHumanoidDescription)
local EngineFeatureAvat... |
--[[
██╗░░░██╗░█████╗░██████╗░░██████╗░██╗░░░██╗██╗████████╗███████╗
██║░░░██║██╔══██╗██╔══██╗██╔════╝░██║░░░██║██║╚══██╔══╝╚════██║
╚██╗░██╔╝███████║██████╔╝██║░░██╗░██║░░░██║██║░░░██║░░░░░███╔═╝
░╚████╔╝░██╔══██║██╔══██╗██║░░╚██╗██║░░░██║██║░░░██║░░░██╔══╝░░
░░╚██╔╝░░██║░░██║██║░░██║╚██████╔╝╚██████╔╝██║░░░██║░░... |
require "luaClass.init"
_ENV=namespace "test"
using_namespace "luaClass"
class ("PropertyTest"){
property("Parent"){READ.getParent,WRITE.setParent};
property("Order"){READ.getOrder};
public{
FUNCTION.PropertyTest(function(self)
self._parent="parent"
self._order=2
end... |
local new = require "LuaObservable.src.new"
--[[
Just
Returns an Observable that emits a single value and then completes
]]
return function (value)
return new(_, function (next, err, complete)
next(value)
complete()
end)
end |
--
-- Created by IntelliJ IDEA. Copyright (C) 2017 Hanks
-- User: hanks
-- Date: 2017/5/26
-- A news app
--
require "import"
import "android.widget.*"
import "android.content.*"
import "android.view.View"
import "androlua.LuaHttp"
import "androlua.LuaAdapter"
import "androlua.widget.video.VideoPlayerActivity"
import "... |
local has_telescope, telescope = pcall(require, "telescope")
if not has_telescope then
return
end
local actions = require "telescope.actions"
local action_state = require "telescope.actions.state"
local pickers = require "telescope.pickers"
local sorters = require "telescope.sorters"
local finders = require "telesc... |
Inherit = 'SnapWindow'
ContentViewName = 'layerswindow'
Title = 'Layers'
OnContentLoad = function(self)
self:UpdateLayers()
end
UpdateLayers = function(self)
self:GetObject('ScrollView'):RemoveAllObjects()
local artboard = self.Bedrock:GetObject('Artboard')
if artboard then
for i, layer in ipairs(artboard.Chil... |
return require('evgkulslualibs.template.init')
|
require('engine.common')
local Basic = require('objects.basic')
local Wall = Basic:derive('Wall')
local img = require('ld48sheet')
function Wall:_init(x,y,w,h)
Basic._init(self, {x=x, y=y, w=w, h=h}, {x=16*2, y=0, w=16, h=16}, img)
end
function Wall:draw(game)
Basic.draw(self, game)
end
function Wall:isBlockin... |
--- Class representing a batch of similar requests.
local utils = require('graphql.utils')
local request_batch = {}
local function iterator_opts_tostring(iterator_opts)
return ('%s,%s'):format(
iterator_opts.iterator or iterator_opts[1] or 'EQ',
iterator_opts.limit or '')
end
-- String uniquely ... |
print(type(true))
print(type(false))
print(type(nil))
-- 测试nil是否为false
if false or nil then
print("至少有一个是true")
else
print("false 和 nil都为false!")
end
print("-----")
print(type(2))
print(type(2.2))
print(type(0.2))
print(type(2e+1))
print(type(0.2e-1))
print(type(7.826262664654545e-06))
string1 = "sd"
string2 = "sdd"... |
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local reloadScheduled = false
local reloadBindable = Instance.new("RemoteFunction")
reloadBindable.Name = "HotReloaded"
reloadBindable.Parent = ReplicatedStorage
local function listenToChangesRecursive(root, con... |
-----------------------------------------
-- Created and modify by L'ile Légale RP
-- SenSi and Kaminosekai
-----------------------------------------
Locales['fr'] = {
-- General
['cloakroom'] = 'Vestiaire',
['civil_clothes'] = 'Tenue Civil',
['slaughterer_clothes'] = 'Tenue de travail',
['veh_menu'] = 'Garage',
... |
--- Interface
-- @module rethinkdb.reql
-- @author Adam Grandquist
-- @license Apache
-- @copyright Adam Grandquist 2016
local m = {}
function m.init(r)
--- Helper to determine type of public interface.
-- Returns a string from the following list or nil.
-- - connection: returned from r.connector().connect or r... |
--[[
--=====================================================================================================--
Script Name: Disable Fall Damage, for SAPP (PC & CE)
Description: This script will allow you to disable fall damage on a per-map-per-game mode basis.
Copyright (c) 2020, Jericho Crosby <jericho.crosby227@gmai... |
-- Doors that are especially useful for travelnet elevators but can also be used in other situations.
-- All doors (not only these here) in front of a travelnet or elevator are opened automaticly when a player arrives
-- and are closed when a player departs from the travelnet or elevator.
-- Autor: Sokomine
minetest.r... |
--A simple implementation of classes in Lua
local Object
function class(super)
super = super or Object
local prototype = setmetatable({}, super)
prototype.super = super
prototype.__index = prototype
return prototype
end
Object = class()
function Object:new(...)
local instance = setmetatable({}, self)
instance... |
---
-- A load of function handling player spawn
-- @author Mineotopia
-- @module spawn
if CLIENT then return end -- this is a serverside-ony module
local Vector = Vector
local table = table
local mathSin = math.sin
local mathCos = math.cos
local spawnPointVariations = {Vector(0, 0, 0)}
for i = 0, 360, 22.5 do
spaw... |
local skynet = require("skynet")
local redis = require("skynet.db.redis")
local LOG = require("go.logger")
local M = {}
---Start a redis proxy service
---@param conf redisconfig
---@param watchhandler? fun():nil #watch handler
function M.connect(conf, watchhandler)
local db
local watch
skynet.start(... |
function Add_Recycler(recycler_name, recycler_crafting_group, recycler_tint, recycler_slots)
data:extend(
{
{
type = "furnace",
name = recycler_name,
icons = {
{
icon = "__base__/graphics/icons/steel-furnace.png",
tint=recycler_tint,
icon_size = 32,
... |
local Table = require "Model.MySQL.Table"
local Field = require "Model.MySQL.Field"
local test = Table("cfadmin_test", {
-- 整型字段
Field.BigInt { name = "id", unsigned = true, primary = true, auto_increment = 0, comment = "自增ID" },
Field.Int { name = "user_id", unsigned = true, default = 0, null = true, comm... |
------------------------------------------------------------------------------------------------------------------------
-- Game Type Server
-- Author Morticai (META) - (https://www.coregames.com/user/d1073dbcc404405cbef8ce728e53d380)
-- Date: 2021/3/16
-- Version 0.1.2
-------------------------------------------------... |
-- Creator:
-- Naowin, 04.07.2018
-- Editors:
-- EarthSalamander #42, ??.07.2018
-- AltiV, ??.08.2018
--------------------------------------
-- Arc Lightning --
--------------------------------------
imba_zuus_arc_lightning = class({})
function imba_zuus_arc_lightning:OnSpellStart()
local caster = s... |
--
-- Includes
--
-- factorio
require 'mod-gui'
-- stdlib
local String = require('__stdlib__/stdlib/utils/string')
local Event = require('__stdlib__/stdlib/event/event')
local evs = defines.events
local Guiconfig =
{
__call = function(self, ...)
return self.new(...)
end
}
local Guiconfig_meta =
... |
---TODO: add deprecation warning after open pr in a number of repos depending on sql namespace
print "DEPRECATED: use require'sqlite' instead"
return require "sqlite.db"
|
---@type table
local implicitUnknown
pairs(implicitUnknown)
---@type table<any, any>
local explicitUnknown
pairs(explicitUnknown)
---@type table<number, number>
local numberNumberTable
---@type table<number, string>
local numberStringTable
---@type table<string, string>
local stringStringTable
---@type number[]
... |
LibExecutionQueue = {}
function LibExecutionQueue:new(_wait)
-- This is a singleton
self.Queue = self.Queue or {}
if self.Paused == nil then self.Paused = true end
self.Wait = _wait or self.Wait or 20
return LibExecutionQueue
end
function LibExecutionQueue:Add(func, name)
table.insert(self.Queue, 1, {f... |
/*---------------------------------------------------------------------------
Loading
---------------------------------------------------------------------------*/
local teamSpawns = {}
local jailPos = {}
local function onDBInitialized()
local map = MySQLite.SQLStr(string.lower(game.GetMap()));
MySQLite.query("SELECT... |
function create(x, y, width, height, texture)
entity = getNewEntity("baseLuaEntity")
setEntityLabel(entity, "texture")
setEntityX(entity, x)
setEntityY(entity, y)
setEntityRenderWidth(entity, width)
setEntityRenderHeight(entity, height)
startEntityAnimation(entity, texture)
addEntityToGr... |
function normal (shader, t_base, t_second, t_detail)
shader:begin ("particle", "particle")
: sorting (3, false)
: blend (true,blend.one,blend.one)
: aref (false,0)
: zb (true,false)
: fog (false)
: distort (true)
shader:sampler ("s_base") :texture (t_base)
shader:sampler ("s_position"... |
dofile(minetest.get_modpath("builtin_falling") .. "/func.lua") -- Not EDIT THAT
--
-- Config
--
-- Protect in realtime the lava flowing (can be slow)
PROTECT_LAVA_REALTIME = 0 -- 0 for OFF , 1 for ON
-- Protect in realtime the water flowing (can be very slow, because some water in this world :p)
PROTECT_WATER_REALTIME... |
local M = {}
function M.setup_page(self)
local slider = self.druid:new_slider("slider_simple_pin", vmath.vector3(95, 0, 0), function(_, value)
gui.set_text(gui.get_node("slider_simple_text"), math.ceil(value * 100) .. "%")
end)
slider:set(0.2)
local slider_notched = self.druid:new_slider("slider_notched_pin",... |
-- Copyright 2006-2013 Robert Gieseke. See LICENSE.
-- Lilypond LPeg lexer.
-- TODO Embed Scheme; Notes?, Numbers?
local l = require('lexer')
local token, word_match = l.token, l.word_match
local P, R, S = lpeg.P, lpeg.R, lpeg.S
local M = {_NAME = 'lilypond'}
-- Whitespace.
local ws = token(l.WHITESPACE, l.space^1)
... |
slot0 = class("NewYearGreetingPtPage", import(".TemplatePage.PtTemplatePage"))
slot0.OnInit = function (slot0)
slot0.super.OnInit(slot0)
slot0.awardGotTag = slot0:findTF("award_got", slot0.bg)
end
slot0.OnFirstFlush = function (slot0)
slot0.super.OnFirstFlush(slot0)
onButton(slot0, slot0.battleBtn, function ()
... |
-- c mostly == cpp
local code_utils = require("refactoring.code_generation.utils")
local cpp = require("refactoring.code_generation.langs.cpp")
local string_pattern = "%s"
local function c_func_args_default_types(args)
local new_args = {}
for _, arg in ipairs(args) do
table.insert(
new_arg... |
-- rc LPeg lexer.
local l = require('lexer')
local token, word_match = l.token, l.word_match
local P, R, S = lpeg.P, lpeg.R, lpeg.S
local M = {_NAME = 'rc'}
-- Whitespace.
local ws = token(l.WHITESPACE, l.space^1)
-- Comments.
local comment = token(l.COMMENT, '#' * l.nonnewline^0)
-- Strings.
local str = l.delimit... |
-- configuration of the menu
config = {
menuTitle = 'Build-a-Burger',
buns = {"Sesame Seed", "Brioche", "Lettuce", "None"},
patties = {"Quarter Pound", "Smash", "Double Decker", "Cheese Filled"},
sauces = {"Ketchup", "Mustard", "Relish", "Thousand Island"},
}
|
function toggleDevelopmentMode( )
if ( c_isPlayerScripter( localPlayer ) ) then
if ( not getDevelopmentMode( ) ) then
setDevelopmentMode( true )
else
setDevelopmentMode( false )
end
end
end
addCommandHandler("dmode", toggleDevelopmentMode)
local screenX, screenY = guiGetScreenSize( )
local isEventHan... |
local len = string.len
local wait = coroutine.wait
local start = coroutine.start
local luaBehaviour;
local transform;
local gameObject;
StartView = BaseView:New('StartView');
local this = StartView;
--启动事件--
function StartView.Awake(obj)
gameObject = obj;
transform = obj.transform;
luaBehaviour = transform:GetCo... |
local lfs = require( "lfs" )
local _M = { }
local commands = { }
local commandNames = { }
local handlers = { }
local events = { }
local prompts = { }
local function meta( t )
return {
__index = t,
__newindex = t,
}
end
local function makeCallbacks( handler )
if type( handler ) == "function" then
return { {... |
require "lib/pubnub"
Networking = Core.class(EventDispatcher)
Networking.LOG_TAG = "Networking"
local LOG_TAG = Networking.LOG_TAG
local MESSAGE_SEND = 1
local MESSAGE_RECEIVE = 2
local TIMEOUT_CONNECTION = 10 -- 10 seconds timeout then closed connection
--inisiasi module pubnub, dipanggil pas pertama kali sebelum ... |
#!/usr/bin/env tarantool
test = require("sqltester")
test:plan(1)
--!./tcltestrunner.lua
-- 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 others.
-- May you share ... |
ModifyEvent(-2, -2, -2, -2, -1, -1, -1, 2608, 2608, 2608, -2, -2, -2);--by fanyu 打开箱子,改变贴图 场景31-34
AddItem(174, 150);
AddEthics(-1);
do return end;
|
local skynet = require "skynet"
local log = require "bw.log"
local huawei = require "bw.auth.huawei"
local private_key = [[-----BEGIN RSA PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCHJJ1kxhOXDh4M
9QgXj2sXahxG7clGnWDp5YW9f/+Xyf2RzZma1JB76KqXh2ZNyJfpG/4tsUqm1KBQ
3w1glvsvUsCcuiAhVmT3CkN7+M/S+tt... |
local numberToType = {"x","y","z"}
local function matmul4(m1,m2)
return {
m1[1]*m2[1]+m1[2]*m2[5]+m1[3]*m2[9]+m1[4]*m2[13],
m1[1]*m2[2]+m1[2]*m2[6]+m1[3]*m2[10]+m1[4]*m2[14],
m1[1]*m2[3]+m1[2]*m2[7]+m1[3]*m2[11]+m1[4]*m2[15],
m1[1]*m2[4]+m1[2]*m2[8]+m1[3]*m2[12]+m1[4]*m2[16],
... |
local parsers = require'nvim-treesitter.parsers'
local query = require("nvim-treesitter.query")
local M = {}
M.check = function ()
local p = parsers.get_parser(0, "lua")
local f = io.open("/home/liam/fifo", "w")
local root = p:parse()[1]:root()
local query = vim.treesitter.get_query("lua", "pull")
local ar... |
local bit = require "bit"
local smb = require "smb"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
description = [[
Returns information about the SMB security level determined by SMB.
Here is how to interpret the output:
* User-level authentication: Each user has a sepa... |
local has_devicons, rq_devicons = pcall(require, "nvim-web-devicons")
local concat = table.concat
local sort = table.sort
local bo = vim.bo
local cmd = vim.cmd
local diagnostic = vim.diagnostic or vim.lsp.diagnostic
local filter = vim.tbl_filter
local fn = vim.fn
local map = vim.tbl_map
local split = vim.split
---@t... |
--[[
TheNexusAvenger
Pushes the local instances to the server.
--]]
local NexusGit = require(script.Parent.Parent.Parent):GetContext(script)
local NexusInstance = NexusGit:GetResource("NexusPluginFramework.NexusInstance.NexusInstance")
local HttpRequest = NexusGit:GetResource("SplitHttp.HttpRequest")
local MultiHttpR... |
data:extend(
{
{
type = "recipe",
name = "hybridized-wall",
enabled = false,
energy_required = 2.5,
ingredients =
{
{"alien-bioconstruct", 5},
{"stone", 10},
},
result = "hybridized-wall"
},
{
type = "recipe",
name = "hybridized-gate",
enabled = false,
energy_require... |
local _MODULES = _MODULES
local package_loaded = package.loaded
local _R = debug.getregistry()
local _LOADLIB = _R._LOADLIB
local is_windows = system.IsWindows()
local is_linux = system.IsLinux()
local is_osx = system.IsOSX()
local is_x64 = jit.arch == "x64"
local separator = is_windows and "\\" or "/"
local dll_pref... |
Inherit = 'Label'
Passes = 1
OnLoad = function(self)
self:OnUpdate('FilterName')
end
OnUpdate = function(self, value)
if value == 'FilterName' then
self.Filter = Drawing.Filters[self.FilterName]
elseif value == 'Text' then
if self.AutoWidth then
self.Width = #self.Text
else
... |
include("shared.lua")
local baseFont = "CW_HUD72"
local ammoText = "CW_HUD60"
function ENT:Initialize()
surface.SetFont(baseFont)
self.baseHorSize, self.vertFontSize = surface.GetTextSize(self.PrintName)
self.baseHorSize = self.baseHorSize < 600 and 600 or self.baseHorSize
self.baseHorSize = self.baseHorSize + 20... |
local o = vim.opt
local g = vim.g
vim.cmd [[syntax enable]]
o.guifont = 'JetBrainsMono Nerd Font:h10,codicon:h10'
o.encoding = 'utf-8'
o.number = true
o.relativenumber = true
o.mouse = 'a'
o.backup = false
o.swapfile = false
o.wb = false
o.splitbelow = true
o.splitright = true
o.termguicolors = true
o.wildignore =... |
local jailTimer = nil
local timeLeft = nil
function decrementJailTime()
timeLeft = timeLeft - 1
if (timeLeft <= 0) then
triggerServerEvent("UCDjail.releasePlayer", resourceRoot)
return
end
exports.UCDdx:add("jailTimer", "Jailed: "..tostring(exports.UCDutil:tocomma(timeLeft)).. " Seconds Remaining", 200, 0, 0)
... |
-- Manage HDF5 files
useHDF5 = {}
files = {}
for _,l in ipairs({'train','valid'}) do
useHDF5[l] = false
if #opt[l .. 'File'] > 0 then
useHDF5[l] = true
files[l] = hdf5.open(opt.dataDir .. '/' .. opt[l .. 'File'] .. '.h5', 'r')
local dataSize = torch.Tensor(files[l]:read('data'):dataspa... |
-- --------------------
-- 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... |
{%
local itemCountsAligned = loadTemplate( "itemCountsAligned" )
%}
<tr>
<td>{{ weaponNameURL( { class = class, weapon = weapon } ) }}</td>
<td{%
if weapon.improve then
print( ( ">%s%sz" ):format(
itemCountsAligned( { materials = weapon.improve.materials } ),
commas( weapon.price )
) )
else
pri... |
--//////////////////////////////////////////////////////////////////////
--************************
--Floor consts
--************************
return {
facing = {
up = 0,
right = 1,
down = 2,
left = 3
}
}
|
local function readonly_newindex(_, _, _)
error("You cannot make any changes to this table!", 1)
end
function table.freeze(tbl)
return setmetatable(
tbl,
{
__index = tbl,
__newindex = readonly_newindex
}
)
end
local original_pairs = pairs
function table.pai... |
do
local function Cons(x) return { x, __tag = "Cons" } end
local Nil = { __tag = "Nil" }
local function filter(f, k)
if k.__tag == "Nil" then
return Nil
end
local en = k[1]
local x, xs = en._1, en._2
if f(x) then
return Cons({ _1 = x, _2 = filter(f, xs) })
end
return filter... |
--[[
Model - intermediate stop time of day
Type - MNL
Authors - Siyu Li, Harish Loganathan
]]
-- 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 t... |
--============================================================================--
-- destroy_and_return(built_entity, creator)
--
-- destroy an entity and return it to its creator's inventory, if possible
--
-- param built_entity (LuaEntity): The entity just placed
-- param creator (LuaEntity): The entity (player or rob... |
--* This Document is AutoGenerate by OrangeFilter, Don't Change it! *
---@meta
---
---[3.2]audio data[parent:]
---
---@class OF_AudioFrameData
---
---[3.2]audio beat
---
---@field beat float
---
---[3.2]audio loudness
---
---@field loudness float
---
---[4.4]microphone volume
---
---@field microphoneVolume float
---
... |
audio = {}
audio.__index = audio
function audio:new(f,t)
t=t or "stream"
local obj={}
setmetatable(obj, audio)
obj.source=love.audio.newSource(f,t)
obj.f=f
obj.t=t
obj.endEvent=multi:newLoop()
obj.endEvent.Pare=obj
obj.wasPlaying=false
obj.func={}
obj.func2={}
obj.func3={}
obj.func4={}
obj.endEvent:OnLoop... |
-------------------------------------------------------
local PLUGIN = PLUGIN or {
}
PLUGIN.Developer = 'ted.lua'
PLUGIN.Profile = 'http://steamcommunity.com/id/tedlua/'
PLUGIN.Date = '12/10/17'
-------------------------------------------------------
if !DrawManager then Dra... |
function onCreate()
-- triggered when the lua file is started;
end
|
local Zlog = require "Zlibs.class.Log"
local math = require "Zlibs.class.math"
local type = require "Zlibs.tool.type"
local obj={}
local funcValues={}
-- 魔术变量接口_插件用
obj._magicValues = funcValues
--默认变量
obj.__tag="Size"
obj.width=-1
obj.height=-1
--默认变量结束
--/////////////////////////////////////////
--//////////////////... |
local ffi = require('ffi')
local Vector = require('radio.core.vector').Vector
describe("vector", function ()
ffi.cdef[[
typedef struct {
uint32_t x;
uint32_t y;
} elem_t;
]]
it("constructor", function ()
-- Vector of 0
local v = Vector(ffi.typeof("elem_t"), 0)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.