magento2 – Is it safe to manually remove entries on the db_schema_whitelist.json file?

I am wondering if it is safe to manually remove entries on the db_schema_whitelist.json file. I created a table called customer_address_relationshipusing the declarative schema approach and then I generated the db_schema_whitelist.json first and ran the php bin/magento setup:upgrade command. The generated db_schema_whitelist.json file had the following entries:

{
    "customer_address_relationship": {
        "column": {
            "entity_id": true,
            "customer_id": true,
            "address_id": true
        },
        "constraint": {
            "PRIMARY": true,
            "CSTR_ADDR_RELATIONSHIP_CSTR_ID_CSTR_ENTT_ENTT_ID": true,
            "CSTR_ADDR_RELATIONSHIP_ADDR_ID_CSTR_ADDR_ENTT_ENTT_ID": true
        }
    }
}

I then later decided to change my approach to the problem at hand and had to drop the customer_address_relationship table (by removing it from db_schema.xml and generating db_schema_whitelist.json again and then running setup:upgrade). The better approach was to add a column instead to an existing table called customer_address_entity after adding the column in my db_schema.xml and generating the db_schema_whitelist.json file the content of the file was now as follows:

{
    "customer_address_relationship": {
        "column": {
            "entity_id": true,
            "customer_id": true,
            "address_id": true
        },
        "constraint": {
            "PRIMARY": true,
            "CSTR_ADDR_RELATIONSHIP_CSTR_ID_CSTR_ENTT_ENTT_ID": true,
            "CSTR_ADDR_RELATIONSHIP_ADDR_ID_CSTR_ADDR_ENTT_ENTT_ID": true
        }
    },
    "customer_address_entity": {
        "column": {
            "address_type": true
        }
    }
}

Since I no longer need the table customer_address_relationship is it safe to alter the generated db_schema_whitelist.json and remove its entries? what is the implication of this if there is any?

reverse proxy – Apache – ProxyPassReverse multiple entries with same host

we have configuration (not configured by me, and dev who configured is gone) like so:

<Proxy balancer://acluster>
BalancerMember ajp://10.10.10.1:8123 route=r1
BalancerMember ajp://10.10.10..1:8123 route=r2
</Proxy>
ProxyPass / balancer://acluster

#ProxyPassReverse / balancer://acluster
ProxyPassReverse / ajp://10.10.10.1:8123
ProxyPassReverse / ajp://10.10.10.1:8123

I am trying to find out, what is the purpose or effect of having those multiple ProxyPassReverse entries instead of using that line which was commented out.
Thank you

excel – Input Box avoid blank entries

the vba copies data from the “source” to the “final” tab based on a date entered by the user the source has been reformatted (columns removed and added etc) in an “export” tab prior being copied in to the “final” tab. the vba below works but, I want to tighten the process and avoid the user from simply clicking on ok or cancel as this results in all data from the source spreadsheet being copied

 Public Sub Copydata()

  Dim CopySheet As Worksheet
  Dim PasteSheet As Worksheet
  Dim FinalSheet As Worksheet
  Dim nextRow As Long
  Dim FinalRow As Long
  Dim lastRow As Long
  Dim thisRow As Long
  Dim myValue As Date
  Set ws = ThisWorkbook.Sheets.Add(After:= _
         ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count))
         
  ws.Name = "Export"
  ' Get the sheet references
  Set CopySheet = Sheets("Source")
  Set PasteSheet = Sheets("Export")
  Set FinalSheet = Sheets("Final")


  lastRow = CopySheet.Cells(CopySheet.Rows.Count, "B").End(xlUp).Row
  nextRow = PasteSheet.Cells(PasteSheet.Rows.Count, "A").End(xlUp).Row + 1

  myValue = InputBox("Enter start date to transfer", "Input Date")

 For thisRow = 1 To lastRow
     
 If CopySheet.Cells(thisRow, "B").Value >= myValue Then
 
    CopySheet.Cells(thisRow, "B").EntireRow.Copy Destination:=PasteSheet.Cells(nextRow, "A")
    
    
  nextRow = nextRow + 1
  End If
  Next thisRow""

I had thought about a loop until the date was entered something like:

    Do
    myValue = InputBox("Enter start date to transfer", "Input Date")

    If myValue = "" Then
    MsgBox "You must enter a date as dd/mm/yyyy", vbOKOnly, "Invalid Date"
    Else
    Exit Do
    End If
    Loop

But it just loops even if a date is entered and doesn’t carry on with the code or errors with a type mismatch.

Any guidance would be appreciated thank you

web hosting – Strange entries in cPanel Web Disk log

We have a website and email system that uses cPanel / WHM. The log /usr/local/cpanel/logs/cpdavd_session_log contains a list of strange IP addresses hitting the cpdavd service (WebDAV, which cPanel calls the Web Disk feature). In a few cases, the same strange IP address is listed over a thousand times, within a 1 hour time frame. For security reasons, we need to determine whether or not this indicates unauthorized access to files on our server (particularly emails). cPanel’s forums state that this log does not differentiate between successful and failed logins. Also, simply accessing the WebDAV / Web Disk service by typing “webdisk.” in front of the domain will generate a log entry, even if it’s not a valid URL. For example, if you type webdisk.domain.com/abc123, it will show you the webdisk login prompt and generate a log entry. Finally, we know these strange IP addresses were not brute force attacking our server because Login Failure Daemon protects against that, and it was not triggered.

  1. How can we determine whether or not hosts (possibly attackers) using the IP addresses shown in this log successfully logged in to Web Disk and accessed our files?

  2. What does this number of entries by the same IP address in /usr/local/cpanel/logs/cpdavd_session_log indicate? What is the purpose of this behavior?

linear algebra – Positive Definite implies entries of diagonal matrix are positive.

I wish to show that if $A$ is a diagonal matrix and is positive definite then it follows that the diagonal entries of $A$ are positive.

I am currently stuck in my attempted proof shown below:

Since $Ainmathbb{R}^{ntimes n}$ is positive definite, then not only is $A$ invertible, but $det(A)>0$, since $A$ is diagonal then :
$$
det(A)=prod_{i=1}^{n}a_{i,i}>0
$$

I am stuck here because the product of all entries of $A$ need not imply each one of them are positive. Therefore, how can this be fixed? I would also be happy if there is an alternative.

One thing I would note is that if we let $thetainmathbb{R}^{n}$, then $theta^{T}Atheta>0$ can be observed to be an element-wise matrix operation where for instance, each $i^{th}$ element of $theta$ is multiplied with each element $a_{i,i}$ in $A$.

list – How to display entries that I’ve searched for in a more appealing way

When I search for data in a list using the search box, if I select a specific entry from the suggestions given in the dropdown menu, it takes me to a version of the new item form but with the data filled out for the entry I selected.

To me this looks messy and unappealing, is there a way to display searched data in a more appealing way?

For example, could it just take me to a screen that looks identical to the main list but with all the other entries filtered out so that only the entry I searched and clicked on is displayed in the list?

mysql – Get the most recent 2 entries for each group based on timestamp

If you have more than one price for one date you have to expand teh soltion and add a row_number which are made in Mysql 5,7 with @ variqables

CREATE TABLE item
    (`item_symbol` varchar(1), `price` DECIMAL(10,2), `source_date` Date)
;
    
INSERT INTO item
    (`item_symbol`, `price`, `source_date`)
VALUES
    ('A', 20.1, '2021-06-10'),
    ('A', 18.2, '2021-06-11'),
    ('A', 10.9, '2021-06-13'),
    ('A', 21.0, '2021-06-15'),
    ('B', 88.2, '2021-06-10'),
    ('B', 60.9, '2021-06-11'),
    ('B', 78.16, '2021-06-13'),
    ('B', 79.0, '2021-06-15')
;
SELECT i.`item_symbol`, `price` 
FROm item i INNER JOIN (SELECT `item_symbol`,MAX(`source_date`) maxdate FROM item  GROUP By `item_symbol`) t1
ON i.`item_symbol` = t1.`item_symbol` AND i.`source_date` = t1.maxdate
item_symbol | price
:---------- | ----:
A           | 21.00
B           | 79.00
SELECT `item_symbol`, `price`
FROM(SELECT  `price` ,`source_date`
, IF(@id =  `item_symbol`,@rn:= @rn +1,@rn := 1) As rn ,@id :=  `item_symbol` as item_symbol 
FROM item , (SELECT @rn := 0, @id := 0) t1) t2
WHERE rn <= 2
ORDER BY `item_symbol`,`source_date`
item_symbol | price
:---------- | ----:
A           | 20.10
A           | 18.20
B           | 88.20
B           | 60.90

db<>fiddle here

operating systems – Where will the TLB entries be stored if the cache memory get full (or can this situation occur)?

Your premise appears to be faulty. As far as I know, normally no such thing happens on a context switch. Either the TLB is left unchanged; or the TLB has entries “evicted” (removed from the TLB; but not copied somewhere else, they are just deleted from the TLB).

matrices – When a nonorthogonal basis is used, is the entire matrix of a antisymmetric transformation determined by its supradiagonal entries?

Suppose we have an $n$-dimensional real scalar product space, with the scalar product nondegenerate but not necessarily positive definite. By “nondegenerate” we mean that $(forall mathbf{u} ne mathbf{0})(exists mathbf{v} ne mathbf{0}): mathbf{u} cdot mathbf{v} ne 0$. Let $mathbf{b}_j$ and $mathbf{b}^i$ (where $i,j in {1, dots, n}$) denote basis vectors and reciprocal basis vectors, so that $mathbf{b}^i cdot mathbf{b}_j = delta^i_j$. The bases are not assumed orthogonal, so the metric tensor $g_{jk} := mathbf{b}_j cdot mathbf{b}_k$ and reciprocal metric tensor $g^{li} := mathbf{b}^l cdot mathbf{b}^i$ are not necessarily diagonal.

The matrix elements of a linear transformation $T$ and its adjoint transformation $T^dagger$ are related by

$$ {{(T^dagger})^i}_j = sum_k sum_l g_{jk} {T^k}_l g^{li},$$

where covariant-contravariant notation is used. Assume the transformation (not the transformation’s matrix) is antisymmetric, i.e. assume $T^dagger = -T$. The above equation then becomes constraints on the matrix entries:

$$ {T^i}_j = – sum_k sum_l g_{jk} {T^k}_l g^{li}.$$

If one does use an orthogonal (not necessarily orthonormal) basis, the metric tensor and reciprocal metric tensor will both be diagonal: $g_{jk} = d_j , delta_{jk}$ and $g^{li} = (1/{d_i}) , delta^{li} $ for some nonzero numbers $d_1, dots, d_n$. The constraint equations then simplify to

$$ begin{array} \
{T^i}_i = 0 & text{ if } & j=i \
{T^i}_j = – frac{d_j}{d_i} {T^j}_i & text{ if } & j ne i. \
end{array}$$

So for an orthogonal basis, knowledge of the entries ${T^j}_i$ with $i>j$ (i.e. knowledge of the supradiagonal entries) determines what the diagonal entries ${T^i}_i$ and subdiagonal entries ${T^i}_j$ must be. We’ve shown that when the basis is orthogonal, the $n(n-1)/2$ entries above the diagonal of the transformation’s matrix determine the entire matrix. (Incidentally, we’ve also shown that the matrix for the antisymmetric transformation $T$ will necessarily be antisymmetric only when $d_1 = cdots = d_n$; such is the case for the common practice of using an orthonormal basis.)

My questions are these:

  1. In the case of a nonorthogonal basis, do the $n(n-1)/2$ entries above the diagonal determine the entire matrix?
  2. If so, is there a formula that gives the other $n(n+1)/2$ entries in terms of the supradiagonal ones?

algorithms – Given $n$ sets of matrices, find $n$ matrices that have the least number of LCDs among their entries

Let’s say I have $n$ sets of matrices

$$
A = left{begin{pmatrix}
2 & 4 & 17\
5 & 6 & 9\
end{pmatrix}
begin{pmatrix}
2 & 4 & 18\
5 & 6 & 9\
end{pmatrix}
right}
$$

$$
B = left{begin{pmatrix}
13 & 20\
3 & 16\
end{pmatrix}
begin{pmatrix}
14 & 20\
3 & 16\
end{pmatrix}
begin{pmatrix}
13 & 21\
3 & 16\
end{pmatrix}
begin{pmatrix}
14 & 21\
3 & 16\
end{pmatrix}
begin{pmatrix}
13 & 20\
3 & 17\
end{pmatrix}
begin{pmatrix}
14 & 20\
3 & 17\
end{pmatrix}

right}
$$

Let’s define $T$ as a vector that contains the lowest common denominators shared among the entries of all the $n$ matrices.

I need to find $n$ matrices, picking one from each set, that will minimize the length of $T$, i.e. in this case

$$
A_{1}=begin{pmatrix}
2 & 4 & 18\
5 & 6 & 9\
end{pmatrix}
$$

$$
B_{1}=begin{pmatrix}
14 & 20\
3 & 16\
end{pmatrix}
$$

The resulting $T$ would be

$$
T=begin{bmatrix}
2,3,4,5,9
end{bmatrix}
$$

I know I can bruteforce every possible combination, but is there a more efficient way?