On June 14, 2022 10:29:40 PM CDT, Mike Dewhirst wrote:
>On 14/06/2022 11:20 pm, Ryan Nowakowski wrote:
>>
>> Summing the ordinal of the characters won't catch transposition:
>>
>> >>> chars = 'ab'
>> >>> sum([ord(c) for c in chars])
>> 195
>> >>> chars = 'ba'
>> >>> sum([ord(c) for c in chars
On 14/06/2022 11:20 pm, Ryan Nowakowski wrote:
Summing the ordinal of the characters won't catch transposition:
>>> chars = 'ab'
>>> sum([ord(c) for c in chars])
195
>>> chars = 'ba'
>>> sum([ord(c) for c in chars])
195
Better to use a real hash algorithm if you're trying to detect
changes.
On 6/12/22 11:40 PM, Mike Dewhirst wrote:
Original message
From: Ryan Nowakowski
Date: 13/6/22 07:09 (GMT+10:00)
To: django-users@googlegroups.com
Subject: Re: How to hash fields and detect changes in a record
On Sat, Jun 11, 2022 at 12:13:16AM +1000, Mike Dewhirst wrote
--(Unsigned mail from my phone)
Original message From: Ryan Nowakowski
Date: 13/6/22 07:09 (GMT+10:00) To: django-users@googlegroups.com Subject:
Re: How to hash fields and detect changes in a record On Sat, Jun 11, 2022 at
12:13:16AM +1000, Mike Dewhirst wrote:> On 10
On Sat, Jun 11, 2022 at 12:13:16AM +1000, Mike Dewhirst wrote:
> On 10/06/2022 11:24 pm, Ryan Nowakowski wrote:
> > On Fri, Jun 10, 2022 at 05:52:48PM +1000, Mike Dewhirst wrote:
> > > I think the solution might be to hash note.title and note.note into a new
> > > field note.hash on being auto-crea
Ryan
Thanks very much - you triggered the necessary amount of thinking and I
reckon you are correct - hashing is overkill.
I just need a self-referential value comparison where the value is
independent of outside influences. That means I should not use a hash
library from anywhere.
I'll ju
On 10/06/2022 11:24 pm, Ryan Nowakowski wrote:
On Fri, Jun 10, 2022 at 05:52:48PM +1000, Mike Dewhirst wrote:
The use case is auto-deletion of out-of-date records if they have not
changed.
That might sound weird but it is the solution I have come to for a
particular problem. My software analyse
On Fri, Jun 10, 2022 at 05:52:48PM +1000, Mike Dewhirst wrote:
> The use case is auto-deletion of out-of-date records if they have not
> changed.
>
> That might sound weird but it is the solution I have come to for a
> particular problem. My software analyses chemical properties and writes note
>
The use case is auto-deletion of out-of-date records if they have not
changed.
That might sound weird but it is the solution I have come to for a
particular problem. My software analyses chemical properties and writes
note records containing advice, each with a FK to the chemical.
When value
9 matches
Mail list logo