Jump to content

FPiette

Members
  • Content Count

    1167
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by FPiette

  1. FPiette

    Is Embarcadero's DocWiki down?

    Works now.
  2. FPiette

    Is Embarcadero's DocWiki down?

    Still down for me.
  3. It is enough to store the request count per 5 sec interval. The other intervals can be computed form the 5 sec interval. To count for the 5 sec interval, you can increment a counter (in memory or in SQL table), rounding the timestamp to the nearest 5 sec and using that rounded value plus the user ID to locate the record to update (or insert if not already existent). At regular interval, you can delete all counters older than the desired retention time. For performance reason, you may buffer the counter in memory for one or more 5 sec intervals and then flush the memory to the database to secure the data. With that scheme; you have at most 12 * 60 * 24 = 17280 counter per day per active user. 2 bytes (short int) is enough if no use has more than 65535 requests per day. If they can do more, then you need more bytes per counter.
  4. FPiette

    Set colour for TStaticText with themes.

    Look at this report : https://quality.embarcadero.com/browse/RSP-33766 This is probably a similar issue. You should create a new report with the issue you see.
  5. FPiette

    Change of coding style/structure..

    Yes, it should. I always code like that and when taking code from elsewhere, I rewrite it like that.
  6. FPiette

    Change of coding style/structure..

    I like to use FreeAndNil for the same reason David explained for the rest : One day you make your procedure more complex, adding some code lines after the FreeAndNil and yet use the freed variable. Calling FreeAndNil instead of Free will make you quickly discover (AV° the error you made. The price is very low for this security.
  7. FPiette

    Change of coding style/structure..

    You are partially right. This recommendation is for destructing a form in the context of an event handler of that form. In that case you need to call Release which defers the actual destruction after the event is terminated. This doesn't apply in this case.
  8. FPiette

    Change of coding style/structure..

    You should stay with the original version for the reasons David gave. Additionally, pay attention to code indentation like this: procedure TMainForm.ButtonClick(Sender: Object) var myForm: TMyForm; begin MyForm := TMyForm.Create(nil); try MyForm.ShowModal; finally FreeAndNil(MyForm); end; end;
  9. You said: " In Delphi a string is essentially a 1 based array of char". No matter how you try to say it is it doesn't make it happens. A Delphi string is NOT an array of elements of type char. If the were, they would be interchangeable and you admitted they are not.
  10. They key word is "Viewing". That's what I said: compiler magic makes that happens a string is not an array but sometimes looks like an array of char because of the [ ] that is usable. The two types string and array of char are not interchangeable. You will confuse the OP pretending they are the same.
  11. In Delphi a string is essentially a 1 based array of char Not really and I know you know it. It looks much like a 1 based array of char but it isn't at all compiler magic happens here. A string is a record with data used by the compiler a pointer to the actual characters, a count of characters (length), a reference count and more.
  12. The new version I started to develop take 90% of existing ICS code. The new code is developed with Delphi 11 and no effort is done to support older compilers. Since I keep Delphi always up-to-date, it is likely that at the time of release, the next ICS version AKA V9 will officially and initially only support the latest Delphi at that time.
  13. Like said, same app, since I heavily modularized I have not seen such issues any more.  One frequent bug which becomes visible when changing OS is using a freed pointer or freed object or initialized local variable : the address point to somewhere not hurting in one OS but point to something useful in the other OS. I don't think the existed. But rearranging the code by moving some part of one unit in a new unit will cause the code to be linked in different places and the effect of the bug I mention above may be gone. Only the effect will magically disappear but not the bug, it will reappear later when code is again changed and the dangling pointer point again to something significant. As said in my first answer to the OP, that is how it should be done. But do not fall into the opposite trap and make lots of tiny units.
  14. That is not a question of unit size nor number. Something else is wrong in your iOS or Android application.
  15. Small units if better than one large. It helps separate things and it helps to program in a more object oriented way.
  16. You can use Delphi Remote debugger. You probably can run ReactOS in a virtual machine hosted on your Windows computer. I don't know ReactOS. It is not Windows and it is still at an early stage. You may be faced to incompatibilities between Windows and ReactOS. Did you try to run your program under Windows ?
  17. Run your application under the debugger in order to get the exact source line.
  18. You should tell us which source code line EXACTLY is causing the exception. madExcept could also help you find errors in code which doesn't immediately cause an exception.
  19. I'm not sure at all that the old Delphi compilers ICS still support have an option 3rd argument.
  20. FPiette

    Error handling

    This would probably break a lot of code!
  21. FPiette

    Delphi Registration

    I would suggest that the next time you buy a new computer, you restore a backup from the previous one (A full backup or a disk image). You'd probably have to "repair" windows if the hardware has changed. This would work if Embarcadero do NOT check for hardware configuration when validating the license (No idea if they do).
  22. FPiette

    Module not found

    Recently I had to solve a similar issue. I solved it by spying the IDE file activity using ProcessMonitor (https://learn.microsoft.com/en-us/sysinternals/downloads/procmon). ProcessMonitor is a free tool which can display all file - among others - activity. Create a filter with the name of the module the IDE don't find and you'll get the list of folder where the IDE look for it.
  23. Ethernet is not TCP/IP. Ethernet is a much lower level that TCP/IP. On a PC, when using TCP/IP, it almost always use Ethernet as lower level transport protocol. Tell us more about what you are EXACTLY using on your Arduino board and which model of Arduino board you are using so that we better understand what you are trying to do.
×