content stringlengths 5 1.05M |
|---|
-- Animation System
--
local Base = require 'src.entities.systems.base'
local Animation = Base:extend()
-- New
--
function Animation:new(host, data)
Base.new(self, host, { 'axis' })
--
-- properties
self.sprite = Sprite[host.name]
-- set up post-callback
self.sprite:each(function(anim, name)
anim:after... |
-------------------------------------------------------------------------------
-- Sends the logging information through a socket using luasocket
--
-- @author Thiago Costa Ponte (thiago@ideais.com.br)
--
-- @copyright 2004-2021 Kepler Project
--
-------------------------------------------------------------------------... |
local Editor = {}
-- ----------------------------------------------------------------------
-- Fonts
-- ----------------------------------------------------------------------
local defaultFont
if system.IsWindows() then
defaultFont = "Courier New"
elseif system.IsOSX() then
defaultFont = "Monaco"
else
defaultFont... |
----
--
-- A simple program to write some data to an Excel file using the
-- xlsxwriter.lua module.
--
-- This program is shown, with explanations, in Tutorial 1 of the xlsxwriter
-- documentation.
--
-- Copyright 2014-2015, John McNamara, jmcnamara@cpan.org
--
local Workbook = require "xlsxwriter.workbook"
-- Creat... |
--[[
Fast animated 2D mesh using skeletal and shape key (AKA morph target) deformations.
Assets and code by Rafael Navega, 2020.
Version 1.1.0.
]]
io.stdout:setvbuf("no")
--[[
Choice of CPU or GPU skinning:
Uncomment the line below that loads the module that you want to test, and comment the othe... |
-- the judge counter. counts judges
-- judgments to display and the order for them
local jdgT = {
"TapNoteScore_W1",
"TapNoteScore_W2",
"TapNoteScore_W3",
"TapNoteScore_W4",
"TapNoteScore_W5",
"TapNoteScore_Miss",
"HoldNoteScore_Held",
"HoldNoteScore_LetGo",
}
local spacing = GAMEPLAY:... |
local lj = require 'lunajson'
local util = require 'util'
local function test(round)
local saxtbl = {}
local bufsize = round == 1 and 64 or 1
local fp = util.open('test.dat')
local function input()
local s = fp:read(bufsize)
if not s then
fp:close()
fp = nil
end
return s
end
local parser = lj.new... |
object_draft_schematic_furniture_wod_pro_ns_tree_03 = object_draft_schematic_furniture_shared_wod_pro_ns_tree_03:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_furniture_wod_pro_ns_tree_03, "object/draft_schematic/furniture/wod_pro_ns_tree_03.iff")
|
object_tangible_component_droid_combat_module_electric_shocker = object_tangible_component_droid_shared_combat_module_electric_shocker:new {
}
ObjectTemplates:addTemplate(object_tangible_component_droid_combat_module_electric_shocker, "object/tangible/component/droid/combat_module_electric_shocker.iff")
|
local awful = require "awful"
local widgets = require "widgets"
awful.mouse.append_global_mousebindings {
awful.button {
modifiers = {},
button = 3,
on_press = function()
widgets.mainmenu:toggle()
end,
},
awful.button {
modifiers = {},
button = 4,... |
local error_handler = {};
error_handler.dump = function()
(require 'pl.pretty').dump(_G.message_validation_context);
end
error_handler.init = function()
_G.message_validation_context = { fieldpath = { level = 0, path = {} },
status = { set = false;
success = true,
error_no = 0,
... |
-----------------------------------
-- Area: Aht Urhgan Whitegate
-- NPC: Dwago
-- Standard Merchant NPC
-----------------------------------
local ID = require("scripts/zones/Aht_Urhgan_Whitegate/IDs")
require("scripts/globals/shop")
function onTrade(player,npc,trade)
end
function onTrigger(player,npc)
local sto... |
--MCmobs v0.4
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
--dofile(minetest.get_modpath("mobs").."/api.lua")
--###################
--################### SKELETON
--###################
--[[
mobs:register_mob("mobs_mc:35skeleton", {
type = "animal",
passiv... |
-- -----------------------------------------------------------------------------
-- Parse
-- -----------------------------------------------------------------------------
describe('Table.parse', function()
spec('table numberKey', function()
assert.has_subtable({
{
variant = 'numberKey',
val... |
ITEM.name = "Daewoo K2"
ITEM.description = "This rifle was developed by the South Korean Agency for Defense Development and manufactured by S&T Motiv (formerly Daewoo Precision Industries). It is currently the standard service rifle of the Republic of Korea Armed Forces. Fires 5.56x45 rounds."
ITEM.model = "models/weap... |
local class = require "libs.classic"
local _M = class:extend()
function _M:new(hight)
self.hight = hight
end
function _M:IsEmpty()
return self.hight == 0
end
function _M:String()
return string.format("%016x", self.hight)
end
return _M |
if pollws then return end
print("Attempting to link pollws.dll through FFI")
local ffi = ffi or _G.ffi or require("ffi")
ffi.cdef[[
struct pollsocket* pollws_open(const char* url);
void pollws_close(struct pollsocket* ctx);
int pollws_status(struct pollsocket* ctx);
void pollws_send(struct pollsocket* ctx, con... |
--- A module allowing scripts of dialogue to be parsed.
--- @module parser
local scene = require "scene"
local audioHandler = require "audioHandler"
local stringx = require "pl.stringx"
local locked = true
local parser = {}
--- Prompts the player for input between dialogue options.
--- @tparam table tbl The script... |
vim.g.mapleader = ' '
vim.keymap.set('n', '<leader>vr', ':source ~/.config/nvim/init.lua<cr>') -- Refresh
-- Edit configs
vim.keymap.set('n', '<leader>vi', ':edit ~/.config/nvim/init.lua<cr>') -- init.lua
vim.keymap.set('n', '<leader>vk', ':edit ~/.config/nvim/lua/keymaps.lua<cr>') -- keymaps.lua
vim.keymap.set('n', '... |
function Orcshaman_OnCombat(pUnit, event)
pUnit:SendChatMessage(12, 0, "Your dead!")
pUnit:RegisterEvent("Orcshaman_Lightning", 2000, 100)
pUnit:RegisterEvent("Orcshaman_Heal", 3000, 0)
end
function Orcshaman_Lightning(pUnit, event)
pUnit:StopMovement(2100)
pUnit:FullCastSpellOnTarget(37273, pUnit:GetRandomPlayer(1... |
local T, C, L, G = unpack(select(2, ...))
local blankTex = C.media.blankTex
-- specific elements for shaman class.
T.ClassElements["SHAMAN"] = function(self)
-- Additional Power (Elemental - Maelstrom)
if C.unitframes.addpower then
local AddPower = CreateFrame("StatusBar", self:GetName() .. "ShamanMana", self)
... |
if GameSettingsManager == nil then
GameSettingsManager = {}
end
GameSettingsManager.__index = GameSettingsManager
function GameSettingsManager.GetSettings()
return GameSettings.Settings
end
local isClient = Ext.IsClient()
local self = GameSettingsManager
function GameSettingsManager.Apply(sync)
if not isClient and... |
data:extend(
{
{
type = "autoplace-control",
name = "uraninite",
richness = true,
order = "b-e",
category = "resource",
},
{
type = "autoplace-control",
name = "fluorite",
richness = true,
order = "b-f",
category = "resource",
},
}
)
|
local materials = {}
file.CreateDir("rpgm")
function RPGM.GetImgur(id, callback, useproxy)
if materials[id] then return callback(materials[id]) end
if file.Exists("rpgm/" .. id .. ".png", "DATA") then
materials[id] = Material("../data/rpgm/" .. id .. ".png", "noclamp smooth")
return callback(... |
local awful = require 'awful'
client.connect_signal('manage', function(c)
if not awesome.startup then
awful.client.setslave(c)
end
end)
|
--- Applies rules to the economy state, solving conflicts.
-- @classmod RuleSolver
local Heap = require 'ur-proto.heap'
local RuleSolver = require 'common.class' ()
local NOOP = function () end
function RuleSolver:_init(record) -- luacheck: no self
record:new_property('rule', { name = "unknown",
... |
return {
width = 18,
height = 18,
ground = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0,
0, 2, 1, 2, 1, 2, 0, 0, 0, 2, 1, 3, 1, 3, 2, 0, 0, 0,
0, 0, 0, 1, 1, 2, 1, 0, 0, 0, 3, 1, 3, 1, 1, 2, 0, 0,
0, 0, 3, 1, 1, 3, 2, 0, 0, 0, 2, 2, 1, 2, 2, 1... |
math.randomseed(6)
s=Instance.new("Sound",workspace)
s.SoundId='rbxassetid://171217870'
s.Volume=10
s.Looped=true
s:play()
m = false
repeat wait(0)
num1="-"..math.random(0,500).."00000"
num2="-"..math.random(0,500).."00000"
num3="-"..math.random(0,500).."00000"
game.Lighting.FogColor=Color3.new(tonumber(num1),tonumber... |
love.graphics.setDefaultFilter( "nearest", "nearest", 1 )
tween = require"lib/tween"
require"src/init"
MobileAlpha = 0
MobileMode = false
local sys = love.system.getOS()
if sys == "iOS" or sys == "Android" then
MobileMode = true
MobileAlpha = .25
Joystick = require"mobile/joystick":New()
Button = re... |
local player = ...
local pn = ToEnumShortString(player)
local mods = SL[pn].ActiveModifiers
local center1p = PREFSMAN:GetPreference("Center1Player")
if mods.HideScore then return end
if #GAMESTATE:GetHumanPlayers() > 1
and mods.NPSGraphAtTop
and SL.Global.GameMode ~= "StomperZ"
then return end
if #GAMESTATE:GetHuman... |
function love.conf(t)
t.window.width = 320
t.window.height = 40
t.title = "ILoveMP3s Player"
t.window.resizable = true
t.releases = {
title = "ILoveMP3s",
package = "ILoveMP3s",
loveVersion = "0.10.0",
version = "2.0",
author = "iggyvolz",
email = "iggyvolz@gmail.com",
description ... |
object_mobile_dressed_npe_sequencer_secretary = object_mobile_shared_dressed_npe_sequencer_secretary:new {
}
ObjectTemplates:addTemplate(object_mobile_dressed_npe_sequencer_secretary, "object/mobile/dressed_npe_sequencer_secretary.iff")
|
--
-- Autogenerated by Thrift
--
-- DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-- @generated
--
require 'thrift.Thrift'
require 'evernote.types.constants'
PrivilegeLevel = {
NORMAL = 1,
PREMIUM = 3,
VIP = 5,
MANAGER = 7,
SUPPORT = 8,
ADMIN = 9
}
QueryFormat = {
USER = 1,
SEXP =... |
local x
x = function()
return print(what)
end
local _
_ = function() end
_ = function()
return function()
return function() end
end
end
go(to(the(barn)))
open(function()
return the(function()
return door
end)
end)
open(function()
the(door)
local hello
hello = function()
return my(func)
end
end)
local h
h... |
--- === plugins.core.menu.manager ===
---
--- Menu Manager Plugin.
local require = require
local image = require "hs.image"
local menubar = require "hs.menubar"
local config = require "cp.config"
local i18n = require "cp.i18n"
local section = require "section"
local manager = {}
--- plugins.core.m... |
local present, cmp = pcall(require, "cmp")
if not present then
return
end
vim.opt.completeopt = "menuone,noselect"
local icons = {
Text = "",
Method = "",
Function = "",
Constructor = "",
Field = "ﰠ",
Variable = "",
Class = "ﴯ",
Interface = "",
Module = "",
Property... |
#!/usr/bin/lua
-- config
PORT_NAME = "/dev/ttyACM0"
READ_TIMEOUT = 2000 -- in ms
DB_FILE = "/root/laser.db"
COST_PER_MIN = 0.25
USB_PATH = "/sys/bus/usb/devices/usb1/authorized"
UPDATE_INTERVAL = 3600
RETRY_INTERVAL = 300
-- a file with LASER_KEY and WP_KEY API keys defined (not public)
dofile("/root/key.lua")
-- open... |
--[[
Copyright (c) 2010-2015 Matthias Richter
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, publish, dist... |
require "core/game/game"
require "main"
if not init then
init = GameBase.init
end
if not update then
update = GameBase.update
end
if not render then
render = GameBase.render
end
if not shutdown then
shutdown = GameBase.shutdown
end
|
function os.capture(cmd, raw)
local f = assert(io.popen(cmd, 'r'))
local s = assert(f:read('*a'))
f:close()
if (raw) then return s end
s = string.gsub(s, '^%s+', '')
s = string.gsub(s, '%s+$', '')
s = string.gsub(s, '[\n\r]+', ' ')
return s
end
function preinst()
local out = os.capture("ls", 1)
out = out ..... |
local M = {}
function M.getChildrenGraph(node)
local name = ''
if node.getName then
name = node:getName()
end
local ret = {}
if name == '' then
name = tostring(node['.classname']) .. ' | ' .. tostring(node)
end
if node.getChildren then
ret = { name = name, node = nod... |
function test_hash512(str)
result = chainhelper:hash512(str)
chainhelper:log("[test hash512]" .. str .. "--- hash512 --->" .. result)
end |
local ffi = require 'ffi'
local torch = require 'torch'
local utils = require 'pcl.utils'
local pcl = require 'pcl.PointTypes'
local KdTree = torch.class('pcl.KdTree', pcl)
local func_by_type = {}
local function init()
local KdTreeFLANN_method_names = {
'new',
'clone',
'delete',
'setInputCloud',
... |
-----------------------------------------
-- ID: 5583
-- Item: plate_of_patlican_salata_+1
-- Food Effect: 4Hrs, All Races
-----------------------------------------
-- Agility 5
-- Vitality -2
-- Evasion +7
-- hHP +3
-----------------------------------------
require("scripts/globals/status")
require("scripts/globals/ms... |
#!/usr/bin/env lua
-------------------------------------------------------------------------------
-- Description: unit test file for iptable
-------------------------------------------------------------------------------
package.cpath = "./build/?.so;"
describe("iptable.reverse(pfx)", function()
expose("module:... |
while true do
if Hexus.GetKey("E") then
game.Players.LocalPlayer.Character.Humanoid:ChangeState(11)
wait(0.1)
end
end |
C_SocialQueue = {}
---[Documentation](https://wowpedia.fandom.com/wiki/API_C_SocialQueue.GetAllGroups)
---@param allowNonJoinable boolean
---@param allowNonQueuedGroups boolean
---@return string[] groupGUIDs
function C_SocialQueue.GetAllGroups(allowNonJoinable, allowNonQueuedGroups) end
---[Documentation](https://wow... |
--[[
BitFields - efficient bit packing
1.0
by: Chris
This is a small library for handling efficient bit packing. It allows
you to create bitfield objects, which are effectively infinite-sized sparse
arrays of bits.
See Bitfields_HowTo for usage instructions, and Bitfields_Sample for some
sample code usin... |
return {
hand_left = {
{ {-1, 41}, {8, 35}, {5, 38}, {-3, 37}, {0, 0}, {-1, 41}, {-1, 41}, {10, 40}, {7, 38}, {7, 34}, {1, 41}, {-7, 38}, },
{ {3, 39}, {9, 37}, {6, 39}, {-8, 38}, {0, 0}, {3, 39}, {3, 39}, {-6, 38}, {-9, 38}, {-9, 33}, {0, 41}, {-4, 38}, },
{ {10, 30}, {0, 0}, {0, 0}, {11, 38}, {11,... |
function main_character_select()
love.audio.stop()
stop_the_music()
bg = charselect
local map = {}
-- -------------------------------------------------------
-- 2P Network VS
-- -------------------------------------------------------
if character_select_mode == "2p_net_vs" then
local opponent_connected = fa... |
--KibbleChat v3 --
--by Kibblebit --
--www.ac-web.org--
local ChatMsg = "#coldchat"
-- KibbleChat
function ChatSystem (event, player, message, type, language)
if (message:find(ChatMsg.." ") == 1) then
local text = message:gsub(ChatMsg.." ", "")
for k, v in pairs(GetPlayersInWorld()) do
if (player:GetTeam(... |
--ZFUNC-flatten-v1
local function flatten( arr, shallow ) --> flatarr
local flatarr = {}
for _, v in ipairs( arr ) do
if shallow or type( v ) ~= 'table' then
table.insert( flatarr, v )
else
for _, sub_v in ipairs( flatten( v ) ) do
table.insert( flatarr, sub_v )
... |
Talk(2, "找到七心海棠了吗?自己不行的话就多带些人去找.", "talkname2", 0);
do return end;
|
AddCSLuaFile()
ENT.Type = "anim"
ENT.Base = "base_gmodentity"
ENT.Category = "baristaner Quidditch"
ENT.PrintName = "Takim A Sayac"
ENT.Author = ""
ENT.Spawnable = true
ENT.AdminSpawnable = false
topspawnla = Vector(-9808.903320, 5610.830078, -63.968750)
if SERVER the... |
--[[-------------------------------------------------------------------]]--[[
Copyright wiltOS Technologies LLC, 2020
Contact: www.wiltostech.com
----------------------------------------]]--
wOS = wOS or {}
wOS.SkillTrees = wOS.Skil... |
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg)... |
--[[
-- added by wsh @ 2017-12-05
-- 本地化工具类
--]]
local LangUtil = {}
local function GetData(path, lang)
-- TODO:根据语言设置自动切换各语言源表
return require(path)
end
local function GetServerName(server_id)
local data = GetData("Config.Data.ServerLang")
if data[server_id] == nil then
return "["..server_id.."]"
end
return ... |
-- Native file dialog premake5 script
newoption {
trigger = "nfd_linux_backend",
value = "B",
description = "Choose a dialog backend for NFD on linux",
allowed = {
{ "gtk3", "GTK 3 - link to gtk3 directly" },
{ "zenity", "Zenity - generate dialogs on the end users machine with zenity" }
... |
---
-- Stream interface
---
Stream = {
'get',
'unget',
'source',
'lines',
'close'
}
|
-- example config for firefox sandbox, which is created dynamycally from host environment.
-- xpra x11-forwarding software (must be installed on host, v2.0 and up) may be used to isolate sanbox from host x11 service.
-- opengl acceleration untested and may not work (especially with xpra mode or when using proprietary v... |
object_ship_ixiyen_s01_tier10 = object_ship_shared_ixiyen_s01_tier10:new {
}
ObjectTemplates:addTemplate(object_ship_ixiyen_s01_tier10, "object/ship/ixiyen_s01_tier10.iff")
|
local IslandsQueueUI =
{
Name = "IslandsQueue",
Type = "System",
Namespace = "C_IslandsQueue",
Functions =
{
{
Name = "CloseIslandsQueueScreen",
Type = "Function",
},
{
Name = "GetIslandDifficultyInfo",
Type = "Function",
Returns =
{
{ Name = "islandDifficultyInfo", Type = "table", In... |
-- User Interface stuff using SUIT lib >
local suit = require('libs.suit')
local cfg = require('code.simconfig')
local sim = require('code.simulation')
local apiG = love.graphics
local map = require('code.map')
local ui = {}
local cmul = cfg.colorMul
suit.theme.color = {
normal = {bg = { 66*cmul, 66*cmul, 66*cmul... |
local local0 = 0.9
local local1 = 0.9 - local0
local local2 = 0.9 - local0
local local3 = 0.9 - local0
local local4 = 0.9 - local0
local local5 = 0.9 - local0
local local6 = 3 - local0
local local7 = 0.9 - local0
local local8 = 0.9 - local0
local local9 = 4.3 - local0
local local10 = 0.9 - local0
local local11 = 0.9 - ... |
--[[
Properties.lua
Serves a few different flavors of properties (name-value pairs).
--]]
local Properties, dbg, dbgf = Object:newClass{ className = 'Properties' }
local sharedProperties
local propsForPlugin
local propsForPluginSpanningCatalogs = {}
--- Constructor for extending class.
-... |
test_run = require('test_run').new()
REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
test_run:create_cluster(REPLICASET_1, 'storage')
test_run:create_cluster(REPLICASET_2, 'storage')
util = require('util')
util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait... |
return {
init_effect = "",
name = "基洛夫燃烧",
time = 8,
picture = "",
desc = "持续伤害+易伤效果",
stack = 1,
id = 346,
icon = 346,
last_effect = "Darkness",
effect_list = {
{
type = "BattleBuffDOT",
trigger = {
"onUpdate"
},
arg_list = {
attr = "cannonPower",
exposeGroup = 1,
time = 2,
... |
local M = {}
local supported_configs = {
vim.fn.stdpath "config",
vim.fn.stdpath "config" .. "/../astronvim",
}
local g = vim.g
local function file_not_empty(path)
return vim.fn.empty(vim.fn.glob(path)) == 0
end
local function load_module_file(module)
local found_module = nil
for _, config_path in ipairs(... |
return {
W1EarlyCommand = cmd(finishtweening;shadowlength,0;y,0;diffusealpha,1;zoom,0.9*1.2;smooth,0.05;zoom,0.75*1.2;sleep,0.8;smooth,0.1;zoomy,0.5*1.2;zoomx,1.3*1.2;diffusealpha,0;glowblink;effectperiod,0.05;effectcolor1,color("1,1,1,0");effectcolor2,color("1,1,1,0.25"));
W1LateCommand = cmd(finishtweening;sh... |
object_mobile_space_comm_gotal_bandit_04 = object_mobile_shared_space_comm_gotal_bandit_04:new {
}
ObjectTemplates:addTemplate(object_mobile_space_comm_gotal_bandit_04, "object/mobile/space_comm_gotal_bandit_04.iff")
|
ITEM.name = "Respite Survival Guide"
ITEM.desc = "A guide written by a Drifter based on his own experiences."
ITEM.uniqueID = "book_walker1"
ITEM.price = 0
ITEM.flag = "3"
ITEM.iconCam = {
pos = Vector(0, 200, 6),
ang = Angle(0, 270, 0),
fov = 4.5,
}
ITEM.contents = [[
<h1>The Survival Guide to the Respite.</h1>
... |
-- script for npc in buya
spy_hwan = {
on_spawn = function(mob)
mob.side = 2
mob:sendSide()
end,
on_healed = function(mob, healer)
end,
on_attacked = function(mob, attacker)
if attacker.gmLevel == 99 then
mob_ai_basic.on_attacked(mob, attacker)
end
end,
move = function(mob, target)
end,
attack =... |
for i,v in ipairs({
{758,-307.54254,1405.84741,70.75149,0,0,0,0,0,0, false},
{622,-311.83835,1405.91687,65.93539,0,0,270,0,0,0, false},
{622,-309.4436,1407.83691,68.90253,0,0,213.75,0,0,0, false},
{622,-304.70761,1406.80017,67.50552,0,0,101.25,0,0,0, false},
{647,-308.26709,1405.85205,71.3... |
ESX = nil
local IsMorgued, unmorgued, MorgueTime, morgueTimer, GraveyardLocation = false, false, 0, 0, Config.GraveyardLocation
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
while ESX.GetPlayerData().job == nil... |
--[[
/////// //////////////////
/////// PROJECT: MTA iLife - German Fun Reallife Gamemode
/////// VERSION: 1.7.2
/////// DEVELOPERS: See DEVELOPERS.md in the top folder
/////// LICENSE: See LICENSE.md in the top folder
/////// /////////////////
]]
--
-- Created by IntelliJ IDEA.
-- User: Noneatme
-- Date: 25.0... |
local buf_set_option = function(bufnr, ...)
vim.api.nvim_buf_set_option(bufnr, ...)
end
local buf_set_keymap = function(bufnr, ...)
vim.api.nvim_buf_set_keymap(bufnr, ...)
end
local on_attach = function(client, bufnr)
buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
local opts = { noremap = true, ... |
local condition = Condition(CONDITION_OUTFIT)
condition:setOutfit({lookType = 267})
condition:setTicks(-1)
function onStepIn(creature, item, position, fromPosition)
if not creature:isPlayer() then
return false
end
creature:addCondition(condition)
return true
end
function onStepOut(creature, item, position, fro... |
local state = require("loaded_state")
local device = {_enabled = true, _type = "device"}
function device.filedropped(file)
local filename = file:getFilename()
state.loadFile(filename)
end
return device |
-- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE.
-- Rexx LPeg lexer.
local l = require('lexer')
local token, word_match = l.token, l.word_match
local P, R, S = lpeg.P, lpeg.R, lpeg.S
local M = {_NAME = 'rexx'}
-- Whitespace.
local ws = token(l.WHITESPACE, l.space^1)
-- Comments.
local line_com... |
local moses = require 'moses'
local say = require 'say'
local Vector = require 'stuart-ml.linalg.Vector'
local isInstanceOf = function(x, type)
if not moses.isTable(x) or x.isInstanceOf == nil then return false end
return x:isInstanceOf(type)
end
local registerAsserts = function(assert)
-----------------------... |
local D= require "diapers"
D()
|
--
-- Please see the license.html file included with this distribution for
-- attribution and copyright information.
--
function onSourceUpdate()
local nodeWin = window.getDatabaseNode();
local nType = DB.getValue(nodeWin, "type", 0);
local sAttackStat = DB.getValue(nodeWin, "attackstat", "");
local ... |
function LmMinion.VersionMigrationAdapter.migrate()
-- migration von x zu 1.2
if type(LmMinion.Options.minionAdventureLength) == "string" then
-- es sollte table sein!
LmMinion.Options.minionAdventureLength = LmMinion.PossibleAdventureLength[2]
-- ausgabe durchfuehren
print("A... |
-------------------------------------------------------------------------------------------------------------------------------------------------------------
-- VEAF spawnable aircrafts editor tool for DCS World
-- By Zip (2021)
--
-- Features:
-- ---------
-- * This tool processes a mission and update flight plans.
--... |
---------------------------------------------------------------------
-- Project: irc
-- Author: MCvarial
-- Contact: mcvarial@gmail.com
-- Version: 1.0.0
-- Date: 31.10.2010
---------------------------------------------------------------------
local tabs = {}
local edits = {}
local memos = {}
local messages = {}
loca... |
-- Copyright 2021 SkyTheCodeMaster - All Rights Reserved.
-- TODO: Add async mode.
-- TODO: Replace file print with progress bar.
local expect = require("cc.expect").expect
-- Parse a `requirements.json` local file, or url.
local requirementsFile = ...
local function hread(url)
local h,err = http.get(url)
if no... |
object_draft_schematic_space_reverse_engineering_droid_interface_scanner = object_draft_schematic_space_reverse_engineering_shared_droid_interface_scanner:new {
}
ObjectTemplates:addTemplate(object_draft_schematic_space_reverse_engineering_droid_interface_scanner, "object/draft_schematic/space/reverse_engineering/dro... |
data:extend(
{
{
type = "item",
name = "solder-alloy",
icon = "__Engineersvsenvironmentalist__/graphics/icons/metalworking/alloys/solder-plate.png",
flags = {"goes-to-main-inventory"},
subgroup = "alloy-processing",
order = "solder",
stack_size = 200
},
{
t... |
_G.build_mirror = {}
_G.minetest = {
registered_nodes = {}
}
dofile("./rotate_node.lua")
dofile("./functions.lua")
local function pos_to_string(pos)
return pos.x .. "/" .. pos.y .. "/" .. pos.z
end
describe("get_mirrored_positions", function()
it("returns the proper coordinates", function()
local test_set = {
... |
local augroup = vim.api.nvim_create_augroup
local autocmd = vim.api.nvim_create_autocmd
local utils = require("utils")
-- Do not use smart case in command line mode, extracted from
-- https://vi.stackexchange.com/a/16511/15292.
-- You can dynamically toggle smartcase using autocmds,
-- so when in a : command line, it i... |
for l, e in pairs({
(function(e, ...)
local F = "This file was obfuscated using PSU Obfuscator 4.0.A | https://www.psu.dev/ & discord.gg/psu";
local b = e[((#{
49;
894;
769;
433;
} + 364094226))];
local U = e['MDFgDmBDv'];
local C = e[(783948268)];
local V = e[((#{
(function(...)
return ... |
slot0 = class("TaskMediator", import("..base.ContextMediator"))
slot0.ON_TASK_SUBMIT = "TaskMediator:ON_TASK_SUBMIT"
slot0.ON_TASK_GO = "TaskMediator:ON_TASK_GO"
slot0.TASK_FILTER = "TaskMediator:TASK_FILTER"
slot0.ON_SUBMIT_WEEK_PROGREE = "TaskMediator:ON_SUBMIT_WEEK_PROGREE"
slot0.ON_BATCH_SUBMIT_WEEK_TASK = "TaskMed... |
-- Simple example for Raspberry Pi GPIO module.
-- Blinks GPIO 0 (LED + resistor to 0V) and shows input status of GPIO 6.
-- Written by Mike Pall. Public domain.
local gpio = require("rpi.gpio")
for i=1,10 do
print("GPIO 6:", gpio.pin[6])
gpio.pin[0] = 1
gpio.msleep(100)
gpio.pin[0] = 0
gpio.msleep(100)
end... |
-----------------------------------
-- Area: Abyssea-Konschtat
-----------------------------------
require("scripts/globals/keyitems")
require("scripts/globals/zone")
-----------------------------------
zones = zones or {}
zones[tpz.zone.ABYSSEA_KONSCHTAT] =
{
text =
{
ITEM_CANNOT_BE_OBTAINED = 6382, ... |
print("[II]", "Loading core library...")
EXPR_Parser.binaryFuncs["+"] = function ( opStack, andStack )
local b = andStack:pop()
local a = andStack:pop()
local result = { type="COLLECTION", value={} }
if( a and b ) then
-- String concatination
if( type(a.value) == "string" or type(b.value) == "string" ) the... |
screen = {}
screen.fadeOut = function(ms)
host_fadeOutScreen(ms)
sleep(ms)
end
screen.fadeIn= function(ms)
host_fadeInScreen(ms)
sleep(ms)
end |
require 'apc' -- For test code
params = {}
setParams()
-- params.num_classes = 44
local allClasses, allClassesNames = getClassInfo()
local allMetrics = {}
for k,v in pairs(allClassesNames) do
allMetrics[v] = {p={}, r={}} -- precision, recall for this class
end
initAPCSegmentation()
loadSegmentationModel()... |
local pretty = require("pl.pretty")
local test = require("pl.test")
local Account = require("core.Account")
---@type Account
local acc = Account({ username = "test", password = "wouinibaba" })
acc:addCharacter("char1")
test.asserteq(acc:getUsername(), "test")
test.asserteq({
username = "test",
password... |
--[[
This file is part of script complex Properties Ribbon
Copyright (c) 2020-2021 outsidepro-arts
License: MIT License
]]--
-- Proposed humanbeing representations
local representation = {}
representation.db = setmetatable({},
{__index = function(self, key)
local shouldsilencePositive = false
if key < 0 then
key = ... |
return Def.ActorFrame {
ScreenChangedMessageCommand=function(self) self:visible(SCREENMAN:GetTopScreen():GetScreenType() ~= 'ScreenType_Attract') end,
loadfile(THEME:GetPathB("ScreenSystemLayer","aux"))(),
Def.Sprite{
Texture=THEME:GetPathG("","credits"),
InitCommand=function(self) self:xy(SCREEN_CENTER_X,S... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.