Checks if FFmpeg is installed.

@throws \Discord\Exceptions\FFmpegNotFoundException Thrown when FFmpeg is not found.

@return bool Whether FFmpeg is installed or not.
162661
public function checkForFFmpeg()
    {
        $binaries = [
            'ffmpeg',
        ];

        foreach ($binaries as $binary) {
            $output = shell_exec("which {$binary}");

            if (! empty($output)) {
                return true;
            }
        }

        $this->emit('error', [new FFmpegNotFoundException('No FFmpeg binary was found.')]);

        return false;
    }
112764
public static boolean hasFOPInstalled() {
    try {
      Class<?> c1 = Class.forName("org.apache.fop.svg.PDFTranscoder");
      Class<?> c2 = Class.forName("org.apache.fop.render.ps.PSTranscoder");
      Class<?> c3 = Class.forName("org.apache.fop.render.ps.EPSTranscoder");
      return (c1 != null) && (c2 != null) && (c3 != null);
    }
    catch(ClassNotFoundException e) {
      return false;
    }
  }
1011541
public static function isNewestVersionAvailable()
    {
        $latestVersion = self::getLatestVersion();
        if (!empty($latestVersion)
            && version_compare(Version::VERSION, $latestVersion) == -1
        ) {
            return $latestVersion;
        }
        return false;
    }
1196401
function has_installed_addons() {
            if ( ! $this->has_addons() ) {
                return false;
            }

            foreach ( self::$_instances as $instance ) {
                if ( $instance->is_addon() && is_object( $instance->_parent_plugin ) ) {
                    if ( $this->_plugin->id == $instance->_parent_plugin->id ) {
                        return true;
                    }
                }
            }

            return false;
        }
676288
public function isInstalled()
    {
        try {
            $sugarConfig = $this->getSugarConfig();
            if (array_key_exists('installer_locked', $sugarConfig)) {
                return $sugarConfig['installer_locked'];
            }
        } catch (SugarException $e) {
        }

        return false;
    }
433502
public function isFile(): bool
    {
        if ($this->caching == false) {
            return is_file($this->getAbsoluteFilePath());
        }

        if ($this->isFile == null) {
            $this->isFile = is_file($this->getAbsoluteFilePath());
        }

        return $this->isFile;
    }
1325743
public function isIndirect()
    {
        $erroringFile = $erroringPackage = null;
        foreach ($this->trace as $line) {
            if (\in_array($line['function'], ['require', 'require_once', 'include', 'include_once'], true)) {
                continue;
            }
            if (!isset($line['file'])) {
                continue;
            }
            $file = $line['file'];
            if ('-' === $file || 'Standard input code' === $file || !realpath($file)) {
                continue;
            }
            if (!$this->pathOriginatesFromVendor($file)) {
                return false;
            }
            if (null !== $erroringFile && null !== $erroringPackage) {
                $package = $this->getPackage($file);
                if ('composer' !== $package && $package !== $erroringPackage) {
                    return true;
                }
                continue;
            }
            $erroringFile = $file;
            $erroringPackage = $this->getPackage($file);
        }

        return false;
    }
580459
public function valid()
    {
        if ($this->container['transcoderWatermark'] === null) {
            return false;
        }
        if ($this->container['serverVersion'] === null) {
            return false;
        }
        if ($this->container['gpuAcceleration'] === null) {
            return false;
        }
        if ($this->container['wseName'] === null) {
            return false;
        }
        if ($this->container['transcoderLicensed'] === null) {
            return false;
        }
        if ($this->container['javaMaxHeapSize'] === null) {
            return false;
        }
        if ($this->container['transcoderLicensesInUse'] === null) {
            return false;
        }
        if ($this->container['javaVersion'] === null) {
            return false;
        }
        if ($this->container['httpOriginAvailable'] === null) {
            return false;
        }
        if ($this->container['serverName'] === null) {
            return false;
        }
        if ($this->container['osArchitecture'] === null) {
            return false;
        }
        if ($this->container['drmApplications'] === null) {
            return false;
        }
        if ($this->container['javaVMVersion'] === null) {
            return false;
        }
        if ($this->container['transcoderLicenses'] === null) {
            return false;
        }
        if ($this->container['timeRunning'] === null) {
            return false;
        }
        if ($this->container['licenseType'] === null) {
            return false;
        }
        if ($this->container['osBitness'] === null) {
            return false;
        }
        if ($this->container['dvrApplications'] === null) {
            return false;
        }
        if ($this->container['osVersion'] === null) {
            return false;
        }
        if ($this->container['serverBuild'] === null) {
            return false;
        }
        if ($this->container['javaName'] === null) {
            return false;
        }
        if ($this->container['maxConnections'] === null) {
            return false;
        }
        if ($this->container['dvrLicensed'] === null) {
            return false;
        }
        if ($this->container['serverMode'] === null) {
            return false;
        }
        if ($this->container['javaBitness'] === null) {
            return false;
        }
        if ($this->container['currentConnections'] === null) {
            return false;
        }
        if ($this->container['drmLicensed'] === null) {
            return false;
        }
        if ($this->container['javaVendor'] === null) {
            return false;
        }
        if ($this->container['osName'] === null) {
            return false;
        }
        if ($this->container['version'] === null) {
            return false;
        }
        if ($this->container['transcoderApplications'] === null) {
            return false;
        }
        if ($this->container['transcoderAvailable'] === null) {
            return false;
        }
        if ($this->container['javaHome'] === null) {
            return false;
        }
        if ($this->container['maxIncommingStreams'] === null) {
            return false;
        }
        if ($this->container['totalMemory'] === null) {
            return false;
        }
        if ($this->container['availableMemory'] === null) {
            return false;
        }
        if ($this->container['nativeBase'] === null) {
            return false;
        }
        if ($this->container['dvrInUse'] === null) {
            return false;
        }
        if ($this->container['drmInUse'] === null) {
            return false;
        }
        if ($this->container['licenseExpireDate'] === null) {
            return false;
        }
        if ($this->container['processorCores'] === null) {
            return false;
        }
        if ($this->container['restAPIAvailable'] === null) {
            return false;
        }
        return true;
    }
1074895
final public function hasUTF()
    {
        $verParts = explode('.', $this->getVersion());
        return ($verParts[0] == 5 || ($verParts[0] == 4 && $verParts[1] == 1 && (int)$verParts[2] >= 2));
    }
738045
public function IsNotFoundDispatched () {
		$toolClass = $this->toolClass;
		$defaultCtrlName = $toolClass::GetDashedFromPascalCase($this->defaultControllerName);
		$errorActionName = $toolClass::GetDashedFromPascalCase($this->defaultControllerNotFoundActionName);
		return $this->request->GetControllerName() == $defaultCtrlName &&
			$this->request->GetActionName() == $errorActionName;
	}
998986
public function isCurrent()
    {
        if (AVUser::getCurrentUser() && $this->getObjectId())
        {
            if ($this->getObjectId() == AVUser::getCurrentUser()->getObjectId())
            {
                return true;
            }
        }

        return false;
    }
718115
public function check_mime_detection()
    {
        $errors = array();
        $files  = array(
            'program/resources/tinymce/video.png' => 'image/png',
            'program/resources/blank.tiff'        => 'image/tiff',
            'program/resources/blocked.gif'       => 'image/gif',
        );

        foreach ($files as $path => $expected) {
            $mimetype = rcube_mime::file_content_type(INSTALL_PATH . $path, basename($path));
            if ($mimetype != $expected) {
                $errors[] = array($path, $mimetype, $expected);
            }
        }

        return $errors;
    }
407574
function(ffmpeg, cb) {
        if (ffmpeg.length) {
          return cb(null, ffmpeg);
        }

        utils.which('ffmpeg', function(err, ffmpeg) {
          cb(err, ffmpeg);
        });
      }
168582
public function installMode(): bool
    {
        if (!isset($this->cache[self::INSTALL_MODE])) {
            $this->cache[self::INSTALL_MODE] = !is_file($this->initFile());
        }

        return $this->cache[self::INSTALL_MODE];
    }
1051215
public static function isJustInstalled()
    {
        $types = Type::find()->all();
        $categories = Category::find()->all();

        return empty($types) || empty($categories) ? : false;
    }
235333
public function isPipe()
    {
        if (\is_null($this->isPipe)) {
            $this->isPipe = false;
            if ($this->isAttached()) {
                $mode = fstat($this->stream)['mode'];
                $this->isPipe = ($mode & 0010000) !== 0;
            }
        }
        return $this->isPipe;
    }
243857
public function isUploaded()
    {
        if (!$this->isValid()) {
            return false;
        }

        if (!isset($this->file['tmp_name'], $this->file['error'])) {
            return false;
        }

        return is_uploaded_file($this->file['tmp_name']) && $this->file['error'] === UPLOAD_ERR_OK;
    }