Jump to content

Lars Fosdal

Administrators
  • Content Count

    3504
  • Joined

  • Last visited

  • Days Won

    115

Everything posted by Lars Fosdal

  1. Lars Fosdal

    Split String

    You could fully qualify the call. System.SysUtils.SplitString( ... Sorry, brainfart: System.StrUtils.SplitString( ...
  2. Lars Fosdal

    win32 exe compiled in Delphi11 does not run on W2000

    Industrial machines that are not connected to a LAN - ok. IMO, any machine that is on a network - even if it can't reach the internet by itself - needs to be continously updated/patched, and replaced before EOL. It is like insurance. Money that feels like a waste until something bad happens.
  3. Lars Fosdal

    win32 exe compiled in Delphi11 does not run on W2000

    Still running Windows 2000... I can't find the words...
  4. Lars Fosdal

    Split String

    I'd use a helper array to avoid running the split twice. var Splits: TArray<string>; begin Splits := SplitString(MyStr,'-'); LeftMyStr := Splits[0]; RightMyStr := Splits[1]; end;
  5. Lars Fosdal

    Digitally Sign Applicaiton

    9009 = file not found. Does $(OUTPUTPATH) contain the actual exe file? And is the path to the certificate correct?
  6. I think calling AI for AI still is a misnomer. It is various facets of specialized ML. An actual self-organizing AI is very, very far in the future. A self-aware AI, even further in the future. As the problem domain becomes more complex, it will be harder and harder to tell the rubbish from the pearls. That is a real problem. I like tools that I can rely on. That I can trust. Actual knowledge that reflects reality, not constructs generated by algorithms with a certain risk of failure. Art generators like MidJourney, are fun and useful, and I even subscribe for $10/month to be able to play around with it - but AI art also pose a risk as it undermines actual artists. MidJourney prompt: "A computer programmer asks an AI to assist him in writing complex code, photography, ultrarealistic --v 4" It looks great until you notice the glaring mistakes.
  7. I'd love an AI that would suggest improvements to the code that I write, instead of writing the code for me.
  8. D11.1 is ok-ish. D11.2 has issues.
  9. Lars Fosdal

    Default(TMyRec) usage

    When I use records, it is exceedingly rare that they are left unfilled with actual values for very long, so I would tend NOT to initialize.
  10. Well, I should also pay better attention to details. My initial reply was VCL code, not an FMX code. My apologies. TComboEdit.OnChange handler procedure TForm2.ComboEdit1Change(Sender: TObject); begin if ComboEdit2.Items.IndexOf(ComboEdit1.Text) < 0 then ComboEdit2.Items.Add(ComboEdit1.Text); ComboEdit2.ItemIndex := ComboEdit2.Items.IndexOf(ComboEdit1.Text); end;
  11. Lars Fosdal

    Footman

    with is a horrific construct with loads of pitfalls. Don't use it.
  12. Lars Fosdal

    How to check and set

    My own scheduler loads a config, and has events added dynamically based on the config settings. Config-wise, events can be oneshot or repeating. My settings allows for fixed intervals, or specific timeslots during a day. The settings are parsed and a scheduler, which basically is a list of times and what is supposed to happened at that time, is rebuilt on startup and at midnight for today's events. Events that are in past time are removed. It also add specific built in events such as weekly events or overnight events. Basically, your timer would then look up "Now" and compare it to the sorted list of events in the scheduler. If "Now" > "Event.Time", trigger the event and remove the entry from the scheduler. In my case, it creates threads specific to the event. How frequently you need to check "Now" and scan the events, depends on how urgent it is that the event happens on time.
  13. Lars Fosdal

    How to check and set

    Which version of Delphi? I am being very terse, since doing is learning. Checkbox.Checked gives you the boolean state of the checkbox MemoField.Text returns the text where you have the day See https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Date_and_Time_Support for how to compare timestamps
  14. Copying the code from D11.x would definitively be a no-no. Recreating the functionality where needed with your own code - no problem.
  15. Do you want to add the selected from ComboEdit1 to the dropdown of ComboEdit2? Hook Combo1Edit.OnSelect procedure TForm4.ComboEdit1OnSelect(Sender: TObject); begin ComboEdit2.Items.Add(ComboEdit1.Text); end; This event is called when an item is selected from the dropped down list of ComboEdit1. Naturally, you need to add code to see if the item has already been added before you add it.
  16. Lars Fosdal

    Object files for Google Snappy C API?

    The quality of posts is far more important than the quantity of posts. Focus on the quality of your posts, and you'll have no complaints.
  17. Lars Fosdal

    The Delphi 11.2 release thread

    Just to capture the gossip 🙂
  18. Another option: REST server used by REST client (thick or thin)
  19. Lars Fosdal

    VM and Legacy apps

    I used to use VMWare for Workstation on Windows years ago, but haven't looked back after switching to Hyper-V, running Windows 11 in the VMs. I use Parallells on my MBP M1, running Windows 11 for ARM in the VMs.
  20. Lars Fosdal

    Delphi beta testing a "premium" privilege?

    Except they are not new products (I've opted out from everything but RAD Studio).
  21. If you have a need for updating a wider range of data, synchronously or asynch, to clients - combining MQTT with Kafka is really powerful. https://medium.com/python-point/mqtt-and-kafka-8e470eff606b
  22. TMS MQTT sounds like a good choice. Disclaimer: I have not used it myself. But - plan ahead for service discovery. Query a discovery server for a valid endpoint config. Query again if a new discovery server is detected. Query that server for the actual MQTT connection to use, then connect. Because, servers come and go.
  23. Lars Fosdal

    Upload media to WhatsApp cloud API

    curl -F emulates filling content on a web page and pressing enter. I've not used -F before, so I am not sure if the reference 'item' in 'item=something' identifies the field to be filled, and that the right side is what it should be filled with?
  24. Lars Fosdal

    Delphi beta testing a "premium" privilege?

    Why? It is stupid and annoying.
  25. It is odd that it works with remote debug symbols enabled, though.
×