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

A repository with a hierarchy or modules referencing each other might not be a good idea

Posted by jpluimers on 2018/11/20

When creating a library of libraries where the libraries use parts of the other libraries creates a mess when organised as a repository with subrepositories having other subrepositories.

It might be better to have one big repository containing a suite of functionality. This is why darkThreading became part of darkGlass: [WayBack] Why no git submodules for the libraries it depends on? · Issue #1 · chapmanworld/darkThreading · GitHub:

You might want to maintain that suite as one big versioned repository, with a different means of structuring it than a tree of submodules. That way you can keep the more complex interdependencies between the parts you have now.

Example of the mess: [WayBack] Duplicate submodules with Git – Stack Overflow

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management | Leave a Comment »

Where does my git question go? – Programmers Meta Stack Exchange

Posted by jpluimers on 2018/11/20

StackOverflow / StackExchange is growing too large:

You’ve got a question about git. Its not uncommon, lots of people have questions about git. But where should the question be asked?

Source: Where does my git question go? – Programmers Meta Stack Exchange

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, GitHub, Opinions, Pingback, Software Development, Source Code Management, SourceTree, Stackoverflow | Leave a Comment »

Reminder to Self: check if NameOf has been implemented yet

Posted by jpluimers on 2018/11/20

It’s been a wish for a very very long time: to get the name of an identifier as a string in Delphi:

For now the best one can do is either using an Assert and catching the exception (it gets you the unit name, source file name and source line number) in the links below, or using debug symbol information (like a MAP or TDS file) mentioned in the StackOverflow questions above.

C# has had a  [WayBack] nameof for many years now that is evaluated at compile time: [WayBackc# – Is nameof() evaluated at compile-time? – Stack Overflow.

There is a request RAD Studio – RSP-13290: NameOf(T) compiler (magic) function in Quality Portal by Horácio Filho about 3 years ago quotes below.

Since it took the C# team about 3 years after the original [WayBackAdd nameof operator in C# – Visual Studio request, I wonder how fast the Delphi team is.

NameOf .NET-like compiler magic (intrinsic) function would eliminate a lot of hand-written exception messages from several units.

C# 6 introduced nameof operator to obtain the simple (unqualified) string name of a variable, type, or member.

With the current Delphi implementation, after changing variables name we have ot change the related exception message as well. Putting variables name in the code is not a good practise, and is here that NameOf taking place saving tons of lines of code. As the result of NameOf(T) function (if so) is evaluated at compile time (according to the C# implementation – http://stackoverflow.com/a/26573179) we need a help from compiler or it could be achieved using RTTI.

There is a discussion on Google+ community [WayBackhttps://plus.google.com/+StefanGlienke/posts/AsGHSLF4rTX.
The function could be designed as
NameOf(x: Identifier)
following the same (or similar) warranties C# provides.

Using Assert:

–jeroen

Read the rest of this entry »

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

RegExr: Online Regular Expression Testing Tool

Posted by jpluimers on 2018/11/19

[WayBack] Kevlin Henney – Google+ reminded me of RegExr. Then I found out I collected the below links in 2010, but never published them. Hopefully a few still exist. Let’s see… yup: all do, but archived just in case.

Some other links (that show how much the landscape changed in 8.5 years time):

–jeroen

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

EPOX EP-8RDA3i motherboard with code FF before POST starts

Posted by jpluimers on 2018/11/19

From a long time ago: EVGA motherboard are very similar to EPOX ones (they

Once I had an FF motherboard code before even the POST started on an EP-8RDA3i motherboard.

Basically taking everything out, clearing the CMOS and putting everything back in solved the problem:

The capacitors were still OK.

–jeroen

Read the rest of this entry »

Posted in Hardware, Power User | Leave a Comment »

Refurbish the battery on an HP P410 BBWC | Opensource Blog

Posted by jpluimers on 2018/11/19

TL;DR: BBWC are using NiMh batteries that you can replace with bigger ones.

Source: [WayBackRefurbish the battery on an HP P410 BBWC | Opensource Blog

Via: [WayBack] Very useful hack if you are running old HP Xeon servers and want to use the original disk controllers and spinny rust. – Alan Cox – Google+

–jeroen

Read the rest of this entry »

Posted in Hardware, Power User, RAID | Leave a Comment »

nmap for Windows: ncat as a TCP client to servers

Posted by jpluimers on 2018/11/16

Downloads are from a bit cryptic page [WayBack] Download the Free Nmap Security Scanner for Linux/Mac/Windows via [WayBack] Windows | Nmap Network Scanning.

An alternative is to go to [WayBack] nmap.org/dist, then search for the bottom most files having .exe or .zip extensions.

It is much more modern than netcat (see some links on that below) and has elaborate documentation:

As a comparison some netcat links:

–jeroen

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

Convert/adapt an old ATX Power Supply into a Bench Power Supply with (or without) 3D Printed Parts

Posted by jpluimers on 2018/11/16

An interesting idea, although I would slightly modify it so I can -12V and -5V as well and maybe other voltage combinations too:

They are based on these underlying links:

Note that some of the newer power supplies with 24-pin molex connectors do not give you -5V any more.

A few notes:

  • depending on the age, ATX supplies can get you these voltages: -12V, -5V, 0V, +3.3V, +5V, +12V
    • -12V and -5V have very limited currents
    • newer power supplies often do not have -5V (especially the ones having 24-pin connectors)
    • newer power supplies have limited +5V power, but higher +12V power
    • older power supplies have limited +12V power, but higher +5V power
  • always take pictures of all connectors and the wire colours connected to them before starting (especially before cutting any wires)
    • this allows you to find back:
      • non-standard wire colours
      • configurations not covered here
  • to get stable 12V, you need a 5V load of about 5W:
    • between RED (+5V) andBLACK (GND),
    • for instance with pin 3 and pin 4,
    • or over one of the molex/floppy connectors: pins RED-BLACK
    • as load,
      • use at least a 10V/10W resistor or 12v/10W halogen lamp
      • ensure they are cooled well
  • to get stable 12V, you need a 12V load of about 10W
    • between YELLOW (+12V) andBLACK (GND),
    • for instance with pin 10 and pin 17,
    • or over one of the molex/floppy connectors: pins YELLOW-BLACK
    • as load,
      • use at least a 20V/20W resistor or 12v/20W halogen lamp
      • ensure they are cooled well
  • if your power supply has a BROWN (+3.3VS),
    • then ensure it is connected to ORANGE (+3.3V)
      • as brown is the SENSING wire to check 3.3V is OK.
  • to turn the power supply on,
    • short GREEN (PWR_ON, pin 14) and BLACK (GND, pin 15)
  • to know when the power is on:
    • connect a LED via a resistor between GREY (PWR_OK, pin 8) and BLACK (GND, pin 7)
  • to know when there is mains power:
    • connect a LED via a resistor between PURPLE (+5VSB, pin 9: stand by) and BLACK (GND, pin 7 or pin17)
  • Wikipedia: ATX Power supply describes
    • PWR_OK (often called Power Good)
    • +5VSB (stand by)
  • read the specs of your power supply to understand how much current it can deliver on which lines
  • some more current information

Example for loads: https://www.youtube.com/watch?v=gKgziA46wFY; more on why you need them and how to choose:

With a few more modifications you can [WayBack] Convert a Computer Power Supply to a Variable Bench Top Lab Power Supply.

I will probably go for this solution as it is easier to swap power supplies.

–jeroen

Via: [WayBack] Nice recycling of an old ATX power supply with a 3D printed part and a few accessories and cables… – Jean-Luc Aufranc – Google+

 

Read the rest of this entry »

Posted in Development, Hardware Development | 3 Comments »

Timestamp Generator / Converter – Timestampgenerator.com

Posted by jpluimers on 2018/11/16

I wish Google Search would return this when asking for “current time in ISO 8601”: [WayBackTimestamp Generator / Converter – Timestampgenerator.com

Type Value
Timestamp 1497872708
Server time 2017-06-19T11:52:55+00:00
ISO 8601 2017-06-19T11:45:08+00:00
RFC 2822 Mon, 19 Jun 2017 11:45:08 +0000
Day of the Week Monday
+1 Hour 1497876308
+1 Day 1497959108
+1 Week 1498477508
+1 Month 1500464708
+1 Year 1529408708

–jeroen

Posted in ISO 8601, LifeHacker, Power User | Leave a Comment »

Solution for Delphi – post-build event with multiple if/copy combinations only execute if first file does not exist – Stack Overflow

Posted by jpluimers on 2018/11/15

My solution in [WayBack] delphi – post-build event with multiple if/copy combinations only execute if first file does not exist – Stack Overflow is an addendum to my 2014 post Delphi prebuild/prelink/postbuild events.

Here we go:

Read the rest of this entry »

Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development, The Old New Thing, Windows Development | Leave a Comment »