Check to see if Microsoft Update is Enabled
    Return Boolean
436064
def _get_msupdate_status():
    '''
    
    '''
    # To get the status of Microsoft Update we actually have to check the
    # Microsoft Update Service Manager
    # Initialize the PyCom system
    with salt.utils.winapi.Com():
        # Create a ServiceManager Object
        obj_sm = win32com.client.Dispatch('Microsoft.Update.ServiceManager')

    # Return a collection of loaded Services
    col_services = obj_sm.Services

    # Loop through the collection to find the Microsoft Udpate Service
    # If it exists return True otherwise False
    for service in col_services:
        if service.name == 'Microsoft Update':
            return True

    return False
524801
def enable(iface):
    '''
    
    '''
    if is_enabled(iface):
        return True
    cmd = ['netsh', 'interface', 'set', 'interface',
           'name={0}'.format(iface),
           'admin=ENABLED']
    __salt__['cmd.run'](cmd, python_shell=False)
    return is_enabled(iface)
118463
function enableCheckForUpdateEntry(enable) {
        var cfuCommand = CommandManager.get(Commands.HELP_CHECK_FOR_UPDATE);
        cfuCommand.setEnabled(enable);
        UpdateNotification.enableUpdateNotificationIcon(enable);
    }
858019
def check_for_update(self, force=True, download=False):
        
        part = '/updater/check?download=%s' % (1 if download else 0)
        if force:
            self.query(part, method=self._session.put)
        releases = self.fetchItems('/updater/status')
        if len(releases):
            return releases[0]
1230314
def check_update():
    
    r = requests.get("https://pypi.python.org/pypi/prof/json")
    data = r.json()
    if versiontuple(data['info']['version']) > versiontuple(__version__):
        return True
    return False
911482
def is_enabled(self, name):
        
        if self.services and name in self.services:
            return self.services[name]['config'] == 'enabled'
        return False
809494
public static function isEnabled()
    {
        $app = Facade::getFacadeApplication();
        $cache = $app->make('cache/request');
        $item = $cache->getItem('multilingual/enabled');
        if (!$item->isMiss()) {
            return $item->get();
        }

        $item->lock();
        $result = false;
        if ($app->isInstalled()) {
            $site = $app->make('site')->getSite();
            if (count($site->getLocales()) > 1) {
                $result = true;
            }
        }

        $cache->save($item->set($result));

        return $result;
    }
779311
function isInstalled(dep) {
    if (_.has(exceptions, dep)) return exceptions[dep];
    return installedDeps.has(dep);
}
605141
public function system_updates()
    {
        if (file_exists($this->tmp_path.'/check-updates')) {
            unlink($this->tmp_path.'/check-updates');
        }

        if ($this->host_os === 'WINDOWS') {
            $updSess = new \COM("Microsoft.Update.Session");
            $updSrc = $updSess->CreateUpdateSearcher();
            $result = $updSrc->Search('IsInstalled=0 and Type=\'Software\' and IsHidden=0');
            return !empty($result->Updates->Count) ? '1' : '0';
        }

        if ($this->distro() === 'UBUNTU') {
            $get_updates = shell_exec('apt-get -s dist-upgrade');
            if (preg_match('/^(\d+).+upgrade.+(\d+).+newly\sinstall/m', $get_updates, $matches)) {
                $result = (int) $matches[1] + (int) $matches[2];
            } else {
                $result = 0;
            }
            return !empty($result) ? '1' : '0';
        }

        if ($this->distro() === 'CENTOS') {
            exec('yum check-update', $output, $exitCode);
            return ($exitCode == 100) ? '1' : '0';
        }
        return '-1';
    }
1227070
def enable_disable(self):
        
        if self.enabled:
            self.update(enabled=False)
        else:
            self.update(enabled=True)
1321173
def enabled(name, **kwargs):
    '''
    
    '''
    if _service_is_upstart(name):
        return _upstart_is_enabled(name)
    else:
        if _service_is_sysv(name):
            return _sysv_is_enabled(name)
    return None
708831
def has_conflicting_update(self, update):
        
        # we explicitly want a flat list of updates here, that's why we call iter_updates
        # with both `initial` and `scheduled` == False
        for _, _, _, updates in self.iter_updates(initial=False, scheduled=False):
            for _update in updates:
                if (
                        update.requirement.key == _update.requirement.key and
                        (
                                update.commit_message != _update.commit_message or
                                update.requirement.latest_version_within_specs !=
                                _update.requirement.latest_version_within_specs
                        )
                ):
                    logger.info("{} conflicting with {}/{}".format(
                        update.requirement.key,
                        update.requirement.latest_version_within_specs,
                        _update.requirement.latest_version_within_specs)
                    )
                    return True
        return False
104885
private boolean checkEnabled() {
        try {
            return getSettings().getBoolean(Settings.KEYS.ANALYZER_ARTIFACTORY_ENABLED);
        } catch (InvalidSettingException ise) {
            LOGGER.warn("Invalid setting. Disabling the Artifactory analyzer");
        }
        return false;
    }
287007
public function enabled(string $for = ''): bool
    {
        global $wp_markdown_extra;
        $mde = $wp_markdown_extra;

        $for = $for === 'posts' || $for === 'comments' ? $for : 'posts';
        return $mde && $mde->s::getOption($for.'_enable');
    }
646705
protected boolean isUpdateAvailable() {
		boolean result = false;
		String version = EMPTY_VERSION;
		try {
			version = retrieveRemoteVersion(store.getVersionUrl(), store.getCharset());
		} catch (final IOException e) {
			LOG.info(MSG_NO_UPDATE_CHECK_POSSIBLE);
			LOG.debug(String.format(MSG_NO_UPDATE_CHECK_POSSIBLE__DEBUG, e.getClass().getName(), e.getLocalizedMessage()));
		}
		if (hasUpdate(version, getCurrentVersion())) {
			LOG.debug(String.format(MSG_UPDATE_AVAILABLE, getCurrentVersion(), version));
			result = true;
		} else {
			LOG.debug(String.format(MSG_NO_UPDATE_AVAILABLE, getCurrentVersion()));
		}
		lastUpdateCheck = System.currentTimeMillis();
		return result;
	}
780669
private boolean isUpdateConfiguredFalse() {
        try {
            if (!settings.getBoolean(Settings.KEYS.UPDATE_NVDCVE_ENABLED, true)) {
                return true;
            }
        } catch (InvalidSettingException ex) {
            LOGGER.trace("invalid setting UPDATE_NVDCVE_ENABLED", ex);
        }
        boolean autoUpdate = true;
        try {
            autoUpdate = settings.getBoolean(Settings.KEYS.AUTO_UPDATE);
        } catch (InvalidSettingException ex) {
            LOGGER.debug("Invalid setting for auto-update; using true.");
        }
        return !autoUpdate;
    }
729230
def should_update(self):
        
        if self.timer.finished():
            self.timer.set(self.refresh())
            self.timer.reset()
            return self.enable()
        return False