content stringlengths 5 1.05M |
|---|
local color = require("Color")
local materials = {}
------------------------------------------------------------------------------------------------------------------------
materials.types = {
textured = 1,
solid = 2,
}
function materials.newDebugTexture(width, height, h)
local texture = {width = wid... |
local gas_param = 100
--ICONS
data.raw.recipe["automation-science-pack"].icons ={
{icon = "__base__/graphics/icons/automation-science-pack.png", icon_size=64},
{ icon = "__angelsrefining__/graphics/icons/num_1.png",
icon_size=32,
tint = {r = 0.8, g = 0.8, b = 0.8, a = 0.5},
scale = 0.32,
shift = {-12, -12}}... |
--
-- JukeBox Config
--
local config = {}
config.now_playing = ""
config.nothing_playing = "There is no track playing."
config.help = ""
config.set_comment = true
config.comment = ""
-- Message shown to channel when a youtube link is posted.
config.youtube_html = [[
<table>
<tr>
<td align="center" valig... |
-----------------------------------
-- Area: Mhaura
-- NPC: Hagain
-- Standard Info NPC
-----------------------------------
local ID = require("scripts/zones/Mhaura/IDs")
require("scripts/globals/keyitems")
require("scripts/globals/quests")
-----------------------------------
function onTrade(player, npc, trade)
... |
if data.raw["item"]["bullet-casing"] then
data.raw["item"]["bullet-casing"].icon = "__morebobs__/graphics/icons/warfare/bullet-casing.png"
data.raw["item"]["shotgun-shell-casing"].icon = "__morebobs__/graphics/icons/warfare/shotgun-shell-casing.png"
data.raw["item"]["magazine"].icon = "__morebobs__/graphics/icons/wa... |
---@class CS.ExternalImagePool
---@type CS.ExternalImagePool
CS.ExternalImagePool = { }
---@return CS.ExternalImagePool
function CS.ExternalImagePool.New() end
---@param url string
---@param onSuccess (fun(obj:CS.FairyGUI.NTexture):void)
---@param onFail (fun(obj:string):void)
function CS.ExternalImagePool:Load(url, o... |
-- include the core classes in the path
package.path = '../core/?.lua:' .. package.path
-- Define MyClass class
local array = require('core.array')
local class = require('core.class')
-- normally a module would return this but we'll just make use of it in this same script
local MyClass = class(function (MyClass)
-- ... |
local EQUIPMENT = script:FindAncestorByType("Equipment")
local propSpike_Planted = script:GetCustomProperty("Spike_Planted")
local propBasicRifle = script:GetCustomProperty("BasicRifle")
local propTriggerZoneManager = script:GetCustomProperty("TriggerZoneManager")
local propPickupTrigger = script:GetCustomProperty("... |
function GFDiemetradon_OnEnterCombat(Unit,Event)
Unit:RegisterEvent("GFDiemetradon_FelFireball", 11000, 0)
Unit:RegisterEvent("GFDiemetradon_FlamingWound", 51000, 0)
end
function GFDiemetradon_FelFireball(Unit,Event)
Unit:FullCastSpellOnTarget(37945,Unit:GetClosestPlayer())
end
function GFDiemetradon_FlamingWound(... |
--[[
@Authors: Ben Dol (BeniS)
@Details: Magic train event logic
]]
AfkModule.AutoBuff = {}
AutoBuff = AfkModule.AutoBuff
function AutoBuff.Event(event)
if g_game.isOnline() then
local player = g_game.getLocalPlayer()
local words = SupportModule.getPanel():getChildById('AutoBuffText'):getText()
Help... |
--[[
LuiExtended
License: The MIT License (MIT)
--]]
-- CombatText namespace
LUIE.CombatText = {}
local CombatText = LUIE.CombatText
local CombatTextConstants = LUIE.Data.CombatTextConstants
local printToChat = LUIE.PrintToChat
local LMP = LibMediaProvider
local moduleName = LUIE.name .. "Co... |
function get_client(matcher)
for _, c in pairs(client.get()) do
if matcher(c) then
return c
end
end
end
function get_clients(matcher)
result = {}
for _, c in pairs(client.get()) do
if matcher(c) then
table.insert(result, c)
end
end
return ... |
-- luacheck: ignore 212 unused argument
local tp = require "tprint"
local list = {
{item = "socks", price=10, qty=5, discount=0.5, note="nice and warm"},
{item = "gloves", price=55, qty=25, discount=nil, note="made of wool"},
{item = "cardigan", price=255, qty=11, discount=0.1, note="a bit pricey"},
... |
local cwd = (...):gsub("%.[^%.]+$", "") .. "."
return {
name = "client",
description = "Initialize the client and setups its main window",
author = "edubart",
website = "https://github.com/edubart/otclient",
reloadable = false,
sandboxed = true,
loadLater = {
{"client_styles"},
... |
local storm = ar.storm
local stormlib = ar.stormlib
mpq_util = {}
-- 添加文件给地图
-- mpq_handle - 已经打开的地图handle
-- file_path - 需要加入的文件的路径,fs.path
-- path_in_archive - 地图压缩包中的路径,string
-- 返回值:true表示成功,false表示失败
function mpq_util:import_file(mpq_handle, file_path, path_in_archive)
log.trace("mpq_util.import... |
-- This is an IEEE 1905.1 protocol dissector for Wireshark written in the Lua
-- scripting language.
--
-- Installation
-- *************
-- Shutdown wireshark. Copy this file into the installation directory given
-- below.
--
-- Windows
-- -------
-- The installation directory can be selected among the follo... |
local error = {}
error.USER_NOT_FOUND = '1'
error.USER_ALREADY_EXISTS = '2'
error.INVALID_PARAMS = '3'
error.USER_NOT_ACTIVE = '4'
error.WRONG_PASSWORD = '5'
error.WRONG_ACTIVATION_CODE = '6'
error.WRONG_SESSION_SIGN = '7'
error.NOT_AUTHENTICATED = '8'
error.WRONG_RESTORE_TOKEN = '9'
error.USER_ALREADY_ACTIVE = '10'
e... |
------------------------------------------------------------------------------
-- IMPORTANT: DO NOT EDIT THIS FILE!!! --
------------------------------------------------------------------------------
-- This file relies on other versions of itself being the same. --
-- I... |
local crystal_sounds = foundation.com.node_sounds:build("crystal")
--local Cuboid = assert(foundation.com.Cuboid)
--local nb = Cuboid.new_fast_node_box
--[[local nodebox = {
type = "fixed",
fixed = {
nb(2, 0, 2, 4, 14, 4),
nb(4, 0, 4, 4, 10, 4),
nb(5, 0, 3, 6, 12, 7),
nb(12, 0, 2, 2, 15, 2),
n... |
local skynet = require "skynet"
require "skynet.manager"
skynet.start(function()
-- newservice()中传入的参数类型必须是string类型
local handeler1 = skynet.newservice("testPassArgs", "1", "false", "helianhaodong") -- test这个服务不执行完,newservice()就会一直阻塞在这里
skynet.error("handler1", skynet.address(handeler1))
local hande... |
main_quest = true
collectibles =
{
{"qe_portstone_inactive", 1}
}
conditions = {
"portstone_activated",
}
markers = {
{
map = "res/map/meadows/meadows.tmx",
position = {3150, 1350},
step = 0
},
{
map = "res/map/meadows/meadows.tmx",
position = {3150, 1350},
step = -1
}
}
|
--[[
Title: TimeUp
Author(s): big
Date: 2019.01.23
Place: Foshan
use the lib:
------------------------------------------------------------
local Password = NPL.load("(gl)Mod/ExplorerApp/pages/GameProcess/TimeUp/TimeUp.lua")
------------------------------------------------------------
]]
local Wallet = NPL.load('(gl)M... |
------------------------------------------------------------------------------
-- Hadamard Product for Low-rank Bilinear Pooling
-- Jin-Hwa Kim, Kyoung-Woon On, Woosang Lim, Jeonghee Kim, Jung-Woo Ha, Byoung-Tak Zhang
-- https://arxiv.org/abs/1610.04325
--------------------------------------------------------------... |
---------------------------------- Energy Cube MK1 ----------------------------------
-- Entity --
local ec1E = {}
ec1E.type = "accumulator"
ec1E.name = "EnergyCubeMK1"
ec1E.icon = "__Mobile_Factory_Graphics__/graphics/energy/EnergyCubeMK1I.png"
ec1E.icon_size = 128
ec1E.flags = {"placeable-neutral", "player-creation"... |
local function enum(tbl)
local call = {}
for k, v in pairs(tbl) do
if call[v] then
return error(string.format('enum clash for %q and %q', k, call[v]))
end
call[v] = k
end
return setmetatable({}, {
__call = function(_, k)
if call[k] then
return call[k]
else
return error('invalid enumeration:... |
-- collision tester
local collisionTestT = {}
local screenwidth = love.graphics.getWidth()
local screenHeight = love.graphics.getHeight()
function collisionTestT.collisionTilesTester(MAPSNWORLD,worldX, worldY, playerOffsetX, playerOffsetY)
-- for worldKey, worldVal in ipairs(MAPSNWORLD) do
-- for mapsKey, maps... |
local tMyObjects = {};
local class = class;
local tSim2D = Sim2D.__properties;
local SIM2D = SIM2D;
local Sim2D = Sim2D;
class "MyObject" : extends(Sim2D) {
__construct = function(this)
--object settings
tMyObjects[this] = {
};
end,
Destroy = function(this)
local tChildren = this:GetChildren... |
local util = require "util"
local TabbedFile = require "TabbedFile"
local actionTypes = {}
local conditionals = {}
-------------------------------
-- Action base-class
local action = {}
function action:Process(context)
--Allow start-of-iteration only data to parse.
if(self.first) then
--Note that ... |
util.AddNetworkString("Driveby_Toggle");
util.AddNetworkString("DriveBy_OpenMenu");
util.AddNetworkString("DriveBy_CloseMenu");
net.Receive("Driveby_Toggle", function(len, client)
local curState = client.DriveByState or false;
local newState = !curState;
if (!client:CanDriveBy()) then return; end
client:SetAllowW... |
local AttachConfig = dofile("server/setting/shape_info.lua").AttachConfig
local ShapeIdCfg = dofile("server/setting/shape_info.lua").Name2ShapeId
return function(Data)
local RetTbl = {}
local AttachList = Split(Data, ";")
for _, Value in pairs(AttachList) do
local Attach = Split(Value, ":")
assert(#Attach == 2 ... |
-- 2019 (c) kontakt@herrsch.de
local function prettify(t, o)
o = o or ""
if type(t) == "table" then
local s = "{"
for k, v in pairs(t) do
if type(k) ~= "number" then k = '"'..k..'"' end
s = s.."\n "..o.."["..k.."] = "..prettify(v, o.." ")..","
end
r... |
-- super mini bootstrap
print("\n init_minizf1.lua zf180915.1341 \n")
tmr.alarm(0, 7000, tmr.ALARM_SINGLE, function()
dofile("disp_oled.lua")
oled_line1="RESET"
oled_line2=""
oled_line3=""
oled_line4=""
oled_line5=""
disp_oled()
--dofile("wifi_ap_start.lua")
--dofile("telnet_srv.lua")
dofile("start_demo.lua")
d... |
local length = ARGV[1]
for i=0, length do
local offset = i*4 + 1
local set = ARGV[offset+1]
local storage = ARGV[offset+2]
local score = ARGV[offset+3]
local member = ARGV[offset+4]
if storage == '1' then
redis.call('ZADD', set, score, member)
elseif storage == '2' then
local discreteSet ... |
-- 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 Apache License, Version 2.0 (the
-- "License"); y... |
local MultiLabelMarginCriterion, parent = torch.class('nn.MultiLabelMarginCriterion', 'nn.Criterion')
function MultiLabelMarginCriterion:__init()
parent.__init(self)
self.sizeAverage = true
self.isTarget = torch.Tensor()
end
function MultiLabelMarginCriterion:updateOutput(input, target)
self.output_tensor... |
-- Simple logger for LuaDist.
module ("dist.logger", package.seeall)
local cfg = require "dist.config"
local sys = require "dist.sys"
-- Open 'log_file' and return a log, or nil and error msg on error.
local function get_log(log_file)
log_file = log_file or cfg.log_file
assert(type(log_file) == "string", "lo... |
return {
summary = 'Get the direction of the quaternion.',
description = [[
Creates a new temporary vec3 facing the forward direction, rotates it by this quaternion, and
returns the vector.
]],
arguments = {},
returns = {
{
name = 'v',
type = 'Vec3',
description = 'The direction ... |
AddCSLuaFile("mapvoting/client.lua")
AddCSLuaFile("mapvoting/shared.lua")
include("mapvoting/shared.lua")
if SERVER then
include("mapvoting/server.lua")
else
include("mapvoting/client.lua")
end |
local files = require 'files'
local lang = require 'language'
local define = require 'proto.define'
local guide = require 'parser.guide'
local util = require 'utility'
local sp = require 'bee.subprocess'
local function disableDiagnostic(uri, code, results)
results[#results+1] = {
title = ... |
--[[
Copyright (c) 2014, Robert 'Bobby' Zenz
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the fo... |
-- title: Pigventure (Or Something)
-- author: Skaruts (MetalDudeBro)
-- desc: Following from this tutorial: https://www.youtube.com/watch?v=SoFOva5FUnI
-- script: lua
-- input: mouse, keyboard
-- saveid: foo
-- version 0.4
--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--
-- TODO:
--
-- - ... |
local cmp = require("cmp")
local luasnip = require("luasnip")
local function rtc(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
end
local function check_back_space()
local col = vim.fn.col(".") - 1
return col == 0 or vim.fn.getline("."):sub(col, col):match("%s")
end
local M = {}
functi... |
local app = app
local libcore = require "core.libcore"
local Class = require "Base.Class"
local Unit = require "Unit"
local Gate = require "Unit.ViewControl.Gate"
local InputGate = require "Unit.ViewControl.InputGate"
local QuantizeToClock = Class {}
QuantizeToClock:include(Unit)
function QuantizeToClock:in... |
--New
object_static_base_shared_static_flagpole_base = SharedBuildingObjectTemplate:new {
clientTemplateFileName = "object/static/base/shared_static_flagpole_base.iff"
}
ObjectTemplates:addClientTemplate(object_static_base_shared_static_flagpole_base, "object/static/base/shared_static_flagpole_base.iff")
--***********... |
--[[
LuCI - Lua Configuration Interface
Copyright 2015 Promwad.com
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 fs = require "nixio... |
hs.hotkey.bind(hyper, 'k', 'Window ← 1/2', function()
local win = hs.window.focusedWindow();
if not win then return end
win:moveToUnit(hs.layout.left50)
end)
hs.hotkey.bind(hyper, ";", 'Window → Screen', function()
local win = hs.window.focusedWindow();
if not win then return end
win:moveToScreen(win:scree... |
--[=[
@Author: Gavin "Mullets" Rosenthal
@Desc: An Interface library with various functionality for Gui and Inputs
]=]
--[=[
[DOCUMENTATION]:
.IsComputer()
.IsMobile()
.IsConsole()
.IsKeyboard()
.IsMouse()
.IsTouch()
.IsGamepad()
.IsVR()
.Replicate()
.AssignSize()
.RichText()
.Keybind(name)
:Disconnect(... |
local ffi = require("ffi");
require("peetles.w32")
ffi.cdef[[
typedef struct {
HANDLE Handle;
} FsHandle;
]]
local FsHandle = ffi.typeof("FsHandle");
local FsHandle_mt = {
__gc = function(self)
if self:isValid() then
Handle_ffi.CloseHandle(self.Handle);
end
end,
__index = {
isValid = function(self)
... |
util.AddNetworkString("ToggleMessage");
registered_teams = {};
hook.Add("PlayerCanHearPlayersVoice", "CanSameTeamHearEachOther", function(plyOne, plyTwo)
for k,v in pairs(registered_teams) do
if (v[plyOne:Team()] && v[plyTwo:Team()] && plyOne:GetNWInt("GroupChatActivated", 0) == 1 && plyTwo:GetNWInt("GroupChatActi... |
--[[**********************************
*
* Multi Theft Auto - Admin Panel
*
* admin_messagebox.lua
*
* Original File by lil_Toady
*
**************************************]]
MB_WARNING = 1
MB_ERROR = 2
MB_QUESTION = 3
MB_INFO = 4
function messageBox(player, message, icon)
triggerClientEvent(client, E... |
return function()
local BaseTile = script.Parent
local Tile = BaseTile.Parent
local App = Tile.Parent
local UIBlox = App.Parent
local Packages = UIBlox.Parent
local Roact = require(Packages.Roact)
local mockStyleComponent = require(UIBlox.Utility.mockStyleComponent)
local TileSelectionOverlay = require(script.... |
local name, SPELLDB = ...
SPELLDB.DEATHKNIGHT = {}
SPELLDB.DEATHKNIGHT.BLOOD = {}
SPELLDB.DEATHKNIGHT.FROST = {}
SPELLDB.DEATHKNIGHT.UNHOLY = {}
SPELLDB.DEATHKNIGHT.BLOOD.spells = {
208683,
48707 --[[Anti-Magic Shell--]],
221562 --[[Asphyxiate--]],
50842 --[[Blood Boil--]],
111673 --[[Contro... |
--
-- wireshark adhead 插件使用方法
-- MAC 平台下:
--
-- 将该文件复制到/Applications/Wireshark.app/Contents/Resources/share/wireshark 目录下
-- 修改/Applications/Wireshark.app/Contents/Resources/share/wireshark/init.lua 在最后添加
-- dofile("wireshark_adhead.lua")
-- 重新启动即可
--
-- 需要注意端口号,默认是10061, 如果不是请再该文件最后修改
--
--
do
--[[
创建一个新的... |
-- Copyright 2021 - Deviap (deviap.com)
-- Author(s): Sanjay-B(Sanjay)
-- Icon Button Example
local button = require("devgit:source/libraries/UI/components/primaryButton.lua")
return function(parent)
-- Text is not declared & therefore, the button instance dynamically changes to an icon button.
local _button = butt... |
vim.notify('Hello')
|
-- Get prediction coordinates
predDim = {nParts,2}
criterion = nn.ParallelCriterion()
for i = 1,opt.nStack do criterion:add(nn.MSECriterion()) end
-- Code to generate training samples from raw images.
function generateSample(set, idx)
local pts = annot[set]['part'][idx]
local c = annot[set]['center'][idx]
... |
#!/usr/bin/env tarantool
local tap = require('tap')
local buffer = require('buffer')
local msgpackffi = require('msgpackffi')
local digest = require('digest')
local key_def_lib = require('key_def')
local merger = require('merger')
local fiber = require('fiber')
local utf8 = require('utf8')
local ffi = require('ffi')
l... |
------------------------------------------------------------
-- OptionFrame.lua
--
-- Abin
-- 2010-9-28
------------------------------------------------------------
local L = WHISPERPOP_LOCALE
BINDING_HEADER_WHISPERPOP_TITLE = L["title"]
BINDING_NAME_WHISPERPOP_TOGGLE = L["toggle frame"]
-- Option frame
... |
local TemplateString = require 'apicast.template_string'
local ngx_variable = require 'apicast.policy.ngx_variable'
local LinkedList = require('apicast.linked_list')
describe('template string', function()
before_each(function()
-- Stub the available context to avoid depending on ngx.var.*
stub(ngx_variable, ... |
--[[
/////// //////////////////
/////// 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
/////// /////////////////
]]
--
-- Created by IntelliJ IDEA.
-- User: Noneatme
-- Date: 27.1... |
--[[----------------------------------------------------------------------------
Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found... |
local ls = require "lovesnow"
local clusterd
local cluster = {}
function cluster.call(node, address, ...)
-- ls.pack(...) will free by cluster.core.packrequest
return ls.call(clusterd, "lua", "req", node, address, ls.pack(...))
end
function cluster.send(node, address, ...)
-- push is the same with req, but no res... |
-- Turn on the Contiguous option
app.preferences.tool(app.activeTool).contiguous = true
-- Switch the Contiguous option:
--
-- app.command.ContiguousFill()
--
-- or:
--
-- app.preferences.tool(app.activeTool).contiguous =
-- not app.preferences.tool(app.activeTool).contiguous
|
local plugin_name = 'linux.cpu'
local every = 60
-- read line from /proc/stat
local function read_cpu_values(str)
-- https://www.kernel.org/doc/Documentation/filesystems/proc.txt
local fields = { "user", "nice", "system", "idle", "iowait", "irq", "softirq", "steal", "guest", "guest_nice" }
local row, ... |
system.print("Thank you for trying it out. Made by _Dri0m.")
system.print("https://github.com/Dri0m/dual-universe-stuff") |
do
-- Returns true if is not empty
local function has_usage_data(dict)
if (dict.usage == nil or dict.usage == '') then
return false
end
return true
end
-- Get commands for that plugin
local function plugin_help(name)
local plugin = plugins[name]
if not plugin then return nil end
local text = ""
if ... |
local roadtest =
{
Properties =
{
Rate = 1.0,
Player = { default = EntityId() },
MaxDistance = 1.0
}
}
function roadtest:OnActivate()
self.spline = SplineComponentRequestBus.Event.GetSpline(self.entityId)
self.splineRenderSegments = RoadRequestBus.Event.GetNumSegments(self... |
--A lot of Thanks to iUltimateLP and his mod SimpleTeleporters for inspiration and for the use of His Code and graphics
data:extend({
{
type = "technology",
name = "PersonalTeleportation",
icon = "__PersonalTeleporter__/graphics/technology_icon.png",
icon_size = 128,
effects =
{
{... |
---@class tf.TFInput
--- Represents a specific input of an operation.
local M = class('tf.TFInput')
local lib = require('tf.c._c_api')
function M:ctor(hdl)
self.handle = hdl or ffi.new('TF_Input[1]')
end
function M:oper(value)
if value then
self.handle[0].oper = handle(value)
else
if ffi.i... |
-- Copyright 2022 SmartThings
--
-- 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 ... |
TriggerServerEvent("dp:CheckVersion")
rightPosition = {x = 1450, y = 100}
leftPosition = {x = 0, y = 100}
menuPosition = {x = 0, y = 200}
if Config.MenuPosition then
if Config.MenuPosition == "left" then
menuPosition = leftPosition
elseif Config.MenuPosition == "right" then
menuPosition = rightPosition
... |
local box = require("/dynamic/helpers/boxes/box_template.lua")
local floating_message = require("/dynamic/helpers/floating_message.lua")
local player_helpers = require("/dynamic/helpers/player_helpers.lua")
local shield_box = {}
function shield_box.new(x, y, resurrection_weapon_config)
local b = box.new(x, y, {"/dy... |
local WTS = {}
function WTS.unpack (input)
assert (type (input) == 'string')
local output = {}
for index, text in input:gmatch ('STRING (%d+).-(%b{})') do
text = text:gsub ('\r\n', '\n')
text = text:gsub ('^{[^\n]-\n', '')
text = text:gsub ('\n[^\n]-}$', '')
output [tonumber (index)] = text
end
return ... |
--[[
-- 自动维护引用计数的资源封装, 通过gc自动触发引用计数修改
local asset = unity.asset("Assets/Art/Experimental/Cube.prefab")
print(game.frameCount)
asset:load(function (obj)
print(obj, game.frameCount)
end)
game:startCoroutine(function ()
coroutine.yield(nil)
print(game.frameCount)
asset = nil
while true do
un... |
local super = Class("TabbedPane", Panel, function()
static.WRAP_TAB_LAYOUT = 0
static.SCROLL_TAB_LAYOUT = 1
static.uiClassID = "TabbedPaneUI"
static.Page = Class("TabbedPane.Page", LuaObject)
static.Button = Class("TabbedPane.Button", Button)
end).getSuperclass()
function TabbedPane:init(tabPlacement, tabLay... |
return (function(self)
return unpack(u(self).animations)
end)(...)
|
g.user_emmet_install_global = 0
g.user_emmet_mode = 'a' -- enable all function in all mode.
|
-- Ensure packer is installed
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
end
return require('pack... |
s = {"interesting", "chicken", "pepper", "pork", "spag_os", "epic", "liver",}
h = {6, 7, 8, 9, 7, 20, 1}
e = {}
d = {"Interesting", "Chicken", "Pepper", "Pork", "Spaghezti O", "EPIC", "Nasty Liver"}
for i = 1, 7 do
e["soupsplus:soup_"..s[i]] = h[i]
minetest.register_craftitem("soupsplus:soup_"..s[i], {
descript... |
require("rrpg.lua");
require("vhd.lua");
require("utils.lua");
require("locale.lua");
require("internet.lua");
local config = ndb.load("config.xml");
local function isNewVersion(installed, downloaded)
local installedVersion = {};
local installedIndex = 0;
for i in string.gmatch(installed, "[^%.]+") do
... |
#!/usr/local/bin/lua -i
--almost fulfills 5.5
--technically does 2*n multiplications
function polynomialEval(x, poly)
local value = poly[0] or 0
local currentEXP = 1
for exponent, coeficent in ipairs(poly) do
currentEXP = currentEXP * x
value = value + (coeficent * currentEXP)
end
return value
end
f... |
local awful = require('awful')
require('awful.autofocus')
local beautiful = require('beautiful')
local hotkeys_popup = require('awful.hotkeys_popup').widget
local modkey = require('configuration.keys.mod').modKey
local altkey = require('configuration.keys.mod').altKey
local apps = require('configuration.apps')
-- Key ... |
package.path = package.path..";../src/?.lua";
local ljdrm = require('ljdrm');
local res, err = ljdrm.drmOpenDevice(0,0);
print("RESULT: ", res, err) |
-----------------------------------------
-- ID: 5602
-- Item: dish_of_hydra_kofte
-- Food Effect: 180Min, All Races
-----------------------------------------
-- Strength 7
-- Intelligence -3
-- Attack % 20
-- Attack Cap 150
-- Defense % 25
-- Defense Cap 70
-- Ranged ATT % 20
-- Ranged ATT Cap 150
-- Poison Resist 5
-... |
local cqs = require"cqueues"
local logger = require"lacord.util.logger"
local traceback = debug.traceback
local xpcall = xpcall
local _ENV = {}
--- make wrapped coroutines report errors via a debug traceback
local old_wrap do
old_wrap = cqs.interpose('wrap', function(self, ...)
return old_wrap(s... |
local example_list = {}
table.insert(example_list, {'graphical_main','Pajarito main.lua'})
table.insert(example_list, {'elemental','Elemental'})
table.insert(example_list, {'elemental_walls','Basic Walls'})
table.insert(example_list, {'weights','Using Weights'})
table.insert(example_list, {'path_in_range','Path In... |
object_mobile_incubator_mutation_comm_01 = object_mobile_shared_incubator_mutation_comm_01:new {
}
ObjectTemplates:addTemplate(object_mobile_incubator_mutation_comm_01, "object/mobile/incubator_mutation_comm_01.iff")
|
require "LuaScripts/Utilities/Network"
local testScene
local camera
local cameraNode
local yaw = 0
local pitch = 0
local drawDebug = 0
function Start()
if not engine:IsHeadless() then
InitConsole()
InitUI()
else
OpenConsoleWindow()
end
ParseNetworkArguments()
InitScene()... |
object_tangible_component_reverse_engineering_power_bit_1 = object_tangible_component_reverse_engineering_shared_power_bit_1:new {
}
ObjectTemplates:addTemplate(object_tangible_component_reverse_engineering_power_bit_1, "object/tangible/component/reverse_engineering/power_bit_1.iff")
|
DefineClass.Diner = {
__parents = { "ElectricityConsumer", "ServiceWorkplace" },
}
DefineClass.Grocery = {
__parents = { "ServiceWorkplace"},
} |
--------------------------------------------------------------------------------
--table扩展
--------------------------------------------------------------------------------
--列举出对象的所有方法
function table.funcs(self, all)
local list = {}
for k, v in pairs(self) do
if type(v) == "function" then
list[k] = v
end
end... |
-----------------------------------
-- Area: Bhaflau Thickets
-- NPC: ??? (Spawn Lividroot Amooshah(ZNM T2))
-- !pos 334 -10 184 52
-----------------------------------
local ID = require("scripts/zones/Bhaflau_Thickets/IDs")
require("scripts/globals/npc_util")
-----------------------------------
function onTrade(play... |
#!/usr/bin/env tarantool
package.path = package.path .. ";../?.lua"
-- Create a Metrics Client
local metrics = require('metrics')
metrics.connect()
-------------------------- Create Collectors ---------------------------
-- Create Counter "total_http_requests"
local total_http_requests = metrics.counter('total_http... |
local Str = {}
local Maths = require("Maths")
-- String Processing
---------------------
function Str.namespace_prefix(name, command_group)
if not name then
return nil
end
if not string.find(name, "%.") then
return command_group .. "." .. name
else
return name
end
end
function Str.escape_lua_pattern(x)
... |
function DepositReagentBank()
print("DepositReagentBank")
end
|
AddCSLuaFile()
local DbgPrint = GetLogging("MapScript")
local MAPSCRIPT = {}
MAPSCRIPT.PlayersLocked = false
MAPSCRIPT.DefaultLoadout =
{
Weapons =
{
"weapon_lambda_medkit",
"weapon_crowbar",
"weapon_pistol",
"weapon_smg1",
"weapon_357",
"weapon_physcannon",
... |
Objects = {
createObject (2501,3696.2002,-1056.7002,34.5,0,0,0),
createObject (2501,3811,-1061.2,34.5,0,0,180),
createObject (10828,3536,-1160.7,53.8,0,0,0),
createObject (10828,3536,-1160.7,68.3,0,0,0),
createObject (10828,3536,-1160.7,82.9,0,0,0),
createObject (10828,3536,-1160.7,97.2,0,0,0),
createObject (10828,3536... |
---@meta
--=== tls ===
---@class tls
tls = {}
---@class tls.cert
tls.cert = {}
---@class TLS
local TLS = {}
---Creates TLS connection.
---@return TLS tls.socket @sub module
function tls.createConnection() end
---Closes socket.
---@return nil
function TLS:close() end
---Connect to a remote server.
---@param port ... |
--
-- Default mod
-- By Kaadmy, for Pixture
--
default = {}
default.WATER_ALPHA = 200
default.WATER_VISC = 1
default.LIGHT_MAX = 14
function default.log(text, type)
minetest.log("Pixture ["..type.."] "..text)
end
function default.dumpvec(v)
return v.x..":"..v.y..":"..v.z
end
minetest.nodedef_default.stack_ma... |
--[[
███╗ ██╗██╗ ██╗██╗███╗ ███╗
████╗ ██║██║ ██║██║████╗ ████║
██╔██╗ ██║██║ ██║██║██╔████╔██║
██║╚██╗██║╚██╗ ██╔╝██║██║╚██╔╝██║
██║ ╚████║ ╚████╔╝ ██║██║ ╚═╝ ██║
╚═╝ ╚═══╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
* https://github.com/theniceboy/nvim
* https://github.com/siduck76/NvChad
--]]
-- Loading basic configurat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.