Return True if the value is in the hide configuration list.

        The hide configuration list is defined in the glances.conf file.
        It is a comma separed list of regexp.
        Example for diskio:
        hide=sda2,sda5,loop.*
488576
def is_hide(self, value, header=""):
        
        # TODO: possible optimisation: create a re.compile list
        return not all(j is None for j in [re.match(i, value.lower()) for i in self.get_conf_value('hide', header=header)])
1374108
public boolean isSolution(Configuration configuration) {
        try {
            boolean[] presenceMap = new boolean[this.dimension];
            Arrays.fill(presenceMap, false);

            for (int i = 0; i < this.dimension; ++i) {
                if (presenceMap[configuration.valueAt(i)]) return false;
                presenceMap[configuration.valueAt(i)] = true;
            }
        } catch (IndexOutOfBoundsException e) {
            return false;
        }

        return true;
    }
255424
private int showConfig(String cmd, String argv[], int startindex) throws IOException {
    int exitCode = 0;
    PolicyInfo[] all = hightidenode.getAllPolicies();
    for (int i = 0; i < all.length; i++) {
      System.out.println(all[i]);
    }
    return exitCode;
  }
878083
def __check_config_key(self, key):
        
        try:
            section, option = key.split('.')
        except (AttributeError, ValueError):
            return False

        if not section or not option:
            return False

        return section in Config.CONFIG_OPTIONS and\
            option in Config.CONFIG_OPTIONS[section]
768233
function(){
		var conf = {};
		for(var idname in this.list){
			if(this.getexec(idname)){ conf[idname] = this.get(idname);}
		}
		return conf;
	}
1337712
function findConfigFiles (dir) {
  let result = []

  if (typeof dir !== 'string' || !fs.existsSync(dir)) {
    return result
  }

  const fileList = fs.readdirSync(dir)

  debug(`${dir} file list: %o`, fileList)

  result = linterConfigFile
    .filter(fileName => fileList.includes(fileName))
    .map(fileName => path.join(dir, fileName))

  debug('config file: %o', result)

  return result
}
117836
function (mask) {
            var found_mask;

            if (typeof mask === "object") {
               mask = (mask.nick||'*')+'!'+(mask.ident||'*')+'@'+(mask.hostname||'*');
            } else if (typeof mask === "string") {
               mask = toUserMask(mask);
            }

            found_mask = this.ignore_list.find(function(entry) {
                return entry.get('regex').test(mask);
            });

            return !!found_mask;
        }
354950
def findTheLost(config_file, configspec_file, skipHidden=True):
    
    # do some sanity checking, but don't (yet) make this a serious error
    if not os.path.exists(config_file):
        print("ERROR: Config file not found: "+config_file)
        return []
    if not os.path.exists(configspec_file):
        print("ERROR: Configspec file not found: "+configspec_file)
        return []
    tmpObj = configobj.ConfigObj(config_file, configspec=configspec_file)
    simval = configobj.SimpleVal()
    test = tmpObj.validate(simval)
    if test == True:
        return []
    # If we get here, there is a dict returned of {key1: bool, key2: bool}
    # which matches the shape of the config obj.  We need to walk it to
    # find the Falses, since they are the missing pars.
    missing = []
    flattened = configobj.flatten_errors(tmpObj, test)
    # But, before we move on, skip/eliminate any 'hidden' items from our list,
    # since hidden items are really supposed to be missing from the .cfg file.
    if len(flattened) > 0 and skipHidden:
        keepers = []
        for tup in flattened:
            keep = True
            # hidden section
            if len(tup[0])>0 and isHiddenName(tup[0][-1]):
                keep = False
            # hidden par (in a section, or at the top level)
            elif tup[1] is not None and isHiddenName(tup[1]):
                keep = False
            if keep:
                keepers.append(tup)
        flattened = keepers
    flatStr = flattened2str(flattened, missing=True)
    return flatStr
1252888
def check_config_mode(self, check_string=")#", pattern=r"[#\$]"):
        
        self.write_channel(self.RETURN)
        output = self.read_until_pattern(pattern=pattern)
        # Strip out (admin) so we don't get a false positive with (admin)#
        # (admin-config)# would still match.
        output = output.replace("(admin)", "")
        return check_string in output
1256227
def do_list():
    
    dirs =  os.walk(CONFIG_ROOT).next()[1]
    if dirs:
        print "List of available configurations:\n"
        for d in dirs:
            print "  * {}".format(d)
    else:
        print "No configurations available."
868971
def unset_config_value(self, name, quiet=False):
        

        config_data = self._read_config_file()

        if name in config_data:

            del config_data[name]

            self._write_config_file(config_data)

            if not quiet:
                self.print_config_value(name, separator=' is now set to: ')
1266229
function findConfig (filePath) {

    var foundConfig;

    var finders = [
        _codetagsrc,
        _embedded
    ];

    var dir = $path.dirname(filePath);
    while (!foundConfig && finders.length) {
        foundConfig = finders.shift()(dir);
    }

    if (!foundConfig) {
        // screwed. should not happen.
        throw 'Oops. Could not find a config, and embedded config also appears to be missing?';
    }

    return foundConfig;

}
332571
private boolean checkWriteConfiguration(List<CmsSearchField> fields) {

        if (fields == null) {
            return false;
        }
        Iterator<CmsSearchField> itFields = fields.iterator();
        while (itFields.hasNext()) {
            CmsLuceneField curField = (CmsLuceneField)itFields.next();
            if (curField.getMappings().isEmpty()) {
                return false;
            }
        }
        return true;
    }
849523
def main(self, config_filename, regex):
        
        self._read_configuration_file(config_filename)

        if self._constants_filename:
            self._io.title('Constants')

            self.connect()
            self._get_old_columns()
            self._get_columns()
            self._enhance_columns()
            self._merge_columns()
            self._write_columns()
            self._get_labels(regex)
            self._fill_constants()
            self.__write_constant_class()
            self.disconnect()
            self.__log_number_of_constants()
        else:
            self._io.log_verbose('Constants not enabled')

        return 0
708022
def _check_config_exists(config_file=None):
    '''
    
    '''
    if config_file is None:
        config_file = _config_file()
    if not os.path.isfile(config_file):
        return False
    return True
960228
boolean shouldCheckConformanceFor(String filePath) {
    for (String whitelistedPath : getWhitelistedPaths()) {
      if (filePath.contains(whitelistedPath)) {
        return false;
      }
    }
    ImmutableList<String> onlyApplyToPaths = getOnlyApplyToPaths();
    if (onlyApplyToPaths.isEmpty()) {
      return true;
    }
    // If only_apply_to field is presented in the configuration, check it.
    for (String onlyApplyToPath : onlyApplyToPaths) {
      if (filePath.contains(onlyApplyToPath)) {
        return true;
      }
    }
    return false;
  }
487469
def show_config():
    '''
    
    '''
    ret = {}
    cmd = 'cpan -J'
    out = __salt__['cmd.run'](cmd).splitlines()
    for line in out:
        if '=>' not in line:
            # TODO: Some options take up multiple lines, so this doesn't always work
            continue
        comps = line.split('=>')
        key = comps[0].replace("'", '').strip()
        val = comps[1].replace("',", '').replace("'", '').strip()
        ret[key] = val
    return ret