Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 08/30/20 in all areas

  1. David Heffernan

    Securing your data over time

    You should have all your work in revision control. Then when your drive fails you still have it. Not to mention all the other benefits.
  2. aehimself

    best way to display a list of panels?

    My solution to something like this was to create a frame which contains only one row. Add basic functionality, like a grip and the resize code, initialization method, validation method, etc. Create as many variants as descendants of said frame as needed to handle different input / visual needs. Then, create one form with an alClient scrollbox and an alBottom panel with an OK and a cancel button. Give an array of data as an input to this form so it knows how many and what kind of frames it has to create in the ScrollBox. When the user clicks OK, you can see if all data is valid (because the validator is in the parent frame) so you can deny exiting. It ended up like this: I still need the resizing logic, though, it was a recent request 🙂
  3. A number of changes, fixes, improvements and speedups have been made compared to ZEOS 7.2.6.1-stable. Among others, OLE DB (for Windows) and ODBC protocols were added, newer versions of SQL servers were included. Feel free to test and use the ZEOS 7.3.1-beta: https://zeoslib.sourceforge.io/viewtopic.php?f=50&p=155611#p155611 https://sourceforge.net/p/zeoslib/code-0/HEAD/tree/branches/testing-7.3/ https://github.com/marsupilami79/zeoslib Michal
  4. aehimself

    NetCom7 clients chat implementation

    Ahaaaa, makes sense. This is how IRC worked. To have a "private" chat, you have 2 options: 1, Look in the source of the OnReceive event of the server. Instead of sending the received message to everyone, if the message contains a special flag, send it to one recipient only. For example, if you start your message with "@IP" then it will look for all connected clients, and where the IP address matches - send the message only there 2, A more secure way is if you initiate a DCC-like (again, IRC did it this way) channel. If the message starts with @IP DCC, the server will send your IP address to @IP. Then, on your client, you open up a server socket and wait for a connection from @IP. Long story short, wither your message will travel around the network twice (thus, more vulnerable) or you have to establish a client-server connection directly between the TWO CLIENTS:
  5. aehimself

    NetCom7 clients chat implementation

    I know, it was only my very personal opinion and yes, I can be wrong. I guess - unless a component is really badly written - I doubt that it can cause slowdowns (there can be specific high-end cases where the design can cause a bottleneck but that's an other story). Back to your question. Usually there's not much to set a TCP connection up. You need a server (listener) component and a client (which is connecting to the server) component. Set the port number to the same, set the server and the client to active and it should work. Sending data is a completely different topic. Are you using text-based or binary communication? For text, most components have a .SendText method which will accept a string parameter. For binary - I don't think we want to go there just yet. Now look for events of said components. There should be something like... onReceiveBuf, onReceiveText, onDataAvailable... something like this - you have to handle those. And within that event handler, you have to read the data out of the socket with... socket.Read socket.ReceiveText, socket.receivebuf or something. Unfortunately that's all I can say, as I never used this component. Did you look at the Demo folder? There seems to be a chat application - just the one what you are looking for.
  6. Edwin Yip

    best way to display a list of panels?

    I was in the same shoe with yours and I ended up using a similar approach like what @aehimself described, and actually his approach solves the issue you described. I don't see any other approach better than this in terms of flexibility with the current implementation of VCL. I think the keys are: use a client-aligned TScrollbox to get unlimited amount of rows. Add the frames one after one. To solve the splitter mis-position issue, use the Tag property of the frames to map a pair of frame and splitter, and correct the position error by using something like `TSplitter(frames.Tag).Top = frames.Top + frame.Height`. Note, the standard TSplitter has the same issue you described. Not sure if there is another way to solve it.
  7. aehimself

    best way to display a list of panels?

    Well, I mean, this is an option. If you don't want to hassle with "problems", look into DevExpress. I'm sure one of their components can do what you want.
  8. aehimself

    Securing your data over time

    Yes and yes. Since I have a dev environment at home I just added 2 extra hard drives mirrored (with daily automatic health check and warning E-mails). I do my development on my PC then syncing it upstream on a Git repository stored on this mirror. I have a physical RAID controller with a battery backup (salvaged a HPE P400 with 2 failed battery packs. Turns out it is using 4 AAA rechargeable batteries inside, so the quick fix was a matter of a bit of soldering) and the server is on a high capacity UPS. All this hassle for home, you are free to call me paranoid and I'm not going to argue 🙂 P.s.: I'm not considering any flash-based (including SSDs) devices suitable for backup. Their write cycles are low and sometimes you recognize something failed when you are reading information back. And that's too late if it's used for backup. Minimum a mirrored HDD (which is always on, so not USB-attached which "I keep safe in the wardrobe and only use when necessary". It's good for power consumption, but it's bad for lifespan) but the best is still a tape drive - IN MY OPINION. I have personal privacy and safety concerns when it comes to "cloud" data storage.
  9. FPiette

    Securing your data over time

    Please read what I said again. If you move 3rd party component it is likely you have to update their path, depends on the components and how you add it to your projects. Think about taking a backup on a regularly schedule. All disk will fail one day! Also think about using disk mirroring (RAID1) or other kind of RAID. With RAID (except RAID0), all you data is duplicated so even when a disk fails, you still have your data. Just replace the failed disk and go.
  10. David Heffernan

    Byte and Integer

    Couldn't take the traffic of tens of devs trying to vote for range checking enabled by default
×