How do I model time passing differently for different characters?

I am the DM in this situation and a character has wandered into a small area which links to another plane. In this plane time passes differently, so 1 minute in that plane would be 1 hour in the real world.

Normally I would make sure the players just get equal screen time to ensure they all feel included, but this is complicated by the fact that the players in normal time are in combat, and the character inside the distorted time area is not.

If the player inside the time bubble were to immediately walk straight out, they would have been gone for a full minute, at which point combat would have likely finished.

How can I best play this at the table without making the player in the time bubble just sit around while everyone else fights?

I would also like to keep it vague, so the players outside of the time bubble don’t know if it is safe or dangerous inside it (IE: they worry for the character trapped inside), but the only way I can see this being accomplished is to deal with combat first, and anyone in the time bubble gets to sit out of the game until either combat is over, or everyone is in the bubble.

A good answer will draw from experience of similar situations, and ensure that everyone at the table feels like they are getting to do something. My players can be pretty slow in combat (and even slower out of it!) so sitting for a full combat might mean not doing anything for over an hour (actually worst in this situation because the nature of the combat in this area could well take the full session).

Addendum: The time distortion effect isn’t mandatory, and if I can’t figure out a way to deal with it properly I will just drop it for an easier to work effect, so frame challenges are not needed.

Analyzing space complexity of passing data to function by reference

I have some difficulties with understanding the space complexity of the following algorithm. I’ve solved this problem subsets on leetcode. I understand why solutions’ space complexity would be O(N * 2^N), where N – the length of the initial vector. In all those cases all the subsets (vectors) are passed by value, so we contain every subset in the recursion stack. But i passed everything by reference. This is my code:

class Solution { public: vector<vector<int>> result; void rec(vector<int>& nums, int &position, vector<int> &currentSubset) {     if (position == nums.size()) {         result.push_back(currentSubset);         return;     }          currentSubset.push_back(nums[position]);     position++;     rec(nums, position, currentSubset);     currentSubset.pop_back();     rec(nums, position, currentSubset);     position--; }  vector<vector<int>> subsets(vector<int>& nums) {     vector <int> currentSubset;     int position = 0;     rec(nums, position, currentSubset);     return result; } }; 

Would the space complexity be O(N)? As far as i know, passing by reference doesn’t allocate new memory, so every possible subset would be contained in the same vector, which was created before the recursion calls.

I would also appreciate, if you told me how to estimate the space complexity, when working with references in general. Those are the only cases, where i hesitate about the correctness of my reasonings.

Thank you.

Passing plain text password over HTTPS

My login for POST is over HTTPS. Therefore, I don’t do anything to the provided password before submitting. And I don’t see an issue there unless someone is watching your browser’s developer console. (Tested the Google login. They also share the same approach.)

But I’ve received a concern asking "malicious user succeeds in session hijacking in someway will be able to access the end user credentials". Is this a valid argument? if so, how can I act?

Passing the session source to a hidden field of an unbounce form

It works fine if you go directly to to the form with a campaign link. But if you go to the website first and then click the button to get to the form – the source is gone from the url and so doesn’t get added to the field.

I came up with a solution that rewrote the button link on dom load to append with a new parameter name whatever campaign parameters they arrive with. However – that will only work if they land on one page and go to the form. I could keep making the tag more complicated to cover more situations and that might be the right path.

But I would like to know if there is an easier solution at the source by adding a tag that only triggers when the form loads and pulls the referrer or utm_source and puts it into the hidden field.

Does this make sense what I’m trying to do?

Thank you

McNaughton-Yamada Algotihm (1960) Regular Expression to DFA without passing through NFA

I have a homework problem here. It asks me to use the McNaughton-Yamada algorithm to first convert a regular expression to a DFA, and then minimize this using a partition argument. I can do the latter. My problem is that I cannot access any actual reference on the algorithm. Their original paper is behind a paywall at IEEE that my university does not have access to.

The algorithm went something like this: 1. For each symbol in the expression, given them a subscript from left to right increasing by one for each instance of that symbol. For example, the expression, aa* would receive a_1 a_2^*.

  1. We proceed to construct a diagram based on the possible lengths of words.

If done appropriately, this produces a DFA. I think the labeling in (1) is to help label the states.

Feel free to come up with your own example if you decide to give an answer. I won’t provide any problem here because there is no guarantee that it isn’t actually my homework exercise.

What’s the point of passing by value?

I am being told that I need to make the definitions of the int and the string up in the above function then pass by value. Why won’t my way work however?

void boardFunc(Game &game) {      game.board.numSquares = totSquare();  }  int totSquare() {      int tot = 0;     string what = "";      ifstream readBrd;"board.txt");      readBrd >> what;     readBrd >> tot;      cout << what;      return tot;  } 

Passing a non-mutable argument by value or by reference?

A function can generally be defined to receive parameters by value or by reference. If we want to mutate an object inside the function and have those changes reflected outside the function, then it must be passed by reference.

If we don’t want to mutate the object then we can choose between passing by value or by reference. The choice, in my experience, is based on whether or not it’s expensive to copy the object. If it’s cheaper to copy than to deal with the reference’s indirection – pass by value, else – pass by reference.

1) Are there any other considerations that should be taken into account?

2) Wouldn’t a compiler be better suited to make this choice instead of the programmer? Why, or why not?

To illustrate question 2, the programmer could simply indicate whether they intend to mutate an argument or not. If an argument will be mutated then it must be passed by reference. If it won’t be mutated, then the compiler can choose between passing by value or by reference – whichever is faster.

3) Do you see any pitfalls in this approach to language/compiler design?