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 January, 2020

Error “30029-1001” – Google Search; when installing Office 365 language packs

Posted by jpluimers on 2020/01/31

On my list of things to figure out: Error “30029-1001” – Google Search.

This happens when installing language packs for Office 365.

Related:

–jeroen

Posted in Office, Power User | Leave a Comment »

Happlink / PlugUp died, but you can still use their U2F USB key

Posted by jpluimers on 2020/01/31

Nothing lasts, so the company behind the U2F key on the right is long gone, but their site is archived in Archive.is and the WayBack machine. Since the U2F protocol is open, you can still set up the device and use it. Here is how for your Google account (for instance with GMail), it works in a similar way for other providers:

Archived links:

Some of their videos are also still online (embedded links at the bottom of the post):

U2F (or Universal 2nd Factor – Wikipedia) has an open protocol by FIDO Alliance – Wikipedia. More on that in these links below.

One final odd note:

The FIDO alliance still listed Happlink on their web-site when I wrote this blog post.

It used to be at this address: Happlink, 4 rue Jehan Le Povrmoyne, 76240 Le Mesnil-Esnard, France

Read the rest of this entry »

Posted in Power User, Security, U2F FIDO Security Keys | Leave a Comment »

When storing huge files under NTFS compression, ensure you have twice the disk space

Posted by jpluimers on 2020/01/31

When copying over a 400 gigabyte file over the network to an NTFS compressed folder on a drive with having 600 gigabytes free space, the volume became full after copying ~350 gigabytes.

What I learned is that compressing huge files for later read-only access is fine, but you need about twice the disk space while the copy operation is in progress.

For non-compressed files you can go without this extra reservation.

Background information:

Note there are also issues with NTFS compression and de-duplication. I’m not sure about sparse files. Be careful when you try to compress the system drive where your Windows OS lives on:

–jeroen

Posted in NTFS, Power User, Windows | Leave a Comment »

Sunsetting Mercurial support in Bitbucket – Bitbucket

Posted by jpluimers on 2020/01/30

February 1st, the start commences of Sunsetting Mercurial support in Bitbucket – Bitbucket [WayBack]. Starting June 1st, only git is supported by Bitbucket, despite them having started with and focused mainly Mercurial at first.

Here are the major dates of the sunset:

  • February 1, 2020: users will no longer be able to create new Mercurial repositories
  • June 1, 2020: users will not be able to use Mercurial features in Bitbucket or via its API and all Mercurial repositories will be removed.

All current Mercurial functionality in Bitbucket will be available through May 31, 2020.

So by now you should have started migrating from Mercurial to git, probably away from BitBucket.

Read the rest of this entry »

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

Why TimeZone and leap periods are such a pain

Posted by jpluimers on 2020/01/30

A cautionary tale on time zones, and the big warning on using a unix timestamp (only 18 years to go on that one…)

–jeroen

Read the rest of this entry »

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

Some ideas on using DataSnap as a data-conversion layer between two systems

Posted by jpluimers on 2020/01/30

For my link archive as it contains some interesting ideas on how to use DataSnap as a conversion later between two systems: [WayBack] I need to write some DataSnap “middleware” between Google Glass and a SwissLog ERP system, and I am trying to figure out if there are significant differ… – Lars Fosdal – Google+

The ideas is basically a session based protocol converter.

–jeroen

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

Import and Export Registered SQL Servers To Other Machines: don’t bother.

Posted by jpluimers on 2020/01/29

When migrating to a new machine, or syncing settings between machines, I hoped these are useful steps (in reverse order: export, then import, just like to reset a machine you turn it off first, then on): [WayBackImport and Export Registered SQL Servers To Other Machines.

TL;DR: don’t bother exporting the SQL Server login passwords over: doing so will break your registered servers list.

Trying this myself between co-workers, exporting from one person, then importing for another can cause a very unstable SSMS environment giving errors like these during startup even using SSMS 2017:


TITLE: Registered Servers
------------------------------

Sleutel is niet geldig voor gebruik in opgegeven status.
 (System.Security)

------------------------------
BUTTONS:

OK
------------------------------
===================================

Sleutel is niet geldig voor gebruik in opgegeven status.
 (System.Security)

------------------------------
Program Location:

   at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope)
   at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.ProtectData(String input, Boolean encrypt)
   at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.get_SecureConnectionString()
   at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.get_ConnectionString()
   at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.get_ServerName()
   at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServerTree.AddRegisteredServerNode(RegisteredServer regSrv, TreeNodeCollection nodes)

and errors like these when exporting information:



TITLE: Export Registered Servers
------------------------------

The operation 'Export' failed. (Microsoft.SqlServer.Management.RegisteredServers)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=14.0.17254.0+((SSMS_Rel_17_4).180502-0908)&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

Serialization operation on RegisteredServer[@Name='servername'] has failed. (Microsoft.SqlServer.Management.Sdk.Sfc)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=14.0.17254.0+((SSMS_Rel_17_4).180502-0908)&LinkId=20476

------------------------------

Sleutel is niet geldig voor gebruik in opgegeven status.
 (System.Security)

------------------------------
BUTTONS:

OK
------------------------------

===================================

The operation 'Export' failed. (Microsoft.SqlServer.Management.RegisteredServers)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=14.0.17254.0+((SSMS_Rel_17_4).180502-0908)&LinkId=20476

------------------------------
Program Location:

   at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServersStore.Export(SfcInstance obj, String file, CredentialPersistenceType cpt)
   at Microsoft.SqlServer.Management.RegisteredServers.Utils.Export(Object obj, String filename, Boolean includeUserNames, ServerType serverType)
   at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServersContextMenuManager.ContextExport(Object sender, EventArgs e)

===================================

Serialization operation on RegisteredServer[@Name='SQLServerName'] has failed. (Microsoft.SqlServer.Management.Sdk.Sfc)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=14.0.17254.0+((SSMS_Rel_17_4).180502-0908)&LinkId=20476

------------------------------
Program Location:

   at Microsoft.SqlServer.Management.Sdk.Sfc.SfcSerializer.Write(XmlWriter instanceWriter, Object instance, Dictionary`2 namespaces)
   at Microsoft.SqlServer.Management.Sdk.Sfc.SfcSerializer.WriteAllInstances()
   at Microsoft.SqlServer.Management.Sdk.Sfc.SfcSerializer.Write(XmlWriter xmlWriter)
   at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServersStore.Export(SfcInstance obj, String file, CredentialPersistenceType cpt)

===================================

Sleutel is niet geldig voor gebruik in opgegeven status.
 (System.Security)

------------------------------
Program Location:

   at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope)
   at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.ProtectData(String input, Boolean encrypt)
   at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.get_SecureConnectionString()
   at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.GetConnectionStringWithEncryptedPassword(CredentialPersistenceType cpt)
   at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServersStore.FilterProperty(SfcSerializer serializer, FilterPropertyEventArgs propertyArgs)
   at Microsoft.SqlServer.Management.Sdk.Sfc.SfcSerializer.WriteInternal(XmlWriter instanceWriter, Object instance, Dictionary`2 namespaces)
   at Microsoft.SqlServer.Management.Sdk.Sfc.SfcSerializer.Write(XmlWriter instanceWriter, Object instance, Dictionary`2 namespaces)

Solution

  1. Stop SSMS
  2. Make a back-up, then delete %APPDATA%\Microsoft\Microsoft SQL Server\140\Tools\Shell\RegSrvr.xml,
  3. Start SSMS.

Cause

You cannot import SQL Server credentials exported on another machine. It will break your server registrations list, and you cannot repair them.

See:

More background:

–jeroen

Posted in Database Development, Development, SQL Server | Leave a Comment »

Do I really need to write a WordPress API wrapper to check the status of “missed schedule” posts?

Posted by jpluimers on 2020/01/29

After years with “missed schedule” posts on (paid!) wordpress.com based sites, WordPress has documented that the scheduler officially does not support more than 100 posts:

[WayBackWarning: Please do not schedule more than 100 posts. Any posts scheduled beyond that amount will not be published.

In practice this is not fully true, so lets explain that a little.

Background

Imagine the list of scheduled posts as a list of posts to be posted anywhere from the near future (lets call that tail) until far in the future (for now head).

As long as you schedule posts in head to tail order, then there is no problem. You can schedule 100s of posts (usually I’ve between 700 and 1200 posts scheduled that way).

The problems appear when:

Read the rest of this entry »

Posted in *nix, Development, Missed Schedule, Monitoring, Power User, SocialMedia, Software Development, Uptimerobot, Web Development, WordPress, WordPress | Leave a Comment »

OMF, COFF and the 32-bit/64-bit Delphi or C++ compilers

Posted by jpluimers on 2020/01/29

Via [WayBack] As far as I can tell (and documentation on that is reaaaaaaly hard to find), dcc64 can link in .obj files in OMF and COFF format. Bcc64 uses LLVM chain and therefore produces ELF .o files… – Primož Gabrijelčič – Google+:

David Heffernan:
dcc32 does coff and omf, dcc64 only coff

and later he commented:

One of the difficulties with linking objects is the handling of exceptions. The 64 bit exception model is table based, in contrast to the stack based 32 bit model.

I don’t think that the exception tables are written correctly for code linked in objects. If exceptions are raised then this can lead to abnormal process termination. Process just disappears. Poof!

One common way that this happens is floating point exceptions that are by default unmasked by the Delphi RTL. I have found it necessary to mask them when calling into any linked object code to avoid exceptions being raised.

And compiling with cl can be a bit of a game. It’s stack checking options need to be disabled. And there are a few other key switches that help. And then there’s the forward declaration trick to help the one pass compiler cope with C objects that are expected to be linked in a separate step.

Anyway, it can be quite a challenge at times, but I’ve yet to find a plain self contained C library that has defeated me!

–jeroen

Posted in C++, C++ Builder, Delphi, Delphi x64, Development, Software Development, Visual Studio C++ | 2 Comments »

Exporting / importing ODBC DSNs (both System and User)

Posted by jpluimers on 2020/01/28

ODBC stores the DSN information in an ODBC.INI tree in the registry.

These posts explain how to export/import individual DSN entries:

–jeroen

Posted in Database Development, Development, ODBC, Power User | Leave a Comment »