## Post pagination links ordered by meta value

Is there a way to order the nex-previous post links, or any other pagination function to get the links ordered by meta value, like I have done in the posts listing page shown below?

``\$  events = get_posts(array(     'posts_per_page' => -1,     'post_type' => 'post',     'meta_key'  => 'date_time',     'orderby'   => 'meta_value',     'order'     => 'ASC',     'suppress_filters' => false )); ``

The main goal is tho have the next, – previous event buttons in chronological order in the single post page. (not the post date, but the event date that is stored in custom fields)

## Paint graph ordered vertices

I have the following question: Given graph $$G=(V,E)$$ with given order on its vertices, I mean $$v_1 I need to find minimal colors ordered paining of the graph vertices s.t neighbor vertices don’t have the same color, I mean: $$(v_1,v_2,…,v_j)$$ – painted in fist color and non of them are neighbors. $$(v_{j+1},…,v_l)$$ – painted in second color and non of them are neighbors. and so on.

The complexity needs to be $$O(V+E)$$. Anyone have an idea?

## Data structure for revising ordering given a (largely) ordered stream of data

I have an input stream of timestamped data that is largely sorted in ascending order by timestamp. There are occasionally out-of-order elements, at which point I need to do each of the following:

• Insert element into the tree (this is done for every input element).
• Determine a) the largest element less than the inserted element and b) the smallest element greater than the inserted element (to send “retraction” messages downstream).

Further, at various points (e.g. when the latest timestamp seen reaches a certain allowed “lateness”), I want to garbage collect all nodes in the tree less than some function of the timestamp (e.g. timestamp minus two days).

Is there a data structure and associated algorithms that does all of these steps in sub-linear time?

What have I tried?

I believe but cannot prove that any rebalancing (necessary given the largely sorted nature of the input) binary search tree can do this.

• Insert element into the tree: O(log n)

• Determine the element on either side of the inserted element: an out of order element will always be inserted as the left child of a binary tree parent. The parent will be the smallest item larger than the inserted element (can’t prove this). The parent’s parent will be the largest item smaller than the inserted element (can’t prove this, and suspect it’s wrong the second the tree rebalances). O(log n)

• Delete all elements smaller than a given number: not sure how to proceed here given rebalancing.

## Efficiently computing lower bounds over partially ordered sets

I have a list of sets that I would like to sort into a partial order based on the subset relation.

In fact, I do not require the complete ordering, only the lower bounds.

If I am not mistaken, each lower bound should define one separate component of the respective graph – and this component should be a meet-semilattice.

What would be the most convenient space and time efficient way to solve this problem? Perhaps there is a way that does not require to build the entire graph? Perhaps there is a known algorithm under a better terminology than what I have naively described above?

I am aware that the time and space requirements are underspecified above, but I would be happy about any suggestions, whether they are proven to be optimal or not…

Background: I am currently building an entire graph database that holds all the edges between the sets and then look for the nodes that have no generalizations, but this is quite complicated, slow and requires a lot of (disk) space. The list mentioned above contains roughly 100 million sets.

## totally ordered semigroups

Given a semigroup is it possible to give a total order to it?

If not possible in the general case then what about the case of finitely generated finite semigroups?

Does there exist a natural extension of the syntactic order given to a semigroup w.r.t. an upper set? (currently it only induces a partial order)

## TSP Variant – Ordered Path

Recently I came up with a traveling-salesman-esque problem. As usual, we have n vertices, and a weighted edge between any two vertices. However, each vertex is associated with a color, which may be repeated. Then, you are given a sequence of colors, and you want to find the shortest path that follows this sequence. If all vertices are the same color, this is the same as TSP. However, if all vertices are different colors, there is only one solution.

Is this variant at all studied? Let $$c$$ be the most vertices of any given color. Is the decision problem this variant NP-complete for some fixed, c, or alternatively is there a simple way to solve the decision problem polynomially for any finite $$c$$?

## Ordered data structure with efficient push, iteration and random pop/drain

I need a data structure `d` with somewhat conflicting requirements. What are the different tradeoffs I could pick?

The same algorithm will be repeatedly done on each time step:

• `push` one new element to the right (so all elements remain naturally ordered by the date they came into the data structure).
• `update` all elements. I mean iterate (in any order or parallel) and mutate in place.
• based on the result of the update, `drain` random elements in order (new or old). I mean that some will have to be both returned in order to user and removed from `d`.
• user should also easily `iterate` in order over remaining elements.

For instance, think of a bunch of fruit that takes a random time to ripen. One new piece of fruit is spawned each day. And each day we need to collect (ordered) ripe fruit, while keeping remaining pieces of fruit ordered by age.

Is there a dedicated data structure?
If not, is there a pattern for this case?
If not, what are the different tradeoffs I’ll have to deal with? Is there any assumption I could make on the data (like drain frequency) to help me choose?
(for instance, I suspect that many pieces of fruit will be ripe on the first or the first few update(s), and only a few will last longer)

## Well ordered directions to Restore KetoBliss New Zealand

KetoBliss New Zealand
BodyTone improves digestion in order to dispose of bounty fat consumed during the keeps away from sustenance or when all is said in done close by any pernicious antigens that empower extra fat to get amassed.
http://slimtonepills.com/ketobliss-new-zealand/

Well ordered directions to Restore KetoBliss New Zealand

## How to edit or update the ordered item data in magento 2

I want to edit some data’s of ordered items like weight, price and some more.

For that, I got the ordered item collection for the specific order.

``\$  objectManager = \Magento\Framework\App\ObjectManager::getInstance(); \$  orderItemId = '3'; \$  orderItem = \$  objectManager->create('\Magento\Sales\Api\OrderItemRepositoryInterface')->get(\$  orderItemId); \$  orderItems = \$  orderItem->getData() ``

So `\$ orderItems` has the ordered item collection.

And then I have tried to edit the ordered items like below.

``foreach ( \$  orderItems->getData() as \$  val ) {     \$  val->setWeight(1)->save(); } ``

But the weight not gets updated.

Full Code:

``\$  orderId = \$  _GET['id']; \$  objectManager = \Magento\Framework\App\ObjectManager::getInstance(); \$  order = \$  objectManager->create('Magento\Sales\Api\Data\OrderInterface')->load(\$  orderId);  // Edit the order items data foreach (\$  order->getAllItems() as \$  key => \$  value) {     \$  orderItemId = \$  value->getData('item_id');     \$  orderItem = \$  objectManager->create('\Magento\Sales\Api\OrderItemRepositoryInterface')->get(\$  orderItemId);     \$  orderItems = \$  orderItem->getData();     foreach ( \$  orderItems as \$  val ) {         \$  val->setWeight(1)->save();     } } \$  orderResourceModel->save(\$  order); ``

I’ve just referred this link here. But I’m not having a clear idea about the orderquote.

I’m using magento 2.3 version.

## Would the Ranger be overpowered if their Animal Companion kept attacking once ordered?

For an Animal Companion to attack, the Ranger has to use his action to command it.

I am looking to see some math on just why this restriction is in place. Is the ranger way over-powered if the animal companion can keep attacking once ordered, or if gets to attack as an interact with object or verbal command from the ranger?

I’d like to see calculations for the following 3 scenarios:

• act as rules as written
• continue an action once given (1st attack takes a ranger action to activate)
• act as an interact with object by the ranger

How does the above compare with an identical ranger with colossus slayer?

I am hoping to understand why the designers limited it so much.