Jump to content

Dany Marmur

  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by Dany Marmur

  1. 5 hours ago, Stefan Glienke said:

    I am sure you did not mean that as it came across because to me it sounded like an insult to any member of Delphi Praxis.

    Yes, that it did. I was trying to be nice to KasOb and being to fast i neglected context completely.

    No i did not mean it like that, thank you for pointing that out.

    Apologies to all, and thank you, @Stefan Glienke.


  2. Oh, i think you want a "repoting function" called "suppress repeated values".

    Most "report generators" comes with this functionality.

    DevExpress Quantum grid ($$$) has similar stuff in different ways (merge cells, grouping, et.al).

    Implementing it in a scrolling editable grid, i suspect, will not be very simple.

    Do you load the complete grid or do you need "GridMode" or "Cached Updates"?

    If you load all the grid data before displaying it, it should be easier to implement as you can check the actual data before painting.

    You could check (instead of Null et al) for equality. If previous record <> match then draw otherwise supress.

    I hope i did add confusion.

  3. 18 hours ago, Ian Branch said:

    Regardless of the spec of my existing PC, what is the single change can I make to my PC that will have the most impact/improvement to the performance of the IDE.

    Turn off all and every virus-scanning thingies during work!


    15 hours ago, Darian Miller said:

    There are software optimizations... like Excluding your source and output folders from Antivirus.

    Sometimes it's scary how much faster stuff gets done. IDE/Compiler/installations write [big] exe files (and other "watched" stuff) so that is key.


    Darian, i have not tried that. A much better approach than turning stuff off. If i get the time i'll see if it gets me up to the same efficiency.

  4. 3 hours ago, Attila Kovacs said:

    It's not that bad if you can throw it away on the next update which is very likely in this case.

    On more thing (out of already 1000) to keep track of that can bite. Sucks.

    I had an issue with /n software, they fixed it but "it did not make it to the next update".

    I did not know that (i was not informed) and it was an edge case thing, so i updated, deployed. Ouch! That bitted*!


    * "To bite" in past tense? Bote? Bitted! Erh... Butt? Butted?

  5. 11 hours ago, Tom Mueller said:

    Embarcadero uses its own draw method

    The old "OwnerDraw" [not exactly the same as own draw, i know] concept and High DPI is a match made in hell. For High DPI any owner drawing should be avoided because there's always an old pixel calculation hiding somewhere in some of the ancestors. Control and responsibilities are broken. It was cool back in 3.1 but started to give some head aces as long back as W95.


    HighDPI nudged forward a complete rewrite for me (those should happen anyway and i was like 3 years behind anyway). I have not tried to update the app created using D2007, updated up to XE. It would suck. IAll the OwnerDraw routines and old tweaks to update...


    But i must say, with or without imagelist the readability decreased, IMHO. And aesthetically i do not like "shrunken" background markings. Looks "toy"-like.

  6. A lot of JSON libs filter out empty values and never writes those name-value pairs.

    When i built 0.5, 1.0 and 2.0 of my own REST "API" i liked that "style" because it can take the payload size down quite.

    In JS null and undefined are different values... kind of. So a null (part of JSON spec) would set the parsed object member to null while a missing name will set (or leave) any declared members "undefined". Since i know what to expect (more or less as it seems you do too) it is not a problem.


    Your approach above (the second code line) thus looks quite ok to me.


    I should also say that i mostly consume JSON in JS and not so much in Delphi (of course a lot of payloads are JSON, but when parsing a payload server-side i could just throw an exception as soon as any little thing is amiss).


    Regarding the details on TJSONObject and RTTI and all i have no ide, i use a dynamic JSON lib (no RTTI) and simply loop/recurse as needed, it is a "just tree" after all. Mainly array or object splits processing in two and the rest is recursive.



  7. @misc_bb, i had that too. I had to switch XML libraries in the end. I do not recall exactly what was the problem, something about a line-break after the first or second row of the XML.

    When word reads the unzipped XML's it is very very picky.

    Create an almost empty doc both with your code and with word. Then use BeyondCompare or VC to check all differences. After a while you will have rooted them out.

    If you do not get anywhere i could scan my old code for comments but that may prove a rather lengthy operation 🙂

    (You will have use for Microsofts Open XML Productivity Tool 2.5).

  8. OT: I told a client their wordpress used letsencrypt on the same domain while caring a lot about my certificate (on my recommendation). Granted, the information stored in my systems are way more sensitive but as it is the same domain i still felt i should inform them... when i read about this earlier this week i went in to check, and it seems they have now paid for a "named" certificate for their worpress subdomain.

  9. IMHO just think; RDBMS => handles Null (if you do not explicitely set "Not NULL" for the column.

    Delphi variables (mostly) do not handle null (var a: integer).

    Watch out for empty strings from nullable columns in the RDBMS - IMHO it is a bit of a special case.

  10. AFAIR rbd$get_context and rdb$set_context was introduced not too long ago (2.0, 2.5?) in FB. Perhaps IB got something similar, but i would not know.

    IB and FB was compatible for a long time after the first fork (1.0 for FB). Would be interesting with a comprehensive "split" chart. But who would have the time?


    @Henry Olive, generators is an old and well working concept. The new number is incremented outside of transaction "control". This is key.

    So the difference would "only" be that you would have to explain to someone the "ordinal" concept. It does not matter if on series starts with 1 and another with 1001 and that there migt be "wholes" inte the series. Some colleagues and/or clients (though you should not have to show the actual values to the user) may frown upon the solution.

  11. I do not understand at all. I use RTC and compile my http/s servers to win32/64.


    I wrote two different pooling units, one that pools a complete DataModule (for session based servers) and one that pools specific queries with parameters (for my REST-kind of severs). 15 years ago (used IW back then, blissfully rooted that out) and i have not had any reason to change any of that code since. My server can serve 15000 random and different mapi icons per second (the only thing i tested back when, no one has ever complained about performance so i  have not needed to put effort into new "beches").


    My confusion: why do you need a .so/.dll library to do that? What is the "magic"? What is difficult in implementing pooling in Delphi? Most DAC include connection pooling out of the box. But query pooling or DM pooling is not more complex, it's just about at what level you pool and with what parameters/how exactly you section off the items of the pool. No?


    I am a bit tired atm, and just want to make clear that i am not criticizing your decision, i am honestly curious.

  12. 19 hours ago, Mike Torrettinni said:

    being single developer on a project

    Being a single developer, the only need for a VC system is when i forget what i am on about and need to refresh my memory on my own strategies from some months back, my own commit notes are gold and when they are not specific enough i can view the comparison, "Code you wrote 6 moths ago could as well be written by someone else".

    I agree with the sceptics when it comes to projects with one to three coders. Branching and merging is just a mess and way over the top.

    I also agree (though this exp points are from more that 15 years back) that if you really want to update "continuously" an elaborated flow/branch/merge approach will bog you down. I.e. there are other techniques and this being a Delphi forum, it should be apparent.

    Test and fix and use proper abstraction and those thingies should not have to be attached with the graveness that currently seems to be the case.

    Also - videos about coding sucks. Totally. Present a writeup, if they need to use facial expressions and audible cadence, they got something to hide. IMHO.

    • Like 2

  13. What essentially will happen if you succeed is that the "LINENO" field will reflect the "natural order" of the "Table-1".

    That does not sound very "planned" to me.

    First off, what order do you want that field to indicate? Or maybe you would like the lines sorted after "ITEM"? Then you won't need the extra column at all.

    If you want a "cronological" order as to when the user posted the record (in relation to other lines), then perhaps you should use a generator in a trigger (insert), does NOT have to correlate with the PK.

    You will be better off with a generator than for example rdb$key or some such (aka natural if we stretch things).

    And to add to all of this, neither Table-1 not Table-2 above seems to have a unique PK (?).

    To have a unique index (like not being able to add two lines with the same ITEM for the same CUSTNO/INVOICENO) and using that as the PK can seem very logical when you start but it's much better to use an (generator) index instead.

    Also remember, that if you get your sequence (ordinal) field right using a generator, if someone points out that there are "holes" in the number series, that not a problem at all.

    For a "series of auditable numbers", you need other techniques.

    • Like 1

  14. 6 hours ago, Joseph MItzen said:

    Delphi's really not the best tool for the job, though. But if you use selenium to control a headless browser and deal with the javascript for you, beautfiulsoup to scrape a page, and perhaps scrapy if you need to do web crawling... things become a lot simpler.

    Hmmm... sure parsing in Delphi may seem a bit more convoluted as the objects in JS are more "native".

    But you now have a "toolchain" of at least three npm/something libs. That in itself is a mess IMHO.