Can an Order of the Mutant Blood Hunter benefit from multiple instances of the same Mutagen at once?

The Order of the Mutant archetype of the Blood Hunter class has the ability to use mutagens to increase ability scores.

The rule for using mutagens reads in part:

As a bonus action you can consume a single mutagen, and the effects and side effects last until you finish a short or long rest, unless otherwise specified. While one or more mutagens are affecting you, you can use an action to focus and flush the toxins from your system, ending the effects and side effects of all mutagens.

So a Blood Hunter can clearly have more than one mutagen in effect at the same time, but could the Blood Hunter have the same mutagen in effect simultaneously?

Specifically, could a Blood Hunter use two instances of the Potency mutagen to increase her strength score to 26? I’m not sure if the rules for combining spells applies since the ability isn’t a spell (or even described as being magic).

Change WooCommerce shipping text if certain products are in order

I have a client who sells several large products that require custom shipping. I need to be able to display custom text throughout WooCommerce if any of those items are in the cart and if any of those items are in the completed order.

Currently the following works perfectly on the cart and checkout pages, but I need the custom text to also appear on the completed order page, the Edit Order page in admin, and all associated emails going to both the customer and the admin:

    function sww_wc_free_shipping_label( $  label, $  method ) {      $  product_id = array(2122,2123,2124);      foreach ($  product_id as $  product_id => $  product) {             $  product_cart_id = WC()->cart->generate_cart_id( $  product );            $  in_cart = WC()->cart->find_product_in_cart( $  product_cart_id );              if($  in_cart) {                 $  label = 'Special shipping required. We will contact you with the final cost.';                 break;             }         }      return $  label; } add_filter( 'woocommerce_cart_shipping_method_full_label', 'sww_wc_free_shipping_label', 10, 2 ); 

The following does seem to find the product in the cart, but I’m not sure how to get the custom shipping text we need:

add_action( 'woocommerce_thankyou', 'name_your_function_check_order_product_id');  function name_your_function_check_order_product_id( $  order_id ){  $  custom_shipping_text = 'Special shipping required. We will contact you with the final cost.';    $  order = wc_get_order( $  order_id ); $  items = $  order->get_items();  foreach ( $  items as $  item_id => $  item ) {    $  product_id = $  item->get_variation_id() ? $  item->get_variation_id() : $  item->get_product_id();      if ( $  product_id == 2122 ||  $  product_id == 2123 || $  product_id == 2124) {         //Do something       } } } 

I’m guessing the table woocommerce_order_items needs to be updated, changing order_item_name from “Free shipping” to the custom text, but I’m not sure how to do that. Or is there a better way that I’m missing?

Is multiplying hashes a valid way to ensure two sets of data are identical (but in arbitrary order)

Let’s say “User A” has a set of data like below. Each entry has been hashed (sha256) to ensure integrity within a single entry. You can’t modify data of a single entry without also modifying the corresponding hash:

[ { data: "000000", hash: "91b4d142823f7d20c5f08df69122de43f35f057a988d9619f6d3138485c9a203" },  { data: "111111", hash: "bcb15f821479b4d5772bd0ca866c00ad5f926e3580720659cc80d39c9d09802a" },  { data: "345345", hash: "dbd3b3fcc3286d927ec214c5648fbb226353a239789750f51430b1e6e9d91f4f" },  ] 

And “User B” has the same data but in a slightly different order. Hashes are the same of course:

[ { data: "345345", hash: "dbd3b3fcc3286d927ec214c5648fbb226353a239789750f51430b1e6e9d91f4f" },  { data: "111111", hash: "bcb15f821479b4d5772bd0ca866c00ad5f926e3580720659cc80d39c9d09802a" },  { data: "000000", hash: "91b4d142823f7d20c5f08df69122de43f35f057a988d9619f6d3138485c9a203" },  ] 

I want to allow both users to verify they have the exactly same set of data, ignoring sort order. If, as an extreme example, a hacker is able to replace User B’s files with otherwise valid-looking data, the users should be able to compare a hash of their entire datasets and detect a mismatch.

I was thinking to calculate a “total hash” which the users could compare to verify. It should be next to impossible to fabricate a valid looking dataset that results in the same “total hash”. But since the order can change, it’s a bit tricky.

I might have a possible solution, but I’m not sure if it’s secure enough. Is it, actually, secure at all?

My idea is to convert each sha256 hash to integer (javascript BigInt) and multiply them with modulo to get a total hash of similar length:

 var entries = [ { data: "345345", hash: "dbd3b3fcc3286d927ec214c5648fbb226353a239789750f51430b1e6e9d91f4f" },  { data: "111111", hash: "bcb15f821479b4d5772bd0ca866c00ad5f926e3580720659cc80d39c9d09802a" },  { data: "000000", hash: "91b4d142823f7d20c5f08df69122de43f35f057a988d9619f6d3138485c9a203" },  ];  var hashsize = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); var totalhash = BigInt(1); // arbitrary starting point  for (var i = 0; i < entries.length; i++) {   var entryhash = BigInt("0x" + entries[i].hash);   totalhash = (totalhash * entryhash) % hashsize;  } totalhash = totalhash.toString(16); // convert from bigint back to hex string 

This should result in the same hash for both User A and User B, unless other has tampered data, right? How hard would it be to create a slightly different, but valid-looking dataset that results in the same total checksum? Or is there a better way to accomplish this (without sorting!).

Order of the Dragon Aid Allies Bonus stacking

The Order of the Dragon gives an Aid Allies ability that states

At 2nd level, whenever an order of the dragon cavalier uses the aid another action to assist one of his allies, the ally receives a +3 bonus to his armor class, attack roll, saving throw, or skill check. At 8th level, and every six levels thereafter, this bonus increases by an additional +1.

Does this +3 replace, or add onto the +2 provided from Aid another?

I have read a lot of debate over this on various forums. I am looking for a more officially supported ruling from the source material if possible. If not, what are the early and late game balance implications of allowing them to stack given feats like Bodyguard, that let you provide this bonus as an AOO multiple times per turn, or with Ally Shield, which would let you redirect the attack to an ally, and then as an aoo provide them that bonus.

SQLServer: “order by” clause causing excessive locking

I can’t seem to find an explanation as to why this is happening, but while trying to debug a deadlock issue, I found out that SQLServer is locking far more records than it needs to when I include an “order by” clause in my query with the updlock and readpast hints.

For context, I am doing a “select top 1” query on a table that is used for queuing jobs in a multi-node application. I want to grab the oldest job that has not been processed yet, that matches certain criteria that requires joining on a few tables (all of these tables have the nolock hint) If I sort the list by the creation date, all of the records matching the filter are locked, but only one is returned. But if I remove the sorting, only the one record that I want is locked.

Any hints as to why this is happening?

What are the terminals, non-terminals and set of production rules for the following language of valid first order formula?

variables: w x y z constants: C D predicates: P[2] Q[1] equality: = connectives: \land \lor \implies \iff \neg quantifiers: \exists \forall formula: \forall x ( \exists y ( P(x,y) \implies \neg Q(x) ) \lor \exists z ( ( (C = z) \land Q(z) ) \land P(x,z) ) ) 

How would I go about deriving the set of terminals, non-terminals and production rules for this language of valid First order formula?

A method to derive the solution would be more appreciated than just the solution.

Selecting vertices in a graph in an order to keep the cut as small as possible

I am given an undirected graph. Initially all vertices are white. I need to color them black in such an order that the maximum number of vertices which are on the border between black and white regions is minimal. Is there an algorithm to find an optimal order for that?

More formally. We are given an undirected, connected graph $ G = (V,E)$ consisting of $ n$ vertices. I am looking for a sequence of increasing subsets of vertices $ V_0, V_1, …, V_n$ , where $ V_0 = \emptyset$ , $ V_{i+1} = V_i \cup \{v\}$ for some $ v\in V$ , and $ V_n = V$ . For any subset $ W \subset V$ we define a cost function $ c(W)$ as the number of “border” vertices, i.e. size of $ \{w\in W : \exists m\in V\setminus W: (w,m)\in E \}$ . I am looking for such a sequence where $ \max_i(c(V_i))$ is minimal.

I feel my problem is somehow related to maximum flow algorithms, the same way as minimum-cut problem is. I think there must be a name for this (or similar) problem. However, as I was mixing “minimal cut” in various ways in the search engines, I was unable to find it.

A bit of context: I have a series of tasks to perform (edges), each loading two files from a disk (vertices). In order to speed up the process, I don’t want the reload every pair of files every time. Instead, I want to keep some files in memory so that I can reuse them when another task uses the same file. But I cannot keep all files that there are because of memory constriants. The above sequence would help me select an optimal processing order, keeping the number of active files to minimum.

Add post order like page order

There is an order field when editing pages, so you can easily rearrange them, this is missing at posts, I`m thinking that there must be a simple scrip that adds this functionality to posts too.

I tried googling it, with no luck, I do not want to use a plugin if it can be done with a simple script.

thank you

How to change order inside foreach using wp_enqueue_script?

I have a created a for each loop to load all the script files from my build folder dynamically in the footer with for development and production mode. This way I don’t need to manually replace the script files.

But I have a problem, I don’t know how to change the order of the files to a specific order.

It should be: Runtime, Vendors, Main.

This is my PHP code:

// First check if "JS" folder exist to prevent errors. if(is_dir(THEME_DIR_ASSETS . '/js')) {     // Enqueue all scripts.     function nm_enqueue_scripts() {     $  directoryJS = new DirectoryIterator(THEME_DIR_ASSETS . '/js');          wp_deregister_script('jquery');         wp_enqueue_script('jquery', '', array(), null, false);          foreach ($  directoryJS as $  file) {             if (pathinfo($  file, PATHINFO_EXTENSION) === 'js') {             $  fullName = basename($  file);             $  name = substr(basename($  fullName), 0, strpos(basename($  fullName), '.'));              wp_enqueue_script($  name, THEME_DIR_JS . '/' . $  fullName, $  name, null, true);             }         }     }     add_action('wp_enqueue_scripts', 'nm_enqueue_scripts'); } 

How can I do this?

Placing Critters in the appropriate place in the Natural Order Hierarchy in Mouse Guard

I am currently developing a campaign setting using the rules and lore for Mouse Guard. The setting will be similar but not in the same geographical location (Northern Michigan) that the original was written in. To that end I will be bringing in additional animals and developing their stats. I asked a question here that references how to balance the Nature scores and encounter abilities of the creatures but will also need to determine how best to place new creatures in the Natural Order table.

In MG mice can only directly attack/kill creatures that are up to two levels higher than they are in the hierarchy. Where to place a new creature in this table could indicate mechanically whether they would need extraordinary means to interact with that creature during an encounter. Balancing this would be an important part of creating a new creature in a custom Mouse Guard campaign.

I’m looking for expertise in balancing new creatures and placing them within the Natural Order hierarchy when introducing them into a Mouse Guard campaign.

I’m looking for answers using the “Good Subjective” standard and experience on how specifically balancing was done and determining where to place the creatures in the Natural Order hierarchy.