Boyer-Moore majority vote algorithm second iteration

There’s a problem in one of my textbooks that goes as follows.

You are given the results of a presidential election. Each ballot is presented one by one, and on each ballot the name of a candindate is written(Let’s assume candidates name’s are represented by numbers). Before announcement of the result, the total number of candidates and the number of people who voted, are unknown.All valid ballots are presented on by one as input, and this process repeats 2 times total. We only have 2 simple varibles we can use for the whole process. You have to design an algorithm which can decide if there is a candidate that has gathered the majority of the votes(meaning more than 50%) of the people who voted, or not. If such a candidate exists, print the candidates name otherwise print "blah blah blah"

Now what first got into my mind, is to use the Boyer-Moore majority algorithm and keep updating the majority and the counter variables as soon as the next result comes in. In case i haven’t made that clear, the results aren’t stored in an array or anywhere else. You get informed of one ballot, then you calculate(and this goes on until all the ballots have been used, meaning i don’t have access to any previous information). Whether this information is stored in array or not, i know i can still run the first iteration of this algorithm to get a "possible" majority result, since the algorithm always produces one. My problem lies in the second iteration.I see the results one more time one by one. How am i supposed to verify if my original result is indeed the majority or not? Is there any other way i can get around it with only 2 variables?

Can a Totem Warrior Barbarian choose a second Totem Spirit in place of an Aspect of the Beast?

Is it possible for a Totem Warrior Barbarian to select another totem from level 3 instead of the Aspect of the Beast at level 6?

At 6th level, you gain a magical benefit based on the totem animal of your choice. You can choose the same animal you selected at 3rd level or a different one. (Player’s Handbook)

This means that it’s possible for a Barbarian who selected the bear on level 3 (resistance) to e.g. select the eagle on level 6 (eyesight).

However, is it possible to select the eagle level 3 upgrade (Dash bonus action) on the Barbarian level 6 upgrade, when the bear was selected on the level 3 upgrade? As the Totem Spirit of level 3 is "lower" in some terms, I wouldn’t mind to allow it. This would create a level 6 Barbarian with resistance and Dash as a bonus action, a pretty fast tank character (for example).

And is this also valid for level 14 Totemic Attunement, thus allowing to select another (not yet selected) totem from the previous levels?

Do 10 second turns/60 second rounds make spellcasters horrible?

My DM insists on the combat being 10 seconds per turn and the round time to be the sum of all turn times (so a minute for 6 participants, for example). I am aware that this is not how turn/round time normally works.

This makes many spells with 1 minute durations like Hold Monster last at most a round.

I am playing a Fiend Warlock and I am worried it’ll seriously underpower my character compared to non-spellcasters. Many spells available to me are supposed to last up to encounter-long (Hold Monster, Hunger of Hadar, Vampiric Touch, Hold Monster, Eyebite to name a few). Am I rightly worried, or overreacting? Are other spells sufficient for me to carry my weight?

AnyDice — efficiency of code calculating rolls hitting a target with mixed pools; hitting the 5 second barrier

I have some code that is hitting the 5 second barrier;

function: target N:n of A:s B:s C:s {     result: [count {1..N, 1..(N/2)} in [sort {A, B, C}]] } output [target 7 of 4d12 0d20 0d8] output [target 7 of 4d12 2d20 0d8] output [target 7 of 4d12 4d20 0d8] 

Even if I remove the final output line, it still fails.

I believe the code does what I want it to – calculate the number of dice rolling at or under the target from mixed pools (it runs when using other pools: d20s seem to be a problem).

Is there anyway I can improve it so that at least the first two of these output lines will run (or better yet, all three of them)?

N.b. from my perspective these were some of the simplest pools I wanted to look at.

What are the sales figures for Pathfinder 2e between launch year and second year to date?

Pathfinder 2nd edition officially hit gaming tables almost a full year ago. Since then, I’ve noticed quite a lack of questions on this site with the pathfinder-2e tag compared to other systems, and I doubt it’s because of a corresponding lack of rules ambiguity.

I know that 5th edition is Dungeons & Dragons’ most successful edition yet; has Paizo released any information about the financial reception of 2nd edition?

How is the company doing compared to last year at this time?

Is it possible for a rogue to get a second action/bonus action?

I know all characters get one action and one bonus action, but say I want to use misty step (As an Eladrin) and follow through with my dual swords. I know that Misty Step is a bonus action, Attack 1 is an action, and Attack 2 is a bonus action (I think). I also know that you can move up to 5 feet as a free (non-normal/bonus) action. At higher levels are there any feats, or are there any magical items that give you another action or another bonus action?

Does taking the Domain Initiate cleric feat a second time give a second focus point?

Under Focus Points from Multiple Sources the book reads:

It’s possible, especially through archetypes, to gain focus spells and Focus Points from more than one source. If this happens, you have just one focus pool, adding all the Focus Points together to determine the total size of your pool. (Remember that the maximum number of Focus Points a pool can have is 3.) If you have multiple abilities that give you a focus pool, each one adds 1 Focus Point to your pool. (Core Rulebook pg. 300)

It’s not clear to me if taking the same feat multiple times counts as more than one source, or multiple abilities, for the sake of getting an additional focus point. Specifically, the Domain Initiate cleric feat doesn’t seem to mention anything on the issue.

The Domain Initiate cleric feat reads:

Special You can select this feat multiple times, selecting a different domain each time and gaining its domain spell. (Core Rulebook pg. 121)

Is it possible to use the resources of a second computer to supplement the power for a principal one? [closed]

I’m using COMSOL to set up some models and I have two computers – one that is weak and has the license on and a second one which is very powerful and I would like to use the weak computer with the license to set up the model, the geometry, boundary conditions etc, and the second one for carrying the heavy stuff – the the computation. Are there any ways to do something like this? This questions is more general than just COMSOL. Is there any way to use the resources of a second computer to supplement the power of the first one?

Is it possible to work out rotate in degrees per second based on this rotate logic?

I have this code to rotate an object towards another at a given speed.

    /// <summary>     /// Rotate towards the target.     /// </summary>     /// <param name="lookPosition"></param>     private void RotateTowardsTarget(Vector3 lookPosition)     {         // Determine which direction to rotate towards         Vector3 targetDirection = lookPosition - transform.position;          // The step size is equal to speed times frame time.         float singleStep = weaponRotationSpeed * Time.deltaTime;          // Rotate the forward vector towards the target direction by one step         Vector3 newDirection =             Vector3.RotateTowards(turretYRotation.transform.forward, targetDirection, singleStep, 0.0f);          // Draw a ray pointing at our target in         //Debug.DrawRay(turretYRotation.transform.position, newDirection,, 3);          newDirection.y = 0;         // Calculate a rotation a step closer to the target and applies rotation to this object         turretYRotation.transform.rotation = Quaternion.LookRotation(newDirection);     } 

And I’d like to convert this to a “Degrees per second” to give the user useful feedback on how quickly it rotates. Is there a formulae I can apply to work it out?

What is the scene depicted in the second “Waterdeep Digital Background” art?

In the Free Remote D&D Resources archive that Wizards of the Coast is providing, for April 30, 2020 there is a “Waterdeep Digital Backgrounds” zip file that includes artwork that one might be able to use as a background while videoconferencing. The second file (named “DnD_Video_bg-WDDH2”) looks to be a scene outside of Waterdeep proper, with people along a path, a building (maybe some kind of temple), and the wall of Waterdeep in the background. I’m presuming putting a smaller version here counts as fair use:

Waterdeep scene 2

What is that building, and more generally where is this scene set? Is it part of the Waterdeep: Dragon Heist book or storyline? (I don’t remember seeing it in there, though probably I just missed it, but the filename saying “WDDH” makes me think it’s related.)