content
stringlengths
5
1.05M
object_mobile_dressed_disappearances_husband = object_mobile_shared_dressed_disappearances_husband:new { } ObjectTemplates:addTemplate(object_mobile_dressed_disappearances_husband, "object/mobile/dressed_disappearances_husband.iff")
----------------------------------- -- Area: Dynamis-San_dOria_[D] ----------------------------------- require("scripts/globals/zone") ----------------------------------- zones = zones or {} zones[tpz.zone.DYNAMIS_SAN_DORIA_D] = { text = { }, mob = { }, npc = { }, } return zones[t...
--[[ ScoreState Class Author: Colton Ogden cogden@cs50.harvard.edu A simple state used to display the player's score before they transition back into the play state. Transitioned to from the PlayState when they collide with a Pipe. ]] ScoreState = Class{__includes = BaseState} --[[ When w...
local typecheck = require('typecheck') local unm, add, sub, mul, div, eq unm = typecheck('number', 'number') .. function(x, y) return -x, -y end add = typecheck('number', 'number', 'number', 'number') .. function(ax, ay, bx, by) return ax + bx, ay + by end sub = typecheck('number', 'number', 'number', 'number') .. ...
local crab = require "crab.c" local utf8 = require "utf8.c" local words = {} for line in io.lines("words.txt") do local t = {} assert(utf8.toutf32(line, t), "non utf8 words detected:"..line) table.insert(words, t) end crab.open(words) local input = io.input("texts.txt"):read("*a") local texts = {} assert...
local kb = libs.keyboard; local mouse = libs.mouse; local width = 0; local height = 0; local dist = 0; local last = 0; local free = true; local noOfScroll = 1; actions.done = function (id) free = true; end actions.abs = function (id, x, y) local angel = math.atan2(y-height, x-width) * 180 / math.pi;...
includeFile("tangible/wearables/cybernetic/s04/cybernetic_s04_torso.lua") includeFile("tangible/wearables/cybernetic/s04/cybernetic_s04_arm_r.lua")
local status_ok, dial = pcall(require, "dial") if not status_ok then return end -- ≈ is <M-x> vim.cmd([[ nmap ≈ <Plug>(dial-increment) nmap <C-x> <Plug>(dial-decrement) vmap ≈ <Plug>(dial-increment) vmap <C-x> <Plug>(dial-decrement) vmap g≈ <Plug>(dial-increment-additional) vmap g<C-x> <Plug>(dial-decreme...
function onStartCountdown() setProperty('defaultCamZoom', 0.7); end
--- -- Utils.lua - Various UI utilities -- local Utils = {} function Utils.lerpNumber(a, b, alpha) return a + (b - a) * alpha end function Utils.createIndicator(parent) local indicator = Instance.new("Frame") indicator.BorderSizePixel = 0 indicator.Parent = parent local uiCorner = Instance.new("UICorner") uiC...
-- =============== -- HIGHLIGHT UTILS -- =============== -- Created by datwaft <github.com/datwaft> -- ======== -- Preamble -- ======== local M = require'bubbly.core.module'.new('utils.highlight') local titlecase = require'bubbly.utils.string'.titlecase -- ========================= -- Generate highlight string...
local RudeBusterBeam, super = Class(Sprite) function RudeBusterBeam:init(red, x, y, tx, ty, after) super:init(self, red and "effects/rudebuster/beam_red" or "effects/rudebuster/beam", x, y) self:setOrigin(0.5, 0.5) self:setScale(2) self:play(1/30, true) self.target_x = tx self.target_y = ty ...
-- -- (C) 2013 Kriss@XIXs.com -- local coroutine,package,string,table,math,io,os,debug,assert,dofile,error,_G,getfenv,getmetatable,ipairs,Gload,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,unpack,_VERSION,xpcall,module,require=coroutine,package,str...
--[[--------------------------------------------------------- If false is returned then the spawn menu is never created. This saves load times if your mod doesn't actually use the spawn menu for any reason. -----------------------------------------------------------]] function GM:SpawnMenuEnabled() return false en...
f = io.open('log.js', 'w') f:write('var l=[];\n') f:write('l.p=function(v){this.push(v)};\n') function main() local player = game_sides[player_side].player f:write('l.p({x:'..tostring(player.x)..',y:'..tostring(player.y)..'});\n') end
-- This example demonstrate how to run multiple processes concurrently. It uses -- the fact that processes are pollable objects to wait for their termination. local cqueues = require 'cqueues' local subprocess = require 'xcq.subprocess' local unpack = unpack or table.unpack assert(cqueues.new():wrap(function() loca...
describe('http', function() end)
local downloader = require "cclua.downloader" local timer = require "xgame.timer" local filesystem = require "xgame.filesystem" local Manifest = require "xgame.Manifest" local assert = assert local xpcall = xpcall local MAX_LOADING_FILES = 10 local MAX_ATTEMPTS = 3 local ATTEMPT_INTERVAL = 0.5 loc...
object_tangible_loot_generic_usable_slave_collar_generic = object_tangible_loot_generic_usable_shared_slave_collar_generic:new { } ObjectTemplates:addTemplate(object_tangible_loot_generic_usable_slave_collar_generic, "object/tangible/loot/generic/usable/slave_collar_generic.iff")
local t = Def.ActorFrame{} -- NumWheelItems under [MusicWheel] in Metrics.ini needs to be 17. -- Only 15 can be seen onscreen at once, but we use 1 extra on top and -- 1 extra at bottom so that MusicWheelItems don't visually -- appear/disappear too suddenly while quickly scrolling through the wheel. -- For this file ...
ti9_radiance = class({}) function ti9_radiance:GetDuration() return -1 end function ti9_radiance:GetEffectName() return "particles/econ/events/ti9/radiance_owner_ti9.vpcf" end function ti9_radiance:GetEffectAttachType() return PATTACH_ABSORIGIN_FOLLOW end function ti9_radiance:AllowIllusionDuplicate() ...
--POSIX threads binding for Linux, OSX and Windows. --Written by Cosmin Apreutesei. Public Domain. if not ... then return require'pthread_test' end local ffi = require'ffi' local lib = ffi.os == 'Windows' and 'libwinpthread-1' or 'pthread' local C = ffi.load(lib) local H = {} --header namespace local M = {C = C, H =...
-- Forged Alliance Forever mod_info.lua file -- -- Documentation for the extended FAF mod_info.lua format can be found here: -- https://github.com/FAForever/fa/wiki/mod_info.lua-documentation name = "Forged Alliance Forever" version = 1337 _faf_modname = 'balancetesting' copyright = "Forged Alliance Forever Community" ...
local _ local LAM = LibStub:GetLibrary("LibAddonMenu-2.0") function BUI.CIM.InitModule(m_options) m_options["attributeIcons"] = true m_options["triggerSpeed"] = 10 m_options["condenseLtooltip"] = false m_options["enhanceCompat"] = false m_options["rhScrollSpeed"] = 50 return m_options end function BUI.CIM.S...
loveframes = require("loveframes") tween = require("loveframes/tween") win = {} text = "Click the button to generate a name" win.width, win.height, win.flags = love.window.getMode() function love.load() love.graphics.setBackgroundColor(1,1,1,1) --White love.graphics.setColor(0,0,0,1) --Black font = love.g...
DeriveGamemode( "sandbox" ) include("modules/buymenu.lua") --function GM:Initialize() -- Do stuff --end
#!/bin/sh _=[[ . "${0%/*}/regress.sh" exec runlua -r5.2 "$0" "$@" ]] local unix = require"unix" local unsafe = require"unix.unsafe" local regress = require"regress".export".*" if unix.F_GETPATH then local fh = check(io.open("/etc/passwd", "r")) local path = check(unix.fcntl(fh, unix.F_GETPATH)) info("opened '/et...
GM.BodyParts = {HEAD = 1, BODY = 2, RARM = 3, LARM = 4, RLEG = 5, LLEG = 6} local Ply = FindMetaTable("Player") Ply.Health = {} function Ply:ResetMedical() self.Health = { [GAMEMODE.BodyParts.HEAD] = {}, [GAMEMODE.BodyParts.BODY] = {}, [GAMEMODE.BodyParts.RARM] = {}, [GAMEMODE.Body...
-- http://stackoverflow.com/questions/11070623/lua-send-mail-with-gmail-account -- http://stackoverflow.com/questions/29312494/sending-email-using-luasocket-smtp-and-ssl -- Michal Kottman, 2011, public domain local socket = require 'socket' local smtp = require 'socket.smtp' local ssl = require 'ssl' local https = requ...
--- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by lhq. --- DateTime: 2021/7/18 17:39 --- local result = redis.call('set', KEYS[1], KEYS[2], 'ex', KEYS[3], 'nx') if result == false then return 0 else type(result) == 'table' and result['ok'] == 'OK' then return 1 end return 0
enchantments = {} local vampiric = { name = "Vampiric", prefix = "vampiric", description = "Drains health from your enemies and gives it to you.", tags={"unholy"}, requires_tags={"sharp"}, itemType="weapon", subType="melee" } function vampiric:after_damage(item,possessor,target,damage) if (random(1,2) ...
local pps = require('pipes') local log = require('pipes.logger') pps.dispatch('error', function(err) log.error('boot caught err:'..err) end) local sock = require('pipes.socket') log.info('boot service start', true, 123, 88.99) --error('boot error test') --local n = table.unpack(nil) --[[ share table test ]] loca...
-- Copyright 2017-2018 Dirk Brenken (dev@brenken.org) -- Copyright 2020 muink <https://github.com/muink> -- This is free software, licensed under the Apache License, Version 2.0 local m, s, o local fs = require("nixio.fs") local util = require("luci.util") local input = "/tmp/pcap-dnsproxy-error.log" if not fs.a...
local find_call = SteamUserStats.FindLeaderboard("Quickest Win") local download_requested = false local download_call = -1 local lb = -1 local done = false local lb_data = {} function onGUI() if not done then if not download_requested and SteamUtils.IsAPICallCompleted(find_call) then Engine.logError("Download...
--===========================================================================-- -- -- -- NgxLua.Net.MQTT.Proxy -- -- -- ...
---@class Framework.event.Event ---@field private target ---@field private currentTarget ---@field private name string ---@field private data table Event = class("Framework.event.Event") Event.COMPLETE = "COMPLETE" function Event:ctor(name, data) self.name = name self.data = data end function Event:GetTarget...
ESX.RegisterServerCallback( "esx_inventoryhud:getStorageInventory", function(source, cb, storage) local targetXPlayer = ESX.GetPlayerFromId(target) local weapons, items, blackMoney TriggerEvent( "esx_datastore:getSharedDataStore", storage, function(st...
ESX = nil Citizen.CreateThread(function() while ESX == nil do TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) Citizen.Wait(0) end while ESX.GetPlayerData().job == nil do Citizen.Wait(10) end PlayerData = ESX.GetPlayerData() end) RegisterNetEvent('esx:player...
ImportScript("Library/LibTagging.lua") PedSetUniqueModelStatus(7, -1) PedSetUniqueModelStatus(14, -1) F_TableStuff = function() tblSchoolTags = { { id = TRIGGER._4_G4_SCHOOLTAG2, poster = TRIGGER._4_G4_SCHOOLPOSTER02, bCheckTag = true, tagName = "SchoolTagEntranceA", startN...
local Spatial_Weight_BN, parent = torch.class('cudnn.Spatial_Weight_BN', 'nn.SpatialConvolution') local ffi = require 'ffi' local find = require 'cudnn.find' local errcheck = cudnn.errcheck local checkedCall = find.checkedCall function Spatial_Weight_BN:__init(nInputPlane, nOutputPlane,flag_adjustScale, N_scale, ...
local exports = {} local string = require("string") local sax = require("../sax") exports["parseStartTag"] = function (test) local parser = sax.Parser:new() local startTagCount = 0 parser:on("startTag", function(name) startTagCount = startTagCount + 1 test.equal(name, "DocumentElement") end) parser:...
local config = require "config" local puremagic = require "util.puremagic" local log = require "log" local sformat = string.format local iopen = io.open local via_content = puremagic.via_content local M = {} function M.get_content(filepath) local f = iopen(filepath, "rb") if not f then return end...
local version = require("orange.version") local args_util = require("bin.utils.args_util") local logger = require("bin.utils.logger") local cmds = { start = "Start the Orange Gateway", stop = "Stop current Orange", restart = "Restart Orange", reload = "Reload the config of Orange", store = "Init/Up...
--[[ ------------------------------------ Description: HPC Vehicle Triggered Portals (OWV Server), Phasor V2+ Copyright (c) 2016-2018 * Author: Jericho Crosby * IGN: Chalwk * Written and Created by Jericho Crosby Script Version: 2.5 ----------------------------------- ]]-- -- Rocket Hog on top of Turret Mountain - Ove...
----------------------------------- -- Area: Apollyon Central -- Mob: Gunpod ----------------------------------- local loot = { [1] = -- AF { { {itemid = 1933, droprate = 9}, -- MNK {itemid = 1931, droprate = 53}, -- WAR {itemid = 1959, droprate = 6}, -- SMN ...
-- -- premake5 file to build RecastDemo -- http://premake.github.io/ -- local action = _ACTION or "" local todir = "Build/" .. action solution "recastnavigation" configurations { "Debug", "Release" } location (todir) -- extra warnings, no exceptions or rtti flags { "ExtraWarnings", "FloatFast", "Sym...
local idevice_log, fmt = suppl_add_logfn("idevice"); local touchm_evlog = function(msg) idevice_log("submodule=touch:classifier=touch:" .. msg); end local function init(scaled, prof) prof.scaled = scaled; end local function sample(dev, io) -- ignore other sample types for the time being if not io.touch then retu...
-------------------------------------------------------------------------------- -- init.lua -------------------------------------------------------------------------------- local INFO_MSG = tengine.INFO_MSG local DEBUG_MSG = tengine.DEBUG_MSG local ERROR_MSG = tengine.ERROR_MSG local class = require "lib.middleclass"...
object_static_worldbuilding_terminal_wall_door_keypad_01 = object_static_worldbuilding_terminal_shared_wall_door_keypad_01:new { } ObjectTemplates:addTemplate(object_static_worldbuilding_terminal_wall_door_keypad_01, "object/static/worldbuilding/terminal/wall_door_keypad_01.iff")
module('luci.controller.log', package.seeall) function index() entry({'admin', 'services', 'log'}, firstchild(), _('Log'), 22).acl_depends = { 'luci-app-log' } entry({'admin', 'services', 'log', 'messages'}, view('log/multilog/messages'), _('messages'), 10) entry({'admin', 'services', 'log', 'secure'}, view('log/mu...
object_draft_schematic_munition_beast_steroid_raptor_rat_mk2 = object_draft_schematic_munition_shared_beast_steroid_raptor_rat_mk2:new { } ObjectTemplates:addTemplate(object_draft_schematic_munition_beast_steroid_raptor_rat_mk2, "object/draft_schematic/munition/beast_steroid_raptor_rat_mk2.iff")
print('testing load') macros.inner = function(next_char) return 'abc' end macros.outer = function(next_char) return "@inner" end local f, e = load([[ abc = 5 assert(@outer + @inner == 10) ]]) assert(f) f()
-------------------------------------------------------------------------------- --- Head: Require -- -- Standard awesome library local gears = require("gears") local awful = require("awful") require("awful.autofocus") -- -- Tail: Require ------------------------------------------------------------------------------...
local ffi = require("ffi") local base = require("resty.core.base") local ffi_gc = ffi.gc local ffi_str = ffi.string local C = ffi.C local get_request = base.get_request base.allows_subsystem("http") ffi.cdef[[ typedef unsigned char u_char; typedef struct { size_t len; u_char *data; } ngx_str_t; typ...
function fibonacci(number) if number >= 2 then local t = {0,1} while #t < number do t[#t + 1] = t[#t-1] + t[#t] end return t[#t] elseif number == 1 then print(0) end end print(fibonacci(7))
--[[ @ Instance2 @ colbert2677 @ October 12, 2019 Library for improved object instancing. --]] local Instance2 = {} -- Classic Instance.new with better support for parent argument function Instance2.new(className, parent) local object = Instance.new(className) if parent then object.Parent = parent end ...
--[[ .______ ______ _______. _______. ____ ____ _______. .______ __ ___ ____ ____ _______ .______ _______. | _ \ / __ \ / | / | \ \ / / / | | _ \ | | / \ \ \ / / | ____|| _ \ / | | |_) ...
local query = {} local function comma_separated_query(t) local result = "" for k, v in pairs(t) do result = result .. tostring(v) .. "," end return (result:sub(1, - 2)) end query.stringify = function (q) local result = '?' for name, value in pairs(q) do if name == "collections" or name == "recta...
--[[ Keepa API The Keepa API offers numerous endpoints. Every request requires your API access key as a parameter. You can find and change your key in the keepa portal. All requests must be issued as a HTTPS GET and accept gzip encoding. If possible, use a Keep-Alive connection. Multiple requests can be made in...
local _M = { _VERSION = '0.01', w = 0, l = 0 } local setmetatable = setmetatable mt = { __index = _M } function _M:new(w,l,o) o = o or {} self.w = w self.l = l setmetatable(o,mt) return o end function _M:per() return self.w * self.l end return _M
ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) function showNotification(src, msg) TriggerClientEvent('esx:showNotification', src, msg) end RegisterServerEvent('moneywash:process') AddEventHandler('moneywash:process', function() local source = source local xPlayer...
array_operation = {"Razlici", "Zbiru"}
-- test_socketacceptor.lua local Computicle = require("Computicle"); local acceptsink = Computicle:create([[require("AcceptHandler")]]) local comp = Computicle:create([[require("SocketAcceptor")]], {sink1=acceptsink:getStoned()}); comp:waitForFinish();
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- F I N A L C U T P R O A P I -- -----------------------------------------------------------------------------...
local QtCore = require 'qtcore' local QtGui = require 'qtgui' local QtWidgets = require 'qtwidgets' local app = QtWidgets.QApplication.new(1, {}) local btn = QtWidgets.QPushButton.new("Hello World!") btn:connect('pressed()', function(self) print("I'm about to close...") self:close() end) btn:setWindowTitle(...
if not RCT then return end local RCT = RCT RCT.classes = { Mage = "MAGE", Paladin = "PALADIN", Warrior = "WARRIOR", Druid = "DRUID", DeathKnight = "DEATHKNIGHT", Hunter = "HUNTER", Priest = "PRIEST", Rogue = "ROGUE", Shaman = "SHAMAN", Warlock = "WARLOCK", Monk = "MONK", DemonHunter = "DEMONHUNTE...
AddCSLuaFile( "shared.lua" ); AddCSLuaFile( "cl_init.lua" ); include( "shared.lua" ); function ENT:SelectRandomProblem() local id = table.Random( table.GetKeys( GAMEMODE.Subsystems ) ); self:SelectProblem( id ); end function ENT:SelectProblem( id ) local ss = GAMEMODE.Subsystems[id]; self:SetSubsystem( id );...
local discordia = require("discordia") local classes = discordia.class.classes local FFmpegProcess = classes.FFmpegProcess local floor = math.floor local insert = table.insert local uv = require('uv') local yield, resume, running = coroutine.yield, coroutine.resume, coroutine.running local function onExit() end local ...
-------------------------------------------------------------------------- -- GTFO_Spells_BC.lua -------------------------------------------------------------------------- --[[ GTFO Spell List - Burning Crusade Author: Zensunim of Malygos ]]-- GTFO.SpellID["40611"] = { --desc = "Blaze (Illidan)"; sound = 1; }; GTF...
local TcpCbServer = class("TcpCbServer") function TcpCbServer:ctor() self.Service = nil; self.ConnectCallbackEvent = ""; self.DisConnectCallbackEvent = ""; end function TcpCbServer:Listen( name, port ) self.ConnectCallbackEvent = name .. "Connection"; self.DisConnectCallbackEvent = name .. "DisConnection"; ...
-- TOWING REMOVALS @ DOCKS removeWorldModel(3623, 60, 2510.642578125, -2566.6826171875, 22.095170974731) removeWorldModel(3709, 60, 2510.642578125, -2566.6826171875, 22.095170974731) removeWorldModel(3578, 60, 2510.642578125, -2566.6826171875, 22.095170974731) removeWorldModel(1413, 60, 2510.642578125, -2566.682617...
--------- [ Element Data returns ] --------- local function getData( theElement, key ) local key = tostring(key) if isElement(theElement) and (key) then return exports['[ars]anticheat-system']:c_callData( theElement, tostring(key) ) else return false end end local function setData( theElement, key, value )...
exiled_gungan = Creature:new { objectName = "@mob/creature_names:mordran_gungan_exile", socialGroup = "borvo", faction = "borvo", level = 40, chanceHit = 0.44, damageMin = 345, damageMax = 400, baseXp = 3915, baseHAM = 9300, baseHAMmax = 11300, armor = 0, resists = {0,0,0,0,0,0,0,0,-1}, meatType = "", mea...
local DistanceRTPC = { Properties = { Target = EntityId(), MaxDistance = 100, RTPC = "" } } function DistanceRTPC:OnActivate() self.listener = TransformNotificationBus.Connect(self, self.Properties.Target) end function DistanceRTPC:OnTransformChanged(localTM, worldTM) -- ...
local cartridge = require('cartridge') local function eval_handler(req) local resp = req:render({json = { data = loadstring(req:json().eval_string)() }}) return resp end local function init(opts) -- luacheck: no unused args local httpd = assert(cartridge.service_get('httpd'), "Failed to get httpd serivce"...
-- Scooby-Doo! Night of 100 Frights (NTSC-U v1.0) local core = require("games.core") return core.newGame(0x801AD440)
minetest.register_node("plasticbox:plasticbox", { description = "Plastic Box", tiles = {"plasticbox_white.png"}, is_ground_content = false, groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1}, sounds = default.node_sound_stone_defaults(), paramtype2 = "color", palette = "unifieddyes...
-- This is the platform specific board configuration file -- It is used by the generic board configuration system (config/) module( ..., package.seeall ) -- Add specific components to the 'components' table function add_platform_components( t, board, cpu ) end -- Add specific configuration to the 'configs' table fu...
--- -- @classmod GameSettings local middleclass = require("middleclass") local typeutils = require("typeutils") --- -- @table instance -- @tfield number side_count local GameSettings = middleclass("GameSettings") --- -- @function new -- @tparam number side_count [0, ∞) -- @treturn GameSettings function GameSettings...
local lutil = { } local lfs = require 'lfs' local inside = function (array, element, cmp) if cmp == nil then cmp = function (x, y) return x == y end end for i, v in ipairs(array) do if cmp(v, element) then return true end end return false end -- input: rusage tpye -- output: usertime + system time in second lo...
module ("mi.module.miota", package.seeall) local json = require("cjson") local util = require("mi.miutil") local client = require("mi.util.mihttp") local logger = require("mi.milogger") local crypto = require("mi.util.micrypto") local SERVER_CONFIG = 0 local SERVER_CONFIG_ONLINE_URL = "http://api...
--[[ FastAPI No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) The version of the OpenAPI document: 0.1.0 Generated by: https://openapi-generator.tech ]] -- http_validation_error class local http_validation_error = {} local http_validation_error_m...
-- It is an easy script for multi-gpu training in Torch7. require 'optim' require 'nn' require 'cutorch' require 'cunn' require 'torch' torch.setdefaulttensortype('torch.FloatTensor') local conv_net = nn.Sequential() local concat = nn.ConcatTable() concat:add(nn.SpatialConvolution(3,3,3,3,1,1,1,1):noBias()) concat:ad...
--ZFUNC-explode-v1 local function explode( str, delimiter, limit ) --> strlst limit = limit or 4294967296 if limit == 0 then limit = 1 end if limit == 1 then return { str } end local strlst = {} local position = 1 local s, e = string.find( str, delimiter, position, true ) local cond = function( s...
local gridSize = 7 local rif = dofile("/lib/rif.lua") local fontW, fontH = gpu.font.data.w, gpu.font.data.h local running = true local width, height = gpu.width, gpu.height local translateX = math.floor((width - (gridSize) * 16) / 2) local translateY = math.floor((height - (gridSize + 1) * 16) / 2) local curs = ri...
--- -- @author wesen -- @copyright 2019 wesen <wesen-ac@web.de> -- @release 0.1 -- @license MIT -- local ObjectUtils = require("LuaORM/Util/ObjectUtils") local SettingValueList = require("LuaORM/Util/SettingValueList/SettingValueList") --- -- Represents a SQL data type for TableColumn's. -- -- @type DataType -- local...
require "lib.classes.class" local LoveUIComponent = require("lib.ui.love_ui_components.LoveUIComponent") -------------------------------------------------------------------------------------------------------- -- class: PolygonUIComponent -- param: mode:("fill" or "line") -> defines the way to define the polygon, "fil...
-- Copyright 2020 Intel Corporation, Inc -- Licensed to the public under the Apache License 2.0. module("luci.controller.rest_v1.firewall_rest", package.seeall) local uci = require "luci.model.uci" json = require "luci.jsonc" io = require "io" sys = require "luci.sys" utils = require "luci.controller.rest_v1.utils" ...
local auth = require('lib.auth_service_provider') local redis = require('lib.redis') local _M = {} function _M:verify_password(password, user_password) if hash(password) == user_password then return true end return false end function _M:notify(phone) -- you can send a message to message queue...
local addonName = ... local L = LibStub("AceLocale-3.0"):NewLocale(addonName, "enUS", true, true) if L then --@localization(locale="enUS", format="lua_additive_table", same-key-is-true=true)@ end
Locales['de'] = { ['inventory'] = 'Inventar', ['use'] = 'benutzen', ['give'] = 'geben', ['remove'] = 'entfernen', ['return'] = 'zurück', ['amount'] = 'Betrag', ['amount_invalid'] = 'ungültiger Betrag', ['players_nearby'] = 'keine Spieler in der Nähe', ['ex_inv_lim'] = 'Aktion nicht möglich, inventarli...
-- -- Agario Checkers - Checkers-like game with inspiration from agar.io -- Copyright (C) 2015-2018 Delwink, LLC -- -- Redistributions, modified or unmodified, in whole or in part, must retain -- applicable copyright or other legal privilege notices, these conditions, and -- the following license terms and disclaimer. ...
-- Dry Dirt (copied from ethereal) minetest.register_node("fractured:dry_dirt", { description = "Dried Dirt", tiles = {"ethereal_dry_dirt.png"}, is_ground_content = false, groups = {crumbly=3} --, --sounds = default.node_sound_dirt_defaults() }) -- scorched trunk copied from ethereal minetest.register_node("...
-- Copyright (C) by Jianhao Dai (Toruneko) local timer = require "resty.influx.metrics.timer" local counter = require "resty.influx.metrics.counter" local averager = require "resty.influx.metrics.averager" local histogram = require "resty.influx.metrics.histogram" local pairs = pairs local setmetatable = setmetatable...
--[[ Xmp.lua --]] local Xmp, dbg = Object:newClass{ className = "Xmp", register = true } --- Constructor for extending class. -- function Xmp:newClass( t ) return Object.newClass( self, t ) end --- Constructor for new instance. -- -- @return new image instance, or nil. -- @return error m...
local utils = require("Module:TemplateUtils") local json = require("Dev:Json") local p = {} local totalNumberOfCards = 1394 local totalNumberOfOtherCards = 378 local setNames = {} setNames["D"]="Starter set" setNames["ORI"]="Origins" setNames["BFZ"]="Battle for Zendikar" setNames["OGW"]="Oath of the Gatewatch" se...
-- Torch/Lua Ball tracking using a Kalman Filter -- (c) 2013 Stephen McGill local libKalman = require'libKalman' local torch = require 'torch' local cov_debug = false local prior_debug = true local libBallTrack = {} local tmp_rotatation = torch.Tensor(2,2) local DEFAULT_VAR = 100*100 local EPS = .1/(DEFAULT_VAR*DEFAUL...
#!/usr/bin/env lua function eprint(...) io.stderr:write(...) io.stderr:write'\n' end function readfile(path) eprint('readfile: ', path) local f = io.open(path) local content = f:read('*a') f:close() return content end files={} for i=1,#arg do files[arg[i]:gsub('.*jln/', '')] = {readfile(arg[i]), true...
require "lua/tools" header("Amap") local amap = Amap("int") print(pad("amap #"..#amap), amap) amap[2] = 22 amap[17] = 100 amap[4] = 33 amap[-1000] = 512 amap[99] = 999 amap[1] = 0 print(pad("amap #"..#amap), amap) print(pad("amap:Find(5)"), amap:Find(5)) print(pad("amap:Find(99)"), amap:Find(99)) print(pad("amap[4]"),...
local status, err = pcall( function() a = "a" + 1 end ) print(err)