content stringlengths 5 1.05M |
|---|
return class("ShinanoPtPage", import(".TemplatePage.PtTemplatePage"))
|
function dec2any(...)
local arg={...}
local argnum=select('#',...)
local k
local len
local a
local v
if(argnum==1)
then
k=2
len=0
a=arg[1]
elseif(argnum==2)
then
len=0
a=arg[1]
k=arg[2]
elseif(argnum==3)
then
a=arg[1]
k=arg[2]
len=arg[3]
else
print("Incorrect number of input parameters")
return nil
end
if (... |
local from_expr = require('related_files').pargen_from_expression
return {
pargens = {
-- When using a {namespace} the pargen_from_expression() function
-- expects some part between {parent} and {namespace} in order to know
-- when the namespace begins.
-- If this doesn't work for yo... |
--[[lit-meta
name = "creationix/sha1"
version = "1.0.3"
homepage = "https://github.com/luvit/lit/blob/master/deps/sha1.lua"
description = "Pure Lua implementation of SHA1 using bitop"
authors = {
"Tim Caswell"
}
]]
-- http://csrc.nist.gov/groups/ST/toolkit/documents/Examples/SHA_All.pdf
local bit = re... |
local ffi = require 'ffi'
local cdef = [[
typedef ${PixelType} PixelType;
typedef struct itkImage${Suffix} ImageType${Suffix};
ImageType${Suffix}* ${Suffix}();
void DeleteImage${Suffix}(ImageType${Suffix}* image);
unsigned int GetImageDimension${Suffix}(ImageType${Suffix}* image);
void GetSpacing${Suffix}... |
package.path = "../../depends/proto4z/?.lua;" .. package.path
--require
require("proto4z")
require("TestProto")
print=summer.logd
local lastTime = os.time()
local echoCount = 0
-- 收到消息
local function whenWebMessage(sID, cmd, head, body)
Proto4z.dump(cmd)
Proto4z.dump(head)
Proto4z.dump(bod... |
--
-- Fiio X1
--
FIIOX1 = {}
-- 0 is PF3, 1 is PE1
function FIIOX1.get_backlight_type()
return FIIOX1.bl_type
end
-- 0 is V2, 1 is V1
function FIIOX1.get_hw_type()
return FIIOX1.hw_type
end
function FIIOX1.hw_detect()
-- PA12 is used to detect hardware version
JZ.gpio.pin(0, 12).std_gpio_out(1)
F... |
--[[--------------------------------------------------------------------------
luavenster - object oriented GUI on winapi for Lua
Copyright (C) 2011 Klaus Oberhofer. See copyright notice in
LICENSE file
demonstrates tree view control
--]]-----------------------------------------------------------------------... |
local sBannerPath = THEME:GetPathG("Common", "fallback jacket");
local sJacketPath = THEME:GetPathG("Common", "fallback jacket");
local bAllowJackets = true
local song;
local group;
local getOn = 0;
local getOff = 0;
centerObjectProxy = nil;
--main backing
local t = Def.ActorFrame {
--[[SetCommand=functi... |
local bankrupt_pin_map = require("qnFiles/qnPlist/hall/bankrupt_pin");
local brokeAllowanceComponent=
{
name="brokeAllowanceComponent",type=0,typeName="View",time=0,x=0,y=0,width=438,height=450,visible=1,nodeAlign=kAlignTopLeft,fillParentWidth=0,fillParentHeight=0,
{
name="Image_frame",type=0,typeName="Image",time=... |
local events_table = require("gui/events_table")
local time_filter = require("scripts/filter-time")
local rocket_log = require("scripts/rocket_log")
-- Navigate recursively to find the star system this zone is in
--local get_star_name(zone)
-- local star_name = nil
-- for i=1,8 do
-- if not zone then
-- brea... |
local _, ns = ...
local default = {
ADDON_NAME = "HandyNotes - Timeless Treasures",
NAME = "Timeless Treasures",
-- chests
["Moss-Covered Chest"] = "Moss-Covered Chest",
["Sturdy Chest"] = "Sturdy Chest",
["Smoldering Chest"] = "Smoldering Chest",
["Skull-Covered Chest"] = "Skull-Covered Chest",
["Blazing Ches... |
local prometheus = require "kong.plugins.prometheus.exporter"
local basic_serializer = require "kong.plugins.log-serializers.basic"
prometheus.init()
local PrometheusHandler = {
PRIORITY = 13,
VERSION = "0.9.0",
}
function PrometheusHandler.init_worker()
prometheus.init_worker()
end
function PrometheusHan... |
push = require 'push'
Class = require 'class'
require 'Bird'
require 'Pipe'
require 'PipePair'
require 'Badge'
require 'StateMachine'
require 'states/BaseState'
require 'states/PlayState'
require 'states/ScoreState'
require 'states/CountdownState'
require 'states/PauseState'
require 'states/TitleScreenState'
WWIDTH ... |
-------------------------------------------------------------------------------
-- Module Declaration
--
local mod, CL = BigWigs:NewBoss("Novos the Summoner", 600, 589)
if not mod then return end
mod:RegisterEnableMob(26631)
mod.engageId = 1976
mod.respawnTime = 30
---------------------------------------------------... |
CSEnemyDie = { mName = "cs_die" }
CSEnemyDie.__index = CSEnemyDie
function CSEnemyDie:Create(character, context)
local this =
{
mCharacter = character,
mCombatScene = context,
mSprite = character.mEntity.mSprite,
mTween = nil,
mFadeColour = Vector.Create(1,1,1,1)
}
... |
--[[checkboxData = {
type = "checkbox",
name = "My Checkbox",
tooltip = "Checkbox's tooltip text.",
getFunc = function() return db.var end,
setFunc = function(value) db.var = value doStuff() end,
width = "full", --or "half" (optional)
disabled = function() return db.someBooleanSetting end, --or boolean (optional... |
local ZeroGrad, parent = torch.class("nn.ZeroGrad", "nn.Module")
local function recursiveZero(t1,t2)
if torch.type(t2) == 'table' then
t1 = (torch.type(t1) == 'table') and t1 or {t1}
for key,_ in pairs(t2) do
t1[key], t2[key] = recursiveZero(t1[key], t2[key])
end
elseif torch.isTensor(... |
PLUGIN.name = "인식 (Recognition)"
PLUGIN.author = "Chessnut / 번역자 : Tensa"
PLUGIN.desc = "인식 시스템을 추가합니다."
PLUGIN.base = true;
PLUGIN:IncludeDir("language");
function PLUGIN:SetRecognized(client, other)
local id = client.character:GetVar("id");
local recognized = other.character:GetData("recog", {});
recognized[id] ... |
local libertineproperty = function(x)
local property = x:gsub("I","italic")
property = property:gsub("B", "bold")
return string.lower(property)
end
local fontfixes = {
["Lin Libertine"] = function(x)
return "Linux Libertine O", libertineproperty(x)
end,
["Lin Biolinum"] = function(x)
return "Linux Biolinum ... |
EditorPrePlanning = EditorPrePlanning or class(MissionScriptEditor)
function EditorPrePlanning:create_element()
self.super.create_element(self)
self._element.class = "ElementPrePlanning"
self._element.values.allowed_types = {}
self._element.values.disables_types = {}
self._element.values.location_group = tweak_dat... |
--luacheck: no global
--luacheck: no unused args
require "miniz"
package.loaded["larpr"] = nil
local info = require("path.info")
if info.platform == "windows" then package.cpath = package.cpath .. ";./builds/?.dll" end
if info.platform == "linux" then package.cpath = package.cpath .. ";./builds/?.so" end
local M = req... |
local HC = dtrequire("lib.HC")
local lume = dtrequire("lib.lume")
local Agent, _ = dtrequire("agent").common()
local ecs = dtrequire("ecs")
local prototype = dtrequire("prototype")
if not _keikaku_interactable_G then
local globals = {}
globals.Properties = prototype.newInterface({
updateProperties = ... |
-- ================================================================================ --
-- EMA - ( Ebony's MultiBoxing Assistant ) --
-- Current Author: Jennifer Cally (Ebony) --
-- --
-- License: All Rights Reserved 2018-2020 Jennifer Cally --
-- --
... |
object_tangible_loot_npc_loot_spice_kliknik_boost_generic = object_tangible_loot_npc_loot_shared_spice_kliknik_boost_generic:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_npc_loot_spice_kliknik_boost_generic, "object/tangible/loot/npc/loot/spice_kliknik_boost_generic.iff")
|
-- Class of first and third wave of npcs
require 'game.objects.dynamic_entity'
local anim8 = require 'lib.anim8'
NPC = DynamicEntity:extend()
function NPC:new(x, y, width, height, image, world, maxVelX, maxVelY, speed)
NPC.super.new(self, x, y, width, height, image, world, maxVelX, maxVelY, "ent_npc")
self.o... |
--
function settlements.convert_mts_to_lua()
local building = schem_path.."townhall.mts"
local str = minetest.serialize_schematic(building, "lua", {lua_use_comments = true, lua_num_indent_spaces = 0}).." return(schematic)"
local schematic = loadstring(str)()
local file = io.open(schem_path.."church"..".lua", "w... |
local M = {}
local sym_item = {
line = 0,
col = 0,
text = "",
kind = "",
}
function sym_item:tips()
return string.format("%-4d %-12s", self.line, self.kind)
end
function sym_item:searched_str()
return self.text
end
function sym_item:do_item()
return true, function()
vim.api.nvim_win_set_cursor(0, {self.lin... |
--[================================[
@Language.ko-KR
@Summary
[Index]의 [DatType]의 값을 [Value]로 [Modifier]합니다.
@Group
DatFile
@param.DatType.UnitsDat
@param.Index.TrgUnit
@param.Value.Number
@param.Modifier.TrgModifier
@Language.en-US
@Summary
[Index]의 [DatType]의 값을 [Value]로 [Modifier]합니다.
@Group
DatFile
@param.DatType... |
DefaultUnit = {}
DefaultUnit.name = nil
DefaultUnit.path = nil
DefaultUnit.targetname = nil
DefaultUnit.settings = {}
function NewUnit(name, path)
local unit = TableDeepCopy(DefaultUnit)
unit.name = name
unit.path = path
unit.targetname = PathBa... |
return { repos = {} }
|
----------------------------------------------------------------------------------------
-- Learns a network using a single set of parameters. Typically this run against the
-- full set of training data after reasonable parameters have been found using the
-- grid search.
--
-- Authors:
-- Peter Abeles
--
----------... |
--====================================================================--
-- dmc_widget/widget_theme_mix.lua
--
-- Documentation: http://docs.davidmccuskey.com/
--====================================================================--
--[[
The MIT License (MIT)
Copyright (C) 2015 David McCuskey. All Rights Reserved.
... |
P = function(v)
print(vim.inspect(v))
return v
end
-- Reload nvim
function _G.ReloadConfig()
for name, _ in pairs(package.loaded) do
if name:match("^foshizzle") then
package.loaded[name] = nil
end
end
dofile(vim.env.MYVIMRC)
end
vim.cmd("command! ReloadConfig lua ReloadConfig()")
require("foshizzle.pack... |
return {
{
Index= 9,
PointerLocation= 161407,
OldPointer= 448726,
Label= "L1571"
},
{
Index= 10,
PointerLocation= 161485,
OldPointer= 448580,
Label= "L1572"
},
{
Index= 14,
PointerLocation= 162530,
OldPointer= 245304,
Label= "L1573"
},
{
Index= 21,
P... |
local function foo(ls)
local sum = 0
for i, v in ipairs(ls) do
sum = sum + v*v
end
return sum
end
print(foo {1, 3, 7, 12})
|
return {
id = "shaggy",
name = "Shaggy",
description = "Like, Zoinks! We're in the wrong franchise!",
type = "hat",
rarity = 1,
hidden = false,
}
|
-- Swap compact passenger module with fuel compression
function OnMsg.ClassesPostprocess()
local engineering = Presets.TechPreset.Engineering
engineering.CompactPassengerModule.position = range(1, 5)
engineering.FuelCompression.position = range(6, 12)
end |
CMD.name = 'SetGroup'
CMD.description = 'command.setgroup.description'
CMD.syntax = 'command.setgroup.syntax'
CMD.permission = 'administrator'
CMD.category = 'permission.categories.player_management'
CMD.arguments = 2
CMD.immunity = true
CMD.aliases = { 'plysetgroup', 'setusergroup', 'plysetusergroup' }
function CMD:g... |
--[[
Command: wget https://raw.githubusercontent.com/ZiBuDo/minecraft_turtle/main/startup.lua startup
startup
Installer <call this startup>
On boot
1) Self Update
- Install Utils
- Update directive
2) Run Home
3) Resume
Install things based on config file "<fi... |
data:extend({
{
type = "string-setting",
name = "storage-tank-sizes",
setting_type = "startup",
order = "A",
default_value = "2;4;6",
},
}) |
-- Solution configuration file.
workspace "Workspace"
system "Windows"
architecture "x86_64"
flags {
"MultiProcessorCompile"
}
configurations {
"Debug",
"Release"
}
-- Set the startup project.
startproject "Game"
targetname "Homehearth"
outputdir = "%{cfg... |
object_tangible_quest_corellia_corellia_droid_factory_terminal_3 = object_tangible_quest_corellia_shared_corellia_droid_factory_terminal_3:new {
}
ObjectTemplates:addTemplate(object_tangible_quest_corellia_corellia_droid_factory_terminal_3, "object/tangible/quest/corellia/corellia_droid_factory_terminal_3.iff")
|
local K, C, L = unpack(select(2, ...))
-- Wow API
local hooksecurefunc = hooksecurefunc
-- Global variables that we don't cache, list them here for mikk's FindGlobals script
-- GLOBALS: LossOfControlFrame
local LossControl = CreateFrame("Frame", nil, UIParent)
function LossControl:Update()
self.Icon:ClearAllPoints... |
function make_placeholder_doc(meta, reference)
local tmpmeta = {
['references'] = {reference},
['nocite'] = {pandoc.Cite({}, {pandoc.Citation('*', "NormalCitation")})},
['csl'] = meta.csl,
['citation-abbreviations'] = meta['citation-abbreviations'],
['lang'] = meta['lang'],
['notes-after-punct... |
object_building_poi_blank_larger_area = object_building_poi_shared_blank_larger_area:new {
}
ObjectTemplates:addTemplate(object_building_poi_blank_larger_area, "object/building/poi/blank_larger_area.iff")
|
module 'mock'
local min, max = math.min, math.max
function alignEntitiesLeft( entities )
local bx0 = false
for i, entity in ipairs( entities ) do
local x0, y0, z0, x1, y1, z1 = entity:getWorldBounds()
bx0 = bx0 and min( bx0, x0 ) or x0
end
for i, entity in ipairs( entities ) do
local x0, y0, z0, x1, y1, z1 =... |
-- *******************************************************************
xCircle = Core.class(Sprite)
function xCircle:init(radius, steps, color)
color = color or 0xff0000
local sin, cos, d2r = math.sin, math.cos, math.pi / 180
local c = Shape.new()
c:setFillStyle(Shape.SOLID, color)
c:setLineStyle(0)
... |
-- This file is automatically generated by make-normalization-table.php
local normal = {
-- Characters that might change depending on the following combiner
-- (minus any that are themselves combiners, those are added later)
check = {
[0x000374] = 1,
[0x00037e] = 1,
[0x000387] = 1,
[0x000958] = 1,
[0x00095... |
-- manga.lua
-- ユーザーの設定を読み込む
require "settingloader"
-- "プロジェクトは開始できません: 理由: setting.lua がありません"
setting = loadSetting("setting.lua")
local function getext(setting)
for k, v in pairs(setting) do
if k:match("_template$") then
local ext = setting[k]:match("%.([%a%d]+)$")
if ext then ... |
--[[Author: Pizzalol
Date: 14.04.2015.
Applies a slow on the caster depending on the Wex level]]
function GhostWalkSelfSlow( keys )
local caster = keys.caster
local ability = keys.ability
local wex_level = caster:FindAbilityByName("invoker_wex_datadriven"):GetLevel() - 1 -- Self slow depends on wex level
-- Abil... |
function update_ewfighter(CustomGroup, playerID, shipID)
for i=0,Universe_PlayerCount()-1 do
if (Player_IsAlive(i)==1)and(playerID~=i) then
if (AreAllied(playerID, i)==0) then
SobGroup_Clear("UnitCharacteristicTempGroup")
if Player_FillProximitySobGroup("UnitCharacteristicTempGroup", i, CustomGroup, ... |
local mal = require "libmal"
local Actor, Message, Handler, Service, class = mal.Actor, mal.Message, mal.Handler, mal.Service, mal.class
local ProviderPubsubHandler, ConsumerPubsubHandler = mal.ProviderPubsubHandler, mal.ConsumerPubsubHandler
local MAL_IP_TYPES, MAL_IP_STAGES = mal.MAL_IP_TYPES, mal.MAL_IP_STAGES
loca... |
--[[
TheNexusAvenger
Performs a local pull from the file system.
--]]
local NexusGit = require(script.Parent.Parent.Parent):GetContext(script)
local InstanceSerializier = NexusGit:GetResource("Serialization.InstanceSerializier")
local MultiHttpRequest = NexusGit:GetResource("SplitHttp.MultiHttpRequest")
local Parti... |
--https://github.com/Mokiros/roblox-FE-compatibility
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
local Player,game,owner = owner,game
local RealPlayer = Player
do
print("FE Compatibility code V2 by Mokiros")
local RealPlayer = RealPlaye... |
WoolamanderTempleScreenPlay = ScreenPlay:new {
numberOfActs = 1,
screenplayName = "WoolamanderTempleScreenPlay",
lootContainers = {
568340,
468343,
468334,
468338
},
lootLevel = 26,
lootGroups = {
{
groups = {
{group = "color_crystals", chance = 100000},
{group = "junk", chance = 8600... |
object_tangible_tcg_series3_house_sign_tcg_s01 = object_tangible_tcg_series3_shared_house_sign_tcg_s01:new {
}
ObjectTemplates:addTemplate(object_tangible_tcg_series3_house_sign_tcg_s01, "object/tangible/tcg/series3/house_sign_tcg_s01.iff") |
slot2 = "FishingJoyMovePoint"
FishingJoyMovePoint = class(slot1)
slot0 = math.min
slot1 = math.abs
FishingJoyMovePoint.ctor = function (slot0)
slot3 = slot0
slot6 = "component.transform.FishingJoyMoveBase"
ClassUtil.extends(slot2, FishingJoyRequireLua(slot5))
slot0.moveFinish = false
slot0.goneLen = 0
slot0.la... |
-----------------------------------
-- Area: Qufim Island (126)
-- NPC: Undulating Confluence
-- !pos -204.531 -20.027 75.318 126
-----------------------------------
local ID = require("scripts/zones/Qufim_Island/IDs")
require("scripts/globals/missions")
require("scripts/globals/npc_util")
----------------------------... |
------------------------
-- #region もぐらデバッグクラス
------------------------
MogDebug = {}
------------------------
-- #region コンストラクタ
-- idx :※注意 MogAxesのキー値
------------------------
MogDebug.new = function(idx)
-- メンバ変数
local obj = {}
-- もぐら表示位置クラスのキー値をキー値としてセットする
obj.idx = idx
-- デバッグ用パラメータ保持テーブル
ob... |
--require("compat-5.1")
luanet.load_assembly("System")
WebClient=luanet.import_type("System.Net.WebClient")
StreamReader=luanet.import_type("System.IO.StreamReader")
Math=luanet.import_type("System.Math")
print(Math:Pow(2,3))
myWebClient = WebClient()
myStream = myWebClient:OpenRead(arg[1])
sr = StreamReader(myStre... |
--===================================================================--
-- dmc_touch.lua
--
-- by David McCuskey
-- Documentation: http://docs.davidmccuskey.com/display/docs/dmc_touch.lua
--===================================================================--
--[[
Copyright (C) 2012 David McCuskey. All Rights Reserve... |
local Name2Id= GetFileConfig("server/setting/wakeup_cfg.lua")
return function (Data)
assert(Name2Id[Data],Data.."没有该觉醒模板")
return Data
end |
if not is_mod_active("Krastorio2") then
return function() end -- mod not enabled, do nothing
end
local recipe_infos = {
{
recipe_name = "kr-sentinel",
entity_type = "radar",
subgroup = "space-recycling",
technology_name = "kr-sentinel",
no_percentage_test = function() return false end,
}
}
... |
local thresholds = {}
thresholds.values ={
27, -- temp =
200000, -- pressure =
200, -- altitude =
60, -- humidity =
10000, -- light =
5000, -- red =
5000, -- green =
5000, -- blue =
"Quiet" -- noise =
}
return thresholds
|
-- // Variables
local LibaryManager = { }
LibaryManager.Children = script:GetChildren()
LibaryManager.Libaries0 = { }
LibaryManager.Libaries1 = { }
-- // Methods
function LibaryManager:DeployLibaries()
for _, Value in ipairs(self.Libaries0) do self.Infinity[Value.Name] = Value end
for _, Value in ipairs(self... |
local term = require("term")
local path = require("path")
local invoke = component.invoke
local binPath = _OSENV.config.path
local fs = computer.getBootAddress()
local function split(str)
local parts = {}
for part in str:gmatch("%S+") do
table.insert(parts, part)
end
return parts
end
while t... |
local Array = require("./jspower.lua").Array
-- Notice that indecies in Lua start from 1, not 0.
local a = Array.new({1, 2, 3, 4, 5})
print(a) -- 1,2,3,4,5
print(a:pop()) -- 5
print(a:pop()) -- 4
print(a) -- 1,2,3
print(a:push(666)) -- 4 (new length of the array)
print(a) -- 1,2,3,666
print(a:reverse()) -- 666,3,... |
local mock = require "deftest.mock"
local request_headers = require "aws-sdk.core.request_headers"
local strut = require "aws-sdk.utils.strut"
return function()
local request_signer
local credentials
describe("request_signer", function()
before(function()
request_signer = require "aws-sdk.core.request_... |
return {
summary = 'Convert a vector from world space to local space.',
description = [[
Converts a direction vector from world space to local space.
]],
arguments = {
{
name = 'wx',
type = 'number',
description = 'The x component of the world vector.'
},
{
name = 'wy',
... |
local urlApi = 'https://jira.zaouter.com/rest/api/2/search?jql=project%20=%20income%20AND%20assignee%20=%20minchao%20AND%20status%20in%20(OPEN,OPENED,ASSIGNED,SUBMITTED,POSTPONED)%20ORDER%20BY%20%22Start%20date%20(WBSGantt)%22%20DESC'
local menubar = hs.menubar.new()
local menuData = {}
local emoji = {
Open = '🔛'... |
-- Update Music info using mpd/mpc
-- Depends mpd, mpc
local gears = require('gears')
local awful = require('awful')
local HOME = os.getenv('HOME')
local PATH_TO_ICONS = HOME .. '/.config/awesome/widget/music/icons/'
local prog_bar = require('widget.music.content.progress-bar')
local track_time = require('widget.mus... |
local utest = {}
local function tbl_contains_value(t, val)
for _, v in pairs(t) do
if v == val then
return true
end
end
return false
end
local function tbl_filter(t, callable)
local r = {}
for k, v in pairs(t) do
if callable(k, v) then
table.insert(r, v)
end
end
return r
end
local function test_... |
local utils = require 'utils'
local function solve_part_1(input)
local fuel_usage = {}
for i, x in ipairs(input) do
local sum = 0
for _, y in ipairs(input) do
sum = sum + math.abs(x - y)
end
fuel_usage[i] = sum
end
return fuel_usage
end
local function solve_part_2(input)
local result =... |
--- **AceConsole-3.0** provides registration facilities for slash commands.
-- You can register slash commands to your custom functions and use the `GetArgs` function to parse them
-- to your addons individual needs.
--
-- **AceConsole-3.0** can be embeded into your addon, either explicitly by calling AceConsole:Embed(... |
ITEM.name = "Red Line Recruit Uniform"
ITEM.desc = "A set of clothing that is worn by recruits in the Red Line"
ITEM.price = 100
ITEM.model = "models/devcon/mrp/act/redline_soldier.mdl"
ITEM.width = 2
ITEM.height = 2
ITEM.iconCam = {
pos = Vector(-200, 0.77698647975922, 48.242790222168),
ang = Angle(0, -0, 0... |
module(...,package.seeall)
local ffi = require("ffi")
local C = ffi.C
function can_open(filename, mode)
mode = mode or 'r'
local f = io.open(filename, mode)
if f == nil then return false end
f:close()
return true
end
function can_read(filename)
return can_open(filename, 'r')
end
function ca... |
-- Copyright (c) 2018 Hans-Werner Hilse <hwhilse@gmail.com>
--
-- 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,... |
--!A cross-platform build utility based on Lua
--
-- 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... |
local fs = require 'luarocks.fs'
local stringio = require('pl.stringio')
local stringx = require('pl.stringx')
local List = require('pl.List')
local dkjson = require('dkjson')
local http = require('socket.http')
local ltn12 = require('ltn12')
local function sanitize(str)
return string.sub(str, 2, string.len(str) - ... |
local log = require "nvim-lsp-installer.log"
local platform = require "nvim-lsp-installer.platform"
local Result = require "nvim-lsp-installer.core.result"
local spawn = require "nvim-lsp-installer.core.spawn"
local powershell = require "nvim-lsp-installer.core.managers.powershell"
local USER_AGENT = "nvim-lsp-install... |
local Ffi = require("ffi")
local System = {
systems = {}
}
function System.new(filter)
local mask = 0
local entities = Ffi.new("int[?]", 1000000)
local count = 0
for _, component in ipairs(filter) do
mask = mask + component.mask
end
local system = {
mask = mask,
ent... |
local addon, tbl = ...
tbl.Print = function(id, itemLink, count, source, location, lootDate, class, level)
if class and level then
print(id .. ": " ..
itemLink .. ", " ..
count .. ", " ..
source .. ", " ..
location .. ", " ..
lootDate .. ", [" ..
class .. ", " .. level .. "]"
)
else
pri... |
return {
require "jesse.lsp.languages.java",
require "jesse.lsp.languages.json",
require "jesse.lsp.languages.lua",
require "jesse.lsp.languages.nix",
require "jesse.lsp.languages.php",
require "jesse.lsp.languages.rust",
require "jesse.lsp.languages.tailwind",
require "jesse.lsp.languages.typescript",
... |
--- Tracks a player's character's humanoid
-- @classmod HumanoidTracker
local require = require(script.Parent.loader).load(script)
local Maid = require("Maid")
local Signal = require("Signal")
local ValueObject = require("ValueObject")
local Promise = require("Promise")
local HumanoidTracker = {}
HumanoidTracker.Cla... |
-- Created by LuaView.
-- Copyright (c) 2017, Alibaba Group. All rights reserved.
--
-- This source code is licensed under the MIT.
-- For the full copyright and license information,please view the LICENSE file in the root directory of this source tree.
function createButton(text, x, y, w, h, callback)
local butto... |
local plugin_name = vim.split((...):gsub("%.", "/"), "/", true)[1]
local M = require("vusted.helper")
M.root = M.find_plugin_root(plugin_name)
local prompt_name = "test_prompt"
local prompt = ("[%s]"):format(prompt_name)
vim.o.shell = "bash"
vim.env.PS1 = prompt
function M.before_each()
vim.env.HISTFILE = ""
M.... |
--[[
A library providing advanced queue support and better optimizations for queue-based operations.
]]
_libs = _libs or {}
require('tables')
local table = _libs.tables
local queue = {}
_libs.queues = queue
_raw = _raw or {}
_raw.table = _raw.table or {}
_meta = _meta or {}
_meta.Q = {}
_meta.Q.__index = fun... |
---@class CS.FairyEditor.FlipConst
---@field public NONE string
---@field public HZ string
---@field public VT string
---@field public BOTH string
---@type CS.FairyEditor.FlipConst
CS.FairyEditor.FlipConst = { }
---@return number
---@param str string
function CS.FairyEditor.FlipConst.Parse(str) end
return CS.FairyEdit... |
object_mobile_uller = object_mobile_shared_uller:new {
}
ObjectTemplates:addTemplate(object_mobile_uller, "object/mobile/uller.iff")
|
local skynet = require "skynet"
local logger = require "common.utils.logger"
local sproto_helper = require "sproto_helper"
local config_system = require "config_system"
local config_gate = config_system.gate
local AGENT_MGR = import("lualib/game/agentmgr.lua")
local logind = ...
local gate
local CMD = {}
local SOCKE... |
local class = require 'me.strangepan.libs.util.v1.class'
local story = class.build()
function story:_init(content)
self.content = content
self.current = self.content['Story Page 1']
end
function story:current_text()
return self.current.text
end
function story:current_options()
return self.current.options
en... |
local Debug = require "datanet.debug";
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-- CLASS DECLARATION --------------------------------------------------------
local _S = {};
_S.__index = _S;
--[[ NOTE... |
local module = {}
-- 写入文件
function module.Writefile(path, content, mode)
mode = mode or "w+b"
local file = io.open(path, mode)
if file then
if file:write(content) == nil then return false end
io.close(file)
return true
else
return false
end
end
return modul... |
--------------------------------------------------------------------------------------------------------
--- @class VoxelAsset : Asset
--------------------------------------------------------------------------------------------------------
local VoxelAsset = {}
return VoxelAsset
|
--
-- cast2string.lua
-- Converts C AST to C code string.
--
-- (c) 2008 David Manura. Licensed in the same terms as Lua (MIT license).
-- See included LICENSE file for full licensing details.
local M = {}
local _G = _G
local assert = _G.assert
local ipairs = _G.ipairs
local math = _G.math
local string... |
function Crusaderofold_OnCombat(Unit, Event)
Unit:SendChatMessage(14, 0, "Halt! Who dares tread through the halls of old?")
Unit:RegisterEvent("AvengerShield", 8000, 3)
Unit:RegisterEvent("Cleave", 10000, 0)
Unit:RegisterEvent("ShieldBash", 12000, 0)
end
function AvengerShield(Unit, Event)
Unit:FullCastSpellOnTar... |
--[[
This module implements a class for performing
lattice optimizations based on scaling the atomic
coordinates and the cell-vectors.
--]]
local m = require "math"
local mc = require "flos.middleclass.middleclass"
local num = require "flos.num"
local optim = require "flos.optima.base"
-- Create the LBFGS class (i... |
--
local pairs = pairs
local ipairs = ipairs
--- 返回通过将函数应用于每个元素而生成的元素平均值
function table.average_by(t, fn)
local sum
for _, v in pairs(t) do
if sum then
sum = sum + fn(v)
else
sum = fn(v)
end
end
return sum
end
--- 将给定函数应用于列表的每个元素。
--- 返回由各元素(该函数返回了非nil/f... |
return [[
#Base text for English language
[en]
lang = English #Full language name
AuthorText = Translation Author: Pollitto #Author text
#Workshop errors
Workshop.Title = Content manager
Workshop.FilesMissing = Missing some addon files or addon is corrupted.\n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.