Returns Array of domain names for the MX'ers, used to determine the Provider
542030
def domains
      @_domains ||= mxers.map {|m| EmailAddress::Host.new(m.first).domain_name }.sort.uniq
    end
1066032
public static List<Domain> getRunningDomains(Connect libvirt) {
        try {
            List<Domain> domains = new ArrayList<>();
            int[] ids = libvirt.listDomains();
            for (int id : ids) {
                domains.add(libvirt.domainLookupByID(id));
            }
            return domains;
        } catch (LibvirtException e) {
            throw new LibvirtRuntimeException("Unable to list defined domains", e);
        }
    }
954085
def get_name_servers(self, id_or_uri):
        

        uri = self._client.build_uri(id_or_uri) + "/nameServers"
        return self._client.get(uri)
764635
public static List<Domain> getDefinedDomains(Connect libvirt) {
        try {
            List<Domain> domains = new ArrayList<>();
            String[] domainNames = libvirt.listDefinedDomains();
            for (String name : domainNames) {
                domains.add(libvirt.domainLookupByName(name));
            }
            return domains;
        } catch (LibvirtException e) {
            throw new LibvirtRuntimeException("Unable to list defined domains", e);
        }
    }
1207759
def get_mx_records(domain):
        
        import dns.resolver

        response = dns.resolver.query(domain, 'MX')

        mx_records = []
        for answer in response.answers:
            mx_records.append(MXRecord(priority=answer.preference, exchange=answer.exchange, domain=domain))

        return sorted(mx_records, key=lambda record: record.priority)
238391
protected function getHosts(): array
    {
        $domains = [];
        foreach ($this->siteFinder->getAllSites() as $site) {
            foreach ($site->getAllLanguages() as $language) {
                $domains[] = $language->getBase()->getHost();
            }
        }
        $domains = array_unique($domains);
        sort($domains, SORT_NATURAL);
        return $domains;
    }
230621
function getNames (resourceType) {
  const aliases = [resourceType];
  if (resourceAliases[resourceType]) {
    return aliases.concat(resourceAliases[resourceType]);
  }
  return alias(resourceType);
}
898051
def list_domains():
    '''
    
    '''
    data = __salt__['vmadm.list'](keyed=True)
    vms = ["UUID                                  TYPE  RAM      STATE             ALIAS"]
    for vm in data:
        vms.append("{vmuuid}{vmtype}{vmram}{vmstate}{vmalias}".format(
            vmuuid=vm.ljust(38),
            vmtype=data[vm]['type'].ljust(6),
            vmram=data[vm]['ram'].ljust(9),
            vmstate=data[vm]['state'].ljust(18),
            vmalias=data[vm]['alias'],
        ))
    return vms
957530
public function findOneByDomainName(string $domainName): array
    {
        $queryBuilder = $this->createQuery();

        return (array)$queryBuilder->select('*')
            ->from($this->getTableName())
            ->where($queryBuilder->expr()->eq(
                'domainName',
                $queryBuilder->createNamedParameter($domainName, \PDO::PARAM_STR)
            ))
            ->execute()
            ->fetch();
    }
867829
def provider_list(self, lookup='all'):
        '''
        
        '''
        data = {}
        lookups = self.lookup_providers(lookup)
        if not lookups:
            return data

        for alias, driver in lookups:
            if alias not in data:
                data[alias] = {}
            if driver not in data[alias]:
                data[alias][driver] = {}
        return data
938398
def lookup_domain(domain, nameservers=[], rtype="A",
                  exclude_nameservers=[], timeout=2):
    """"""
    dns_exp = DNSQuery(domains=[domain], nameservers=nameservers, rtype=rtype,
                       exclude_nameservers=exclude_nameservers, timeout=timeout)
    return dns_exp.lookup_domain(domain)
1040475
def domain_list(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.list_domains(**kwargs)
535342
function getNames(names) {
    var result = [];

    ['copyright', 'fontFamily', 'uniqueID', 'fontSubfamily', 'licence'].forEach(function(n) {
        if(names[n]) {
            result.push.apply(result, getStrings(names[n], TTF_NAMES[n]));
        }
    });

    result.push.apply(result, getStrings('Generated by node-freetype.', TTF_NAMES.description));
    result.push.apply(result, getStrings('https://github.com/YuhangGe/node-freetype', TTF_NAMES.url));

    result.sort(function (a, b) {
        var orderFields = ['platformID', 'encodingID', 'languageID', 'id'];
        var i;
        for (i = 0; i < orderFields.length; i++) {
            if (a[orderFields[i]] !== b[orderFields[i]]) {
                return a[orderFields[i]] < b[orderFields[i]] ? -1 : 1;
            }
        }
        return 0;
    });

    return result;
}
748609
@Override
	public List<EcodDomain> getDomainsForPdb(String pdbId) throws IOException {
		domainsFileLock.readLock().lock();
		try {
			logger.trace("LOCK readlock");
			while( domainMap == null ) {
				// unlock to allow ensureDomainsFileInstalled to get the write lock
				logger.trace("UNLOCK readlock");
				domainsFileLock.readLock().unlock();
				indexDomains();
				domainsFileLock.readLock().lock();
				logger.trace("LOCK readlock");
			}

			if(pdbId != null)
				pdbId = pdbId.toLowerCase();
			List<EcodDomain> doms = domainMap.get(pdbId);
			if(doms == null) {
				return null;
			}
			// Deep clone
			List<EcodDomain> clonedDoms = new ArrayList<EcodDomain>(doms.size());
			for(EcodDomain d : doms) {
				clonedDoms.add( new EcodDomain(d) );
			}
			return clonedDoms;
		} finally {
			logger.trace("UNLOCK readlock");
			domainsFileLock.readLock().unlock();
		}
	}
1156143
def find_subdomains(domain):
    """"""
    result = set()
    response = get('https://findsubdomains.com/subdomains-of/' + domain).text
    matches = findall(r'(?s)<div class="domains js-domain-name">(.*?)</div>', response)
    for match in matches:
        result.add(match.replace(' ', '').replace('\n', ''))
    return list(result)
154370
public static String[] getServiceTypes()
    {
        Set result = new HashSet();

        // All all providers
        Provider[] providers = Security.getProviders();
        for ( int i = 0; i < providers.length; i++ )
        {
            // Get services provided by each provider
            Set keys = providers[i].keySet();
            for ( Iterator it = keys.iterator(); it.hasNext(); )
            {
                String key = (String) it.next();
                key = key.split( " " )[0];

                if ( key.startsWith( "Alg.Alias." ) )
                {
                    // Strip the alias
                    key = key.substring( 10 );
                }
                int ix = key.indexOf( '.' );
                result.add( key.substring( 0, ix ) );
            }
        }
        return (String[]) result.toArray( new String[result.size()] );
    }
688030
def service_addresses(service, index = nil)
      loop do
        addresses, nindex = service_addresses!(service, index)
        return [addresses, nindex] if addresses && nindex
      end
    end