Jump to content

Lars Fosdal

Administrators
  • Content Count

    3504
  • Joined

  • Last visited

  • Days Won

    115

Everything posted by Lars Fosdal

  1. Lars Fosdal

    Thread programming without sleep or WaitFor events

    Interesting read!
  2. Lars Fosdal

    Windows Build 1909

    Ok, thank you Microsoft for being so clear and transparent 😛 From the host From the VM But the OSHAL is the same for both. PS C:\> Get-ComputerInfo | select WindowsProductName, WindowsVersion, OsHardwareAbstractionLayer WindowsProductName WindowsVersion OsHardwareAbstractionLayer ------------------ -------------- -------------------------- Windows 10 Enterprise 1909 10.0.18362.752 The Revision doesn't appear to be showing from the environment string PS C:\> [System.Environment]::OSVersion.Version Major Minor Build Revision ----- ----- ----- -------- 10 0 18363 0 So if anyone knows how to get the xxx from 18363.xxx in PowerShell, I'd like to know.
  3. Lars Fosdal

    Windows Build 1909

    Strange. My VM is also "free roaming" but was on the same build as my main. I am pulling latest cumulative update now to see what build I get and have switched off sourcing updates from local computers. ... and it is still the same build. I would have expected my build to be the same as yours, but it is 18362.752 vs your 18363.815. Are you sure you are not on the Windows Insider track?
  4. Lars Fosdal

    Windows Build 1909

    No issues. Are you on the fast ring, Sherlock? I suspect our corporate enterprise version isn't exactly at the bleeding edge.
  5. Lars Fosdal

    XML to SVG

    Joe, I am all for open source. That said - open source does not necessarily equate free (in as not having a cost) to use. If someone spent a good deal of time on writing code for a specific purpose, and there is a market for that code, I see no problem with asking for a monetary contribution for somebody else to use that code. Buying it is a voluntary action. Of course, people will only buy it if it adds value over any "free" competitors. As for the cost: For an individual developer, the cost may seem steep. If we are not swimming in cash from our own product, it is hard to defend spending cash buying code. From a corporate perspective, it is cheap since the ISV takes responsibility for dealing with bug reports and feature requests. We happily pay ISVs like Eurekalog, TMS, and others because their products have value to us. They solve a problem and save us time. If this SVG lib does that for somebody, it is worth the money for them.
  6. Lars Fosdal

    Making method with default encoding

    TEncodingType = (encDefault, encUTF7, encUTF8, encUnicode, encBigEndianUnicode, encMBCS, encExpandThisTypeAsNeeded); TEncodingHelper = record helper for TEncodingType private class var FMyDefault: TEncodingType; public function Encoding: TEncoding; overload; // which calls the method below with Self function Encoding(const aEncodingType: TEncodingType): TEncoding; overload; // which look up the relevant TEncoding constants. class property FMyDefault: TEncodingType read FMyDefault write FMyDefault; end;
  7. Lars Fosdal

    Making method with default encoding

    A helper type / class could be an alternative. TEncodingType = (encDefault, encUTF7, encUTF8, encUnicode, encBigEndianUnicode, encMBCS, encExpandThisTypeAsNeeded); TEncodingHelper = record helper for TEncodingType function Encoding: TEncoding; overload; // which calls the method below with Self function Encoding(const aEncodingType: TEncodingType): TEncoding; overload; // which look up the relevant TEncoding constants. end;
  8. Lars Fosdal

    Making method with default encoding

    TEncoding.Default ?
  9. Lars Fosdal

    XML to SVG

    So... I went full tilt A**hole Admin and removed the noise. 1. Don't assume everything is an insult 2. Don't abuse the report system
  10. Lars Fosdal

    XML to SVG

    I agree with the sentiment of never buying components without source code. That said - $299 for 8 licenses with source code is not over the top for what appears to be a capable piece of code. Still, it would have been nice to see a $149..1xx single user license including source. Please keep the commentary polite and constructive.
  11. Lars Fosdal

    Where did I come from

    Good point.
  12. Lars Fosdal

    Where did I come from

    I usually have a construct which I check in the event UI handlers. If I am writing changes to the UI, the event handler contains a busy check. type TGuard = record private FBusy: Integer; public procedure Enter; // Increments FBusy procedure Leave; // Decrements FBusy function Busy: Boolean; //True if FBusy > 0 function Idle: Boolean; // not Busy end; // In the form/frame type TMyForm = class(TForm) protected Update: TGuard; //... procedure TMyForm.UpdateUI; begin Update.Enter; try CheckBox1.Checked := TrueOrFalse; finally Update.Leave; end; end; procedure TMyForm.OnCheckBox1Clicked(sender: TObject); begin if Update.Busy then Exit; // do the event handling
  13. Lars Fosdal

    Profiler for Delphi

    Anders, what about https://github.com/andremussche/map2dbg? Can that produce the necessary debug files for VTune to play ball on Delphi line by line?
  14. value of myQuery is undefined at call to createMyQuery. Check your hints and warnings.
  15. Lars Fosdal

    looking for a lo-fi Delphi Style

    It has become better over the years, but it is only as good as the processes of each company. Before, it could happen if you were a lowly developer, that there was a manager above you that set target dates not on your effort estimates, but on targets presented as wishes from the sales people and the upper management team.
  16. Chrome: Version 81.0.4044.122 (Official Build) (64-bit) partly managed by our IT org.
  17. I successfully downloaded it just now, and I did not get a warning. I have to say that I became very skeptical when I saw Softpedia mentioned, as they have a long history with bundling files with other installers like "helpers" for browsers. I did not run the installer.
  18. Lars Fosdal

    looking for a lo-fi Delphi Style

    Wow, you've been lucky. Perhaps it is primarily a plague for corporate developers.
  19. Lars Fosdal

    looking for a lo-fi Delphi Style

    In theory, it is possible to take a .dfm and convert it to an SVG illustration. Not sure there is a huge commercial market, but it surely is something that many would appreciate having to avoid those pointy haired bosses thinking that your two-hour-tossed-together-good-looking Delphi prototype is a complete application that just needs a little testing.
  20. Lars Fosdal

    Date in Android call log

    Aha - I assumed the UnixToDateTime did milliseconds - but it also requires seconds. If you change your code to CallTimeDouble := UnixToDateTime(Round(StrToInt64(DATEx)/1000), false); you should get local time, which for you is UTC + 3 ? So '1587377791601' is 2020.04.20 13:16:32,000
  21. Lars Fosdal

    Date in Android call log

    program Test; uses SysUtils, DateUtils; const USec: Int64 = 1587377791601; var dt: TDateTime; begin dt := UnixToDateTime(Usec); Writeln(FormatDateTime('yyyy.mm.dd hh:nn:ss,zzz', dt)); end. spits out 52272.01.01 03:26:41,000 Are you sure that you wrote an actual example value?
  22. To write an expert that helps separate the UI from the logic would be far from trivial. I strive to write code that is testable, something that Steve McConnell's "Code Complete" drilled into me. My logic routines and biz objects are created without a UI, and the UI itself is connected afterwards. I make an effort to isolate the displayed data from the data that is actually used. I.e. a grid only reflects the underlying data, and all work is done on the underlying data and not the data in the grid itself. A checkbox state reflects the underlying state, and a change to the checkbox affects the underlying data - which then again applies any recalculations to states, and suggest a refresh of the display. The benefits: It is easy to write unit tests and integration tests for the biz logic. It is easy to reuse the code, or change the UI. It also simplfies changing the biz.logic as it is inside the "black box" object, and not heavily tied to the UI. If the tests says the object works, and the app doesn't work - the error is in the coupling between the non-visual object(s) and the UI. The drawback: There is a certain degree of data duplication - but the cost of that is quite limited. You can use proxy classes and/or Attributes/RTTI to associate elements between the non-visual and UI elements. Divide and conquer is good - but hard unless applied from the start on.
  23. Lars Fosdal

    UI resource manager design

    http://docwiki.embarcadero.com/RADStudio/Rio/en/TeeChart
  24. Lars Fosdal

    Receiving incoming calls

    Have you setup the required permissions in the Android manifest? From https://developer.android.com/reference/android/telephony/PhoneStateListener#onCallStateChanged String: call phone number. If application does not have READ_CALL_LOG permission or carrier privileges (see TelephonyManager#hasCarrierPrivileges), an empty string will be passed as an argument.
  25. Lars Fosdal

    UI resource manager design

    https://docs.microsoft.com/en-us/windows/win32/perfctrs/using-the-pdh-functions-to-consume-counter-data
×