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 January, 2021

Delphi TVirtualMethodInterceptor like magic: some links of useful stuff made with it

Posted by jpluimers on 2021/01/13

I think TVirtualMethodInterceptor is a really nice things added to Delphi XE: it allows you to overwrite virtual methods of a class.

Since the documentation from that era cannot be saved in the WayBack machine, here is some more recent documentation:

Over the years, the underlying RTTI has been improved, so it can now do more than in the past, but is still cumbersome to use, see for instance [WayBack] tutorial script delphi Changing component class at run-time on demand – CODE Q&A Solved and [WayBack] TVirtualMethodInterceptor (Delphi) – RAD Studio Code Examples and [WayBack] Entropy Overload: Virtual method interception and [WayBack] Playing around with TVirtualMethodInterceptor | Delphi Haven with TVirtualMethodLogger.

Luckily there are more powerful alternatives based on the same ideas and/or underlying implementationIn fact, it can do so much for instance on the Spring4D and DSharp frameworks.

A demo is at [WayBack] Delphi sorcery: Pimp your unit tests using mock objects or [WayBack] Delphi sorcery: AOP and duck typing in Delphi.

The demo of the mocking framework was at code.google.com/archive/p/delphisorcery, but now is part of bitbucket.org/sglienke/dsharp at bitbucket.org/sglienke/dsharp/src/master/Source/Testing.

Some relevant directories:

Basically it is a playground for the more often updated and stable Spring4D where these directories and files are relevant:

–jeroen

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

Not all language packs are created equal… 

Posted by jpluimers on 2021/01/12

[WayBack] Why don’t I get properly translated program output after installing the corresponding language pack? – The Old New Thing.

It means you cannot fully cover all translations when writing software.

More on translating your software at [WayBack] Where can I get the glossary of Microsoft’s standard translations for computer terms? – The Old New Thing « The Wiert Corner – irregular stream of stuff.

–jeroen

Posted in Development, Software Development, The Old New Thing, Windows Development | Leave a Comment »

TODO: if weerslag hasn’t supported https yet, dig deeper into ProxyPass / ProxyPassReverse

Posted by jpluimers on 2021/01/12

I’ve this page for my brother: https://martijn.pluimers.com/agenda-month-weather.html.

It serves his agenda plus a few weather widgets.

The weerslag widget fails to load as it’s in an iframe pointing to http but the page is https. That’s not allowed as shown in this nice table at [WayBackssl – Insecure content in iframe on secure page – Stack Overflow by amol-ghotankar and richard:

page  - iframe - status
----- - -----  - -----------
http  - http   - allowed
http  - https  - allowed
https - http   - not allowed
https - https  - allowed

So I put it behind a simple Apache reverse proxy: https://www.pluimers.com/maps.weerslag.nl/GratisRadar/1201/864/verwacht?zoom=10:


<Location /maps.weerslag.nl>
ProxyPass http://maps.weerslag.nl
ProxyPassReverse http://maps.weerslag.nl
Require all granted
</Location>

If they still haven’t fixed their https access, I need to dig deeper into this.

When writing this [Arhive.ishttps://maps.weerslag.nl/GratisRadar/1201/864/verwacht?zoom=10 gave a 404 and http://maps.weerslag.nl/GratisRadar/1201/864/verwacht?zoom=10 misbehaved behind the proxy:

–jeroen

Posted in *nix, Apache2, Development, Power User, Web Development | Leave a Comment »

Debugging a Delphi – Format and Pointers/Hex Values (Memory Overwrite) – Stack Overflow

Posted by jpluimers on 2021/01/12

A long time ago (Delphi XE2 era), David Dubois and I helped out Doug find either the cause or a workaround of a memory overwrite in a 32-bit application.

The problem was that a call to Format for a pointe or hex value would give corrupt results, but with a regular integer value it would succeed.

Doug created an example [WayBack] overwriting some memory to simulate the problem.

I provided some steps [WayBack] to help trace such cases down.

In the and a rebuild – first withut madExcept, later with madExcept turned on again – solved the problem.

Likely this was the Delphi IDE becoming corrupt, something which I have seen intermittently over the last two decades.

Be sure to read both answers at [WayBack] delphi – Format and Pointers/Hex Values (Memory Overwrite) – Stack Overflow

–jeroen

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

Opensuse Community Account Migration

Posted by jpluimers on 2021/01/11

Apparently, during my 15 month rectum cancer fight, I missed the one month window of migrating my opensuse account (because of the sale of opensuse from Microfocus to a German investment company named EQT Partners).

I got the email on may 1st (right before my first surgery) and since I only just am recovering from the last surgery, discovered [Wayback] Community Account Migration:

The Community Accounts (aka. Bugzilla Accounts) will migration to the SUSE datacenter in Nuremberg

SUSE is the largest independent open source company.
We are finalizing this independence also on the technical level.
The Community Accounts (a.k.a. Bugzilla Accounts) were moved back to SUSE to a new system in our Nuremberg data center.

All accounts have been migrated. Except for the password.
To access your migrated account a migration tool was offered until June 18th
The migration is no longer possible.
To regain access to your account you have to request a password reset.
This requires that the account has your correct email address registered.
If this is not the case you will have to create a new account.

It looks like the account migration uses Okta (identity management) – Wikipedia as authentication service (quite odd for a German company to use a USA based company for authentication: hellp GDPR!), using mail servers having hostnames not ending in opensuse.org, but like o#.mailrelay.okta.com.

Hopefully identify emails do get through: they are now trying to get past my grey-list filters.

Edit:

The okta mail servers didn’t get through the grey-list, so I forced them to the secondary mail servers where they did get through.

It indicated migration is not possible any more and I should seek help:

At this time your password can only be reset by an administrator. To send them a request, go to your Sign-in Help page. Then click the Request help link.

So I did:

Hi,

Due to my 15 months fight with rectumcancer and the “SUSE Account Changes – Coming soon!” last May not indicating any deadline for the migration, I missed the one month account migration window (2020-05-18 to 2020-06-18) mentioned at https://idp-portal-info.suse.com/

Can you please re-activate the account jeroen.suffix@example.com and re-bind the forums.opensuse.org username accountname for me and send me a password reset email on that above email address?

Thanks,

–jeroen

Edit 20210112:

I got an account activation email, added password/question/mobile-phone-number, then got redirected to https://myaccount.suse.com/app/UserHome, then the “Forums” link allowed me to enter a forums alias the same as my old alias. So it looks it sort of works now: my old jpluimers posts have not been linked to my new account.

Some reading for when I have more energy:

I just checked and the email about migration did not indicate any deadline apart from that password reset links were valid for 90 days, a lot longer than one month window.

–jeroen

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

How to remove (disable or hide) User Accounts on the Windows 10 Login Screen – Make Tech Easier

Posted by jpluimers on 2021/01/11

Works on my systems too (I think it works from Windows XP on) to hide users from the home screen: [WayBackHow to Hide User Accounts on the Windows 10 Login Screen – Make Tech Easier.

Show only the last logged on user, but add a switch-user dialog

Run the below .reg file on your machine, or manually add this key (does not need any value): HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\DomainStyleLogon

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\DomainStyleLogon]

Note the empty line at the end of the .reg file: that is by intention.

This will show the last logged-on user on the home screen, but still allows users to perform a switch to other users.

Related: [WayBack] ALWAYS display the last / default user Windows 7 welcome screen

Disable the users on the logon screen from interactive logon

Warning: do NOT disable your administrator user this way!

For why not, see the various users that lost access: [WayBackHide User Accounts on Windows 7 Logon – Windows 7 IT Pro > Windows 7 User Interface

  1. use net user on the command prompt to list the usernames and note the username you want to hide from the login screen
  2. run regedit to edit the registry
  3. ensure this registry key exists HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
  4. Under that key, create a new key SpecialAccounts
  5. Under the SpecialAccounts key, create a new key UserList
  6. Under the UserList key, create a new DWORD (32-bit) value with the Value name equal to the username and the Value data to zero (0, which is the default)
  7. Reboot
  8. Observe that user is not on the login window any more.

Example:

If you lost access because of SpecialAccounts

If you would like to unhide the hidden Administrator account on Windows 7:

  1. Boot a Windows 7 Installation DVD or ISO
  2. go to command prompt and type regedit -it
  3. click on HKLM hive and
  4. next navigate File>>Load hive
  5. navigate to C:\Windows\System32\config folder and choose `SOFTWARE` file load it and assign this hive any name for example REM_SOFTWARE
  6. open key HKEY_LOCAL_MACHINE\REM_SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList
  7. remove the Administrator account
    • or better way remove the whole key HKEY_LOCAL_MACHINE\REM_SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts

–jeroen

Posted in Power User, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1 | Leave a Comment »

Test for modern Internet Standards like IPv6, DNSSEC, HTTPS, DMARC, STARTTLS and DANE.

Posted by jpluimers on 2021/01/11

Cool: [WayBack] Test for modern Internet Standards like IPv6, DNSSEC, HTTPS, DMARC, STARTTLS and DANE.

Their motivation and background: [WayBack] About Internet.nl

–jeroen

Posted in Encryption, HTTPS/TLS security, Power User, Security | Leave a Comment »

🔎Julia Evans🔍 on Twitter: “ssh tips… “

Posted by jpluimers on 2021/01/08

Great work by [WayBack]  🔎Julia Evans🔍 on Twitter: “ssh tips… “

[WayBackssh tips JPG

Via:

Some more tips:

Read the rest of this entry »

Posted in *nix, *nix-tools, Communications Development, Development, Internet protocol suite, Power User, SSH, ssh/sshd | Leave a Comment »

Roderick Gadellaa on Twitter: simple app that (re)sets the volume of the TV to 8% of the max volume every time you turn it on.

Posted by jpluimers on 2021/01/08

[WayBack] Roderick Gadellaa on Twitter: “In case anyone who owns an Android TV is interested: I’ve built a (very, very) simple app that (re)sets the volume of the TV to 8% of the max volume every time you turn it on.  #androidtv #tools…”

[WayBack] Roderick Gadellaa on Twitter: “Some instructions: – You have to sideload it (google is your friend: “how to sideload app on android tv”) – You have to start the app once. It won’t show up on Home, so go to Settings > Apps > TvVolsetr > Open – Android TV 7.0 Nougat or higher required”

[WayBackRoderick Gadellaa auf Twitter: “Some instructions: – You have to sideload it https://t.co/8aK0bmXXFl – You have to start the app once. It won’t show up on Home, so go to Settings > Apps > TvVolsetr > Open – Android TV 7.0 Nougat or higher required”

Follow only the images links from [Archive.is] “how to sideload app on android tv” – Google Search, as the others point to phishing sites.

This image link for instance is useful: [WayBack] How to Sideload Apps on Android TV: Android TV is an excellent product for anyone who wants to expand their current living room setup—it makes easy work of streaming most content, has a slew of games (that are actually worth playing), and is relatively inexpensive. But what happens when an app you want on your TV isn’t available for your device?

Download: [WayBacktvVolsetr.apk

–jeroen

Read the rest of this entry »

Posted in Android, Android Devices, Mobile Development, Power User, Software Development | Leave a Comment »

OKI C332/MC342 – reset (short) device name, location, asset number and contact name

Posted by jpluimers on 2021/01/08

I’ve found out that the only way to reset the below fields on an OKI printer is to

  1. go to the printer main page at http://192.168.124.34 (use the IP address of your own printer here)
  2. logon as Administrator (on an OKI C332 that’s user admin which has default password 999999, on an OKI MC342 the password is aaaaaa)
  3. go to the page http://192.168.124.34/setupfrm.htm (use the IP address of your own printer here) as that page can potentially be skipped during login
  4. update these fields:
    • Device Name
    • Short Device Name
    • Asset Number
    • Contact Name – Administrator

Image source: [Archive.csChecking or Changing the Settings of This Machine from a Computer (MC853, MC873)

–jeroen

 

Posted in OKI C332, OKI Printers, Power User, Printers | Leave a Comment »