## when using a hireling with a warrior skill how do they take the brunt of it?

The players I’m GMing are looking to get a hireling who’s a warrior. Looking at the description it states

If your attack results in consequences (like a counter attack) the man-at-arms takes the brunt of it.

It also states that a hirelings HP isn’t important. How do I damage him, figure out if he’s dead, if I don’t know his HP?

also looking at burglar it states:

Most traps leave a burglar in need of immediate healing.

how can I heal him if I don’t know his HP?

## Problems with using a non-reserved top-level domain for local DNS resolution

A network administrator at my organization (let’s call him "Bill") wants to configure an internal DNS with the live top-level domain (TLD) .int for internal IP address resolution (for Active Directory, internal websites, etc.). For example, the domain exampleinternalsite.int would resolve to the some internal site that isn’t visible to the public. Our organization has not registered these domain names with a registrar. Now I know that this is bad practice, but Bill remains unconvinced that this shouldn’t be done.

What are the problems with using a live top-level domain for internal name resolution? Specifically, what are the security implications? In addition, does this somehow conflict with some fundamental way on how DNS and name resolution is supposed to work?

Note: I originally asked this question on Network Engineering SE and was kindly referred over to this site as a better place for this question.

## CHANGING STOCK VALUE FROM TXT FILE USING PHP

I have a txt file that stores info (sku, name, stock) from products. Is it possible to read from this file and insert only the stock value to wp database using php?

Thanks

## How can I get the speed of finger drag using unity TouchPhase.Moved?

I’m making a mobile game where you control a 3d ball by touch. So far I can get it to roll based on finger down and drag (via TouchPhase.Moved) but I want to be able to detect a fast flick or finger swipe so that I can addforce based on finger speed and let go. Bit like how I would if I was only using TouchPhase.Began and TouchPhase.Ended with calculating start/end position and time duration, but now I think I need to do something in .Moved to keep track of finger speed and get the start and end position of the beginning and end of that fast finger movement. Here’s my code so far:

if (Input.touchCount > 0)       {           touch = Input.GetTouch(0);            if (touch.phase == TouchPhase.Began)           {               touchdown = true;           }            if (touch.phase == TouchPhase.Moved)           {               if (touchdown == true)               {                   startPos = new Vector2(0, 0);               }               else {                   startPos = Input.GetTouch(0).position;               }                              touchTimeStart = Time.time;                direction = startPos - endPos;               timeInterval = touchTimeFinish - touchTimeStart;                endPos = Input.GetTouch(0).position;               touchTimeFinish = Time.time;                              rb.AddForce(direction.x * force, 0, direction.y * force/ moveSpeed);                touchdown1 = false;            } if (touch.phase == TouchPhase.Ended)       {           startPos = new Vector2(0, 0);           endPos = new Vector2(0, 0); } } 

## Display/Filter post using if else statement

Here it is: I want to filter my post based on category (Party) If the post with category Party has tag which is ‘event’, it is the one that will display If there is no ”event’ tag, only the recent post of Party category will display

here’s my code:

<?php      $post_cat = array( 'posts_per_page' => '1', 'cat' => '3' );$  post_tag = array(             'posts_per_page' => '1',             'cat' => '3',             'tag' => 'event'             );       $catquery = new WP_Query($  post_cat );     $tagquery = new WP_Query($  post_tag );          if(has_tag()) :          while($tagquery->have_posts()) :$  tagquery->the_post();            else if(has_category()) :        while($catquery->have_posts()) :$  catquery->the_post();          else ?> <?php $backgroundImg = wp_get_attachment_image_src( get_post_thumbnail_id($  post->ID), 'full' );?> <div class="blog-post-recent" style="background-image: url('<?php echo \$  backgroundImg[0]; ?>');">     <div class="wrap">         <div class="blog-post-content">             <div class="blog-post-inner-content">                 <?php the_category();?>                 <div class="blog-post-title"><a href="<?php the_permalink() ?>"><?php the_title( '<h2>', '</h2>' ); ?></a></div>                 <div class="post-date"><?php the_date('F j, Y'); ?></div>                 <?php the_excerpt(); ?>                 <a class="blog-post-btn"  href="<?php the_permalink() ?>"> Read More...</a>';             </div>         </div>     </div> </div> <?php endif;     wp_reset_postdata(); ?> 

## Complexity of approximating a function value using queries

I am looking for information on problems of the following kind.

There is a function $$f: [0,1] \to \mathbb{R}$$ that is continuous and monotonically-increasing, with $$f(0)<0$$ and $$f(1)>0$$. You have to find the unique $$x\in[0,1]$$ such that $$f(x)=0$$. You can access $$f$$ only through queries of the type "what is $$f(x)$$?". How many such queries do you need in order to approximate $$x$$ up to some constant $$\epsilon$$?

Here, the solution is simple: using binary search, the interval in which $$x$$ can lie shrinks by 2 after each query, so $$\log_2(1/\epsilon)$$ queries are sufficient. This is also an upper bound, since an adversary can always answer in such a way that the possible interval for $$x$$ shrinks by at most 2 after each query.

However, one can think of more complicated problems of this kind, with several different functions and possibly different kinds of queries.

What is a term, and some references, for this kind of computational problems?

## Space complexity of using a pairwise independent hash family

I’m trying to analyze the space complexity of using the coloring function $$f$$ which appears in "Colorful Triangle Counting and a MapReduce Implementation", Pagh and Tsourakakis, 2011, https://arxiv.org/abs/1103.6073.

As far as I understand, $$f:[n] \rightarrow [N]$$ is a hash function, that should be picked uniformly at random out of a pairwise independent hash functions family $$H$$. I have a few general questions:

1. Does the space complexity required by $$f$$ is affected by the fact that $$H$$ is $$k$$-wise independent? Why? (if it does, then also- how?)
2. What do we know about $$|H|$$? What if $$H$$ is $$k$$-wise independent?
3. Is there a more space-efficient way to store $$f$$ than storing an $$N \times m$$ matrix that maps each vertex to its color, using O($$N m$$) storage words?
4. Does the total space complexity which is required in order to use $$f$$ as described in the paper is $$|H| \cdot O(\text{space complexity of } f)$$?

Best regards

# tl;dr

The question is rather simple: how unsynchronized can internal clocks be between different machines?

# Context

We have a "hybrid" approach where the Clients are authoritative on certain things, and the Server on some others. That is to make our life easier because the gameplay doesn’t need to be too tight about certain things.

In this case, the Server will pre-determine a sequence of Enemy Types to be spawned at different locations with pre-determined delay between the spawns. We would then let the Clients handle the rest during the gameplay.

However, if we want the Clients to be mostly synched on the display of the enemies, they would need to initiate this sequence at the very same time, and thus we cannot rely on the network to have transmitted the data at the very same time for all Clients.

The idea we had was to send a timestamp of the format returned by System.currentTimeMillis() which would indicate when to begin the sequence.

But then one question remains in the way: how unsynchronized can internal clocks be between different machines?

## Is using stunting and pranks to gain advantage instead of stealth mechanically sound?

I would like to break the stereotype that rogues are always super stealthy sneaky types that appear from the shadows and strike and then disappear, for me that makes the flavor of the game not as fun and reduces the amount of decision making in-game. This is the reason I haven’t considered playing rogue ever.

I am selecting the thief rogue archetype in order to be able to take advantage of the use an object bonus action, and combine it with free actions for maximum effectiveness to allow for stunting and debuffing to gain the advantage required for sneak attacks. Is this a mechanically sound way to reliably trigger sneak attacks?

Ways this could potentially be implemented in practice:

• Throwing dust into the eyes of an enemy
• Using tinderbox to light their clothing, hair, or fur on fire
• Using ten foot pole or quarter staff to poke and harass them
• Using ropes and whips to attempt to trip them up or lasso them
• Throwing caltrops, ball bearings, or oil, under their feet
• Pantsing them or messing with their clothing in a similar way

## Using/ Extracting data from Interpolating Functions returned from NDEigensystem

I am relatively new to Mathematica and have been trying to use the NDEigensystem command to work with some quantum systems. I am able to get the accurate energy eigenvalues but am having problems with eigenfunctions; more specifically, I am having trouble actually calling values using the interpolating functions.

m2 = 0.5; \[HBar] = 1; w = 0.5; \[ScriptCapitalO]2 = -\[HBar]^2/(2 m2) Laplacian[u[x, y], {x, y}] +    1/2 m2 w^2 (x^2 + y^2) u[x, y]; 
{vals, funs} =    NDEigensystem[{\[ScriptCapitalO]2,      DirichletCondition[u[x, y] == 0, True]},     u[x, y], {x, -10, 10}, {y, -10, 10}, 28,    Method -> {"PDEDiscretization" -> {"FiniteElement", {"MeshOptions" \ -> {"MaxCellMeasure" -> 0.5}}}}]; 

As we can see above, I am using a simple 2d harmonic oscillator as my Hamiltonian, and then using the NDEigensystem command I am generating eigenvalues and eigenfunctions. I am able to get the right eigenvalues for my system as we can see below

However; the eigenfunctions aren’t usable, I am trying to extract the data from the interpolating functions to no avail. From what I understand the syntax is:

\[Psi] = funs[[1]] \[Psi][2,3] 

The above code should print the values of the first eigenfunction as {2,3} but it doesn’t seem to be working. I’m hoping to eventually integrate these functions to calculate expectation values, I would be very grateful for any help or advice.