Determine whether the component is supported with current version of Zest.

@param (string) $zVersion   Zest version number from component config file.
@param (string) $comparator Operator that used to compare version.

@since 3.0.0

@return bool
5986
public function isSupported($zVersion, $comparator)
    {
        if (version_compare($zVersion, Version::VERSION, $comparator) === true) {
            return true;
        }

        return false;
    }
558413
public function versionCompare($frameworkVersion, $compareVersion, $operator = null)
    {
        // Lumen (5.5.2) (Laravel Components 5.5.*)
        $lumenPattern = '/Lumen \((\d\.\d\.[\d|\*])\)( \(Laravel Components (\d\.\d\.[\d|\*])\))?/';

        if (preg_match($lumenPattern, $frameworkVersion, $matches)) {
            $frameworkVersion = isset($matches[3]) ? $matches[3] : $matches[1]; // Prefer Laravel Components version.
        }

        return version_compare($frameworkVersion, $compareVersion, $operator);
    }
1180550
public void checkVersion(ZWaveCommandClass commandClass) {
		ZWaveVersionCommandClass versionCommandClass = (ZWaveVersionCommandClass)this.getNode().getCommandClass(CommandClass.VERSION);
		
		if (versionCommandClass == null) {
			logger.error(String.format("Version command class not supported on node %d," +
					"reverting to version 1 for command class %s (0x%02x)", 
					this.getNode().getNodeId(), 
					commandClass.getCommandClass().getLabel(), 
					commandClass.getCommandClass().getKey()));
			return;
		}
		
		this.getController().sendData(versionCommandClass.getCommandClassVersionMessage(commandClass.getCommandClass()));
	}
891478
function hasSupportVersion4() {
	//noinspection JSUnresolvedVariable
	if (!android.support || !android.support.v4 || !android.support.v4.content || !android.support.v4.content.ContextCompat || !android.support.v4.content.ContextCompat.checkSelfPermission) {
		return false;
	}
	return true;
}
938329
public static boolean isCatalogCompatible(String catalogVersionStr)
    {
        if (catalogVersionStr == null || catalogVersionStr.isEmpty()) {
            return false;
        }

        //Check that it is a properly formed verstion string
        Object[] catalogVersion = MiscUtils.parseVersionString(catalogVersionStr);
        if (catalogVersion == null) {
            throw new IllegalArgumentException("Invalid version string " + catalogVersionStr);
        }

        if (!catalogVersionStr.equals(VoltDB.instance().getVersionString())) {
            return false;
        }

        return true;
    }
358767
public function shouldProcess(Version $version)
    {
        $result = false;
        if (ExifMetadataReader::isSupported()) {
            if ($version->getTypeObject()->getName() == 'JPEG') {
                try {
                    $metadata = $version->hasImagineImage() ? $version->getImagineImage()->metadata() : null;
                    if ($metadata === null) {
                        $fr = $version->getFileResource();
                        $medatadaReader = new ExifMetadataReader();
                        $metadata = $medatadaReader->readData($fr->read());
                    }
                    switch ($metadata->get('ifd0.Orientation', null)) {
                        case 2: // top-right
                        case 3: // bottom-right
                        case 4: // bottom-left
                        case 5: // left-top
                        case 6: // right-top
                        case 7: // right-bottom
                        case 8: // left-bottom
                            $result = true;
                            break;
                    }
                } catch (Exception $x) {
                } catch (Throwable $x) {
                }
            }
        }

        return $result;
    }
591230
static boolean supportedJavaVersion(String javaVersion, String javaVendor, int major, int minor, String point) {
        String[] versionParts = javaVersion.split("\\.");
        int currentMajor = Integer.parseInt(versionParts[0]);
        int currentMinor = Integer.parseInt(versionParts[1]);
        String currentPoint = versionParts[2];

        if (currentMajor > major) {
            return true;
        } else if (currentMajor == major) {
            if (currentMinor > minor) {
                return true;
            } else if (currentMinor == minor) {
                // java.version point version is not a version number and for Azul (zing) it does not follow the
                // the number_number... format used by Oracle and Open JDK (e.g. 1.7.0-zing_5.10.1.0). So just
                // allow any zing version that starts with major.minor.
                return javaVendor.startsWith("Azul") || currentPoint.compareTo(point) >= 0;
            }
        }

        return false;
    }
915889
public static function isProcessing( eZContentObjectVersion $versionObject )
    {
        $count = parent::count(
            self::definition(),
            array(
                'ezcontentobject_version_id' => $versionObject->attribute( 'id' ),
                // 'status' => self::STATUS_WORKING // not used yet
            )
        );
        return ( $count != 0 );
    }
699254
public function match(Version $version)
    {
        $versionStabilityIndex = array_search($version->getStability(), Version::$stabilities);
        $constraintStabilityIndex = array_search($this->stability, Version::$stabilities);

        if ($this->compare($versionStabilityIndex, $constraintStabilityIndex) !== 0) {
            return false;
        }

        $numericValues = $version->numeric();
        $comparisons = array();

        foreach ($this->version as $i => $value) {
            $comparisons[$i] = $this->compare($numericValues[$i], $value);
        }

        switch ($this->operator) {
            case '=': case '==':
                // all parts must be equal:
                return array_filter($comparisons) === array();
                break;
            case '!': case '!=':
                // any part must be unequal:
                return array_filter($comparisons) !== array();
                break;
            case '>=':
            case '<=':
            case '>':
            case '<':
                // the first mismatch is the tie breaker
                $mismatches = array_filter($comparisons);
                if (!count($mismatches)) {
                    // if no mismatches, only ok if equality operator
                    return in_array($this->operator, array('<=', '>='));
                } else {
                    $first = array_shift($mismatches);
                    return
                           ($this->operator === '<'  && $first < 0)
                        || ($this->operator === '<=' && $first < 0)
                        || ($this->operator === '>'  && $first > 0)
                        || ($this->operator === '>=' && $first > 0)
                    ;
                }
        }

        throw new \UnexpectedValueException("An unknown edge case was encountered. Is the constraint valid?");
    }
1305634
public function compareTo($version)
    {
        $cmp = self::parse($version);
        $result = $this->cmp($cmp, $this->numbers);
        if ($result === 0) {
            $result = $this->cmp($this->numbers, $cmp);
            $result = - $result;
        } else {
            return $result;
        }
        return $result;
    }
165808
public static function compare($version)
    {
        $version = strtolower($version);
        $version = preg_replace('/(\d)pr(\d?)/', '$1a$2', $version);
        return version_compare($version, strtolower(static::VERSION));
    }
842811
private static function preReleaseEquals(PreRelease $v1, PreRelease $v2)
    {
        // If they don't match on the versionable level they can not match
        if (!self::versionableEquals($v1, $v2)) {
            return false;
        }

        // Both other parts need to match
        if ($v1->getGreek() !== $v2->getGreek()) {
            return false;
        }
        if ($v1->getReleaseNumber() !== $v2->getReleaseNumber()) {
            return false;
        }

        return true;
    }
833583
def is_supported():
    '''
    
    '''
    # Check for supported platforms
    # NOTE: ZFS on Windows is in development
    # NOTE: ZFS on NetBSD is in development
    on_supported_platform = False
    if salt.utils.platform.is_sunos():
        on_supported_platform = True
    elif salt.utils.platform.is_freebsd() and _check_retcode('kldstat -q -m zfs'):
        on_supported_platform = True
    elif salt.utils.platform.is_linux() and os.path.exists('/sys/module/zfs'):
        on_supported_platform = True
    elif salt.utils.platform.is_linux() and salt.utils.path.which('zfs-fuse'):
        on_supported_platform = True
    elif salt.utils.platform.is_darwin() and \
         os.path.exists('/Library/Extensions/zfs.kext') and \
         os.path.exists('/dev/zfs'):
        on_supported_platform = True

    # Additional check for the zpool command
    return (salt.utils.path.which('zpool') and on_supported_platform) is True
417292
private function checkTusVersion() {
        $tusVersion = $this->getRequest()->getHeader('Tus-Resumable');
        if ($tusVersion instanceof \Zend\Http\Header\HeaderInterface) {
            return $tusVersion->getFieldValue() === self::TUS_VERSION;
        }
        return false;
    }
278237
public static function check_edge_version($version = null) {
        $useragent = self::get_user_agent_string();

        if ($useragent === false) {
            // No User Agent found.
            return false;
        }

        if (strpos($useragent, 'Edge/') === false) {
            // Edge was not found in the UA - this is not Edge.
            return false;
        }

        if (empty($version)) {
            // No version to check.
            return true;
        }

        // Find the version.
        // Edge versions are always in the format:
        //      Edge/<version>.<OS build number>
        preg_match('%Edge/([\d]+)\.(.*)$%', $useragent, $matches);

        // Just to be safe, round the version being tested.
        // Edge only uses integer versions - the second component is the OS build number.
        $version = round($version);

        // Check whether the version specified is >= the version found.
        return version_compare($matches[1], $version, '>=');
    }
842046
public function findRecent(Version $version, $major = false, $pre = false)
    {
        /** @var $current Update */
        $current = null;
        $major = $major ? $version->getMajor() : null;

        foreach ($this->updates as $update) {
            if ($major && ($major !== $update->getVersion()->getMajor())) {
                continue;
            }

            if ((false === $pre)
                && !$update->getVersion()->isStable()) {
                continue;
            }

            $test = $current ? $current->getVersion() : $version;

            if (false === $update->isNewer($test)) {
                continue;
            }

            $current = $update;
        }

        return $current;
    }
444196
public static function isVersion($version){
        $currentVersion = Craft::$app->getVersion();
        $version = explode('.', $version);
        $currentVersion = explode('.', $currentVersion);
        $isVersion = true;
        foreach($version as $key => $value){
            if ((int)$currentVersion[$key] < $version[$key]){ 
                $isVersion = false;
            }
        }
        return $isVersion;
    }