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, 2019

Relays and Arduino / ESP8266 / ESP8266X

Posted by jpluimers on 2019/06/19

As a follow-up on Raspberry Pi and relays – follow up on Having one Raspberry Pi reset another Raspberry Pi through relay or transistor some of my research links to bring this to Arduino, ESP8266, ESP8266X and similar devices:

–jeroen

Posted in Arduino, Development, ESP8266, ESP8266X, Hardware Development | Leave a Comment »

Switching Delphi XML DOM vendors

Posted by jpluimers on 2019/06/18

I thought I had written a blog article on switching DOM vendors before, but in retrospect that was a conference presentation somewhere in 2011: https://github.com/jpluimers/Conferences/tree/master/2011/EKON15-Renaissance-Hotel-D%C3%BCsseldorf/Delphi-XE2-and-XML

I mentioned some of the materials at [WayBack] delphi – Reading distinct values from XML using XPath – Stack Overflow.

It was back in the days I worked for better office, Gwan Tan was still alive and CodePlex was still a thing. Now the code is at [WayBack] bo library – CodePlex Archive: An archive of the CodePlex open source hosting site.

Some recovered bits are at https://gist.github.com/jpluimers/98dcec944538fd6986fd2d51f7a79d8b#file-mainformunit-pas that shows the selection process of a TDOMVendor, how to log its capabilities and how to use it all in the method procedure TMainForm.LogDomVendor(const CurrentDomVendor: TDOMVendor);

Hopefully one day I can resurrect the code one day…

Over the years, the vendor list has not changed much [WayBack] Using the Document Object Model – RAD Studio documents these vendors.

Compared to Delphi 2007 and earlier, OmniXML has gone and ADOM has entered.

On the MSXML side, you can change which version you use too, as explained in Quick tip: using MSXML v6 with TXMLDocument in D7-D2007 – DelphiFeeds.com with the original article at [WayBackQuick tip: using MSXML v6 with TXMLDocument in D7-D2007 | Delphi Haven.

Basically he overwrites MSXMLDOMDocumentCreate with a method creating the right MSXML DOM document. That has now been deprecated as [WayBack] Xml.Win.msxmldom.MSXMLDOMDocumentCreate – RAD Studio API Documentation now points to [WayBack] Xml.Win.msxmldom.TMSXMLDOMDocumentFactory.CreateDOMDocument – RAD Studio API Documentation.

List of Built-in XML Vendors

The following table shows a comparison of the XML vendors that RAD Studio supports by default:

Implementation Unit Global Variable Description
MSXML Xml.Win.msxmldom SMSXML Fastest of the built-in RAD Studio XML vendors. Windows only. Default.

For cross-platform support, you must choose a different XML vendor. If you do not specify a different XML vendor, your application does not have XML support on other platforms than Windows, and you see a run-time exception when you run your application in other platforms.

OmniXML Xml.omnixmldom sOmniXmlVendor Much faster than ADOM, but slightly slower than MSXML. Cross-platform.
ADOM Xml.adomxmldom sAdom4XmlVendor Slower than the other built-in RAD Studio XML vendors. Cross-platform.

–jeroen

Read the rest of this entry »

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

Because FTDI history: Why is the atmega chip reset three times during programming? – Arduino Stack Exchange

Posted by jpluimers on 2019/06/18

For historic reference: [WayBackWhy is the atmega chip reset three times during programming? – Arduino Stack Exchange.

TL;DR:

It is to ensure the device is being reset, no matter which driver you use and how odd that driver behaves.

So what you are seeing there is

  1. first a brief toggle of DTR by the IDE to force a reset,
  2. then avrdudeopening the port and DTR going low,
  3. then finally the IDE toggling DTR again one last time to force a final reset.

–jeroen

Posted in Development, Hardware Development | Leave a Comment »

Desktop Duplication API in Delphi – CodeProject

Posted by jpluimers on 2019/06/18

Cool stuff: [WayBackDesktop Duplication API in Delphi – CodeProject.

It is based on:

There is also a GitHub repository: Delphi/DesktopDuplicationAPI at master · tothpaul/Delphi

Via: [WayBack] Little demo for the Desktop Duplication API  – Paul TOTH – Google+

–jeroen

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

Varios DELL machines having an unknown device ACPI\DELLABC6 – it is the WiFi switch support – via Dell Community

Posted by jpluimers on 2019/06/17

It looks like many Dell machines suffer from this: devmgmt.msc indicating an unknown device with identification ACPI\DELLABC6.

The odd thing is that the tool known for 10+ years as Dell Detect, but got renamed into SupportAssist does not detect that Windows needs drivers for it.

So a bunch of posts:

They lead to these download:

  1. [WayBack] Dell WLAN Radio Switch Driver | Dell US with [WayBackDell-WLAN-Radio-Switch-Driver_JK9WM_WIN_1.0.0.9_A05.EXE
  2. [WayBack] Dell Airplane Mode Switch Driver | Dell US with [WayBackFOLDER03137561M/1/Network_Driver_PX8MM_WN64_1.0.0_A00.EXE

The first of these works on a Dell Precision 7710 perfectly fine.

The odd thing: without the driver, pressing Fn+PrtScr (turn off/on WiFi radios) just works (for details on that key combination, see [WayBack] How to Turn the Wireless Devices on a Dell Notebook On and Off | Dell US or[WayBack] Dell Precision 7710 Mobile Workstation Keyboard Guide | Dell US)

–jeroen

Posted in Hardware, Power User | Leave a Comment »

I’ve given up on entering non-ASCII characters when entering data on-line

Posted by jpluimers on 2019/06/17

I live in a street that has a non-ASCII character in it: Pyreneeën.

I’ve reverted back to entering the street name as plain ASCII for a simple reason:

Too often the ë gets mangled into encoding gibberish, similar to the é example in [WayBackWhen Good Characters Go Bad: A Guide to Diagnosing Character Display Problems as these characters are very near both in UTF-8 and in the [WayBackUnicode Characters in the Latin-1 Supplement Block:

I’ve seen these encodings, where only the top encoding is correct; the degeneration gets worse moving downwards, a classic Mojibake:

# encoded UTF-8 (hex.)
0 ë 0xC3 0xAB
1 ë 0xC3 0x83 0xC2 0xAB
2 ë 0xC3 0x83 0xC2 0x83 0xC3 0x82 0xC2 0xAB
3 ë 0xC3 0x83 0xC2 0x83 0xC3 0x82 0xC2 0x83 0xC3 0x83 0xC2 0x82 0xC3 0x82 0xC2 0xAB
4 ë 0xC3 0x83 0xC2 0x83 0xC3 0x82 0xC2 0x83 0xC3 0x83 0xC2 0x82 0xC3 0x82 0xC2 0x83 0xC3 0x83 0xC2 0x83 0xC3 0x82 0xC2 0x82 0xC3 0x83 0xC2 0x82 0xC3 0x82 0xC2 0xAB
5 ë 0x26 0x65 0x75 0x6d 0x6c 0x3b

The last one seldomly happens, the first one relatively often, just like [Archive.is] fd.nl did a while on their finanancial pages.

These mistakes become sort of understandable (but not forgivable) when you look at the below table-fragment (the full table is at[WayBack] Unicode/UTF-8-character table – starting from code position 0080).

Read the rest of this entry »

Posted in Development, Encoding, Mojibake, Power User, Software Development, Unicode, Web Browsers | Leave a Comment »

syntax – Comments in Markdown – Stack Overflow

Posted by jpluimers on 2019/06/17

Comments that are not emitted to the output:

The most platform-independent syntax is

(empty line)
[comment]: # (This actually is the most platform independent comment)

Thanks nick-volynkin for answering this at [WayBack] syntax – Comments in Markdown – Stack Overflow.

–jeroen

Posted in Development, Lightweight markup language, MarkDown | Leave a Comment »

Copy the full path of a file from Windows Explorer

Posted by jpluimers on 2019/06/14

Every now and then, I learn a “new” feature that has existed for a very long time.

This time it is about the Copy as Path feature from Windows Explorer context menu:

  1. hold the shift key, then right click any file or directory
  2. select Copy as Path

This was introduced in Windows Vista ([WayBack] How to Get Windows Vista and 7’s “Copy as Path” Option in Windows XP Context Menu? – AskVG).

By default the Copy as Path is not in the context menu: you have to press the shift key. In the past, I used tools like ClipName from the PC TimeWatch people – Freeware « The Wiert Corner – irregular stream of stuff.

Seems I do not use that any more for just copying one filename, only for copying multiple.

Related:

–jeroen

Posted in Power User, Windows, Windows Explorer / Windows Shell | Leave a Comment »

CitiZen nmap output

Posted by jpluimers on 2019/06/14

CitiZen nmap output: beagleboard with these open ports:

  • 22 – ssh
  • 80 – http
  • 81 – unknown
  • 1883 – mqtt
  • 35505 – http

–jeroen

Posted in *nix, *nix-tools, nmap, Power User | Leave a Comment »

The Absurdly Underestimated Dangers of CSV Injection in Excel

Posted by jpluimers on 2019/06/14

Reminder to self: see if this is till a thing in spreadsheet applications: [WayBackThe Absurdly Underestimated Dangers of CSV Injection.

That 7 was "=2+5" in the CSV, but it got much worse.

–jeroen

via: [WayBack] The Absurdly Underestimated Dangers of CSV Injection #Security – ThisIsWhyICode – Google+

Posted in Power User, Security | Leave a Comment »