set theory – Any arbitrary collection of elements of a set is a set. True or False

I was reading Jech’s Set Theory book and there I came across the definition of a subset.
A set $U$ is a subset of $X$, if $forall z( z in U implies z in X)$. I wanted to ask the above question, if we take any arbitrary collection of elements in a given set, can we call that collection a set?
Later on, it is also written $X times Y subset PP(X cup Y)$, so $X times Y$ is a set. So I am also wondering if it is enough to show that a collection is contained in a set for it to be a set.

How to set variable in power automate (escalation, timeout scenario)

How can I set variable where are two approvals in flow?
First approval has timeout parametr and after timeout second approval start. How to set variable with two approval comments like:

if(first approval result null then set variable comments aprroval second) or if(first approval result is not null set variable comments first approval)

I try use union(body response first approval, body response second approval) in foreach but without success.

Something like this:

union(null,body response second approval) or union(body response first approval,null)

algorithms – Need help understanding Knuth’s proof that: The set of all pure words is well-ordered by the relation >

In the paper linked below by Knuth and Bendix, theorem 1:

The set of all pure words is well-ordered by the relation ‘$>$

has a proof that I can’t seem to follow despite staring at it all day. I can’t even decipher what the notation is trying to represent.

So, we have four fixed sequences:

  • An infinite sequence of variables $v_1, v_2, v_3, …$ etc. (not relevant for Theorem 1)
  • A finite sequence of operators $f_1, f_2, f_3, …, f_n$
  • A finite sequence of degrees $d_1, d_2, d_3, .., d_n$
    • (i.e. degree of $f_4 = d_4$)
  • and a finite sequence of weights $w_1, w_2, w_3, …, w_n$
    • (i.e. weight of $f_4 = w_4$)

A word is then defined inductively as either a variable alone or an operator followed by an appropriate number of other words depending on the degree of said operator.

A ‘pure word’ is a word with no variables and the weight of a pure word, $alpha$ is defined as follows:

  • $w(alpha) = sum_j w_jn(f_j , alpha)$ where $n(f_j, alpha)$ is the number of occurrences of $f_j$ in the word $alpha$

Finally the relation $>$ that orders all pure words that is proved to be well-ordered is defined as:

$ alpha > beta $ if and only if:

    1. $w(alpha) > w(beta) $
    • (I’m assuming the ‘$>$‘ here is strict integer inequality and not the same ‘$>$‘ that is being defined.)
    1. $w(alpha) = w(beta)$ and $alpha = f_jalpha_1 … alpha_{dj}$, $beta = f_kbeta_1 … beta_{dk}$, and either:
    • 2a) $ j > k$; or
    • 2b) $j = k$ and $alpha_1 = beta_1,…, alpha_{t-1} = beta_{t-1}, alpha_t > beta_t$, for some $t, 1 leq t leq d_j$

Finally on page 266, for the proof that $>$ is well-ordered the exposition states:

Now let $alpha$ be a pure word with $n_j$ symbols of degree $d_j$. It is easy to prove inductively that:

$n_0 + n_1 + n_2 + … = 1 + 0.n_0 + 1.n_1 + 2.n_2 + …,$

i.e. $n_0 = 1 + n_2 + 2n_3 + …$

I don’t know whether it really is ‘easy’ to prove the above because I don’t really know what the above is.

I’m fairly sure symbols are just operators in this context of pure words but if $n_0, n_1,$ etc. are symbols then how are they being summed? Does $n_0$ in the above actually represent $w(n_0)$. That doesn’t seem to provide any clarity as to what is going on with the proof.

I’ve reread the first four pages of the paper multiple times and nothing seems to be getting any clearer:

https://www.cs.tufts.edu/~nr/cs257/archive/don-knuth/knuth-bendix.pdf

Any insight would be appreciated.

google pixel – How to set default Alarm app when Open by Default menu is disabled?

So, I’m trying to change my default alarm in Google Assistant (Pixel 5) to another alarm clock app I have installed (Alarm Clock Beyond). When I tell the assistant “Wake me up in 5 minutes”, it just uses Google’s native clock app. The default menu for the clock app is disabled, and I haven’t been able to make any progress on this.

enter image description here

How to use arrayformula to find and get data from only a certain, dynamic set of columns in another Sheet?

I saw a proposed solution here, but it didn’t work for me.
How to use arrayformula to find and get data from only a certain, dynamic set of columns?

Using formula:

=SUM(INDIRECT(ADDRESS(4, MATCH("BB", 3:3, 0), 4)&":"&
   SUBSTITUTE(ADDRESS(4, MATCH("BB", 3:3, 0), 4), "4", "")))

I am trying to do something similar but it’s not working (“Formula parse error”)

Differences from the original (above):

  • I’m trying to do an average, not a sum.
  • The data to compare and average are both on another Sheet.

I want to be able to average a column of data below a header from another Sheet,

if the header on that Sheet (‘Vends’!) matches the cell to the left on the current Sheet (‘AGG-Vends’!).

Eg. If the header on row 2 of Sheet Vends! matches A2 on Sheet ‘AGG-Vends’!,

I want to average all the values below that header (row 3 and so on,

with an indeterminate number of values to be added).

My headers on Vends! Sheet are on row 2, so I modified the row number from which to start searching, to row 3.

=AVERAGE(INDIRECT(
         ADDRESS(3, MATCH(A2, Vends!A2:2, 0), 4, TRUE, Vends!)&":"&
         SUBSTITUTE(
         ADDRESS(3, MATCH(A2, Vends!A2:2, 0), 4, TRUE, Vends!),
         "3", "")))

My formula is in B2 on “AGG-Vends’! Sheet (highlighted Blue).
sample Sheet

Composer require drupal/social_auth_google – Your requirements could not be resolved to an installable set of packages

Previously I got an error with the command

composer require "drupal/social_auth_google:^2.0"

So I tried;

composer require "drupal/social_api:2.x-dev" "drupal/social_auth:2.x-dev" "drupal/social_auth_google:2.x-dev" 

But now composer throws up faults no matter what I do. I tried removing all the “social” entries from composer.json but here are the errors I get instead;

    Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires drupal/title_field_for_manage_display ^1.0, found drupal/title_field_for_manage_display(1.0.0, ..., 1.12.0) but the package is fixed to 2.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
  Problem 2
    - drupal/social_auth_google(2.0.0, ..., 2.1.0) require drupal/social_auth ^2.0 -> drupal/social_auth is fixed to 2.x-dev (lock file version) by a partial update but that version is rejected by your minimum-stability. Make sure you list it as an argument for the update command.
    - Root composer.json requires drupal/social_auth_google ^2.0 -> satisfiable by drupal/social_auth_google(2.0.0, 2.1.0).


Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Here’s my composer.json ;

{
"name": "drupal/recommended-project",
"description": "Project template for Drupal 9 projects with a relocated document root",
"type": "project",
"license": "GPL-2.0-or-later",
"homepage": "https://www.drupal.org/project/drupal",
"support": {
    "docs": "https://www.drupal.org/docs/user_guide/en/index.html",
    "chat": "https://www.drupal.org/node/314178"
},
"repositories": (
    {
        "type": "composer",
        "url": "https://packages.drupal.org/8"
    }
),
"require": {
    "composer/installers": "^1.9",
    "drupal/core-composer-scaffold": "^9.1",
    "drupal/core-project-message": "^9.1",
    "drupal/core-recommended": "^9.1",
    "drupal/title_field_for_manage_display": "^1.0"
},
"conflict": {
    "drupal/drupal": "*"
},
"minimum-stability": "stable",
"prefer-stable": true,
"config": {
    "sort-packages": true
},
"extra": {
    "drupal-scaffold": {
        "locations": {
            "web-root": "web/"
        }
    },
    "installer-paths": {
        "web/core": (
            "type:drupal-core"
        ),
        "web/libraries/{$name}": (
            "type:drupal-library"
        ),
        "web/modules/contrib/{$name}": (
            "type:drupal-module"
        ),
        "web/profiles/contrib/{$name}": (
            "type:drupal-profile"
        ),
        "web/themes/contrib/{$name}": (
            "type:drupal-theme"
        ),
        "drush/Commands/contrib/{$name}": (
            "type:drupal-drush"
        ),
        "web/modules/custom/{$name}": (
            "type:drupal-custom-module"
        ),
        "web/profiles/custom/{$name}": (
            "type:drupal-custom-profile"
        ),
        "web/themes/custom/{$name}": (
            "type:drupal-custom-theme"
        )
    },
    "drupal-core-project-message": {
        "include-keys": (
            "homepage",
            "support"
        ),
        "post-create-project-cmd-message": (
            "<bg=blue;fg=white>                                                         </>",
            "<bg=blue;fg=white>  Congratulations, you’ve installed the Drupal codebase  </>",
            "<bg=blue;fg=white>  from the drupal/recommended-project template!          </>",
            "<bg=blue;fg=white>                                                         </>",
            "",
            "<bg=yellow;fg=black>Next steps</>:",
            "  * Install the site: https://www.drupal.org/docs/8/install",
            "  * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
            "  * Get support: https://www.drupal.org/support",
            "  * Get involved with the Drupal community:",
            "      https://www.drupal.org/getting-involved",
            "  * Remove the plugin that prints this message:",
            "      composer remove drupal/core-project-message"
        )
    }
}

}

How can I fix composer?

unity – How can I set up a 3D camera for a top-down game like Enter the Gungeon?

DodgeRollGames, the developers of Enter the Gungeon, tweeted that the game was in fact made in 3D

Screenshot of 3D map from tweet

They tried to explain how they set their camera in this reddit post.
Basically what they said was :

so the walls are tilted 45 degrees toward the camera, and the floors are tilted 45 degrees away from the camera, meaning that each should experience sqrt(2) distortion because of the additional length along the z-axis. However, the vertical (y-axis) floor length shouldn’t be perceptually changed.

The camera is not tilted at all.

Camera: 0 degree tilt.

Walls: +45 degrees tilt.

Floor: -45 degrees tilt.

My question is : What do they mean by “However, the vertical (y-axis) floor length shouldn’t be perceptually changed”. If I tilt the walls and floors by 45 degrees and -45 degrees as said, the sqrt(2) distorted walls (the walls have Z depth and are perpendicular to the ground) line up nicely, but the ground gets distorted (obviously). So I distort the ground tiles by sqrt(2) but this essentially stretches the ground by 40% so every vertical movement now has to be increased by 40%.

Can somebody explain what’s going on? Any help would be highly appreciated.

unity – How can I set perspective camera in portrait to fit screen sizes

I want to fit a perspective camera in different mobile portrait resolutions to see always the same objects in screen.

Doing a research about my problem I have found this post Scale camera to fit screen size unity that have a similar problem than mine, but he ask for an ortographic camera also horizontal.

My problem is the same but in perspective and vertical, I have tryed to adapt the solution code to my project but I don’t know why isn’t working, can someone explain to me the code or helpme to understand the maths behind them so I can figure how to do it?

My code for vertical

public float VerticalFoV = 60.0f;

// ...


void Update() {
   float halfHeight = Mathf.Tan(0.5f * VerticalFoV * Mathf.Deg2Rad);

   float halfWidth = halfHeight * Screen.width/ Screen.height;

   float horizontalFoV = 2.0f * Mathf.Atan(halfWidth) * Mathf.Rad2Deg;

   Camera.main.fieldOfView = horizontalFoV;
}

Sample code for horizontal

public float horizontalFoV = 90.0f;

// ...

void Update() {
   float halfWidth = Mathf.Tan(0.5f * horizontalFoV * Mathf.Deg2Rad);

   float halfHeight = halfWidth * Screen.height / Screen.width;

   float verticalFoV = 2.0f * Mathf.Atan(halfHeight) * Mathf.Rad2Deg;

   camera.fieldOfView = verticalFoV;
}

orientação a objetos – Eu fiz uma calculadora com o uso de classe em php, porém ao utilizar o get e set mágicos obtive erros

Como no caso, faria para retirar o erro dado?

Notice: Undefined variable: n1 in
C:workspaceXAMPPhtdocslista_1_phpindex.php on line 70 4 Notice:
Undefined variable: n2 in
C:workspaceXAMPPhtdocslista_1_phpindex.php on line 72

Fatal error: Uncaught Error: Call to undefined function somar() in
C:workspaceXAMPPhtdocslista_1_phpindex.php:75 Stack trace: #0
{main} thrown in C:workspaceXAMPPhtdocslista_1_phpindex.php on
line 75

Tentei as seguintes coisas:
Antes, sem as classes, estava funcionando. Porém com o uso de POO e get/set acabou dando vários erros de Undefined Variable ou erro de chamada. O enunciado dizia: Crie
uma
classe
calculadora
com
dois
atributos
($n1
e
$n2)
e
quatro
métodos
(somar,
subtrair,
dividir,
multiplicar)
que
execute
essas
operações
e
exiba
o
resultado
no
html
(echo);
E
instancie
um
objeto
do
tipo
calculadora
e
execute
todos
os
métodos
criados.

Porém obtive muitos erros fazendo desta forma, sendo que comparei com exemplos na internet e parecia estar correto. Acredito, com o que tentei sobre o problema, o erro está nesse seguinte trecho:

`

$calcular = new Calculadora();
$calcular-> $n1 = $_POST('v1');
$calcular-> $n2 = $_POST('v2');

`
E na chamada do formulário:

`

 <form method="post" action="<?php echo $_SERVER('PHP_SELF'); ?>">
                <input type="text" name="v1" placeholder="Valor 1" />
                <select name="operacao">
                    <option value="soma">+</option>
                    <option value="subtrai">-</option>
                    <option value="multiplica">*</option>
                    <option value="divide">/</option>
                </select>
                <input type="text" name="v2" placeholder="Valor 2" />
                <input type="submit" name="doCalc" value="Calcular" />
     </form>

Envio do código completo para análise:

<?php
   # Calculadora
   class Calculadora {
      private $n1;
      private $n2;
      # set e get mágicos
      public function __set ($name,$value){
        $this->$name = $value;
    }
    public function __get ($name){
        return $this->$name;
    }
    
      # Função Calcular
    public function somar() {

        if ($_POST('operacao') == "soma") {

            $resultado = $n1 + $n2;

            return $resultado;

        } 
      
    }
    public function subtrai() {
        if ($_POST('operacao') == "subtrai") {
                  $resultado = $n1 - $n2;
                  return $resultado;
        } 
    }     
    public function multiplica() {

       if ($_POST('operacao') == 'multiplica') {
                $resultado = $n1 * $n2;
                return $resultado;
      }
    }
    public function dividir() {
        if ($_POST('operacao') == 'divide') {
                $resultado = $n1/ $n2;
                return $resultado;
        }
     }

}

$calcular = new Calculadora();
$calcular-> $n1 = $_POST('v1');
$calcular-> $n2 = $_POST('v2');

echo "<h3>";
echo $calcular.somar();
echo "<h3/>";

echo "<h3>";
echo $calcular.subtrai();
echo "<h3/>";

echo "<h3>";
echo $calcular.multiplica();
echo "<h3/>";

echo "<h3>";
echo $calcular.dividir();
echo "<h3/>";


?>
    

`

real analysis – Do we have full control the oscillation of a function by modifying it on a small set?

Definitions and some motivation:

Let $mathcal B$ be the set of bounded measurable functions from $(0, 1)$ to $mathbb R$. Denote by $mathcal N$ the set of measurable subsets of $(0, 1)$ with Lebesgue measure $0$.

Given a function $f in mathcal B$, define the function $mathcal Of$ by

$mathcal Of(x) := inf_{N in mathcal N} lim_{delta to 0} sup_{y, z in B_delta (x) setminus N} |f(y) – f(z)|$.

Thanks to Lusin’s theorem, we know that we can modify $f$ on an arbitrarily small set and get a continuous function, and so we force the oscillation to be $0$ everywhere. But can we force it to be whatever we want?

Question:

Does there exist, for any $f, g in mathcal B$ and $epsilon, varepsilon > 0$, a function $f’ in mathcal B$ such that the following conditions are satisfied?

i) $f = f’$ everywhere except for a set of measure at most $epsilon$.

ii) $Of’ = Og$ everywhere.

iii) $int_{(0, 1)} |f’ – f’| dmu < int_{(0, 1)} |Of – Og| dmu + epsilon$

Note: All functions are genuine functions and not equivalence classes modulo null sets of such.