Can a multiclassed Sorcerer/Tempest Cleric use Charisma instead of Wisdom to determine save DC for the Wrath of the Storm feature?

I have a question related to this one:
What is the DC of the Tempest Cleric's Wrath of the Storm feature?

Since the rules don’t specify how you calculate your DC for this ability, could a multiclass Sorcerer/Cleric use their Charisma instead of their Wisdom modifier?

How do I determine whether I have just woken up, programmatically?

Let me explain the situation:

Every time I wake up, I shower, start up my PC, go make coffee and sit down at the physical desktop. I then manually double-click a shortcut to a .bat file on the virtual desktop, which starts up my “life loop”. (I don’t start it automatically because it first has to connect to the VPN and it gets generally messy for complicated reasons.)

The “life loop” is basically a “while (1) { … }” script which performs all kinds of “jobs” all day. Before the loop, it runs the following code:

"Is it less than 10 minutes since the computer was booted?" "Have we not registered the last wake time within the last 20 hours?" 

If both of these conditions are met, my script then registers the approximate “last wake time” as “the current time minus 30 minutes” (in order to account for the time it takes me to get up from the bed, shower, turn on the PC, etc.).

Normally, and for the longest time, this works perfectly. However, as I have been fearing, today, it did not register, because it had apparently been less than 20 hours (or is it more?) since the last time it registered this.

This may be dead simple to all of you, but I’ve actually been thinking about this and fine-tuning it for a long time now. However, it seems like it will never be perfect, even though I try to have a pretty rigid “sleep/wake scheme”. It seems like no matter what number of hours I choose for the second condition, it will never match for every day. It’s either too long or too short.

An obvious solution would of course be to have a separate shortcut called “start life loop and I have just woken up”, to manually tell it that yes, this is definitely when I’ve waken up. However, this doesn’t seem “clean” and it bothers me that I would have to have two separate shortcuts to start my “life loop”. It doesn’t seem as beautiful as simply running a single shortcut (or even starting it automatically on boot, which I’ll likely want sooner or later).

Also, it often happens that I’m forced to reboot the computer (or shut it down and later turn it on again) during the day, without me having any intention to go to bed/sleep. It also happens oftentimes that I have to kill the life loop temporarily without restarting the machine, for debugging and testing purposes. For this reason, I can’t just always register the “wake time” whenever I start the life loop.

It feels like there is some obvious solution to this which I just haven’t thought of, but I sure can’t figure it out. Maybe the only sane way is to have a separate shortcut for when I really have woken up, and this just cannot be reliably determined by the script’s logic?

PS: Maybe I should clarify that I have no hardware in my bed which would be able to determine when I really wake up by analyzing my brain waves or something crazy like that.

How to determine if a language is deterministic context-free language?

I have the following question to solve : DCFL means Deterministic Context-Free Languageenter image description here

I tried to find a counter example to the problem, however I didn’t find anything. So I am thinking that it is deterministic. I am wondering how do I approach these kind of questions? and how to determine a language is deterministic ?

How to determine minimum word length of regular language

Given a regular language $ L$ and a regular expression $ r$ with $ L=L(r)$ . Is it possible to determine the minimum length of words of $ L(r)$ by the structure of $ r$ ?

A straightforward example:

Let’s say we have a regular expression $ r=aac^*aa$ , then $ L(R) = \{aaaa, aacaa, aaccaa, \dots, aac^naa\}$ . To determine the minimal length I would erase everything that is postfixed with $ *$ , leaving $ r’=aaaa$ . Now I would count the concatenations and add 1, which would yield in this example, not unsurprisingly, a minimum length of 4.

Is there a general approach to do this for more complex expressions?

How to determine time complexity with a simple way?

I’m learning about time complexity but all the cases we did in class were rather simple. Now I’m working on my home work and the cases our techer let us have was: f(n) = 4n(n + 2 log^2 n2) + (e^−n) + 8 * sin(2πn/256)

Is there a simple way how a I can determine which one of this is the true one? Because this look much more complicated then the ones we did in our class.

i) f(n) =o(nlog2*n)

ii) f(n) =o(2^n)

iii) f(n) =o(n^4)

iv) f(n) =O(n*log2 n^n)

v) f(n) =O(2n + 1)

How do you determine if a creature is tall or long?

Table 9-1, “Size and Reach”, on page 474 of the Pathfinder 2e Core Rulebook notes that creatures of a given size category have either a “Reach (Tall)” or a “Reach (Long)”. The same page says,

“Table 9–1 also lists the typical reach for creatures of each size, for both tall creatures (most bipeds) and long creatures (most quadrupeds).”

However, “most” isn’t especially helpful when the Bestiary is full of creatures like a raptor, which would seem to be a long biped, or a gelatinous cube, which is… a cube. Creatures in the Bestiary don’t appear to have a corresponding Tall/Long designation, just the primary size category (Medium, Large, etc).

Is there an official way to determine tall/long for a given creature, especially those where the “most” suggestion doesn’t make logical sense?

How can I determine if two vertices on a polygon are consecutive?

Suppose I have a set of points that construct a convex polygon in the Cartesian plane with the points as its vertices. I randomly choose two vertices and want to know if they are consecutive vertices on the polygon. Does anyone know of an algorithm that would do this, as in you would input the array of points and the two vertices as parameters and it would return a boolean?

It’s given that the polygon exists and is unique.

How to determine valid handle for given bottom up parser?

I came across following question:

Consider the grammar:

$ E → E + n\text{ | }E × n\text{ | }n$

For a sentence n + n × n, the handles in the right-sentential form of the reduction are
(A) $ n, E + n$ and $ E + n × n$
(B) $ n, E + n$ and $ E + E × n$
(C) $ n, n + n$ and $ n + n × n$
(D) $ n, E + n$ and $ E × n$

Solution given was:

n+n×n    E+n×n  //reduce n to E E×n    //reduce E+n to E E      //reduce E×n to E 

Hence option D

Then I came across following problem:

Consider the following grammar:
$ A\rightarrow A(B)|B$
$ B\rightarrow B*C | id $
$ C\rightarrow (id)$
Which of the following can be the correct handle in bottom up parsing for the given grammar? (A) (id)
(B) id*C
(C) id
(D) none

The given solution was (A)(id)


  1. After thinking about the definition of the handle and two problems, I concluded following:

    • If problem asks which are valid handles for given string and grammar, then we have to actually try parsing that string with given grammar and determine which handles are reduced during parsing.

    • But, if no string is given, and just the grammar is given, then following are valid handles:
      (a) right hand side of each production
      (b) those sentential forms which can be derived from start symbol by doing rightmost derivation are valid handles. For example, $ B*(id)$ is a valid handle as we can derive it by doing rightmost derivation as follows: $ S\rightarrow B\rightarrow B*C\rightarrow B*(id)$

  2. As explained in 2nd bullet point of point 1 above, answer of 2nd problem is wrong and both of $ A$ and $ C$ options are correct: both $ (id)$ and $ id$ are valid handles.

Am I correct with both conclusions above?

How to determine if user watched / “completed” the video?

I’m building a course website. It’s relatively simple and I need to track overall project progress only by tracking watched videos amount, e.g.

Course 1 5/12 watched 

The question is how do you understand that user watched the video?

Some options are: – user opened the video, e.g. clicked ”play” – user watched some % of the video (what would be the correct percent there?) – user watched the whole video

The point here that if user opened the video, watched for e.g. 10 seconds and jumped to next one, would that count as ”completed”?

For some users probably yes, because he explicitly skipped it or found not relevant. Other may return to it though so they might assume it’s not “completed” yet.

How do you to determine the reach of a Monster’s unarmed strikes?

This is inspired by the question “Does a Stone Giant get an attack of opportunity if I move only 5 feet away from it?”. The question ” Can a monster with no melee attack make an Opportunity Attack?” (as well as the Sage Advice Compendium) establishes that monsters do have unarmed strikes. I’m wondering then, how to determine the reach of this attack, if one exists at all.

Is there a rule somewhere that explains how the reach of an unarmed strike should be determined for creatures such as the Stone Giant whose only melee attack has a 15-foot reach? Or creatures like the Kraken who have multiple melee attacks with different reaches? The previously linked question also mentions the Flameskull which has no melee attacks whatsoever.

Is there any way, provided in the rules, to determine the reach of a given monster’s unarmed strikes?