Jump to content

Steven Kamradt

Members
  • Content Count

    28
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Steven Kamradt

  1. The problem with above is that you will be scratching your head as to why you have AV's everywhere when you mix patterns, not to mention the fact that it will not be disposed of if there is an AV in the modal form. But we never have those do we. 🙂 The simplest solution is what Lajos Juhász suggests above. You could easily make this a standardized procedure or class method. I just wouldn't be afraid of the standard pattern, its simple and easy to maintain.
  2. A hash of the list would only tell you if the list was identical across all items. Keep in mind that any positive matches would have to be checked as it is mathematically possible to create the same hash value from different source values, more so if you are just using the DigestAsInteger function to grab a simple integer. Also, it is entirely possible to generate a hash value ANYWHERE in the integer range, so don't rely on any special values (for example, 0 is a possible result). If the lists have partial matches you need to report on, you could build a list of lists for each list. The idea is that each level would contain more information. So first list would be a single year and contain a list of months, which contains a list of days, which contains lists of hours, and the next level minutes. Each list can be a static array so there is no walking through the list, just checking against nil to see if that array position has a list (and potential values) or not. It has the disadvantage of using more memory, and requires time to build/destroy the list, but should be very quick to access. You just need to do a decodeDateTime to break a datetime into its parts, then use that to see if there is a value in the other list(s) that matches. The idea is to create something manageable and eliminate a need to loop and compare more than necessary. If you need to support multiple years, I would add another level to the start that would be a dynamic array of years and compute the array position as selected year - lowest year supported and grow your array as needed. if the year in the comparison list is outside of the bounds of that array, then it doesn't match anything that year.
  3. Steven Kamradt

    Parnassus Bookmarks for Delphi 11 Alexandria?

    And to twist the knife even deeper... I received a marketing email from Embarcadero today focusing on the Parnassus Navigator, saying how its available via getit, but in reality, no.... still nothing for Delphi 11... just 10.4.
×