Join two lists according to False condition

I am new to MMA. I have a question of joining two lists according to a condition. Suppose I have two lists with same number of elements,


I want to join the two lists according to a condition: join each list’s element according to their positions in the list if they both are inequalities. If there is a False in l2, then ignore both elements of that position. For example,

  1. The first element of l1 is a>b, and the first element of l2 is c>d, then the first element of the new list will be {a>b,c>d}.
  2. The second element of l1 is x>y, but the second element of l2 is False. So we will ignore position number 2.
  3. The third element of l1 is m>n, and the third element of l2 is j>k, then the second element of the new list will be{m>n,j>k}.

Therefore, the new list will be {{a>b,c>d},{m>n,j>k}}.

Another example:


Then the new list I want will be {{j>k,m>m}}

Thank you in advance for your generous help!

google sheets – Print True or False in calculated column using ARRAYFORMULA

I’ve added a duplicate of your Sheet1 (called “Erik Help”), which contains the following formula in E1:

=ArrayFormula({"E"; IF(A2:A="",, IF((LOWER(TRIM(A2:A))="stackexchange")+(B2:B+C2:C+D2:D=0),TRUE,FALSE))})

The curly brackets { } create a literal array, meaning we can arrange the data between them below or to the right of each other.

First, the header is created, the text of which you can change within the formula as you like.

The colon means “begin the rest below.”

IF(A2:A="",, ): If a cell in A2:A is blank, the corresponding cell in E2:E will also be left blank/null.

IF( ,TRUE,FALSE): IF the condition in the first parameter is met for the current row, then return TRUE to the corresponding row in E2:E.

( ) + ( ): The condition is compound. The plus sign means OR here; so if either condition (or both) is met, then our designated TRUE will be returned. If neither is met, then FALSE will be returned.

(LOWER(TRIM(A2:A))="stackexchange") + (B2:B+C2:C+D2:D=0): The two conditions are that a lowercase version of A2:A without any extra spaces is exactly equal to "stackexchange". The second condition is that the value of Column B plus the value of Column C plus the value of Column D is equal to zero. Since FALSE carries an equivalent value of 0 (with TRUE carrying a value of non-zero), then the only way to arrive at 0 in adding the values of Columns B, C and D is if each is either FALSE or 0 or null.


In all cases within the formula, notice that TRUE and FALSE are not contained within quotation marks (i.e., "TRUE" and "FALSE"). That is because your post shows a return of Boolean values TRUE and FALSE, whereas "TRUE" and "FALSE" are seen as strings. And those are two different types that behave differently.

If it is a likely scenario that you may have something entered into Column A of a row but that there may be blanks in B:C, and that you want blanks not to be the same thing as FALSE, you’ll need one more condition and will need to use the following formula version:

=ArrayFormula({"E"; IF(A2:A="",, IF((LOWER(TRIM(A2:A))="stackexchange")+(LEN(B2:B&C2:C&D2:D)>=15),TRUE,FALSE))})

Here, the second parenthetical condition has been replaced with (LEN(B2:B&C2:C&D2:D)>=15). Since three entries of FALSE would be FALSEFALSEFALSE, this would then be the only combination of TRUE, FALSE and null (or minimal stray spaces) that would satisfy >=15.

google sheets – Needing to change a column to false when Data Validation is changed

I am using Google sheets and have a cell that has data validation and I am putting check boxes (I4:I) for people when items are received, they need to be changed to “False” when the Data Validation cell (C2) is changed.

I’m new at this, but this is what I have, but I am getting a syntax error on Line 5.

function onEdit(e){
if(e.range.getC2Notation() == ‘C2’ &&
e.range.getSheet().getName() == ‘Outbound Parts’

Any help would be appreciated.

linear algebra – Why is the probability of a false positive not 0 for Freivald’s Algorithm?

Freivald’s algorithm (see the wiki) is a randomized algorithm for verifying whether the product of two $n times n$-matrices $A$ and $B$ yields a given matrix $C$ (i.e. $AB = C$). The way this task is accomplished is to introduce a random vector $vec{v} in mathbb{R}^{n}$ and evaluate whether
$$A(Bv) = Cv$$
The claim is that if $AB neq C$, then $AB v = Cv$ with probability at most $1/2$, and they provide a justification. Their argument for why 1/2 works makes some sense to me. What I don’t understand is why this bound can’t be improved further by the following argument:

Claim: Suppose that $AB neq C$. Then for almost all choices of $v$ (i.e. with probability $1$), $AB v neq Cv$.

Proof of Claim: Note that $AB v = Cv$ if and only if $(AB-C)v =0$. Let $D = AB-C$. Then $ABv = Cv$ if and only if $v in ker(D)$. Since $AB neq C$, $D$ is not the $0$-matrix meaning that $dim(ker(D)) < n$. Hence, $ker(D)$ is a proper linear subspace of $mathbb{R}^{n}$ and therefore has measure $0$. Thus, for almost all choices of $v$, $D v neq 0$ meaning that $ABv neq Cv$ with probability $1$.


Hence, if $AB v = Cv$, then $AB = C$ with probability $1$. Shouldn’t this mean that the probability of failure in Freivald’s algorithm is $0$ instead of $2^{-k}$?


Owasp Zap: False positives in the PiiScan

I work a lot with OWASP Zap, and I am very satisfied. Nevertheless, I have the problem with all my scans that I always have false positives in the PiiScan area. Among other things, Googlemaps numbers, or product numbers are recognized as Visa card numbers.

I have not seen any way to prevent this, but I am looking for a way to secure the PiiScanns to get real results.

How can this be avoided within Owasp Zap?

Are there any settings to get a better PiiScann?

discrete mathematics – Find if the statement is true or false, and prove directly.

For all sets, A ∩ (B ⋃ C) = (A ∩ B) ⋃ (A ∩ C).

I am supposed to prove if this is true or not. I have tried X ∈ P(A ∩ B) iff X ⊆ A ∩ B iff X ⊆ A and X ⊆ B, but don’t know how else to progress. Forgive me if I am completely on the wrong path, first time taking this kind of proof class.

custom post types – Is there a way to use ‘publicly_queryable’ => false only on specific taxonomy term?

ok – so this isn’t what I wanted but it does the trick.
Adding a function to redirect when the user hits any term but one:

function my_page_template_redirect() {
    if( is_singular( 'custom-post-type' ) && !(has_term('term', 'custom-taxonomy')) ) {
        wp_redirect( home_url(), 301 );
add_action( 'template_redirect', 'my_page_template_redirect' );

Answer based on this one: Disable Single Post View for Specific Taxonomy on Custom Post Type