content stringlengths 5 1.05M |
|---|
-------------------------------------------------------------------------------
-- advanced spawning mod
--
--@license WTFP
--@copyright Sapier
--@author Sapier
--@date 2013-12-05
--
--------------------------------------------------------------------------------
------------------------------------------------------... |
workspace "Hex"
architecture "x64"
configurations {
"Debug",
"Release"
}
startproject "Sandbox"
includedirs {
"Hex/src/Core",
"Hex"
}
include "Sandbox"
include "Hex" |
-- Simple pipeworks fixture with few no-op methods, enough for technic, metatool and jumpdrive
mineunit:set_modpath("pipeworks", "spec/fixtures")
local function noop(t)
return setmetatable(t, {
__call = function(self,...) return self end,
__index = function(...) return function(...)end end,
})
end
local pipew... |
local utils = require("utils")
local settings = require("hs.settings")
local styledtext = require("hs.styledtext")
local mod = {}
local file = io.open("emojis.txt", "r")
local emojis = {}
for line in file:lines() do
table.insert(emojis, 1, line)
end
function utf8.sub(s, i, j)
i = utf8.offset(s, i)
j = ut... |
-- local variables for API functions. any changes to the line below will be lost on re-generation
local bit_band, client_set_event_callback, entity_get_local_player, entity_get_prop, entity_is_alive, math_sqrt, renderer_indicator, ui_get, ui_new_checkbox, ui_new_combobox, ui_new_slider, ui_reference, GetState, ui_set, ... |
local DIC = {}
local meta_DIC = {__index=DIC}
-- DIC オブジェクトの作成
local function create()
local obj = {}
setmetatable(obj, meta_DIC)
return obj
end
-- @:emo.dic モジュール
local MOD = create()
return MOD |
newTalentType{ type="anti-elemental/control", name = "control", description = "Control skills" }
newTalent{
name = "Phantom Noise",
type = {"anti-elemental/control", 1},
info = "Create a noise that appears to come from the target location",
}
newTalent{
name = "Illusory Movement",
type = {"anti-elem... |
data:extend ({
{
type = "lamp",
name = "power-pad",
icon = "__Powered_Entities__/graphics/power_pad_icon.png",
icon_size = 32,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "power-pad"},
max_health = 55,
order = "z",
corpse = "small-... |
PROJECT = "socketdemo"
VERSION = "1.0.0"
local sys = require "sys"
pmd.ldoset(3000, pmd.LDO_VLCD)
sys.taskInit(function()
local netled = gpio.setup(1, 0)
local count = 1
while 1 do
netled(1)
sys.wait(1000)
netled(0)
sys.wait(1000)
log.info("luatos", "hi", count, ... |
-- { name = "Muldraugh, KY - In Your Hotel Room", file = "media/maps/Muldraugh, KY - Hotel/spawnregions.lua" },
function SpawnPoints()
return {
unemployed = {
-- 34x32 Sunstar Hotell
{worldX=35, worldY=32, posX=129, posY=229}, -- Small
{worldX=35, worldY=32, posX=129, posY=2... |
local rewardModule = require "module.RewardModule"
local ItemHelper=require"utils.ItemHelper"
local selectMapGift = {}
function selectMapGift:initData(data)
self.gid = tonumber(data.chapterId)
self.star = data.star or 0
self.index = data.index or 1
self.readyTab = {}
end
function selectMapGift:initUi(... |
local playsession = {
{"Menander", {215793}},
{"realDonaldTrump", {69293}},
{"boxofsalmon", {63928}},
{"arisgr", {1518}},
{"rlidwka", {4623}}
}
return playsession |
local gears = require("gears")
local awful = require("awful")
local wibox = require("wibox")
local helpers = require("helpers")
local beautiful = require("beautiful")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local update_interval = 1
local art = wibox.widget {
image = ge... |
--@import see.event.Event
--@import see.net.HTTPResponse
--@extends see.event.Event
function HTTPSuccessEvent:init(url, responseHandle)
self:super(Event).init("http_success")
self.url = url
self.response = HTTPResponse:new(responseHandle.readAll(), responseHandle.getResponseCode())
responseHandle.close()
end |
object_mobile_npe_npe_han_solo = object_mobile_npe_shared_npe_han_solo:new {
}
ObjectTemplates:addTemplate(object_mobile_npe_npe_han_solo, "object/mobile/npe/npe_han_solo.iff") |
object_tangible_storyteller_prop_pr_lifeday_decorated_tree = object_tangible_storyteller_prop_shared_pr_lifeday_decorated_tree:new {
}
ObjectTemplates:addTemplate(object_tangible_storyteller_prop_pr_lifeday_decorated_tree, "object/tangible/storyteller/prop/pr_lifeday_decorated_tree.iff")
|
data:extend({
{
type = "item-subgroup",
name = "beacons",
group = "production",
order = "z-a"
},
{
type = "item-subgroup",
name = "speed-modules",
group = "production",
order = "z-b"
},
{
type = "item-subgroup",
name = "effectivity-modules",
group = "production",
... |
-- This module is forked in different environments.
-- By default, return `true` to log errors to the console.
-- Forks can return `false` if this isn't desirable.
return {
showErrorDialog = function(capturedError)
return true
end
}
|
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * --
group "vendor"
project "glfw"
targetname "%{prj.name}"
targetdir "%{wks.location}/bin-lib/%{cfg.platform}/%{cfg.buildcfg}/"
objdir "%{wks.location}/bin-obj/%{cfg.platform}/%{cfg.buildcfg}/"
location "%... |
--
-- created with TexturePacker (http://www.codeandweb.com/texturepacker)
--
-- $TexturePacker:SmartUpdate:96d954d559e5836c54dce6fb403a3f5e:a497c94cb3d3b5051381ff4d7520dc1a:cf8ab4992190eb44f97f06311ef326d7$
--
-- local sheetInfo = require("mysheet")
-- local myImageSheet = graphics.newImageSheet( "mysheet.png", sheetI... |
cc = cc or {}
---EventListenerMouse object
---@class EventListenerMouse : EventListener
local EventListenerMouse = {}
cc.EventListenerMouse = EventListenerMouse
--------------------------------
--
---@return bool
function EventListenerMouse:init() end
--------------------------------
---/ Overrides
---@return EventLi... |
--[[
author by soniceryd
Date:2016/07/09
Desc:request VO
]]--
local _M = {}
_M.version = "0.0.1"
function _M:new()
local instance = {
uri = ngx.var.uri
}
setmetatable(instance,{__index=self})
return instance
end
function _M:getMethod()
if self.method == nil then
... |
--[[-------------------------------------------------------------------------
Changes the weather for players near it.
---------------------------------------------------------------------------]]
AddCSLuaFile()
DEFINE_BASECLASS( "base_anim" )
ENT.PrintName = "SF Atmo-Sphere"
ENT.Author = "Nak"
ENT.Information = "Cha... |
return {
metadata = {
{scaling_used = {"deLeva1996_segmentedTrunk"},
subject_age = {30.0},
subject_height = {1.70},
subject_weight = {80.00},
subject_gender = {"male"},
subject_pelvisWidth = {0.2400},
subject_hipCenterWidth = {0.1700},
subject_shoulderCenterWidth = {0.4000},
subject_heelAnkleXOffset =... |
--此buff控制玩家发出的技能最大攻击数量,比如本来该技能最多攻击4个,有此buff就能攻击6个了
local ECS = require "ECS"
local skynet = require "skynet"
local SkillMaxTargetNumBuffSys = ECS.BaseClass(ECS.ComponentSystem)
ECS.TypeManager.RegisterScriptMgr("UMO.SkillMaxTargetNumBuffSys", SkillMaxTargetNumBuffSys)
function SkillMaxTargetNumBuffSys:OnCreateManager(... |
local ngx = ngx
local type = type
local cJson = require("cjson.safe")
local apioak_shared = ngx.shared.apioak
local _M = {}
function _M.set(key, value, ttl)
ttl = ttl or 0
if type(value) == "table" then
value = cJson.encode(value)
end
return apioak_shared:set(key, va... |
local techHandler = LazarusMod:GetModule('techhandler')
techHandler:AddAlienBuyNode(kTechId.Silence, kTechId.Veil, kTechId.None, kTechId.AllAliens)
techHandler:AddMaterialOffset(kTechId.Silence, 65)
techHandler:AddTechData({
[kTechDataId] = kTechId.Silence,
[kTechDataCategory] = kTechId.ShadeHive,
[kTechDa... |
-- Queues(0, now, [queue])
-- -----------------------
--
-- Return all the queues we know about, with how many jobs are scheduled, waiting,
-- and running in that queue. If a queue name is provided, then only the appropriate
-- response hash should be returned. The response is JSON:
--
-- [
-- {
-- 'name': 'tes... |
return {
Properties = {
["Name"] = "Forest";
["ImageId"] = "rbxassetid://5132074114";
},
Settings = {
["Background Color"] = Color3.fromRGB(0, 20, 30);
["Built-in Function Color"] = Color3.fromRGB(0, 70, 255);
["Comment Color"] = Color3.fromRGB(0, 170, 127);
["Error Color"] = Color3.fromRGB(255,... |
--[[
Queue data structure implemented in lua
]]
local queue = {};
function queue.new()
local _queue = {};
local first = 0;
local last = -1;
local count = 0;
function _queue.Enqueue(value)
local index = last + 1
last = index
_queue[index] = value
count = count + 1;
end
function _queue.... |
----------------------------------------
--
-- Copyright (c) 2015, 128 Technology, Inc.
--
-- author: Hadriel Kaplan <hadriel@128technology.com>
--
-- This code is licensed under the MIT license.
--
-- Version: 1.0
--
------------------------------------------
-- prevent wireshark loading this file as a plugin
if not ... |
object_tangible_deed_vehicle_deed_vehicle_deed_senate_pod = object_tangible_deed_vehicle_deed_shared_vehicle_deed_senate_pod:new {
}
ObjectTemplates:addTemplate(object_tangible_deed_vehicle_deed_vehicle_deed_senate_pod, "object/tangible/deed/vehicle_deed/vehicle_deed_senate_pod.iff")
|
#!/usr/bin/env lua5.3
local usage = [[
Usage: razorbind.lua scriptfile.lua [script args] < docfile
Processes docfile with @{var} and @!var style substitutions.
scriptfile is evaluated, being passed script args in it's varargs (...) array,
which must then return two instances of a table, function, or nil.
(called res... |
--------------------------------
-- @module MobClickCpp
-- @parent_module umeng
--------------------------------
-- 使用在线参数功能,可以让你动态修改应用中的参数值,<br>
-- 调用此方法您将自动拥有在线更改SDK端发送策略的功能,您需要先在服务器端设置好在线参数.<br>
-- 请在startWithAppkey方法之后调用;<br>
-- param 无.<br>
-- return void.
-- @function [parent=#MobClickCpp] updateOnlineConfig
... |
local _2afile_2a = "fnl/conjure/net.fnl"
local _1_
do
local name_4_auto = "conjure.net"
local module_5_auto
do
local x_6_auto = _G.package.loaded[name_4_auto]
if ("table" == type(x_6_auto)) then
module_5_auto = x_6_auto
else
module_5_auto = {}
end
end
module_5_auto["aniseed/module"... |
-- Created by Elfansoer
--[[
Ability checklist (erase if done/checked):
- Scepter Upgrade
- Break behavior
- Linken/Reflect behavior
- Spell Immune/Invulnerable/Invisible behavior
- Illusion behavior
- Stolen behavior
]]
--------------------------------------------------------------------------------
modifier_venomance... |
------------------------------------------------------------------------------
include "MapEnums"
include "MapUtilities"
------------------------------------------------------------------------------
AssignStartingPlots = {};
------------------------------------------------------------------------------
function Assig... |
local test = require('test')
local Material = Material
local assets = assets
test.suite('Material Library')
test.test('Import demo material', function()
require('materials.demo_lighting')
end)
test.test('clone', function()
local mat1 = require('materials.demo_lighting')
local mat2 = mat1:clone()
mat... |
SILE.hyphenator.languages["sl"] = {}
SILE.hyphenator.languages["sl"].patterns =
{
".av5r",
".di6spo",
".ek3s",
".ek5v",
".is1",
".iz1",
".obi4d",
".ob5it",
".od1",
".po4d5n",
".po4v5s",
".pre6d7n",
".se4k5s",
".si4s",
".st4",
".voz5l",
".voz5n",
".zliz6",
"a1a",
"a1b",
"ab5ba",
"ab6rod",
"a1c",
"ac5ci",
"a1č",
"a1d"... |
function test_colllateral_gas(to, amount)
chainhelper:log("[test_colllateral_gas] to: " .. to .. ", amount: " .. tostring(amount))
chainhelper:update_collateral_for_gas(to, amount)
end |
-- Code created by Kwik - Copyright: kwiksher.com {{year}}
-- Version: {{vers}}
-- Project: {{ProjName}}
--
local _M = {}
--
local _K = require "Application"
--
function _M:pauseFilter(obj)
transition.pause(obj.proxy)
end
--
function _M:resumeFilter(obj)
transition.resume(obj.proxy)
end
--
function _M:play... |
--[[
palPal by HydroNitrogen
Licenced under MIT
Copyright (c) 2018 Wendelstein7 (a.k.a. HydroNitrogen)
See: https://github.com/Wendelstein7/palPal-CC
]]
local palPal = {
["name"] = "palPal",
["author"] = "HydroNitrogen",
["date"] = "2018-08-23",
["version"] = 1,
["url"] = "https://github.com/Wendel... |
require "Assets.LuaScripts.Modulus.UIBase.Base.BaseItem"
require "Assets.LuaScripts.Modulus.UIBase.Base.BaseUI" |
local functions = require("tutorial.functions")
--[==[
--可变长度参数 函数
functions.func("a","b","c")
--多重返回值 函数
local p1,p2 = functions.foo()
print (p1 .. "-" .. p2)
--嵌套函数
local counter = functions.newCounter()
for a = 0,1 do
print(counter())
end
local timer = functions.newTimer(1)
for i = 1,3 do
print(timer())
end
... |
f = Instance.new("Sound", workspace)
f.PlaybackSpeed = 1.2
f.SoundId = "rbxassetid://165010449"
f.Volume = 10
fu = Instance.new("Sound", workspace)
fu.PlaybackSpeed = 1
fu.SoundId = "rbxassetid://165010671"
fu.Volume = 10
fk = Instance.new("Sound", workspace)
fk.PlaybackSpeed = 1
fk.SoundId = "rbxassetid://165010504"
f... |
require "util"
--[[
Worker function for large screenshot feature. See bottom of file for interface.
--]]
local function _large_screenshot(_player, _by_player, _surface, _position, _size, _zoom, _path_prefix, _show_gui, _show_entity_info, _anti_alias)
local pix_per_tile = 32 * _zoom
local max_dist = sett... |
local CFiles = { ".c", ".h" }
Build {
Configs = {
Config {
Name = "generic-gcc",
DefaultOnHost = "linux",
Tools = { "gcc" },
},
Config {
Name = "macosx-gcc",
DefaultOnHost = "macosx",
Tools = { "gcc-osx" },
Env = {
CCOPTS = {
{ '-Wall', '-Werror' },
{ '-g'; Config = "*-*-debug"... |
require("prototypes.linked-chest.entity")
require("prototypes.linked-chest.item")
require("prototypes.linked-chest.recipe")
require("prototypes.linked-chest.technology")
|
function DNPeon_OnEnterCombat(Unit,Event)
Unit:RegisterEvent("DNPeon_Spell", 46000, 0)
end
function DNPeon_Spell(Unit,Event)
Unit:FullCastSpellOnTarget(15572,Unit:GetClosestPlayer())
end
function DNPeon_LeaveCombat(Unit,Event)
Unit:RemoveEvents()
end
function DNPeon_OnDied(Unit,Event)
Unit:RemoveEvents()
end
Re... |
local aliens = {}
aliens.nombre = 0
function aliens:AjouteAlien()
self.nombre = self.nombre + 1
print("Module 2 / Il y a maintenant",self.nombre,"alien(s)")
end
return aliens |
require("strict")
local hook = require("Hook")
-- By using the hook.register function, this function "load_hook" is called
-- ever time a module is loaded with the file name and the module name.
local function sh_quote(text)
return "'" .. string.gsub(text, "'", "'\\''") .. "'"
end
function load_hook(t)
-- t... |
return {
build = {
bkey = "64a44ad0ceeb7d537bc3c164b739e05c",
version = "1.14.0.40618",
},
icons = {
{
file = 132089,
hash = "76ad858b86c7d9875b2f898553c508ff",
name = "ability_ambush",
size = { h = 64, w = 64 },
type = 1,
... |
function Alert(message, callback, lockBackground)
check('s', {message})
local self
local win = Window(0, 0, 500, 280, 'Alert')
:setOnTop()
if lockBackground then
self = Pane(0, 0, screenWidth, screenHeight)
:addChild(win)
else
self = win
end
win:align('center')
win:once('close', function() self:d... |
----
-- Test cases for xlsxwriter.lua.
--
-- Test the conversion of Lua types to Excel types.
--
-- Copyright 2014, John McNamara, jmcnamara@cpan.org
--
local Workbook = require "xlsxwriter.workbook"
local workbook = Workbook:new("test_types12.xlsx")
local worksheet = workbook:add_worksheet()
worksheet:write("A1", ... |
Class = require "lui.class"
Button = require "lui.button"
ToggleButton = Class("ToggleButton", Button)
function ToggleButton:init(values)
Button.init(self, values)
end
return ToggleButton
|
require("entities") |
-----------------------------------
-- Area: Dynamis - Valkurm
-- Mob: Vanguard Trooper
-----------------------------------
mixins =
{
require("scripts/mixins/dynamis_beastmen"),
require("scripts/mixins/job_special")
}
-----------------------------------
function onMobDeath(mob, player, isKiller)
end
|
-- Copyright (c) 2010-present Bifrost Entertainment AS and Tommy Nguyen
-- Distributed under the MIT License.
-- (See accompanying file LICENSE or copy at http://opensource.org/licenses/MIT)
--
-- > OpenSans-Light.ttf
-- Copyright (c) 2011 Steve Matteson
--
-- Licensed under the Apache License, Version 2.0 (the “Licens... |
-- See LICENSE for terms
local mod_EnableMod
-- fired when settings are changed/init
local function ModOptions()
mod_EnableMod = CurrentModOptions:GetProperty("EnableMod")
end
-- load default/saved settings
OnMsg.ModsReloaded = ModOptions
-- fired when option is changed
function OnMsg.ApplyModOptions(id)
if id ==... |
local LSP = {}
local map = require('me.utils').map
local function get_capabilities()
local capabilities = vim.lsp.protocol.make_client_capabilities()
return require('cmp_nvim_lsp').update_capabilities(capabilities)
end
local function on_attach(_, bufnr)
local function buf_set_option(...) vim.api.nvim_buf... |
local json = require 'json'
print(json.parse("\"hello\""))
print(json.parse("'hello'"))
print(json.parse("1234"))
print(json.parse("true"))
print(json.parse("false"))
print(json.parse("null"))
function print_json(arg)
if type(arg) == 'table' then
io.write("{\n")
for k, v in pairs(arg) do
io.write(string.form... |
--Register LAM with LibStub
local MAJOR, MINOR = "LibMsgWin-1.0", 8
local libmw, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not libmw then return end --the same or newer version of this lib is already loaded into memory
local function AdjustSlider(self)
local numHistoryLines = self:GetNamedChild("Buffer"):Ge... |
--
-- 场景分线逻辑, 控制分线负载分配
--
local skynet = require "skynetex"
local cluster = require "cluster"
local conf = require "conf"
-- 场景id、有多少个分线、每个分线最大容纳多少个玩家
local scene_id, line_num, line_max = ...
local service_name = ".scene_blance_"..scene_id
line_max = tonumber(line_max)
local command = {}
local blance = {}
func... |
local playersService = game:GetService("Players")
playersService.PlayerAdded:Connect(function(player)
print(player.Name.. " joined the game.")
end)
playersService.PlayerRemoving:Connect(function(player)
print(player.Name.. " left the game.")
end)
playersService.PlayerAdded:Connect(function(player)
local folder ... |
function EFFECT:Init(data)
local vOffset = data:GetOrigin()
local ent = data:GetEntity()
local dlight = DynamicLight(ent:EntIndex())
if dlight then
dlight.Pos = vOffset
dlight.r = 255
dlight.g = 255
dlight.b = 255
dlight.Brightness = 10
dlight.Size = 512
dlight.DieTime = CurTime() + 0.02
dlight.Dec... |
-- Copyright (C) 2012 Nicholas Carlson
--
-- 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, merge, publi... |
LABEL_POS = {0, 481}
LABEL_SIZE = {800, 19}
GameOverScreen = {
size = {0, 0, 800, 600},
stylesheet = "HW2StyleSheet",
pixelUVCoords = 1,
-- hide the subtitle screen so we can show the exit text, where the subtitles go
onShow = "UI_HideScreen('SubtitleScreen');MainUI_ScarEvent(\"X_TacticalReport_End()\... |
return {'ype','ypes','ypenburgse'} |
local IsAdmin = false
IsInAdminUI = false
_Last_Server_Vehicle_ID_client = nil
_time_text_admin_ui = nil
_time_state_text = nil
function LeaveAdminUI()
ShowMouseCursor(false)
SetIgnoreMoveInput(false)
SetIgnoreLookInput(false)
SetInputMode(INPUT_GAME)
_time_text_admin_ui = nil
_time_state_text... |
--[[------------------------------------------------------
# lens.Popen test
--]]------------------------------------------------------
local lub = require 'lub'
local lut = require 'lut'
local lens = require 'lens'
local core = require 'lens.core'
local should = lut.Test 'lens.Popen'
function should.ha... |
if not modules then modules = { } end modules ['games-hex'] = {
version = 1.000,
comment = "Hex",
author = "Wolfgang Schuster",
copyright = "Wolfgang Schuster",
email = "schuster.wolfgang@googlemail.com",
license = "Public Domain"
}
do
thirddata = thirddata ... |
local ItemTile = script.Parent
local Tile = ItemTile.Parent
local App = Tile.Parent
local UIBlox = App.Parent
local Packages = UIBlox.Parent
local Roact = require(Packages.Roact)
local t = require(Packages.t)
local withStyle = require(UIBlox.Core.Style.withStyle)
local enumerateValidator = require(UIBlox.Utility.enum... |
--
-- premake5 file to build RecastDemo
-- http://premake.github.io/
--
require "lib"
local action = _ACTION or ""
local outdir = action
WorkSpaceInit "acc_svr"
Project "acc"
files {
"../*.sh",
"../*.txt",
"../vs/premake5.lua",
"../bin/**.txt",
"../bin/**.sh",
}
Project "acc_svr"
Inc... |
local _, private = ...
if private.isClassic then return end
--[[ Lua Globals ]]
-- luacheck: globals next select
--[[ Core ]]
local Aurora = private.Aurora
local Base = Aurora.Base
local Hook, Skin = Aurora.Hook, Aurora.Skin
local Color, Util = Aurora.Color, Aurora.Util
do --[[ AddOns\Blizzard_ObjectiveTracker.lua ]... |
local id =
Concord.component(
function(e)
e.value = _util.s.random_string(10)
end
)
return id
|
local lspconfig = require 'lspconfig'
-- require'navigator'.setup()
-- Use ehanced LSP stuff
vim.lsp.handlers['textDocument/codeAction'] =
require'lsputil.codeAction'.code_action_handler
vim.lsp.handlers['textDocument/references'] =
require'lsputil.locations'.references_handler
vim.lsp.handlers['textDocument/d... |
local tdui = include("tdui/tdui.lua")
local state = { sliderFrac = 0.5 }
local bm_t = 0
local bm_c = 0
local bm_avg = 0
local function drawToP(p)
p:Text(string.format("Average render time in past 100 renders: %fms", bm_avg), "!Roboto@18", 10, 260, nil, TEXT_ALIGN_LEFT)
local _zx = 0
local function al... |
--[[- The RFF.ItemGroup class is a super-class for organizing items and sub-groups.
It is not intended be used directly, but provides a common code base for various subclasses
such as `RFF.Firearm.FirearmGroup`, `RFF.Magazine.MagazineGroup`, `RFF.Ammo.AmmoGroup`, etc.
This class is provides the core functionality spa... |
-- XSA DATABASE (XSADB)
-- Copyright 2015
-- XOUT SECURITY AGENCY (XSA)
function wrap(str, limit, indent, indent1) indent = indent or "" indent1 = indent1 or indent limit = limit or 72 local here = 1-#indent1 return indent1..str:gsub("(%s+)()(%S+)()", function(sp, st, word, fi) if fi-here > limit then here = st - #ind... |
-- {{{ Main
local naughty = require("naughty")
local awful = require("awful")
local vicious = require("vicious")
local wibox = require("wibox")
local beautiful = require("beautiful")
local calendar2 = require("calendar2")
local gears = require("gears")
local mywidgets = {}
-- TODO: Add "powersave" mode for widgets
--... |
-- [[
-- Each category can only have one class defined in it
-- max is the maximum number of those animals that can exist anywhere on the
-- map at the same time - including those picked up and dropped by players
-- ]]
AnimalSpawnerManager = {
categories =
{
-- ----------------------------------------------------... |
class("ResetCommanderTalentsCommand", pm.SimpleCommand).execute = function (slot0, slot1)
if not getProxy(CommanderProxy):getCommanderById(slot1:getBody().id) then
return
end
if pg.TimeMgr.GetInstance():GetServerTime() < slot5.abilityTime then
pg.TipsMgr.GetInstance():ShowTips(i18n("commander_reset_talent_time_... |
---------------------------------------------------------------------------------------------
-- Requirement summary:
-- [Policies] "usage_and_error_counts" and "count_of_sync_reboots" update
--
-- Check SDL behavior in case got SDL.OnSystemError("SYNC_REBOOTED")
-- 1. Used preconditions:
-- Start default SDL
-- InitHM... |
object_mobile_dressed_bofa_treat_male_03 = object_mobile_shared_dressed_bofa_treat_male_03:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_bofa_treat_male_03, "object/mobile/dressed_bofa_treat_male_03.iff")
|
-- Translation support
local S = minetest.get_translator("keyring")
keyring.form.register_allowed("keyring:keyring", {
remove_key = true,
rename_key = true,
set_owner = false,
share = false,
title_tab = false,
})
minetest.register_craftitem("keyring:keyring", {
description = S("Keyring"),
inventory_image = "ke... |
-- START:song
notes = {
'D4q',
'E4q',
'D4q',
'G4q',
'Fs4h'
}
-- END:song
-- START:play_song
scheduler = require 'scheduler'
notation = require 'notation'
function play_song()
for i = 1, #notes do
local symbol = notation.parse_note(notes[i])
notation.play(symbol.note, symbol.duration)
... |
--------------------------------------------------------------------
-- This file was automatically generated by ProjectGenerator
-- which is tooling part the build system designed for GUCEF
-- (Galaxy Unlimited Framework)
-- For the latest info, see http://www.VanvelzenSoftware.com/
--
-- The contents of this file... |
-------------------------------------------------------------------------------
-- 登录
-------------------------------------------------------------------------------
local unpack = unpack or table.unpack
local INFO_MSG = tengine.INFO_MSG
local ERROR_MSG = tengine.ERROR_MSG
local p = tengine.p
local BT = require('lib/... |
-- Initialization for YouBot
function sysCall_init()
-- Get YouBot Handle
youBot_handle = sim.getObjectHandle('youBot')
dummy_guider_handle = sim.getObjectHandle('DummyGuider')
-- Prepare initial values for four wheels
wheel_joints = {-1,-1,-1,-1} -- front left, rear left, rear right, front rig... |
local L = require( "lpeg" )
--------------------------------------------------------------------------------
local function extract_pattern( startPoint, endPoint )
startPoint = L.P( startPoint )
endPoint = endPoint and L.P( endPoint ) or startPoint
local between = ( 1 - endPoint )^1
return startPoint * L... |
local char
local accel = 1
local maxSpeed = 20
local distance = 300
local proximity = 250
local angle = 0
local mouseX, mouseY
local pX, pY, speed = 0, 0, 0, 0, 0
function render()
char:SetX(pX)
char:SetY(pY)
SKIN:Bang("!SetOption","Character","RotationAngle",angle)
SKIN:Bang("!UpdateMeter","Character")
end
funct... |
-- https://github.com/airblade/vim-gitgutter
local M = {}
function M.get(spec, config, opts)
local git = spec.git
-- stylua: ignore
return {
GitGutterAdd = { fg = git.add }, -- diff mode: Added line |diff.txt|
GitGutterChange = { fg = git.changed }, -- diff mode: Changed line |diff.txt|
GitGutte... |
local tap = require('util/tap')
local http = require('http')
local HOST = "127.0.0.1"
local PORT = process.env.PORT or 10082
local test = tap.test
--[[
local function bench(uv, p, count, fn)
collectgarbage()
local before
local notify = count / 8
for i = 1, count do
fn()
if (i % noti... |
-- inspect something
-- Taken from https://github.com/jamestthompson3/vimConfig/blob/eeef4a8eeb5a24938f8a0969a35f69c78643fb66/lua/tt/nvim_utils.lua#L106
function inspect(item)
print(vim.inspect(item))
end
|
function GM:CreateLoadoutPanel()
if( self.Loadout and self.Loadout:IsValid() ) then
self.Loadout:Remove();
end
self.Loadout = self:CreatePanel( nil, NODOCK, ScrW(), ScrH() );
self.Loadout:SetPos( 0, 0 );
self.Loadout:SetPaintBackground( true );
self.Loadout:SetBackgroundBlur( true );
self.Loadout:DockPadding... |
kpse.set_program_name("texlua","lualatex")
require("lualibs")
if arg[1] ~= nil then
jfm = arg[1]
else
print("LuaTeX-ja JFM checker.")
print("Usage: texlua check_jfm.lua <JFM name>")
os.exit(0)
end
local file = kpse.find_file("jfm-" .. jfm .. ".lua")
if file == nil then
print("JFM " .. jfm .. " is not found.")
o... |
local Object = require 'libs.classic'
local Grid = Object:extend()
local empty = { skin = "", colour = "" }
local oob = { skin = "", colour = "" }
local block = { skin = "2tie", colour = "A" }
function Grid:new(width, height)
self.grid = {}
self.grid_age = {}
self.width = width
self.height = height
for y = 1, s... |
local function pushWindow(dir)
local win = hs.window.focusedWindow()
if not win then
return
end
if dir == 'left' then
hs.grid.pushWindowLeft(win)
elseif dir == 'right' then
hs.grid.pushWindowRight(win)
elseif dir == 'down' then
hs.grid.pushWindowDown(win)
els... |
local itsOn = false
local thesteps
local numshown = 5
local currentindex = 1
local displayindexoffset = 0
local ratios = {
DiffItemWidth = 60 / 1920,
DiffItemHeight = 40 / 1080,
DiffFrameUpperGap = 282 / 1080, -- from frame top edge to top diff edge
--DiffFrameLeftGap = 407 / 1920, -- this number is provided... |
ACTION{"growl",
ban = { "@spylog.actions.growl", [["SpyLog ban <HOST>" "
Filter: <FILTER>
Jail: <JAIL>
Host: <HOST>
<MSG>"]]};
unban = { "@spylog.actions.growl", [["SpyLog unban <HOST>" "
Filter: <FILTER>
Jail: <JAIL>
Host: <HOST>
<MSG>"]]};
options = {
address = "127.0.0.1";
-- port = "2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.