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

Archive for 2019

Cool new Twitter account that warns about a free book when it appears: Packt Free Learning (@packtfreebook) | Twitter

Posted by jpluimers on 2019/06/25

Packt free books

Usually one free book each day, with some pauses when Packt Publishing runs other specials [WayBack] Packt Free Learning (@packtfreebook) | Twitter.

This account started on 20190621. Hopefully it lasts for a while, as it is a very easy reminder on when a new free book becomes available.

Maybe they will notify of other free specials as well; time will tell.

Hopefully, the WordPress Twitter binding will show the most recent one below by Packt – Wikipedia.

EU versus USA Packt prices

Note that since a month or two, the Packt site asks me on a daily base to switch to their European site instead of to their USA site.

Avoid switching, as that incurs a high currency conversion cost. For example:

So that is a EUR/USD conversion factor of between 0.9 and 0.86 right (eBook 9/10 and paper+eBook 38.99/44.99).

Actually that’s not true: at the time of writing, the conversion is 0.78 which leaves a ~15% profit for just eBooks (0.9/0.78-1) and ~10% (0.86/0.78) margin for the Packt conversion. A tad high for my likings.

[Archive.is] 10 usd in eur – Google Search

Read the rest of this entry »

Posted in Development, Software Development | Leave a Comment »

WouterVanNifterick/C-To-Delphi: C To Delphi converter

Posted by jpluimers on 2019/06/25

For my link archive: [WayBack] WouterVanNifterick/C-To-Delphi: C To Delphi converter

Via: [WayBack] Does anyone know of a C/C++ to Delphi converter? – Michael Riley – Google+

–jeroen

Posted in C, Delphi, Development, Software Development | 2 Comments »

missing TPopupMenu feature: checking for visibility

Posted by jpluimers on 2019/06/25

a method to detect when the menu was closed without a selection (i.e. none of the menuitem OnClick handlers fired). Add the unit below to your project and the form the popup menu is on will receive the custom messages defined in the unit when the menu appears or closes.

The solution by Peter Below in ExPopupList works from D5 on:  [Archive.ismissing TPopupMenu features? – Google Groups.

Now you can hook the [WayBackTControl.OnContextPopup Event for a [WayBackTPopupMenu activation, and the custom Windows messages CM_MENUCLOSED, CM_ENTERMENULOOP and CM_EXITMENULOOP to monitor the state of the popup menu.

Via:

–jeroen

Read the rest of this entry »

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

Enable remote desktop on Windows – SystemPropertiesRemote.exe

Posted by jpluimers on 2019/06/24

The easiest way to enable remote desktop access on Windows is by running SystemPropertiesRemote.exe.

There are alternatives using the command prompt that edit registry settings and network firewall in the links below, but they are all more cumbersome.

Links mostly via enable remote desktop on windows – Google Search

I need to check out:

  • which of the above are really old
  • how to find out if WinRM is enabled
  • see if this can be done over WinRM
  • see if this can be done with PSShell
  • see if PowerShell is a good successor to the now deprecated netsh
    • you want to enable the remote desktop group in a language and windows version neutral way, not just port 3389

Some registry entries:

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules]

"RemoteDesktop-UserMode-In-TCP"="v2.28|Action=Allow|Active=TRUE|Dir=In|Protocol=6|LPort=3389|App=%SystemRoot%\\system32\\svchost.exe|Svc=termservice|Name=@FirewallAPI.dll,-28775|Desc=@FirewallAPI.dll,-28756|EmbedCtxt=@FirewallAPI.dll,-28752|"
"RemoteDesktop-UserMode-In-UDP"="v2.28|Action=Allow|Active=TRUE|Dir=In|Protocol=17|LPort=3389|App=%SystemRoot%\\system32\\svchost.exe|Svc=termservice|Name=@FirewallAPI.dll,-28776|Desc=@FirewallAPI.dll,-28777|EmbedCtxt=@FirewallAPI.dll,-28752|"
"RemoteDesktop-Shadow-In-TCP"="v2.28|Action=Allow|Active=TRUE|Dir=In|Protocol=6|App=%SystemRoot%\\system32\\RdpSa.exe|Name=@FirewallAPI.dll,-28778|Desc=@FirewallAPI.dll,-28779|EmbedCtxt=@FirewallAPI.dll,-28752|Edge=TRUE|Defer=App|"
"RemoteAssistance-In-TCP-EdgeScope"="v2.28|Action=Allow|Active=TRUE|Dir=In|Protocol=6|Profile=Public|App=%SystemRoot%\\system32\\msra.exe|Name=@FirewallAPI.dll,-33003|Desc=@FirewallAPI.dll,-33006|EmbedCtxt=@FirewallAPI.dll,-33002|Edge=TRUE|Defer=App|"
"RemoteAssistance-Out-TCP"="v2.28|Action=Allow|Active=TRUE|Dir=Out|Protocol=6|Profile=Public|App=%SystemRoot%\\system32\\msra.exe|Name=@FirewallAPI.dll,-33007|Desc=@FirewallAPI.dll,-33010|EmbedCtxt=@FirewallAPI.dll,-33002|"
"RemoteAssistance-PnrpSvc-UDP-In-EdgeScope"="v2.28|Action=Allow|Active=TRUE|Dir=In|Protocol=17|Profile=Public|LPort=3540|App=%systemroot%\\system32\\svchost.exe|Svc=pnrpsvc|Name=@FirewallAPI.dll,-33039|Desc=@FirewallAPI.dll,-33040|EmbedCtxt=@FirewallAPI.dll,-33002|Edge=TRUE|Defer=App|"
"RemoteAssistance-PnrpSvc-UDP-OUT"="v2.28|Action=Allow|Active=TRUE|Dir=Out|Protocol=17|Profile=Public|App=%systemroot%\\system32\\svchost.exe|Svc=pnrpsvc|Name=@FirewallAPI.dll,-33037|Desc=@FirewallAPI.dll,-33038|EmbedCtxt=@FirewallAPI.dll,-33002|"

–jeroen

Posted in Power User, Windows | Leave a Comment »

How to take a nap

Posted by jpluimers on 2019/06/24

When the Coen brothers were asked about their creative process, Joel Coen said, “We do a lot of napping.” Maurice Sendak: “I love napping. Working and reading…”

Source on the how and why: [WayBack] How to take a nap

Via: [WayBack] Want to increase your creativity and productivity? Take a nap! Here’s how… – Marjan Venema – Google+

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

PlantUML Pleasantness: Change Line Style And Color – Messages from mrhaki

Posted by jpluimers on 2019/06/24

Learned a new thing today: you can change the line styles in PlantUML to these:

  • plain
  • dotted
  • dashed
  • bold

This in addition to the colour I already knew about. The order of these does not matter:

@startuml
 
' Make a dashed line, alternative syntax for ..>
(*) -[dashed]-> "Write outline"
 
' Make line bold and use color name
"Write outline" -[bold,#green]-> "Find example"
 
' Only change the color with hexadecimal RGB code
"Find example" -[#ff00ff]-> "Write blog"
 
' Order of line style and color can be reversed
"Write blog" -[#6666ff,dashed]-> "Publish"
 
' Use dotted line style
"Publish" -[dotted]-> (*)
 
@enduml

Source: [WayBackPlantUML Pleasantness: Change Line Style And Color – Messages from mrhaki

–jeroen

Posted in Color (software development), Development, Diagram, PlantUML, Power User, Software Development, UML | Leave a Comment »

Happy 40th birthday to Infocom, founded today in 1979!! #Infocom #TextAdventures #OTD

Posted by jpluimers on 2019/06/22

How cool!

I wish they had lslasted longer than almost a decade.

https://twitter.com/kgagne/status/1142476543995908097

Happy 40th birthday to Infocom, founded today in 1979!!

#Infocom #TextAdventures #OTD

Zork And The Z-Machine: Bringing The Mainframe To 8-bit Home Computers

To celebrate the 40th anniversary of Infocom, one of my most favorite game companies, I’m reminding everyone I spent half a year scanning thousands of pages from Steve Meretzky’s file cabinet and got almost the entire paper history of Infocom up:

https://archive.org/details/infocomcabinet

This is everything Steve had: Company internal memos, his design documents for all the games he wrote for them (and some he didn’t) as well as clippings, contextual writings and letters related to everything Infocom. It’s one of the most complete histories out there.

https://searchworks.stanford.edu/view/8491492

Posted in Uncategorized | Leave a Comment »

Refactoring Pro-Tip: Terrible code is not a good excuse to be mean, because terrible code is not well-correlated with having been written by terrible people.

Posted by jpluimers on 2019/06/22

Check out @GeePawHill’s Tweet: https://twitter.com/GeePawHill/status/1104760241034530817?s=09

Great thread.

We start every session by remembering the first rule of code review club: “You are not the code you wrote.”

Posted in Uncategorized | Leave a Comment »

List of applications behind the various control panel links – via “Stop user access to control panel”

Posted by jpluimers on 2019/06/21

An interesting set of apps behind the various control panel links from [WayBack] Stop user access to control panel. Even though from 2013, many still work.

I edited most because:

  • some had the form control /name - Microsoft.AutoPlay but the – should have been between the name and the command.
  • none had the commands in code format so it was hard to see what you have to run

Add Hardware – Wizard hdwwiz.cpl
Administrative Tools – control admintools
Advanced System Properties ?
Advanced tab System – PropertiesAdvanced.exe
Computer Name – tab sysdm.cpl or SystemPropertiesComputerName.exe
Prevention tab – SystemPropertiesDataExecutionPrevention.exe
Hardware tab – SystemPropertiesHardware.exe
System Protection tab – SystemPropertiesProtection.exe
Remote tab – SystemPropertiesRemote.exe
AutoPlay – control /name Microsoft.AutoPlay
Backup and Restore Center – control /name Microsoft.BackupAndRestoreCenter
Backup Status and Configuration – sdclt.exe
BitLocker Drive Encryption – control /name Microsoft.BitLockerDriveEncryption
Bluetooth Devices – bthprops.cpl
Date And Time – timedate.cpl or control date/time
Display Settings – desk.cpl
Default Programs – control /name Microsoft.DefaultPrograms
Device Manager – devmgmt.msc
Disk Manager – diskmgmt.msc
Ease of Access Center – access.cpl or Utilman.exe
Game Controllers –  joy.cpl
Indexing Options – control /name Microsoft.IndexingOptions
Internet Options – inetcpl.cpl
Keyboard Properties – control keyboard
Mouse Properties – main.cpl or control mouse
Network and Sharing Center – control /name Microsoft.NetworkandSharingCenter
Network Connections – ncpa.cpl or control netconnections
Offline Files – control /name Microsoft.OfflineFiles
Parental Controls – control /name Microsoft.ParentalControls
Pen and Input – Devices TabletPC.cpl
People Near Me – collab.cpl or p2phost.exe
Phone and Modem Options – telephon.cpl or control telephony
Power Options – powercfg.cpl
Printers – control printers
Problem Reports and Solutions – wercon.exe
Programs and Features – appwiz.cpl
Regional and Language Options – intl.cpl or control international
Scanners and Cameras – sticpl.cpl
Secure Online Key Backup – control /name Microsoft.SecureKeyBackup
Security Center – wscui.cpl
Sound – mmsys.cpl
Speech Recognition Options – control /name Microsoft.SpeechRecognitionOptions
Sync Center – mobsync.exe
System – control /name Microsoft.System
Tablet PC Settings – control /name Microsoft.TabletPCSettings
Task Scheduler – control schedtasks
Text to Speech – sapi.cpl or control speech
User Accounts – nusrmgr.cpl or Netplwiz.exe or control userpasswords
User Accounts (advanced) – control userpasswords2
Volume Mixer – SndVol.exe
Welcome Center – control.exe /name Microsoft.WelcomeCenter
Windows Defender – MsAsCui.exe
Windows Firewall – Firewall.cpl or FirewallControlPanel.exe
Windows Firewall Settings – FirewallSettings.exe
Windows Sidebar Properties – control.exe /name Microsoft.WindowsSidebarProperties
Windows SideShow – control.exe /name Microsoft.WindowsSideshow
Windows Update – control.exe /name Microsoft.WindowsUpdate

–jeroen

Posted in Power User, Windows | Leave a Comment »

Is it possible to comment out lines of diagram syntax? – PlantUML Q&A

Posted by jpluimers on 2019/06/21

I like PlantUML a lot as it is an easy way to create even simple diagrams using plain text, for instance a simple Sequence Diagram like below.

Sometimes, you want to add comments because the way you build the diagram needs explanation that is not needed in the diagram itself. You can:

[Archive.is] Is it possible to comment out lines of diagram syntax? – PlantUML Q&A:

You can use quote like in the following example

@startuml
' This is a comment on a single line
Bob->Alice : hello
/' You quote by using slash-and-quote
to split your comments on several
lines '/
@enduml

[Archive.isSequence Diagram syntax and features

–jeroen

Posted in Development, Diagram, PlantUML, Power User, Software Development, UML | Leave a Comment »