Set every category where depth > 0 and has no parents to depth 0.
347947
private function fixCategoriesWithoutParents()
    {
        // fix categories that have no parent but depth > 0
        $qb = $this->categoryRepository->createQueryBuilder('c2')
            ->update()
            ->set('c2.depth', 0)
            ->where('c2.parent IS NULL AND c2.depth != 0');

        $qb->getQuery()->execute();
    }
1049945
public synchronized void set(int depth, NameSpace ns) {
        stack.set( stack.size()-1-depth, ns );
    }
710945
public function setCategories($categories)
    {
        foreach ($categories as $category) {
            $category->setBlog($this);
        }
        $this->categories = $categories;

        return $this;
    }
1003097
public function set($category = LC_ALL)
    {
        $this->old_locale_by_category[$category] = self::setlocale(
            $category,
            '0'
        );

        self::setlocale($category, $this->locale);
    }
1059299
def set_level(level):
    """"""
    for handler in HANDLERS:
        handler.setLevel(level)

    logging.root.setLevel(level)
68624
function flatten(int $depth = 0) {
        $data = $this->flattenDo($this->data, $depth);
        return (new self($data));
    }
1210275
protected function setGeneratorCategories()
    {
        $this->logger->debug('Base:setGeneratorCategories');
        $this->setParam('generator', 'categories');
        $this->setParam('gclprop', 'hidden|timestamp');
        $this->setParam('gcllimit', $this->getLimit());
    }
810405
def _set_categories(self):
        
        for column, _ in self._categories.items():
            if column in self.columns:
                self[column] = self[column].astype('category')
563004
public UnifiedPushConfig setCategories(String... categories) {
        validateCategories(categories);        
        this.categories = Arrays.asList(categories);
        return this;
    }
728743
def validate_categories(categories):
        """"""
        if not set(categories) <= Source.categories:
            invalid = list(set(categories) - Source.categories)
            raise ValueError('Invalid categories: %s' % invalid)
474018
def break_fiber(depth=0):
    """"""
    set_stack_var(SECTION_BOUNDARY_TAG, True, depth=depth+1)
    set_stack_var(SECTION_STATE_TAG, None, depth=depth+1)
1013966
def at_depth(self, depth):
        

        for child in list(self.children):
            if depth == 0:
                yield child
            else:
                for grandchild in child.at_depth(depth - 1):
                    yield grandchild
288158
private function setAllChildren(\DOMDocument $dom, \DOMElement $node, array $attributes, $depth = 0)
    {
        static $iloop = 0;
        if ($depth == 0) {
            $iloop = 0;
        }

        foreach ($attributes as $a => $v) {
            $node->setAttribute($a, $v);
        }

        if (($iloop++ % 100) == 0) {
            usleep(1000);
        }

        for ($n = $node->firstChild; $n; $n = $n->nextSibling) {
            $this->setAllChildren($dom, $n, $attributes, $depth + 1);
        }
    }
273673
public void setZeroBased(boolean zeroBased) {
		if(zeroBased != this.zeroBased) {
			this.zeroBased = zeroBased;
			for(ValueDimension dim: tickInfo.keySet())
				tickInfo.get(dim).setZeroBased(zeroBased);
		}
	}
786767
public void setCategories(int i, String v) { 
    if (GOMention_Type.featOkTst && ((GOMention_Type)jcasType).casFeat_categories == null)
      jcasType.jcas.throwFeatMissing("categories", "de.julielab.jules.types.GOMention");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((GOMention_Type)jcasType).casFeatCode_categories), i);
    jcasType.ll_cas.ll_setStringArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((GOMention_Type)jcasType).casFeatCode_categories), i, v);}
1152124
def set_category(self, category):
        
        pcategory = self.find("general/category")
        pcategory.clear()
        name = ElementTree.SubElement(pcategory, "name")
        if isinstance(category, Category):
            id_ = ElementTree.SubElement(pcategory, "id")
            id_.text = category.id
            name.text = category.name
        elif isinstance(category, basestring):
            name.text = category
516364
public void setCategories(FSArray v) {
    if (Descriptor_Type.featOkTst && ((Descriptor_Type)jcasType).casFeat_categories == null)
      jcasType.jcas.throwFeatMissing("categories", "de.julielab.jules.types.wikipedia.Descriptor");
    jcasType.ll_cas.ll_setRefValue(addr, ((Descriptor_Type)jcasType).casFeatCode_categories, jcasType.ll_cas.ll_getFSRef(v));}