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,860 other subscribers

Archive for October, 2019

Delphi code completion fail with anonymous methods – Stack Overflow

Posted by jpluimers on 2019/10/28

[WayBack] Delphi code completion fail with anonymous methods – Stack Overflow.

It also often fails by inserting end; inside if/then/else statements having a proper begin/end blocks.

The reason is that code completion uses a different parser than the regular Delphi compiler.

Chances of these issues to get fixed are close to zero, because another part of the problem is that there is no formalised Delphi language grammar, not even at Embarcadero itself.

I wish there was an Embarcadero sanctioned grammar (see [WayBack] “The arguments that won the day for us here were about strengthening the ecosystem and becoming the best tooled language on the planet. They were about … – Jeroen Wiert Pluimers – Google+). Actually I had that wish like in the end of the 1990s, but I cannot find my forum post archive back.

The best reverse engineered grammar is DelphiAST: a well maintained open source project implementing an Abstract Syntax Tree for Delphi.

Via: [WayBack] SO…/delphi-code-completion-fail-with-anonymous-methods I have seen this question and I am curious. There is an… – Alberto Miola – Google+

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

TestDisk, Data Recovery; free and open source

Posted by jpluimers on 2019/10/28

Interesting tool that I needed one day to figure out how to recover from a certain NTFS partition having become RAW [Archive.is/WayBackTestDisk, Data Recovery:

TestDisk is powerful free data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software: certain types of viruses or human error(such as accidentally deleting a Partition Table). Partition table recovery using TestDisk is really easy.
TestDisk can
  • Fix partition table, recover deleted partition
  • Recover FAT32 boot sector from its backup
  • Rebuild FAT12/FAT16/FAT32 boot sector
  • Fix FAT tables
  • Rebuild NTFS boot sector
  • Recover NTFS boot sector from its backup
  • Fix MFT using MFT mirror
  • Locate ext2/ext3/ext4 Backup SuperBlock
  • Undelete files from FAT, exFAT, NTFS and ext2 filesystem
  • Copy files from deleted FAT, exFAT, NTFS and ext2/ext3/ext4 partitions.
TestDisk has features for both novices and experts. For those who know little or nothing about data recovery techniques, TestDisk can be used to collect detailed information about a non-booting drive which can then be sent to a tech for further analysis. Those more familiar with such procedures should find TestDisk a handy tool in performing onsite recovery.

–jeroen

Posted in *nix, Apple, Mac, Mac OS X / OS X / MacOS, Power User, Windows | Leave a Comment »

Taking short 5m breaks throughout the day isn’t such a bad idea at all…

Posted by jpluimers on 2019/10/28

Interesting that the world at large found out about the 1980s Pomodoro Technique:

[WayBack] Taking short 5m breaks throughout the day isn’t such a bad idea at all: “on average, mindfulness participants gained 62 minutes of productivity a week, … – Marjan Venema – Google+

She refers to [WayBack] The Busier You Are, the More You Need Mindfulness which states You can get benefits in as little as two minutes.

–jeroen

PS: she means 5 minute breaks, not 5 meter breaks (:

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

Eef Meijerink op Twitter: “Krijg je binnenkort ongevraagd een anti-abortus folder in je brievenbus? Die kan gewoon retour afzender: Antwoordnummer 1139 3900 VB Veenendaal Ik zeg doen!”

Posted by jpluimers on 2019/10/27

[WayBack] Eef Meijerink op Twitter: “Krijg je binnenkort ongevraagd een anti-abortus folder in je brievenbus? Die kan gewoon retour afzender: Antwoordnummer 1139 3900 VB Veenendaal Ik zeg doen!”

Kosten antwoordnummer van [WayBack] Antwoordnummer | PostNL:

Tarieven antwoordnummer brieven

Aantal stuks 1-100 100-2500 2500-5000 Abonnement
Btw btw-vrij excl. btw excl. btw excl. btw
Gewicht
0 – 20 g € 0,88 € 0,87 € 0,86 209,50 per jaar
20 – 50 g € 1,76 € 1,74 € 1,72
50 – 100 g € 2,64 € 2,61 € 2,57
100 – 350 g € 3,52 € 3,49 € 3,43
350 g – 2 kg € 4,40 € 4,35 € 4,29
Let op: Als de locatie van bezorging van antwoordnummerpost meer dan vijftien kilometer van het antwoordnummer is verwijderd, wordt over de antwoordzendingen 15 procent toeslag in rekening gebracht.

Tarieven antwoordnummer pakketten

Gewicht Tarief per stuk (excl. btw) Abonnement (excl. btw)
0 – 5 kg € 7,74 € 209,50 per jaar
5 – 10 kg € 10,11
10 – 20 kg € 11,78
20 – 30 kg € 14,09
Let op: Als de locatie van bezorging van antwoordnummerpost meer dan vijftien kilometer van het antwoordnummer is verwijderd, wordt over de antwoordzendingen 15 procent toeslag in rekening gebracht.

Ik ben trouwens verwonderd dat je voor een kleine anderhalve ton in EUR je alle Nederlanders kunt spammen: [WayBack] Anti-abortusfolder in de bus bij iedere Nederlander | Politiek | AD.nl

jeroen

Posted in LifeHacker, Power User | Leave a Comment »

cancer awareness month: always follow up on changed bowel habits

Posted by jpluimers on 2019/10/25

Today I found out I most likely have rectal cancer.

I got that result by following up on my changed bowel habits, eliminating causes one by one.

Soon I will know for sure and follow proper treatments.

So as part of cancer awareness month:

Please follow up on changes in your bowel habits.

–jeroen

Posted in About, Awareness, Personal | Leave a Comment »

Blocklist Collection ¦ Firebog

Posted by jpluimers on 2019/10/25

via gitter.im/pi-hole/pi-hole: [WayBack] Blocklist Collection ¦ Firebog

Pi-hole compatible blocklists for you to have a more enjoyable online presence

Thanks Mark Drobnak @Mcat12 for suggesting this.

–jeroen

Posted in LifeHacker, Power User, Raspberry Pi | Leave a Comment »

Using Chrome on Windows with a different proxy server than the system one (which is used by Internet Explorer)

Posted by jpluimers on 2019/10/25

By default, Chrome uses the same proxy server as Internet Explorer: the system one that your Chrome settings page accesses from chrome://settings/search#proxy through this command-line call:

"C:\Windows\system32\rundll32.exe" C:\Windows\system32\shell32.dll,Control_RunDLL C:\Windows\system32\inetcpl.cpl,,4

There is no GUI way inside Chrome to change this, but there is a command-line parameter: --proxy-server="ipaddress:port"

So create a new shortcut to Chrome, then you can change it.

This comes in very handy if you want to test

  • some sessions through for instance Internet Explorer going through HTTP Fiddler (that defaults at localhost:8888)
  • other sessions through Cntlm (that defaults to localhost:3128)

Some background information:

–jeroen

Posted in Chrome, Cntlm, NTLM, Power User, Web Browsers, Windows, Windows 7, Windows 8, Windows 8.1, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista, Windows XP, Windows-Http-Proxy | Leave a Comment »

CSP and bookmarklets

Posted by jpluimers on 2019/10/25

If you find out bookmarklets like the [WayBack] Press-This or [Archive.is] SubToMe do not work on some pages but to on others.

Often it’s not the bookmarklet, but a combination the site disabling CSP (Content Security Policy) and browsers not coping well with that, see for instance:

via:

Read the rest of this entry »

Posted in Bookmarklet, CSP, Power User, Security, Web Browsers | Leave a Comment »

use the JVCL’s TJvXxxAppStorage to store float values as strings while controlling the decimal separator…

Posted by jpluimers on 2019/10/24

For my link archive: [WayBack] Is there a way to use the JVCL’s TJvXxxAppStorage to store float values as strings (e.g. “10.152”) rather than hex dumps and also control the decimal separator… – Thomas Mueller (dummzeuch) – Google+ with a solution by Achim Kalwa:

+Thomas Mueller You may try this:

type
  TMyStorage = class(TJvAppRegistryStorage)
  protected
    procedure DoWriteFloat(const Path: string; Value: Extended); override;
  end;
  TJvAppRegistryStorage = class(TMyStorage);
...
Implementation

{ TMyStorage }

procedure TMyStorage.DoWriteFloat(const Path: String; Value: Extended);
var
  SValue : string;
  FS     : TFormatSettings;
begin
  FS := TFormatSettings.Create;
  FS.DecimalSeparator := '.';
  FS.ThousandSeparator := #0;
  SValue := FloatToStr(Value, FS);
  DoWriteString(Path, SValue);
end;

And you need to set
StorageOptions.FloatAsString := False;

–jeroen

 

Posted in Delphi, Development, Software Development | Leave a Comment »

OpenSuSE: the relation between /etc/var/named.d and /var/lib/named

Posted by jpluimers on 2019/10/24

For first time BIND named users on OpenSuSE there is often confusion on the relation between these directories:

  • /etc/named.d/
  • /var/lib/named/

For example here someone else struggled: [WayBackRe: Fwd: Re: [opensuse] Split DNS? Solved

This is how I inferred the workings:

The /etc/named.conf.include is re-generated at named start by running /usr/share/bind/createNamedConfInclude by including files that both match NAMED_CONF_INCLUDE_FILES in /etc/sysconfig/named and exist in the /etc/named.d/ directory.

At named startup, it also copies everything from /etc/named.d to /var/lib/named/etc/named.d

For details see

–jeroen

Posted in *nix, *nix-tools, bind-named, Linux, openSuSE, Power User, SuSE Linux | Leave a Comment »