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

Archive for the ‘Uncategorized’ Category

Delphi: mapping of COM/Windows exceptions to Delphi Exceptions and run-time errors

Posted by jpluimers on 2014/07/30

Every time

---------------------------
Debugger Exception Notification
---------------------------
Project Some.exe raised exception class $C0000005 with message 'access violation at 0x00537b14: read of address 0x00000000'.
---------------------------
Break   Continue   Help
---------------------------

'Exception "EAccessViolation" with message "Access violation at address 00537B30 in module ''TestWordInterface.exe''. Read of address 00000000" at address 00537B30'

---------------------------
Testwordinterface
---------------------------
Access violation at address 00537B14 in module 'Some.exe'. Read of address 00000000.
---------------------------
OK
---------------------------

In system.pas:

{$IFDEF STACK_BASED_EXCEPTIONS}
procedure       MapToRunError(P: PExceptionRecord); stdcall;
const
  STATUS_ACCESS_VIOLATION         = $C0000005;
  STATUS_ARRAY_BOUNDS_EXCEEDED    = $C000008C;
  STATUS_FLOAT_DENORMAL_OPERAND   = $C000008D;
  STATUS_FLOAT_DIVIDE_BY_ZERO     = $C000008E;
  STATUS_FLOAT_INEXACT_RESULT     = $C000008F;
  STATUS_FLOAT_INVALID_OPERATION  = $C0000090;
  STATUS_FLOAT_OVERFLOW           = $C0000091;
  STATUS_FLOAT_STACK_CHECK        = $C0000092;
  STATUS_FLOAT_UNDERFLOW          = $C0000093;
  STATUS_INTEGER_DIVIDE_BY_ZERO   = $C0000094;
  STATUS_INTEGER_OVERFLOW         = $C0000095;
  STATUS_PRIVILEGED_INSTRUCTION   = $C0000096;
  STATUS_STACK_OVERFLOW           = $C00000FD;
  STATUS_CONTROL_C_EXIT           = $C000013A;
var
  ErrCode: Byte;
begin
  case P.ExceptionCode of
    STATUS_INTEGER_DIVIDE_BY_ZERO:  ErrCode := 200; { reDivByZero }
    STATUS_ARRAY_BOUNDS_EXCEEDED:   ErrCode := 201; { reRangeError }
    STATUS_FLOAT_OVERFLOW:          ErrCode := 205; { reOverflow }
    STATUS_FLOAT_INEXACT_RESULT,
    STATUS_FLOAT_INVALID_OPERATION,
    STATUS_FLOAT_STACK_CHECK:       ErrCode := 207; { reInvalidOp }
    STATUS_FLOAT_DIVIDE_BY_ZERO:    ErrCode := 200; { reZeroDivide }
    STATUS_INTEGER_OVERFLOW:        ErrCode := 215; { reIntOverflow}
    STATUS_FLOAT_UNDERFLOW,
    STATUS_FLOAT_DENORMAL_OPERAND:  ErrCode := 206; { reUnderflow }
    STATUS_ACCESS_VIOLATION:        ErrCode := 216; { reAccessViolation }
    STATUS_PRIVILEGED_INSTRUCTION:  ErrCode := 218; { rePrivInstruction }
    STATUS_CONTROL_C_EXIT:          ErrCode := 217; { reControlBreak }
    STATUS_STACK_OVERFLOW:          ErrCode := 202; { reStackOverflow }
  else                              ErrCode := 255;
  end;
  RunErrorAt(ErrCode, P.ExceptionAddress);
end;

Posted in Algorithms, Development, Floating point handling, Software Development, Uncategorized | Leave a Comment »

“Weird Al” Yankovic – Word Crimes – YouTube

Posted by jpluimers on 2014/07/16

Thanks Roderick Gadellaa for sharing:

 Music video by “Weird Al” Yankovic performing Word Crimes.

Yankovic’s new album “Mandatory Fun” out now.

–jeroen

via: “Weird Al” Yankovic – Word Crimes – YouTube.

Posted in Uncategorized | Leave a Comment »

Word: adding properties to a document and using them in fields

Posted by jpluimers on 2014/06/09

One of the things I don’t often do in Word is insert fields based on document properties.

Usually that part is in a template, and only touched every once in a lifetime.

So I always forget the starting points to get going:

–jeroen

Posted in Uncategorized | Leave a Comment »

GlobalSign is offering free TLS certificates for open source projects:…

Posted by jpluimers on 2014/06/07

Ilya Grigorik – Google+ wrote: GlobalSign is offering free TLS certificates for open source projects:….

Posted in Uncategorized | Leave a Comment »

Word: deleting unused styles

Posted by jpluimers on 2014/06/06

Ever since I started using Word, I thought that deleting unused styles was hard.

And it was in Word 2000: WD2000: How to Remove Unused Standard Styles from a Document.

And people still think it is complicted in Word 2010: Word 2010 – How does one remove any unused styles in a document – – Microsoft Community.

But in fact it is very simple.

Instructions via How to Delete All Unused Styles in Word Document | eHow.com:
Read the rest of this entry »

Posted in Uncategorized | Leave a Comment »

Asperges in Lijnden

Posted by jpluimers on 2014/04/29

Grond onder de rook van Amsterdam perfect voor asperges http://www.parool.nl/parool/nl/4/AMSTERDAM/article/detail/3643503/2014/04/28/Grond-onder-de-rook-van-Amsterdam-perfect-voor-asperges.dhtml

Hoofdweg, nummer 132, in Lijnden

–jeroen

Posted in Uncategorized | Leave a Comment »

Chrome’s Click to play feature can avoid “Chrome wakes me up in the middle of the night, with monsters.”

Posted by jpluimers on 2014/04/21

A while ago I came across this very neat bug report:

Issue 224182 – chromium – Chrome wakes me up in the middle of the night, with monsters. – An open-source project to help move the web forward. – Google Project Hosting.

It isn’t so much a bug report, but a big annoyance with many browsers and web-sites: they auto-start playing video or audio (or other “active” content) as soon as the page loads, even in a background window.

The Chrome’s Click to play feature can help avoid this: you can configure this to the individual site and plugin level to select which ones to auto-play or block.

It increases your security, speeds up browser load times at the cost of a click here and there to enable a sites active content (on some sites: a lot of clicks, but alas: they should redesign to be less dependent on active content).

–jeroen

–via: Issue 224182 – chromium – Chrome wakes me up in the middle of the night, with monsters. – An open-source project to help move the web forward. – Google Project Hosting.

Posted in Uncategorized | Leave a Comment »

Michael Panzer – Google+ – Tip: Syntax highlighting everywhere Occasionally, I get…

Posted by jpluimers on 2014/04/11

IntelliJ plugin “Copy on Steroids”.

Michael Panzer – Google+ – Tip: Syntax highlighting everywhere Occasionally, I get….

Posted in Uncategorized | Leave a Comment »

PIN number analysis

Posted by jpluimers on 2014/04/11

Frequencies of pin numbers. 1234 is most popular, but do not rule out MMDD and DDMM combinations, or YYYY ones.

via: PIN number analysis.

Posted in Uncategorized | Leave a Comment »

Software on RAMdisk can be at least 10x faster than on SSD

Posted by jpluimers on 2014/04/08

Wow nice tip in the comments of this article: Hynix ontwikkelt ddr4-module met capaciteit van 128GB – Computer – Nieuws – Tweakers.

Posted in Uncategorized | Leave a Comment »