content
stringlengths
5
1.05M
local STATECLASS = require("modules/gamestatesClass") local TITLE = STATECLASS:set("TITLE") local timer_flag = false local options = { "Start", "Options", "About", "Credits", "Exit" } local padding = 12 local font = fonts.jamboree_8 local showOptions = false local cursor = 1 local continue = false function TITL...
local vim = vim vim.g.bracey_refresh_on_save = 1
---------------------------------------------------------- -- Load RayUI Environment ---------------------------------------------------------- RayUI:LoadEnv("UnitFrames") local UF = _UnitFrames local oUF = RayUF or oUF function UF:Construct_ArenaFrame(frame, unit) local unitGroup = gsub(unit, "%d", "") ...
--------------------------------------------------- ------- class Mover -- constructor Mover = class( function(this,_m,_x,_y) this.loc = of.Vec2f(_x,_y) this.vel = of.Vec2f(0,0) this.acc = of.Vec2f(0,0) this.mass = _m end ) function Mover:applyForce(force) f = of.Vec2f() f = force / self.mass self.acc = self.a...
function Chatbox:ChatboxGetPlayerIcon(player, text, team_chat) return { icon = 'fa-shield-alt', size = 14, margin = 8, is_data = true } end function Chatbox:ChatboxGetPlayerColor(player, text, team_chat) return _team.GetColor(player:Team()) or Color(255, 255, 255) end function Chatbox:ChatboxGetMessageColor(playe...
local PLUGIN = PLUGIN --------------------------------- --- BUYER QUEST --- COLLECT ONE ARTIFACT FOR SOMEONE --- THE ITEM HAS TO BE COLLECTED WILL BE RANDOMIZED IN randomItem. local QUEST = {} QUEST.uniqueID = "art" QUEST.name = "Заказ от важной шишки" QUEST.desc = "Достань мне %s артефакт %s для важного клиента, пл...
Mods = { types = { [0] = { Name = "Spoiler" }, -- VMT_SPOILER [1] = { Name = "Front Bumper" }, -- VMT_BUMPER_F [2] = { Name = "Rear Bumper" }, -- VMT_BUMPER_R [3] = { Name = "Side Skirt" }, -- VMT_SKIRT [4] = { Name = "Exhaust" }, -- VMT_EXHAUST [5] = { Name = "Chassis" }, -- VMT_CHASSIS [6] = { Name = "...
Script.Load("lua/Combat/Player_Upgrades_Client.lua") function PlayerUI_GetHasEnzymeCloud() local self = Client.GetLocalPlayer() local upgrades = self:GetPlayerUpgrades() for i = 1, #upgrades do local upgradeId = upgrades[i] if upgradeId == kTechId.EnzymeCloud then return true...
function onPlayerCredentials(playerid) print("Player " .. getPlayerName(playerid) .. "(" .. playerid .. ") credentials arrived") spawnPlayer(playerid, 1200, 300, 15) end registerEvent("onPlayerCredentials", "onPlayerCredential") function onPlayerConnected(playerid) print("Player " .. getPlayerName(playerid) ...
-- Busted tests for nvimpager -- Busted defines these objects but luacheck doesn't know them. So we -- redefine them and tell luacheck to ignore it. local describe, it, assert, mock = describe, it, assert, mock -- luacheck: ignore -- gloabl varables to set $XDG_CONFIG_HOME and $XDG_DATA_HOME to for the -- tes...
require 'torch' require 'nn' local hierarchial_model = {} -- init function to be added function heirarchial_model.__init__(input_params) self.learningRate = input_params[learningRate] self.skip_window = input_params[skip_window] self.dropout = dropout self.num_layers = input_params[num_layers] sel...
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf/protobuf" module('CustomBattleType_pb') local CUSTOMBATTLETYPE = protobuf.EnumDescriptor(); local CUSTOMBATTLETYPE_CUSTOMBATTLE_PK_NORMAL_ENUM = protobuf.EnumValueDescriptor(); local CUSTOMBATTLETYPE_CUSTOMBATTLE_PKTWO_NORMAL_ENUM = protobu...
local utils = require 'utils' local function clean(input) -- remove all "!*" instances clean = input:gsub('(!.)', '') -- remove the garbage local garbage = false local tmp_clean = {} for i = 1, #clean do local char = clean:sub(i, i) if char == '<' then garbage = true elseif char == '>...
--[[ An implementation of a simple numerical gradient checker. ARGS: - `opfunc` : a function that takes a single input (X), the point of evaluation, and returns f(X) and df/dX - `x` : the initial point - `eps` : the epsilon to use for the numerical check (default is 1e-7) RETURN: - `diff` : error in the gr...
return { "notomo/misclib.nvim/lua/misclib/error_handler.lua", "notomo/misclib.nvim/lua/misclib/message.lua", "notomo/misclib.nvim/lua/misclib/multi_error.lua", "notomo/misclib.nvim/lua/misclib/collection/ordered_dict.lua", }
function ScreenBase() local t = {} local function exit() sendTowerExited(t.cell) fsm:enterState("GamePlay") end function t.onBackButton() exit() return true end return t end
local Class = require "lib.hump.class" local Theme = require "assets.theme" local Utils = require "classes.utils" local highlit = false --use getters and setters on this one local button = Class { init = function (self, content, x, y, w, h, action) self.x = x self.y = y self.width = w self.height = ...
local t = io.popen('git pull') local a = t:read("*all") ngx.say(a) os.execute('php reload_web.php')
return {'tussen','tussenafstand','tussenarrest','tussenas','tussenbalans','tussenbedrijf','tussenbeide','tussenberm','tussenbestuur','tussenbouw','tussencategorie','tussendeel','tussendek','tussendeks','tussendekspassagier','tussendeur','tussendijks','tussending','tussendoor','tussendoortje','tussenevaluatie','tussenfa...
rspamd_config:register_symbol({ name = 'TEST_HASHES', score = 1.0, callback = function() local hash = require 'rspamd_cryptobox_hash' local logger = require 'rspamd_logger' local worry = {} local test_data = { { ['str'] = 'asdf.qwerty.123', ['hex'] = 'bf22dd95750034b9af93f0e...
local PALETTE_CONFIG_NAME = "palette_config.json" ---@class Palette local Palette = CLASS: Palette () :MODEL {} function Palette:__init () self.name = "Palette" self.colorList = {} self.colorTable = {} end function Palette:getColor ( name ) return unpack ( self.colorTable[ name ] ) end function Palette:setCol...
net = require('net.box') -- -- gh-3256 net.box is_nullable and collation options output -- space = box.schema.create_space('test') box.schema.user.grant('guest', 'read', 'space', 'test') _ = space:create_index('pk') _ = space:create_index('sk', {parts = {{2, 'unsigned', is_nullable = true}}}) c = net:connect(box.cfg.l...
--Return a list of colors return { 'blue', 'cyan', 'green', 'pink', 'red', 'yellow', 'white', 'grey' }
---------------------------------------------------------- -- Load RayUI Environment ---------------------------------------------------------- RayUI:LoadEnv() local PADDING = 10 local BUTTON_HEIGHT = 16 local BUTTON_WIDTH = 100 local function OnClick(btn) btn.func() btn:GetParent():Hide() end local function OnE...
local utils = {} function utils.getKwarg(kwargs, name, default) if kwargs == nil then kwargs = {} end if kwargs[name] == nil and default == nil then assert(false, string.format("'%s' expected and not given", name)) elseif kwargs[name] == nil then return default else return kwargs[name] end end -...
-- scaffold geniefile for protobuf protobuf_script = path.getabsolute(path.getdirectory(_SCRIPT)) protobuf_root = path.join(protobuf_script, "protobuf") protobuf_includedirs = { path.join(protobuf_script, "config"), protobuf_root, } protobuf_libdirs = {} protobuf_links = {} protobuf_defines = {} ---- return { _a...
References = { ["Enumerations"] = { ["Penalty PreciseQualifier"] = { [0] = "None", [1] = "-10", [2] = "-9.9", [3] = "-9.8", [4] = "-9.7", [5] = "-9.6", [6] = "-9.5", [7] = "-9.4", [8] = "-9.3", [9] = "-9.2", [10] = "-9.1", [11] = "-9", [12] = "-8.9", [13] = "-8.8", [14] =...
local config = { {position = Position(32836, 32288, 14), itemId = 1387, transformId = 6299}, {position = Position(32836, 32278, 14), itemId = 1946, transformId = 1945}, {position = Position(32834, 32285, 14), itemId = 1946, transformId = 1945} } local tokens = { {position = Position(32845, 32264, 14), itemId = 263...
-- パラメータ : R[Ω](省略時1) C[F](省略時1) ダイオードの電圧降下[V](省略時0) function process(data, sample_rate, parameters) r = tonumber(parameters[1] or 1) c = tonumber(parameters[2] or 1) offset = tonumber(parameters[3] or 0) result = {} for ch = 1, #data do result[ch] = {} denatu = 0 for i = 1, #data[ch] do if data[ch][i] >...
minetest.register_alias("generator_mv", "technic:generator_mv") minetest.register_craft({ output = 'technic:mv_generator', recipe = { {'technic:lv_generator','technic:lv_generator'}, } }) technic.register_generator({tier="MV", tube=1, supply=600})
--[[ This program read left signal and print to the right connector ]] function loop() --[[ Get the user input ]] local inputSignals = lan.getLeftSignals() local outputSignals = {} --[[ Change values ]] for i, signal in pairs(inputSignals) do outputSignals[i] = { signal = signa...
module("luci.controller.software", package.seeall) function index() if nixio.fs.access("/bin/opkg") then entry({"admin", "system", "packages"}, call("action_packages"), _("Software"), 10) entry({"admin", "system", "packages", "ipkg"}, form("admin_system/ipkg")) end end function action_packages() local ipkg = r...
local function AllReduceEA(tree, tau, alpha) -- Keep track of how many steps each node does per epoch local step = 0 -- Keep track of the center point (also need space for the delta) local center,delta,flatParam -- Clone the parameters to use a center point local function oneTimeInit(params) ...
-- Small adaptations that makes API to wrapped COPAS sockets more similar to -- ordinary luasockets. local socket = require "socket" local copas = require "copas" local wrapped = {} local copas_org_index local copasmeta local function create_wrapped(key) return function(self, ...) return self.socket[key](self.s...
function _logout(self) local sock = self.sock if not sock then return nil, "not initialized" end self.state = nil if self.state == STATE_CONNECTED then -- Graceful shutdown local headers = {} headers["receipt"] = "disconnect" sock:send(_build_frame(self, "DIS...
----------------------------------------- -- ID: 4198 -- Item: Copy of "Ginuva's Battle Theory" -- Grants 50 - 200 EXP -- Does not grant Limit Points. -- ----------------------------------------- require("scripts/globals/status") ----------------------------------------- function onItemCheck(target) local check = ...
local awful = require("awful") local gears = require("gears") local wibox = require("wibox") local beautiful = require("beautiful") local dpi = beautiful.xresources.apply_dpi -- Set colors local active_color = { type = 'linear', from = {0, 0}, to = {200, 50}, -- replace with w,h later stops = {{0, beau...
local utils = {} function utils.make_data_parallel(model, first_gpu_id, n_gpus) if n_gpus < 2 then return model end assert(n_gpus <= cutorch.getDeviceCount(), 'number of GPUs less than n_gpus specified') local gpu_table = torch.range(first_gpu_id, first_gpu_id + n_gpus - 1):totable() local fastest, bench...
ITEM.name = "AEK-971" ITEM.description= "A Russian assault rifle. Fires 5.45x39mm." ITEM.longdesc = "The AEK-971 is an experimental assault rifle released around the same time as the AN-94 'Abakan'.\nThe AN-94 was chosen over it, but it was still put into limited production.\nIt has a built-in recoil compensator, meani...
local PLUGIN = PLUGIN PLUGIN.name = "Merchant" PLUGIN.author = "STEAM_0:1:29606990" PLUGIN.description = "Adds a merchant of things." -- Go away, asshole. ix.config.Add("merchantInterval", 120, "Интервал обновлений ассортимента торговца (в минутах)", function(_, newValue) if (SERVER) then if (timer.Exists("ix...
local ft = require "fort" local ftable = ft.new() -- setup header ftable:set_cell_prop(1, ft.ANY_COLUMN, ft.CPROP_ROW_TYPE, ft.ROW_HEADER) ftable:write_ln("N", "Driver", "Time", "Avg Speed") ftable:write_ln("1", "Ricciardo", "1:25.945", "222.128") ftable:write_ln("2", "Hamilton", "1:26.373", "221.027") ftable:write_l...
local json = require 'dkjson' local util = require 'src.util' function parse_nes_header(header) assert(header{1,3} == "NES") assert(header(4) == '\x1a') -- print(table.unpack(header{1,4}:bin())) -- print(header(4):bin()) local prg_size = header(5):byte() * 16 local chr_size = header(6):byte() * 8 local...
-- -- created with TexturePacker (http://www.codeandweb.com/texturepacker) -- -- $TexturePacker:SmartUpdate:0436e54d857b01c0e5d4a516b99db7ce:5db429eb7daec012b5c00c7437ef8d21:cf8ab4992190eb44f97f06311ef326d7$ -- -- local sheetInfo = require("mysheet") -- local myImageSheet = graphics.newImageSheet( "mysheet.png", sheetI...
if util.is_profile_field_locked(app.session.member, "login") then error("access denied") end local login = param.get("login") login = util.trim(login) if #login < 3 then slot.put_into(_error, _"This login is too short!") end app.session.member.login = login local db_error = app.session.member:try_save() if d...
-- Copyright (c) 2010-2011 by Robert G. Jakabosky <bobby@neoawareness.com> -- -- 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 -...
--[[ README: goto my repository https://github.com/zhang-changwei/Automation-scripts-for-Aegisub for the latest version ]] script_name="C XML Analyzer" script_description="XML Analyzer v1.4.3" script_author="chaaaaang" script_version="1.4.3" local xmlsimple = require("xmlSimple").newParser() local lfs = require "lf...
local starlib = require('starlib') local Item = class(function() function ctor(self, propId) self.propId = propId end function getPropId(self) return self.propId end end) print('class.Item', debug.dump(Item)) local ItemEquip = class(function() class.inherit(m...
local Square, parent = torch.class('nn.Square', 'nn.Module') function Square:__init(args) parent.__init(self) end function Square:updateOutput(input) input.THNN.Square_updateOutput( input:cdata(), self.output:cdata() ) return self.output end function Square:updateGradInput(input, gradOutput) ...
operation = {"+", "-"} ind = math.random(2) term1 = math.random(69999) + 20001; solution = math.random(8998) + 1001; value = term1 + solution; if (ind == 1) then value = term1 + solution; else value = term1 - solution; end term2 = math.random(term1 - 20000) + 1001; ...
_DEBUG = false function DebugPrint(str) if _DEBUG == true and str then return print("BLACKJACK: "..tostring(str)) end end elevator_roof_location = { ["x"] = 930.0716, ["y"] = 33.86854, ["z"] = 81.09772, ["a"] = 69.9051208 } elevator_entrance_location = { ["x"] = 965.0619, ["y"] = 58.51287, ["z"] = 112.553...
return { id = "HUANGJINDEMIBAO4", mode = 2, once = true, fadeType = 1, fadein = 1.5, scripts = { { actor = 100001, side = 2, nameColor = "#a9f548", say = "妹妹,来一决胜负吧buli!", dir = 1, bgm = "level03", dialogShake = { speed = 0.09, x = 10, number = 2 }, typewriter = { spee...
-- no default texture defineProperty("image") function draw(self) sasl.gl.drawTexture(get(image), 0, 0, size[1], size[2]) end
local export = {} local lang = require("Module:languages").getByCode("uk") local m_IPA = require("Module:IPA") local m_table = require("Module:table") local com = require("Module:uk-common") local u = mw.ustring.char local rfind = mw.ustring.find local rsplit = mw.text.split local rsubn = mw.ustring.gsub local AC = ...
--*********************************************************** --** ROBERT JOHNSON ** --*********************************************************** require "TimedActions/ISBaseTimedAction" ---@class ISCleanBlood : ISBaseTimedAction ISCleanBlood = ISBaseTimedAction:derive("ISClean...
-- Given a parsed .SVD file (in Lua table form), print out some registers -- shortcuts fmt = string.format -- for debugging, turn printing of parsing process on or off --debug = function(s) io.stderr:write(s .. "\n") end debug = function (s) end -- Function to visit each branch and leaf of a tree. -- -- Gets passed...
local Vector = {} function Vector:new(x, y) local vector = {} vector.x = x or 0 vector.y = y or 0 setmetatable(vector, self) self.__index = self; return vector end function Vector:getValue() --> number, number return self.x, self.y end function Vector:getLength() --> number r...
--[[ Copyright 2012 Rackspace 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 law or agreed to in writing, software dis...
local dev = require("eden.core.pack").dev local M = {} M.plugins = { { dev("EdenEast/nightfox.nvim"), config = function() require("nightfox").setup({ hlgroups = { TSPunctDelimiter = { fg = "${red}" } }, }) end, }, { { "catppuccin/nvim", as = "catppuccin" }, { "embark-them...
require "include/protoplug" local cbFilter = require "include/dsp/cookbook filters" local w local function dist (x) if x < 0.001 then return x - w*0.01 else return x + w*0.01 end end stereoFx.init () function stereoFx.Channel:init () end function stereoFx.Channel:processBlock (samples, smax) for i =...
local TestEZ = require(script.Parent.Parent.TestEZ) local function check(str, test) local plan = TestEZ.TestPlanner.createPlan({ { -- This function environment hack is needed because the test -- function is not defined or required from within a test. This -- shouldn't come up in real tests. meth...
-------------------------------------------------------------------------- -- Crytek Source File. -- Copyright (C), Crytek Studios, 2001-2006. -------------------------------------------------------------------------- -- $Id$ -- $DateTime$ -- Description: Mine entity -- ----------------------------------------------...
-- 房间列表 local RoomListLayer = class("RoomListLayer", cc.Layer) local ExternalFun = appdf.req(appdf.EXTERNAL_SRC .. "ExternalFun") local RoomCreateLayer = appdf.req(appdf.CLIENT_SRC.."privatemode.plaza.src.views.RoomCreateLayer") local RoomJoinLayer = appdf.req(appdf.CLIENT_SRC.."privatemode.plaza.src.views.RoomJoinLa...
--------------------------------------------------------------------------------------------------- -- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0190-resumption-data-error-handling.md -- -- Description: -- Check data resumption is failed for 1st app and succeeded for 2nd app -- in...
client_script('client/client.lua') ui_page('client/html/index.html') files({ 'client/html/index.html', 'client/html/script.js', 'client/html/style.css', 'client/html/cursor.png' })
local Request = require('apicast.policy.routing.request') describe('Request', function() describe('.get_uri', function() it('returns the uri', function() ngx.var = { uri = 'test_path' } local request = Request.new() local uri = request:get_uri() assert.equals(ngx.var.uri, uri) end) ...
--[[ Rova Initializer Author: Dr_K4rma aka Alexander Karpov Date: 1 Feb. 2021 Provides: Launcher script for the Rova framework Description: Rova, or "Roblox Java" is a framework/library manager that is designed to make lua look (and behave) like Java ]] ---------------------------------- -- SERVICES & PRIMAR...
-- Morph into new class or buy upgrade. function Alien:ProcessBuyAction(techIds) ASSERT(type(techIds) == "table") ASSERT(table.icount(techIds) > 0) local success = false if self.UpgradeManager then success = self.UpgradeManager:GiveUpgrades(techIds, self) end if not success then ...
-- copy all globals into locals, some locals are prefixed with a G to reduce name clashes 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,un...
-- Copyright 2022 philh30 -- -- 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 law or agreed to in writ...
local sqlite3 = require "lsqlite3" local utils = require "vuci.utils" local cjson = require "vuci.json" local rpc = require "vuci.rpc" local fs = require "vuci.fs" local uci = require "uci" local M = {} local RPC_VUCI_MENU_FILES_PATH = "/usr/share/vuci/menu.d" local RPC_VUCI_LOCALES_PATH = "/www/i18n" local function...
local Logger = require("__DedLib__/modules/logger").create("Control") require("scripts/config") -- Config is a singleton, so it only needs called here local Area_Management = require("scripts/area_management") local Storage = require("scripts/storage") local Gui = require("scripts/gui") script.on_init(function() ...
-- burying feelings -- between these lines of Lua -- until overflow local af local current = ThemePrefs.Get("RabbitHole") local InputHandler = function(event) if not event or not event.button then return false end af:playcommand("InputEvent", event) end local t = Def.ActorFrame{ InitCommand=function(self) af=self...
--[ --By Chromium --Project started: June 26th, 2016 --Last updated: June 28th, 2016 --my first script --] wait() local hum = game.Workspace.gus14657.Humanoid --name here local plr = game.Workspace.gus14657 --name here wait(0.1) hum.WalkSpeed = 32 plr.Head.face.Texture = "http://www.roblox.com/asset/?id=1017652...
-- -- Author: huger -- Date: 2018-01-29 16:57:22 -- tool = {} -- 传入DrawNode对象,画圆角矩形 function tool.drawNodeRoundRect(drawNode, rect, borderWidth, radius, color, fillColor) -- segments表示圆角的精细度,值越大越精细 local segments = 20 local origin = cc.p(rect.x, rect.y) local destination = cc.p(rect.x + rect.width, re...
-- ffi setup local ffi = require("ffi") local C = ffi.C ffi.cdef [[ typedef int32_t BlacklistID; typedef uint64_t BuildTaskID; typedef uint64_t MissionID; typedef uint64_t NPCSeed; typedef uint64_t TradeID; typedef uint64_t UniverseID; typedef struct { const char* ware; const char* macro; int amount; } UI...
--[[ * These Functions show Example usage of sumneko.lua Code Completion Support * use: >> `--- Function Name` to define you methods name or short description >> `---| description` to add a longer function description >> `---@param name type description` to define a parameter >> `---@return type...
GLOBAL.setfenv(1, GLOBAL) local CHARACTERLIST = { "wilson", "willow", "wolfgang", "wendy", "wx78", "wickerbottom", "woodie", "wes", "waxwell", "wathgrithr", "webber", "winona", "warly", --DLC chars: -- "wortox", -- "wormwood", -- "wurt", "walter" ...
-- Grid Cell -- local Modern = require 'modern' local Cell = Modern:extend() -- New Cell -- function Cell:new(grid, row, col) self.grid = grid self.row = row self.col = col -- items in cell self.items = {} end -- Tear down -- function Cell:destroy() -- end ---- ---- ---- ---- -- add item to cell -- func...
BulletPool = Object:extend() function BulletPool:new(scene, world, count, tag) self._bullets = {} for i=1,count do local bullet = Bullet(scene, world, tag) table.insert(self._bullets, bullet) scene:addEntity(bullet) end end function BulletPool:getBullet() local bullet = table.remove(self._bulle...
local Sizestr = 0 local CartOffset = 1 local Carts = Def.ActorFrame{} local Letters = Def.ActorFrame{} local Christmas = Def.ActorFrame{ OnCommand=function(self) self:xy(-SCREEN_CENTER_X,-SCREEN_CENTER_Y-180) end } local function Xmas() if MonthOfYear()+1 == 12 then return true end return false end if Xmas() then ...
-- package.lua return { name = "hodgman/gdn", version = "0.0.1", private = true, -- This prevents us from accidentally publishing this package. dependencies = { "satom99/litcord", "luvit/fs", } files = { '*.lua', 'utils/*.lua', 'client/*.lua', 'classes/*.lua', 'constants/*.lua', 'structures/*.lua'...
--[[ Name: Debugger.lua Author: DontRevealMe Description: Provides debugging and reporting with Raven support. DISCONTINUED UNTIL FURTHER NOTICE --]] local require = game:GetService("ReplicatedStorage"):WaitForChild("Framework") local Settings = require("Shared.Settings") local t = require("t") local D...
return { ["trail"] = "trainee", ["texture filter"] = "filtre de texture", ["show only with active weapon"] = "montrer seulement avec l'arme activee", ["parent velocity length"] = "vitesse du parent", ["operator"] = "operateur", ["equal"] = "egal a", ["owner velocity right"] = "vitesse droite du proprietaire", ["owner v...
local Base = require "lib/knife/base" require "utils" require "map" -- screen w = 400 h = 240 -- state menu = false -- tile tile = {} tile_w = 24 -- tile size, in pixels tile_h = 24 wt = math.floor(w / tile_w) -- width of the viewport in tiles ht = math.floor(h / tile_h) img_size = 16 -- map map = {} map_w = 20 -...
object_tangible_tcg_series5_hangar_ships_tie_aggressor = object_tangible_tcg_series5_hangar_ships_shared_tie_aggressor:new { } ObjectTemplates:addTemplate(object_tangible_tcg_series5_hangar_ships_tie_aggressor, "object/tangible/tcg/series5/hangar_ships/tie_aggressor.iff")
-- write data recover from latest snapshot env = require('test_run') test_run = env.new() test_run:cmd('restart server default') engine = test_run:get_cfg('engine') space = box.schema.space.create('test', { engine = engine }) index = space:create_index('primary') for key = 1, 51 do space:insert({key}) end box.snaps...
-- This is a modified lua port of James Halliday's point-in-polygon repository -- Here's the original license --[[ The MIT License (MIT) Copyright (c) 2016 James Halliday Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),...
vim.lsp.set_log_level('debug') local lspconfig = require('lspconfig') local protocol = require('vim.lsp.protocol') -- Enable (broadcasting) snippet capability for completion local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.textDocument.completion.completionItem.snippetSupport = true -- S...
------------------------------------------------------------------------------ -- Client Device of Light-weight MQTT Machine Network (LWMQN) for NODEMCU -- LWMQN Project -- LICENSE: MIT -- Simen Li <simenkid@gmail.com> ------------------------------------------------------------------------------ local EventEmitter = r...
-- this script is used to save and read all player status players_status = {}
local Action = require "action" local Reaction = Action:extend() Reaction.reaction = true return Reaction
Base_Actor_Tests = { { Test_name = "Actor GetID", Test_type = "Return", Test_func = function(tbl) local id = tbl.actor:GetID() return (id and id > 0 and type(id) == "number") end, }, { Test_name = "Actor GetLocation", Test_type = "Retu...
-- Space Shooter Game -- Developed by Carlos Yanez -- Hide Status Bar display.setStatusBar(display.HiddenStatusBar) -- Import MovieClip Library local movieclip = require('movieclip') -- Import Physics local physics = require('physics') physics.start() physics.setGravity(0, 0) -- Graphics -- Background local bg...
local M = {} local function years_from(from, to) local cur_year = tonumber(os.date('%Y')) to = to and to or cur_year return from == to and tostring(from) or ('%d-%d'):format(from, to) end local function http_get(url) local res = vim.fn.systemlist { 'curl', '--location', '--silent', '--fail', url } assert(vi...
-- converts code stored as strings into actual code which can be run -- original use case was code which needed to be sent to another turtle but also needed to run on the 'master' turtle and i didn't want to have two copies of the code -- source strings are functions without the function 'wrapping', see example under ...
------------ -- Locals -- ------------ local table_insert = table.insert local UnitLocalizedClass = Assiduity.UnitLocalizedClass local FRIENDLY = "FRIENDLY" local HOSTILE = "HOSTILE" local UNIT = "unit" local MEASUREMENTS = { ["SMALL"] = { ["AURA_DISTANCE_TO_EDGE"] = 1, ["AURA_SIZE"] ...
-- Detecting coroutine resumes and traces is tricky, particularly as -- + thanks to coroutine.wrap, you might resume from any function -- + if the thread is finished, resume doesn't cause a thread change -- + threads finish by returning, without a call to yield -- Here we only test yielding from the top of the thread s...
-- Copyright (c) 2015-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. function batch_in...
NPCF_MODPATH = minetest.get_modpath(minetest.get_current_modname()) NPCF_DATADIR = minetest.get_worldpath().."/npc_data" dofile(NPCF_MODPATH.."/npcf.lua") dofile(NPCF_MODPATH.."/chatcommands.lua") dofile(NPCF_MODPATH.."/npcs/info_npc.lua") dofile(NPCF_MODPATH.."/npcs/deco_npc.lua") dofile(NPCF_MODPATH.."/npcs/guard_np...
-- -- 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 ...