content stringlengths 5 1.05M |
|---|
local cmds = {
['TextYankPost'] = {
callback = function()
vim.highlight.on_yank({ higroup = 'Visual', timeout = 200 })
end,
group = vim.api.nvim_create_augroup('YankHighlight', { clear = true }),
},
['FileType'] = {
callback = function()
for _, v in pairs({ 'wrap', 'spell' }) do
... |
local skynet = require "skynet"
local sprotoloader = require "common.sprotoloader"
local print_r = require "common.print_r"
require "common.util"
ErrorCode = require "game.config.ErrorCode"
local Dispatcher = require "game.util.Dispatcher"
skynet.register_protocol {
name = "client",
id = skynet.PTYPE_CLIENT,
unpack... |
operat1 = {"sum", "difference"}
operat2 = {"sum", "difference"}
operat3 = {"increased", "decreased"}
|
function widget:GetInfo()
return {
version = "8",
name = "BG color",
desc = "BG Color",
author = "Nixtux",
date = "Apr 16, 2017", --last change August 29,2009
license = "GNU GPL, v2 or later",
layer = 0,
enabled = true,
}
end
local glReadPixels = gl.ReadPixels
local glTexture = gl... |
require 'cudnn'
require 'cunn'
local SpatialConvolution = cudnn.SpatialConvolution--lib[1]
local SpatialMaxPooling = cudnn.SpatialMaxPooling--lib[2]
-- from https://code.google.com/p/cuda-convnet2/source/browse/layers/layers-imagenet-1gpu.cfg
-- this is AlexNet that was presented in the One Weird Trick paper. http://... |
local AceLocale = LibStub("AceLocale-3.0")
local L = AceLocale:NewLocale( "ServTr", "ruRU" )
if not L then return end
--global things
L[" loaded. Type /servtr for help."] = " загружен. Введите /servtr для помощи."
-- article for connecting item with random bonus: sword of the Whale
L[" of "] = " с "
--databases... |
local name, SPELLDB = ...
SPELLDB.PRIEST = {}
SPELLDB.PRIEST.DISCIPLINE = {}
SPELLDB.PRIEST.HOLY = {}
SPELLDB.PRIEST.SHADOW = {}
SPELLDB.PRIEST.DISCIPLINE.spells = {
208683,
528 --[[Dispel Magic--]],
586 --[[Fade--]],
73325 --[[Leap of Faith--]],
1706 --[[Levitate--]],
32375 --[[M... |
function Header(el)
if el.level == 1 then
return {}
end
end |
-----------------------------------
-- Area: West Sarutabaruta
-- NPC: Signpost (18 total)
-----------------------------------
local ID = require("scripts/zones/West_Sarutabaruta/IDs")
-----------------------------------
function onTrade(player, npc, trade)
end
function onTrigger(player, npc)
local offset = npc:... |
-- only works for Lua 5.3+, needs 64 bit integer support
for num = math.floor(math.sqrt(10203040506070809)),
math.floor(math.sqrt(19293949596979899)) do
if num % 10 == 3 or num % 10 == 7 then
num_square = string.format("%d", num * num)
if num_square:match("1%d2%d3%d4%d5%d6%d7%d8%d9") then
... |
-- Monster functions base config script
-- IT'S NOT A GOOD IDEA TO CHANGE THINGS IN HERE UNLESS
-- YOU KNOW WHAT YOU'RE DOING, but reading this file over
-- is a good way to get to know how DSB works.
-- These functions are not called by the engine directly,
-- but they are used by objects and so you should be c... |
-- Housing prices to sell to bank
-- Divide the number by 10, then divide the house price by the result
-- Rate: 888 (88.8%)
-- Fluctuation: 100 (10%)
Housing = {
rate = 90, fluc = 10, default = {rate = 90, fluc = 10}, old = {},
}
function getHouseRate()
return Housing.rate, Housing.fluc
end
function setHouseRate(... |
AddCSLuaFile "shared.lua"
include "shared.lua"
local urllib = url
local APIKey = MediaPlayer.GetConfigValue('twitch.client_id')
local MetadataUrl = "https://api.twitch.tv/kraken/videos/%s?client_id=%s"
local function OnReceiveMetadata( self, callback, body )
local metadata = {}
local response = util.JSONToTable(... |
return {
-- Get an entry from a list for a given detail level
--
-- textures: An array of textures
-- detail: The detail level
--
-- Returns the entry at detail, or the last entry if detail is out-of-bounds
get_clamped = function(textures, detail)
return textures[math.min(detail, #te... |
local class = require('middleclass')
local Controller = require('mvc.Controller')
local HasSignals = require('HasSignals')
local BindPhoneController = class("BindPhoneController", Controller):include(HasSignals)
local tools = require('app.helpers.tools')
local smssdk = nil
if device.platform == 'ios' or device.platfor... |
vim.api.nvim_set_keymap('n', 'U', ':<C-u>GundoToggle<CR>', {noremap = true})
|
--[[
© CloudSixteen.com do not share, re-distribute or modify
without permission of its author (kurozael@gmail.com).
Clockwork was created by Conna Wiles (also known as kurozael.)
http://cloudsixteen.com/license/clockwork.html
--]]
local Clockwork = Clockwork;
local pairs = pairs;
local surface = surface;
local t... |
local module = {}
module.__index = module
module.New = function(data)
local object = setmetatable({}, module)
local indent = data["indent"] or 0.03
local ySizeScale = data["ySizeScale"] or 1
local ySizeOffset = data["ySizeOffset"] or 0
local backgroundTransparency = data["backgroundTransparency"] or 1
local ba... |
local migration = {}
function migration.subfactory(subfactory)
for _, floor in pairs(Subfactory.get_all_floors(subfactory)) do
for _, line in pairs(Floor.get_in_order(floor, "Line")) do
local beacon = line.beacon
if beacon ~= nil then beacon.module.parent = beacon end
end
... |
local M = {}
M.bounds_min = vmath.vector3(-0.500116467476, -0.414396524429, -0.125)
M.bounds_max = vmath.vector3(0.50012075901, 0.414601504803, 0.125)
M.size = vmath.vector3(1.00023722649, 0.828998029232, 0.25)
return M
|
function replySms ( playerSource, commandName, ... )
local msg = table.concat({...}, " ")
triggerClientEvent ( playerSource, "onSMS", playerSource, msg )
end
addCommandHandler ( "r", replySms ) |
local assert, type, setmetatable = assert, type, setmetatable
local check_rule = {__index = {
validate = function(self, value, model, translations)
return self.rule(value, model, translations)
end
}
}
return function(rule)
assert(
type(rule) == 'function',
"bad argument 'rule' (fun... |
local Globals = require("vr-radio-helper.globals")
local Datarefs = require("vr-radio-helper.state.datarefs")
local NumberSubPanel = require("vr-radio-helper.components.panels.number_sub_panel")
local SpeakNato = require("vr-radio-helper.components.speak_nato")
local Config = require("vr-radio-helper.state.config")
lo... |
local gears = require("gears")
local keymap = require("keymap")
root.buttons(keymap.globalbuttons())
root.keys(
gears.table.join(
keymap.bindtotags(keymap.globalkeys()),
keymap.mediakeys(),
keymap.userkeys(),
keymap.statusbarkeys()
)
)
|
-- RP Tags
-- by Oraibi, Moon Guard (US) server
-- ------------------------------------------------------------------------------
--
-- This work is licensed under the Creative Commons Attribution 4.0 International
-- (CC BY 4.0) license.
local RPTAGS = RPTAGS;
local addOnName, ns = ...;
local Module =... |
--[[
@Date : 2016-07-27 17:01:21
@Author : DengSir (ldz5@qq.com)
@Link : https://dengsir.github.io
@Version : $Id$
]]
BuildEnv(...)
DataLoader = Addon:NewModule('DataLoader', 'AceEvent-3.0')
function DataLoader:OnInitialize()
self.co = nil
self.list = {}
self:RegisterMessage('COL... |
local T = {}
--[[
Q.mink() alias wrapper
Q.mink() : returns minimum k values of input vector
2 usages of mink():
1)Q.mink(x, y):
which returns two vectors with minimum k values from first input vector
and corresponding y values from second input vector
-- Input arguments: x and y are of type 'l... |
local public = {}
local Config = require('config')
local Trigger = GetMainConfig("trigger")
local Commands = require('./commands')
local Special = require('./special')
local Defaults = {"help","quit","debug"}
local Tokens = {}
local out_message, out_author, out_repeat
local logger ... |
--[[
Name: "sv_enum.lua".
Product: "kuroScript".
--]]
-- Set some information.
PREC_NIGHT_TIME_RAIN = 1;
PREC_DAY_TIME_RAIN = 2;
PREC_EVENING_RAIN = 3;
PREC_MORNING_RAIN = 4;
PREC_STORM_RAIN = 5;
-- Set some information.
DAY_LENGTH = 1440;
NOON_EXACT = 720;
DAWN_EXACT = 360;
DUSK_EXACT = 1080;
DAWN_START = 216;
DUSK_... |
--GPU: Miscellaneous Things.
--luacheck: push ignore 211
local Config, GPU, yGPU, GPUVars, DevKit = ...
--luacheck: pop
local events = require("Engine.events")
local MiscVars = GPUVars.Misc
local RenderVars = GPUVars.Render
--==System Message==--
MiscVars.LastMSG = "" --Last system message.
MiscVars.LastMSGTColor ... |
function start (song)
print("Song: " .. song .. " BPM " .. bpm .. " downscroll: " .. downscroll)
end
function update (elapsed)
for i = 0, 3 do
tweenPosYAngle(i, _G['defaultStrum'..i..'X'] - 900,getActorAngle(i) + 0, 0.1, 'setDefault')
end
end
function beatHit (beat) --zooming cuz why not
if beat... |
require("moonsc").import_tags()
-- Make sure sendid is blank in a non-error event
return _scxml{ initial="s0", name="machineName",
_state{ id="s0",
_onentry{ _send{ event="foo" }},
_transition{ event="foo", cond="_event.sendid==nil", target="pass" },
_transition{ event="*", target="fail" },
... |
-----------------------------------
--
--
--
-----------------------------------
require("scripts/globals/status")
-----------------------------------
function onEffectGain(target,effect)
--NOTE: The power amount dictates the amount to REDUCE MAX VALUES BY. E.g. Power=75 means 'reduce max hp/mp by 75%'
target:... |
---------------------------------------------------
-- Licensed under the GNU General Public License v2
-- * (c) 2010, Adrian C. <anrxc@sysphere.org>
---------------------------------------------------
-- {{{ Grab environment
local tonumber = tonumber
local io = { lines = io.lines }
local setmetatable = setmetatable
... |
--author Himanshu Sharma
local CustomCodeService = {}
local RestConnector = require("App42-Lua-API.RestConnector")
local App42Service = require("App42-Lua-API.App42Service")
local App42API = require("App42-Lua-API.App42API")
local App42Log = require("App42-Lua-API.App42Log")
local Util = require("App42-Lua-API.Util")
... |
--[[Copyright © 2014, trv
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 the following dis... |
local helpers = require "spec.helpers"
local ssl_fixtures = require "spec.fixtures.ssl"
local fixtures = {
dns_mock = helpers.dns_mock.new(),
http_mock = {
upstream_mtls = [[
server {
server_name example.com;
listen 16798 ssl;
ssl_certificate ../spec/fixtures/mtls_c... |
--[[
Copyright (C) Udorn (Blackhand)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the... |
intervals={
{'seconds',1}, --the '1' should never really get used but
{'minutes',60},
{'hours',60},
{'days',24},
}
positions={}
for i=1,4 do
positions[intervals[i][1]]=i
end
function convert_to(value, sourceunits, targetunits)
local sourcei, targeti = positions[sourceunits], positions[targetunits]
--as... |
LU = class(function(f)
end)
function LU.factor(a, pivot, m, n)
local min_m_n = m < n and m or n
for j=1,min_m_n do
local jp, t = j, math.abs(a[j][j])
for i=j+1,m do
local ab = math.abs(a[i][j])
if ab > t then
jp = i
t = ab
end
... |
return {
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
desc_get = "",
name = "加斯科涅μ2",
init_effect = "",
time = 0,
color = "red",
picture = "",
desc = "",
stack = 1,
id = 12790,
icon = 12790,
last_effect = "",
effect_list = {
{
type = "BattleBuffCastSkill",
trigger = {
"onStartGame"
},
... |
-----------------------------------
--
-- Zone: FeiYin (204)
--
-----------------------------------
local ID = require("scripts/zones/FeiYin/IDs")
require("scripts/globals/conquest")
require("scripts/globals/keyitems")
require("scripts/globals/missions")
require("scripts/globals/treasure")
require("scripts/globals/ques... |
local utils = require "typesystem_utils"
-- Define a member variable of a class or a structure
function defineMemberVariable(
node, descr, context, typeId, refTypeId, name)
local memberpos = context.structsize or 0
local index = #context.members
local subst = {index=index, type=descr.llvmtype}
... |
-- Copyright 2008-2020 Tim Waters
-- Copyright 2020 Google LLC
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required ... |
CHI_TECH_DIR = os.getenv("CHI_TECH_DIR")
--############################################### Setup mesh
chiMeshHandlerCreate()
if (N==nil) then N=10; end
dx = 1.0/N
nodesx={}
for k=1,(N+1) do
nodesx[k] = 0.0 + (k-1)*dx
end
umesh = chiMeshCreateUnpartitioned2DOrthoMesh(nodesx,nodesx)
region1 = chiRegionCreate()
ch... |
local Minimal = game:GetService("ReplicatedStorage"):WaitForChild("Minimal")
local Commands = Minimal:WaitForChild("Commands")
local Events = Minimal:WaitForChild("Events")
local API = require(Minimal.MinimalAPI)
local Configuration = require(Minimal.Configuration)
local Execute = Events.Execute
local SN = Events.Se... |
fx_version 'cerulean'
games { 'gta5' }
author 'Sander#2211'
description 'a keybind UI'
client_scripts {
'client.lua',
'config.lua'
}
server_scripts {
'server.lua',
'config.lua'
}
ui_page ('ui/ui.html')
files {
'ui/ui.html',
'ui/style.css',
'ui/font/LEMONMILK-Regular.o... |
EXPORT_ASSERT_TO_GLOBALS = true
-- Unit testing starts
package.path = package.path .. ";../source/?.lua"
package.path = package.path .. ";../luaunit-master/?.lua"
--package.path = package.path .. ';../luaunit-master/luaunit.lua'
require('luaunit')
--require('/home/daniel/dojo/caixaEletronico/luaunit-master/luaunit.lu... |
local Event = require("api.Event")
local Midi = require("mod.midi.api.Midi")
local Rand = require("api.Rand")
data:add_multi(
"base.config_option",
{
{ _id = "enable_randomness", type = "boolean", default = false },
}
)
local function trigger_note_on_chara_moved(chara, params)
if not config.midi.ena... |
---@meta
resty_string={}
function resty_string.to_hex(s) end
resty_string._VERSION="0.11"
function resty_string.atoi(s) end
return resty_string |
local h
script.Parent.ChildAdded:Connect(function()
h = script.Parent.Occupant
if h:IsA("Humanoid") then
for i,v in pairs(h.Parent:GetChildren()) do
if v:IsA("BasePart") or v:IsA("MeshPart") then
v.CollisionGroupId = 1
end
end
end
end)
script.Parent.ChildRemoved:Connect(function()
if h:IsA("Humanoid... |
--[[************************************************************
______ __ __ ______ __ ______ __ __
/\ ___\/\ \/\ \ /\ ___\ /\ \ /\ __ \ /\ "-.\ \
\ \ __\\ \ \_\ \\ \___ \\ \ \\ \ \_\ \\ \ \-. \
\ \_\ \ \_____\\/\_____\\ \_\\ \_____\\ \_\\"\_\
\/_/ \/_____/ \/_____/ \/_... |
--[[
HA_CONNECTOR by SuSuDaddy
Latest : 2020.03.30
[TYPE]
- ON_OFF: 일반 스위치 타입
- FAN_SPEED: SPEED를 가진 FAN_RS485
- COVER_POSISION: 블라인드, 커튼
- AIR_CONDITIONER: 에어컨
]]
_APP = {version = "v0.1", name = "HA_CONNECTOR", logLevel = "debug"}
_DEVICE ={
{ DEVICE_ID = 107, ENTITY_ID = 'light.kocom_livingroom_light1', TYPE = 'O... |
ITEM.name = "Ammo Crate"
ITEM.description= "A small wooden box containing some ammunition. It seems to be a good variety of calibers."
ITEM.model = "models/lostsignalproject/items/misc/small_wood_box.mdl"
ITEM.width = 2
ITEM.height = 2
ITEM.flag = "A"
ITEM.exRender = true
ITEM.iconCam = {
pos = Vector(277.5879516601... |
local bIsPhoneOpen = false
local bIsPhoneCamOpen = false
Citizen.CreateThread(function()
while true do
Wait(0)
--SetNuiFocus(false, false)
local playerPed = GetPlayerPed(-1)
local playerVeh = GetVehiclePedIsIn(playerPed, false)
--if DoesEntityExist(playerVeh) then
-- DisplayRadar(true)
--else
... |
function PLUGIN:SaveData( )
local data = { }
for _, v in ipairs( ents.FindByClass( "ix_assistance_terminal" ) ) do
data[#data + 1] = {
v:GetPos( ),
v:GetAngles( )
}
end
ix.data.Set( "assistanceTerminals", data )
end
function PLUGIN:LoadData( )
for _, v in ipairs( ix.data.Get( "assistanceTerminals" ) ... |
require 'hdf5'
local pretty = require 'pl.pretty'
local path = require 'pl.path'
local totem = require 'totem'
local myTests = {}
local tester = totem.Tester()
local testUtils = hdf5._testUtils
local function writeAndReread(location, data)
local got
local typeIn = type(data)
if typeIn == 'userdata' then
... |
AddCSLuaFile()
EFFECT.Mat = Material( "sprites/physbeama" )
function EFFECT:Init( data )
self.Entity = data:GetEntity()
self:SetPos( self.Entity:GetPos() )
self.TargetPos = data:GetOrigin()
self.EndTime = CurTime() + 2
end
function EFFECT:GenerateArc(startPos, endPos, branchChance, detail)
-- M... |
local cjson = require("cjson")
local goTES3MPUtils = require("custom.goTES3MP.utils")
local goTES3MPChat = {}
local DiscordChannel = ""
local DiscordServer = ""
local maxCharMessageLength = 1512 -- This can be set to 1512 if using my personal fork(Temporary fix) 450 Default
goTES3MPChat.ConfigureDiscord = function(dis... |
local converter = require('github-theme.converter.converter')
local M = {}
local function get_theme(theme)
local filename = 'data/colors/'.. theme ..'.json'
local filepath = vim.api.nvim_get_runtime_file(filename, false)[1]
if not filepath then
return nil
end
if vim.fn.filereadable(filep... |
-- Like this addon? Buy me a coffee :) PayPal.Me/LucasMason
-- [[ Notification type, 1 for chat message or 0 for darkrp notification ]] --
R_PRINT.CFG.notificationType = 0
-- [[ Printer and paper entity health ]] --
R_PRINT.CFG.printerHealth = 200
R_PRINT.CFG.paperHealth = 100
-- [[ How many iterations ... |
--[[ Nagrand - Bro'Gaz the Clanless.lua
This script was written and is protected
by the GPL v2. This script was released
by Performer/Performa of the Blua Scripting
Project. Please give proper accredidations
when re-releasing or sharing this script
with others in the emulation community.
~~End of License Agreement
--... |
---@class lstg.mbg.GlobalEvent
local M = class('lstg.mbg.GlobalEvent')
function M:ctor()
self.isgoto = false
self.gotocondition = 0
self.gotoopreator = ""
self.gotocvalue = 0
self.gototime = 0
self.gotowhere = 0
self.gtcount = 0
self.isquake = false
self.quakecondition = 0
self.... |
return
function(ctx, row, cell)
local lst = {
{
label = "Reset Cell", command = "/reset/cell"
},
{
label = "Destroy Cell", command = "/delete/cell"
},
{
label = "Revert to Expression", command = "/revert/cell"
},
{
label = "Modify Cell", command = "/cursor/cellexpr"
},
{
label = "Scale... |
ENT.Type = "anim"
ENT.PrintName = "Doors Base"
ENT.Author = "WickRabbit"
ENT.Spawnable = false --Spawnable?
ENT.AdminSpawnable = false --If spawnable, is it admin only?
ENT.AutomaticFrameAdvance = true
|
if (SERVER) then
AddCSLuaFile()
end
--P08
sound.Add({
name="Weapon_P08.Single",
volume = 1.0,
pitch = {95,105},
sound = "weapons/p08/p08_fp.wav",
level = 145, --normally 94
channel = CHAN_STATIC
})
sound.Add({
name="Weapon_P08.Magrelease",
volume = 0.2,
sound = "weapons/p08/handling/p08_safety.wav",
level = ... |
-- Library of common/shared methods
local L = Grid2Options.L
-- Grid2Options:MakeStatusLoadOptions(status, options, optionParams)
do
local UNIT_REACTIONS = {
friendly = L['Friendly'],
hostile = L['Hostile'],
}
local GROUP_TYPES = {
solo = L['Solo'],
party = L['Party'],
arena = L["Arena"]... |
--- === AfterDark ===
---
--- Darkmode menubar toggle
---
-- inspiration:
-- https://github.com/Hammerspoon/Spoons/tree/master/Source/Shade.spoon
-- https://github.com/Hammerspoon/Spoons/blob/master/Source/FadeLogo.spoon/init.lua
-- https://github.com/HarshilShah/Nocturnal
-- Todo:
-- - [x] fix animation
-- - [x] hand... |
fx_version 'adamant'
games {'rdr3'}
rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aware my resources *will* become incompatible once RedM ships.'
client_script {
'@_core/lib/utils.lua',
'config/horse_comp.lua',
'config/config.lua',
'client.lua'
}
server_script {
'@_core/lib/utils.... |
settings = {
window_size_x = 1800,
window_size_y = 1800,
step_time = 500.0,
fps_cap = 60,
grid_size_x = 15,
grid_size_y = 15
}
|
markPoint = {}
aPoint = {}
bPoint = {}
local function onMark(event)
if ( event.id == world.event.S_EVENT_MARK_ADDED ) then
trigger.action.outSound("l10n/DEFAULT/TGoYes01.wav")
end
-- Record coordinates when a markpoint is deleted
if ( event.id == world.event.S_EVENT_MARK_REMOVED and event.pos ) the... |
local nls = require('null-ls')
local fmt = nls.builtins.formatting
local diagnostics = nls.builtins.diagnostics
local code_actions = nls.builtins.code_actions
-- Configuring null-ls
nls.setup({
save_after_format = false,
sources = {
fmt.yapf.with({
command = vim.fn.exepath("yapf"),
})
,
fmt.... |
-----------------------------------------
-- Spell: Filamented Hold
-- Reduces the attack speed of enemies within a fan-shaped area originating from the caster
-- Spell cost: 38 MP
-- Monster Type: Vermin
-- Spell Type: Magical (Earth)
-- Blue Magic Points: 3
-- Stat Bonus: VIT+1
-- Level: 52
-- Casting Time: 2 seconds... |
--{{---| Standard |----------------------------------------------------------------------------------------------------
awful = require("awful")
gears = require("gears")
awful.rules = require("awful.rules")
require("awful.autofocus")
xresources = requ... |
-- モジュールとして読み込む場合は最初に空のテーブルを作成して、最後にこれをreturnする。
local stage = {}
local stg = require('stg')
local player = nil
-- フレーム数frames毎にenemyオブジェクトから自機狙い弾を生成する。
local function ShootPer(id, frames, enemy)
local MaxFrames = 120
local i = 0
while i <= MaxFrames and enemy:IsEnabled() do
if i % frames == 0 then
stg:Create... |
local M = {}
local a = vim.api
local f = vim.fn
local function code_decision(num)
if num < 127 then
return true
elseif num < 161 then
return false
elseif num < 224 then
return true
end
return false
end
local function head(str)
if str == "" then
return "", nil, ... |
--- Tools
--
-- @module tools.lua
local S = core.get_translator(alternode.modname)
local use_s_protect = core.global_exists("s_protect")
local misc = dofile(alternode.modpath .. "/misc_functions.lua")
local function check_permissions(player)
local pname = player:get_player_name()
local granted, missing = core... |
object_static_item_item_hoth_buggy = object_static_item_shared_item_hoth_buggy:new {
}
ObjectTemplates:addTemplate(object_static_item_item_hoth_buggy, "object/static/item/item_hoth_buggy.iff")
|
local files = require 'files'
local guide = require 'core.guide'
local proto = require 'proto'
local accept = {
["ifblock"] = true,
["function"] = true,
["do"] = true,
["while"] = true,
["in"] = true,
["loop"] = true,
}
return function (uri, position)
local ast = files.getAst(uri)
... |
local lizards = require "lizards"
-- ----------------------------------------------------------------------
--
-- use the lgi library to integrate with cairo and GTK+
--
-- ----------------------------------------------------------------------
local lgi = require 'lgi'
local cairo = lgi.cairo
local Rsvg = lgi.require... |
PatrolTask = {}
PatrolTask.__index = PatrolTask
function PatrolTask:new(superSurvivor, square1, square2)
local o = {}
setmetatable(o, self)
self.__index = self
if(square1 ~= nil) then o.Square1 = square1
elseif(superSurvivor.player:getModData().PX ~= nil) then
o.Square1 = getCell():getOrCreateGridSquare(s... |
--[[
Copyright (C) 2015
William A Adams
Based On:
/*
* libvirt-host.h
* Summary: APIs for management of hosts
* Description: Provides APIs for the management of hosts
* Author: Daniel Veillard <veillard@redhat.com>
*
* Copyright (C) 2006-2014 Red Hat, Inc.
*
* This library is free software; you can redistribut... |
#!/usr/bin/env lua
local nk = moonnuklear
print(nk._VERSION)
print(nk._NK_VERSION)
|
-- Attr
--
-- The Attr class and in short 'attr' is used by the compiler to store many
-- attributes associated to a symbol or a AST node during compilation.
-- Usually the AST nodes are liked to an attr, multiple nodes can be linked
-- to the same attr, this happens for example with variable identifiers.
-- The compil... |
local RESOURCE = (...):gsub('%.', '/') .. '/'
local ROOT = (...):gsub('[^.]*.[^.]*$', '')
return function (config)
config = config or {}
config.resources = config.resources or RESOURCE
config.backColor = config.backColor or { 240, 240, 240 }
config.lineColor = config.lineColor or { 220, 220, 220 }
... |
--
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License"); you may ... |
local class = require("30log")
local Torch = class "Torch"
local ParticleManager = require("particle.manager")
local Particle = require("particle")
-- [[ Torch particle ]] --
local TorchParticle = Particle:extend("TorchParticle")
function TorchParticle:init(x, y)
self.super.init(self, x, y, 1 / 3, 0, -24 - mat... |
require("base64")
local http_server = require("http.server")
local http_headers = require("http.headers")
SUCCESS = "200"
CREATED = "201"
BAD_REQUEST = "400"
NOT_AUTHORIZED = "401"
NOT_FOUND = "404"
METHOD_NOT_ALLOWED = "405"
TIMEOUT = "408"
SERVER_ERROR = "500"
function setHeaders(stream, errorCode, location)
... |
local version = "V2.1.7"
PlayerContainerProficiency = 30 --export Your Container Proficiency bonus in total percent (Skills->Mining and Inventory->Inventory Manager)
PlayerContainerOptimization = 0 --export Your Container Optimization bonus in total percent (Skills->Mining and Inventory->Stock Control)
LowLevel = 25 -... |
require('../mossim/mossim');
function example_CMOSInverter()
local m = mos();
local Vdd = mosInput(m, kState1);
local Gnd = mosInput(m, kState0);
local Nin = mosInput(m, kState0);
local Nout = mosNode(m);
local Tp = mosTransistor(m, kTransistorTypeP, Nin, Vdd, Nout);
local Tn = mosTransis... |
--=========== Copyright © 2018, Planimeter, All rights reserved. ===========--
--
-- Purpose: Bind List Panel class
--
--==========================================================================--
require( "engine.client.gui.optionsmenu.bindlistheader" )
require( "engine.client.gui.optionsmenu.bindlistitem" )
class ... |
local lustache = require "lustache"
pages = alven.get_pages()
data = {
pages = pages
}
template = alven.read_theme_file("base.mustache")
output = lustache:render(template, data)
alven.output(output)
|
-- Constructor
Player = {}
Player.__index = Player
-- Meta table for users
setmetatable(Player, {
__call = function(self, source, permission_level, money, bank, identifier, group)
local pl = {}
pl.source = source
pl.permission_level = permission_level
pl.money = money
pl.bank = bank
... |
--[[
Assline space layout:
[1] robot starting loc, charger, ME interface on top of robot.
[2] assline input bus #1, input hatch #1
...
[11] assline input bus #10
[12] assline output bus
]]
dofile('third_party/table_io.lua');
local recipeUtil = require('recipeUtil');
local os = require('os');... |
--
-- 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 ffi ... |
require("util")
data:extend{
{
type = "battery-equipment",
name = "exteq_battery-mk3-equipment",
sprite =
{
filename = mod_gfx "equipment/battery-mk3-equipment.png",
width = 32,
height = 64,
priority = "medium"
},
shape =
{
width = 1,
height = 2,
t... |
#!/usr/bin/lua
local log = require("log")
tbl = {a=20, 30, 40,{1,2,3,b={5,6,7}}}
log.PrintTable(tbl,1)
|
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by Administrator.
--- DateTime: 2020/5/23 14:27
---
function test()
print("test")
end
local a = 5
local b =7
local c = a+b
print(c)
test() |
local paint = {}
local memory = require "util.memory"
local player = require "util.player"
local inventory = require "storage.inventory"
local pokemon = require "storage.pokemon"
local encounters = 0
function elapsedTime()
local secs = memory.raw(0x1A44)
if (secs < 10) then secs = "0" .. secs end
local ... |
require("import") -- the import fn
import("extend") -- import lib into global
e=extend --alias
-- catching undefined variables
local env = _ENV -- Lua 5.2
if not env then env = getfenv () end -- Lua 5.1
setmetatable(env, {__index=function (t,i) error("undefined global variable `"..i.."'",2) end})
base1 = e.Base()
ass... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.