content stringlengths 5 1.05M |
|---|
local stagestats;
local stageindex;
local pss = {
[PLAYER_1] = nil,
[PLAYER_2] = nil,
}
local stats = {
[PLAYER_1] = nil,
[PLAYER_2] = nil,
}
local digits = 0;
local tablestats = {};
local labelstats = {};
local function FetchStatsForPlayer(pn)
local stats;
local curstats;
local dp;
... |
/*
@library : rlib
@docs : https://docs.rlib.io
IF YOU HAVE NOT DIRECTLY RECEIVED THESE FILES FROM THE DEVELOPER, PLEASE CONTACT THE DEVELOPER
LISTED ABOVE.
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE
('CCPL' OR 'LICENSE'). T... |
local path = (...):match('(.-)[^%./]+$')
return {
name = 'Image',
description = 'Drawable image type.',
constructors = {
'newImage',
'newVolumeImage',
'newCubeImage',
'newArrayImage',
},
supertypes = {
'Texture',
'Drawable',
'Object',
},
... |
-- Without Rookgaard
local config = {
[0] = {
--club, coat
items = {{2382, 1}, {2651, 1}},
--container rope, shovel, red apple
container = {{2120, 1}, {2554, 1}, {2674, 1}}
},
[1] = {
--equipment spellbook, wand of vortex, magician's robe, mage hat, studded legs, leather boots, scarf
items = {{2175, 1},... |
module(..., package.seeall)
require 'luasql.mysql'
local Model = require 'bamboo.model'
local Mysql = Model:extend {
__name = 'Mysql';
__fields = {
['host'] = {};
['port'] = {};
['database'] = {};
['user'] = {};
['pa... |
--- table mit allen BlessGategories
BlessCategories = {}
BlessCategories.Canonisation = nil
BlessCategories.Construction = nil
BlessCategories.Financial = nil
BlessCategories.Research = nil
BlessCategories.Weapons = nil
|
ITEM.name = "Cooked Consumable"
ITEM.description = "Consumable that has been cooked."
ITEM.category = "Cooked Meat"
ITEM.model = "models/props/cs_office/Cardboard_box02.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.price = 0
ITEM.weight = 0 --make sure you set this
ITEM.WeightPerThirst = -0.25
ITEM.WeightPerHunger = 0.5
... |
local _, Addon = ...
----------------------------------------
Addon.RaidLib =
----------------------------------------
{
Version = 1,
NumPlayers = 0,
Players = {},
PlayersByName = {},
PlayersByUnitID = {},
PlayerInCombat = false,
PlayerInRaid = false,
}
function Addon.RaidLib:Initialize()
-- L... |
local class = require 'middleclass'
local lume = require 'lume'
-- 頭コンポーネントクラス
local Base = require 'components.Base'
local Head = class('Head', Base)
Head:include(require 'Growth')
-- 初期化
function Head:initialize(t)
-- Component
t.updatable = t.updatable == nil and true or t.updatable
t.drawable = t.dra... |
-- Hero leveling XP
LevelingXP = {
--Level XP Required SP gained Possible Level Possible Ult Level Talent Level Avaiable
{ 1, 0, "yes", 1, 0, 0},
{ 2, 100, "yes", 1, 0, 0},
{ 3, 300, "yes", 2, 0, 0},
{ 4, 600, "yes", 2, 0, 0},
{ 5, 1000, "yes", ... |
local event = require('cmp.utils.event')
local autocmd = require('cmp.utils.autocmd')
local keymap = require('cmp.utils.keymap')
local feedkeys = require('cmp.utils.feedkeys')
local types = require('cmp.types')
local config = require('cmp.config')
local api = require('cmp.utils.api')
---@class cmp.NativeEntriesView
--... |
vim.g.indent_blankline_filetype_exclude = { 'FTerm' , "lspinfo", "packer", "checkhealth", "help", ""}
|
--- A data type embodying a tridiagonalization.
--
-- Permission is hereby granted, free of charge, to any person obtaining
-- a copy of this software and associated documentation files (the
-- "Software"), to deal in the Software without restriction, including
-- without limitation the rights to use, copy, modify, me... |
local example = {}
example.title = "Button"
example.category = "Object Demonstrations"
function example.func(loveframes, centerarea)
local frame = loveframes.create("frame")
frame:setName("Button")
frame:centerWithinArea(unpack(centerarea))
local button = loveframes.create("button", frame)
button:setWidth(200)
... |
local info = {
version = 1.002,
comment = "scintilla lpeg lexer for xml script",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files",
}
local P = lpeg.P
local lexer = require("scite-conte... |
require("colors.onedark")
require("colors.tokyonight")
require("colors.catppuccin")
|
-----------------------------------------------------
--name : lib/devfs/driver.lua
--description: organizes devfs drivers and files
--author : mpmxyz
--github page: https://github.com/mpmxyz/ocprograms
--forum page : none
-----------------------------------------------------
--drivers[device type] -> driver... |
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
require("lualib_bundle");
__TS__SourceMapTraceBack(debug.getinfo(1).short_src, {["5"] = 1,["6"] = 1,["7"] = 1,["8"] = 3,["9"] = 4,["10"] = 3,["11"] = 4,["12"] = 12,["13"] = 13,["14"] = 12,["15"] = 16,["16"] = 17,["17"] = 16,["18"] = 20,["19"] = 2... |
--- Split raid into two sides based on overall damage/healing done.
local A, L = unpack(select(2, ...))
local P = A.sortModes
local M = P:NewModule("split", "AceEvent-3.0")
P.split = M
local format = format
function M:OnEnable()
A.sortModes:Register({
key = "split",
name = L["sorter.mode.split"],
isSpli... |
local drawableNinePatch = require("structs.drawable_nine_patch")
local drawableSprite = require("structs.drawable_sprite")
-- Some of this plugin is copy-pasted from MaxHelpingHand's Flag Switch Gates
-- https://github.com/max4805/MaxHelpingHand/blob/master/Loenn/entities/flagSwitchGate.lua
local touchGateBlock = {}
... |
--[[
Author : foregic
Date : 2021-12-23 20:50:15
LastEditors : foregic
LastEditTime : 2021-12-23 20:50:15
FilePath : /httpserver/include/post.lua
Description :
--]]
function getPostResponse(...)
local a = ""
-- print("getPostResponse")
for i = 1, select("#",...), 2 do
a = (a .. "<li>" .. sel... |
-- 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 in the PATENTS file in the same directory.
local colors_ok, c... |
if SERVER then return end
local convars, convarValues = vrmod.GetConvars()
function VRUtilOpenHeightMenu()
if not g_VR.threePoints or VRUtilIsMenuOpen("heightmenu") then return end
--create mirror
rt_mirror = GetRenderTarget( "rt_vrmod_heightcalmirror", 2048, 2048)
mat_mirror = CreateMaterial("mat_v... |
-- Prosody IM
-- Copyright (C) 2008-2010 Matthew Wild
-- Copyright (C) 2008-2010 Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local setmetatable = setmetatable;
local ipairs = ipairs;
local tostring, type, next = tostring, type, nex... |
local E, L, V, P, G, _ = unpack(select(2, ...)); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB, Localize Underscore
local DT = E:GetModule('DataTexts')
local GREEN_FONT_COLOR = GREEN_FONT_COLOR
local RED_FONT_COLOR = RED_FONT_COLOR
local C_MountJournalGetNumMounts = C_MountJournal.GetNumMounts
local C_Mou... |
-- DiamondMover.lua
-- An example Lua plugin using the cBlockArea object
-- When a player rclks with a diamond in their hand, an area around the clicked block is moved in the direction the player is facing
-- Global variables
MOVER_SIZE_X = 4;
MOVER_SIZE_Y = 4;
MOVER_SIZE_Z = 4;
function Initialize(Plugin)
... |
-- GenericObjects.Lua
-- Generic Object definitions for LoveExtension library
-- Copyright (c) 2011 Robert MacGregor
local GenericObjects = { }
GenericObjects.imageManager = require("scripts/Image.lua")
-- Road for our PAFBLA game
local MainRoad =
{
Animation = { },
}
local RoadAnimation =
{
Speed =... |
print('begin change_other_contract_property_contract script')
local contract1 = import_contract 'change_other_contract_property_contract'
local result1 = contract1:start('world')
print("result1: ", result1)
|
Player=game:GetService("Players").LocalPlayer
Character=Player.Character
PlayerGui=Player.PlayerGui
Backpack=Player.Backpack
Torso=Character.Torso
Head=Character.Head
Humanoid=Character.Humanoid
m=Instance.new('Model',Character)
LeftArm=Character["Left Arm"]
LeftLeg=Character["Left Leg"]
RightArm=Character["Right... |
-- Copyright (c) 2019 Redfern, Trevor <trevorredfern@gmail.com>
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
describe("Component - timer_display", function()
local timer = require "moonpie.utility.timer"
local components = require "moonpie.ui.components"
local te... |
local fio = require('fio')
local server = require('test.luatest_helpers.server')
local t = require('luatest')
local g = t.group()
g.before_all(function()
g.server = server:new{alias = 'dflt'}
g.server:start()
end)
g.after_all(function()
g.server:drop()
end)
local expected_log_entry = 'C> empty or nil `s... |
minetest.register_craft({
output = 'adv_weapons:landmine_placed 3',
recipe = {
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'default:steel_ingot', 'tnt:tnt', 'default:steel_ingot'},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}
}
})
... |
--[[---------------------------------------------------------------------------
-- Copyright (c) 2020 Miku AuahDark
--
-- 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, ... |
artifactreward33 = {
minimumLevel = 0,
maximumLevel = -1,
customObjectName = "Artifact 33",
directObjectTemplate = "object/tangible/collection/col_stage_controller_02.iff",
craftingValues = {
},
customizationStringNames = {},
customizationValues = {}
}
addLootItemTemplate("artifactreward33", artifactreward33)
|
local function scaleDeathBlackScreenBackground(params)
return Hephaistos.MatchAll(params, { Id = ScreenAnchors.DeathBackground, Fraction = 10 })
end
local function scaleBlackScreenBackground(params)
return Hephaistos.MatchAll(params, { Fraction = 10 })
end
local filters = {
RunBiomePresentation = {
-- biome... |
--Copyright (c) 2013, Byrthnoth
--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 t... |
--This sample is a work in progress. The space game example has
--a functioning menu flow that can serve as an example.
------------------------------------------------------------------------------
-- constants
------------------------------------------------------------------------------
SCREEN_WIDTH = 1920
SCREEN_H... |
local PANEL = {}
----render parameters
local percent = 0.3
local percent_inc = 1 - percent
local threshold = 0.3
--accessor funcs
AccessorFunc(PANEL, "TagColor", "TagColor")
surface.CreateFont("WGCBrowserTag", {
font = "Roboto",
size = 14,
weight = 1000
})
--panel functions
function PANEL:Init()
self:SetCont... |
local WebClient = {}
local Device = csharp.checked_import('common.Device')
local WebRequest = csharp.checked_import('WebRequest2_Lua')
local Application = csharp.checked_import('UnityEngine.Application')
local Fed_Lua = csharp.checked_import('Fed_Lua')
local json = require 'json'
WebClient.inited = false
WebClient.lo... |
-----------------------------------
-- Area: North Gustaberg
-- Mob: Gambilox Wanderling
-- Quest NM - "As Thick as Thieves"
-----------------------------------
require("scripts/globals/status")
-----------------------------------
function onMobInitialize(mob)
mob:setMobMod(tpz.mobMod.IDLE_DESPAWN, 300)
end
func... |
local drpath = require("directories")
drpath.addPath("myprograms",
"ZeroBraineProjects",
"CorporateProjects",
-- When not located in general directory search in projects
"ZeroBraineProjects/dvdlualib",
"ZeroBraineProje... |
local api = vim.api
local cmd = vim.cmd -- to execute Vim commands e.g. cmd('pwd')
local fn = vim.fn -- to call Vim functions e.g. fn.bufnr()
local g = vim.g -- a table to access global variables
local opt = vim.opt -- to set options
if vim.fn.has('macunix') == 1 then
vim.o.shell = '/bin/dash'
elseif vim.fn.has('u... |
--[[
===============================================================================
** SceneBattle v1.0 **
By Lysferd (C) 2015
Creates and manages the top level of the battle system.
BATTLE SCENE
+ Battlers
+ Allies' Sprites
+ Enemies' Sprites
+ Boxes
+ Battle Box
+ Fac... |
----------------------------------------
--------------- Perkshop ---------------
----------------------------------------
------- Created by my_hat_stinks -------
----------------------------------------
-- sh_items.lua SHARED --
-- --
-- Perkshop item handling. ... |
template="tool"
appname="LianYiMing"
packagename="com.lianyiming.A"
user_permission={
[1] = "ACCESS_COARSE_LOCATION" ;
[2] = "ACCESS_FINE_LOCATION" ;
[3] = "ACCESS_NETWORK_STATE" ;
[4] = "ACCESS_WIFI_STATE" ;
[5] = "INTERNET" ;
[6] = "WRITE_EXTERNAL_STORAGE" ;
} ;
appver="1.1"
appcode="15"
|
--------------------------------------------
-- camp
-- Au: SJoshua
--------------------------------------------
local utils = require "base.utils"
local scene_manager = require "base.scene_manager"
local camp = {}
local pos = {}
local focus = 1
function camp:enter()
end
function camp:update()
end
function camp:dr... |
data:extend({
-- Item
{
type = "item",
name = "5d-furnace",
icon = "__5dim_resources__/graphics/icon/icon_5d_steel-furnace_3_.png",
icon_size = 32,
subgroup = "furnace-coal",
order = "c",
place_result = "5d-furnace",
stack_size = 50
},
--Recipe
{
type = "recipe",
name = "5... |
local NAME = "GLM"
local VERSION = "0.9.9.8"
-- Set up
if not fileExists("./.tmp/glm/" .. VERSION .. ".txt") then
print("[Dependencies] Setting " .. NAME .. " (" .. VERSION .. ") up...")
if not os.execute("bash ../scripts/setup/glm.sh") then
error("[Dependencies] Cannot set " .. NAME .. " up.")
e... |
model.dlg={}
model.dlg.calibrationDlg={}
function model.dlg.calibrationDlg.onCloseDlg()
local data={}
data.idRobot=model.getAssociatedRobotHandle()
data.id=model.handle
simBWF.query('trackingWindow_trainEnd',data)
simUI.destroy(model.dlg.calibrationDlg.data.ui)
model.dlg.calibrationDlg.data=nil... |
-----------------------------------------------------------------------------------------------------------------------
-- Green theme --
--------------------------------------------------------------------------------... |
Locales ['dk'] = {
['title'] = '~r~Radio %s',
['title_2'] = ': ~s~%s',
['no_network'] = 'Slukket ~r~[Offline]~w~',
['network'] = 'Tændt ~g~[Online]~w~',
['who_talk'] = '~o~Snakker: ~s~%s'
} |
local db_mgr = require "common.db_mgr"
local player_db = {}
local PlayerInfoKey = "player_info"
local function get_player_info_key(id)
return PlayerInfoKey..":"..id
end
function player_db.get_player_info(id)
local mysqldb = db_mgr.get_mysql_db()
local sql = string.format("select * from tb_player where player_id =... |
-- key
local key = KEYS[1]
-- 最大存储的令牌数
local max_permits = tonumber(KEYS[2])
-- 每秒钟产生的令牌数
local permits_per_second = tonumber(KEYS[3])
-- 请求的令牌数
local required_permits = tonumber(ARGV[1])
-- 下次请求可以获取令牌的起始时间
local next_free_ticket_micros = tonumber(redis.call('hget', key, 'next_free_ticket_micros') or 0)
-- 当前时间
local... |
set_project("flame")
set_languages("c17","c++17")
option("vendor-boost")
set_default("/data/vendor/boost-1.74")
after_check(function(option)
option:add("includedirs","$(vendor-boost)/include")
option:add("linkdirs","$(vendor-boost)/lib")
end)
option("vendor-pegtl")
set_default("/data/v... |
object_mobile_dressed_tatooine_kaesii = object_mobile_shared_dressed_tatooine_kaesii:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_tatooine_kaesii, "object/mobile/dressed_tatooine_kaesii.iff")
|
local class = require "30log"
local InputHandler = class "InputHandler"
InputHandler.init = {
-- key -> function(self_object)
press_commands = {},
down_commands = {},
up_commands = {}
}
function InputHandler:bind_press( button, func, target )
self.press_commands[button] = {func = func, target = ta... |
--locals
local color_generic = Color(255, 255, 255)
local color_significant = Color(255, 191, 0)
local command_defaults = {
Execute = function(self, ply, arguments, arguments_string)
if arguments and not table.IsEmpty(arguments) then
local current = self.Tree
local local_arguments = table.Copy(arguments)
... |
Piano = Object:extend()
local l_createPianoKeys
local l_createNoteID
function Piano:new(white_keys_amount)
local piano_keys, keys_amount = l_createPianoKeys(white_keys_amount)
self.x = 0
self.y = 0
self.w = g_screen.w
self.h = g_screen.h * 100 / love.graphics.getHeight()
self.keys = piano_keys
self.keys_amoun... |
if not InventoryManager then InventoryManager = {} end
local IM = InventoryManager
local function generateFiltertypes()
local _new = { }
for _, f in pairs(IM.filterorder) do
local _innernew = { }
for _, ff in pairs(f[2]) do
_innernew[ff[1]] = ff[2]
end
_new[f[1]] = _innernew
end
return _ne... |
-------------------------------------------------------------------------------
-- LISTENER by Tammya-MoonGuard (2018)
--
-- The sound API. This handles queuing and managing sound priorities.
-------------------------------------------------------------------------------
local Main = ListenerAddon
local L ... |
local equipalloy = {
[1] = {ID=1,EquipID=42002002,Weights=20,minlevel=10,maxlevel=17,quality=2},
[2] = {ID=2,EquipID=43002002,Weights=20,minlevel=10,maxlevel=17,quality=3},
[3] = {ID=3,EquipID=44002002,Weights=20,minlevel=10,maxlevel=17,quality=4},
[4] = {ID=4,EquipID=45002002,Weights=20,minlevel=10,maxlevel=17,quality... |
-- Copyright (c) 2021 Trevor Redfern
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
describe("moonpie.tables.max", function()
local max = require "moonpie.tables.max"
it("returns the highest value in an array", function()
local a = { 1, 2, 3, 6, 4, 3, 8,... |
-- KEYS - queue IDs
-- ARGV[1] - counters db index
-- ARGV[2] - counters table name
-- ARGV[3] - poll time interval
-- return queue Ids that satisfy criteria
local counters_db = ARGV[1]
local counters_table_name = ARGV[2]
local poll_time = tonumber(ARGV[3])
local rets = {}
redis.call('SELECT', counters_db)
-- Itera... |
local registerAsserts = require 'registerAsserts'
local stuart = require 'stuart'
registerAsserts(assert)
-- https://spark.apache.org/examples.html
describe('Apach Spark examples', function()
local sc = stuart.NewContext()
it('Word count', function()
local textFile = sc:textFile('spec-fixtures/aristotle1.... |
Story = Scene:extend("Story")
function Story:new(...)
Story.super.new(self, ...)
Game = self
self.background = Sprite(0, 0, "intro/background")
---- PAGE SPRITES
-- page 1
self.waitSprite = Sprite(0, 0, "intro/wachten")
-- page 2
self.introSprite = Sprite(0, 0, "intro/intro")
-- page 3
self.playingSprit... |
if CLIENT then return end
local cur_map = game.GetMap()
-- фикс деповских магистралей на Imagine Line
local function snake()
local trubs = ents.FindByClass("gmod_track_pneumatic_snake")
local pos
for k,v in pairs(trubs) do
pos = v:GetPos()
v:SetPos(pos-Vector(0,0,30))
end
end
if (cur_map:find("gm_metro_jar_im... |
--
-- Upcoming uniques will live here until their mods/rolls are finalised
--
data.uniques.new = {
-- New
[[
Crystallised Omniscience
Onyx Amulet
Requires Level 61
Implicits: 1
{tags:jewellery_attribute}+(10-16) to all Attributes
Modifiers to Attributes instead Apply to Omniscience
+1% to All Elemental Resistances ... |
util.AddNetworkString("bSecure.SkidConfessionBooth")
net.Receive("bSecure.SkidConfessionBooth", function(_,pPlayer)
local src = net.ReadString()
bSecure.CreateDataLog{Player = pPlayer, Code = "105A", Details = "The suspect has many potentially harmful lua files within garrysmod/lua. Sources: ".. src}
hook.... |
-- area entry
DEFINE_BASECLASS("Panel")
local PANEL = {}
AccessorFunc(PANEL, "text", "Text", FORCE_STRING)
AccessorFunc(PANEL, "backgroundColor", "BackgroundColor")
AccessorFunc(PANEL, "tickSound", "TickSound", FORCE_STRING)
AccessorFunc(PANEL, "tickSoundRange", "TickSoundRange")
AccessorFunc(PANEL, "backgroundAlpha"... |
Sequences = {};
local intro = require "dad://VisualNovel/intro";
local song;
function Sequences.room_0_0()
Engine.Scene:getGameObject("fade"):fadeIn();
song = Engine.Audio:load(obe.System.Path("dad://Music/chill.ogg"));
song:setVolume(0.1);
song:play();
local render_options = obe.Scene.SceneRender... |
--[[
The MIT License (MIT)
Copyright (c) 2015-2019 Xaymar
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify,... |
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
client_scripts {
'@vrp/lib/utils.lua',
'client/client.lua'
}
server_scripts {
"@vrp/lib/utils.lua",
'server/server.lua'
}
ui_page "ui/index.html"
files {
"ui/index.html",
"ui/main.js",
"ui/style.css",
"ui/imgs/asthma.png",
... |
local promise = require "util.promise";
describe("util.promise", function ()
--luacheck: ignore 212/resolve 212/reject
describe("new()", function ()
it("returns a promise object", function ()
assert(promise.new());
end);
end);
it("notifies immediately for fulfilled promises", function ()
local p = promise... |
local status_ok, telescope = pcall(require, "telescope")
if not status_ok then
return
end
local actions = require "telescope.actions"
telescope.setup({
defaults = {
vimgrep_arguments = {
"rg",
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
... |
-- Colors
local BACKGROUND_COLOR = { 35, 92, 118 }
local BIRD_COLOR = { 224, 214, 68 }
local PIPE_COLOR = { 94, 201, 72 }
local SCORE_COLOR = { 255, 255, 255 }
-- Positions
local BACKGROUND_POS = { x = 0, y = 0 }
local SCORE_POS = { x = 15, y = 15 }
local love = love
local Painter = {}
function Painter.draw_backgro... |
local app = app
local Env = require "Env"
local Class = require "Base.Class"
local ViewControl = require "Unit.ViewControl"
local Encoder = require "Encoder"
local ply = app.SECTION_PLY
local line1 = app.GRID4_LINE1
local line2 = app.GRID4_LINE2
local line3 = app.GRID4_LINE3
local line4 = app.GRID4_LINE4
lo... |
local byte = string.byte
local char = string.char
local sub = string.sub
local gsub = string.gsub
local lower = string.lower
local unpack = table.unpack
local concat = table.concat
local tokenizer = {}
local BYTE_COMMA = byte(",")
local BYTE_FULL_STOP = byte(".")
local BYTE_LIST_START = byte("[")
local BY... |
local gl = require('galaxyline')
local gls = gl.section
local condition = require('galaxyline.condition')
local vcs = require('galaxyline.provider_vcs')
local buffer = require('galaxyline.provider_buffer')
local fileinfo = require('galaxyline.provider_fileinfo')
local diagnostic = require('galaxyline.provider_diagnosti... |
local http = require("coro-http")
local json = require("json")
local qs = require("querystring")
local function getGiphys(query)
query = qs.urlencode(query)
local gifs = {}
local res, data = http.request('GET', "http://api.giphy.com/v1/gifs/search?q="..query.."&api_key=dc6zaTOxFJmzC")
data = json.parse(data)... |
---@class GameWindow : zombie.GameWindow
---@field public GAME_TITLE String @Game title
---@field private s_fpsTracking FPSTracking
---@field private stringUTF ThreadLocal|Unknown
---@field public GameInput Input
---@field public DEBUG_SAVE boolean
---@field public OkToSaveOnExit boolean
---@field public lastP String
-... |
require "torch"
require "lab"
require "lcairo"
w1=lcairo.Window(200,200)
cr=lcairo.Cairo(w1)
cr:move_to(10,10)
cr:line_to(20,20)
cr:stroke()
cr:move_to(10,100)
cr:set_source_rgba(1,0,1,1)
cr:set_font_size(20);
cr:show_text("Torch 5.1")
lcairo.surface_write_to_png(w1._surf,"a.png")
w1:refresh()
pdf=lcairo.PDF("a.pdf",... |
--[[
##########################################################
Inked Shadow Vaults By: keivamp
##########################################################
LOCALIZED LUA FUNCTIONS
##########################################################
]]--
--GLOBAL NAMESPACE
local _G = _G;
--LUA
local unpack = _G.unpack;
loc... |
local Effect = require("mod.elona.api.Effect")
local Event = require("api.Event")
local Dialog = require("mod.elona_sys.dialog.api.Dialog")
local ICharaElonaFlags = require("mod.elona.api.aspect.chara.ICharaElonaFlags")
local Const = require("api.Const")
local Chara = require("api.Chara")
local DeferredEvent = require(... |
-- Class for the Bird object
Bird = Class{}
function Bird:init()
-- load bird image from disk and assign its width and height
self.image = love.graphics.newImage('bird.png')
self.width = self.image:getWidth()
self.height = self.image:getHeight()
-- position bird in the middle of the screen
s... |
minetest.register_tool("combat:knife", {
description = "Knife",
inventory_image = "combat_knife.png",
range = 2,
wield_scale = {x = 0.7, y = 0.7, z = 0.7},
groups = {hold_limit = 1},
tool_capabilities = {
full_punch_interval = 0.9,
max_drop_level=1,
damage_groups = {fleshy=1.5},
},
})
minetest.register_to... |
--[[
Connects a datastore value and a label.
Does slewing and a little bump when the target value is reached.
]]
local LocalPlayerData = require(game.ReplicatedStorage.LocalPlayerData)
local RunService = game:GetService("RunService")
-------------------------------------------------------------------------------
DataS... |
require("tests/testsuite")
local r = Cmd.LoadDocumentSet("testdocs/README-v0.4.1.wg")
AssertEquals(true, r)
|
require "ISBaseObject"
---@class MoveToState : ISBaseState
MoveToState = ISBaseState:derive("MoveToState");
function MoveToState:enter()
self.moverInst:PathTo(self.x, self.y, self.z, false);
end
function MoveToState:during()
self.moverInst:PathTo(self.x, self.y, self.z, false);
end
function MoveToState:exit... |
--- Save and load tables, either using io.* or sys.*
--
-- @usage
-- local savetable = require "ludobits.m.io.savetable"
--
-- local data = savetable.load("foobar", savetable.FORMAT_IO)
-- data.foo = "bar"
-- savetable.save(data)
--
-- local data = savetable.load("foobar")
-- print(data.foo) --> "bar"
local savefile =... |
local Transformable = Component:extend("Transformable")
function Transformable:initialize(x, y, r, sx, sy)
self.pos = {}
self.pos.x = x or 0
self.pos.y = y or 0
self.rotation = r or 0
self.scale = {}
self.scale.x = sx or 1
self.scale.y = sy or self.scale.x
end
function Tr... |
local utils = require("utils")
local present, dap = pcall(require, "dap")
if not present then
return
end
require("nvim-dap-virtual-text").setup()
dap.adapters.python = {
type = "executable",
command = "/Users/lucas.rondenet/.pyenv/versions/neovim0.5/bin/python",
args = { "-m", "debugpy.adapter" },
}
-- TODO mak... |
-- tables of constants for NetBSD
local require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string, select =
require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string, select
local abi =... |
Vec2ToFloat = {}
setmetatable(Vec2ToFloat, {__index = HiveBaseModule})
Vec2ToFloat.new = function (varname)
local this = HiveBaseModule.new(varname)
setmetatable(this, {__index=Vec2ToFloat})
return this
end
function Vec2ToFloat:Do()
-- nothing to do
self:UpdateValue()
return true
end
function... |
--聖蔓の守護者
--
--Script by JustFish
function c100270214.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c100270214.mfilter,1,1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270214,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIE... |
local function Slay(ply, cmd, args)
if not args[1] then return false end
local targets = FAdmin.FindPlayer(args[1])
if not targets or #targets == 1 and not IsValid(targets[1]) then
FAdmin.Messages.SendMessage(ply, 1, "Player not found")
return false
end
local SlayType = string.lower... |
local terminal = require("relnod.terminal")
local uv = vim.loop
terminal.setup({plugin = {window = "bottom"}})
local run_command = function(cmd)
terminal.run_command("plugin", cmd)
end
_Packages = {}
local M = {}
local PATH = vim.fn.stdpath("data") .. "/site/pack/plugins"
local REPO_RE = "^[%w-]+/([%w-_.]+)$"
lo... |
--[[
Knit.CreateController(controller): Controller
Knit.AddControllers(folder): Controller[]
Knit.AddControllersDeep(folder): Controller[]
Knit.GetService(serviceName): Service
Knit.GetController(controllerName): Controller
Knit.Start(): Promise<void>
Knit.OnStart(): Promise<void>
--]]
local Players = game:Ge... |
-- Requirement summary:
-- [Data Resumption]: Data Persistance
--
-- Description:
-- Check that SDL perform resumption with a big amount of data
-- after unexpected disconnect.
--
-- 1. Used precondition
-- App is registered and activated on HMI.
-- 20 SubMenus, 20 commands, 20 choice sets are added successfull... |
local PLUGIN = PLUGIN
PLUGIN.name = "상인 (AdvNS Custom Vendors)"
PLUGIN.author = "Tensa / Chessnut"
PLUGIN.desc = "기존 플러그인을 커스텀한 상인 플러그인을 추가합니다."
PLUGIN.base = true;
PLUGIN:IncludeDir("language");
nut.util.Include("sv_plugin.lua");
nut.util.Include("sh_commands.lua");
PLUGIN:IncludeDir("derma"); |
--------------------------------
-- @module EaseBounce
-- @extend ActionEase
-- @parent_module cc
return nil
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.