Jump to content

aehimself

Members
  • Content Count

    1096
  • Joined

  • Last visited

  • Days Won

    24

Everything posted by aehimself

  1. aehimself

    Unfixed bug in Sydney

    Strongly disagree. 10.4.1 is a lot more useable on our large project at work than any previous version was. Sure, it's far away from perfect, but it does not mean it's a "black hole". Tbh I was already shocked that inline variables will be added to the language. Was it community requested? Majority of the coders are staying away from it as far as I heard.
  2. aehimself

    TIdHTTP protocol transport safety

    Off: That is some nicely commented code!
  3. aehimself

    Help with IBObjects, Interbase 7.5 & Delphi 10.4

    Doesn't this equal to a localized ANSI codepage...? In this case a solution would be to 1, Convert the underlying DB to UTF-8-16 and forget about encodings for a while 2, Change the access components to one which allows you to tell the RDBMS in what codepage string literals should be converted to before sending it to you - if Interbase supports this. Zeos has this and so does FireDac (as far as I see from Google). 3, Override the String field's OnGetText event and manually covert the byte array to a Unicode string on-the-fly 4, Feels a bit hacky but you also can go through all tables, read all string fields as a byte array, convert them to Unicode and put them back like that
  4. aehimself

    Discover all LAN network with a PC

    Good for a school project; I don't see any other purpose for applications which - mostly - do things what a built-in Windows command does. If a user doesn't know how to invoke them from the command line they most probably don't need / shouldn't use. Even I already used this in one of my applications I completely forgot about this. Yes, for finding your own software on a network segment UDP broadcasting is the way to go. I might be completely wrong on this one, but afaik broadcasts can not be relayed to an other subnet, though. Never tried it and didn't work with broadcasts since, so take this with a grain of salt.
  5. aehimself

    Discover all LAN network with a PC

    For "general discovery" you will need a ping / port scanner. I wrote a fairly simple one a couple of years ago with DNS lookups: However, if you are looking for a specific program, you only need to display hosts where you find your application listening.
  6. aehimself

    View toolbar icons suddenly not working

    So the company just allowed 20H2 on our developer machines. Unfortunately the toolbar icon still does not work but the key combination does. I could try a reinstall of Delphi but I really don't feel the motivation to do so.
  7. aehimself

    Logitech Gaming LED SDK for Delphi

    I fell in love with A4Tech products since I bought my first, which was a A4Tech 4D+ dual scroll PS/2 mouse way back in high school. With only a small amount of exceptions, ergonomically they suited me the best. Although I didn't have a desktop PC for 15+ years now, when my mouse died I felt lucky that the XL-750BK was still available. At work I also changed my keyboard with the G800V I had laying around at home. They are also marked as "gaming" products but no fancy RGB, only keys which can be macroed and higher resolution / data transfer rates. If I'll have to change again, I'll look into A4Tech first for sure.
  8. aehimself

    View toolbar icons suddenly not working

    Can anyone confirm that this only happens on Windows 2004? Yesterday after installing the MS Windows patches offered by the company my "View unit" button stopped working, while it was fine before. Same Delphi version (10.4.1) on a different machine, receiving updates from MS directly (therefore, instead of 2004 it's 20H2) it's all fine.
  9. aehimself

    git and Delphi tooling?

    I'm using VS Code and git bash for the tasks VS Code can not handle. Diff view is one of the best I've seen, merge conflicts are easy to solve. Just install a time line addon and you are ready to go.
  10. aehimself

    Year Countsdown

    If DateInFuture > Now Then seconds := SecondsBetween(Now, DateInFuture) else // Date already passed Then you can divide seconds down to years, months, etc. Alternatively, you can use YearsBetween, MonthsBetween, etc.
  11. aehimself

    How create a website whit Delhpi

    What OP actually asked and what he wanted to ask are two different things. We assumed what he would like to know and offered directions in how to achieve it. Now our assumptions might be wrong of course but with the information available this is how far one can get. I suppose OP's proficiency in English is not native. At least some of us attempted to help.
  12. aehimself

    How create a website whit Delhpi

    Best? Definitely no. Capable of, while being good enough? Absolutely. My own compiled Delphi code will always consume less resources (and will be more trustworthy to me) than PHP, for example.
  13. aehimself

    How create a website whit Delhpi

    Use a HTTP(s) server component. Either put the files on the disk and set it as the root folder, or store them as resources; you can even generate them on-the-fly. ICS for example has pretty good example projects to get you started.
  14. aehimself

    Zeos 7.3 entered the beta phase.

    Not yet, but it's the most requested feature for a long time. For the time being only a memory based SQLite database can be used as a workaround.
  15. aehimself

    Zeos 7.3 entered the beta phase.

    Off: for anyone wondering 7.3 is not dead, only the version number was bumped to 8.0 a while ago. It is basically the same codebase but due to the changes breaking backwards compatibility the main version number was increased instead.
  16. Maybe trial comes with compiled .DCUs only? Can you find Vcl.Controls.dcu?
  17. Connecting - 15 seconds. Application stops responding. Opening a large dataset with lots of BLOB fields - 1 hour. Application still does not respond. Make a change, post it back and commit. Another 5 seconds of white screen. But noone really cares at this point. For ease of code, put everything on your form. For everything else, there are Threads. (powered by Loreal and Mastercard 😄)
  18. That is actually (half of) the best thing(s) that can happen to an application. The other half is, having dataset operations (.Open, .Post, .Refresh, etc.) in the same thread.
  19. aehimself

    Database app good practice

    I started actively using databases in the past couple of years in my applications, and these are the things I wished to know from the beginning: - Every SQL thing should be in a separate thread. If connection takes 20 seconds or you are downloading a very large dataset over a slow connection, your application will be frozen. Publish important data or the complete dataset objects as properties. Just make sure you disconnect all datasources before any operation and reconnect them after, as data events will start to fire off in an inconsistent state causing AVs most probably. - When it comes to threads, a golden rule is that each thread should have it's own connection to the database. You also want to make sure that threads are working with different tables or you should have correct transaction isolation set up. - For service applications I wrote my own "ORM", which is basically a wrapper for a TQuery. Each field the query returns are published as typed properties. So instead of query.Edit; query.FieldByName('field').AsString := 'Hello, world'; query.Post; I simply can say: myTable.Field := 'Hello, world'; and myTable takes care of everything else. I took this one step further after a couple of DB changes and wrote my own planner. I tell it what kind of tables and fields I want, and it generates MySQL and MSSQL create and delta scripts AND all the myTable classes as Delphi source files. I make a change, I have all the SQL scripts ready to ship with the update and I already can use the new fields in all of MyTable objects... you get the point. - Depending on the component you use (and how they access the databases) client libraries might not be thread safe or requiring special parameters upon establishing the connection to be thread safe! I found it as a best practice for example to have a critical section when connecting as I had strange access violations when 7 worker threads tried to connect using the same library at the same time. - If performance is critical, do not use TQuery.FieldByName. That's all I can think of for now but I'm sure I missed a few. If anything else pops up, I'll try to remember to update this thread.
  20. Start -> cmd -> dir C:\fileiwanttofind.now /s /b Works like a charm.
  21. aehimself

    Looping Memo.Text

    If you are willing to look into different components, Zeos has a TZSQLProcessor which does just this. You give it your full query, like "Create Table A (ID Integer); Insert into A Values(1); Update A set ID=2 Where ID=1;" Then it splits it up and executes them one by one. Other than this, you'll have to write the parser yourself. Beware though, splitting up simply by ; is NOT GOING TO WORK. Examples: INSERT INTO MYTABLE (MYSTRINGFIELD) VALUES (";") INSERT INTO MYTABLE (MYSTRINGFIELD) VALUES ("x") -- This is just for fun; DROP TABLE MYTABLE and so on, you get the point...
  22. aehimself

    TwSocket Udp Client how to receive Bytes Properly ?

    Just a small heads-up; binary transfer requires different handling than text. See
  23. aehimself

    fun coding challenge

    Just store the TMemos in a TList when you create them so you don't have to find them later. When generating; have two nested cycles going through that list. Outer from Low(list) To High(list) - 1; inner from outer var to High(list). Not efficient, but easy enough to understand what is going on.
  24. aehimself

    Drone control from mobile

    I guess it depends on the resolution and color depth, but isn't transferring still images and showing them as a video... laggy? I never worked with videos in my entire life, but - as far as I understood - this is why they identify key frames; so they transfer / store only the delta inbetween those.
×