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

Happy 25th birthday Linux!

Posted by jpluimers on 2016/10/05

Linux turns 25 today: Linux – Wikipedia, the free encyclopedia

Happy birthday!

–jeroen

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

TMemIniFile have non-virtual SetStrings procedure. To add support processing of…

Posted by jpluimers on 2016/10/05

TMemIniFile have non-virtual SetStrings procedure.

One of the classic Delphi RTL examples of Delphi team members  not reading Delphi Component Design by +Danny Thorpe 

You can still get it for a few dollars, used: http://www.amazon.com/Delphi-Component-Design-Danny-Thorpe/dp/0201461366

–jeroen

via: TMemIniFile have non-virtual SetStrings procedure. To add support processing of….

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

Delphi XE8 [dcc32 Fatal Error] dcc32_F2084_C2359.dpr(30): F2084 Internal Error: C2359

Posted by jpluimers on 2016/10/05

Fails in Delphi XE8 with a nice [dcc32 Fatal Error] dcc32_F2084_C2359.dpr(27): F2084 Internal Error: C2359

It is fixed in Delphi 10.0 Berlin, but of course a C2359 search does not reveal that as Quality Portal is behind a wall. So for future reference the bug: [RSP-13471] Int64 for loops can generate Internal Compiler Error – Embarcadero Technologies. Thanks +Stefan Glienke for mentioning the issue.

program dcc32_F2084_C2359;

type
  TNumber = Int64; // UInt64; // fails too; other numeric types do not fail. Fails in a unit as well.
  TNumbers = TArray;
  TNumberRange = record
  strict private
    function GetLowerBound: TNumber;
  public
    function Numbers: TNumbers;
    property LowerBound: TNumber read GetLowerBound;
  end;

{ TNumberRange }

function TNumberRange.GetLowerBound: TNumber;
begin
  Result := Default(TNumber);
end;

function TNumberRange.Numbers: TNumbers;
var
  lValue: TNumber;
begin
  for lValue := LowerBound to LowerBound do
  ;
end;

begin
end.

–jeroen

Read the rest of this entry »

Posted in Delphi, Delphi XE8, Development, F2084, Software Development | 1 Comment »

If you thought you could do multi-threading, then play “The Deadlock Empire” games

Posted by jpluimers on 2016/10/04

Slay dragons, learn concurrency! Play the cunning Scheduler, exploit flawed programs and defeat the armies of the Parallel Wizard.

Source: The Deadlock Empire

Via: Face the dragon. Learn the ropes of concurrent programming. – Lars Fosdal – Google+

Source code is available and focuses on C#; maybe one day I’ll make a Delphi version: deadlockempire/deadlockempire.github.io: The Deadlock Empire: Slay dragons, learn concurrency!

BTW: a great book (with nice illustrations at both github and kernel.org) is Source: Is Parallel Programming Hard, And, If So, What Can You Do About It? [WayBack]

–jeroen

Posted in .NET, C#, Delphi, Development, Multi-Threading / Concurrency, Software Development | Leave a Comment »

Encoding is hard… so how did the single quote become a circumflexed a followed by Euro sign and trade mark?

Posted by jpluimers on 2016/10/04

A while ago (in fact more than a year), I posted Encoding is hard…  go G+ with the below picture.

[Wayback] ftfy (“fixes text for you”, a parody on “fixed that for you”) [Wayback] fixes it, but:

How did the single quote become “’“?

Actually, because of a a common “beautification” of many Office suites (Microsoft and Open alike), the single quote was a special one: a Unicode Character ‘RIGHT SINGLE QUOTATION MARK’ (U+2019) which in UTF-8 is encoded as 0xE2 0x80 0x99.

Read the rest of this entry »

Posted in Development, Encoding, ftfy, ISO-8859, ISO8859, Mojibake, Software Development, Unicode, UTF-8, UTF8, Windows-1252 | Leave a Comment »

Fun deciphering thermometers

Posted by jpluimers on 2016/10/03

From a while ago: a Norwegian (left) and German (right) thermometer. In dialect. Because.

Anyone having more of these in other dialects?

Sources:

Read the rest of this entry »

Posted in Fun, LifeHacker, Power User | Leave a Comment »

Viewing an USB camera on Mac OS X without mirroring

Posted by jpluimers on 2016/10/03

Even though Photo Booth has an “Auto Flip New Items” option, but that only works for stills, not videos.

I needed it to see without mirroring the images from a DBPOWER 2 Million Pixels Cmos 7M/23FT USB Waterproof HD 6-led Borescope Endoscope Inspection Tube Visual Camera.

What does work are these:

I forget how I bumped into QCamera, but later I found out he posted on apple.stackexchange.com.

–jeroen

Posted in Uncategorized | Leave a Comment »

Ugh, this new Google+ is killing me. I used to be able to click someone’s name in G+ and start a new hangout …

Posted by jpluimers on 2016/10/03

Ugh, this new Google+ is killing me.I used to be able to click someone’s name in Google+ and then start a hangout with them by clicking the hangout icon… – Koushik Dutta (Koush) – Google+ has this nice comment:

Dan Hirsch: You probably have a Google Apps Account. There’s no switch back to old G+ for Google Apps aka GSuite users anymore.

–jeroen

Posted in G+: GooglePlus, SocialMedia | Leave a Comment »

SSD BareMetal cloud servers, Simple and flexible pricing, enjoy a predictable cloud pricing model | Scaleway

Posted by jpluimers on 2016/09/30

So I won’t forget:

SSD BareMetal cloud servers, Simple and flexible pricing, enjoy a predictable cloud pricing model

Source: Pricing BareMetal | Scaleway

They are based in France and host both ARM and x86 servers at very competitive prices.

At the time of writing the cheapest bare metal x86 server has 8 GB or RAM, 4 cores and 50 gigabyte SSD storage at EUR 12/month. VPS are even more affordable. 50 gigabyte extra is EUR 1/month.

Via: C2: Insanely Affordable x86-64 Servers

And:  Günstige dedicated server – Kristian Köhntopp – Google+

–jeroen

 

Posted in Hosting, Power User | Leave a Comment »

InitialKeyboardIndicators registry setting to fix NumLock in a certain state.

Posted by jpluimers on 2016/09/30

There are odd things with the InitialKeyboardIndicators registry setting. Technet only documents bitflag value 2.

According to the docs it should be a bitflag, but sometimes you encounter InitialKeyboardIndicators value 2147483648 (0x80000000) especially as part of the .DEFAULT profile at HKEY_USERS\.DEFAULT\Control Panel\Keyboard.

The problem I had was having these symptoms:

  1. while logging in locally, I manually turned of the NumLock (as I have a 46W6740 UltraNav keyboard without a numeric keypad)
  2. after logging in locally, it magically turned itself on even with InitialKeyboardIndicators=0 in my local profile at HKEY_CURRENT_USER\Control Panel\Keyboard.
  3. after logging in locally and turning it off, future local logons would keep it off
  4. after logging in remotely, it would magically turn itself on while logged in
  5. after having logged in remotely, the local logon console would have it turned on again

After reading Num Lock problem: Strange number in InitialKeyboardIndicators in Registry, I set both values to 0.

Now that it is 0 in both at HKEY_USERS\.DEFAULT\Control Panel\Keyboard and HKEY_CURRENT_USER\Control Panel\Keyboard, symptoms 4-5 still hold. Strange.

It is not the same problem as Num Lock state not retained after resume from Hybrid Shutdown in Windows 8 and Windows Server 2012.

If it persist, I might just put a script in: [Partially Solved: re-wired keyboard lol] Registry key “InitialKeyboardIndicators” NEVER keeps NumLock ON + ScrollLock ON (6) at startup and reverts back to NumLock ON (2).

–jeroen

Read the rest of this entry »

Posted in Conference Topics, Conferences, Event, Keyboards and Keyboard Shortcuts, KVM keyboard/video/mouse, Power User, ThinkPad, UltraNav keyboards, Windows | Leave a Comment »