mapping a digraph across sectors of countries

Given a (9,9) matrix representing three countries (for example, the US, China, Russia), each one of which has three sectors (vertices/sectors {1, 2, 3) for the US; {4, 5, 6} for China; and {7,8,9} for Russia), I like to create a map of the directed linkages between all 9 sectors using the actual world map.

SeedRandom[01]; g={{1.09738, 0.0440055, 0.113012, 0.0436654, 0.0550311, 0.0365684,   0.0990232, 0.0550859, 0.0629618}, {0.0850364, 1.05189, 0.0803699,   0.0999457, 0.0846171, 0.115742, 0.078153, 0.111992,   0.0828957}, {0.0982489, 0.0712597, 1.07401, 0.0723417, 0.0431498,   0.0824737, 0.126777, 0.0569532, 0.0808742}, {0.089248, 0.114673,   0.135009, 1.10033, 0.0743107, 0.107282, 0.133689, 0.0850109,   0.0467125}, {0.0921911, 0.0582554, 0.0937256, 0.0535134, 1.10261,   0.0882558, 0.0366383, 0.154662, 0.0893078}, {0.0835567, 0.0541454,   0.0971447, 0.0458107, 0.132431, 1.08961, 0.0726788, 0.108789,   0.118664}, {0.0747554, 0.150188, 0.139565, 0.0936757, 0.132907,   0.140158, 1.05936, 0.0964287, 0.116732}, {0.0667764, 0.0489254,   0.137437, 0.0962666, 0.0882702, 0.0704283, 0.0807027, 1.05768,   0.101375}, {0.0824603, 0.11258, 0.135069, 0.110204, 0.102288,   0.103722, 0.0453945, 0.0473116, 1.10549}}; n = 9; d = 0.12; G = RandomGraph[{Round[n], Round[n*(n - 1)*d]}, DirectedEdges ->True]; Ga = AdjacencyMatrix[G]*g; sa = SparseArray[Ga]; weightedG =    Graph[sa["NonzeroPositions"], EdgeWeight -> sa["NonzeroValues"],    DirectedEdges -> True, VertexCapacity -> {i_ :> i},    VertexSize -> .3]; SetProperty[weightedG,    VertexLabels -> {i_ :>    Placed[PropertyValue[{weightedG, i}, VertexCapacity], Center]}] 

Split data across multiple rows in a single statement

I have data in table like

Customer Invoice No Date Value Paid Balance
ABC 1 01/12/2020 25 0 25
ABC 2 01/12/2020 50 0 50
XYZ 3 02/12/2020 200 0 200
XYZ 4 04/12/2020 100 0 100
ABC 5 04/12/2020 500 0 500

Now I received amounts for customers as below

ABC 540 XYZ 210

540 210

After receiving the amounts my table should like this

Customer Invoice No Date Value Paid Balance
ABC 1 01/12/2020 25 25 0
ABC 2 01/12/2020 50 50 0
XYZ 3 02/12/2020 200 200 0
XYZ 4 04/12/2020 100 10 90
ABC 5 04/12/2020 500 465 35

I got some clues but this works only for date based values but I need customer and date based.

Any help will be appreciated

When using Magic Jar, what effects follow the user across bodies?

There’s a similar question for 3.5e where the answer is ‘unanswered’, but I’m hoping there’s something in 5e that’s different.

To set an example scene: You’re a Draconic Bloodline Sorcerer with Draconic Resilience. You’re also a Bladesinging Wizard, and you’ve activated Bladesong. You have two attuned items. You’ve cast Haste and Invisibility on yourself. The Bard has given you inspiration. You’ve been frightened by an enemy, but you’ve charmed them back. You proceed to use Magic Jar on a random goblin.

What is carried over? What if you did all that as the goblin, then returned to your own body? Do the effects affect the body, or the ‘soul’?

Sync logins and Agent jobs across all replicas in Distributed Availability Group

I am using dba_CopyLogins stored proc to sync logins on replicas in Distributed Availability group , but the database level permissions are not transferred due to database sync operation is going on.. Is there any way to sync all logins and permissions from global primary to Forwarder and other replicas? also how to copy agent jobs?

facetwp leave all filters active across all pages, archives or single post

I will be quick and precise, I created a real estate site, I used the facetwp solution not very difficult to understand and with a rich documentation and hooks. I think I have everything in front of me but I need some help to understand which one. I’m still learning.

I put the links at the bottom.

the problem I can’t figure out which hook to use to basically tell facetwp to leave all filters active across all pages, archives or single post of properties , ignore post category, taxonomies, not auto-detect filters ,the header filters must remain the same everywhere

I have attached an illustration


How to Customize WordPress Archive Queries

80 hooks available wich one i can use ?

they talk about that too :" Instead of creating an entirely separate query, we recommend using WP’s pre_get_posts filter to modify the existing query."

update 26/10/2020

I updated the image to illustrate the problem.

I still haven’t figured out what to do.. I hope it’s clear and at least someone understands the problem.

enter image description here

How long should it take to travel across Barovia?

I’m running Curse of Strahd for about 5 players. The party is currently level 4 and has managed to travel all the way to Krezk from Barovia after finishing death house, at the behest of Ismark and Ireena.

I estimated travel time based on the map of Barovia provided in the module very roughly. Each hex is supposed to be 1/4 mile, and pg 28 of the module says:

Dangers abound in the land of Barovia. Check for a random encounter after every 30 minutes that the adventurers spend on the roads or in the wilderness. (Don’t check if they have already had two random encounters outdoors in the past 12 hours).

I counted roughly 70 hexes along the road from Barovia to Vallaki. This comes out to 17.5 miles, which could be covered in about 5.8 hours on foot assuming a Normal travel pace of 3 mph. At a fast pace (e.g. you were in a hurry to get the hell out of town because you stole a girl from a vampire) you’d get there in around 4.4 hours.

I went with that for the players, and they had a pretty quiet walk to Vallaki. They ran into

neither of which slowed them down since both encounters were non-combat. Per the book, I didn’t check for any additional encounters.

Anyways, by the time they got around to leaving Vallaki for Krezk the next day, I wasn’t sure if they should have been making such swift progress. I could have had Strahd or some other force arbitrarily waylay them, but I was still getting used to my big boy GM boots and didn’t want to do that. They ended up making it to Krezk that following day, where some fun stuff happened with the Abbott.

I was a little unprepared for them to make such swift progress in a single session and skip over all the hooks in Barovia and Vallaki. I did my best to keep the game going anyways, but I wasn’t sure if I was missing something either implied or outright stated in the module that should make it more difficult to walk across Strahd’s domain. I understand that Strahd himself might have made things more difficult (especially concerning Ireena), but should the overland travel itself be more arduous/take more time, given a party who sticks to traveling during the day?

Do ball bearings require more than 1 save when moving across the tiles?

Ball bearings cover a square area that is 10 feet on a side. A creature moving across the covered area must succeed on a DC 10 Dexterity saving throw or fall prone. But is this for every square they move across?

And if it is once per ball bearings, what happens if they enter a 2nd patch of ball bearings that is connected to the 1st?

How far can a 9th level monk move along a vertical surfaces and across liquids without falling?

The monk class feature Unarmored Movement says:

At 9th level, you gain the ability to move along vertical surfaces and across liquids on your turn without falling during the move.

I am looking for an answer based in the rules as written, although interpretations and opinions are welcome.

I assert the rules support a notion of turns as meta-constructs useful for examining the game world at intervals, as opposed to a game world law of nature. As an example, if a character jumps and “runs out” of jump at the end of their turn while still jumping, I view the character as ending their round in mid-air, and that the jump gets continued on the character’s next turn. I don’t actually have rules citations to support my assertion, unfortunately.

This is important because I think it affects how far the monk can move along vertical or liquid surfaces. I don’t know how, though.

As an example, let’s assume a monk with 30′ movement is 10′ away from a 30′ wide body of water. The monk moves 10′ on land and then 20′ on water and then the monk’s turn is over. Does the monk fall in the water?

A slightly different example. Let’s assume the monk has 30′ of movement and is at the edge of a 1000′ wide body of water. How far can the monk move before falling in?

One answer might be the monk can move its movement, then it is no longer able to stay above the water and gets dunked. If this is the case, can the monk get back up on the water and keep moving?

One perhaps unintuitive answer is that there is actually no limit on how far the monk can move without falling, which means the monk could move across liquid until the monk needs to stop for some reason, say exhaustion, then they fall in.

Not to be absurd, but in this case, I think the monk could “ice” skate on the water, and do swirls and tricks and stuff. Okay, yes, that’s actually absurd.

To summarize: how far can a 9th level monk move along a vertical surfaces and across liquids without falling?

  1. to the end of the monk’s turn, then the monk needs to be on solid ground or fall

  2. the monk’s movement distance, even if that leaves the monk suspended on the vertical surface or the liquid between turns

  3. as far as the monk wants, as long as the monk keeps moving

  4. something else?

Is 5e character advancement commutative across multiclassing?

Is 5e character development commutative across multiclassing? I’m talking about the mathematical property where given two operands and an operation, $ x \circ y = y \circ x$ . That is, regardless of the order of the operands, the result of a commutative operation remain the same.

We can rule out character creation, because that is not commutative. A fighter 1 / wizard 1 will have different game statistics than a wizard 1 / fighter 1 (saving throws and other proficiencies, for example).

Also, let’s disregard the randomness of hit point rolls. Assume all characters take the average of the dice.

So, for two characters with the same 1st level class and the same features, who reach the same levels in the same classes but different advancement paths (i.e., the order in which these features were gained was different), do they have the same game statistics?

Exempli Gratia:

Assume two 1st level Rogues, Alice and Beatrice.

Alice gained 3 levels of Rogue and on her 4th level of Rogue, instead of an ability score increase she picked up the Martial Adept feat. She later gained 3 levels in Fighter, and chose the Battle Master archetype.

Beatrice gained 3 levels of Fighter, and chose the Battle Master archetype. She then gained 3 levels of Rogue, and instead of an ability score increase she picked up the Martial Adept feat.

Alice and Beatrice each now total four Rogue levels and three Fighter levels, obtained via different paths. Is the superiority dice gained from the Martial Adept the same dice for both Alice and Beatrice?

Meta: I know the issue above could sit in its own post, but then it would weaken the broader question.