## cancellations – Cancelling flight booked by travel agent

My wife and I booked an international trip through a travel agency, with the flight on United/Lufthansa. Due to Covid, we have pushed our travel to July 2022. The problem is that United is currently requiring rebooked trips to be taken by end of March 2022.

So, we asked our travel agent if we could just use the United credit for other domestic travel we have planned. She said we can only use that credit to travel to places that the agency books trips for, which does not include any domestic locations. I have the confirmation number for our flights and when I enter the number on United’s website I have the option to cancel/change the flight. Is there anything preventing me from skirting the agency and canceling the flights myself? Or since the flight was booked by the agency, am I stuck with their rules?

## Cancelling a term by convolution

I am trying to cancel one term within a function by convolution.

``````y[n] = x[n] + 2*x[n-N]

y[n] * h[n] = x[n]
``````

how can I find h[n] such that convolution with h[n] cancels the second term of y[n] but leaves the first?

Thank you

## audio – mixer_paths.xml, scenario for noise cancelling headset mic

I am using an Android mod (LineageOs 17.1) for my Note 4 (N910F), and I am investigating the `mixer_paths.xml`.
I can make calls with simple bluetooth headset, but if I use my big Sennheiser noise cancelling headphones, people hardly hear me, it’s like I speak from “far away”.

Any idea what scenario should I edit in the mixer_paths.xml file to get the mic to work properly?

Thanks for you insight.

mixer_paths.xml:

https://pastebin.com/0fHsWCgL

## postgresql 10 – Cancelling an upgrade/migration from Postgre 10 to 12

I’m using these command to upgrade, it runs well until 9GB it became really slow:

``````# sudo pg_dropcluster 12 main --stop
Restarting old cluster with restricted connections...
Notice: extra pg_ctl/postgres options given, bypassing systemctl for start operation
Creating new PostgreSQL cluster 12/main ...
/usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/main --auth-local peer --auth-host md5 --encoding UTF8 --lc-collate en_CA.UTF-8 --lc-ctype en_CA.UTF-8
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locales
COLLATE:  en_CA.UTF-8
CTYPE:    en_CA.UTF-8
MESSAGES: C.UTF-8
MONETARY: C.UTF-8
NUMERIC:  C.UTF-8
TIME:     C.UTF-8
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/12/main ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Asia/Jakarta
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

pg_ctlcluster 12 main start

Ver Cluster Port Status Owner    Data directory              Log file
12  main    5434 down   postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log

Starting new cluster...
Notice: extra pg_ctl/postgres options given, bypassing systemctl for start operation
Roles, databases, schemas, ACLs...
set_config
------------

(1 row)

set_config
------------

(1 row)

set_config
------------

(1 row)

set_config
------------

(1 row)

Fixing hardcoded library paths for stored procedures...
Analyzing database postgres...
Fixing hardcoded library paths for stored procedures...
Analyzing database template1...
Fixing hardcoded library paths for stored procedures...
``````

The watch:

``````Every 2.0s: df -t ext4 -h ; du -s /var/lib/postgresql/10 /var/lib/postgresql/12/                                    data: Fri Jan  1 02:21:03 2021

Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        56G   32G   22G  60% /
/dev/vdb1        98G   73G   21G  78% /mnt/vdb1
11376348        /var/lib/postgresql/10
9466976 /var/lib/postgresql/12/
``````
``````# ps -e -o pcpu,pmem,rss,comm,args --sort=pcpu | grep postgres
0.0  0.0  3404 postgres        postgres: 10/main: logger process
0.0  0.5 23684 postgres        postgres: 10/main: checkpointer process
0.0  0.2 12044 postgres        postgres: 10/main: writer process
0.0  0.5 20260 postgres        postgres: 10/main: wal writer process
0.0  0.1  5608 postgres        postgres: 10/main: autovacuum launcher process
0.0  0.0  3812 postgres        postgres: 10/main: stats collector process
0.0  0.0  4004 postgres        postgres: 10/main: bgworker: logical replication launcher
0.0  0.5 23976 postgres        /usr/lib/postgresql/12/bin/postgres -D /var/lib/postgresql/12/main -c config_file=/etc/postgresql/12/main/postgresql.conf -c hba_file=/tmp/pg_hba.LVD6EB.conf
0.0  0.3 12348 postgres        postgres: 12/main: autovacuum launcher
0.0  0.1  6732 postgres        postgres: 12/main: logical replication launcher
0.0  0.0   672 grep            grep --color=auto postgres
0.1  1.3 52672 postgres        /usr/lib/postgresql/10/bin/postgres -D /var/lib/postgresql/10/main -c config_file=/etc/postgresql/10/main/postgresql.conf -c hba_file=/tmp/pg_hba.LVD6EB.conf
0.1  0.1  5716 postgres        postgres: 12/main: stats collector
0.2  0.0  3848 watch           watch -dc df -t ext4 -h ; du -s /var/lib/postgresql/10 /var/lib/postgresql/12/
0.4  3.5 144416 postgres       postgres: 12/main: checkpointer
1.1  3.5 141528 postgres       postgres: 12/main: background writer
2.2  0.2  8392 pg_restore      /usr/lib/postgresql/12/bin/pg_restore -h /var/run/postgresql -p 5434 --data-only -d geo --disable-triggers --no-data-for-failed-tables
2.3  0.2  9884 postgres        postgres: 12/main: walwriter
11.4  0.3 14160 pg_dump         /usr/lib/postgresql/12/bin/pg_dump -h /var/run/postgresql -p 5432 -Fc --quote-all-identifiers geo
19.1 27.0 1089624 postgres      postgres: 10/main: postgres geo (local) COPY
55.9  3.8 155360 postgres       postgres: 12/main: postgres geo (local) COPY
``````

The question is.. if I cancel the upgrade (Ctrl+C) since it’s already take too much time unlike when I upgrade postgresql 9.6 to 10 that only less than an hour with similar dataset (and not sure when it will end, there’s 2 hours of data loss/not inserted because of upgrading), what would be happened? (I have 1GB `xz`-ed backup from 2 hours ago)

EDIT

apparently it’s migrating on another folder too (I put some other tablespace on different directory back then because of running out of main partition space), so it’s progressing well and doesn’t stuck:

``````# du -s /mnt/vdb1/pgdata2/*/
41035516        /mnt/vdb1/pgdata2/PG_10_201707211/
26548836        /mnt/vdb1/pgdata2/PG_12_201909212/
``````

## plugins – Fatal error on some pages after cancelling WPSTAGING cloning process

Yesterday I was cloning my WordPress website with WPSTAGING (https://de.wordpress.org/plugins/wp-staging/). Accidentally during the cloning process I closed the browser tab within which the cloning process took place, so I did NOT properly clicked the “CANCEL” button.

Today I have noticed the following problems:

• When I click on some pages within my website I get the following error: `Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0` It is a white page with just this error message.

• When I try to re-install WordPress I get the following message:
`Another Update is currently in progress.`

• When I try to restore a backup with Updraft Plus, after clicking the restore button I immediately get the message that the restore process got cancelled. Also simply downloading a backup file from within the Updraft admin area is not working.

I don’t know what to do, I am desperate. Could you please help me how I can fix this problem that most probably arose from cancelling the WPSTAGING cloning process?

## air travel – Why is Lufthansa cancelling flights to India?

Just a guess, diminished demand due to COVID 19.

Almost all governments in the world have asked their citizens to avoid all travel, unless it is essential.
Add to that the situation in India, and in Europe, and most people will not take the risk traveling.
That will result in a huge drop in required capacity and many airlines have cancelled flights, some cancel them a few days before they are due, others do it well in advance.

Lufthansa clearly does not expect demand till the 20th of October, not enough to warrant the flights going. Likely they do not expect enough demand for a longer period but have not yet officially cancelled the flights or just not published the fact.

I am not sure but their might also be restrictions by India for airlines. I have not seen the actual rules but have heard that not all airlines are allowed to land. Any case, only a few planes will be enough for returning Indian citizens.

## This is a considerably hard analytical problem

The question you linked, although already quite hard, is easier because it can be computed as the probability of a dice being in one set, and not in the other. In your question, this is done in a one-to-one basis, as you mentioned, and this is a considerably hard problem.

## Doesn’t matter – do it the easy way

Unless you need the analytical expression for something, I recommend going with Monte Carlo:
You basically run a random simulation a bunch of times, and then see the distribution of that. This code for MATLAB does it – I am sure someone can translate it to Python or something that doesn’t need to be paid, but I’m more familiar with MATLAB haha

``````N_it = 10^5;

N_action = 6;
N_danger = 5;

bins = 1:6;

for i = 1:N_it

Action_Dice = randi((1 6), N_action, 1);
Danger_Dice = randi((1 6), N_danger, 1);

Action_Dice_Count = hist(Action_Dice, bins);
Danger_Dice_Count = hist(Danger_Dice, bins);

Result_Count = Action_Dice_Count - Danger_Dice_Count;

Result = find(Result_Count > 0, 1, 'last');

if(Result)
Result_Save(i) = Result;
else
Result_Save(i) = 0;
end
end
``````

So, what this code does is basically: roll a set number of action dice and danger dice, count how many of each dice you got, subtract the number of rolled danger dice from the number of rolled action dice, then find the last value which is non-zero (i.e., the highest Action Dice remaining) and finally, if no such action dice exists, it sets the result to 0.

As an example, for 6 Action Dice and 5 Danger Dice, this is what it looks like:

Why does it look like this? In the example, I used 6 action dice and 5 danger dice. The probability that there is no remaining action dice is, evidently, zero, since we will always have one remaining dice. But not only that, there is a high probability on 6, why? Because every time there is a 6 remaining, that 6 will be chosen. This is actually an easier analytical problem. Let $$X$$ denote the number of sixes appearing in the Action Dice pool, and $$Y$$ be the number of sixes appearing in the Danger Dice pool. We are interested in $$P(X > Y)$$. But what is nice in this case is that we know the exact distribution of both $$X$$ and $$Y$$, which are binomial distributions with the number of trials being equal to the number of dice in the pool, and probability in each trial equal to 1/6.

We can then compute $$P(X – Y)$$, which can be done by the convolution of $$P(X)$$ and $$P(-Y)$$, and finally compute $$P(X – Y > 0)$$. I won’t bother with all this computation here, but if you do it, you will find out that the probability is 0.383367984110654. The probability found by code was 0.386, so, close enough, the code seems to make sense.

Note that this same strategy of analytically computing the other probabilities will not help for other values than 6, since, not only you need that, for example, the number of fives in the Action pool should be larger than the number in the Danger pool, you also need that the number of sixes in the action pool is smaller than or equal to the number in the danger pool. For 5 it is already a bunch of complicated conditional probabilities, and it will get harder and harder for lower numbers, since each time you need to consider the numbers above it.

## Validating the Code

I can only think about one trivial case, so we can check whether the code makes sense for that case at least. Consider only 1 Action Dice and 1 Danger Dice. In this case, the probability that they are equal is 1/6, and in that case the result is 0 (i.e., no action dice remaining). Otherwise, we have an equal probability for any dice, which is 5/36.

The values resulting from the code are, in fact, approximately 1/6 for 0 and 5/36 for the remaining.