What is wrong with the following P problem?

Our teacher gave us the following statement and we were wondering what is wrong with it.

Consider an array A of n distinct numbers. Since there are n! permutations of A, we cannot check for each permutation whether it is sorted, in a total time which is polynomial in n. Therefore, sorting A cannot be in P.

obviously this is wrong. my friend thought it should just be: therefore sorting A cannot be in NP. is this correct or are we thinking about it to easily?

Is our group using the Sleep spell wrong?

I am playing a 3rd-level wizard, and I have to say sleep seems really overpowered as a spell. On numerous occasions now, a combination of sleep followed by the rest of the party slitting throats has seen us clear enemies really quickly.

I even used it on a charging bugbear getting him to pass out just before he reached me, we then managed to take him down to just 4 health in the next round of combat before he woke up. And a wolf who was clamped onto the leg of a PC.

Our GM does have creatures wake up as they take the wounds, but 9 times out of 10 they are already dead, given that they can’t defend themselves from the stabbing. Are we doing something wrong here with this spell? Having spoken to other wizard players, they have told me they find it a pretty useless spell.

What happens if I use wrong kind of spell component in a Conjure Volley?

The spell conjure volley has one piece of ammunition or one thrown weapon as its material component. The spell effect further describe the requirement of the said ammunition or thrown weapon: they must be nonmagical.

You fire a piece of nonmagical ammunition from a ranged weapon or throw a nonmagical weapon into the air and choose a point within range. Hundreds of duplicates of the ammunition or weapon fall in a volley from above and then disappear.

What happens if I use magical ammunition or magical thrown weapon? Do the spell fail and the spell slot consumed? Do the spell just don’t get cast at all and I’m like an idiot throwing a magical axe into the air waiting for something to happen?

Is a counterspell ineffective against the wrong spell?

So I had this idea in my campaign to rob a magic store. Logically, it makes sense that the owner of said store knows counterspell. So what I plan to do is to take out the components of fireball but not cast fireball. Simultaneously, I’ll take out the components for major image, concealing them, and create a “fireball”, then run out with whatever stolen goods I have. Since the spell the shop owner is countering isn’t fireball, would this counterspell be ineffective?

What is wrong with this input?

I’ve followed the examples from the introduction to mathematica for math students: https://www.wolfram.com/language/fast-introduction-for-math-students/en/more-plots-in-2d/

xdt[x_, y_] := (sigma + 3) x + 4 y ydt[x_, y_] := -(9/4) x + (sigma - 3) y sigma := {-1, 0, 1} StreamPlot[{xdt[x, y], ydt[x, y]}, {x, -10, 10}, {y, -10, 10}] 

I execute each row one after the other by pressing shift+enter, and when I get to the last row only an empty plot-window shows up.

Can anyone tell me whats wrong here?

get_template_directory_uri() generates wrong path

I’ve uploaded a wordpress site but it’s missing javascript and css. The links on the head still have the local path (src='https://localhost...') and not the new ones. So I guess it has to do with get_template_direcory_uri() that I use in fucntions.php to apply my javascript/jquery,bootstrap,css etc.

How yo fix that?

I’ve tried adding to config.php:

define( 'WP_SITEURL', 'http://' . $  _SERVER['HTTP_HOST'] ); define( 'WP_HOME',    'http://' . $  _SERVER['HTTP_HOST'] ); 

and

define( 'WP_HOME', 'https://...' ); define( 'WP_SITEURL', 'https://...' ); 

but they didn’t help…