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

Chronological Facebook

Posted by jpluimers on 2019/09/30

For people still using Facebook: visit it using www.facebook.com/?sk=h_chr.

This will open the chronological view of your Facebook feed.

Via:

–jeroen

 

Posted in Facebook, Power User, SocialMedia | Leave a Comment »

Readable weekdays in Excel

Posted by jpluimers on 2019/09/30

Since I always forget this: [WayBackExceljet: Get day name from date

If you need to get the day name (i.e. Monday, Tuesday, etc.) from a date, there are several options depending on your needs.

Basically there are four ways go get the day of the week; the first three are readable, but when ordered, they are ordered alphabetically. The last one is numeric.

Combining the numeric with the text is easier in for instance Pivot Legend Fields (Series).

So here they go (based on the above link), assuming that B4 contains a timestamp:

  1. =WEEKDAY(B4) gives you the numeric weekday (starting with Sunday=1 to Saturday=7) which allows sorting in a meaningful order
  2. =TEXT(B4,"dddd") gives you the full day name of B4 in your locale
  3. =TEXT(B4,"ddd") gives you the shortened day name of B4 in your locale
  4. =CHOOSE(WEEKDAY(B4),"Sun","Mon","Tue","Wed","Thu","Fri","Sat") gives you a name of your liking from a series of 7 texts

Note that depending on your locale, these formulas might actually need a semicolon:

  1. =WEEKDAY(B4)
  2. =TEXT(B4;"dddd")
  3. =TEXT(B4;"ddd")
  4. =CHOOSE(WEEKDAY(B4);"Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat")

–jeroen

Read the rest of this entry »

Posted in Excel, Office, Power User | Leave a Comment »

Meeting Agreements for High Performing Teams – Noteworthy — The Journal Blog

Posted by jpluimers on 2019/09/30

Worthy short read: [WayBackMeeting Agreements for High Performing Teams – Noteworthy — The Journal Blog

A quote from it:

[WayBackPatrick Lencioni‏ @patricklencioni: If someone offered me a single piece of evidence to assess the health of an org, I would want to observe the executive team during a meeting

–jeroen

via: [WayBack] Meeting Agreements for High Performing Teams – Noteworthy — The Journal Blog – Marjan Venema – Google+

Read the rest of this entry »

Posted in Agile, Development, LifeHacker, Power User, Software Development | Leave a Comment »

Sony STR-DE205 Receiver – storing FM stations into memory

Posted by jpluimers on 2019/09/27

Somehow I misplaced the manuals of my Sony STR-DE205 receiver, including the Operating Instructions.

Sony still makes receivers

I did find [WayBack] Sony STR-DE205 – Manual – AM/FM Stereo Receiver – HiFi Engine which has a Service Manual. It has no operating instructions though.

Luckily, the STR-DE205 is very similar to the Sony STR-DE305, which I found using sony str de205 filetype:pdf operating instructions and having an Operating Instructions copy at [WayBackpdf.crse.com/manuals/3810995221.pdf.

In fact, all the pictures in that manual look remarkably similar to the STR-DE205, except for one: the remote control:

It has one extra button POWER, which the STR-DE205 lacks, which likely means the STR-DE305 can be powered on remotely (like my trusty Sony MHC-3000 mini set that is slightly older).

Anyway, programming is easy as long as you know you need to press one of the NUMERIC BUTTONS in step 5:

  1. Press TUNER.
    The last received station is tuned in.
  2. Tune in the station you want.
    If you are not familiar with how to tune in a station, see “Receiving Broadcasts” on the previous page.
  3. Press MEMORY.
    “MEMORY” appears for a few seconds.
    Do steps 4 and 5 before “MEMORY” goes out.
  4. Press SHIFT to select a character (A, B or C).
    Each time you press SHIFT, the letter “A”, “B” or “C” appears in the display.
    If “MEMORY” disappears, start again from step 3.
  5. While MEMORY is displayed, press the number you want to use (0 to 9).
  6. Repeat Steps 2 to 5 to preset other stations.

Getting the text out of the PDF was a bit of a pain, as even though it renders, DRM tried to prohibit copying.

Luckily there is a pdftohtml with a -nodrm feature in Poppler (software) – Wikipedia (unlike the Xpdf – Wikipedia it forked from that does not have this switch) which I got based on these links:

Some more images are below after some Sony STR-DE205 videos.

–jeroen

Read the rest of this entry »

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

Running a feature branch from the letsencrypt certbot

Posted by jpluimers on 2019/09/27

So I won’t forget; the steps below based on and assumes ~/Versioned is the directory where you keep repositories in:

# cd ~/Versioned
# git clone https://github.com/certbot/certbot.git
...
# cd certbot
# git fetch --all
Fetching origin
# git checkout alt_override
Branch 'alt_override' set up to track remote branch 'alt_override' from 'origin'.
Switched to a new branch 'alt_override'
# ./certbot-auto --os-packages-only
OS packages installed.
# ./tools/venv.sh
... very long log ...
Please run the following command to activate developer environment:
source venv/bin/activate
# source ./venv/bin/activate
[venv] # venv/bin/certbot renew --force-renewal

–jeroen

Posted in Encryption, Let's Encrypt (letsencrypt/certbot), Power User, Security | Leave a Comment »

zabbix on Windows: check the configuration before restarting the Zabbix Agent service

Posted by jpluimers on 2019/09/27

If the Zabbix configuration on Windows (especially mismatches in C:\zabbix\zabbix.agentd.conf.d), then the Zabbix Agent will not start at all:

C:\zabbix\bin\win64>zabbix_agentd.exe --start
zabbix_agentd.exe [4711]: ERROR: cannot start service [Zabbix Agent]: [0x0000041D] The service did not respond to the start or control request in a timely fashion.

This is how to check it before starting the service:

C:\zabbix\bin\win64\zabbix_agentd.exe --config C:\zabbix_agentd.conf
zabbix_agentd.exe [43]: ERROR: cannot add user parameter "MyDuplicate[*],PowerShell.exe -File C:\zabbix\UniquePowerShellScript.ps1 "$1"": key "MyDuplicate" already exists

The problem is that in the C:\zabbix\zabbix.agent.conf.d directory, two files had a similar config:

UserParameter=MyDuplicate[*],PowerShell.exe -File C:\zabbix\FirstPowerShellScript.ps1 "$1"
UserParameter=MyDuplicate[*],PowerShell.exe -File C:\zabbix\SecondPowerShellScript.ps1 "$1"

The problem is that the first part of UserParameter (before the [*])  is a key which needs to be unique over all configuration files.

If everything is fine, you will see this:

C:\zabbix\bin\win64\zabbix_agentd.exe --config C:\zabbix_agentd.conf
zabbix_agentd.exe [1581]: use foreground option to run Zabbix agent as console application

If you need to manually start Zabbix as a service, then perform this (the first step is not needed if the service has already been stopped):

C:\zabbix\bin\win64>zabbix_agentd.exe --stop
zabbix_agentd.exe [1642]: service [Zabbix Agent] stopped successfully

C:\zabbix\bin\win64>zabbix_agentd.exe --start
zabbix_agentd.exe [1642]: service [Zabbix Agent] started successfully

–jeroen

Posted in *nix, Linux, Monitoring, Power User, Windows, Zabbix | Leave a Comment »

Soap Delphi Client end with a timeout for a 1MB call – Stack Overflow

Posted by jpluimers on 2019/09/26

This was a change between IE6 and IE7 on the default time-out decreasing from 3600 seconds to 30 seconds: [WayBack] Soap Delphi Client end with a timeout for a 1MB call – Stack Overflow.

If you want to increase the timeout, then use InternetSetOption. You can get the current value using InternetQueryOption.

In Delphi, THTTPReqResp.Send supports this by setting the various time out options right after creating the request:

    Request := HttpOpenRequest(FInetConnect, 'POST', PChar(FURLSite), nil,
                               nil, nil, Flags, 0{Integer(Self)});
    Check(not Assigned(Request));

    { Timeouts }
    if FConnectTimeout > 0 then
      Check(not InternetSetOption(Request, INTERNET_OPTION_CONNECT_TIMEOUT, Pointer(@FConnectTimeout), SizeOf(FConnectTimeout)));
    if FSendTimeout > 0 then
      Check(not InternetSetOption(Request, INTERNET_OPTION_SEND_TIMEOUT, Pointer(@FSendTimeout), SizeOf(FSendTimeout)));
    if FReceiveTimeout > 0 then
      Check(not InternetSetOption(Request, INTERNET_OPTION_RECEIVE_TIMEOUT, Pointer(@FReceiveTimeout), SizeOf(FReceiveTimeout)));

Related:

–jeroen

Posted in Conference Topics, Conferences, Delphi, Development, Event, SOAP/WebServices, Software Development | Leave a Comment »

does anyone know of any Spring.Container examples (preferably non trivial) th…

Posted by jpluimers on 2019/09/26

Via [WayBack] does anyone know of any Spring.Container examples (preferably non trivial) that show how to build an app with a container just referenced from the Compo… – Russell Weetch – Google+:

Stefan Glienke:

The principle of having a composition root has nothing to do with a particular DI container. Its what you eventually get when following the principle if DI: ask for dependencies – don’t create or look for them yourself (aka service locator).

You did not mention it but I guess you mean a VCL application – now the design of the VCL is not particularly built with DI in mind and thus it can be a bit tricky to hook up the application MainForm to the container to get it injected everything. However there are several examples how to achieve that (mainly by using DelegateTo and doing the Application.CreateForm there).

An example explaining this is for instance in [WayBack] How to initialize main application form in Spring4D GlobalContainer?

Many more can be found through Spring4d DelegateTo and Spring4d DelegateTo CreateForm and

–jeroen

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

Boolean Values and Operators

Posted by jpluimers on 2019/09/26

TL;DR from [WayBackAutomating the world one-liner at a time… Boolean Values and Operators:

In PowerShell use the built-in constants $false and $true, as strings will be converted to booleans with results you don’t like

–jeroen

Posted in CommandLine, Development, PowerShell, PowerShell, Scripting, Software Development | Leave a Comment »

How to expose a Delphi set type via Soap – Stack Overflow

Posted by jpluimers on 2019/09/25

Marjan Venema had a great answer at [WayBack] How to expose a Delphi set type via Soap – Stack Overflow.

–jeroen

Posted in Conference Topics, Conferences, Delphi, Development, Event, SOAP/WebServices, Software Development | Leave a Comment »