content
stringlengths
5
1.05M
local M = {} function M.config() require'nvim-treesitter.configs'.setup { ensure_installed = { 'bash', 'dockerfile', 'json', 'lua', 'make', 'markdown', 'python', 'vim', 'yaml', }, hig...
object_tangible_furniture_all_frn_amidala_bookcase = object_tangible_furniture_all_shared_frn_amidala_bookcase:new { } ObjectTemplates:addTemplate(object_tangible_furniture_all_frn_amidala_bookcase, "object/tangible/furniture/all/frn_amidala_bookcase.iff")
local heart = require("heart") local M = heart.class.newClass() function M:init(game, config) self.game = assert(game) self.physicsDomain = assert(self.game.domains.physics) self.waterEntities = assert(self.game.componentEntitySets.water) end function M:handleEvent(viewportId) local r, g, b, a = love.graphic...
-- This file allows the module to be in a subdirectory, -- to match the pattern "?/init.lua". local name = ... return require(name..".kminser")
--[[ Licensed under GNU General Public License v2 * (c) 2014, Luke Bonham --]] local helpers = require("lain.helpers") local textbox = require("wibox.widget.textbox") -- Template for...
require 'torch' require 'util.queue' require 'fn' seq = {} -- A boolean predicate returning true if s can be treated -- as a sequence (i.e. an iterator function, table, or tensor) function seq.is_seq(s) return util.is_fn(s) or (util.is_table(s) and #s > 0) end --------------------------------------------- -- s...
------------------------------------------------------------------------ -- This class contains the Option objects. There is one of these objects -- for each option specified by Optiks:add_option. -- @classmod Optiks_Option require("strict") ------------------------------------------------------------------------ --...
cflags{ '-Wall', '-Wno-address-of-packed-member', '-D HAVE_CONFIG_H', '-I $dir', '-I $srcdir/include', '-isystem $builddir/pkg/linux-headers/include', '-isystem $builddir/pkg/util-linux/include/uuid', } pkg.deps = { 'pkg/linux-headers/headers', 'pkg/util-linux/headers', } lib('libf2fs.a', 'lib/(libf2fs.c libf...
vk_quests = {} vk_quest = {} local modname = minetest.get_current_modname() local nextid = 1 function vk_quests.register_quest(type, name, def) def.qid = nextid nextid = nextid + 1 if type == "kill" then if not def.on_complete then def.on_complete = function(player) local meta = player:get_meta() fo...
local DotaBotUtility = require(GetScriptDirectory().."/extras/utility"); LANE = LANE_MID; local STATE_IDLE = "STATE_IDLE"; local STATE_LANE_GOTO_SURVEY_POINT = "STATE_LANE_GOTO_SURVEY_POINT"; local STATE_LANE_SEARCHLASTHIT = "STATE_LANE_SEARCHLASTHIT"; local function StateLaneGoToSurveyPoint(StateMachine) -- move...
------------------------------------------------------------------------------- -- Copyright (c) 2013, Esoteric Software -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- 1. Redi...
----------------------------------- -- Area: Southern SandOria [S] -- NPC: Lurouillat -- !pos 44 2 -35 80 ----------------------------------- function onTrade(player,npc,trade) end; function onTrigger(player,npc) player:startEvent(350); end; function onEventUpdate(player,csid,option) end; function onEventFinis...
ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) RegisterServerEvent('esx_skin:save') AddEventHandler('esx_skin:save', function(skin) local _source = source local xPlayer = ESX.GetPlayerFromId(_source) MySQL.Async.execute( 'UPDATE users SET `skin` = @skin WHERE identifier = @identi...
#!/usr/bin/env lua -- Example of a failure when building a program. local cl = require('mooncl') local filenames = { "good.cl", "bad.cl" } local options = "-cl-finite-math-only -cl-no-signed-zeros" -- Access the first device on the first platform local platform = cl.get_platform_ids()[1] local device = cl.get_devic...
local Posts = require "models.posts" local escape = require("lapis.html").escape local sf = string.format local formatter = {} --- Sanitize text for HTML safety -- @tparam string text Raw text -- @treturn string formatted function formatter.sanitize(text) return escape(text) end --- Format new lines to...
project = Project() project:CreateStaticLibrary("pgsql_client_static"):AddDependencies( project:CreateDependency() :AddSourceFiles("*.cpp") :AddFlags({"-Wall", "-Werror", "-Wextra"}) :AddSysLibraries("pq")) return project
local lynx = require "lynx" local raylua_funcs = require "lynx.raylua_lynx" local menu = lynx.menu ({ lynx.text("Test Lynx menu in Raylib", { selectable = false }), lynx.text("", { selectable = false }), lynx.text("Long life to Lynx !"), lynx.text("the best UI library ever !"), lynx.text("which works...
-- Author: Jetboom AddCSLuaFile() if _FIXEDEMITTERS_ or not CLIENT then return end _FIXEDEMITTERS_ = true local OldParticleEmitter = ParticleEmitter local function ForwardFunc(from, funcname) from[funcname] = function(me, a, b, c, d, e, f) if not me.Emitter and me.EmitterVars then me.Emitter = Old...
require 'rubble' vector2 = struct { x = "number", y = "number", } vector2: impl { length = function(self) return math.sqrt(self.x * self.x + self.y * self.y) end; } add = trait { add = function(self, other)end } add: impl (vector2) { add = function(self, other) return vector2 { x = se...
local Vec = _Require_relative(..., 'lib.DeWallua.vector-light',1) local pi = math.pi local push = table.insert local Shape = _Require_relative(..., "Shape") ---@class Circle : Shape Circle = Shape:extend() Circle.name = 'circle' ---Circle ctor ---@param x number x coordinate ---@param y number y coordinate ---@param...
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ========== PlaceObj('XTemplate', { group = "PreGame", id = "PGChallengeList", PlaceObj('XTemplateWindow', { '__context', function (parent, context) return ChallengeGalleryObjectCreateAndLoad() end, 'IdNode', true, 'HandleMouse', true, }, { PlaceObj('XT...
---------------------------------------------------------------- -- Copyright (c) Inertia Lighting, Some Rights Reserved -- ---------------------------------------------------------------- local RunService = game:GetService("RunService") local DataStoreService = game:GetService("DataStoreService") -------------...
---@class CS.UnityEngine.AnimationClip : CS.UnityEngine.Motion ---@field public events AnimationEvent[] ---@field public length number ---@field public frameRate number ---@field public wrapMode number ---@field public localBounds CS.UnityEngine.Bounds ---@field public legacy boolean ---@field public humanMotion boolea...
local Random = BrickColor.Random() local asin = math.asin local atan2 = math.atan2 local rad = math.rad local sin = math.sin local abs = math.abs local ceil = math.ceil local cos = math.cos local pi = math.pi local rclcount = 0 local rcl = 0 local rclcounttime = 50 local rclcountspeed = 1 local player = game.Players.Lo...
require "Player" require "Projectile" require "Enemies" local utf8 = require("utf8") local highscore = require "sick" Game = {} -- Defines initial state for when the game is started. game_state = "menu_screen" function Game:init() -- Finds or creates the scoreboard file to be used. highscore.set("scoreboard...
local FORMSPEC_NAME = "freetouch_edit" minetest.register_node("freetouch:freetouch", { description = "Formspec touch node", groups = {cracky=3}, on_construct = function(pos) local meta = minetest.get_meta(pos) meta:set_string("channel", "freetouch") meta:set_string("formspec", "size[10,8]") end, drawtyp...
local M = {} local toribio = require 'toribio' local devices = toribio.devices local bobot = nil --require('comms/bobot').bobot local log = require 'log' table.pack=table.pack or function (...) return {n=select('#',...),...} end local function split_words(s) local words={} for p in string.gmatch(s, "%S+") do w...
function timerCheck (dt) if timer ~= nil and ALL_RUNNING_TIMERS ~= nil then--can only be run if it has not been defined yet local currentTime = love.timer.getTime() for w = #ALL_RUNNING_TIMERS, 1 , -1 do if currentTime >= timer[ALL_RUNNING_TIMERS[w]].finishes then timer[ALL_RUNNING_TIMERS[w]].free = tru...
local type = type local metadata local function update_obj(ttype, name, obj, data) local parent = obj._parent local temp = data[parent] local code = temp._code obj._code = code for key, meta in pairs(metadata[ttype]) do if obj[key] and meta['repeat'] and type(obj[key]) ~= 'table'...
--[[ NPCHealthBar by: standardcombo v0.9.0 Works in conjunction with a data provider that is passed into SetDataProvider(). Expects implementation of the interface: GetHealt() GetMaxHealth() GetTeam() --]] local FILL_BAR = script:GetCustomProperty("Fill"):WaitForObject() local LABEL = script:GetCustomPr...
local a, b, c, d, e, g a = f() or a b = f() or b if e then d = f() or d e = f() or e end
local s function IsNearTeleport() local shortest = 100000 local tpDist = 0 for _, tp in pairs(Config.Teleports) do if s == nil then s = Scaleform.Request("MIDSIZED_MESSAGE") end local ply = PlayerPedId() local plyCoords = GetEntityCoords(ply, 0) local di...
--[[ To compile the project files, install premake4 ( http://industriousone.com/premake ), then: For windows. $ premake4 vs2010 For linux. $ premake4 gmake For macosx. $ premake4 xcode3 ]]-- --===========================================================================-- -- Glo...
-- Input file for multimomlinear Tool local Species = require "Tool.LinearSpecies" local elcMass = 1 local elcCharge = -1 local ionMass = 1836.2 local ionCharge = 1 local E0 = 0.2 -- Electric field in y-direction local B0 = 1.0 -- Magentic fiels in z-direction local v0 = E0*B0/B0^2 -- ExB drift speed local elcTemp ...
function print_point(p) io.write("("..p.x..", "..p.y..")") return nil end function print_points(pl) io.write("[") for i,p in pairs(pl) do if i>1 then io.write(", ") end print_point(p) end io.write("]") return nil end function ccw(a,b,c) return (b.x -...
---@meta ---@class cc.Place :cc.ActionInstant local Place={ } cc.Place=Place ---* Initializes a Place action with a position ---@param pos vec2_table ---@return boolean function Place:initWithPosition (pos) end ---* Creates a Place action with a position.<br> ---* param pos A certain position.<br> ---* return ...
object_mobile_dressed_tutorial_mentor = object_mobile_shared_dressed_tutorial_mentor:new { } ObjectTemplates:addTemplate(object_mobile_dressed_tutorial_mentor, "object/mobile/dressed_tutorial_mentor.iff")
local ADDON, MinArch = ... MinArch.Companion = CreateFrame("Frame", "MinArchCompanion", UIParent) local Companion = MinArch.Companion Companion.events = {} Companion.initialized = false; local cx, cy, cInstance; local timer; local baseHeight = 31; local function RegisterForDrag(frame) local function OnDragStart...
minetest.register_privilege("crash", "Player can crash the server with the /crash command") minetest.register_chatcommand("crash",{ params = "", description = "CRASH", privs = {crash = true}, func = function(lalalalala) trolololol = lalalalala * nil end })
-- mod_minimix -- -- Rewrite MUC stanzas suich that the account / bare JID joins rooms instead of clients / full JIDs -- local jid_split, jid_join, jid_node, jid_bare = import("util.jid", "split", "join", "node", "bare"); local st = require "util.stanza"; local mt = require "util.multitable"; local users = prosody.hos...
function handle_request() local return_string = 'Hello from LUA handler'; local request = platform.get_http_request(); local form = request:parse_req_form(); local response = platform.get_http_response(); response:set_chunked_trfencoding(true); response:set_content_type("text/plain"); response:send(); ev_sleep(...
local ffi = require 'ffi' local class = require 'ext.class' local table = require 'ext.table' local range = require 'ext.range' local file = require 'ext.file' local template = require 'template' local Struct = require 'hydro.code.struct' local makePartials = require 'hydro.eqn.makepartial' local common = require 'hyd...
--------------------------------------------------------------------------------------------------- -- func: setmentor <MentorMode> <target> -- desc: 0 = Not a mentor, 1 = Unlocked but inactive, 2 = Unlocked & flag on. --------------------------------------------------------------------------------------------------- ...
function groupby(stream, ...) local function split(funcfield) local func = "count" local name = "*" local delimiterPos = string.find(funcfield, ':') if delimiterPos then func = string.sub(funcfield, 1, delimiterPos - 1) name = string.sub(funcfield, delimiterPo...
EnemySprite = Object:extend() function EnemySprite:new(obj) self.currentTime = 0 self.timeBtwFrmae = 0.2 self.currentFrame = 1 self.totalFrames = 2 self.obj = obj self.x = self.obj.x + self.obj.w/2 self.y = self.obj.y + self.obj.h/2 end function EnemySprite:update(dt) self.x = self.obj.x + self.obj.w...
--[[ player.lua Copyright (C) 2016 Kano Computing Ltd. License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2 ]]-- local Character = require 'game.gameWorld.characters.character' local Utils = require 'system.utils' local love = love local k = love.keyboard local Player = {} Player.__index = Player -- inher...
CustomizableWeaponry:addFireSound("KHRPKM_FIRE", {"weapons/PKM/fire1.wav","weapons/PKM/fire2.wav","weapons/PKM/fire3.wav"}, 1, 125, CHAN_STATIC) CustomizableWeaponry:addFireSound("KHRPKM_FIRE_SUPPRESSED", {"weapons/PKM/firesil2.wav","weapons/PKM/firesil3.wav"}, 1, 65, CHAN_STATIC) CustomizableWeaponry:addReloadSound("...
--[[ [guid]={level,{hp,patk,matk,pdef,mdef,pcritres,mcritres},{[dropid,droprate]*15},{zone,x,y}} ]] return { [100001]={103,{1282649,24183,19138.0,18216,18164,0,0},{720822,5000,720143,60000,723989,100000,725571,70000,725572,70000,726704,200000,726705,200000,725916,100000,727226,200000},{20,116.2,330.9}}, [100002]={10...
--[[---------------------------------------------------------------------------------------------------- <auto-generated> This file was generated by: lua-apps/scripts/Localization/Locales/GenerateAllLocales.py Changes to this file should always follow: Building an Internationalized Feature - Engineer's Guide: ...
lu = require('externals/luaunit/luaunit') require('scripts/data/data_settings') require('scripts/utilities_lua') require('scripts/utilities') function test_vec_add_3d() local vec1={x=1,y=2,z=3} local vec2={x=4,y=5,z=6} local actual = vec_add(vec1, vec2) local expected={x=5,y=7,z=9} lu.assertEquals(actual, e...
local pdk = require("apioak.pdk") local yaml = require("tinyyaml") local io_open = io.open local ngx_timer_at = ngx.timer.at local ngx_config_prefix = ngx.config.prefix local config_objects local _M = {} local function loading_configs(premature) if premature then return end...
function widget:GetInfo() return { name = "Commander Warning", desc = "Changes UI background color if your commander is attacked", author = "Nixtux", date = "13th Aug 2018", license = "GPLv2", version = "1.0", layer = 1, enabled = true } end local commanderTable = {} local localTeamI...
object_tangible_storyteller_prop_pr_thm_all_tato_banner_freestand_s01 = object_tangible_storyteller_prop_shared_pr_thm_all_tato_banner_freestand_s01:new { } ObjectTemplates:addTemplate(object_tangible_storyteller_prop_pr_thm_all_tato_banner_freestand_s01, "object/tangible/storyteller/prop/pr_thm_all_tato_banner_frees...
return { tform = { type = 'tform', fields = { top = { type = 'integer' }, left = { type = 'integer' }, height = { type = 'integer' }, clientwidth = { type = 'integer' }, clientheight = { type = 'integer' }, ...
--[[ Name: cl_init.lua For: SantosRP By: TalosLife ]]-- include "shared.lua" function ENT:Initialize() end function ENT:Draw() local normal = self:GetAngles():Forward() *-1 local distance = normal:Dot( self:GetPos() -normal ) local normal2 = self:GetAngles():Forward() local distance2 = normal2:Dot( self:GetP...
------------------------------------------------------------------- -- Copyright (c) Roberto Perpuly. All rights reserved. -- Licensed under the MIT License. See License in the project root for details. ------------------------------------------------------------------- -- Compile the project. Compiling may use operat...
-- plugdebug module -- luacheck: new_globals Old_export local F = far.Flags local PanelEvents = { [0]="FE_CHANGEVIEWMODE","FE_REDRAW","FE_IDLE","FE_CLOSE", "FE_BREAK","FE_COMMAND","FE_GOTFOCUS","FE_KILLFOCUS","FE_CHANGESORTPARAMS" } local OpenFrom = { [0]="OPEN_LEFTDISKMENU","OPEN_PLUGINSMENU","OPEN_FINDLIST","OPE...
function love.conf(t) t.window.title = "Binding of Analex" t.window.width = 1270 t.window.height = 768 t.window.resizable = false t.window.borderless = false t.version = "0.10.2" end
if not modules then modules = { } end modules ['s-languages-counters'] = { version = 1.001, comment = "companion to s-languages-counters.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } ...
-- Beginning of Markdown unnumbered indented bullet list -- Print each line preceded with indents and an '*' -- Example: -- * -- * x.a -- * 1 -- * 2 -- * Z -- * 1.2 -- * A -- * C -- * D -- * 2 function indent(n) for i=1, n do io.write(" ") end end function mar...
local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local ToCommand = { Id = "To", Aliases = { "goto" }, Description = "Teleports you to a player.", Args = { { Type = "player", Name = "Target player", Description = "The player to teleport to" } } } function ToCommand....
local Package = script:FindFirstAncestorOfClass("Folder") local baseModule = Package.Base --^^ Simply adjust the variable so it matches the Base's location. ^^ return require(baseModule)
local infinity_wagon = {} function infinity_wagon.build(entity, tags) local proxy = entity.surface.create_entity({ name = "ee-infinity-wagon-" .. (entity.name == "ee-infinity-cargo-wagon" and "chest" or "pipe"), position = entity.position, force = entity.force, }) -- create all api lookups here to sa...
package.cpath = "bin/?.dll" local iup = require "iuplua" local bgfx = require "bgfx" local util = require "util" local imgui = require "imgui" local bimgui = require "bgfx.imgui" local widget = bimgui.widget local flags = bimgui.flags local windows = bimgui.windows local utils = bimgui.util local ctx = { canvas = iu...
local _ local LAM = LibStub:GetLibrary("LibAddonMenu-2.0") local dirtyModules = false if BUI == nil then BUI = {} end function BUI.InitModuleOptions() local panelData = Init_ModulePanel("Master", "Master Addon Settings") local optionsTable = { { type = "header", name = "Master Settings", width = "full...
--- --- 查询菜单和权限项 --- local func = require("func") local json = require("cjson.safe") local db_utils = require("db_utils") local user_id = ngx.req.get_headers()[".USERID"] local args = ngx.req.get_uri_args() local project_type = args['project'] if user_id == nil or project_type == nil then func.invalid_exit("user i...
local cfg = require'manifestconfig' local WIN = jit.os == 'Windows' local OSX = jit.os == 'OSX' local SEP = WIN and '\\' or '/' local format, gsub = string.format, string.gsub local function capture(cmd) local f = io.popen(cmd) local s = f:read'*a' f:close() return gsub(gsub(gsub(s, '^%s+', ''), '%s+$', ''), '[\n\...
local stateDelimiter = "|"; local namespace = KEYS[1]; local instanceId = ARGV[1]; local currentStamp = ARGV[2]; local instanceIdxKey = 'cosid' .. ':' .. namespace .. ':itc_idx'; local function convertStingToState(machineState) local splitIdx = string.find(machineState, stateDelimiter, 1); local machineId = st...
-- -- Copyright 2013 John Pormann -- -- 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...
-------------------------------------------------------------------------------- -- Newton-type methods for root finding module. -- -- Copyright (C) 2011-2014 Stefano Peluchetti. All rights reserved. -- -- Features, documentation and more: http://www.scilua.org . -- -- This file is part of the SciLua library, w...
local StartScreenState = class({}) local playButton = require('things/playButton') local howToButton = require('things/howToButton') local quitButton = require('things/quitButton') local arrayButtons = {playButton,howToButton,quitButton} local startScreen = love.graphics.newImage('assets/startScreen.png') l...
--[[ Copyright (c) 2014 Jon Maur 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, modify, merge, publish, distribute, subl...
function executeCallback(callback, ...) if type(callback) ~= "function" then return false end local success, err = pcall(callback, ...) if not success then outputDebugString("Error in callback: " .. tostring(err)) return false end return true end function generateDefaultNumberplate(vehicleId) if not vehic...
--[[-- <b style="color: red">WARNING: THIS IS AN INTERNAL MODULE.</b></br></br> This module contains all the functions that handle plugins. The NutScript framework allows you to create and add plugins to it in order for each server to be different. You can add plugins by adding a file/folder in `plugins` directory und...
if SERVER then ENT.Base = "lambda_trigger" ENT.Type = "brush" DEFINE_BASECLASS( "lambda_trigger" ) SF_TELEPORT_PRESERVE_ANGLES = 32 -- 0x20 SF_TELEPORT_LAMBDA_CHECKPOINT = 8192 function ENT:PreInitialize() BaseClass.PreInitialize(self) self.Landmark = "" self.Target = "" end function ENT:Initialize(...
local Activeable = false local isToolInUse = false local DefaultSpeed = .50 local ScreenX, ScreenY = guiGetScreenSize() local NormalX, NormalY = (ScreenX - 826 + 625), (ScreenY - 450) local OtherX, OtherY = (ScreenX - 826 + 490), (ScreenY - 450) local CurrentVariableKey = 0 local ControlledElement local DefaultValues =...
local Effect Effect = require('mae.effect').Effect local wrap wrap = require('mae.sugar').wrap local io = { Write = Effect('std.io.Write'), Read = Effect('std.io.Read'), Flush = Effect('std.io.Flush'), Close = Effect('std.io.Close') } local with_std_io = wrap({ [io.Write] = (function() local _base_0 = io....
-- CONFIG -- -- Zombies have a 1 in 150 chance to spawn with guns -- It will choose a gun in this list when it happens -- Weapon list here: https://www.se7ensins.com/forums/threads/weapon-and-explosion-hashes-list.1045035/ -- zombie spawn amounts in specific zones, default = 15 zombieZones = { AIRP = 12, ALAMO = ...
translations.tr = { name = "tr", fullname = "Türkçe", -- Error messages corrupt_map= "<r>Harita bozulmuş.Başka bir tane yükleniyor.", corrupt_map_vanilla = "<r>[ERROR] <n>Bu harita hakkında bilgi alınamıyor.", corrupt_map_mouse_start= "<r>[ERROR] <n>Bu haritanın bir başlangıç noktası olması gerekiyor (fare başla...
function empty() return end function with_arg() return argument end
--[[ Copyright (C) 2013 simplex This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that ...
local FOV_PATH =({...})[1]:gsub("[%.\\/]fov$", "") .. '/' local class =require (FOV_PATH .. 'vendor/30log') local FOV=class{ __name, _lightPasses, _options } function FOV:__init(lightPassesCallback, options) self.__name='FOV' self._lightPasses=lightPassesCallback self._options={topology=8} if options...
local log = require "log" local wlua_request = require "wlua.request" local wlua_response = require "wlua.response" local util_file = require "util.file" local M = {} local mt = { __index = M } function M:new(app, id, interface, addr) local req = wlua_request:new(id, interface) if not req then return ...
fx_version 'cerulean' games {"gta5", "rdr3"} author "Project Error" version '1.0.0' lua54 'yes' ui_page 'web/public/index.html' client_script "client/**/*" server_script "server/**/*" files { 'web/public/index.html', 'web/public/**/*' }
local Intro = Object:extend() --1: normal, 2: hd, 3: hdplus, 4:pixel, 5:pixelhd Intro.SHEEP = 3 function Intro:new() self.logoSheep = Sprite(0,0,"logos/sheepolution_".. ({"normal", "hd", "hdplus", "pixel", "pixelhd"})[Intro.SHEEP]) self.logoSheep:setFilter(Intro.SHEEP < 4 and "linear" or "nearest") self.logoSheep:...
require 'luma.lib.prelude' describe("(identity)", function() assert.is.equal(identity(1), 1) assert.is.equal(identity(2), 2) local t = {identity("a", "b", "c")} assert.are.same(t, {"a", "b", "c"}) local f = {} assert.is.equal(identity(f), f) end) describe("(doall)", function() local old = { 4, 3, 5, 1 } local...
local M = {} local _cp = require 'coatp.Persistent' local log = require "hmlog" function M.init(dbpath) log.debug("Create Table PKVStore") local cls = _cp.persistent('PKVStore') cls.has_p.key = {is = 'rw', isa = 'string'} cls.has_p.value = {is = 'rw', isa = 'string'} cls.has_p.vtype...
#! /usr/bin/env lua local oldprint = print _G.print = function (...) oldprint (...) io.stdout:flush () end local oldexecute = os.execute _G.os.execute = function (...) print (...) return oldexecute (...) end _G.table.unpack = table.unpack or unpack local Arguments = require "argparse" local Bit = requ...
-------------------------------------------------------------------------------- -- 0040-util-path_mt.lua: Tests for path-based DSL walker hook micro-language -- This file is a part of le-dsl-fsm project -- Copyright (c) LogicEditor <info@logiceditor.com> -- Copyright (c) le-dsl-fsm authors -- See file `COPYRIGHT` for ...
spawnX, spawnY, spawnZ = 1566.17, -1310.42, 17.15 handler = call ( getResourceFromName ( "rp_mysql" ), "getDbHandler") -- funkcja na respawn gracza function respawnPlayer(player) spawnPlayer(player, spawnX, spawnY, spawnZ) setCameraTarget(player, player) setElementModel(player, getElementData(player, "player.skin")...
-- ============ -- UNIT TESTING -- ============ -- CLEAR TEST RESULTS -- ================== ClearTestResults() -- PERFORM TESTS -- ============= Ext.Require('AuxFunctions/Tests/General_tests.lua') -- PRINT TEST RESULTS -- ================== ShowTestResults()
local StarGraph = require 'framework.stargraph' local a = StarGraph:new() print(a:addPlanet('crum')) print(a:addSatellite('abcd'))
--- -- A test program for the http server. --look for packages one folder up. package.path = package.path .. ";;;../../?.lua;../../?/init.lua" local lumen = require'lumen' local log = lumen.log local sched = lumen.sched log.setlevel('ALL', 'HTTP') log.setlevel('ALL') local selector = require 'lumen.tasks.se...
---------------------------------------------------------------------------------------------------- -- localized English (bindings module) strings -- --get the add-on engine local AddOnName = ...; --prepare locale local L = LibStub("AceLocale-3.0"):NewLocale(AddOnName, "enUS", true); if not L then return; end L["BI...
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' description "DLRP Characters" author "Ori#8628" ui_page 'ui/index.html' server_script "server/sv_main.lua" client_scripts { 'config.lua', 'client/cl_functions.lua', 'client/cl_main.lua' } files{ 'ui/index.html', 'ui/main.js', ...
dofile("common.inc"); xOffset = 0; yOffset = 0; pointingSpeed = 2000; --ms function doit() askForWindow("Test to find text in regions (windows) such building windows.\n\nEnter text value and optional offset. Mouse will point to location. Useful to finding where a macro is clicking.\n\nTo test image locations, use t...
local color1 = GetHexColor(SL.Global.ActiveColorIndex-1) local color2 = GetHexColor(SL.Global.ActiveColorIndex) local style = ThemePrefs.Get("VisualTheme") local t = Def.ActorFrame{ OffCommand=function(self) self:linear(1) end } -- centers t[#t+1] = Def.ActorFrame { InitCommand=function(self) self:xy(_screen...
package("nanovdb") set_homepage("https://developer.nvidia.com/nanovdb") set_description("Developed by NVIDIA, NanoVDB adds real-time rendering GPU support for OpenVDB.") add_urls("https://github.com/AcademySoftwareFoundation/openvdb.git") add_versions("20201219", "9b79bb0dd66a442149083c8093deefcb03f88...
--[[ Story Mission 4 March of the Cavaliers This is the longest and most complicated mission I've ever created, bar none. It makes the 1st story mission look very simple by comparison. ADDITIONAL REQUIREMENTS TO DO THIS MISSION: - Story Mission 3 done. - Cavaliers Rank 4. - Cavaliers Strength 2. (Done Deliver...
local inspect = require 'inspect' local storage_collector_wrapper_factory = require 'nginx-metrix.storage.collector_wrapper_factory' local exports = {} local collectors = { { name = 'dummy' } } -- dummy item for correct work iter function local collectors_iter = iter(collectors) table.remove(collectors, 1) -- removin...