The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,839 other subscribers

How and when are variables referenced in Delphi’s anonymous methods captured? – Stack Overflow

Posted by jpluimers on 2018/09/04

Just found some notes from 2013 for my research list that are still relevant:

Note that if you are using Smart Pointers, use the ones that Spring4D implemented in 2015 named Shared/IShared<T>/TShared<T>, see [WayBack] Spring4D – Pascal Today and [WayBack2] Smart Pointers will be in Spring4D 1.2.

–jeroen

Posted in Delphi, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development | Leave a Comment »

Plastic SCM command-line for merge and diff

Posted by jpluimers on 2018/09/03

Just in case I have Plastic SCM without Beyond Compare:

Merge

"C:\Program Files\PlasticSCM5\client\mergetool" -b="%TEMP%\baseFile-guid.pas" -bn="baseSymbolicName" -bh="baseHash" -s="%TEMP%\sourceFile-guid.pas" -sn="srcSymbolicName" -sh="srcHash" -d="...\destinationPath\destinationFile.pas" -dh="destinationHash" -a -r="%TEMP%\resultFile.pas" -t="text" -i="NotIgnore" -e="NONE" -m="forced" -re="NONE" --progress="progressDescription" --extrainfofile="%TEMP%\extraInfoFile.tmp"

Diff

To be done

aa

Merge help (takes about 10 seconds to start):

"C:\Program Files\PlasticSCM5\client\mergetool.exe" --help

---------------------------
Mergetool usage
---------------------------
Usage: mergetool [ | ]

    diffOptions:  []

    mergeOptions:   [] [[] [] ] [] []

        baseFile:            {-b | --base}= 
        baseSymbolicName:    {-bn | --basesymbolicname}=
        automatic:           -a | --automatic
        silent:              --silent
        resultFile:          {-r | --result}=
        mergeType:           {-m | --mergeresolutiontype}={onlyone | onlysrc | onlydst | try | forced}

    generalFiles:  []  []

        sourceFile:          {-s | --source}=
        srcSymbolicName:     {-sn | --srcsymbolicname}=
        destinationFile:     {-d | --destination}= 
        dstSymbolicName:     {-dn | --dstsymbolicname}=

    generalOptions: [] [] [] []

        defaultEncoding:     {-e | --encoding}={none |ascii | unicode | bigendian | utf7 | utf8}
        comparisonMethod:    {-i | --ignore}={none | eol | whitespaces | eol&whitespaces}
        fileType:            {-t | --filestype}={text/csharp | text/XML | text}
        resultEncoding:      {-re | --resultencoding}={none |ascii | unicode | bigendian | utf7 | utf8}
        progress:            {--progress}=progress string indicating the current progress, for example: Merging file 1/8
        extraInfoFile:       {--extrainfofile}=path to a file that contains extra info about the merge

    Remarks:
          
        -a | --automatic:    Tries to resolve the merge automatically.
                             If the merge can't be resolved automatically (requires user interaction), the merge tool is shown.
        --silent:            This option must be used combined with the --automatic option.
                             When a merge can't be resolved automatically, this option causes the tool to return immediately
                             with a non-zero exit code (no merge tool is shown).
                             If the tool was able to resolve the merge automatically, the program returns exit code 0.

    Examples:

        mergetool
        mergetool -s=file1.txt -d=file2.txt
        mergetool -s=file1.txt -b=file0.txt --destination=file2.txt
        mergetool --base=file0.txt -d=file2.txt --source=file1.txt --automatic --result=result.txt
        mergetool -b=file0.txt -s=file1.txt -d=file2.txt -a -r=result.txt -e=utf7 -i=eol -t=text/csharp -m=onlyone
---------------------------
OK   
---------------------------

The merge extraInfoFile.tmp has a syntax like this:

Source (cs:-#)
    relative-sourceFile from cs:-# created by userName on timeStamp
    Comments: Source changeset description

Base (cs:#)
    relative-baseFile from cs:#@/baseBranch by userName on timeStamp
    Comments: BO's + CRUDS 

Destination (cs:#)
    relative-destinationFile from cs@/destinationBranch created by userName on timeStamp
    Comments: Destination changeset description

Where each cs is a change set number.

–jeroen

Posted in Beyond Compare, Development, Encoding, PlasticSCM, Power User, Software Development, Source Code Management | Leave a Comment »

on the dB scales and audio

Posted by jpluimers on 2018/09/03

  • Double or twice the loudness = factor 2 means about 10 dB more sensed loudness level (psycho acoustic)
  • Double or twice the voltage = factor 2 means 6 dB more measured voltage level (sound pressure level)
  • Double or twice the power = factor 2 means 3 dB more calculated power level (sound intensity level)

Now that we’ve straightened that one out…

–jeroen

Source: [WayBackOutdoor speaker met versterker ontworpen door tweaker haalt doel op Kickstarter – Beeld en geluid – Nieuws – Tweakers

Posted in Algorithms, Development, LifeHacker, Power User, Software Development | Leave a Comment »

Calendar Link ParametersTeamup Calendar

Posted by jpluimers on 2018/09/03

A while back, I needed to show the Teamup Calendar for my marching band at a specific date.

Luckily I found [Wayback/ArchiveCalendar Link ParametersTeamup Calendar allowing me to assemble such link:

https://teamup.com/ks7a793f73fc4d5e89?date=2018-09-03&view=l

Which shows at the end of the month, we are going to perform on Tattoo on Stage in Luzern (Lucerne), Switzerland in the famous KKL concert hall:

KKL Luzern im Oktober: Tattoo on Stage mit Militär- & Show Bands aus der ganzen Welt. Das Festivalprogramm sowie Tickets gibt es bei worldbandfestival.ch

[Wayback/Archive] Tattoo on Stage | KKL Luzern, 01. Oktober 2017

We’ve been there before and it’s great fun! The [Wayback/Archive] New Zealand Army Band even did a haka challenge with us.

--jeroen

Posted in Cloud Apps, LifeHacker, Power User | Leave a Comment »

The Delphi VCL comes to Oxygene

Posted by jpluimers on 2018/09/03

Interesting approach, which makes one more “cross platform VCL” from outside the Embarcadero pipeline [WayBack] The Delphi VCL comes to Oxygene:

Developers switching from Delphi to Oxygene are loving our “Delphi RTL” compatibility library, as it helps them move their code over to new platforms without having to embrace all the new APIs at once. With the new Elements 10 builds we shipped in the past couple of weeks,

CrossVCL (by KSDev, the former FMX architects) already brings VCL to Linux through the Embarcadero compilers; VCL for Oxygene brings it – through the Oxygene compilers – to WebAssembly first and later to Cocoa and WPF.

I wonder how Windows VCL compatible both approaches are.

Via [WayBackhttps://blogs.remobjects.com/2018/08/30/the-delphi-vcl-comes-to-oxygene/ – Ondrej Kelle – Google+

–jeroen

Posted in Delphi, Development, Oxygene, Pascal, Software Development | 2 Comments »

cool solution for precise point positioning (PPP) GPS/GLONASS navigation on Raspberry Pi…

Posted by jpluimers on 2018/08/31

cool solution for precise point positioning (PPP) GPS navigation.The RasPiGNSS “Aldebaran” expansion board fits onto the Pi’s expansion connector (named P1).

Source: Hi all, I found this cool solution for precise point positioning (PPP) GPS na…

Device: Dr. Franz Fasching » Products » GNSS » RasPiGNSS [WayBack]

–jeroen

Posted in Development, Hardware Development, IoT Internet of Things, Network-and-equipment, Power User, Raspberry Pi | Leave a Comment »

Solution when xs4all keeps sending non-billing letters to the address where the internet connection is: change contact address

Posted by jpluimers on 2018/08/31

When applying for an internet connection with xs4all and specifying a different billing address, other letters still arrive at the address where the internet connection resides.

I had that, and didn’t want it: [WayBackTwitter / Notifications. You might not want it for different reasons.

After contacting the web care, both sides learned there are three addresses:

  • billing address (bills)
  • contact address (all other post than bills)
  • service address (where your internet connection – like fiber, ADSL – is connected)

according to the webcare person, it looked like you can only change the “contact address” through the service desk. You can, so that information is still below.

But contacting the service desk revealed that you can also perform two address changes on-line after logging in to https://mijn.xs4all.nl.

Of course you cannot change the service address as it is where your physical internet connection resides.

xs4all service desk:

[WayBackhttps://www.xs4all.nl/contact/

Klantenservice phone +31203987666

Opening hours:

  • 08:00 – 20:00 Monday through Friday
  • 10:00-17:00 Saturday

–jeroen

Read the rest of this entry »

Posted in LifeHacker, Power User | Leave a Comment »

It doesn’t have to be crazy at work

Posted by jpluimers on 2018/08/31

Reminder to check out if this book about “the calm company” has been released yet: [WayBack] It doesn’t have to be crazy at work.

Basecamp is an interesting company that has put action there there mouth is:

Trusted by millions, Basecamp puts everything you need to get work done in one place. It’s the calm, organized way to manage projects, work with clients, and communicate company-wide.

We’ve designed our company differently. We’re here to tell you about it, and show you how you can do it. There’s a path. You’ve got to want it, but if you do you’ll realize it’s much nicer over here. You can have a calm company too.

No, it is not The Little Book Of Calm, or another one of that series (;

If it is not yet out, you can still pre-order from Amazon in the USA and Europe:

–jeroen

Via: [WayBack] It Doesn’t Have to Be Crazy at Work https://basecamp.com/books/calm – Adrian Marius Popa – Google+

No it is not the book of calm (:

Read the rest of this entry »

Posted in LifeHacker, Power User | Leave a Comment »

Delphi: delete temporary file after response dispatched – Stack Overflow

Posted by jpluimers on 2018/08/30

A while ago, Marjan Venema was in need for [Archive.isDelphi SOAP: delete temporary file after response dispatched – Stack Overflow.

The solution there is a truly temporary file: a file stream that when the handle closes will have Windows delete the file by setting the correct flags.

The construct is functionally identical to the JclFileUtils.TJclTempFileStream [Archive.is].

It passes these [Archive.isfile attribute constant flags to the [Archive.isCreateFileW Windows API function:

  • FILE_ATTRIBUTE_TEMPORARY
  • FILE_FLAG_DELETE_ON_CLOSE

I was glad she asked, though I wanted a temporary file to last after debugging, so I wrote code like this because internally the same FileGetTempName method is used by the JCL:

var
// ...
  TempPath: string;
  TempStream: TFileStream;
  TempStreamWriter: TStreamWriter;
begin
// ...
  TempPath := FileGetTempName('Prefix');
  TempStream := TFile.Open(TempPath, TFileMode.fmOpenOrCreate, TFileAccess.faReadWrite, TFileShare.fsRead);
  try
    TempStreamWriter := TStreamWriter.Create(TempStream);
    try
      TempStreamWriter.WriteLine('Debug starts:');
      MyStringList.SaveToStream(TempStream);
      TempStreamWriter.WriteLine();
// ...
      TempStreamWriter.WriteLine('Debug finishes.');
    finally
      TempStreamWriter.Free();
    end;
  finally
    TempStream.Free();
  end;

–jeroen

Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | Leave a Comment »

TwistedDoodles • The truth about Eureka. (I say bollocks… A lot!)

Posted by jpluimers on 2018/08/30

The truth about Eureka.(I say bollocks… A lot!)

I bumped into this a while ago, but since I’ve been doing quite a bit of research lately, it’s worth repeating.

–jeroen

Source: TwistedDoodles • The truth about Eureka. (I say bollocks… A lot!)

Read the rest of this entry »

Posted in Development, Fun, LifeHacker, Power User, science, Software Development | Leave a Comment »