Iterates the list of registered services and for those that support the
category passed as a parameter return their ID

@param category
@return
167238
public List<String> getServicesIDByCategory(String category) {
		Set<String> servicesID = services.keySet();
		Iterator<String> it = servicesID.iterator();
		List<String> ids = new ArrayList<String>();

		if (category == null) {
			return ids;
		}

		String key;
		while (it.hasNext()) {
			key = it.next();
			DescribeService service = services.get(key);
			if (service.containsCategory(category)) {
				ids.add(key);
			}
		}

		return ids;
	}
79208
function (category) {
    return this.get('/getappsincategory', {
      // 'cc': this.options.country,
      // 'l': this.options.language,
      'category': category
    }).then(function (body) {
      console.log('getAppsInCategory - ', body)
      return Promise.resolve(body);
    });
  }
580625
public Map<Integer, Long> getIdMappingCategories() {
        Map<Integer, Long> idMapping = new HashMap<Integer, Long>();

        Session session = WikiHibernateUtil.getSessionFactory(this.dbConfig).getCurrentSession();
        session.beginTransaction();
        Iterator results = session.createQuery("select cat.id, cat.pageId from Category as cat").list().iterator();
        while (results.hasNext()) {
            Object[] row = (Object[]) results.next();
            // put (pageID, id)
            idMapping.put((Integer) row[1], (Long) row[0]);
        }
        session.getTransaction().commit();
        return idMapping;
    }
1044117
def category(self, category=None):
        
        if category is None:
            return int(self.url.category)
        self.url.category = str(category)
129405
protected function getCategoryProductsQueryBuilder(CategoryInterface $category = null)
    {
        $queryBuilder = $this->getRepository()->createQueryBuilder('p')
            ->leftJoin('p.image', 'i')
            ->leftJoin('p.gallery', 'g');

        if ($category) {
            $queryBuilder
                ->leftJoin('p.productCategories', 'pc')
                ->andWhere('pc.category = :categoryId')
                ->setParameter('categoryId', $category->getId());
        }

        return $queryBuilder;
    }
1296835
public static com.liferay.commerce.product.model.CPTaxCategory createCPTaxCategory(
		long CPTaxCategoryId) {
		return getService().createCPTaxCategory(CPTaxCategoryId);
	}
796183
def category_ids
      component
        .categories
        .where(id: category_id)
        .or(component.categories.where(parent_id: category_id))
        .pluck(:id)
    end
844533
private function getStoreId(Category $category)
    {
        $storeId = $category->getStoreId();

        if ($storeId === 0) {
            $defaultStoreId   = $this->getDefaultStoreId();
            $categoryStoreIds = array_filter($category->getStoreIds());
            $storeId        = current($categoryStoreIds);
            if (in_array($defaultStoreId, $categoryStoreIds)) {
                $storeId = $defaultStoreId;
            }
        }

        return $storeId;
    }
509822
function(category) {
			var settingsMap = this.settingsMap;
			var pids = typeof category === 'string' ? this.categories[category] : Object.keys(settingsMap); //$NON-NLS-0$
			if (!pids) {
				return [];
			}
			return pids.map(function(pid) {
				return settingsMap[pid];
			});
		}
1011213
public Map<String, Integer> getCategoryCountResult() {

        Map<String, Integer> result = new TreeMap<String, Integer>();
        Iterator<Map.Entry<String, CmsCategroyCount>> i = m_categories.entrySet().iterator();
        while (i.hasNext()) {
            Map.Entry<String, CmsCategroyCount> entry = i.next();
            result.put(entry.getKey(), entry.getValue().toInteger());
        }
        return result;
    }
390948
public List<Identity> getIdentities(String category, String type) {
        List<Identity> res = new ArrayList<>(identities.size());
        for (Identity identity : identities) {
            if (identity.getCategory().equals(category) && identity.getType().equals(type)) {
                res.add(identity);
            }
        }
        return res;
    }
563004
public UnifiedPushConfig setCategories(String... categories) {
        validateCategories(categories);        
        this.categories = Arrays.asList(categories);
        return this;
    }
1127812
private function getCategory()
    {
        $storeId    = $this->getStoreId();
        $categoryId = $this->getCategoryId();
        $category   = null;

        if ($this->getCategoryId()) {
            $category = $this->categoryRepository->get($categoryId, $storeId);
        }

        return $category;
    }
169843
private <T> CategoryRegistry<T> getRegistry(final Class<T> pCategory) {
        @SuppressWarnings({"unchecked"})
        CategoryRegistry<T> registry = categoryMap.get(pCategory);
        if (registry == null) {
            throw new IllegalArgumentException("No such category: " + pCategory.getName());
        }
        return registry;
    }
255000
public CmsCategory getCategory(CmsObject cms, String categoryRootPath) throws CmsException {

        CmsResource resource = cms.readResource(cms.getRequestContext().removeSiteRoot(categoryRootPath));
        return getCategory(cms, resource);
    }
705334
public static Set<String> handleBugCategories(String categories) {
        // Parse list of bug categories
        Set<String> categorySet = new HashSet<>();
        StringTokenizer tok = new StringTokenizer(categories, ",");
        while (tok.hasMoreTokens()) {
            categorySet.add(tok.nextToken());
        }

        return categorySet;
    }
1106292
private function checkAlwaysFalseCategories()
    {
        $filtered = [];
        foreach ($this->categories as $category) {
            if ($category->formula === false) {
                if (null !== $category->examples) {
                    throw new \RuntimeException("The category '{$category->id}' should never occur, but it has examples (so for CLDR it may occur!)");
                }
            } else {
                $filtered[] = $category;
            }
        }
        $this->categories = $filtered;
    }