Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 08/31/23 in all areas

  1. Hello to all, this will be short, a few months ago I was in my local hospital to fill in a pre admission form when my blood pressure was taken and imediately a Medical Emergency Team (MET) was called which landed me in hospital over night, the problem with this was, I was feeling absolutely fine so 9-10 people were diverted from looking after those in more need than I was. Cutting a long story short, I started to create my application, it is /was and still being written in c++ Builder Berlin and now 11.3 Alexandria. Please download a version from www.mbp.bcbhelper.com it is generally updated as often as I get around to it and it is still Work in progress so do expect you will come accross anoying bugs, I would like to know where you fid them so I can fix. The applicatiion is distributed FREE of any charge, there are NO popups asking for this, that and whatever it is intended for the the home user of blood pressure monitors to help out the medical industry by providing observations taken in the home environment, it is designed to run off USB stick, it can be taken to your doctors office/ rooms, hospital or to any other medical practitioner where they require access to the type of data that would assist the provide you with reliable blood pressure readings taken in a relaxed environment from your manual, automatic or smart watch monitoring system, this completely avoids the white coat syndrom experienced by most people who have their blood pressure taken in the doctors office/rooms. It maintains your pharmaceutical list, doctors and other appointments, ability to mark on body grams where pain and injury details can be tagged, the application (not complete) will speake to you explaining where you are what buttons do, what is expected in data fields on entry forms. The best thing to do now is to downlad the application it is safe to do so, give it a go and let me know what you think and how it can help you maintain your health. Thanks in advance...
  2. Brian Evans

    Windows ARM support ?

    You would need to be a sadomasochist to trust Microsoft until such a platform is well established. Windows RT was over a decade ago and those who got sucked into developing for it wasted time and money. Even worse would be anybody who developed for the various incompatible iterations of Windows Phone. Also no rush as the small number of such devices sold supporting the new "Windows on ARM" attempt are able to run Win32 applications (x86 with Windows 10 and x86/x64 with Windows 11).
  3. Fresh code: https://github.com/VSoftTechnologies/DUnitX Typical code that we test with DUnitX: - value to string and string to value - lookup functions - generic classes - formatters as well as database integration tests (CRUD) How do you guys use it?
  4. Uwe Raabe

    What is the benefit of sorting the Uses clause?

    It started with the request to expand the unit scope names, which gave a good boost to compile time in some cases. The idea of uses clause grouping and sorting crept in my mind when I noticed difficulties to quickly scan the list of used units. With a sorted and grouped uses clause the used libraries are clearly visible immediately. So its partly for compilation speed as well as a neat look (some call it OCD).
  5. K and n are integers. All representable floats are of the form k*2^n. So 1/3, 1/10 aren't of that for, and aren't representable. I doubt that you need to store these numbers exactly. But we don't know your requirements.
  6. You can see that it's impossible to store irrational numbers in floats. Indeed even rationals can't be stored exactly in floats, unless they can be expressed as above, k*2^n.
  7. Yes but it's hard to see the relevance. Representable numbers have the form k*2^n. Perhaps you don't actually need exact representability. We don't know what your requirements are.
  8. Sherlock

    I have created MBP (My Blood Pressure)

    Good work. Generally high blood pressure is considered a silent killer. It almost did me in three years ago. So check it regularly!
  9. Lars Fosdal

    Windows ARM support ?

    I absolutely love Win 11 for ARM on my MBP, but it does irk me that I cannot create native apps for ARM.
  10. Why can't you run both on the host machine? If you want to understand what code is doing, I highly recommend using a TraceTool or logger: https://github.com/capslock66/Tracetool
  11. Even rational numbers aren't exactly representable. Examples include 1/3 and 1/10.
  12. Pi was an example, I meant using an "irrational" number with a float, i.e. increasing the number of significant digits in the calculation...at least I think that's what @skyzoframe[hun] wanted suggestions on.
  13. mvanrijnen

    Strange behaviour Windows VCL app on specific laptop

    A, at the end (after months) we (accidently) discovered that is was because of Windows Scaling (was set to 300%).
  14. In my applications (even with robot guides) I also tend to use only integers (for example managing the vector of the last movement section precisely with integers), but having carried out several applications with robots I must say that often the float calculations are unavoidable, for example if you have to perform non-linear movements, perhaps using "quaternions". So it could be that the request made by @skyzoframe[hun] in this thread is legitimate and that its use is also a necessity. Bye
  15. I feel like the size of the structures or movements are almost irrelevant as long as you don't change magnitudes. As @Leif Uneus said, integers could be enough. Any calculations could be done on the fly, as movements are almost always slower than calculating speed.
  16. Remy Lebeau

    IdTCPServer IdTCPClient knowledge.

    Again, the PeerPort alone is typically not unique enough to identify clients. You are better off assigning your own custom IDs to the TIdContext objects when clients connect/login, eg: type TMyContext = class(TIdServerContext) UserID: string; end; var Clients: TIdThreadSafeStringList; procedure TMyForm.FormCreate(Sender: TObject); begin Clients := TIdThreadSafeStringList.Create; IdTCPServer1.ContextClass := TMyContext; IdTCPServer1.Active := True; end; procedure TMyForm.FormDestroy(Sender: TObject); begin IdTCPServer1.Active := False; Clients.Free; end; procedure TMyForm.IdTCPServer1Connect(AContext: TIdContext); var UserID: string; List: TStringList; begin UserID := ...; // read user ID from client List := Clients.Lock; try if List.IndexOf(UserID) <> -1 then begin AContext.Connection.Disconnect; Exit; end; List.AddObject(UserID, AContext); TMyContext(AContext).UserID := UserID; finally Clients.Unlock; end; end; procedure TMyForm.IdTCPServer1Disconnect(AContext: TIdContext); begin if TMyContext(AContext).UserID <> '' then Clients.Remove(TMyContext(AContext).UserID); end; And then you can search your Client's list for your user IDs whenever you need, and then you'll have access to the TIdContext object. Just be careful accessing it if it happens at the same time that the client disconnects. That's why if you intend to send data from outside of the server's own threads, it is best to add a queue to the TIdContext and have the OnExecute event send the queue when safe to do so.
  17. darnocian

    Direct vs. Indirect access of service by a Client?

    @David Schwartz The approach of placing some middleware in front of the database is definitely better. The benefit of the approach vs direct db access is that you are likely to have more options in terms of scalability and support, and ability to centralise business logic. If you define the service contract well, you can change the implementation of the backend, as long as you don't break the contract, and all your clients can continue working. From a scalability perspective, you can easily put a load balancer in place to front multiple servers. When it comes to the db, you could have multiple read replicas with the backend server spreading the load between them, if your system is more read heavy. Anyways, it all depends on the problem you have, but having a service offering does give you options. It can become a pain if you have multiple clients (say desktop, web, mobile) having to implement business logic - one could get out of date because of a bug and management forgot to replace the contractor that was last working on that client that everyone forgot about. 😉 Further, you also have away of measuring usage, as you can enable logging, whereas with direct access to a db, you would need to query db logs or something. Further, the art of the service contact is how much data is in a request/response, do you make lots of small calls, or do you make one big one, etc... all depends on the problem. So with Google Firebase DB, I've seen mobile clients connect directly to it. Many companies have found this attractive in terms of simplicity, as an object store, it is easy to add / query items. However, I've seen issues where initially people get excited as it is so fast just accessing the db directly. then the pain creeps in there are different clients that have implemented the business logic internally. Anyways, you have to be careful about the use case and the problem being solved. Typically a cloud functions (like an aws lambda) could also linked to an endpoint to wrap business logic. I havn't tried using Firebase from TMS, so can't comment, but google essentially exposes the nosql db like a rest api (https://firebase.google.com/docs/reference/rest/database) So all the scalability and separation between implementation is handled by google probably in ways I've described, and hidden to the end user / developer. In my opinion, it is still a db store, so I'd still prefer to with front business layer or something vs going directly in. in my opinion, it is definitely useful to create the abstraction of having a service to front the db / storage ecosystem. don't expose the sql or whatever the underlying storage query language directly to the user, as you are then you are exposing internals and likely to have problems later where some friendly guy sends a 'drop table transactions' or something. 😉
  18. Hi All I recently did a presentation to the Australian Delphi User Group (ADUG) over zoom - the presentation was recorded and uploaded to youtube - thought it might be worth sharing here 😉 I talked a bit about devops in general, then Continuous Integration and Automated Builds, before showing Continua CI using MSBuild (and a bit of FinalBuilder), running a build, running unit tests etc.
  19. Anders Melander

    Best approach to Multi-file, multi-thread debug logging

    You might want to look at the Windows Event Tracing API. I haven't used it personally. What I have used is something like this: In your application the log entries are written to a thread safe, lock free, linked list (Windows SList). A separate thread reads from the SList and write entries to a circular buffer in a memory mapped file. A separate process reads entries from the circular buffer in the memory mapped file and write the entries to a disk files.
×