Returns the semantic application version using format: "major.minor.patch".

@param {object} oManifest - Manifest of the component
@returns {string} Version of application if it is available in the manifest, otherwise an empty string
@public
513692
function (oManifest) {
			var sVersion = "";
			if (oManifest){
				var oSapApp = (oManifest.getEntry) ? oManifest.getEntry("sap.app") : oManifest["sap.app"];
				if (oSapApp && oSapApp.applicationVersion && oSapApp.applicationVersion.version){
					sVersion = oSapApp.applicationVersion.version;
				}
			} else {
				this.log.warning("No Manifest received.");
			}
			return sVersion;
		}
329563
function getPlatVersionsFromFileSystem(projectRoot){
    var platforms_on_fs = cordova_util.listPlatforms(projectRoot);
    var platformVersions = platforms_on_fs.map(function(platform){
        var script = path.join(projectRoot, 'platforms', platform, 'cordova', 'version');
        return Q.ninvoke(child_process, 'exec', script, {}).then(function(result){
            var version = result[0];

            // clean the version we get back from the script
            // This is necessary because the version script uses console.log to pass back
            // the version. Using console.log ends up adding additional line breaks/newlines to the value returned.
            // ToDO: version scripts should be refactored to not use console.log()
            var versionCleaned = version.replace(/\r?\n|\r/g, '');
            return {platform: platform, version: versionCleaned};
        });
    });

    return Q.all(platformVersions);
}
646989
private static String loadVersion(ClassLoader classLoader) throws IOException {
    try {
      Enumeration<URL> resources = classLoader.getResources("META-INF/MANIFEST.MF");

      while (resources.hasMoreElements()) {
        final URL url = resources.nextElement();
        final Manifest manifest = new Manifest(url.openStream());
        final Attributes mainAttributes = manifest.getMainAttributes();
        final String value = mainAttributes.getValue(IMPL_VERSION);

        if (value != null) {
          return value;
        }
      }

    } catch (IOException e) {
      LOG.error("Failed to read manifest", e);
      throw new IOException("Failed to find manifest", e);
    }

    return null;
  }
513330
function isVersionAtLeast(dottedVersion, major, minor, patch){
	var i, v, t,
		verParts = $.map($.trim(dottedVersion).split("."), function(e){ return parseInt(e, 10); }),
		testParts = $.map(Array.prototype.slice.call(arguments, 1), function(e){ return parseInt(e, 10); });

	for( i = 0; i < testParts.length; i++ ){
		v = verParts[i] || 0;
		t = testParts[i] || 0;
		if( v !== t ){
			return ( v > t );
		}
	}
	return true;
}
514234
def version(self):
        
        if self.find:
            return self.meta.sp + split_package(self.find)[1]
        return ""
251649
static Map<String, String> getVersionAttributes(URL url) throws IOException {
        Map<String, String> ret = new LinkedHashMap<>();
        try (InputStream inputStream = url.openStream()) {
            Manifest manifest = new Manifest(inputStream);
            Attributes attributes = manifest.getMainAttributes();
            for (String key : VERSION_ATTRIBUTES) {
                final String value = attributes.getValue(key);
                ret.put(key, value == null ? UNKNOWN_VALUE : value);
            }
        }
        return ret;
    }
1266379
@GET
    @Path("/version")
    @Produces(MediaType.APPLICATION_JSON)
    public Response manifestDetails(@Context HttpServletRequest request) {

        final ServletContext context = request.getSession().getServletContext();

        try (final InputStream manifestStream = context.getResourceAsStream("/META-INF/MANIFEST.MF")) {
            return Response.ok(new Manifest(manifestStream).getMainAttributes()).build();
        } catch (Exception e) {
            return Response.status(Response.Status.NOT_FOUND).entity("Could not find version information").build();
        }
    }
1276430
def get_version(self):
        
        version = '{major}.{minor}.{patch}'.format(**self.version_info)

        if self.pre_release:
            version = '{}-{label}.{pre}'.format(version, **self.version_info)
        return version
146834
def version_at_least(version_string, major, minor, micro, patch):
    
    parts = re.match(
        r'^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+).*$',
        version_string,
    )
    for ver, gold in zip(parts.group(1, 2, 3, 4), (major, minor, micro, patch)):
        if int(ver) < int(gold):
            return False
        elif int(ver) > int(gold):
            return True
    return True
1200934
def version():
    '''
    
    '''
    _false_return = {'result': False,
                     'comment': 'OSQuery version unavailable.'}
    res = _osquery_cmd(table='osquery_info', attrs=['version'])
    if 'result' in res and res['result']:
        if 'data' in res and isinstance(res['data'], list):
            return res['data'][0].get('version', '') or _false_return
    return _false_return
7198
function toDrupalMajorVersion(version) {
    var regex = /^(\d+)\.\d+\.[x\d+]/;
    var match = version.match(regex)
    if (match) {
      return match[1] + '.x';
    }

    return version;
  }
896289
function getVersion(req) {
   var version;
   if (!req.version) {
      if (req.headers && req.headers['accept-version']) {
         version = req.headers['accept-version'];
      }
   } else {
      version = String(req.version);
   }
   return version;
}
1321429
function getPackageVersion() {
  var packageJson = path.join(process.cwd(), 'package.json'),
    version;
  try {
    version = require(packageJson).version;
  } catch (unused) {
    throw new Error('Could not load package.json, please make sure it exists');
  }
  if (!semver.valid(version)) {
    throw new Error('Invalid version number found in package.json, please make sure it is valid');
  }

  return [ semver.major(version), semver.minor(version), semver.patch(version) ].join('.');
}
210645
public static int getAppVersion(@NonNull final Context context) {
        try {
            final PackageInfo packageInfo = context.getPackageManager()
                    .getPackageInfo(context.getPackageName(), 0);
            return packageInfo.versionCode;
        } catch (PackageManager.NameNotFoundException ignore) {
            // ignore
        }

        return Integer.MIN_VALUE;
    }
910713
public static String getVersionString() {
		String versionString = "UNKNOWN";
		Properties propeties = getProperites();
		if(propeties != null) {
			versionString = propeties.getProperty("finmath-lib.version");
		}
		return versionString;
	}
253166
function semanticVersionComparator (v1, v2) {
  const [major1, minor1, patch1] = v1.split('.').map(Number)
  const [major2, minor2, patch2] = v2.split('.').map(Number)
  if (major1 > major2) {
    return 1
  } else if (major1 === major2) {
    if (minor1 > minor2) {
      return 1
    } else if (minor1 === minor2) {
      if (patch1 > patch2) {
        return 1
      } else if (patch1 === patch2) {
        return 0
      } else {
        return -1
      }
    } else {
      return -1
    }
  } else {
    return -1
  }
}
280624
private static int getAppVersion(Context context) {
        try {
            PackageInfo packageInfo = context.getPackageManager()
                    .getPackageInfo(context.getPackageName(), 0);
            return packageInfo.versionCode;
        } catch (NameNotFoundException e) {
            // should never happen
            throw new RuntimeException("Coult not get package name: " + e);
        }
    }