Post order a forest.
335657
def post_order(parent):
    
    n = len(parent)
    k = 0

    p = matrix(0,(n,1))
    head = matrix(-1,(n,1))
    next = matrix(0,(n,1))
    stack = matrix(0,(n,1))

    for j in range(n-1,-1,-1):
        if (parent[j] == j): continue
        next[j] = head[parent[j]]
        head[parent[j]] = j

    for j in range(n):
        if (parent[j] != j): continue
        k = __tdfs(j, k, head, next, p, stack)

    return p
155615
def postorder(self, funct, stopOn=None):
        
        if stopOn is None:
            for i in range(len(self.children) - 1, -1, -1):
                self.children[i].postorder(funct)
        else:
            for i in range(len(self.children) - 1, -1, -1):
                if self.children[i].postorder(funct) == stopOn:
                    return stopOn
        return funct(self.symbol)
724814
public static function get_post_class( $post_type, $post_class = '\Timber\Post' ) {
		$post_class = apply_filters('Timber\PostClassMap', $post_class);
		$post_class_use = '\Timber\Post';

		if ( is_array($post_class) ) {
			if ( isset($post_class[$post_type]) ) {
				$post_class_use = $post_class[$post_type];
			} else {
				Helper::error_log($post_type.' not found in '.print_r($post_class, true));
			}
		} elseif ( is_string($post_class) ) {
			$post_class_use = $post_class;
		} else {
			Helper::error_log('Unexpeted value for PostClass: '.print_r($post_class, true));
		}

		if ( $post_class_use === '\Timber\Post' || $post_class_use === 'Timber\Post' ) {
			return $post_class_use;
		}

		if ( !class_exists($post_class_use) || !is_subclass_of($post_class_use, '\Timber\Post') ) {
			Helper::error_log('Class '.$post_class_use.' either does not exist or implement \Timber\Post');
			return '\Timber\Post';
		}

		return $post_class_use;
	}
821268
function DOMPostOrder(root, visitFunc) {
	let node = root;
	while (true) {
		// Find leftmost (grand)child, and visit that first.
		while (node.firstChild) {
			node = node.firstChild;
		}
		visitFunc(node);
		while (true) {
			if (node === root) {
				return; // Visiting the root is the last thing we do.
			}
			/* Look for right sibling to continue traversal. */
			if (node.nextSibling) {
				node = node.nextSibling;
				/* Loop back and visit its leftmost (grand)child first. */
				break;
			}
			/* Visit parent only after we've run out of right siblings. */
			node = node.parentNode;
			visitFunc(node);
		}
	}
}
355768
private void postTraversalProcessing() {
		int nc1 = treeSize;
		info[KR] = new int[leafCount];
		info[RKR] = new int[leafCount];

		int lc = leafCount;
		int i = 0;

		// compute left-most leaf descendants
		// go along the left-most path, remember each node and assign to it the path's
		// leaf
		// compute right-most leaf descendants (in reversed postorder)
		for (i = 0; i < treeSize; i++) {
			if (paths[LEFT][i] == -1) {
				info[POST2_LLD][i] = i;
			} else {
				info[POST2_LLD][i] = info[POST2_LLD][paths[LEFT][i]];
			}
			if (paths[RIGHT][i] == -1) {
				info[RPOST2_RLD][treeSize - 1 - info[POST2_PRE][i]] =
						(treeSize - 1 - info[POST2_PRE][i]);
			} else {
				info[RPOST2_RLD][treeSize - 1 - info[POST2_PRE][i]] =
						info[RPOST2_RLD][treeSize - 1
								- info[POST2_PRE][paths[RIGHT][i]]];
			}
		}

		// compute key root nodes
		// compute reversed key root nodes (in revrsed postorder)
		boolean[] visited = new boolean[nc1];
		boolean[] visitedR = new boolean[nc1];
		Arrays.fill(visited, false);
		int k = lc - 1;
		int kR = lc - 1;
		for (i = nc1 - 1; i >= 0; i--) {
			if (!visited[info[POST2_LLD][i]]) {
				info[KR][k] = i;
				visited[info[POST2_LLD][i]] = true;
				k--;
			}
			if (!visitedR[info[RPOST2_RLD][i]]) {
				info[RKR][kR] = i;
				visitedR[info[RPOST2_RLD][i]] = true;
				kR--;
			}
		}

		// compute minimal key roots for every subtree
		// compute minimal reversed key roots for every subtree (in reversed postorder)
		int parent = -1;
		int parentR = -1;
		for (i = 0; i < leafCount; i++) {
			parent = info[KR][i];
			while (parent > -1 && info[POST2_MIN_KR][parent] == -1) {
				info[POST2_MIN_KR][parent] = i;
				parent = info[POST2_PARENT][parent];
			}
			parentR = info[RKR][i];
			while (parentR > -1 && info[RPOST2_MIN_RKR][parentR] == -1) {
				info[RPOST2_MIN_RKR][parentR] = i;
				parentR =
						info[POST2_PARENT][info[RPOST2_POST][parentR]]; // get parent's postorder
				if (parentR > -1) {
					parentR = treeSize - 1 - info[POST2_PRE][parentR]; // if parent exists get its
					// rev. postorder
				}
			}
		}
	}
871108
def fulfill(order_id, shipping_address, line_items, options = {})
      commit :fulfillment, build_fulfillment_request(order_id, shipping_address, line_items, options)
    end
1113434
function finishNodeAt(node, type, pos, loc) {
  node.type = type;
  node.end = pos;
  if (this.options.locations) node.loc.end = loc;
  if (this.options.ranges) node.range[1] = pos;
  return node;
}
1002398
public static void putIfAbsent(String key, String path) {

        if (!DIC.containsKey(key)) {
            DIC.put(key, KV.with(path, (Forest) null));
        }
    }
173263
def as_tree(context):
    """"""

    tree = _build_tree(context, 2, 1)
    if type(tree) == dict:
        tree = [tree] 
    
    return Response(content_type='application/json', body=json.dumps(tree))
364146
public static void visitPostOrder(Node node, Visitor visitor) {
    visitPostOrder(node, visitor, Predicates.alwaysTrue());
  }
955698
def post(self, path, data=None):
        """"""
        data = data or {}
        response = requests.post(self.url(path), data=to_json(data), headers=self.request_header())
        return self.parse_response(response)
1075314
public static void after(@NotNull String path, @NotNull Handler handler) {
        staticInstance().after(prefixPath(path), handler);
    }
353449
def post(self, request, *args, **kwargs):
        
        POST = json.loads(request.body.decode('utf-8'))

        if 'product_pk' in POST and 'quantity' in POST:
            cart = ShoppingCartProxy(request)
            cart.add(
                product_pk=int(POST['product_pk']),
                quantity=int(POST['quantity'])
            )
            return JsonResponse(cart.products)

        return HttpResponseBadRequest()
979196
function filterFolder(posts) {
      var reFolder = new RegExp(folder);
      return posts.filter(function filterPosts(post) {
        return reFolder.test(post.source.substr(0, post.source.lastIndexOf(path.sep)));
      });
    }
1205821
public void gotoEnd() {
	currentNode = tree;
	while (currentNode.hasChildren()) {
	    currentNode = currentNode.getChildren().get(
		    currentNode.getChildren().size() - 1);
	}
    }
557027
def pre_order(self):
        """"""
        yield self
        for child in self.children:
            for node in child.pre_order():
                yield node
791448
def commit(self, commit):
        '''
        
        '''

        c = self.commit
        if c:
            if not commit:
                commit = c[0]
            if commit in c:
                self._checkout(treeish=commit)