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 December, 2017

Fixing Invalid HELO’s – major.io

Posted by jpluimers on 2017/12/08

for postfix and sendmail: [WayBackFixing Invalid HELO’s – major.io

Posted in *nix, *nix-tools, postfix, Power User, sendmail | Leave a Comment »

LPT: When struggling to hang a picture or mirror on a screw on the wall, push the spikes of a fork down over the screw,with the handle pointing up. Then slide the picture string down the fork down onto the screw.Then remove fork. : LifeProTips

Posted by jpluimers on 2017/12/08

Brilliant tip:

[WayBack] LPT: When struggling to hang a picture or mirror on a screw on the wall,
1. push the spikes of a fork down over the screw,with the handle pointing up.
2. Then slide the picture string down the fork down onto the screw.
3. Then remove fork.
LifeProTips

–jeroen

via:

Original:

Read the rest of this entry »

Posted in LifeHacker, Power User | Leave a Comment »

Pi-hole v3.2 Introduces Long-term Statistics, An Audit Log, Colours, and More! – Pi-hole®: A black hole for Internet advertisements

Posted by jpluimers on 2017/12/08

Cool: [WayBackPi-hole v3.2 Introduces Long-term Statistics, An Audit Log, Colours, and More! – Pi-hole®: A black hole for Internet advertisements.

Via: Ronald van Bolhuis

–jeroen

Read the rest of this entry »

Posted in *nix, Linux, Power User | Leave a Comment »

Writing Bug-Free C Code – free book by Jerry Jongerius

Posted by jpluimers on 2017/12/07

Since I’m in a C mood today: Free book: [WayBackWriting Bug-Free C Code, A Programming Style That Automatically Detects Bugs in C Codeby Jerry Jongerius / January 1995.

Be sure to credit the author.

Via: [WayBack] Writing Bug-Free C Code A Programming Style That Automatically Detects Bugs in C Codeby Jerry Jongerius / January 1995 – Ilya S – Google+

–jeroen

Posted in C, Development, Software Development | 1 Comment »

Let’s stop copying C / fuzzy notepad

Posted by jpluimers on 2017/12/07

Ah, C. The best lingua franca we have… because we have no other lingua francas. Linguae franca. Surgeons general? C is fairly old — 44 years, now! — and comes from a time when there were possibly more architectures than programming languages. It works well for what it is, and what it is is a relatively simple layer of indirection atop assembly. Alas, the popularity of C has led to a number of programming languages’ taking significant cues from its design, and parts of its design are… slightly questionable. I’ve gone through some common features that probably should’ve stayed in C and my justification for saying so. The features are listed in rough order from (I hope) least to most controversial. The idea is that C fans will give up when I call it “weakly typed” and not even get to the part where I rag on braces. Wait, crap, I gave it away.

Great re-read towards the end of the year: [WayBackLet’s stop copying C / fuzzy notepad

Via: [WayBack] Old and busted: emacs vs vi. New and hot: Language war, everybody against everybody else. – Kristian Köhntopp – Google+

–jeroen

Posted in .NET, APL, Awk, bash, BASIC, C, C#, C++, COBOL, CoffeeScript, CommandLine, D, Delphi, Development, F#, Fortran, Go (golang), Java, Java Platform, JavaScript/ECMAScript, Pascal, Perl, PHP, PowerShell, PowerShell, Python, Ruby, Scala, Scripting, Software Development, TypeScript, VB.NET, VBScript | 3 Comments »

Oh nice. Feel free to QP. E2003WithConstsInDescendingClassesConsoleProject

Posted by jpluimers on 2017/12/06

Oh nice. Feel free to QP. Fails at least in Delphi XE8.

program E2003WithConstsInDescendingClassesConsoleProject;

{$APPTYPE CONSOLE}

uses
ParentUnit in 'ParentUnit.pas',
ChildUnit in 'ChildUnit.pas';

begin
end.
unit ParentUnit;

interface

type
  TParent = class
  // section can be strict protected, protected, public, published or nothing
  const
    InitialBooleanValue = False;
    InitialIntegerValue = -1;
  end;

implementation

end.
unit ChildUnit;

interface

uses
  ParentUnit;

type
  TChild = class(TParent)
  // section can be strict protected, protected, public, published or nothing
  const
//    Initial and final values need to be different to test the behaviour
    FinalBooleanValue = not InitialBooleanValue;
    FinalIntegerValue = InitialIntegerValue + 1;
//[dcc32 Error] ChildUnit.pas(13): E2003 Undeclared identifier: 'InitialBooleanValue'
//[dcc32 Error] ChildUnit.pas(14): E2003 Undeclared identifier: 'InitialIntegerValue'
//[dcc32 Error] ChildUnit.pas(14): E2026 Constant expression expected
  end;

implementation

end.

[WayBackOh nice. Feel free to QP. unit ParentUnit; interface type TParent = class …

Posted in Delphi, Delphi XE8, Development, Software Development | 3 Comments »

DNS, glue records and TTL

Posted by jpluimers on 2017/12/06

If I ever need to read why, here are the explanatory links:

TL;DR:

  • You need glue records for your domains if the nameserver is in the same TLD as your domain is (more explanation in the above links).
  • Your domain registrar allows you to change both your DNS servers and the glue at the TLD servers.
  • Glue records have a TTL at the TLD of 48 hours so changing them takes some waiting.
  • This is how you query the glue records so you can verify what’s setup at your DNS servers matches the ones at the TLD servers (in the below examples, replace google.com by your domain name).

dig +trace +additional google.com

 

Notes:

At the time of writing the dig output is this:

Read the rest of this entry »

Posted in DNS, Internet, Power User | Leave a Comment »

Data Science Advent – franz.media

Posted by jpluimers on 2017/12/05

Cool: @filmfranz made an advent calendar on Python data analysis featuring a lot of Pandas examples referring to source code found on the interwebz: [WayBackData Science Advent – franz.media.

First example is to eliminate outliers in the below graph.

He also has a really cool (German) Playlist on data analysis with Python called Datenanalyse in Python and has a great site with examples at franz.media.

–jeroen

via: [WayBack] Very cool idea: an advent calendar with tips for doing data science with Python and Pandas created by @filmfranz 👉 http://franz.media/advent.html – ThisIsWhyICode – Google+

Posted in Development, Python, Scripting, Software Development | Leave a Comment »

Interactive map of Linux kernel

Posted by jpluimers on 2017/12/05

The [WayBackInteractive map of Linux kernel is way better than the static versions below that I got via

[WayBack] Interactive map of the Linux kernel subsystems. A little bit beyond what is required to use Linux. But great for those who want a deeper understanding of the kernel. – Joe C. Hecht – Google+

–jeroen

Read the rest of this entry »

Posted in *nix, Development, Linux, Power User, Software Development | Leave a Comment »

Delphi tip of the day: {$WARN UNSUPPORTED_CONSTRUCT ERROR} to get rid of W1025 when using an undeclared attribute

Posted by jpluimers on 2017/12/04

Delphi tip of the day:

{$WARN UNSUPPORTED_CONSTRUCT ERROR}

It will throw a compiler error when you use an attribute that isn’t defined as the above [WayBackturns a warning into an error as normally [WayBackUNSUPPORTED_CONSTRUCT is only a warning.

Which means that this code now fails:

type
  TmyClass = class
    [djhgfskdhgks]
    procedure One;
  end;

Thanks [WayBack] +Agustin Ortu for posting this tip!

I wish I had known this when I found the G+ post leading to On turning “W1025 Unsupported language feature: ‘customattribute’” into a compiler error.

–jeroen

via:

related:

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