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

Life after Google+ – Lars Fosdal: Friends+Me Google+ Export tool.

Posted by jpluimers on 2019/01/11

A little while ago, I blogged about Life after Google+ – Lars Fosdal. In the mean time, Lars has made a lot of progress exporting the community [WayBack] Delphi Developers – Google+ (which has moved to en.delphipraxis.net !).

He is a heavy user of the Friends+Me Google+ Export tool, which basically is an actively maintained web scraper with standard output targets:

[WayBack] Google Plus Exporter – Medium: Export your Google+ feeds to WordPress, Blogger, and JSON.

It does not depend on the G+ REST API: “the app is using web scraping and will keep working until the bitter end”.

Quite a bit of that information and the feedback he has is in this thread: [WayBack1/WayBack2] Hi Everyone, We’ve just released Google+ Exporter, an application that helps you to export your Google+ feeds (profile, pages, collections, communities… – Friends+Me – Google+

Of course G+ does not save the whole thread in the WayBack machine, so here it is copy-pasted (unformatted; maybe I will format it later):

Read the rest of this entry »

Posted in Development, G+: GooglePlus, Gutenberg editor, LifeHacker, Power User, SocialMedia, Software Development, Web Development, WordPress, WordPress | Leave a Comment »

from a WSDL import: empty “Reference.cs” – Google Search

Posted by jpluimers on 2019/01/10

A search for empty “Reference.cs” – Google Search seems to indicate this happens with referenced types that – despite turning off that option – from the Visual Studio 2017 IDE sometimes results in an empty Reference.cs.

My solution: import in an empty project, then move the reference to the existing project and add it.

[WayBack] c# – Sometimes adding a WCF Service Reference generates an empty reference.cs – Stack Overflow

–jeroen

Posted in .NET, C#, Development, Software Development, Visual Studio 2015, Visual Studio 2017, Visual Studio and tools | Leave a Comment »

Some ideas to show a Google Calendar on a TV using a Raspberry Pi and HDMI output

Posted by jpluimers on 2019/01/10

Using OpenSuSE Tumbleweed E20 on Raspberry Pi 3: accessing the enlightenment desktop over VNC after automatic logon I wanted to buy an on-line read-only diary to help my mentally retarded brother see what his next few days are going to be like.

He increasingly has difficulty handling a paper agenda and has an agenda with 30 minute blocks like [Archive.isbol.com | Bureau Agenda 2017 – 1 dag per Pagina | 0041560163422 | Boeken (and the [Archive.is] picture on the right), but actually he needs 15 minute blocks during some portions of the day.

We call that kind “bureau agenda” which I think translates well into “desk diary”.

They were quite different from the agendas I used to have at school (:

[WayBack[Zonder titel] Rijam agenda 1983/84 verzamelen? Stripcatalogus op Catawiki

For most school mates, they were more like this:

Had je een O’Neill of ging je voor De Familie Doorzon? De oude agenda’s uit je middelbare schooltijd zijn de verpersoonlijking van je eigen puber-ik. Afgelopen weekend startte in het Nationaal Onderwijsmuseum in Dordrecht de toffe tentoonstelling Grow Up over die vuistdikke, volgeplakte agenda’s.

[WayBackSchoolagenda vol sentiment | Go with the Vlo

Anyway, some ideas I initially had are below.

This is what I actually did:

Two things for the future:

Initial thoughts

Raspberry based:

Chromecast based:

–jeroen

Read the rest of this entry »

Posted in Development, Google, GoogleCalendar, Hardware Development, JavaScript/ECMAScript, JSFiddle, LifeHacker, Power User, Raspberry Pi, Scripting, Software Development | 2 Comments »

git on Windows: prevent “The requested URL returned error: 403” during push of https based repository

Posted by jpluimers on 2019/01/10

When you search for git push "The requested URL returned error: 403", then the usual answer is “use ssh over https”, for instance at [WayBackgithub – Pushing to Git returning Error Code 403 fatal: HTTP request failed – Stack Overflow.

However, lots of places (especially larger corporations and financials) limit outgoing traffic to http and https based for (often perceived) security reasons.

In this case, I needed a solution for Windows, which – after a long search – found two solutions that are below.

I use the https://gitlab.com/wiert.me/examples/sql-examples.git repository as an example, but it isn’t limited to GitLab: the same symptoms happen with other hosters as well (for instance on GitHub and BitBucket):

First what doesn’t work: they all give the same 403 message.

  1. Installing a newer git version (I tried git version 2.13.3.windows.1)
  2. have the plain URL:
  3. put just the username or e-mail address in the URL
  4. put just the username or e-mail address in the URL with a blank password
  5. for the four above, add the caching credential helper then add a credential:
    • git config --local credential.helper cachegit config --local credential.https://gitlab.com.username wiert
      You get this log:
      Pushing to https://gitlab.com/wiert.me/examples/sql-examples.git
      git: 'credential-cache' is not a git command. See 'git --help'.
      remote: HTTP Basic: Access denied
      fatal: Authentication failed for 'https://gitlab.com/wiert.me/examples/sql-examples.git/'

What could work

The first thing that works is to include the actual password in the repository URL like this:

When you enter the correct password, everything is fine. Except that the password is stored as plain text on disk.

What works

The real solution on Windows is to use the Windows Credential Manager. I found this because of the 5th failure above.

To see which username/password combinations have been stored or add your own, you can start the Credential Manager on the command-line like this (each Windows version seems to have a different path to the UI from the control panel; the console trick just works on all Windows versions I tested):

%windir%\explorer.exe shell:::{1206F5F1-0569-412C-8FEC-3204630DFB70}

Note the above was the reason for writing List of Shell GUIDs for various Windows versions for use in shortcuts and batch files.

What might work on non-Windows systems

I have the impression that the “cached” credential manager will work on non-Windows systems, but need to find some time testing that on multiple platforms. Stay tuned (:

For that I need to look into at least these:

–jeroen

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

Getting the class from an TRttiProperty by using MetaclassType

Posted by jpluimers on 2019/01/09

Basically I learned that I should not only look for ClassType, but also for MetaclassType: [WayBack] Not a major problem, but given that xProp is a TRttiProperty instance is there a better way to get the ClassType of a property that is tkClass? – Chad Hower – Google+:

Chris Rolliston

The System.Rtti way is this –

x := xProp.PropertyType.AsInstance.MetaclassType;

Been in since TRttiContext was first added, IIRC.

It indeed has been documented since Delphi 2010: [Archive.is] Rtti.TRttiClassRefType.MetaclassType – RAD Studio VCL Reference

–jeroen

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

Converting html fragments to reStructuredText

Posted by jpluimers on 2019/01/09

Though normally you would write documentation in reStructuredText, then generate HTML or PDF, often you find a part of the documentation source in HTML.

Here are some sites and tools I’ve used to convert HTML fragments to reStructuredText. I favour on-line over local command-line tools as usually these kinds of conversions are “one-time only”.

–jeroen

Posted in Development, Lightweight markup language, reStructuredText, Software Development | Leave a Comment »

List of Shell GUIDs for various Windows versions for use in shortcuts and batch files

Posted by jpluimers on 2019/01/09

In my search for starting the Windows Credential Manager from the console, I found [WayBackCredential Manager Shortcut – Create – Windows 7 Help Forums explaining:

%windir%\explorer.exe shell:::{1206F5F1-0569-412C-8FEC-3204630DFB70}

This reminded me of From batch file or shortcut: start Windows Update (via: Windows 7 Help Forums) and batch-file trick: Starting Windows Explorer and selecting a file (“explorer” commandline parameters “/n” “/e” “/select” “/root” “/start” site:microsoft.com).

The odd thing is that some of the GUID shortcuts works fine using the shell::: syntax, but fail with the /e:: syntax, for instance Windows Update until Windows 8.1:

%windir%\explorer.exe shell:::{36eef7db-88ad-4e81-ad49-0e313f0c35f8}
%windir%\explorer.exe /e,::{36eef7db-88ad-4e81-ad49-0e313f0c35f8}

One day I’ll create a table of permutations for various Windows versions and execute options.

For now these links need to suffice:

–jeroen

Posted in Batch-Files, Development, Power User, Scripting, Software Development, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows 9 | 1 Comment »

Delphi sorcery: Loop wars – measuring performance

Posted by jpluimers on 2019/01/08

[WayBack] Delphi sorcery: Loop wars – measuring performance – already showing some nice optimisations that should have been in the RTL into the first place, – sprouted into a nice discussion at [WayBack] Since there was this offtopic argument going on about performance of for-in versus for-to. – Stefan Glienke – Google+ with some relatively straightforward forand for ... in loop compiler optimizations that could be done, but we have dreamt of for like the last decade or two.

–jeroen

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

OpenSuSE Tumbleweed on RaspberryPi 3: adding ” modprobe.blacklist=vc4″ to the kernel commandline was a lot tougher than I hoped for.

Posted by jpluimers on 2019/01/08

I run most of my Raspberry Pi systems headless, so I was a bit surprised that OpenSuSE tumbleweed on a Raspberry Pi 3B didn’t show anything on my HDMI monitor after I installed KDE after it switches away from text-mode boot output.

[WayBackHCL:Raspberry Pi3 – openSUSE suggests to

I see HDMI output in U-Boot, but not in Linux

The upstream Linux graphics driver for the Raspberry Pi has problems with a few monitors. The same applies to the 7″ LCD displays. In those cases, please fall back to the efi frame buffer console by passing the following into the kernel command line:

 modprobe.blacklist=vc4

However, it does not explain how to modify that “the kernel command line”.

Searching for obvious ways via “Raspberry Tumbleweed Kernel Command Line” got me to for instance

which all suggest editing /boot/cmdline.txt, however that file does not exist:

# ls -al /boot
total 34624
drwxr-xr-x  6 root root     4096 Jul 23 21:05 .
drwxr-xr-x 24 root root     4096 Jul 16 02:02 ..
-rw-r--r--  1 root root       65 Jul 16 12:42 .Image-4.4.76-7-default.hmac
-rw-r--r--  1 root root        0 Jul 16 16:56 0x75b762d5
lrwxrwxrwx  1 root root       22 Jul 16 16:34 Image -> Image-4.4.76-7-default
-rw-r--r--  1 root root 14878208 Jul 16 12:20 Image-4.4.76-7-default
-rw-r--r--  1 root root  3217519 Jul 16 12:20 System.map-4.4.76-7-default
lrwxrwxrwx  1 root root        1 Jul 16 02:00 boot -> .
-rw-r--r--  1 root root     1725 May 24 20:11 boot.readme
-rw-r--r--  1 root root     2405 Jul 16 16:56 boot.scr
-rw-r--r--  1 root root     2333 Jul 16 16:56 boot.script
-rw-r--r--  1 root root   152522 Jul 16 08:39 config-4.4.76-7-default
lrwxrwxrwx  1 root root       12 Jul 23 16:13 dtb -> dtb-4.11.6-1
drwxr-xr-x  3 root root     4096 Jul 23 16:13 dtb-4.11.6-1
drwxr-xr-x  5 root root    16384 Jan  1  1970 efi
drwxr-xr-x  7 root root     4096 Jul 24 18:27 grub2
lrwxrwxrwx  1 root root       23 Jul 16 16:34 initrd -> initrd-4.4.76-7-default
-rw-------  1 root root  8080932 Jul 23 21:05 initrd-4.4.76-7-default
-rw-r--r--  1 root root   288571 Jul 16 12:42 symvers-4.4.76-7-default.gz
-rw-r--r--  1 root root      377 Jul 16 12:42 sysctl.conf-4.4.76-7-default
-rw-r--r--  1 root root  1484762 Jul 16 16:56 unicode.pf2
drwxr-xr-x  2 root root     4096 Jul 24 09:05 vc
-rw-r--r--  1 root root  7282031 Jul 15 07:00 vmlinux-4.4.76-7-default.gz

There are other config.txt files:

# find / | grep config.txt
/boot/efi/config.txt
/boot/vc/config.txt

However, these seems to be unclear which of the two is actually used and what options can be set at all: [WayBackRaspberry Pi • View topic – aarch64 on Pi3.

So the quest continues, as a lot of settings can be applied in these files:

Setting “modprobe.blacklist=vc4”

I’ve temporarily given up on the /boot/config.txt editing, but continued searching for “modprobe.blacklist=vc4”, which lead to a few interesting results:

All of those suggest adding modprobe.blacklist=vc4 to the grub configuration. The second post actually has the most elaborate steps for this, which I’ve paraphrased into:

  1. As root, edit /etc/default/grub (make a backup first)
  2. Search for the variable GRUB_CMDLINE_LINUX
  3. Add the modprobe.blacklist=vc4to the end of the variable initialisation (ensure there is a space before it and you keep the terminating double-quote)
  4. Re-generate the grub configuration file used at boot time (make a backup first): grub2-mkconfig > /boot/grub2/grub.cfg

This solved my problem: no text output on HDMI.

Note that in order to get graphical output, you need to install any of the non-JeOS images. Installing just kde+kdm and dependencies isn’t enough to get the X server going.

–jeroen

Posted in Development, Hardware Development, Raspberry Pi | Leave a Comment »

What RDBMS do you use when doing location-aware things? 

Posted by jpluimers on 2019/01/08

There was a nice discussion on [WayBack] What RDBMS do you use when doing location-aware things?More specifically, I am looking into a simple app with use of GPS… – Andrea Raimondi – Google+

TL;DR: use PostGIS on top of PostgresSQL.

–jeroen

Posted in Database Development, Development, PostGIS | Leave a Comment »