content stringlengths 5 1.05M |
|---|
-- The MIT License (MIT)
--
-- Copyright (c) 2015 Stefano Trettel
--
-- Software repository: LuaJack, https://github.com/stetre/luajack
--
-- 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 w... |
local gmod = gmod
local Msg = Msg
local hook = hook
local table = table
local baseclass = baseclass
--[[---------------------------------------------------------
Name: gamemode
Desc: A module to manage gamemodes
-----------------------------------------------------------]]
module( "gamemode" )
local GameL... |
#!/usr/bin/env qlua
--------------------------------------------------------------------------------
-- View demos based on the trained network output
--
-- e-Lab
-- Written by: Abhishek Chaurasia
-- Dated: 24th March, 2016
--------------------------------------------------------------------------------
-- Torch packa... |
--[[
Luci statistics - diagram color helper class
(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
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.or... |
object_tangible_loot_creature_loot_collections_imp_t3_darth_tyranus = object_tangible_loot_creature_loot_collections_shared_imp_t3_darth_tyranus:new {
}
ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_imp_t3_darth_tyranus, "object/tangible/loot/creature/loot/collections/imp_t3_darth_tyranus... |
-- Raid Debuffs module, implements raid-debuffs statuses
local L = LibStub("AceLocale-3.0"):GetLocale("Grid2")
local GSRD = Grid2:NewModule("Grid2RaidDebuffs")
local frame = CreateFrame("Frame")
local Grid2 = Grid2
local isClassic = Grid2.isClassic
local next = next
local ipairs = ipairs
local strfind = strfind
local... |
local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear
local command = helpers.command
local eq = helpers.eq
local eval = helpers.eval
describe('autocmd TabNew', function()
before_each(clear)
it('matches when opening any new tab', function()
command('autocmd! TabNew * let ... |
--- 玩家加入
-- @script Auto assign
-- @copyright Lilith Games, Avatar Team
--- 编辑器默认方法, 删了报错
-- run once when script init
autoAssign = function()
end
|
function verse(num)
if num ==0 then
return 'No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n'
elseif num ==1 then
return '1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer ... |
--- Module which contains the core of the quickcheck engine.
-- @module lqc.quickcheck
-- @alias lib
local report = require 'lqc.report'
local map = require 'lqc.helpers.map'
local shuffle = pairs
local lib = {
properties = {}, -- list of all properties
numtests = nil, -- Default amount of times a property s... |
if CONFIG["ChatCommands"]["Enable"] and not CONFIG["ChatCommands"]["UseDefaultNames"] then
TriggerEvent("chat:addSuggestion", "/setname", _U("setnameCommandSug"))
TriggerEvent("chat:addSuggestion", "/name", _U("nameCommandSug"))
TriggerEvent("chat:addSuggestion", "/whoami", _U("nameCommandSug"))
Regis... |
-- luacheck: globals TEAM_RED TEAM_BLUE
TEAM_RED = 1
TEAM_BLUE = 2
team.SetUp(TEAM_RED, "Team Red", Color(255, 126, 112, 255), true)
team.SetUp(TEAM_BLUE, "Team Blue", Color(109, 145, 255, 255), true) |
local Class = require("lib.Class")
local Vector2 = require("lib.Vector2")
local Anim = require("lib.Animation")
local Rect = require("lib.Rect")
local U = require("lib.Utils")
--local cron = require()
local Sprite = Class:derive("Sprite")
--where x,y is the center of the sprite
--
--Note: This component assumes the pr... |
-- a basic garage implementation
-- vehicle db
MySQL.createCommand("vRP/vehicles_table", [[
CREATE TABLE IF NOT EXISTS vrp_user_vehicles(
user_id INTEGER,
vehicle VARCHAR(255),
CONSTRAINT pk_user_vehicles PRIMARY KEY(user_id,vehicle),
CONSTRAINT fk_user_vehicles_users FOREIGN KEY(user_id) REFERENCES vrp_users(... |
local Textr = {}
Textr.__index = Textr
local function new()
text = ""
duration = 1
previsible_timer = 0
visibility_timer = 0
visible = false
queue = {}
return setmetatable(
{
text=text,
duration=duration,
previsible_timer=previsible_timer,
visibility_timer=visibility_timer,
visibl... |
local mod = DBM:NewMod(1693, "DBM-Party-Legion", 9, 777)
local L = mod:GetLocalizedStrings()
mod:SetRevision(("$Revision: 15008 $"):sub(12, -3))
mod:SetCreatureID(101995)
mod:SetEncounterID(1848)
mod:SetZone()
mod.imaspecialsnowflake = true
mod:RegisterCombat("combat")
mod:RegisterEventsInCombat(
"SP... |
TatooineMosEspaScreenPlay = CityScreenPlay:new {
numberOfActs = 1,
screenplayName = "TatooineMosEspaScreenPlay",
planet = "tatooine",
gcwMobs = {
{"comm_operator", "rebel_resistance_dissident", -2960.4,5,1973.9,74,0, "npc_imperial", "angry"},
{"dark_trooper", "rebel_commando", -3028.58,5.11515,2618.21,39.623... |
-- @file godot_transform.lua Wrapper for GDNative's Transform
-- This file is part of Godot Lua PluginScript: https://github.com/gilzoide/godot-lua-pluginscript
--
-- Copyright (C) 2021 Gil Barbosa Reis.
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associa... |
--[[
[] Author: Martynas Petuska
[] E-mail: martynas.petuska@outlook.com
[] Date: January 2018
--]]
---Splits the string by the given separator and returns them as vararg.
---@param str string
---@param sep string
---@return ...
function split(str, sep)
local fields = {}
local sep = sep or " "
local patte... |
modifier_omniknight_repel_lua = class({})
--------------------------------------------------------------------------------
-- Classifications
function modifier_omniknight_repel_lua:IsHidden()
return false
end
function modifier_omniknight_repel_lua:IsDebuff()
return false
end
function modifier_omniknight_repel_lua:... |
--- This is a basic documented module
--
-- @module a_module
return {
a = 1, --- A basic definition
--- A simple function.
b = function(a, b) end,
}
|
fx_version 'cerulean'
games { 'gta5' }
author 'Resesetti | Resesetti#8473'
client_scripts {
'client.lua',
'config.lua'
}
|
--[[
##############################################################################
Inked Shadow Vaults By: keivamp
##############################################################################
##########################################################
LOCALIZED LUA FUNCTIONS
########################################... |
SoundEffects = {}
SoundEffects.__index = SoundEffects
setmetatable(SoundEffects, {
__index = SoundEffects,
__call = function (cls, ...)
local self = setmetatable({}, cls)
self:_init(...)
return self
end,
})
function SoundEffects:_init()
self.soundEffects = {}
self.soundEffects["menu"] = love.audi... |
-- Copyright 2015 Jian Chang <aa65535@live.com>
-- Licensed to the public under the Apache License 2.0.
local m, s, o, e, a
if luci.sys.call("pidof ss-redir >/dev/null") == 0 then
m = Map("shadowsocks-libev", translate("ShadowSocks-libev"), translate("ShadowSocks-libev is running"))
else
m = Map("shadowsocks-libev"... |
-- This file supplies the majority of homedecor's lighting
local S = minetest.get_translator("homedecor_lighting")
homedecor_lighting = {}
local function is_protected(pos, clicker)
if minetest.is_protected(pos, clicker:get_player_name()) then
minetest.record_protection_violation(pos,
clicker:get_player_name())
... |
NPCStandState = { mName = "npc_stand"}
NPCStandState.__index = NPCStandState
function NPCStandState:Create(character, map)
local this =
{
mCharacter = character,
mMap = map,
mEntity = character.mEntity,
mController = character.mController,
}
setmetatable(thi... |
--[[
Name: "sv_auto.lua".
Product: "nexus".
--]]
local MOUNT = MOUNT;
NEXUS:IncludePrefixed("sh_auto.lua");
-- Whether or not to only display typing notices when visible.
nexus.config.Add("typing_visible_only", true, true);
-- Called when a player starts typing.
concommand.Add("nx_typing_start", function(player, co... |
local kernel = {}
kernel.language = "glsl"
kernel.category = "filter"
kernel.name = "posterize"
kernel.vertexData =
{
{
name = "colorsPerChannel",
default = 4,
min = 2,
max = 99999,
index = 0, -- v_UserData.x
},
}
kernel.fragment =
[[
P_COLOR vec4 FragmentKernel( P_UV vec2 texCoord )
{
mediump float c... |
local Util = {}
function Util:TableCopy(table, depth, curDepth)
if (not depth) then depth = 1 end
local curDepth = curDepth or 1
if (curDepth > depth) then
return table
end
local newTable = {}
for key, value in pairs(table) do
if (type(value) == "table") then
value ... |
describe("When testing the 1000 numbers series module", function()
it("Should return { 9, 9, 8, 9 } as the four adjacent digits that have the greatest product", function()
local a_1000_numbers_series = require("a_1000_numbers_series")
local result = a_1000_numbers_series.adjacents_that_have_greatest... |
local class = require 'stuart.class'
local Context = class.new()
function Context:_init(arg1, arg2, arg3, arg4)
local SparkConf = require 'stuart.SparkConf'
if arg1 == nil and arg2 == nil then
self.conf = SparkConf.new()
elseif class.istype(arg1, SparkConf) then
self.conf = arg1
else
self.conf = C... |
---------------------------------
--! @file InPortDirectConsumer.lua
--! @brief ダイレクト接続InPortConsumerの定義
---------------------------------
--[[
Copyright (c) 2017 Nobuhiko Miyamoto
]]
local InPortDirectConsumer = {}
--_G["openrtm.InPortDirectConsumer"] = InPortDirectConsumer
return InPortDirectConsumer
|
if not _G.buffer then _G.buffer = require("doubleBuffering") end
local doubleHeight = {}
------------------------------------------------------------------------------------------------------------------------------------------
function doubleHeight.line(x0, y0, x1, y1, color)
local steep = false;
if math.abs(x0... |
object_mobile_som_ruins_human = object_mobile_som_shared_ruins_human:new {
}
ObjectTemplates:addTemplate(object_mobile_som_ruins_human, "object/mobile/som/ruins_human.iff")
|
if not bit then require "bit" end
local net = {}
net.Receivers = {}
local buf
function net.SetData( data )
assert( buf == nil, "net: attempted to set data with an existing buffer" )
buf = Buffer( data )
end
function net.ClearData()
buf = nil
end
--
-- Set up a function to receive network messages
--
function ne... |
-- gui.lua
-- created on 2021/4/30
-- author @zoloypzuo
local vertex_shader = [[
#version 330
uniform mat4 ProjMtx;
in vec2 Position;
in vec2 UV;
in vec4 Color;
out vec2 Frag_UV;
out vec4 Frag_Color;
void main()
{
Frag_UV = UV;
Frag_Color = Color;
gl_Position = ProjMtx * vec4(Position.xy,0,1);
}
]]
local fragment_s... |
local widgetType, widgetVersion = 'CheckButton', 1
local Wasabi = LibStub and LibStub('Wasabi', true)
if(not Wasabi or (Wasabi:GetWidgetVersion(widgetType) or 0) >= widgetVersion) then
return
end
local methods = {}
function methods:Update(value)
self:SetChecked(value)
self:Fire('Update', value)
end
local function ... |
local vmf = get_mod("VMF")
-- #####################################################################################################################
-- ##### VMF internal functions and variables ##########################################################################
-- ###############################################... |
-- Set the statusline
vim.o.statusline = '%<%f %h%m%r%=[%l/%L,%c%V - %n%Y] - %P'
|
local base={
{100,99,98,97,96,95,94,93,92,91,90,89,88,87,86,85,84,83,82,81,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6},
{75,74,73,72,71,70,6... |
include "./vendor/premake/premake_customization/solution_items.lua"
workspace "FarLight"
architecture "x64"
startproject "FarLight"
configurations
{
"Debug",
"Release",
"Dist"
}
solution_items
{
".editorconfig"
}
flags
{
"MultiProcessorCompile"
}
outputOb... |
data:extend(
{
{
type = "recipe",
name = "hypernuclear-fuel",
energy_required = 60,
enabled = false,
category = "centrifuging",
ingredients =
{
{type="item", name="strontium-90", amount=1},
{type="item", name="nuclear-fuel", amount=1}
},
icon_size = 32,
crafting_machine_tint =
{
primary ... |
-----------------------------------
-- Area: Nashmau
-- NPC: Leleroon
-- Corsair AF2 and AF3 quests
-- !pos -14.687 0.000 25.114 53
-----------------------------------
local ID = require("scripts/zones/Nashmau/IDs")
require("scripts/globals/settings")
require("scripts/globals/status")
require("scripts/globals/quests")... |
go.property("prop1", msg.url("url"))
go.property("prop2", msg.url(""))
go.property("prop3", msg.url())
go.property("prop4", msg.url('url'))
|
-- This module is to improve keyboard oriented workflow in Slack
local windows = require "windows"
local keybindings = require "keybindings"
local module = {}
local function setMouseCursorOnSlack()
windows.setMouseCursorAtApp("Slack")
end
local slackLocalHotkeys = {
-- jump to end of thread on C-g
hs.hotkey.bin... |
HomeLayer = class("HomeLayer", function(...)
return cc.Layer:create(...)
end)
function HomeLayer:onEnter()
local mapLayer = HomeMapLayer:create()
self:addChild(mapLayer, 0, TAG_LAYER_HOME_MAP)
end
function HomeLayer:create()
local homeLayer = HomeLayer.new()
homeLayer:onEnter()
return homeLayer
end |
local BaseGM = reload("gamemodes.basegm")
local GameMode = class("ArcadeMode", BaseGM)
function GameMode:initialize()
self.super:initialize()
local player = entityfactory:create("player")
player:setPos(50, 50)
player:spawn()
local player2 = entityfactory:create("player")
player2:setPos(50, 5... |
--
-- created with TexturePacker (http://www.codeandweb.com/texturepacker)
--
-- $TexturePacker:SmartUpdate:71ec38e7aa37e9a6c15d5a39d9da801d:5353b4cb97d5879e0d8b427285df1d13:7c7b926951ecd55be01c75913320eada$
--
-- local sheetInfo = require("mysheet")
-- local myImageSheet = graphics.newImageSheet( "mysheet.png", sheetI... |
local tonumber = tonumber
local MB = 2^20
local responsestr = "{\"message\": \"Response size limit exceeded\"}"
local KongResponseSizeLimitingHandler = {}
KongResponseSizeLimitingHandler.PRIORITY = 802
KongResponseSizeLimitingHandler.VERSION = "2.0.0"
local function check_size(length, allowed_size)
local allowed_by... |
local wk = require('which-key')
wk.register(
{
H = { '<Cmd>SidewaysLeft<Cr>', 'Move Item Left' },
L = { '<Cmd>SidewaysRight<Cr>', 'Move Item Right' },
},
{
prefix = '<Leader>'
}
)
|
local AceGUI = LibStub("AceGUI-3.0")
-------------
-- Widgets --
-------------
--[[
Widgets must provide the following functions
Acquire() - Called when the object is aquired, should set everything to a default hidden state
Release() - Called when the object is Released, should remove any anchors and hide the Wid... |
---
--- Generated by MLN Team (https://www.immomo.com)
--- Created by MLN Team.
--- DateTime: 15-01-2020 17:35
---
---
--- 代表圆角位置的枚举
---
---@link https://www.immomo.comRectCorner.html
---@class RectCorner @parent class
---@public field name string
---@type RectCorner
RectCorner = {
---
--- 代表圆角位置的枚举
---
BOTTOM... |
local Deque = {}
Deque.__index = Deque
local function copy(container)
local copied = {}
for _, value in ipairs(container) do
table.insert(copied, value)
end
return copied
end
-- FILO by default
function Deque.new(elements, limit, lifo)
lifo = if lifo then lifo else false
loc... |
local loaded = false
local bustedRunner = require "busted.runner"
return function(options)
if loaded then return function() end else loaded = true end
_G.DDT_GLOBAL_ARGS = {
r = options["recursive"],
p = options["pattern"],
d = options["directory"],
ep = options["exclude-pattern"],
root = optio... |
houses = {"Gryffindor", "Ravenclaw", "Hupplepuff", "Slytherin"}
quidditchFixtures = {}
for i,v in ipairs(houses) do
quidditchFixtures[v] = i
end
|
local F = lt.F
local json_logger, parent = torch.class('lt.json_logger', 'lt.serializable')
function json_logger:__init(args)
assert(type(args.fields) == 'table')
assert(type(args.output_dir) == 'string')
assert(paths.dirp(args.output_dir))
parent.__init(self)
self.state.fields = {}
for _, f in pairs(args.fiel... |
--[[
© CloudSixteen.com do not share, re-distribute or modify
without permission of its author (kurozael@gmail.com).
--]]
local ITEM = Clockwork.item:New("ammo_base");
ITEM.name = "ItemShotgunShells";
ITEM.cost = 30;
ITEM.classes = {CLASS_EOW};
ITEM.model = "models/items/boxbuckshot.mdl";
ITEM.weight = 1;
ITEM.uniq... |
target("base")
set_kind("static")
add_cxxflags("-std=c++11")
set_warnings("all")
set_targetdir("../lib")
add_files("**.cc")
after_build(function ()
os.rm("build")
end)
|
--[[
Sample plugin file for highlight
Adds modern monospace fonts
]]
Description="Adds modern monospace fonts in HTML output"
Categories = {"format", "html", "usability" }
-- function to update theme definition
-- optional parameter: theme description
function themeUpdate()
if (HL_OUTPUT == HL_FORMAT_HTML or HL... |
object_building_player_generic_medium_window_s01 = object_building_player_shared_generic_medium_window_s01:new {
}
ObjectTemplates:addTemplate(object_building_player_generic_medium_window_s01, "object/building/player/generic_medium_window_s01.iff")
|
local commands = {
hello = function(params) if #params > 0 then print("Hello, " .. table.concat(params, " ") .. "!") else print("Usage: hello <names ...>") end end,
luatime = function(params) print("Lua time: " .. os.time()) end
}
local function init()
print("Loaded!")
end
local function shutdown()
print("Unload... |
local testing = require('testing')('sched')
local sched = require('sched')
local time = require('time')
local process = require('process')
local signal = require('signal')
local assert = require('assert')
local inspect = require('inspect')
local util = require('util')
testing:nosched("scheduler creation and release", ... |
---@meta
resty_aes={}
function resty_aes.cipher() end
resty_aes.hash={}
resty_aes.hash.sha1={}
resty_aes.hash.md5={}
resty_aes.hash.sha224={}
resty_aes.hash.sha512={}
resty_aes.hash.sha256={}
resty_aes.hash.sha384={}
function resty_aes.new(self, key, salt, _cipher, _hash, hash_rounds) end
function resty_aes.decrypt(sel... |
-- =========================================================================
-- =========================================================================
-- Licensed to Qualys, Inc. (QUALYS) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional informatio... |
local ODC = LibStub("AceAddon-3.0"):GetAddon("OfflineDataCenter")
local ODC_SF = ODC:GetModule("SortFilter")
if not ODC_SF then return end
local Module = ODC:NewModule("OfflineMail", "AceEvent-3.0", "AceHook-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("OfflineDataCenter")
Module.description = L["Offline MailBox"... |
------------------------------------------------------------------------
--[[ MaxNorm ]]--
-- Visitor
-- Hard constraint on the upper bound of the norm of output and/or input
-- neuron weights (in a weight matrix). Has a regularization effect
-- analogous to WeightDecay, but with easier to optimize
-- hyper-parameter... |
import "CoreLibs/graphics"
import "CoreLibs/timer"
-- Declaring this "gfx" shorthand will make your life easier. Instead of having
-- to preface all graphics calls with "playdate.graphics", just use "gfx."
-- Performance will be slightly enhanced, too.
-- NOTE: Because it's local, you'll have to do it in every .lua ... |
local GMModel = BaseClass(EventDispatcher)
local GMModel = GMModel
local clientGMList = {
{gmName="角色id", defaultGMStr="roleID"},
{gmName="场景信息", defaultGMStr="sceneInfo"},
}
function GMModel:Constructor()
GMModel.Instance = self
self:Reset()
end
function GMModel:Reset()
end
function GMModel.GetInstance()
if G... |
GUI_SCREEN_WIDTH, GUI_SCREEN_HEIGHT = guiGetScreenSize()
GUI_IMAGES_PATH = "gui/images/"
GUI_EMPTY_IMAGE_PATH = GUI_IMAGES_PATH.."util/empty.png"
GUI_WHITE_IMAGE_PATH = GUI_IMAGES_PATH.."util/white.png"
GUI_FONTS_PATH = "gui/fonts/" |
-- This file is subject to copyright - contact swampservers@gmail.com for more information.
DEFINE_BASECLASS("gun")
SWEP.GunType = "pistol"
SWEP.Purpose = "High DPS pistol, but small magazine"
SWEP.PrintName = "P228"
SWEP.HoldType = "pistol"
SWEP.Slot = 0
CSKillIcon(SWEP, "y")
--
SWEP.WorldModel = "models/weapons/w_pi... |
local odbc = require "odbc.core"
luasql = (type(luasql) == 'table') and luasql or {
_COPYRIGHT = "Copyright (C) 2006-2012 Kepler Project";
_DESCRIPTION = "LuaSQL is a simple interface from Lua to a DBMS";
_VERSION = "LuaSQL 2.2.1";
}
local Environment = {__metatable = "LuaSQL: you're not allowed to get th... |
local Block = require("../block")
local Platform = require("../platform")
local Operator_Block = Block:new_raw()
function Operator_Block:new( opname, ...)
local result = {}
Operator_Block:init(result, 20, 20, ... ) -- call base initializer
result = Operator_Block:new_raw(result) -- attach methods... |
-- Task 1
function sternBrocot (n)
local sbList, pos, c = {1, 1}, 2
repeat
c = sbList[pos]
table.insert(sbList, c + sbList[pos - 1])
table.insert(sbList, c)
pos = pos + 1
until #sbList >= n
return sbList
end
-- Return index in table 't' of first value matching 'v'
functi... |
local highlights = require('neo-tree.ui.highlights')
local buffers = {
window = {
position = "left",
width = 40,
-- Mappings for tree window. See https://github.com/nvim-neo-tree/neo-tree.nvim/blob/main/lua/neo-tree/sources/filesystem/commands.lua
-- for built-in commands. You can also create your ow... |
local pickupContainers = {} -- Local pickups data
RegisterNetEvent('ews:createPickups') -- Generates all the pickups
RegisterNetEvent('ews:createPickup') -- Generates all the pickups
RegisterNetEvent('ews:removePickup') -- Remove a pickup
RegisterNetEvent('ews:removeAllPickups') -- Remove a pickup
function RemovePick... |
require "lualibhelper"
hs_init()
print(add_in_haskell(1, 2))
print(add_in_haskell(-10, 20))
hs_exit()
|
local helpers = require "spec.helpers"
local cjson = require "cjson"
local pairs = pairs
local type = type
local null = ngx.null
local function remove_nulls(tbl)
for k,v in pairs(tbl) do
if v == null then
tbl[k] = nil
elseif type(v) == "table" then
tbl[k] = remove_nulls(v)
end
end
retu... |
-----------------------------------
-- Area: Bastok Markets
-- NPC: Visala
-- Guild Merchant NPC: Goldsmithing Guild
-- !pos -202.000 -7.814 -56.823 235
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/shop");
local ID = require("scripts/zones/Bastok_Markets/IDs");
---... |
-- Auto-generated code below aims at helping you parse
-- the standard input according to the problem statement.
structCoords = {}
numberOfBarracks = 0
numSites = tonumber(io.read())
for i = 0, numSites - 1 do
next_token = string.gmatch(io.read(), "[^%s]+")
siteId = tonumber(next... |
Birdy = {}
function Birdy:new(w, h)
local rw = w * 0.035
local rh = h * 0.05
obj = {
color = {100, 200, 20},
size = {rw, rh},
x = w * .25,
y = h * .5
}
self.__index = self
return setmetatable(obj, self)
end
function Birdy:getBox()
return {
x = self.x,
y = self.y,
w = self.size[1],
h = self.si... |
days = { "monday", "tuesday", "wednesday", "thursday" }
function walk(array)
local index = 0
return function()
index = index + 1
return array[index]
end
end
for day in walk(days) do
--print (type(day))
print (day)
end
|
-- MS_Tooltip
--
-- Displays which specs should roll for MS on raid epics.
--
MS_Tooltip = {}
MS_Tooltip.Name = "MS_Tooltip"
MS_Tooltip.Version = "1.5.5"
MS_Tooltip.Enabled = 0
MS_Tooltip.Colors = {
red = "ffff0000",
green = "ff00ff00",
yellow = "ffffff00",
gray = "ff999999",
orange = "ffe66600",... |
--- K/V
local baseSpeed = 0.9 -- Normal cruise speed, 1 = 160 kph ish
local breakingDistance = 120 -- How early should it start breaking?
local stationArea = 3 -- Station leeway, since coords are not exact.
local vehicleId = 570 -- Brown Streak Carriage
local tickSpeed = 250 -- Tick every 250 ms
local stationWaiting... |
function PIUScoring(pn, param, beat)
local judge_table = {
["TapNoteScore_W1"] = { Bonus = true, Value = 1000 }, -- superb
["TapNoteScore_W2"] = { Bonus = true, Value = 1000 }, -- perfect
["TapNoteScore_W3"] = { Bonus = true, Value = ... |
-- tinyxml2 with static runtime, as used for launcher
return {
include = function()
if not os.is('windows') then
defines { "BOTAN_DLL=" }
else
defines { "BOTAN_DLL=__declspec(dllimport)" }
end
includedirs "vendor/botan/include/"
end,
run = function()
language "C++"
kind "SharedLib"
if os.is('w... |
local MAIN_VELOCITY = 40;
addEventHandler("onResourceStart", resourceRoot,
function()
exports.mtatr_civ:construct("Otobüs Şoförü", "", 2258.37, 2055.82, 10.82, 125, 125, 255, {});
local XMLBusLocations = xmlLoadFile ( "bus_routes.xml" )
if ( not XMLBusLocations ) then
local XMLBusLocations = xmlCreateF... |
ProtocolMgr = { }
function ProtocolMgr:init()
end
create(ProtocolMgr) |
-- Copyright 2010 by Renée Ahrens, Olof Frahm, Jens Kluttig, Matthias Schulz, Stephan Schuster
-- Copyright 2011 by Jannis Pohlmann
-- Copyright 2012 by Till Tantau
--
-- This file may be distributed an/or modified
--
-- 1. under the LaTeX Project Public License and/or
-- 2. under the GNU Public License
--
-- See the f... |
object_mobile_nexus_travel_02 = object_mobile_shared_nexus_travel_02:new {
}
ObjectTemplates:addTemplate(object_mobile_nexus_travel_02, "object/mobile/nexus_travel_02.iff")
|
--[[
################################################################################
#
# Copyright (c) 2014-2020 Ultraschall (http://ultraschall.fm)
#
# 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 ... |
-- MasterMerchant Utility Functions File
-- Last Updated September 15, 2014
-- Written February 2015 by Chris Lasswell (@Philgo68) - Philgo68@gmail.com
-- Released under terms in license accompanying this file.
-- Distribution without license is prohibited!
specialDWCount = 0
local mfloor = math.floor
local taxFactor ... |
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- F I N A L C U T P R O A P I --
-----------------------------------------------------------------------------... |
local info = {
version = 1.001,
comment = "scintilla lpeg lexer for sql",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
copyright = "PRAGMA ADE / ConTeXt Development Team",
license = "see context related readme files",
}
local P, R, S = lpeg.P, lpeg.R, lpeg.S
local lexer = require(... |
TYPE_PROMISE = 'vam_promise'
STATE_CREATED = 'vam_created'
STATE_RESOLVED = 'vam_resolved'
STATE_REJECTED = 'vam_rejected'
function promise(callable)
return {
_type = TYPE_PROMISE,
_chain = { callable },
andThen = andThen,
done = done,
}
end
function isPromise(candidate)
r... |
aura_env.watches = setmetatable({}, {
__index = function(t, k)
t[k] = {}
return t[k]
end,
})
function aura_env.computeSortIndex(type, spellID, member)
return (
(("%06d"):format(spellID))..
(("%02d"):format(member.classID))..
(("%-12s"):format(member.name))
)
end
aura_env.playerGUID = UnitG... |
return function()
warnings 'Off'
includedirs {
'third_party/glfw-fork/include',
}
files {
'third_party/glfw-fork/src/egl_*.c',
'third_party/glfw-fork/src/osmesa_*.c',
'third_party/glfw-fork/src/context.c',
'third_party/glfw-fork/src/init.c',
'third_party/glfw-fork/src/input.c',
'third_party/glfw-fork/... |
function component(desc)
if desc.name == nil then
error("A component descriptor must specify a name")
end
return {
getDesc = function() return desc end,
events = {},
actions = {}
}
end
|
-- completion maps (not cmp) --
-- line completion - use more!
-- inoremap <C-l> <C-x><C-l>
vim.api.nvim_set_keymap("i", "<c-l>", "<c-x><c-l>", { noremap = true })
-- Vim command-line completion
-- inoremap <C-v> <C-x><C-v>
vim.api.nvim_set_keymap("i", "<c-v>", "<c-x><c-v>", { noremap = true })
-- end non-cmp completio... |
--[[Workspace "Core"
configuration "linux*"
buildoptions { "-std=c++17" }
configuration "linux64"
buildoptions {"-m64"}
configuration {}
startproject "OakVR"
]]
dofile("Console/__Console.lua")
dofile("CoreExternals/__CoreExternals.lua")
dofile("OakVR/__OakVR.lua")
dofile("ResourceManager/__ResourceManager... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.