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,862 other subscribers

Archive for 2016

Delphi history – on the FINITEFLOAT compiler option that has no one-character shortcut

Posted by jpluimers on 2016/12/14

Back in the .NET days, Delphi had an FINITEFLOATΒ compile option that came without a single-character shortcut.

It was about the handling of infinite float and other special float values in cases like overflow and underflow (including +Inf, -Inf andΒ  [Wayback] NaN).

At first – in the [Wayback] Delphi 8 (Octane) era of which few people want to be reminded off – it was the [Wayback] undocumented counterpart of the [Wayback] 8087 exception mask in x86 mode. Hallvard Vassbotn wrote an article about it and Chee Wee Chua documented it before it got documented in Delphi 2009 (that coincidentally dropped .NET support in the compiler – go figure):

Whereas the native Delphi compilers had exceptions turned on, Microsoft compilers (including .NET) had them turned off, hence the compiler option.

Like mostΒ new Delphi features in this century, FINITEFLOAT didn’t come without quirks. Often these are fleshed out in 2-3 product releases, but this one wasn’t:

TheΒ FINITEFLOATΒ compile option didn’t have a single-character shortcut. This made it impossible to use the {$IFOPT ...}Β construct as IFOPTΒ only works for single-character compiler options.

Which means you get questions likeΒ [Wayback] Why doesn’t {$ifopt FINITEFLOAT ON} compile? – Stack OverflowΒ (I actually got into writing this article because I found a {$DEFINE FINFINITEFLOAT_ENABLED}Β in some pretty old code) and compiler enhancement requests like [WayBack]Β QualityCentral – Please enhance the IFOPT directive for long switch names. It’s easier to readΒ (which will likely never bee fixed).

For completeness some more information about exception masks in the native compiler:

  1. In the past you could only set the exception mask as part of the full control word using [Wayback] Set8087CW, nowadays you can use [Wayback] SetExceptionMask.
  2. Next to a precision mask, there are five exception masks you can set, see for instance this table from theΒ [Wayback] Simply FPU Chap.1 Control WordΒ section:

PM (bit 5) or Precision Mask
UM (bit 4) or Underflow Mask
OM (bit 3) or Overflow Mask
ZM (bit 2) or Zero divide Mask
DM (bit 1) or Denormalized operand Mask
IM (bit 0) or Invalid operation Mask

–jeroen

Posted in 8087, Algorithms, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 8, Development, Floating point handling, History, QC, Software Development | 1 Comment »

Some notes and links: when a filled ATOM table is not caused by your Delphi app

Posted by jpluimers on 2016/12/14

Some links; hopefully I can fill in more details later:

–jeroen

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

#220 feature `SKIP_FIRMWARE` by jpluimers Β· Pull Request #221 Β· Hexxeh/rpi-update

Posted by jpluimers on 2016/12/13

Reminder to self: Fix #220 feature SKIP_FIRMWARE by jpluimers Β· Pull Request #221 Β· Hexxeh/rpi-update

It’s bash. How hard can it be.

(no that was a rhetorical question).

–jeroen

Posted in *nix, *nix-tools, Debian, Development, Hardware Development, Linux, openSuSE, Power User, Raspberry Pi, Raspbian, SuSE Linux, Tumbleweed | Leave a Comment »

Spring4D, Extended floating point values and Mac OS X: the 16-byte stack alignment

Posted by jpluimers on 2016/12/13

Just a few quick notes after solving a stack corruption issue in Spring4D on Mac OS X involving the Extended data type and 16-bit Stack Alignment:

–jeroen

Posted in Algorithms, Delphi, Delphi XE4, Delphi XE5, Development, Floating point handling, Software Development, Spring4D | Leave a Comment »

“the user name or password for imap.gmail is incorrect” – iPad, iPod or iPhone with iOS < 7

Posted by jpluimers on 2016/12/13

If you ever get a “the user name or password for imap.gmail is incorrect”Β on an iPad, iPod or iPhone with iOS version less than 7, then don’t waste time about entering captchas or fiddling with URLs: it took me 2 hours to find this is caused by GMail enforcing OAuth2 and blocking less secure appsΒ mid 2014 after announcing it in April 2014.

Note thatΒ besides iOS < 7, these are also considered unsafe:Β theΒ Mail-app on Windows Phone-version less than 8.1, some versions of desktop e-mail clients likeΒ (tadaaaaa!)Β Microsoft Outlook and Mozilla Thunderbird.

Almost all searches for the error message lead you into trying to opening Safari on your iOS device visiting http://www.google.com/accounts/DisplayUnlockCaptchaΒ or switching your servers from gmail.com to googlemail.com (or back), but these tricks don’t help.

What does helpΒ is (if you really insist on using a less secure app) to enable these less secureΒ apps in your google account: https://www.google.com/settings/security/lesssecureapps. Note this does not work when you have 2-step verification enabled.

I came across this when donating my old iPad 1 devices and the people could not use it for GMail. Since the GMail app in iTunes doesn’t support iOS 5.1.1 any more basically the devices are now glorious photo frames.

–jeroen

Posted in Apple, GMail, Google, GoogleCalendar, iOS, iPad, iPhone, iPod touch, Power User | Leave a Comment »

HDDWatches site. HDD Watch created from a Microdrive HDD. – Kristian KΓΆhntopp – Google+

Posted by jpluimers on 2016/12/12

[WayBack]Β Kristian KΓΆhntopp – Google+ – Ist ja bald WeihnachtenΒ pointed me to http://www.hddwatches.com/.

If I could wear watches (that’s over since I had RSI in the 1990s), I’d ask one for X-mas.

Which reminds me I still should have a few of these microdrives around.

The manufacturer is based on an Indiegogo project. Here are the links:

–jeroen

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

How to Prevent Windows 10 From Automatically Downloading Updates – metered connections

Posted by jpluimers on 2016/12/12

Prevent Automatic Downloading of Updates on a Specific Connection

When you set a connection as β€œmetered,” Windows 10 won’t automatically download updates on it. Windows 10 will automatically set certain types of connections β€” cellular data connections, for example β€” as metered. However, you can set any connection like as a metered connection.

A friend is trying this as he’s on roaming data using a Mobile WiFi hotspot. Lets see if this works…

Source: How to Prevent Windows 10 From Automatically Downloading Updates

–jeroen

Posted in Power User, WiFi, Windows, Windows 10 | Leave a Comment »

Notes and links on proxytunnel, sslh, apache, stunnel, putty, ssh and more

Posted by jpluimers on 2016/12/12

This is based on lots of help from Rui Seabra with a G+ remark I made a while ago: “So what would be a proper way to setup an SSH connection over HTTPS given that the proxy in between is CNTLM providing credentials to an NTLM authenticating proxy that does HTTPS man-in-the-moddle? Clients are Linux or Windows with admin access. On the outside Linux with admin access as well.
This is also becoming more and more relevant with “free” WiFi providers only allowing HTTP/HTTPS and playing HTTPS Man-in-the-Middle.”

So the situation is something like this:

  • client ssh client
  • stunnel client
  • man-in-the-middle HTTP/HTTPS proxy only allowing outgoing traffic on ports 80/443
  • server: sslh
    • server apache daemon
    • stunnel daemon
    • server ssh daemon

Some links:

–jeroen

Posted in Cntlm, Power User, Windows, Windows-Http-Proxy | Leave a Comment »

I can’t think of a better bunch of people to teach this course…

Posted by jpluimers on 2016/12/09

I can’t think of a better bunch of people to teach this course. Understanding the economics of security, especially from the bad guys perspective is a really valuable tool even if you are totally focussed on code.

https://www.edx.org/course/cyber-security-economics-delftx-secon101x

I’m going to try to make room in my agenda to follow this course.

–jeroen

via: [WayBack] Alan Cox – Google+

Posted in Power User, Security | Leave a Comment »

Cleaning up C drive space temporary internet files after upgrading to IE10 or IE11 – via AsiaTech Microsoft APGC Internet Developer Support Team

Posted by jpluimers on 2016/12/09

You’d think Temporary Internet FilesΒ from Internet Explorer will be in that directory, right?

After upgrading to Internet Explorer 10 or 11 that is not true any more.

I got the below batch file to cleanup the WebCache directory via C drive space is using up on terminal server after upgrading to IE10 or IE11 – AsiaTech: Microsoft APGC Internet Developer Support Team


echo OFF
net stop COMSysApp
taskkill /F /IM dllhost.exe
taskkill /F /IM taskhost.exe
taskkill /F /IM taskhostex.exe
del /Q %LocalAppData%\Microsoft\Windows\WebCache\*.*
net start COMSysApp
echo ON

–jeroen

Posted in Internet Explorer, Power User, Web Browsers, Windows | 1 Comment »