When playing on a grid, can I pour a flask of oil on any adjacent square or just on the one I am standing on?

The description of a flask of oil says:

You can also pour a flask of oil on the ground to cover a 5-foot-square area, provided that the surface is level.

When playing on a grid, can I pour a flask of oil on any adjacent square or just on the one I am standing on?

Just adding basic token by POST parameter for securing the API. It is safe?

Let’s say I have an address for an API like this:


If accessed, a JSON will appear like this:

[   {     "id":"1",     "name":"John"   },   {     "id":"2",     "name":"Smith"   } ] 

The result defaults will be displaying the entire data if a post has no parameters. If you use post "ID" and the ID parameter value is one of the existing data in the API, it will only display objects from the data selected based on the ID. The API can be accessed by anyone. API needs to be accessed using token parameters to secure the data.

Let’s say I add a token parameter to be able to access data like this:

yourtoken="yourtoken"  if (post_param[token]==yourtoken) {   // Displaying JSON } 

so if you want to open the API, you need to add a token parameter.

Is simple security like this worth using? what vulnerabilities will arise if I use this? is there a better way than this?

Does Dispel Magic end the spell for everyone affected or just the target?

An opposing Cleric casts Bless on 3 of its allies who then immediately move around the battlefield to start attacking. Concerned that the buff will create an issue, I cast Dispel Magic on the nearest one.

As the target spell is 3rd level or lower, the dispel succeeds automatically.

My question is, does this end the spell for all 3 of the initial targets, or just the one that I targeted?

Are demiliches just husks with no memories?

I did some minor snooping about liches and one idea popped into my brain for a enemy idea "what if an old friend of the party (npc) turned into a lich for a noble reason and when he started to feel his humanity slip he stopped looking for souls to turn dormant and fade away without causing trouble"

Now of course if a lich stops feasting they turn into a demilich and thats what this encounter is for. So do demiliches retain memories like the lich or do they just become floaty skelebones?

Tl;dr when liches turn into demiliches (the weaker kind) do they remember anything?

Why isn’t there just one “keystone” activation function in Neural Networks?

This article says the following:

Deciding between the sigmoid or tanh will depend on your requirement of gradient strength.

I have seen (so far in my learning) 7 activation functions/curves. Each one seems to be building on the last. But then like the quote above, I have read in many places essentially that "based on your requirements, select your activation function and tune it to your specific use case".

This doesn’t seem scalable. From an engineering perspective, a human has to come in and tinker around with each neural network to find the right or optimal activation function, which seems like it would take a lot of time and effort. I’ve seen papers which seem to describe people working on automatically finding the "best" activation function for a particular data set too. From an abstraction standpoint, it’s like writing code to handle each user individually on a website, independently of the others, rather than just writing one user authentication system that works for everyone (as an analogy).

What all these are papers/articles are missing is an explanation of why. Why can’t you just have one activation function that works in all cases optimally? This would make it so engineers don’t have to tinker with each new dataset and neural network, they just create one generalized neural network and it works well for all the common tasks today’s and tomorrow’s neural networks are applied to. If someone finds a more optimal one, then that would be beneficial, but until the next optimal one is found, why can’t you just use one neural network activation function for all situations? I am missing this key piece of information from my current readings.

What are some examples of why it’s not possible to have a keystone activation function?

Why salt hashing is better than just hashing?

I have recently read an article about keeping passwords safely and I have a few misunderstandings. I found out 4 ways of storing users’ passwords: 1). Just keep them in plain text 2). Keep passwords in plain text, but encrypt the database 3). Hash a password 4). Use "salt hashing". Generate a random string and use a hashing algorithm after concatenation entered user’s password and randomly generated string. And I also have to store this string to let user in.

The best way was 4-th. Then my main misunderstanding is about: "what do we want to protect from?". As I understand – from the case when hacker gets access to our server and gets the database and the server-side source code. In this case I, as a developer, jeopardize accounts of those users, who have same passwords on all websites. Hacker gets a password from my database and then knows, what password does this user have on other websites/apps. That is why I want to to make passwords as secure as it is possible. In this case I do not understand the difference between ways 3 and 4 (1 and 2 are obviously bad, I think).

To crack passwords in way 3 the hacker gets my hashing algorithm and just tries to hash some passwords (either brute force or maybe some db of common passwords) and compare gotten string to the database. To crack way 4 the hacker has to try passwords like in the way 3, but, when hashing, his program will just take stored random string from my base and use it when hashing. It will be a bit longer for hacker, but not a lot (I think). So why the way 4 should be a lot more secure than the 3 one, or what do not I understand in the 4th way?

Why can’t a compiler just “think more” about optimization?

This happens to me from time to time: I compile my code with the highest optimization level (-Ofast) of the allegedly fastest compiler (GCC) of one of the fastest languages (C/C++). It takes 3 seconds. I run the compiled program, measuring performance. Then I make some trivial change (say, marking a function inline), compile it again, and it runs 20% faster.

Why? Often I’d rather wait a few minutes or even hours, but be sure that my code is at least hard to optimize further. Why does the compiler give up so quickly?

As far as I know modern architectures are super complicated and hard to a priori optimize for. Couldn’t a compiler test many possibilities and see which one is the fastest? I effectively do this by making random changes in the source code, but that doesn’t sound optimal.

filter default wp_query to show just selected level of child pages in wordpress

I’m working on a site that has a fairly large page structure a few levels deep – in some sections there are a lot of pages.

So I want to have functionality if user choose on select box level 1 then only pages in level 1 will show in below list of pages. if he choose level 2 then only level 2 pages, same go to level 3 level 4 level 5 level 6.

it’s working for top level parent pages when I set query_vars[‘post_parent’] = 0; and I want to have same functionality to show list of level 1 child page,level 2 child pages and so on…

I am stuck on it. please I will be great full if anyone can help me for it. Thanks see screenshot link https://i.stack.imgur.com/EKpy6.png

function level_page_admin_posts_filter( $  query ) {   global $  pagenow;   if ( is_admin() && $  pagenow == 'edit.php' && !empty($  _GET['lavel_pages'])) {       $  level = $  _GET['lavel_pages'];       if($  level == 'parent'){         $  query->query_vars['post_parent'] = 0;       }else        if($  level == 1){                }else       if($  level == 2){        }   } } add_filter( 'parse_query', 'level_page_admin_posts_filter' );  function admin_page_filter_level_pages() {   global $  wpdb;   if (isset($  _GET['post_type']) && $  _GET['post_type'] == 'page') {   $  sql = "SELECT ID, post_title FROM ".$  wpdb->posts." WHERE post_type = 'page' AND post_parent = 0 AND post_status = 'publish' ORDER BY post_title";   $  parent_pages = $  wpdb->get_results($  sql, OBJECT_K);   $  select = '     <select name="lavel_pages">       <option value="parent">Parent Pages</option>       <option value="1">Level 1</option>       <option value="2">Level 2</option>       <option value="3">Level 3</option>       <option value="4">Level 4</option>       ';      $  select .= ' </select>';   echo $  select; } else {   return; } } add_action( 'restrict_manage_posts', 'admin_page_filter_level_pages' );