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 November, 2019

Scopes and names can really be deceiving. A classes in a hierarchy can have members with identical names…

Posted by jpluimers on 2019/11/21

Examples like the one below from [WayBack] Scopes and names can really be deceiving. A root class and a descendant class can both have public fields, properties and methods with the same name… – Lars Fosdal – Google+ used to be part of the “language day” during my 5 day Delphi introductory courses.

Maybe I should find back more of those from the days, brush them up a little, then post them in a repository.

The thread has some nice references to tools that give better warnings and comparisons with other languages.

Anyone wanting to assist with that?

Example code

Read the rest of this entry »

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

Any idea what exactly mean …licensed to test ??? My Delphi is…

Posted by jpluimers on 2019/11/20

Your Delphi “licensed to” might be totally different from what it is actually licensed to.

From [WayBack] Hello people, any idea what exactly mean …licensed to test ??? My Delphi is registered with a valid account, subscription, serial number and so on. – Dobrin Petkov – Google+, at least these sources might be used different from the actual licensee name:

  • the VLAN name
  • the Windows username of the one that installed it
  • the Windows licensee

–jeroen

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

xargs compressing lots of files using xz

Posted by jpluimers on 2019/11/20

One day, on a legacy Linux system, logrotate managed to skip some files in the middle of a sequence in /var/log.

Since I didn’t have time to sort out the cause (the system was being phased out), I used this to compress the rest of the log-files (dated in 2017):

sudo -u bash
pushd /var/log
ls | grep -vw xz | grep "\-20......$" | xargs -L 1 ls -alh

After that you can execute this in the same directory:

ls | grep -vw xz | grep "\-20......$" | xargs -L 1 time xz

It skips any xz files and includes only files in the year 2017.

I occasionally tracked progress with this:

ls -alh /var/log/ | grep -v xz | less

That got back a few gigabytes of disk space, just enough to help me migrate the system away.

–jeroen

Posted in *nix, *nix-tools, bash, logrotate, Power User | Leave a Comment »

git tag – How to delete a git remote tag? – Stack Overflow

Posted by jpluimers on 2019/11/20

When working with git, often the brevity of a solution is remarkable. Remembering how it can be so short is the hard part. An explanation why helps, for instance with [WayBackgit tag – How to delete a git remote tag? – Stack Overflow by markdorison.

He explains why you end up with:

git push --delete <origin> <tagname>

Here, <origin> is your remote, and <tagname> the tag to delete.

He explains other ways, which is done by [WayBackgist.github.com/mobilemind/7883996 as well:


# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push –delete origin tagName
git tag -d tagName

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management | Leave a Comment »

[Delphi] Delphi JSON Reformatter (text or html output) – Pastebin.com

Posted by jpluimers on 2019/11/19

I might need this in the future from Delphi: [WayBack] [Delphi] Delphi JSON Reformatter (text or html output) – Pastebin.com

Via [WayBack] I wrote a function to make JSON more readable, and naturally I wonder if I missed something crucial so that it eventually will break? There are probabl… – Lars Fosdal – Google+

–jeroen

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

Return empty cell from formula in Excel – Stack Overflow

Posted by jpluimers on 2019/11/19

I never thought you could do it, but you can: [Archive.isReturn empty cell from formula in Excel – Stack Overflow.

You have to crate:

  • a VBA function
  • a reference to a range that evaluates the function so it returns blank
  • a cell with a function that blanks the cell using the range

Convoluted, but clever!

–jeroen

 

Posted in Development, Excel, Office, Office VBA, Power User, Software Development | Leave a Comment »

Angle brackets in markdowndown needs to be escaped

Posted by jpluimers on 2019/11/19

A few days after filing <path> disappears from "Preview" rendering and also from actual rendering (at least in issues), I realised that this is by intent: Markdown allows to [WayBack] inline html which means that code like below will be all treated as such:

<path>

> <path>

*<path>*

**<path>**

> *<path>*

> **<path>**

The solution is to either escape or quote with back-ticks:

`<path>`

> `<path>`

*`<path>`*

**`<path>`**

> *`<path>`*

> **`<path>`**

Since WordPress also is based on pseudo-HTML codes, it too needs escaping.
–jeroen

 

Posted in Development, Lightweight markup language, MarkDown, Power User, Software Development | Leave a Comment »

How to change the User Account Control (UAC) level in Windows | Digital Citizen

Posted by jpluimers on 2019/11/18

Based on, but much shorter than, [WayBack] How to change the User Account Control (UAC) level in Windows | Digital Citizen which summary is

How to change how UAC prompts are shown in Windows 7, Windows 8.1 and Windows 10. How to disable UAC when you no longer want it turned on.

  1. Run UserAccountControlSettings.exe
  2. Pull the settings up to the highest one
  3. Confirm

–jeroen

Posted in Power User, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1 | Leave a Comment »

Download Earlier Versions of Office: 2010/2013

Posted by jpluimers on 2019/11/18

Not sure how long these will stay valid, but apparently my nl_office_professional_plus_2010_with_sp1_x86_x64_dvd_731121.iso was damaged (I forgot to check the hash) but I could download a fresh one from [WayBackDownload Earlier Versions of Office.

If you cannot find it by product key (I also tried it with a Visio one: worked fine too), then you can use [WayBackOffice 2010 direct link, X16-32250.exe, X16-32213.exe which are archived here:

–jeroen

via: [WayBack] Lost Office 2010 or 2013 CD/DVD? Legally Download Office From Microsoft

Posted in Office, Office 2010, Power User | Leave a Comment »

Intense Asymmetry and Self-Flagellation – @ASmartBear – WP Engine

Posted by jpluimers on 2019/11/18

Still so relevant: [Archive.isIntense Asymmetry and Self-Flagellation – @ASmartBear – WP Engine

Stop comparing yourself to something that is objectively incomparable.

via: [WayBack] Intense Asymmetry and Self-Flagellation – Marjan Venema – Google+

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »