Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 06/23/23 in Posts

  1. Uwe Raabe

    Delphi REST frameworks that run on Linux?

    What is your definition of a "REST framework"?
  2. Bart Verbakel

    W1057 during D7 -> D11 conversion

    Yes, I have to freedom to change the data structure. My first goal was to get the 20-year old source code working on D11 without any errors. That goal is already reached. Now I can focus on optimizing the source code to modern standards. I have to do some research to bridge this 20-year gap 😅 Bart
  3. programmerdelphi2k

    Registering user activity?

    @Uwe Raabe https://community.embarcadero.com/blogs/entry/using-app-tethering-to-enable-codesite-for-tracing-mobile-apps-with-bob-swart Look this:
  4. mvanrijnen

    Is there a Sunday between 2 dates ?

    working on it:) (wait for a batchjob to finish 🙂 so, can play around) UWE's method seems okay though
  5. mvanrijnen

    Is there a Sunday between 2 dates ?

    Yes, just experiented in Excel 🙂 pseudo: (DaysBetween(D2, D1) div 7) + ifthen(DayOfTheWeek(D1)=daySunday,1,0) ) + ifthen(DayOfTheWeek(D2)=daySunday,1,0) hmz, one off in some cases. pseudo (2): sundaycount := (DaysBetween(D2, D1) div 7); if (DayOfTheWeek(D1)=daySunday) or (DayOfTheWeek(D2)=daySunday) then sundaycount = sundaycount + 1; back to the drawing board 🙂
  6. TigerLilly

    Request help from kbm/Component4Developers

    Today is June, 23rd, you requested the licenses June, 22nd and 21st. So technically "a few days ago" is not correct. Give them a bit more time, I remeber, that my licenses needed indeed a few days to be activated.
  7. It would be cool to look at the Wine implementation of StrCmpLogicalW and port that to Pascal once and for all for a cross platform implementation. https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/kernelbase/string.c#L1298 Looks kinda simple really
  8. It's called "Natural" sort order. Explorer probably uses StrCmpLogicalW but there's also CompareStringEx with SORT_DIGITSASNUMBERS? See also: Sorting for Humans : Natural Sort Order
  9. I solved this problem by using OpenVPN!
  10. Anders Melander

    Localization of constant arrays - best practice?

    Like this: https://bitbucket.org/anders_melander/better-translation-manager/src/f96e7dcdba22667560178d32aebb5137484107f0/Source/amLocalization.Model.pas?at=master#lines-578 // ----------------------------------------------------------------------------- // // Strings // // ----------------------------------------------------------------------------- resourcestring sTranslationValidationWarningEmptyness = 'Source or translation is empty and the other is not'; sTranslationValidationWarningAccelerator = 'Accelerator count mismatch'; sTranslationValidationWarningFormatSpecifier = 'Format specifier count mismatch'; sTranslationValidationWarningLineBreak = 'Linebreak count mismatch'; sTranslationValidationWarningLeadSpace = 'Leading space count mismatch'; sTranslationValidationWarningTrailSpace = 'Trailing space count mismatch'; sTranslationValidationWarningTerminator = 'Translation is terminated differently than source'; sTranslationValidationWarningPipe = 'Pipe character count mismatch'; sTranslationValidationWarningSurround = 'Surround character mismatch'; const // Note: Must use PResStringRec or values will be of the language active at the time System._InitResStrings was called, // which means that the user language selection will not affect the values as it should. sTranslationValidationWarnings: array[TTranslationWarning] of PResStringRec = ( @sTranslationValidationWarningEmptyness, @sTranslationValidationWarningAccelerator, @sTranslationValidationWarningFormatSpecifier, @sTranslationValidationWarningLineBreak, @sTranslationValidationWarningLeadSpace, @sTranslationValidationWarningTrailSpace, @sTranslationValidationWarningTerminator, @sTranslationValidationWarningPipe, @sTranslationValidationWarningSurround); and then use the strings like this: https://bitbucket.org/anders_melander/better-translation-manager/src/f96e7dcdba22667560178d32aebb5137484107f0/Source/amLocalization.Dialog.Main.pas?at=master#amLocalization.Dialog.Main.pas-2600 Item.Caption := LoadResString(sTranslationValidationWarnings[Warning]); FWIW, I believe this is also the way the VCL/RTL itself does it.
  11. pyscripter

    How to execute function in Python script

    Something like: var SL := TStringList.Create; try SL.LoadFromFile('__main__.py'); GetPythonEngine.ExecStrings(SL); Mainmodule.run_settings(); finally SL.Free; end;
×