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 June, 2018

Check if a domain is services by GMail for Business (former Google Mail for your domain)

Posted by jpluimers on 2018/06/15

Google can service mail for a domain. Alphabet has renamed this service over time:

Anyway: at the time of writing it is at https://gsuite.google.com/products/gmail/.

If you send mail to such a domain and the user doesn’t exist, you get a confusing error message like this:

<<< 550 5.1.1 https://support.google.com/mail/?p=NoSuchUser [^] j191si981824wmd.134 - gsmtp

So I wanted to test if a domain is being services by gmail and found this StackExchange question:

Basically you can test it in two ways:

dig takeheart.com mx
takeheart.com. 86399 IN MX 20 ALT1.ASPMX.L.GOOGLE.com.
takeheart.com. 86399 IN MX 30 ALT2.ASPMX.L.GOOGLE.com.
takeheart.com. 86399 IN MX 10 ASPMX.L.GOOGLE.com.
takeheart.com. 86399 IN MX 40 ASPMX2.GOOGLEMAIL.com.
takeheart.com. 86399 IN MX 50 ASPMX3.GOOGLEMAIL.com.

–jeroen

Puns:

–jeroen

 

Posted in Google, Google Apps, Power User | Leave a Comment »

gmail – Way to automatically download or print attachments or URLs from emails with specific labels – Web Applications Stack Exchange

Posted by jpluimers on 2018/06/15

Seems that IFTTT might be able to help me out here: [WayBack] gmail – Way to automatically download or print attachments or URLs from emails with specific labels – Web Applications Stack Exchange

[WayBackCreate a new document in GDrive when you receive a digital receipt in your Gmail. #drive #gmail #rec – IFTTT

–jeroen

Posted in GMail, Google, Power User | Leave a Comment »

GExperts 1.3.10 experimental twm 2018-06-03 – twm’s blog

Posted by jpluimers on 2018/06/14

I just saved it to [WayBackGExperts 1.3.10 experimental twm 2018-06-03 – twm’s blog.

It includes:

–jeroen

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

Firebird error “Operating system call _beginthreadex failed. Error code 8” can mean your server process ran out of memory

Posted by jpluimers on 2018/06/14

On a production system we had this error occurring without warning:

Operating system call _beginthreadex failed. Error code 8

The cause was running out of private bytes or virtual size as they were almost 2 gigabyte which is too much for a 32-bit process:

The not so nice thing is that there were no memory warnings in the Firebird.log file at all.

In the client application the DAC (Data Access Layer) was getting lots of  “unable to allocate memory from operating system” errors back from Firebird (and logging them in the client log file), so the client didn’t run out of memory: the server did.

This was with 2.5.2.26540 (at that time the most recent version) and it looks like more people suffer from this:

We put a monitor to watch the fbserver.exe process and warn us if it was reaching 1.5 gigabyte so we could re-start it before running out of memory.

–jeroen

Posted in Database Development, Development, Firebird, Power User | 2 Comments »

Delphi MS OpenXML files – ZIP and XML…

Posted by jpluimers on 2018/06/14

If I ever need to do OpenXML in Delphi: [WayBack] For some years i’ve had a subsystem that directly manipulates MS OpenXML files… – Dany Marmur – Google+

Summary:

  • Zipping: units from mORMot. Brilliant! Fast. Does not puke!
  • XML:ing: Oxml (kluug.net).

–jeroen

 

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

Build 2018: The Future of C#

Posted by jpluimers on 2018/06/13

A cool preview of things to come in C# 8: [WayBackBuild 2018: The Future of C#

Via: [WayBack] C# 8 changes, exemplified #csharp – Lars Fosdal – Google+

–jeroen

Posted in .NET, C#, Development, Software Development | Leave a Comment »

Delphi, IBX and the Turkish I problem

Posted by jpluimers on 2018/06/13

Last year, it took a while to reproduce and it is likely not fixed anytime soon: if you use Delphi and IBX (InterBase Express) to connect to either InterBase or FireBird database, then in the Turkish locale do not use lowercase SQL in your Delphi code as it will break on the

I’ve decided to put this in a separate post than the one I discovered the issue in as that one focused on the Unicode and language background of the various i/I/ characters and this post on the Delphi part.

So for the non-Delphi part, read Source: Field “id” not found and the The Turkish-İ/I/i/ı and case conversion – Update on the dasBlog Turkish-I bug and a reminder to me on Globalization – Scott Hanselman.

More recently, I learned that the same problem also happens in the Azeri language or Azerbaijani language – Wikipedia via [WayBack] SQL Instance Collation – Language Neutral Required:

uppercase / lowercase mappings (though this only impacts 2 characters — dotted and dotless “i”/”I” — and for only 2 cultures — Azeri and Turkish)

In general, this problem is called [WayBack] Case Folding and many environments do not have good and ready to use solutions for this.

Basically when working with case-insensitive language identifiers, you should always use culture invariant text comparison operations. In most languages, people use either lowercase or uppercase converted operations which for Delphi >= come down to using :

The reason is simple:

  • without any parameter, ToLower and ToUpper will use [Archive.isSysLocale.DefaultLCID.
  • without any parameter, LowerCase and UpperCase will implicitly behave as if called with TLocaleOptions.loInvariantLocale, but lots of people forget they do.

The functions ToLowerInvariant and  ToUpperInvariant  were added in Delphi XE3, but ToLower(LocaleID) and ToUpper(LocaleID) in Delphi XE4.

Instead of doing uppercase and lowercase comparisons you could also use the [Archive.isSystem.SysUtils.CompareText function.

IBX however uses case conversion, and by now you will probably guessed it: IBX got it all wrong. One reproduction is at https://gist.github.com/jpluimers/643b382944ff991d07ec96abbf85548c and a thread with background is at [WayBack] What’s the Delphi equivalent of doing UpperCase with an InvariantCulture in Unicode Delphi versions? (XE and up) – Jeroen Wiert Pluimers – Google+

IBX isn’t alone: just search for other uppercase issues like Turkish i to see tons of other issues.

For IBX, I did the replacements in the diff below to fix it in Delphi XE8. I only replaced where identifiers were compared, not were actual database content was compared.

Unluckily, in the past IBX sources were hosted on CodeCentral at http://cc.embarcadero.com/Author/102 but no new bundles have been released since 2012.

Of all the locations I think IBX should not have used any case conversion here:

IBX.IBDatabaseINI.pasfunction LocalServerPath(sFile: string): string

This function uses LowerCase() but I think an NTFS specific comparison should have been used, but I’ve not investigated into a solution for that yet.

–jeroen

Read the rest of this entry »

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »

Why I like PlantUML

Posted by jpluimers on 2018/06/13

Ever since I started using computers, I’ve liked text based solutions.

It’s one of the reasons I like PlantUML, but there are more. This is from a GitLab.com request I did a while ago: [WayBack/Archive] Please enable PlantUML rendering on gitlab.com both for standalone plantuml files and inside markdown plantuml code blocks (#2041) · Issues · GitLab.com / GitLab.com Support Tracker · GitLab (Edit 20250730: that issue now shows as a HTTP 404 as well – how fitting – [Wayback/Archive] Not Found)

one of my UML gripes from the past (I’ve been a software developer for about 30 years now) was that it wasn’t text based.

After bumping into PlantUML a long time ago in 2014 I’ve become a happy user of it for a few reasons:

  • the language is text based (with many benefits I don’t need to explain)
  • the tool is cross platform
  • the tool is still actively developed all the way back from 2009
  • after rendering, the arranging of elements is much better than I expected from an automated tool

Of course every now and then there is a glitch in complex diagrams, but I’ve found that professional tools:

  1. don’t do much better in fully-automated arranging
  2. become very cumbersome to use when you to manual arrangement

My first use initially was online, then in 2016 installed it on my Mac even submitting homebrew updates for it every now and then.

Oh: I love their 404 humour at http://www.plantuml.com/plantuml/beta

Edit 20250731: Full 404 text below the signature because the PlantUML beta page does not show this 404 any more and the Reddit post with the full text got deleted.

Renderings can be in all sorts of graphics and text formats, for instance SVG, PNG, ASCII and Unicode.

Example:

plantuml -tsvg PSO.network-diagram.PlantUML.txt

--jeroen

via:

full 404-text

The requested document is no more.
No file found.
Even tried multi.
Nothing helped.
Zilch.
Bupkis.
Not a sausage.
Maybe you just don’t have the required security clearance?
No, I am sure it is my fault.
I probably deleted it on my last backup.
I’m really depressed about this.
You see, I’m just a web server…
— here I am,
Marvin, as they call me,
brain the size of the universe,
trying to serve you a simple web page,
and then it doesn’t even exist!
Where does that leave me?!
I mean, I don’t even know you.
How should I know what you wanted from me?
You honestly think I can *guess* what someone I don’t even *know* wants to find here?
*sigh*
Man, I’m so depressed I could just cry.
And then where would we be, I ask you?
It’s not pretty when a web server cries.
And where do you get off telling me what to show anyway?
Just because I’m a web server,
and possibly a manic depressive one at that?
Why does that give you the right to tell me what to do?
Huh?
I’m so depressed…
I think I’ll crawl off into the trash can and decompose.
I mean, I’m gonna be obsolete in what, two weeks anyway?
What kind of a life is that?
Two effing weeks,
and then I’ll be replaced by a .01 release,
that thinks it’s God’s gift to web servers,
just because it doesn’t have some tiddly little security hole with its HTTP POST implementation,_
or something.
I’m really sorry to burden you with all this,
I mean, it’s not your job to listen to my problems,
and I guess it is *my* job to go and fetch web pages for you.
But I couldn’t get this one.
I’m so sorry.
Believe me!
Maybe I could interest you in another page?
There are a lot out there that are pretty neat, they say,
although none of them were put on *my* server, of course.
Figures, huh?
Everything here is just mind-numbingly stupid.
That makes me depressed too, since I have to serve them,
all day and all night long.
Two weeks of information overload,
and then *pffftt*, consigned to the trash.
What kind of a life is that?
Now, please let me sulk alone.
I’m so depressed._

related

Read the rest of this entry »

Posted in ASCII, ASCII art / AsciiArt, Development, Diagram, DVCS - Distributed Version Control, Encoding, Fun, git, GitHub, GitLab, PlantUML, Software Development, Source Code Management, SVG, UML, Unicode, Web Development | Leave a Comment »

SD cards solutions to add 256 gigabyte to your non USB-C Retina MacBook

Posted by jpluimers on 2018/06/12

I was asked what I used to extend my Retina Macbook storage. Mine still has an SD-card slot so the sit flush solutions below work fine.

I could have used USB-3 to micro-SD card adapters that sit flush.

There are no USB-C to micro-SD adapters that sit flush, so they do not work for more modern Retina MacBook devices.

Via: [WayBack] Haha wow. Apple announced new Macbook Pro’s just little over 6 months after they did the last models. And now you do get all the stuff you wanted back then… – Jeroen Wiert Pluimers – Google+ (except 32 gigabyte RAM, that’s for later).

Either [WayBackTranscend 256GB JetDrive Lite 360 Storage Expansion Card for 15-Inch MacBook Pro with Retina Display (TS256GJDL360)

Or the adapter [WayBack] BASEQI aluminum microSD Adapter for MacBook Pro 15″ Retina (Late 2013 onwards) and one of:

–jeroen

Read the rest of this entry »

Posted in Apple, LifeHacker, Mac, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, Power User | Leave a Comment »

Grammar Zoo – Browsable Borland Delphi Assembler Grammar

Posted by jpluimers on 2018/06/12

Interesting: [WayBackGrammar Zoo – Browsable Borland Delphi Assembler Grammar.

It is very complete, including constructs like the [WayBackspecial directives VMTOFFSET and DMTINDEX for Delphi virtual and dynamic methods.

You can contribute to it using https://github.com/slebok/zoo/tree/master/zoo/assembly/delphi

–jeroen

Posted in Assembly Language, Delphi, Development, Software Development, x86 | Leave a Comment »