content
stringlengths
5
1.05M
module('http', package.seeall) http.request = { method = os.getenv('REQUEST_METHOD'), query = os.getenv('QUERY_STRING'), uri = os.getenv('REQUEST_URI'), headers = { contentLength = tonumber(os.getenv('CONTENT_LENGTH')), contentType = os.getenv('CONTENT_TYPE'), host = os.getenv('HTTP_HOST'), use...
local Packages = script:FindFirstAncestor("CmdrAdditions").Packages local UI = script:FindFirstAncestor("UI") local Roact = require(Packages.Roact) local CmdrContext = require(UI.CmdrContext) local EventController = require(script.EventController) local EventTypes = require(script.EventTypes) local EventManager = R...
local formatter = require'irc-formatter' describe('irc-formatter', function() it('should allow creating a formatter with empty defaults', function() assert.is_table(formatter.new()) assert.is_table(formatter.new({})) end) it('should allow creating a formatter with invalid defaults', function() asser...
-- Routine for NPC "Inina" in the sewers velocity = 40 loadRoutine = function(R, W) if (not W:isConditionFulfilled("npc_inina2","talked")) then R:setTilePosition(6,17) R:setFacingDown() R:setLooped(false) R:setReloadEnabled(true) return end R:setTilePosition(3,15) R:setReloadEnabled(false) R:setFa...
nyagos.alias.open = function(args) local count=0 for i=1,#args do local list=nyagos.glob(args[i]) if list and #list >= 1 then for j=1,#list do if nyagos.access(list[j],0) then assert(nyagos.shellexecute("open",list[j])) else...
local button = { x = 1, y = 1, w = 11, h = 2, text = "A button", backColour = colours.cyan, foreColour = colours.white, selected = false, visible = true, type = "button", marginleft = 0, margintop = 0, automl = "", automt = "", autow = "perc:50", wrap = "left", autoh = true, } button.__index = button ...
-- // Militan tarafından yeniden kodlandı. mysql = exports.mrp_mysql local streams = {} function fetchStation() streams = { [0] = { "Radio Off", "" }, } local count = 0 dbQuery( function(qh) local res, rows, err = dbPoll(qh, 0) if rows > 0 then for index, row in ipairs(res) do table.insert(stream...
-- Copyright (C) by Jianhao Dai (Toruneko) local averager = require "resty.influx.metrics.averager" local context = require "resty.influx.metrics.timer.context" local setmetatable = setmetatable local _M = { _VERSION = '0.0.1' } local mt = { __index = _M } function _M.new(key, name) return setmetatable({ ...
MusicWheelSort = {} function MusicWheelSort.by_difficulty(a, b) if (a.level == b.level and a.title == b.title) then -- For rare cases where stepfile author has set the same difficulty to multiple -- stepcharts, make sure they are in difficulty order at least return DifficultyIndex[a.difficulty] < Difficu...
local class = require 'middleclass' local index = require 'hisdb.index' local object = require 'hisdb.object' local poll = require 'hisdb.poll' local info = require 'hisdb.info' local hisdb = class('hisdb.hisdb') function hisdb:initialize(folder, durations, default_duration) self._durations = durations self._index_...
Locales['en'] = { ['blanchisseurblip'] = 'Launderer', ['press_menu'] = 'Press on ~INPUT_CONTEXT~ to whiten your ~y~Dirty money', ['Nothere'] = 'Come back later ...', ['Whitening'] = 'Whitening in progress ...', ['Nocash'] = 'You do not have enough money to launder, minimum : $', ['cash'] = 'You ...
function Structures:CreateShops() for _,v in ipairs(Entities:FindAllByName("target_mark_containers_shop_duel")) do local DuelShop = CreateItemOnPositionSync(v:GetAbsOrigin(), nil) DuelShop:SetModel("models/heroes/shopkeeper/shopkeeper.vmdl") DuelShop:SetForwardVector(Vector(0, -1, 0)) DuelShop:SetModelScale(1....
local json = require "json" local param = require "param" local util = require "util" local database = require "database" local types = require "types" local id = param.id local typeName = param.type if util.isNotEmpty(typeName) then if types[typeName] then local db = database.connect() local op = ...
local Prop = {} Prop.Name = "Subs Apartment 103" Prop.Cat = "Apartments" Prop.Price = 750 Prop.Doors = { Vector( -3469, 9537, 758 ), Vector( -3515, 9191, 758 ), Vector( -3257, 9229, 758 ), Vector( -3257, 9413, 758 ), } GM.Property:Register( Prop )
return setmetatable({}, { -- map any name to itself to silence warnings __index = function(_, k) return k end })
dofile("table_show.lua") dofile("urlcode.lua") JSON = (loadfile "JSON.lua")() local urlparse = require("socket.url") local http = require("socket.http") local item_value = os.getenv('item_value') local item_type = os.getenv('item_type') local item_dir = os.getenv('item_dir') local warc_file_base = os.getenv('warc_file...
local meta = FindMetaTable( "Player" ) if ( !meta ) then return end -- In this file we're adding functions to the player meta table. -- This means you'll be able to call functions here straight from the player object -- You can even override already existing functions. --[[-------------------------------------------...
return { Inventory = { -- CS-1 TAIPAN / Mod / Muzzle / Common -- 2x Damage Multiplier when attacked from stealth, Reduces base damge by 30%. { id = "Items.w_silencer_01" }, -- XC-10 ALECTO / Mod / Muzzle / Rare -- 2.5x Damage Multiplier when attacked from stealth, 15% Reduced damage. { id = "Items.w_sile...
do --- debug.* smoke tests assert(not pcall(debug.getinfo, 1, '>S')) assert(not pcall(debug.getinfo, 1, '>f', 'boo')) end
config = { pool_id = "mongodb_test", size = 1, database="admin", auth_source="core", login="vmq_auth_source_test_user", password="vmq_auth_source_test_password", w_mode = "safe" } assert(mongodb.ensure_pool(config)) assert(mongodb.delete("mongodb_test", "users", {})) doc1 = {_id = 'test-i...
require("sqlite3") local _dbPath print(BASE_DOCUMENT_PATH) local _db local _shouldCacheStatements = true; local _cacheStmts = {}; local _cacheIndexColumNameMap = {}; local DB = {} function DB.init(path) _dbPath = BASE_DOCUMENT_PATH.."/"..path; _db = sqlite3.open(_dbPath); end local function _getColumIndex(sql,st...
__ENV_ID = __OBJECT_TYPE .. "." .. __OBJECT_ID; Object = {type = __OBJECT_TYPE, id = __OBJECT_ID}; __INIT_ARG_TABLE = {}; Local = {}; local ArgMirror = require('obe://Lib/Internal/ArgMirror'); function ObjectInit() local Lua_Func_ArgList = ArgMirror.GetArgs(Local.Init); local Lua_Func_CallArgs = {}; for ...
local defconfig={uart.getconfig(0)} do local initTO=tmr.create() initTO:alarm(300,tmr.ALARM_SINGLE,function(timer) uart.on("data") uart.alt(0) uart.setup(0,unpack(defconfig)) print("AA response timeout"); initTO=nil end) uart.alt(1) uart.on("data","\n",funct...
return Component.create("Angel", {})
-- Copyright (c) 2015 — 2016, Aapo Talvensaari -- Copyright 2016 The Charon Platform Authors. -- All rights reserved. -- Use of this source code is governed by a BSD-style -- license that can be found in the LICENSE file. local json = require 'charon.json' json.pretty = function(dt, lf, id, ac, ec) local s, e = (...
--[[ Name: sv_economy.lua ----------------------------------------------------------------- -- @package VrZn - Custom Gamemode (SRP BASE) -- @author Nodge -- @build Beta 1 ----------------------------------------------------------------- ]]-- hook.Add( "GamemodePlayerSelectCharacter", "NetworkEconData"...
------------------------------------------------------------------------------- -- Module Declaration -- local plugin = BigWigs:NewPlugin("Super Emphasize") if not plugin then return end ------------------------------------------------------------------------------- -- Locals -- local media = LibStub("LibSharedMedia...
local ffi = require'ffi' if ffi.os == 'Windows' then return require'jit.vmdef_windows' elseif ffi.os == 'Linux' then return require'jit.vmdef_linux' elseif ffi.os == 'OSX' then return require'jit.vmdef_osx' else error('jit.vmdef_'..ffi.os:lower()..' missing') end
modifier_spectre_ultimate = class({}) function modifier_spectre_ultimate:OnCreated(params) self.bonus_damage = self:GetAbility():GetSpecialValueFor("bonus_damage") if IsServer() then if self:GetCaster() == self:GetParent() then self:GetParent():AddNewModifier(self:GetParent(), self:GetAbil...
---- -- Teleport submenu. -- -- Extends `menu.Submenu`. -- -- **Source Code:** [https://github.com/dstmodders/mod-dev-tools](https://github.com/dstmodders/mod-dev-tools) -- -- @classmod submenus.TeleportSubmenu -- @see menu.Submenu -- -- @author [Depressed DST Modders](https://github.com/dstmodders) -- @copyright 2020 ...
-- -- bluetooth.lua -- bluetooth daemon -- -- Dependencies: -- bluez -- bluez-utils -- -- Signals: -- daemon::bluetooth::status -- active (boolean) -- local awful = require("awful") local helpers = require("helpers") -- ======================================== -- Config -- ======================================...
dofile("common.inc"); Button = {}; Button[0] = makePoint(45, 60); --NW Button[1] = makePoint(75, 62); --NE Button[2] = makePoint(45, 87); --SW Button[3] = makePoint(75, 91); --SE Button[4] = makePoint(59, 51); --N Button[5] = makePoint(60, 98); --S Button[6] = makePoint(84, 74); --E Button[7] = makePoint(37, 75); --W ...
---------------------------------- DATA STORAGE --------------------------- -- Entity -- local dsE = {} dsE.type = "container" dsE.name = "DataStorage" dsE.icon = "__Mobile_Factory_Graphics__/graphics/matter-serialization/DataStorageI.png" dsE.icon_size = 64 dsE.flags = {"placeable-neutral", "player-creation"} dsE.min...
--------------------------------------------- -- Cannibal Blade --------------------------------------------- require("scripts/globals/automatonweaponskills") require("scripts/globals/settings") require("scripts/globals/status") require("scripts/globals/msg") --------------------------------------------- function onMo...
require('torch') nn = {} -- define the global nn table require('nn.THNN') require('nn.utils') require('nn.ErrorMessages') require('nn.Module') require('nn.Container') require('nn.Concat') require('nn.Parallel') require('nn.Sequential') require('nn.DepthConcat') require('nn.Linear') require('nn.Bilinear') require...
-- NetHack 3.7 Ranger.des $NHDT-Date: 1432512783 2015/05/25 00:13:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ -- Copyright (c) 1989 by Jean-Christophe Collet -- Copyright (c) 1991 by M. Stephenson -- NetHack may be freely redistributed. See license for details. -- des.level_init({ style = "solidfill", fg = " " ...
local lib={} lib.internal={} function lib.internal.range_adjust(f,l,s) checkArg(1,f,'number','nil') checkArg(2,l,'number','nil') checkArg(3,s,'number') if f==nil then f=1 elseif f<0 then f=s+f+1 end if l==nil then l=s elseif l<0 then l=s+l+1 end return f,l end function lib.internal.table_view(tbl,f,l) ret...
local wibox = require('wibox') local beautiful = require('beautiful') local naughty = require('naughty') local gears = require('gears') local dpi = beautiful.xresources.apply_dpi local helpers = require('helpers') local button_container = require('ui.widgets.button') local ui_notif_builder = {} -- Notification icon...
-- Setup Colors {{{ local status_ok, theme = pcall(require, "lualine.themes.tokyonight") if not status_ok then return end lvim.builtin.lualine.options.theme = theme --- Set colorscheme for a lualine section -- @param section Name of section -- @param conifg Configuration table local function lualine_color(section...
local M = {} --- a benchmark current statusline. it need plenary.nvim M.benchmark = function() local Comp = require('windline.component') local windline = require('windline') local api = vim.api local num = 1e4 local bench = require('plenary.profile').benchmark local statusline = '' local b...
-- ========================================= -- VmkachBot, a Lua Telegram bot for chats -- Copyright (c) 2019 Evgeny Shulgin, MIT License -- ========================================= -- Library includies local requests = require("requests") local inspect = require("inspect") local json = require("cjson") local stringy...
-- Toggle display of water depth --[====[ twaterlvl ========= Toggle between displaying/not displaying liquid depth as numbers. ]====] df.global.d_init.flags1.SHOW_FLOW_AMOUNTS = not df.global.d_init.flags1.SHOW_FLOW_AMOUNTS print('Water level display toggled.')
local Players = game:GetService("Players") local Modules = Players.LocalPlayer.PlayerGui.AvatarEditorInGame.Modules local SearchesInCatalog = require(Modules.AvatarExperience.Catalog.Reducers.SearchesInCatalog) -- local SearchesInLibrary = require(Modules.LuaApp.Reducers.SearchesInLibrary) return function(state, acti...
--[[ file meta info @file Cache.lua @brief Cache functions to build table with data from client --]] --[[ @brief Accessing the addons private table @var _ addonName, thrown away @var wt Global addonTable --]] local _, wt = ... --[[ @brief Tables for Spell Cache @var wt.spellInfoCache Global table fo...
-- Localize local cwd = (...):gsub("%.[^%.]+$", "") .. "." local dhcpd = require(cwd .. "dhcp.server") local _M = { _VERSION = "1.0.0.1", _DESCRIPTION = "It is the app entry ..." } local function dhcpd_callback(op, packet, options) return { yiaddr = "10.10.0.5", options = { sub...
UIMenuStatsItem = setmetatable({}, UIMenuStatsItem) UIMenuStatsItem.__index = UIMenuStatsItem UIMenuStatsItem.__call = function() return "UIMenuItem", "UIMenuStatsItem" end ---New ---@param Text string ---@param Items table ---@param Index number ---@param Description string ---@param Counter boolean function UIMenuSt...
Missions = Missions or {} --- Disable a ship by destroying its engines and force it to stop. --- --- Assuming the ship has it, the Impulse Drive, Warp Drive and Jump Drive have to be destroyed. --- --- @param self --- @param target CpuShip|function --- @param config table --- @field approachDistance (default: `10000...
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf/protobuf" module('MilitaryRecord_pb') MILITARYRECORD = protobuf.Descriptor(); local MILITARYRECORD_MILITARY_RANK_FIELD = protobuf.FieldDescriptor(); local MILITARYRECORD_MILITARY_RANK_HIS_FIELD = protobuf.FieldDescriptor(); local MILITARYRE...
package.path = "../?.lua;"..package.path; --[[ A program to iterate the Windows/fonts directory, looking for .ttf files, and putting them into a table. ]] local ffi = require("ffi") local C = ffi.C local blapi = require("blend2d.blend2d") local errors = require("blerror") local fsys = require("filesystem") l...
local View = {} local mazeConfig = require "config.mazeConfig" local UserDefault = require "utils.UserDefault" local LeftMapX; local LeftMapY; local MiniMapWidth = 210; local MiniMapHeight = 330; local MapCenter; local scaleWidth local scaleHeight function View:Start(data ) -- Minimap self.view = CS....
local State = require 'squeak.state' describe('State', function() it('works at all', function() assert.are.equal('table', type(State)) end) end)
--- -- Sequential and parallel stream processing library for Lua -- -- local t={} local main_mt={} local mt={} --- -- Creates an empty stream function t.new(f) return setmetatable({},mt) end --- -- Evaluates if the passed object is a stream function t.is_stream(obj) return getmetatable(obj)==mt end --- -- Creat...
ITEM.name = "Midnight" ITEM.replacements = "models/nasca/stalker/male_midnight_lone.mdl" ITEM.model = "models/stalker/outfit/sunrise.mdl" ITEM.description = "A Midnight suit." ITEM.longdesc = "This suit is practically identicial in all ways to the PS5-M Universial Protection. However, it is slightly less effective ove...
data:extend( { --electric fly swatter { type = "build-entity-achievement", name = "electric-fly-swat", order = "a[kill]", to_build = "tesla-turret", icon = "__military-extended__/graphics/achievements/fly-swatter.png" }, --storm of bullets { type = "kill-achievement", name = "heavy...
local DrawSystem = class("DrawSystem", System) function DrawSystem:draw() camera:attach() -- draw arena TODO: temporary -- love.graphics.setColor(20, 20, 20) -- love.graphics.rectangle("fill", 0, 0, 1000, 1000) local mapDefinitions = Utils.mapDefinitions love.graphics.draw(ImageController.getImage("map"), ...
local version, postfix = '1.1', '1_1' -- local version, postfix = 'dev', 'dev' local share_name = 'minizip_ffi_mem_share' local so_name = 'libminizip_' .. postfix local ffi = require 'ffi' local DIR_SEP = ffi.os == 'Windows' and '\\' or '/' local mod_path = package.searchpath(share_name, package.path) local pat...
local LOGLEVEL = "debug" local MIN = module:get_option_number("conference_timeout", 10) local TIMEOUT = MIN local is_healthcheck_room = module:require "util".is_healthcheck_room local st = require "util.stanza" local timer = require "util.timer" module:log(LOGLEVEL, "loaded") module:hook("muc-occupant-left", function ...
Extended = {} -- private variables local callbacks = {} -- hooked functions local function onExtendedOpcode(protocol, opcode, buffer) local callback = callbacks[opcode] if callback then callback(protocol, opcode, buffer) end end -- public functions function Extended.init() connect(ProtocolGame, { onExten...
--this is the file that users will run to use hive, it will provide the last resort error handler --this program is assigned to Lupus590 local helpPath = "Hive/src/Help/" local helpDocs = {server = "server.txt", turtle = "turtle.txt", client = "client.txt"} local fileNames = {server = "server.lua", turtle = "tu...
object_tangible_loot_creature_loot_collections_contraband_style1_01 = object_tangible_loot_creature_loot_collections_shared_contraband_style1_01:new { } ObjectTemplates:addTemplate(object_tangible_loot_creature_loot_collections_contraband_style1_01, "object/tangible/loot/creature/loot/collections/contraband_style1_01...
local objects = { --Maxime createObject ( 18024, 1424.40002, -2442.3999, 15.7 ,0, 0, 0 ,38), createObject ( 3037, 1416.09998, -2452.30005, 14.8, 0, 0, 90 ,38), createObject ( 3037, 1428.59961, -2452.2998, 14.8, 0, 0, 90 ,38), createObject ( 1495, 1432.09998, -2441.19995, 12.7 ,0, 0, 0 ,38), createObject ( 1478...
local Ltn12 = require "ltn12" local Json = require "cjson" local Httpc = require "copas.http" local Http = require "socket.http" local Https = require "ssl.https" local M = {} function M.json (options) assert (type (options) == "table") local result = {} options.sink = Ltn12.sink.table (result) options.b...
--[[ 消耗品 --]] local THIS_MODULE = ... local C_LOGTAG = "Consumable" local Consumable = class("Consumable", import(".Item")) -- 构造函数 function Consumable:ctor(type,config) if type == "SERIALIZE" then self:loadSerialize(config) else -- NEW if iskindof(config,"Item") then config = config:saveSerialize() Con...
function Message(msg) print("[TTT WeightSystem] ".. msg .. ".") end
local Chunk = require("__stdlib__/stdlib/area/chunk") function findNestNear(entity, chunk_position) local search = Chunk.to_area(chunk_position) local spawners = entity.surface.find_entities_filtered{area = search, type = "unit-spawner"} if #spawners > 0 then return spawners[math.random(#spawners)] end ...
local SceneManager = require 'squeak.sceneManager' local Scene = require 'squeak.scene' describe('SceneManager', function() local scene, sm before_each(function() scene = Scene() sm = SceneManager() end) it('can add scenes', function() local result = sm:add('first', scene) assert.are.equal(sc...
--*********************************************************** --** THE INDIE STONE ** --*********************************************************** require "TimedActions/ISBaseTimedAction" ---@class ISEjectMagazine : ISBaseTimedAction ISEjectMagazine = ISBaseTimedAction:derive("I...
require("alua") function exitcb(reply) for k, v in pairs(reply) do print("-> " .. k) for i, j in pairs(v) do print(" " .. i .. " = " .. j) end end alua.exit() end function spawncb(reply) local procs = {} for proc in pairs(reply.processes) do table.insert(procs, proc)...
-- player/init.lua dofile(minetest.get_modpath("player_api") .. "/api.lua") -- Default player appearance player_api.register_model("character.b3d", { animation_speed = 30, textures = {"character.png"}, animations = { -- Standard animations. stand = {x = 0, y = 79}, lay = {x = 162, y = 166}, wal...
----------------- -- Ores/blocks -- ----------------- minetest.register_node("gs_ruby:ruby_block", { description = ("Ruby Block"), tiles = {"gs_ruby_block.png"}, is_ground_content = true, groups = {cracky = 3}, }) minetest.register_node("gs_ruby:ruby_ore", { description = ("Ruby Ore"), ...
-- assume that eid is some existing entity id function example_factory_add() font = scene.components.font.add(eid) end function example_factory_get() font, found = scene.components.font.get(eid) end function example_factory_remove() scene.components.font.remove(eid) end function example_component_usage(...
local module = require("ut2-serv.modules") local db = module.load("db") local events = module.load("events") local surface = module.load("glasses.surface") local EventEngine = events.engine EventEngine:subscribe("uiupdate", events.priority.normal, function(handler, evt) -- 1. Update score do -- calculate adv...
--[[ MIT License Copyright (c) 2022 Michael Wiesendanger 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, mod...
local theme = require('tranquility.theme') local highlights = require('tranquility.highlights') local colors = nil local function clear() vim.cmd([[hi clear]]) vim.cmd([[if exists("g:syntax_on") | syntax reset | endif]]) end local function setup(name) clear() colors = theme.define_colors(name) hi...
local drivers = {} local blips = {} function updateBusBlips(line) local driversonline = 0 for k, v in ipairs(drivers[line]) do driversonline = driversonline + #v end if driversonline > 0 then for k, v in ipairs(drivers[line]) do -- check back if see if a driver is nearing that if #(drivers[...
---------------------------------------------- -- Sample of SlibRGB57wTM1640.lua for W4.00.03 -- Copyright (c) 2019, AoiSaya -- All rights reserved. -- 2019/09/01 rev.0.02 ----------------------------------------------- function chkBreak(n) sleep(n or 0) if fa.sharedmemory("read", 0x00, 0x01, "") == "!" then error(...
--noob fix xd by kent player = game:GetService("Players").LocalPlayer char = player.Character mouse = player:GetMouse() attack = false local makeorb = false idleq = false local skl = false local healingmode = false parts = {} poses = {} sizes = {} local obj3, TARG10, TARG11, STARG, lastdg, dg, dgm, lastdf, df, dfm = ni...
return {'kuch','kuchen','kuchhoest','kucht','kuchte','kuchten','kuchend'}
local renderer = {} local ph_normal = love.graphics.newImage("placeholders/ph_nm.png"); local ph_depth = love.graphics.newImage("placeholders/ph_depth.png"); local ph_specular = love.graphics.newImage("placeholders/ph_spec.png"); local ph_ao = love.graphics.newImage("placeholders/ph_ao.png"); local ph_sv = love.gr...
return { name = 'Alborz', checkpoints = { LinearTransform(Vec3(0.711849, -0.008111, 0.702285), Vec3(-0.065571, 0.994798, 0.077954), Vec3(-0.699265, -0.101541, 0.707615), Vec3(25.540485, 545.566772, -271.684540)), LinearTransform(Vec3(0.975212, -0.193603, -0.107139), Vec3(0.193006, 0.981067, -0.0...
local utils = require("utils") local nmap = utils.nmap local imap = utils.imap local cmd = vim.cmd local api = vim.api local fn = vim.fn local lsp = vim.lsp local lspinstall = require("lspinstall") local nvim_lsp = require("lspconfig") local colors = require("colors") cmd("autocmd ColorScheme * highlight NormalFloat g...
local tbTable = GameMain:GetMod("MagicHelper") local tbMagic = tbTable:GetMagic("BZM_WXCB") function tbMagic:EnableCheck(npc) return true end function tbMagic:TargetCheck(key, t) local id = t.ID if t.IsFaBao then return true else return false end end function tbMagic:MagicEnter(I...
-- Copyright (C) Sony Computer Entertainment America LLC. -- All Rights Reserved. -- -- Dependencies -- include "../sledluaplugin/libsce_sledluaplugin-5.2.3.lua" include "../sleddebugger/libsce_sleddebugger.lua" include "../../build/premake/sled_master.lua" -- -- Premake build script for the libsce_sleddebugger un...
local widget = require( "widget" ) local composer = require( "composer" ) local json = require ("json") local myData = require ("mydata") local upgrades = require("upgradeName") local tutorialScene = composer.newScene() --------------------------------------------------------------------------------- -----------------...
object_mobile_exar_kun_tomb_guardian_f_03 = object_mobile_shared_exar_kun_tomb_guardian_f_03:new { } ObjectTemplates:addTemplate(object_mobile_exar_kun_tomb_guardian_f_03, "object/mobile/exar_kun_tomb_guardian_f_03.iff")
hight = 0 while turtle.up() do hight = hight + 1 end shell.run('/local/bin/doc.lua') for i = 1, hight, 1 do while not turtle.down() do sleep(0.1) turtle.digDown() end end
-- Device Controller is a little more advanced than other types. -- It can create child devices, so it can be used for handling multiple physical devices. -- E.g. when connecting to a hub, some cloud service or just when you want to represent a single physical device as multiple endpoints. -- -- Basic knowledge of ob...
squares = {} for i = 0, 9 do for j = 0, 9 do squares[i * 10 + j] = i * i + j * j end end for i = 1, 99 do for j = 0, 99 do squares[i * 100 + j] = squares[i] + squares[j] end end function sum_squares(n) if n < 9999.5 then return squares[n] else local m = math.fl...
--[[ LuiExtended License: The MIT License (MIT) --]] local CI = LUIE.CombatInfo local strformat = zo_strformat local optionsDataCombatInfo = {} local castBarMovingEnable = false -- Helper local flag local alertFrameMovingEnabled = false -- Helper local flag local globalMethodOptions = { "...
local ADDON_NAME, Addon = ... local ThreatPlates = Addon.ThreatPlates --------------------------------------------------------------------------------------------------- -- Stuff for handling the database with the SavedVariables of ThreatPlates (ThreatPlatesDB) ---------------------------------------------------------...
local class = require 'ext.class' local real = require 'hydro.real' local GridSolver = require 'hydro.solver.gridsolver' local NavierStokesIncompressible = class(GridSolver) NavierStokesIncompressible.name = 'NavierStokesIncompressible' NavierStokesIncompressible.eqnName = 'navstokes-incomp' function NavierStokesInc...
#!/usr/bin/env lua -- coroutine_test.lua 文件 co = coroutine.create( function(i) print(i); end ) coroutine.resume(co, 1) -- 1 print(coroutine.status(co)) -- dead print("----------") co = coroutine.wrap( function(i) print(i); end ) co(1) print("----------") co2 = coroutine.create( function() for i=1,...
--Type => SubSystem --Type => SubSystem --ThingToBuild => name of subsystem to build --RequiredResearch => global research dependencies --RequiredShipSubSystems => subsystems dependencies for local to the ship --RequiredFleetSubSystems => Fleet wide subsystem dependencies --DisplayPriority => Order in UI lists --Displa...
-- RFC 6265 local lpeg = require "lpeg" local core = require "lpeg_patterns.core" local http_core = require "lpeg_patterns.http.core" local C = lpeg.C local Cc = lpeg.Cc local Cf = lpeg.Cf local Cg = lpeg.Cg local Ct = lpeg.Ct local P = lpeg.P local R = lpeg.R local S = lpeg.S local cookie_name = http_core.token loc...
-- rtp_interface.lua -- Manages loading RTP interface files for panels. Interface files use XML and are usually -- saved by the Layout Editor tool, however they can be hand-generated for small projects. -- Currently there should only be one Interface object in an application. -------------------------------------------...
--[[ Instructions: - Create a ScreenGui inside of the StarterGui - Directly inside the ScreenGui create a Frame named 'SomeFrame' - Directly inside the ScreenGui create a LocalScript and insert the following code: --]] local ui = script.Parent local frame = ui:WaitForChild("SomeFrame") -- function op...
local NightmareAmbientSoundMixer = Class(function(self, inst) self.inst = inst self.inst:ListenForEvent( "warnstart", function(it, data) self:SetSoundParam(1) self.inst.SoundEmitter:PlaySound("dontstarve/cave/nightmare_warning") end, GetWorld()) self.inst:ListenForEvent( "calmstart", ...
local AddonName, AddonTable = ... -- TBC Loot AddonTable.loot = { 25050, 25053, 25054, 25055, 25056, 25057, 25058, 25059, 25069, 25071, 28029, 28052, 29910, 29915, 29926, 29927, 29928, 29945, 30028, 32593, 51965, 51985, 51987, ...
local _, ns = ... local B, C, L, DB, P = unpack(ns) ----------------------- -- BetterWorldQuests -- Author: p3lim ----------------------- local BUTTON = "OverrideActionBarButton%d" local locations = { [356465] = { -- spellID trigger for "The Weight of Stone" in Korthia distance = 12, mapID = 1961, -- Korthia lo...
local jwt = require "resty.jwt" local jwt_token = ngx.var.arg_jwt if jwt_token then ngx.header['Set-Cookie'] = "jwt=" .. jwt_token else jwt_token = ngx.var.cookie_jwt end local jwt_obj = jwt:verify(ngx.var.jwt_secret, jwt_token, 0) if not jwt_obj["verified"] then local site = ngx.var.scheme .. "://" .. ng...