content stringlengths 5 1.05M |
|---|
local Action = {
Invalid = 0
, Idle = 1
, Blocked = 2
, Move = 3
, Attack = 4
, Throw = 5
}
local Action_rev = nil
local function action_queue(tbl, time_needed, id, val)
local t = { time = time_needed, state = id, val = val }
tbl[#tbl + 1] = t
end
local function action_name(state)
if nil == Action_rev then
... |
local M = {}
--
local composer = require("composer")
local model = require("components.store.model")
local cmd = require("components.store.command").new()
local _K = require("Application")
local marker = require("extlib.marker")
--
---------------------------------------------------
--
local LABEL_NAME = "saved_"
--
fu... |
-- luacheck: ignore messenger stream freeswitch argv log
-- usage
if not argv[1] then
stream:write(' service [start|stop|status]\n')
return
end
local api = require "resources.functions.api"
local action = argv[2]
if action == 'start' then
local response = api:execute('luarun', 'app/messenger/resources/scripts/s... |
----------------------------------------------------------------------------------------
-- Configuration of oUF Colors
----------------------------------------------------------------------------------------
local _, ns = ...
local E, C, L = ns:unpack()
local oUF = ns.oUF or oUF
C.oUF_colors = setmetatable({
tap... |
local base_ruin_set = {}
base_ruin_set.small = require("ruins/smallRuins")
base_ruin_set.medium = require("ruins/mediumRuins")
base_ruin_set.large = require("ruins/largeRuins")
return base_ruin_set
|
---------------------------------------------------------------------
-- a barrel and a tub - plus a function that makes 'round' objects
---------------------------------------------------------------------
-- IMPORTANT NOTE: The barrel requires a lot of nodeboxes. That may be
-- too much for weak hard... |
return
{
[1] = {id=1,name='xxx',one_rows={{id=1,x=2,},},multi_rows1={{id=1,x=2,},},multi_rows2={{id=1,x=2,},},multi_rows3={{id=1,x=2,y=3,},},multi_rows4={[1]={id=1,x=2,y=3,},},},
[2] = {id=2,name='xxx',one_rows={{id=2,x=4,},},multi_rows1={{id=2,x=4,},},multi_rows2={{id=3,x=4,},{id=3,x=4,},},multi_rows3={{id=2,x=3,y=4,... |
local parser_configs = require("nvim-treesitter.parsers").get_parser_configs()
-- parser_configs.norg = {
-- install_info = {
-- url = "https://github.com/nvim-neorg/tree-sitter-norg",
-- files = { "src/parser.c", "src/scanner.cc" },
-- branch = "main",
-- },
-- }
-- Haskell doesn't wo... |
----------------------------------------
-- ์ด ์ฃผ์์ ์ญ์ ํ์ง ๋ง์ธ์.
-- 35% ํ ์ธํด ๋๋ฆฝ๋๋ค. ์ฝ๋ก๋ ๊ณ์ ์ ๋ฃ ๊ตฌ๋งค์ ์ฐ๋ฝ์ฃผ์ธ์. (Corona SDK, Enterprise, Cards)
-- @Author ์ํด๋ก์ผ์ด์
์๊ฐ๋ฏผ ๋ํ
-- @Website http://WonHaDa.com, http://Apollocation.com, http://CoronaLabs.kr
-- @E-mail englekk@naver.com, englekk@apollocation.com
-- 'John 3:16, Psalm 23'
-- MIT ... |
local buffer = require "src.util.buffer"
describe("buffer", function()
local b
setup(function()
b = buffer(function(cond) return cond end, 10)
end)
it("returns true immediately when the condition is true", function()
assert.is_true(b(1, true))
end)
it("returns true after time ... |
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
description 'devProp'
version '1.0.0'
server_scripts {
'@mysql-async/lib/MySQL.lua',
'sv.lua'
}
client_scripts {
'cl.lua'
}
dependencies {
'es_extended'
} |
--- === repl ===
---
--- The REPL (Read-Eval-Print-Loop) is excellent for exploring and experiment with Hydra's API.
---
--- It has all of the familiar readline-like keybindings, including C-b, C-f, M-b, M-f, etc; use C-p and C-n to browse command history.
---
--- Type `help` in the REPL for info on how to use the docu... |
local M = { }
local name = "test_parseFirstNumberGroup"
local me = ...
local FX = require("FunctionalX")
local TK = require("PackageToolkit")
local case = TK.test.case
M[name] = function()
local fn = FX.strings.parseFirstNumberGroup
local indent = " "
local _ = (case(fn, { }, {
{ },
""
}, "strings.pars... |
object_mobile_leia_echo_base_01 = object_mobile_shared_leia_echo_base_01:new {
}
ObjectTemplates:addTemplate(object_mobile_leia_echo_base_01, "object/mobile/leia_echo_base_01.iff")
|
vim.cmd('cabbrev sord sort')
|
invoker_dark_moon_ghost_walk = class({})
LinkLuaModifier( "modifier_invoker_dark_moon_ghost_walk", "modifiers/modifier_invoker_dark_moon_ghost_walk", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_invoker_dark_moon_ghost_walk_debuff", "modifiers/modifier_invoker_dark_moon_ghost_walk_debuff", LUA_MODIFIER_MOTION_... |
local _, ns = ...
local C = ns.C
C['nameplates'] = {
enabled = true,
tankMode = false,
showThreat = true,
}
|
--------------------------------------------------------------------------------
--- LuaSTG Sub ๆธฒๆๅฝไปค
--- ็ๅข็ณ
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--- ่ฟ็งปๆๅ
-- ๅ
ณไบๆฐๅข็ lstg.SetScissorRect๏ผ
... |
local sleep_time = ...
return Def.ActorFrame{
InitCommand=function(self) self:diffuse(0,0,0,1):visible(false) end,
StartSceneCommand=function(self) self:sleep(sleep_time):queuecommand("Show") end,
ShowCommand=function(self) self:visible(true):smooth(1.666):diffuse(1,1,1,1):sleep(1.133):smooth(1.666):diffuse(0,0,0,1... |
--[[
Copyright (C) 2019 Onset Roleplay
Developers:
* Logic
Contributors:
* Blue Mountains GmbH
]]--
-- Variables
local colour = ImportPackage("colours")
MAX_PLANTS = 100
DRUG_PLANT_MODELS = {
64,
554
}
DRUG_NAMES = {
"Marijuana",
"Cocaine"
}
DRUG_TYPE_ITEM = {
INV_ITEM_WEED,
INV_ITEM_COCAINE
}
DRUG_TYPE_... |
local wb = hs.canvas.windowBehaviors
local spaces = require("hs._asm.undocumented.spaces")
local running = require("running")
hs.window.filter.forceRefreshOnSpaceChange = true
local module = { widget = hs.canvas.new({}) }
local desktop = require("desktop")
module.widget:level(hs.canvas.windowLevels.floating)
module... |
MaleComp = {
[1]={["name"]="MP361",["Hash"]="123BDDCB",["category"]="spurs"},
[2]={["name"]="MP402",["Hash"]="142D2BE8",["category"]="spurs"},
[3]={["name"]="MP418",["Hash"]="15076986",["category"]="spurs"},
[4]={["name"]="MP472",["Hash"]="17346DD4",["category"]="spurs"},
[5]={["name"]="MP519",["Hash"]="19E1EC40",["cat... |
if UnitFactionGroup("player") ~= "Alliance" then return end
--------------------------------------------------------------------------------
-- Module Declaration
--
local mod, CL = BigWigs:NewBoss("Chopper Redhook", 1822, 2132)
if not mod then return end
mod:RegisterEnableMob(128650) -- Chopper Redhook
mod.engageId ... |
-- Generated By protoc-gen-lua Do not Edit
local protobuf = require "protobuf"
module('BseCaishenPray_pb', package.seeall)
local BSECAISHENPRAY = protobuf.Descriptor();
local BSECAISHENPRAY_SUCCESS_FIELD = protobuf.FieldDescriptor();
local BSECAISHENPRAY_RESPONSE_FIELD = protobuf.FieldDescriptor();
local BSECAISHENPR... |
---------------------------------------------------------------
--- HEDGE EDITOR 0.9 (for use with Hedgewars 0.9.22 and up)
---------------------------------------------------------------
-- a horrible mission editor by mikade
-- place gears like a boss
-- feel free to shower me with your adoration and/or hate m... |
function isInAQ40()
return GetRealZoneText() == AQ40
end
function isInAQ20()
return GetRealZoneText() == AQ20
end
function isInBWL()
return GetRealZoneText() == BWL
-- GetMinimapZoneText() Dragonmaw Garrison (Razorgore the Untamed)
-- GetMinimapZoneText() Shadow Wing Lair (Vaelastrasz the Corrupt... |
local Headquartersstate = false
local textsede = ""
addCommandHandler("sede",
function()
if getElementData(localPlayer,"AccountData.Sede") <= 50 then
textsede = "#428bca Vร ATร UMA LANCHONETE."
else
textsede = "#428bca VOCร NรO ESTร COM SEDE."
end
exports.VDBGRadar:showBox(getLocalPlayer(),... |
-- Imports
os.loadAPI("json");
-- Variables
local args = {...};
local monitor = peripheral.find("monitor");
-- Functions
function drawSprite(sprite)
for i=1,#sprite do
monitor.setCursorPos(1, i);
monitor.write(sprite[i]);
end
end
-- Startup
if not (args[1]) then
print("You need to write the IP o... |
---------------------------------------------
-- Coloured Stone Bricks Mod by CraigyDavi --
---------------------------------------------
local COLOURS = {
"Black",
"Cyan",
"Brown",
"Dark Blue",
"Dark Green",
"Dark Grey",
"Dark Pink",
"Green",
"Grey",
"Orange",
"Pink",
"Purple",
"Red",
"Whi... |
BuildEnv(...)
GameObject = Addon:NewClass('GameObject', Object)
GameObject.DB = OBJECT_DATA
GameObject.DROP_PREFIX = 'object:'
function GameObject:Constructor(id)
self.id = id
self.data = self.DB[id] or {}
end
function GameObject:GetDisplay()
return self.data.Display
end
function GameOb... |
GSEOptions = {
["HideLoginMessage"] = false,
["use2"] = false,
["STANDARDFUNCS"] = "|cff55ddcc",
["showGSEUsers"] = false,
["UnfoundSpellIDs"] = {
},
["COMMENT"] = "|cff55cc55",
["use14"] = false,
["Update2305"] = true,
["EQUALS"] = "|cffccddee",
["use11"] = false,
["sendDebugOutputToChatWindow"] = false,
... |
require("rrpg.lua");
require("dialogs.lua");
require("gui.lua");
function Firecast_GerenciarDados(configRoot)
local node = NDB.loadNodeFromLocalID(configRoot);
if node ~= nil then
local frm = GUI.newForm("frmConfigDice");
frm:setNodeObject(node);
frm:show();
--permissions.show(node);
end;
end; |
--3Lยทๆจฑๅๆๆณ
local m=37564802
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/c37564765") end) then require("script/c37564765") end
cm.fusion_att_3L=ATTRIBUTE_DARK
function cm.initial_effect(c)
senya.lfus(c,m)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
... |
--[[ BaseLua
https://github.com/dejayc/BaseLua
Copyright 2012 Dejay Clayton
All use of this file must comply with the Apache License,
Version 2.0, under which this file is licensed:
http://www.apache.org/licenses/LICENSE-2.0 --]]
--[[
---------------------------------------------------------... |
local CollectMe = LibStub("AceAddon-3.0"):GetAddon("CollectMe")
CollectMe.RandomTitle = CollectMe:NewModule("RandomTitle", "AceHook-3.0")
function CollectMe.RandomTitle:Select()
local selectable = {};
for i,v in pairs(CollectMe.db.profile.random.titles) do
if v == true then
table... |
local RPX = nil
Citizen.CreateThread(function()
Citizen.Wait(1)
exports["Library"]:AddHook(GetCurrentResourceName(), function(library)
RPX = library
if RPX.IsLoaded then
PlayerLoaded()
end
end)
end)
RegisterNetEvent("rpx:playerLoaded")
AddEventHandler("rpx:playerLoade... |
--[[
License : GLPv3, see LICENCE in root of repository
Authors : Nikolay Fiykov, v1
--]]
net = {}
net.__index = net
require('Timer')
net.TCP = 1
net.UDP = 2
Connection = {}
Connection.__index = Connection
Connection.TestData = {}
TcpListener = {}
TcpListener.__index = TcpListener
net.TestData = {}
net.TestData.... |
--- https://github.com/lunarmodules/Penlight/blob/master/lua/pl/Date.lua
--- Date and Date Format classes.
-- See @{05-dates.md|the Guide}.
--
-- NOTE: the date module is deprecated! see
-- https://github.com/lunarmodules/Penlight/issues/285
--
-- Dependencies: `pl.class`, `pl.stringx`, `pl.utils`
-- @classmod pl.Date... |
local L = LibStub("AceLocale-3.0"):NewLocale("BestInSlot", "itIT")
if L then
L["%s or %s"] = "%s oppure %s"
L["%s's BestInSlot lists"] = "liste BestInSlot di %s"
L["%s manager"] = "Gestione %s" -- new
L["A list with this name already exists"] = "Esiste gi\195\160 una lista con questo nome"
L["Add a custom item"] = "Agg... |
local errno = require("acid.errno")
function test.errno(t)
t:eq(1, errno.EPERM)
t:eq(2, errno.ENOENT)
t:eq(11, errno.EAGAIN)
t:eq(122, errno.EDQUOT)
end
|
local util = require('esearch/shared/util')
local code = util.code
local decode = util.decode
local filereadable = util.filereadable
local json_decode = util.json_decode
local ifirst, ilast = util.ifirst, util.ilast
local NIL = util.NIL
local list, append, unpack = util.list, util.append, util.unpack
local M = {}
loc... |
require('quest')
-- Lalo's grotto quest
local function lalos_grotto_start_fn()
add_message_with_pause("ILRU_SPEECH_TEXT_SID")
add_message_with_pause("LALOS_GROTTO_QUEST_START_SID")
add_message_with_pause("LALOS_GROTTO_QUEST_START2_SID")
clear_and_add_message("LALOS_GROTTO_QUEST_START3_SID")
end
local function... |
object_intangible_vehicle_hoverlifter_speeder_pcd = object_intangible_vehicle_shared_hoverlifter_speeder_pcd:new {
}
ObjectTemplates:addTemplate(object_intangible_vehicle_hoverlifter_speeder_pcd, "object/intangible/vehicle/hoverlifter_speeder_pcd.iff")
|
local AddonName, AddonTable = ...
AddonTable.antorus = {
-- Garothi Worldbreaker
152002,
151987,
151937,
151943,
152031,
152009,
151951,
151956,
151998,
152036,
151962,
151988,
152017,
152028,
152039,
-- Felhounds of Sargeras
152816,
151973,
... |
-- variable is required for glfw's premake5 file
outputdir = ""
include ("vendor/glfw")
project "*"
-- Only x64 architecture is supported
architecture "x64"
configurations { "Debug", "Release" }
-- sets the compiler include directories for the source files and glfw
includedirs { "include", "vendor", "vendor/glfw... |
object_tangible_deed_player_house_deed_relaxation_house_deed = object_tangible_deed_player_house_deed_shared_relaxation_house_deed:new {
}
ObjectTemplates:addTemplate(object_tangible_deed_player_house_deed_relaxation_house_deed, "object/tangible/deed/player_house_deed/relaxation_house_deed.iff")
|
return {'air','airbag','airbrush','airbus','airco','airconditioned','airconditioner','airconditioning','airhostess','airmail','airmarshal','airmile','airplay','airstrip','aircospecialist','aires','airbags','aircos','airmarshals','airs','airtje','airtjes','airbussen','airhostessen','airmiles','airstrips','aircootje','ai... |
--[==[
Copyright ยฉ2022 Samuel Thomas Pain
The contents of this addon, excluding third-party resources, are
copyrighted to their authors with all rights reserved.
This addon is free to use and the authors hereby grants you the following rights:
1. You may make modifications to this addon for private use only, you
... |
local stepinterval = 4
local stepintervaloffset = 0
SWEP.customboboffset = Vector(0,0,0)
--[[ Quadratic Interpolation Functions ]]--
--[[
Function Name: Power
Syntax: pow(number you want to take the power of, it's power)
Returns: The number to the power you specify
Purpose: Utility function
]]--
local function... |
--[[
The contents of this file are subject to the Common Public Attribution
License Version 1.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://ultimate-empire-at-war.com/cpal. The License is based on the Mozilla
Public License Versio... |
-- Type definitions for Universal Ctags
local types = {}
types.c = {}
types.c.ctagstype = 'c'
types.c.kinds = {
h = 'header files',
d = 'macros',
p = 'prototypes',
g = 'enums',
e = 'enumerators',
t = 'typedefs',
s = 'structs',
u = 'unions',
m = 'members',
v = 'variables',
f = 'functions'
}
types.c.sro ... |
--------------------------------
-- @module EventListenerFocus
-- @extend EventListener
-- @parent_module cc
--------------------------------
-- @function [parent=#EventListenerFocus] clone
-- @param self
-- @return EventListenerFocus#EventListenerFocus ret (return value: cc.EventListenerFocus)
------------... |
local function main(xlsx_file)
local proc = io.popen('./xlsx2lua --no-pretty --skip-empty-row '..xlsx_file)
local stdout = proc:read('*a')
proc:close()
local book = load(stdout)()
print('book: '..xlsx_file)
for _, sheet in ipairs(book.sheets) do
print(string.rep('-', 80))
print('sheet.name: '..she... |
-- Scripts juste pour tester des effets ร la mano
-- tout sur la couleur: https://www.w3schools.com/colors/default.asp
-- roue des couleurs: https://iro.js.org/?ref=oldsite
print("\n a_tst_fill.lua zf181125.1632 \n")
znbled=300
function RGB_clear()
ws2812.init()
buffer = ws2812.newBuffer(znbled, 3)
buffe... |
-- Copyright (C) 2018 The Dota IMBA Development Team
--
-- 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 by applicable ... |
-- Different ways to work with files
-- r: read only (default)
-- w: Overwrite or create a new file
-- a: Append or create new file
-- r+: Read & Write existing file
-- w+: Overwrite, read, or create file
-- a+: Append, read, or create a file
file = io.open("fileiotest.lua", "w+")
file:write("Random String of text\n"... |
-- @description Insert marker at start of selected items with item name
-- @author Aaron Cendan
-- @version 1.0
-- @metapackage
-- @provides
-- [main] . > acendan_Insert marker at start of selected items with item name.lua
-- @link https://aaroncendan.me
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~~~~~~~~~~ GLOBAL VA... |
-- Copyright 2016 Christian Hesse
-- delimiter separated values 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 = 'dsv'}
-- Operators.
local operator = token(l.OPERATOR, S(',;:|'))
M._rules = {
{'operator', operator}
}
... |
-- client_util.lua
local socket = require "client.socket"
local crypt = require "client.crypt"
local protobuf = require 'protobuf'
local message_map = require 'message_map'
message_map.mapping('hall', 'game')
local util = {}
local function unpack_line(text)
local from = text:find("\n", 1, true)
if from then
... |
local mod = DBM:NewMod(1133, "DBM-Party-WoD", 3, 536)
local L = mod:GetLocalizedStrings()
mod:SetRevision(("$Revision: 15007 $"):sub(12, -3))
mod:SetCreatureID(80005)
mod:SetEncounterID(1736)
mod:SetZone()
mod:RegisterCombat("combat")
mod:RegisterEventsInCombat(
"SPELL_AURA_APPLIED 163447 161588",
"SP... |
local extend = require("iron.util.tables").extend
local cpp = {}
local function magic(str)
-- remove every space at beginning of a line
str = str:gsub('^%s+', '')
-- remove all comments
str = str:gsub('//(.*)', '')
-- remove every space at end of a line
str = str:gsub('%s+$', '')
-- remove... |
require "love.graphics"
serialization_version = 1.0
return
{
anim_width = 32,
anim_height = 32,
animations =
{
head =
{
frame_rate = 10,
frames = {
frame0={image="PLAYER",quad=love.graphics.newQuad(0,0,32,32,256,128), xpos = 0, ypos = 0, rot = 0, xscale = 1, yscale = 1, xpivot = 16,... |
--[[--------------------------------------------------
GUI Editor
client
dx_radiobutton.lua
creates a dx radiobutton widget for use in the right click menus
--]]--------------------------------------------------
DX_Radiobutton = {}
DX_Radiobutton.__index = DX_Radiobutton
DX_Radiobutton.instances = {}
function D... |
local data_util = require("data_util")
data.raw["ammo-turret"]["kr-railgun-turret"].attack_parameters.range = 70
data.raw["ammo-turret"]["kr-railgun-turret"].attack_parameters.prepare_range = 75
data_util.replace_or_add_ingredient("heavy-rocket", "rocket-fuel", "rocket-fuel", 2)
data_util.replace_or_add_ingredient("e... |
local a = 5
return a
|
local allTestsOk = true
local function test(s, f)
print("test " .. s .. " ...")
local t, ok, msg = measure_time(function() return pcall(f) end)
print(t .. "s")
if ok then
print("OK")
else
allTestsOk = false
if msg then
print("FAILED " .. msg)
else
print("FAILED")
end
end
end
local chunkArg1, chu... |
-- #######################################
-- ## Project: MTA iLife ##
-- ## Name: BusinessNameRenderer.lua ##
-- ## Author: Noneatme ##
-- ## Version: 1.0 ##
-- ## License: See top Folder ##
-- #######################################
-- FUNCTIONS / METHODS --
local cFunc = {}; -- Local Functions
loc... |
local t = require(script.Parent.Parent.Parent.t)
local likeSubscription: (obj: any) -> (boolean, string?) = t.interface({
Context = t.string,
Action = t.string,
Callback = t.optional(t.callback),
})
local Particle = require(script.Parent.IParticle)
type IParticle = Particle.IParticle
--[=[
@interface ISubscripti... |
Coin = Class{}
function Coin:init(params)
-- Position in terms of x and y coordinates.
self.x = params.x
self.y = params.y
self.width = 16
self.height = 16
-- Determines which frame is rendered at a particular instant.
self.turn = 1
end
--[[
Stop the score sound if it's... |
--[[
LuCI - Lua Configuration Interface
Copyright 2019 lisaac <lisaac.cn@gmail.com>
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
$Id$
]]--
require "luc... |
local name = "rowboat"
local definition = ...
local craft_check = minetest.settings:get_bool("vehicle_mash.enable_crafts")
definition.description = "Rowboat"
definition.inventory_image = "rowboat_inventory.png"
definition.wield_image = "rowboat_wield.png"
definition.mesh = "rowboat.x"
definition.drop_on_destroy = {"d... |
-- Storage.lua
-- Implements DB storage backend for the plugin
--- The DB connection that provides the player areas
g_DB = nil;
function InitStorage()
local DBEngine = string.lower(g_Config.DatabaseEngine);
if (DBEngine == "sqlite") then
g_DB = SQLite_CreateStorage(g_Config.DatabaseParams);
elseif (DBE... |
local stub = require("luassert.stub")
local mock = require("luassert.mock")
local u = require("null-ls.utils")
local methods = require("null-ls.methods")
local generators = require("null-ls.generators")
local diff = require("null-ls.diff")
local method = methods.lsp.FORMATTING
local lsp = mock(vim.lsp, true)
descri... |
local oop = require("oop")
local frame_base = require("libGUI/frame")
local colors = require("libGUI/colors")
local generic_info_small = {
mBar = nil,
mMessage = nil,
mOutputString = nil,
mOutputStringLenMax = 11,
mDisplayName = nil,
mDisplayNameLenMax = 3,
mHasChanged = true
}
oop.inherit(generi... |
--
-- Created by Tooster on 21.02.2018 13:36
--
function printtab(tab)
local function buildtab(tab)
local temp = {}
for k,v in pairs(tab) do
if type(v) == "table" then
temp[#temp+1] = buildtab(v)
else
temp[#temp+1] = tostring(v)
end
... |
local squeak = require 'lib.squeak'
local Component = squeak.component
local palette = require 'core.palette'
local config = require 'gameConfig'
local lg = love.graphics
local Text = Component:extend()
function Text:new(font, text, x, y, maxWidth, align)
Text.super.new(self)
maxWidth = maxWidth or config.graph... |
-- Nodes registration for trampoline mod
trampoline.register_tramp("tramp", {
description = "Trampoline",
overlay = "sides_overlay.png",
bounce_rate = trampoline.bounce * trampoline.multi_high,
})
local aliases = {
-- backward compatibility
"trampoline:regular",
"trampoline:brown",
-- other aliases
"trampo... |
local inventoryGUI = {}
local sellingGUI = {}
local isSellingShowing = false
local isInventoryShowing = false
local sX_, sY_ = guiGetScreenSize()
local sX = sX_/1366
local sY = sY_/768
addEvent("AURdrug_trafficker.requestPosition", true)
addEventHandler("AURdrug_trafficker.requestPosition", root,
function()
if (get... |
local call_redis_script = require "./lua/test/harness";
describe("persist-coverage", function()
local function hgetall(hash_key)
local flat_map = redis.call('HGETALL', hash_key)
local result = {}
for i = 1, #flat_map, 2 do
result[flat_map[i]] = flat_map[i + 1]
end
return result
end
loc... |
-----------------------------------
-- Area: Den of Rancor
-- NM: Celeste-eyed Tozberry
-----------------------------------
mixins =
{
require("scripts/mixins/families/tonberry"),
require("scripts/mixins/job_special")
}
-----------------------------------
function onMobSpawn(mob)
tpz.mix.jobSpecial.confi... |
H.opt.termguicolors = true
H.opt.guifont = 'FiraCode Nerd Font:h12'
H.cmd [[ syntax enable ]]
H.cmd [[ colorscheme true ]]
|
--global MusicService
local _=BaseEntity.new("music_service",true)
local _source_ambient=nil
local _source_fx=nil
local _sound_enabled=true
_.set_volume=function(value)
if value<=0 then
_sound_enabled=false
end
end
-- todo: crossfade
-- todo: cancel prev
_.play_ambient=function(name)
if... |
--Adiciona brasil ร lista de bloqueados.
--ๅทด่ฅฟ
--AddCountry("BR");
--Adiciona china ร lista de bloqueados.
--ไธญๅ
AddCountry("CN"); |
local skynet = require "skynet"
local socket = require "skynet.socket"
local function accept(clientfd, addr)
skynet.newservice("agent", clientfd, addr)
end
skynet.start(function ()
local listenfd = socket.listen("0.0.0.0", 55561)
skynet.uniqueservice("redis")
skynet.uniqueservice("hall")
socket.st... |
-- ==========================
-- TOTAL BUFFER NUMBER BUBBLE
-- ==========================
-- Created by kuznetsss <github.com/kuznetsss>
local settings = {
color = vim.g.bubbly_colors,
style = vim.g.bubbly_styles,
symbol = vim.g.bubbly_symbols,
filter = vim.g.bubbly_filter,
}
---@type fun(settings: table, mod... |
--types/logfonttype: LOGFONTW type
--Written by Cosmin Apreutesei. Public Domain.
--It was separated from winapi.font because it's needed by cairo_win32_h.lua.
setfenv(1, require'winapi.namespace')
require'winapi.types'
local ffi = require'ffi'
ffi.cdef[[
typedef struct tagLOGFONTW
{
LONG height;
LONG ... |
require 'models.CnnVae'
local CnnVaeMnist, parent = torch.class('CnnVaeMnist', 'CnnVae')
local c = require 'trepl.colorize'
require 'nngraph'
require 'nnutils.init'
function CnnVaeMnist:build(struct)
local encoder = nn.Sequential()
-- conv
encoder:add(nn.View(1,28,28))
encoder:add(nn.SpatialConvolution( 1... |
local PLUGIN = PLUGIN;
local Clockwork = Clockwork;
PLUGIN.recordEntryTypes = {};
PLUGIN.soundQueues = {};
local cwOption = Clockwork.option;
local cwConfig = Clockwork.config;
cwConfig:AddToSystem("[CP] Admin Help Interval", "admin_help_interval", "Sets the minimum time between admin help messages.", 0, 120, 0);
c... |
-- Examples of using Table Pattern Matching in Lua.
local sm, gm, select, tostring, assert = setmetatable, getmetatable, select, tostring, assert
local T = require 'TPatterns'
local case, var, call, DO = T.case, T.var, T.call, T.DO
local match, match_all, match_cond = T.match, T.match_all, T.match_cond
local matc... |
-- A solution contains projects, and defines the available configurations
solution "Dependencies"
configurations {
"Debug",
"Release",
}
configuration "gmake Debug"
do
buildoptions { "-g" }
linkoptions { "-g" }
end
configuration "gmake"
do
buildoptions {
"-Wall",
... |
function lang_switch_keys(lang)
local in_lang = {}
local langs =
{
[1] = {lang_key = "tr", lang_name = "Tรผrkรงe", script_name = "Harf Harf Yaz"},
[2] = {lang_key = "en", lang_name = "English", script_name = "Typewriter"}
}
local lang_list = {}
local script_name_list = {}
for i = 1, #langs do
lang_li... |
require "core/game/camera"
Game = Game or {}
Game = {
pw = nil,
rw = nil,
sg = nil,
debug_graphics = false,
debug_physics = false,
camera = nil,
}
GameBase.game = Game
GameBase.game_level = "test"
local cursor_modes = {"normal", "disabled"}
local cursor_mode_nxt_idx = 2
function Game.level_loaded()
Game.pw =... |
Audio = {}
function Audio:loadMusic(fn, vol)
local fullFilePath = "assets/audio/" .. fn
if not MOAIFileSystem.checkFileExists(fullFilePath) then
return nil
end
vol = vol or 0.5
local snd = MOAIUntzSound.new()
snd:load(fullFilePath)
snd:setVolume(vol)
snd:setLooping(true)
local tok = fn:split... |
local _
local LAM = LibStub:GetLibrary("LibAddonMenu-2.0")
local function Init(mId, moduleName)
local panelData = Init_ModulePanel(moduleName, "Guild Store Improvement Settings")
local optionsTable = {
{
type = "header",
name = "|c0066FF[Enhanced Guild Store]|r Behaviour Settings",
width = "full",
},
... |
-- Copyright (c) 2019 Redfern, Trevor <trevorredfern@gmail.com>
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
local Component = require("moonpie.ui.components.component")
local unpacker = require "moonpie.utility.unpack"
local template = require "moonpie.utility.template... |
local libcurl = {}
require("libcurl.curl")
require("libcurl.easy")
local ffi = require("ffi")
local loaded, curl = pcall(ffi.load, "curl")
if not loaded then
curl = ffi.load("libcurl.so.4")
end
function libcurl.global_init(kind)
return curl.curl_global_init(kind)
end
function libcurl.easy_init()
return curl.c... |
Config = {}
Config.DrawDistance = 100.0
Config.MaxInService = -1
Config.EnablePlayerManagement = true
Config.EnableSocietyOwnedVehicles = false
Config.Locale = 'fr'
Config.Zones = {
RaisinFarm = {
Pos = {x = 2413.5222, y = 4991.765, z... |
function setMapObstacles(map)
local x, y = 0, 0
for x = 10, 14 do
map:getTile(x, 10).isBlocking = true
end
for x = 29, 33 do
for y = 23, 27 do
map:getTile(x, y).isBlocking = true
end
end
for y = 15, 22 do
map:getTile(20, y).isBlocking = true
end
for x = 32, 38 do
map:getTile(x, 12).isBlocki... |
local lizards = require "lizards"
local p = lizards.point_t(4, 3)
print(p)
-- print(lizards)
-- print(lizards.PEAK)
|
return {'edammer','edam','edammer','edammers','edams','edammers','edammertje','edammertjes','edamse'} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.