Return True if the item relates to the given app_id (and app_ver, if passed).
776481
def is_related_to(item, app_id, app_ver=None):
    """"""
    versionRange = item.get('versionRange')
    if not versionRange:
        return True

    for vR in versionRange:
        if not vR.get('targetApplication'):
            return True
        if get_related_targetApplication(vR, app_id, app_ver) is not None:
            return True
    return False
569467
function(appConfig) {

		// check for valid app configurations
		if (!appConfig.appId) {
			F2.log('"appId" missing from app object');
			return false;
		}
		else if (!appConfig.root && !appConfig.manifestUrl) {
			F2.log('"manifestUrl" missing from app object');
			return false;
		}

		return true;
	}
31843
public static boolean launchOrDownloadApp(String applicationId) {
		boolean isAppInstalled = isAppInstalled(applicationId);
		if (isAppInstalled) {
			launchExternalApp(applicationId);
		} else {
			GooglePlayUtils.launchAppDetails(applicationId);
		}
		return isAppInstalled;
	}
1229206
def _check_existence_by_collection(self, container, item_name):
        '''
        '''

        coll = container.get_collection()
        for item in coll:
            if item.name == item_name:
                return True
        return False
410689
def install_app(self, app_path, app_package):
        
        driver = self._current_application()
        driver.install_app(app_path)
        return driver.is_app_installed(app_package)
354641
function _has_item(in_arg_key){
	var retval = false;
	if( typeof anchor.current_data[in_arg_key] != 'undefined' ){
	    retval = true;
	}
	return retval;
    }
52619
def show(cls, app_id):
        
        conn = Qubole.agent()
        return conn.get(cls.element_path(app_id))
1073552
def get_version(self, app_id, version):
        
        response = self._do_request('GET', '/v2/apps/{app_id}/versions/{version}'
                                    .format(app_id=app_id, version=version))
        return MarathonApp.from_json(response.json())
107238
def application(self, id=None, manifest=None, name=None):
        

        modify = False
        found = False

        # Try to find application by name or id
        if name and id:
            found = self.get_application(id=id)
            if not found.name == name:
                modify = True
        elif id:
            found = self.get_application(id=id)
            name = found.name
        elif name:
            try:
                found = self.get_application(name=name)
            except exceptions.NotFoundError:
                pass

        # If found - compare parameters
        if found:
            if manifest and not manifest == found.manifest:
                modify = True

        # We need to update application
        if found and modify:
            found.update(name=name, manifest=manifest)
        if not found:
            created = self.create_application(name=name, manifest=manifest)

        return found or created
960018
def app_evaluation_count(app_id, value=1):
        '''
        
        '''
        return TabEvaluation.select().where(
            (TabEvaluation.post_id == app_id) & (TabEvaluation.value == value)
        ).count()
796631
function hasFired(app, evName) {
            if ("undefined" === typeof evName) {
                evName = app;
                app = defaultAppName;
            }

            return evUtil.hasFired(fired, app, evName);
        }
438718
def app_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/apps/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
456929
private boolean shouldItemIconsBeShown() {
        SharedPreferences sharedPreferences =
                PreferenceManager.getDefaultSharedPreferences(getActivity());
        String key = getString(R.string.show_item_icons_preference_key);
        boolean defaultValue =
                getResources().getBoolean(R.bool.show_item_icons_preference_default_value);
        return sharedPreferences.getBoolean(key, defaultValue);
    }
961824
def allow_relation(self, obj1, obj2, **hints):
        
        if obj1._meta.app_label != 'oldimporter' and obj2._meta.app_label != 'oldimporter':
            return True
        return None
322866
function isValidInstance(app) {
  if (!app.isApp && !app.isGenerator && !app.isVerb) {
    return false;
  }
  if (app.isRegistered('verb-collections')) {
    return false;
  }
  return true;
}
617507
def is_playing_shared_game(self, steamID, appid_playing, format=None):
        
        parameters = {'steamid' : steamID, 'appid_playing' : appid_playing}
        if format is not None:
            parameters['format'] = format
        url = self.create_request_url(self.interface, 'IsPlayingSharedGame', 1,
            parameters)
        data = self.retrieve_request(url)
        return self.return_data(data, format=format)
94251
def get_id(self):
        '''
        
        '''
        if self._dxid is not None:
            return self._dxid
        else:
            return 'app-' + self._name + '/' + self._alias