redirection: nginx permanent redirection rule from one domain to another with URL parameters

I am redirecting the URL from one domain to another using the nginx server block as shown below:

server {
        server_name subdomain.example.com
        return 301 https://subdomain.example2.com$request_uri;
        }

Now I need to do the same redirection by capturing the URL parameters as shown below:
https://subdomain.example.com/some-unique-strings/xy000012345 should be permanently redirected to https://subdomain.example2.com/ab/string?stringid=12345
You need to capture the digits after xy0000 dynamically and pass them to the new URL as stringid = (captured digits)

probability theory: explicit formula for the product rule for Ito processes

We know we have the following formula $ d (XY) = XdY + YdX + d (X, Y) $But what does this look like when we have two real processes?

My own attempt is as follows

$ d (XY) = XdY + YdX + d (X, Y) = X ( mu_ {Y} dt + sigma_ {Y} dW) + Y ( mu_ {X} dt + sigma_ {X} dW) + sigma_ {X} sigma_ {Y} dt = X mu_ {Y} + Y mu_ {X} + sigma_ {X} sigma_ {Y} dt + ( sigma_ {Y} + sigma_ {X }) dW $

where I used the definition of integration with respect to a semimartingaleale and the formula for the cross variation of two Ito processes. Is the above egalitarian true?

Join a dynamic number of tables with the same naming rule in MySQL

I am creating an application where users go and register a server, and each registered server obtains a table that contains information about it, such as its users.

All tables on those servers are named after the following convention: server_, (I like it server_21) where he server_id is a numerical identification in a table called servers. All server tables have exactly the same scheme.

I want to join all those tables and create a kind of global user list on all servers, but there are three captures:

  • The number of tables is dynamic, so even if they follow a nomenclature rule, there could be 10, 1000 or more.
  • There are two static tables in the database.
  • Users are identified by a column called unique_id, which is the same in all tables. So, even if users are registered in two tables, I want to join them.

I have examined this question, but it only seems to get a list of the tables, not to join them all together.

Any ideas?

quantum mechanics: what is the state of the rule born in axiomatic QM?

While physicists have tried several times and have not been able to derive the Birth Rule (for example: https://arxiv.org/pdf/quant-ph/0409144.pdf). I was wondering what axiomatic quantum mechanics had to say about this. Is it fundamentally impossible to derive the birth Rule or is there hope?

Here is a great discussion link in the same spirit:
https://www.math.columbia.edu/~woit/wordpress/?p=10533&cpage=1

I suspect that Lubos Motl was something like the opinion of the measure that should be a separate fundamental axiom. If so, I suspect that it becomes a problem to show that there is no non-redundant axiom when the birth rule is included.
https://motls.blogspot.com/2018/09/woit-and-probability-in-quantum.html

dnd 5e – Is there a rule about taking damage while holding your breath in combat?

@ NathanS 'answer covers the choking rules that seem very applicable to this situation, but I wanted to cover if holding my breath is an effective strategy.

Your example of the golem

In your question, you declare:

The party is fighting some creature with immunity to poison, such as the golem

Looking at the golems with poison breath, that suggests that you are discussing the Iron Golem.

The Iron Golem Poisonous Breath (emphasis is mine):

The golem exhales poisonous gas in a 15-foot cone. Every creature in that area You must take a save shot of the Constitution of DC 19, receiving 45 (10d8) damage per poison in a failed save, or half damage in a successful one.

The effect works on every creature in the area. It does not say that it points to each creature that breathes, but only to each creature. A DM can always rule how they would like to, but RAW, the effect works against any creature. Poisonous gas does not necessarily have to be inhaled to work: it can enter by other means.

Effects of poison / gas in general

If the effect does not specify "creatures that can breathe," then it usually works either breathing or not.

As I said before, if a DM wants to decide that you need to breathe to be affected, it's totally fine.

Most importantly, the Basic Rules cover the different types of poison and the notes that holding your breath against the inhaled variety is not effective:

Inhaled. These poisons are powders or gases that take effect when inhaled. Blowing the dust or releasing the gas puts the creatures in a 5-foot cube to their effect. The resulting cloud dissipates immediately after. Holding your breath is ineffective against inhaled poisons, as they affect the nasal membranes, tear ducts and other parts of the body.

The other types of venom are contact, ingestion and lesions, none of which would hold your breath would be an effective way to avoid its effects.

The curious case of cloudkill

It gets a little twisted with things like cloudkill What states:

When a creature enters the spell area for the first time in a turn or begins its turn there, that creature must make a saving shot of the Constitution. The creature takes 5d8 of poison damage in a failed save, or half damage in a successful one. Creatures are affected even if they hold their breath or do not need to breathe.

This line suggests that other things may allow him to hold his breath and I'm really not sure why they had to say that. Given that, it is absolutely plausible that a DM governs in other cases that may hold his breath.

categories: category file rewrite rule to include category / subcategory?

I would like to have my category file (category.php) accessible through a URL structure such as:

mysite.com/mycategory/mysubcategory

For example, I have "health" as a category and "smoking" as a subcategory. Monitoring:

  • mysite.com/health
  • mysite.com/smoking
  • (and even) mysite.com/category/health/smoking

Everything works well.

But mysite.com/health/smoking You get a 404.

Is there anything in Settings-> Permanent links that fix this? Do I need to put a rewrite rule of some kind on functions.php?

Thank you.

How to calculate the final price when we have special price and rule price?

I am reading for the magento associate exam and I came across this question,
The product has a base price of $ 30 and a special price of $ 25, the phased price discount for this product is $ 20 for 5 products and a 25% discount catalog rule.
What is the final price

What is the application order of special price and catalog rule price? Are both being applied? my answer was 22.5 but the correct answer is $ 15

According to my research, the special price is used only if it is lower than the applied catalog price rule. So, are we going to choose a minimum when both situations are established?

For some reason, the price rules in my catalog don't work, I even re-indexed and emptied the cache so I couldn't test the scenarios.

Please explain.
Thank you,

What is a new update or a new rule on Facebook …?

Hello friends,

What is a new update or a new rule on Facebook …?

URL rewrite: the rewrite rule for loading production images makes no difference

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php (L)

# If images not found on development site, load from production 
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/(^/)*/.*$
RewriteRule ^(.*)$ https://www.example.com/$1 (QSA,L)

The problem here is that "If no images are found on the development site," the request has already been rewritten in index.php for the above RewriteRule (WordPress front controller), so your next block of rules does nothing.

NB: While you have not explicitly included the R (redirect) flag on the RewriteRule, this will implicitly activate an external (temporary) 302 redirection, just as if you had explicitly included R=302 in the directive. Explicitly including this flag is preferable to communicate your intention more clearly. In fact, you may want to change this to 301 so that the images are cached, thus avoiding an external redirection on each request.

the QSA the indicator is not required here, since it does not include a query string in the RewriteRule substitution.

Apart: your RewriteRule possibly matches also matches … matches all, not just images, is that intentional?

You could solve this either …

  1. preventing everyone Image URLs processed by the front controller. For example, add an additional condition to the WP front controller to exclude images:

    RewriteCond %{REQUEST_URI} !.(jpe?g|png|gif)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php (L)
    
  2. Or move your redirect to over WP front controller and verify the nonexistence of the requested file before redirecting it to its production server. It would also be more restrictive in regular expression and would only match the images (as mentioned above), if that is the intention. For example:

    RewriteRule ^index.php$ - (L)
    
    # If images not found on development site, load from production
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^wp-content/uploads/(^/)+/.+.(jpe?g|png|gif)$ https://www.example.com/$0 (R=302,L)
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php (L)
    

The additional condition is not required, since you can perform the URL comparison in RewriteRule model (more efficient). It is not necessary for the bar to escape in the character class (or anywhere else). And the QSA The flag is not necessary here (as mentioned above).

Note that the regular expression matches the URL paths of the form /wp-content/uploads//.jpg, where It can be any number of additional subdirectories. This is based on your regular expression.

bash: the Udev rule does not run on the usb insert, you must run the script in the background

I wrote a udev rule and placed it in /etc/udev/rules/90-wifi.rules

ACTION=="add", SUBSYSTEM=="usb", DRIVER=="usb", RUN+="sh /usr/local/bin/setup_wifi_wrapper.sh"

It should run on each inserted usb device.

You should start the script /usr/local/bin/setup_wifi_wrapper.sh

#!/bin/bash
/usr/local/bin/start_wifi.sh & disown

And that should start /usr/local/bin/start_wifi.sh

#!/bin/bash

sudo systemctl start hostapd
sudo ifup br0
sudo systemctl restart dnsmasq
touch /home/user/started

But no …
All scripts are executable and I can start them from the command line and do what they are supposed to do.
I tried to have them in different locations, started in the home folder and moved them to usr / local / bin. He made the envelope with rejection for background processes but still without results. Does anybody have an idea?

Thanks in advance