reverse proxy – Chaining multiple nginx error pages

I’m fighting a bit with nginx and try to get a “chain” of nginx error pages to work. Current state looks like this:

server {
    listen       443 ssl;
    server_name  ~^((?<repo>.*).)example.de$;

    ssl_certificate /etc/pki/tls/certs/cert.pem;
    ssl_certificate_key /etc/pki/tls/private/key.pem;
    client_max_body_size 100M;

    location / {
        proxy_pass http://backend_example/example/${repo}$request_uri;
        proxy_http_version 1.1;
        proxy_buffering off;
        proxy_connect_timeout 300;
        proxy_intercept_errors on;

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_redirect off;

        rewrite  ^/$  /index.html  permanent;
        error_page 404 /backend_404.html;
    }

    location /backend_404.html {
        proxy_pass http://backend_example/example/${repo}/404.html;
        proxy_intercept_errors on;

        error_page 404 /error.html;
    }

    location /error.html {
        ssi on;
        internal;
        root /usr/share/nginx/html;
    }
}

What’s working:

  • if the file 404.html is available on the backend it will be delivered as intended
  • if the 404.html is not available on the backend I get the standard 404 from nginx instead of the local custom error.html
  • if I replace error_page 404 /backend_404.html; with error_page 404 /error.html; the error.html location also works

What I want to achieve:

  • if 404.html exists on the backend, deliver it
  • if 404.html not exist, deliver a custom error page error.html instead of the default one

SQL Server – JOIN / Union Two tables, with NULL removed if possible (similar to chaining like pandas)

I wonder how to do an operation that I think is most like chaining if you are familiar with pandas.

Basically, what I want to do seems to be like a UNION, in a sense, "reducing" records to remove NULL values ​​(for example, ID and DATE are identical). I've tried a UNION, FULL JOIN, and SELF JOIN, but none of them seem to achieve the desired result. It seems MSSQL's MERGE is maybe what I'm looking for? However, it appears that this operation is for table creation.

Basically, my ultimate goal is to create a view from the result. All I really need is the SELECT statement, which I can use to further manipulate.

Let's say I have the following tables to better illustrate the problem:

+----+--------+-------------+---------------+
| ID | Date   | FloorRating | CeilingRating |
+----+--------+-------------+---------------+
| 1A | 1/1/18 | 9           | 6             |
+----+--------+-------------+---------------+
| 1A | 1/1/19 | 9           | 7             |
+----+--------+-------------+---------------+
| 3D | 2/2/19 | 5           | 8             |
+----+--------+-------------+---------------+
| 3D | 3/3/19 | 4           | 9             |
+----+--------+-------------+---------------+


+----+--------+--------------+-----------+
| ID | Date   | WindowRating | FanRating |
+----+--------+--------------+-----------+
| 1A | 1/1/18 | 4            | 7         |
+----+--------+--------------+-----------+
| 1A | 2/2/19 | 3            | 7         |
+----+--------+--------------+-----------+
| 3D | 2/2/19 | 9            | 4         |
+----+--------+--------------+-----------+
| 3D | 8/8/19 | 1            | 3         |
+----+--------+--------------+-----------+

In the end, I want to do something that takes into account all possible ID-date combinations and populates field values ​​where possible:

+----+--------+-------------+---------------+--------------+-----------+
| ID | Date   | FloorRating | CeilingRating | WindowRating | FanRating |
+----+--------+-------------+---------------+--------------+-----------+
| 1A | 1/1/18 | 9           | 6             | 4            | 7         |
+----+--------+-------------+---------------+--------------+-----------+
| 1A | 1/1/19 | 9           | 7             |              |           |
+----+--------+-------------+---------------+--------------+-----------+
| 1A | 2/2/19 |             |               | 3            | 7         |
+----+--------+-------------+---------------+--------------+-----------+
| 3D | 2/2/19 | 5           | 8             | 9            | 4         |
+----+--------+-------------+---------------+--------------+-----------+
| 3D | 3/3/19 | 4           | 9             |              |           |
+----+--------+-------------+---------------+--------------+-----------+
| 3D | 8/8/19 |             |               | 1            | 3         |
+----+--------+-------------+---------------+--------------+-----------+

I appreciate any help or tips you can give!

Microsoft Excel – I need to update my code so the chaining returned in column C ends when the data in column "A" does not contain anything

Stack Exchange network

The Stack Exchange network consists of 176 Q&A communities, including Stack Overflow, the largest and most trusted online community where developers can learn, share their knowledge, and build their careers.

Visit Stack Exchange

Puppet Class Lookup by Hiera with automated chaining

I use Hiera with doll and have a doll role / profile setting where 1 role contains multiple profiles (as shown below). My build role includes hard-coded profiles with a series of chains at the bottom.

Class role :: build {

include profile :: profile1
include profile :: profile2
include profile :: profile3

Class (& # 39; profile :: profile1 & # 39;)
-> class (& # 39; profile :: profile2 & # 39;)
-> class (& # 39; profile :: profile3 & # 39;)
}}

I want to convert this role (build.pp) to find class names using Puppet Hiera search and add them to the Puppet catalog. My proposed role would look something like this:

Class role :: build {

Lookup (& # 39; classes & # 39 ;, array (string), & # 39; unique & # 39;). include

Class (& # 39; profile :: profile1 & # 39;)
-> class (& # 39; profile :: profile2 & # 39;)
-> class (& # 39; profile :: profile3 & # 39;)
}}

The search functions and classes are added to the catalog. However, I'm not sure how I can automate the chaining mechanism to make sure they run in the correct order.

The reason for this change is that I intend to have a large number of similar roles on board and to be able to control these roles through a puppet fact, and this is an extremely powerful mechanism.

The chains are important so that my Windows build joins the domain and runs a series of build-related profiles before running the additional application profiles.

Any help or advice would be greatly appreciated.

Macbook 16 "does not extend the desktop with display port chaining

I have a new Macbook 16 "with 10.15.3 OSx and an AMD Radeon Pro 5500M 4 GB for the graphics card and cannot expand the desktop with just a concatenation of the display port.

The monitors I want to daisy chain are a Dell P2719HC 27-inch (1920 x 1080) and a Dell U2415 24-inch (1920 x 1200). The 27 "is a new monitor that I got with the laptop, but the 24" that I have had for several years and that was used in a linked model with my Lenovo laptop that I am moving away from.

I have tried the following configurations to no avail and the best I have been able to achieve is that the 24 "reflects the 27" but never extends to my own desktop.

Chained

MBP USB-C -> 27 "USB-C (MST activated) -> DP -> 24" DP (DP 1.2 activated) = "mirror"

MBP USB-C -> 27 "DP (MST activated) -> DP -> 24" DP (DP 1.2 activated) = "mirror"

MBP USB-C -> 27 "DP (MST activated) -> DP -> 24" DP (DP 1.2 deactivated) = "mirror"

MBP USB-C -> 24 "DP (DP 1.2 activated) -> DP -> 27" DP (MST activated) = "Unsynchronized error at 27"

MBP USB-C -> 24 "DP (DP 1.2 activated) -> DP -> 27" DP (MST deactivated) = "Unsynchronized error"

Unleashed (Use two cables to drive them at the same time)

MBP USB-C -> 27 "USB-C (MST activated) =" Extended "

MBP USB-C -> 24 "DP (DP 1.2 activated) =" Extended "

What causes the chaining to only mirror?

logic – representation of the chaining on type level

I want to learn more about chained programming by creating a simple little language based on the stack and following the chained paradigm.

Unfortunately, I have not found many resources related to chained languages ​​and their implementation. Excuse me in advance for my possible naivety.

I therefore defined my language as a simple sequence of concatenations of functions represented in the AST as a list:

data Operation
    = Concat (Operation)
    | Quotation Operation
    | Var String
    | Lit Literal
    | LitOp LiteralOperation

data Literal
    = Int Int
    | Float Float

data LiteralOperation
    = Add | Sub | Mul | Div

The following program, 4 2 swap dup * + (corresponding to 2 * 2 + 4) gives the following AST after analysis:

Concat (Lit (Int 4), Lit (Int 2), Var "swap", Var "dup", LitOp Mul, LitOp Add)

Now I have to derive and check the types.

I wrote this type system:

data Type
    = TBasic BasicType   -- 'Int' or 'Float'
    | TVar String        -- Variable type
    | TQuoteE String     -- Empty stack, noted 'A'
    | TQuote String Type -- Non empty stack, noted 'A t'
    | TConc Type Type    -- A type for the concatenation
    | TFun Type Type     -- The type of functions

This is where my question comes into play, because I do not know which type I should derive from this expression. The resulting type is obvious Intbut I do not know how to actually check this program completely on type level.

As you can see above, I had one at the beginning TConc Type that represents the concatenation in the same way as the TFun type represents a function because the chaining sequence at the end forms a unique function.

Another option that I have not yet explored is to apply the function composition inference rule to every element of that expression sequence. I do not know how it would work with the stack-based.

The question is: how do we do that? Which algorithm and which type-level approach should be preferred?

dnd 5e – Chaining Dissonant Whispers via War Caster feat

This does not make the chain you are looking for.

While the movement of Dissonant Whispers provokes occasional attacks and War Caster allows Dissonant Whispers to be cast instead of a casual attack, all of this is limited by this target Action Economics:

If memory fails, 3d6 will suffer mental damage and must immediately use his reaction when available to move as far as its speed allows you.

A second spell on the same target deals damage as usual, but the target has already used its response (to move from the first dissonant whisper), so the second has nothing that could be forcibly converted into motion, and thus its movement does not affect the first dissonant whisper at all.