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 4,262 other subscribers

Archive for December 21st, 2021

Busybox ash/dash – Hexadecimal To Decimal in Shell Script (via Stack Overflow)

Posted by jpluimers on 2021/12/21

This works fine on “BusyBox v1.29.3 (2019-05-21 15:22:06 PDT) multi-call binary.” that is included with VMware ESXi 6.5 update 3:

[Wayback] bash – Hexadecimal To Decimal in Shell Script – Stack Overflow

Dealing with a very lightweight embedded version of busybox on Linux means many of the traditional commands are not available (bc, printf, dc, perl, python)

echo $((0x2f))
47

hexNum=2f
echo $((0x${hexNum}))
47

Credit to [Wayback] Peter Leung for this solution.

–jeroen

Posted in *nix, *nix-tools, ash/dash, ash/dash development, Development, Power User, Scripting, Software Development | Leave a Comment »

DroidCam – Webcam for PC – Apps on Google Play

Posted by jpluimers on 2021/12/21

Since most phones still have better cameras than most laptops, this is on my list of things to try:

Android app: [Wayback/Archive] DroidCam – Webcam for PC – Apps on Google Play (there is also an iOS app, but I don’t use iOS devices)

Client software for Windows and Linux:  [Wayback/Archive] Dev47Apps

DroidCam turns your phone/tablet into a webcam for your PC.
Use it with chat programs like Zoom, MS Teams, and Skype.

Main Features:
– Chat using “DroidCam Webcam” on your computer, including Sound and Picture.
– Connect over WiFi or USB cable.
– Unlimited free usage at standard definition.
– Keep using your phone with DroidCam in background (Android).
– Simple, safe, efficient, and trusted by millions of people worldwide.

DroidCamX Pro Features:
– Switch to HD Mode for 720p/1080p high definition video.
– Camera controls: toggle light, enable continuous auto focus, zoom in/out.
– Rotate, Flip & Mirror the video to better match your setup.
– Adjust brightness, contrast, add video delay and adjust audio volume (Windows).
– USB-Only mode for extra privacy and security.
– Option to auto-mute phone calls.
– No Ads.

I am really curious how they did this on the software side: developing and signing drivers; low-latency communications protocol, etc.

Via: [Wayback/Archive] Apple deelt workaround die scherm verkleint voor MacBook Pro-notch-problemen – Computer – Nieuws – Tweakers

–jeroen

Posted in Development, Hardware Interfacing, Power User, USB, WebCam | Leave a Comment »

13 Tips for Writing Useful Unit Tests | by Nick Hodges | Better Programming

Posted by jpluimers on 2021/12/21

[Wayback/Archive.is] 13 Tips for Writing Useful Unit Tests | by Nick Hodges | Better Programming (I made direct links to the topics in the below quote):

How you write your tests is as important as writing them

1. Test One Thing at a Time in Isolation
2. Follow the AAA Rule: Arrange, Act, Assert
3. Write Simple “Fastball-Down-the-Middle” Tests First
4. Test Across Boundaries
5. If You Can, Test the Entire Spectrum
6. If Possible, Cover Every Code Path
7. Write Tests That Reveal a Bug, Then Fix It
8. Make Each Test Independent
9. Name Your Tests Clearly and Don’t Be Afraid of Long Names
10. Test That Every Raised Exception Is Raised
11. Avoid the Use of Assert.IsTrue
12. Constantly Run Your Tests
13. Run Your Tests as Part of Every Automated Build

–jeroen

Posted in Agile, Development, Software Development, Unit Testing | Leave a Comment »

Jeff Duntemann on Twitter: “I adapted my book Borland Pascal 7 From Square One for FreePascal. This involved cutting out obsolete stuff like the BGI and TurboVision, and adding a few things here and there. I then released it as a free PDF ebook

Posted by jpluimers on 2021/12/21

Cool!

{Wayback] www.copperwood.com/pub/FreePascalFromSquareOne.pdf

This is the FreePascal adoption of Borland Pascal from Square One: Duntemann, Jeff

Via: [Archive.is] Jeff Duntemann on Twitter: “I adapted my book Borland Pascal 7 From Square One for FreePascal. This involved cutting out obsolete stuff like the BGI and TurboVision, and adding a few things here and there. I then released it as a free PDF ebook: #pascal #programmingisfun … “

–jeroen

Posted in Borland Pascal, Development, FreePascal, Pascal, Software Development | Leave a Comment »