hash – What can make unmounted volumes SHA512 hashes differ while mounted volumes content SHA512 hashes are identical?

I am trying to configure Raspberry Pi OS to be read-only.

In theory, both / and /boot are read-only. That being said, I am experiencing a strange discrepancy and can’t figure out what is happening.

I create clones of /boot using dd before and after discrepancy occurs to find what changed.

Using diff, apparently nothing has… puzzled.

$ sudo openssl dgst -sha512 /Users/sunknudsen/Desktop/boot-clean.img
SHA512(/Users/sunknudsen/Desktop/boot-clean.img)= ce87ce4b05149a85d286b62528776c010ddae4d25c5eaa1e79275be118125d66396645587f084073cbf87e36d6627f8d96ad02688a20ede898152df95fa88686

$ sudo openssl dgst -sha512 /Users/sunknudsen/Desktop/boot-changed.img
SHA512(/Users/sunknudsen/Desktop/boot-changed.img)= 62e9727727c2307ef452a8f029617c7e7369c8b9c797027d8088a53ed0ada988dbfc128b389d35a729cc8fb00d4214fa4c2f1decd285e5e0f33553a8b63a29da

$ diff /Users/sunknudsen/Desktop/boot-clean.img  /Users/sunknudsen/Desktop/boot-changed.img
Binary files /Users/sunknudsen/Desktop/boot-clean.img and /Users/sunknudsen/Desktop/boot-changed.img differ
$ hdiutil attach -nomount /Users/sunknudsen/Desktop/boot-clean.img

$ mount -o ro -t msdos /dev/disk2 ~/Desktop/boot-clean

$ sudo openssl dgst -sha512 /Users/sunknudsen/Desktop/boot-clean
SHA512(/Users/sunknudsen/Desktop/boot-clean)= 27d3b8c676879d944e148384e78dc6b77fc2d5a67c195bdbedf8157a57ff6e7f317e53e10fe2e030d154d8102f55710ec28a701582da04246edc541e600e12a3

$ hdiutil attach -nomount /Users/sunknudsen/Desktop/boot-changed.img

$ mount -o ro -t msdos /dev/disk3 ~/Desktop/boot-changed

$ SHA512(/Users/sunknudsen/Desktop/boot-changed)= 27d3b8c676879d944e148384e78dc6b77fc2d5a67c195bdbedf8157a57ff6e7f317e53e10fe2e030d154d8102f55710ec28a701582da04246edc541e600e12a3

$ diff --brief --recursive /Users/sunknudsen/Desktop/boot-clean /Users/sunknudsen/Desktop/boot-changed

Clean way to remove an identical nested object in javascript

can you give me some feedback about my approach to remove an idential element from following data structure?

const items = {
  'Sun Mar 07 2021': (
     { id: 2 },
     { id: 1 }
  ),
  'Sat Mar 06 2021': (
     { id: 1 } // remove me
  )
}

const id = 1 // filter by id 1
const newDate = 'Sun Mar 07 2021' // filter by newDate

let oldDate = ''
// Find the duplicate date and 
// save it in oldDate to splice it afterwards
Object.keys(items).forEach(date => {
  items(date).forEach(item => {
    const match = item.id === id
    if (match && date !== newDate) {
      oldDate = date
    }
  })
})

// remove the old item from matched array
if (oldDate) items(oldDate).splice(item => item.id === id)

I think it can be simplified or solved differently. Unfortunately I can’t get any further, do you have any ideas?

combinatorics – $10$ identical black balls , $5$ identical red balls , $2$ identical white balls. What is the probability of choosing three black balls from this box?

I have $10$ identical black balls , $5$ identical red balls , $2$ identical white balls in my box. What is the probability of choosing three black balls from this box ?

My Attempt: We have to first consider each ball is different and the points in the sample space is ${17} choose 3$.

We can choose three black balls in ${10} choose 3$ ways. So the probability is $frac{{10} choose 3}{{17} choose 3}$

Can anyone please check my attempt ?

postgresql – Merging databases with identical schema

We used to have one database per client, and we’re moving to using a single database.
I need to find a way to merge the databases without losing data, including foreign keys.
My primary keys are all integer.

What I understood is that the only way to do this is to update all primary keys and all foreign keys on all but one database (so that there’s no conflict), then import them in a new db.
Is this true?

If so, the only way I found is to manually set all my foreign keys to DEFERRABLE, then manually increment all my primary keys.
Is this true? Is there a way to automate it to ALL my primary and foreign keys?

Plot[Im[f[x]],…] incorrectly gives graph of identical zero function

Consider

Plot(Im((1 + (-1)^(2/3)*x)/((-1)^(2/3) + x)), {x, 0, 1})

At least in Mma 11 it gives the following picture:zero
Meanwhile,

Plot(Im(ComplexExpand((1 + (-1)^(2/3)*x)/((-1)^(2/3) + x))), {x, 0, 
  1})

gives
enter image description here

What is going on here?

combinatorics – Combinations – The number of ways of distributing n identical objects among r persons such that each person gets at least one object

So I came across this question and was unable to figure out the logic. Question –

Statement-1:
The number of ways of distributing 10 identical balls in 4 distinct boxes such that no box is empty is C(9,3) ​

Statement-2:
The number of ways of choosing any 3 places from 9 different places is C(9,3)

According to my answer key and the internet, both these statements are true. But I don’t understand how.

Shouldn’t the number of ways of distributing 10 identical balls in 4 distinct boxes such that no box is empty be C(10, 4) instead of C(9,3) ?​

dnd 5e – Is there any consequence (in terms of game balance) of using a different meaning from common English for “identical” in rule of initiative?

Frame challenge: this isn’t actually important.

As I noted in my answer to your other question about initiative, this is not a game balance issue. The initiative “rules” about rolling once for groups of identical monsters are there to make your life easier – use them if you want, don’t if you don’t. So it doesn’t matter what identical means here. Just use the method that works for you and your table.

“Identical” means “uses the same statblock”.

The basic English definition of identical is:

Adjective. similar in every detail; exactly alike.

A dragon and a kobold are in no sense identical. Being allies does not make two creatures identical. Being exactly alike in every detail makes two creatures identical, and the details of a creature, at least for the purposes of running combat, are found in the statblock.

It is important to note, this is how I understand and interpret the word. There is no canonical rules-as-written definition.

dnd 5e – How should one interpret the word “identical” in the initiative rule?

Frame challenge: this isn’t actually important.

As I noted in my answer to your other question about initiative, this is not a game balance issue. The initiative “rules” about rolling once for groups of identical monsters are there to make your life easier – use them if you want, don’t if you don’t. So it doesn’t matter what identical means here. Just use the method that works for you and your table.

“Identical” means “uses the same statblock”.

The basic English definition of identical is:

Adjective. similar in every detail; exactly alike.

A dragon and a kobold are in no sense identical. Being allies does not make two creatures identical. Being exactly alike in every detail makes two creatures identical, and the details of a creature, at least for the purposes of running combat, are found in the statblock.

It is important to note, this is how I understand and interpret the word. There is no canonical rules-as-written definition.

dnd 5e – Do identical bonuses from random properties of different Artifacts stack?

They stack, unless you’ve got two of the same artefact

I think you’ve misunderstood the rule about combining effects slightly; the text isn’t meant to suggest that magic items, in general, do not stack with each other. The intended reading is that magic items with the same name don’t stack, but otherwise they can combine together.

That means that, for instance, if you already have one ring of protection, you don’t get any benefit by attuning to a second ring of protection; since the two magic items have the same name, their effects do not combine. However, you could instead attune to a cloak of protection, and despite the fact that these two items both provide exactly the same actual benefit, because they have different names, their effects can combine.

Thus, if you have two different artefacts – say, the Axe of the Dwarven Lords and the Sword of Kas – and both of them have the +1 AC minor property, because they are game features with different names, the effect stacks to an overall +2 bonus.

However, if you had two Orbs of Dragonkind which both had the +1 AC property, because those artefacts have the same name, the effect would not combine – you only get +1 AC.

forensics – Would pirated software that is now programmatically different but functionally identical still be considered pirated?

Doing some research on software piracy for an assignment. I’m curious has to what extent pirated software can be considered pirated if it has been modified to a point where most of the code base is different to that of it’s nonpirated counterpart yet is still functionally identical.

I understand that in some examination processes in cyber forensics the examination includes the process of two individuals who cyber forensic experts that are not part of the examination to note down differences and similaries between the original software and the software considered to be pirated to judge if it is in fact pirated or not (as descripted in the ‘Establishing a crime’ section of this paper ).

However if the code is not at all identical, or even similar, to the software that was pirated could it not be assumed that the program is simply a copy rather than pirated? And if not why?