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

One of the #EKON20 running gags: Raize condition

Posted by jpluimers on 2016/11/11

When Ray Konopka enters the room you have a Raize condition.

Via the EKON20 sessions, it made its way into the workshop If you thought you could do multi-threading, then play “The Deadlock Empire” games – Entwickler Konferenz

–jeroen

Posted in Conferences, Delphi, Development, EKON, Event, Software Development | Leave a Comment »

how to resize (grow) device partition of a multi-device BTRFS filesystem?

Posted by jpluimers on 2016/11/11

To grow you must first change the size of the container: the partition, the LV, or arraydevice. Then you can resize the file system. It’s the same with XFS, and NTFS. I’m only aware of Apple’sdiskutil resizevolume command that resizes the flavors of HFS+ and at the same time sets the new end valuefor the partition entry.

Source: Development of the BTRFS linux file system (not yet archived at the WayBack machine)

I will need the above for a single disk device having a BTRFS partition sandwiched between a swap and xfs partition:

# parted -l
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system     Flags
 1      1049kB  1562MB  1561MB  primary  linux-swap(v1)  type=82
 2      1562MB  17.7GB  16.1GB  primary  btrfs           boot, type=83
 3      17.7GB  21.5GB  3799MB  primary  xfs             type=83

I’ll likekly be:

  1. extend the disk inin ESXi
  2. use gparted to move the xfs partition to the end of the disk
  3. use gparted to extend the btrfs partition
  4. use btrfs to extend the volume inside the btrfs partition

I might be able to do all this from the gparted live CD as moving xfs and growing btrfs is on the GParted — Features list.

Fingers crossed. Luckily I’ve backups (:

–jeroen

Posted in *nix, ESXi4, ESXi5, ESXi5.1, ESXi5.5, ESXi6, Linux, openSuSE, Power User, SuSE Linux, Tumbleweed, VMware, VMware ESXi | Leave a Comment »

openSuSE Tumbleweed: solution for `ImportError: No module named pkg_resources`

Posted by jpluimers on 2016/11/11

If ever on openSuSE Tumbleweed you get an error ImportError: No module named pkg_resources then check you have the installed the python-setuptools package it is different from python3-setuptools which was installed by default but is not the default python used.

This is how to install it:

zypper install python-setuptools

Tools like speedtest-cli require it.

The odd thing: on a Mac, the homebrew speedtest-cli installed and ran with no additional packages needed:

retinambpro1tb:tmp jeroenp$ brew install speedtest-cli
==> Downloading https://github.com/sivel/speedtest-cli/archive/v0.3.2.tar.gz
==> Downloading from https://codeload.github.com/sivel/speedtest-cli/tar.gz/v0.3.2
######################################################################## 100.0%
🍺 /usr/local/Cellar/speedtest_cli/0.3.2: 5 files, 52K, built in 2 seconds
retinambpro1tb:tmp jeroenp$ speedtest-cli
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Routit BV (37.153.243.246)...
Selecting best server based on latency...
Hosted by ExtraIP (Amersfoort) [3.99 km]: 6.488 ms
Testing download speed........................................
Download: 49.89 Mbit/s
Testing upload speed..................................................
Upload: 47.81 Mbit/s

(this is on one of my fiber connections back when it was 50/50 megabit).

Note that for both the web interface of speedtest.net and command-line versions (like Python based speedtest-cli) sometimes needs some fiddling with chosen servers and repeated measurements to get a consistent average as quite some factors can influence the measurements.

For my home location, this one gives me the most consistent results for my fiber connections (they’re so good and reliable that I don’t have ADSL or cable any more):

speedtest-cli --server 3629

You can get the list of servers ordered by increasing distance using this command:

speedtest-cli --list | head -n 20

–jeroen

Posted in *nix, *nix-tools, Internet, Linux, openSuSE, Power User, SpeedTest, SuSE Linux | 2 Comments »

Fixing `Unable to create ModelMaker Tools Shared Directory` and `Cannot create file “C:\HungarianTypeLookup.txt”. Access is denied.`

Posted by jpluimers on 2016/11/10

Like many Delphi 3rd party product, new ModelMaker Code Explorer (often abbreviated as MMX) releases have not been as thick as in the heydays (look at the history for versions 7, 8 , 9, 10, 11 and 12).

Unlike a lot of products it is still there, still very stable and hasn’t been acquired which it means it is available for a wide range of Delphi versions. So I still use it, but know certain issues will likely be never solved.

One of these issues is running ModelMaker Code Explorer as a different user than the installing user. In the authors words:

You need to install MMX as the same user that will run MMX.
MMX does not support running as a different user than the one installed.

This requirement becomes increasingly difficult to satisfy. This especially happens in more security conscious organisations where there is a clear distinction in rights between users that can install software and the ones that use the software. But it can also happen when you switch users because of infrastructure changes (new Windows domain, no Windows domain, etc).

Delphi itself copes reasonably well with that, as does GExperts, but MMX doesn’t. Despite the writeup on How to verify a Code Explorer installation? it lacks two things:

  1. explaining the below kinds of error messages when you run MMX with a different user than you installed MMX
  2. explaining some easy steps to fix this

As I roam a lot, I’ve spent about a day fiddling and writing up the below information:

Read the rest of this entry »

Posted in Delphi, Development, ModelMaker Code Explorer, Software Development | Leave a Comment »

Old Google Charting API: tools for still using them

Posted by jpluimers on 2016/11/10

While mocking the ScaleMM documentation, I bumped into a chart that I thought was an image, but is in fact generated by the (now deprecated) Image Charts API from Google.

In fact it is generated on the fly from a URL: http://chart.apis.google.com/chart?chxr=0,0,16|1,0,14682…&nonsense=something_that_ends_with.png

Compare the two below. They are identical (:

Static ScaleMM1 comparison chart

Static ScaleMM1 comparison chart

URL based ScaleMM1 comparison chart

URL based ScaleMM1 comparison chart

Even though the API is deprecated Google has no plans to turn it of, so it still works and is the easiest way to get charts into a Markdown or reStructuredText document.

In practice, it doesn’t matter if you use the chart.apis.google.com or chart.googleapis.com domain: they give the same results the same.

As I wanted to convert the results.txt to a chart, I dissected the above URL, looked up the definitions of the URL parameters (the trickiest: cds for lxy graphs and the combination of chds and chxr, easier: chls) and created a new URL for the chart below.

Read the rest of this entry »

Posted in Delphi, Development, Google, Power User, Software Development | Leave a Comment »

Locking Is there a good open source MREW lock object out there that – Supports…

Posted by jpluimers on 2016/11/09

Summary of the  Locking Is there a good open source MREW lock object out there thread:

Don’t use MREW. Too many bugs in any implementation, and too easy to make deadlocks.

Use other locking mechanisms that are lighter, easier to understand and therefor less prone to mistakes.

–jeroen

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

The SelectiveDebugging plug-in now supports Delphi 10.1 Berlin.

Posted by jpluimers on 2016/11/08

This post is a reminder to myself that this plugin exists at all.

Hopefully by this time it supports more recent Delphi versions as well; when scheduling this post, it supported from XE to 10.1:

My SelectiveDebugging plug-in now supports Delphi 10.1 Berlin. The updated download can be found at the end of the corresponding blog post:… – Uwe Raabe – Google+ [WayBack]

–jeroen

via:

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »

Delphi Continuous Integration: When you get E2202 “Required package ‘rtl’ not found” or F1027 “Unit not found: ‘System.pas'”

Posted by jpluimers on 2016/11/08

If when setting up Continuous Integration (CI) with Delphi and you get errors like E2202 "Required package 'rtl' not found" or F1027 "Unit not found: 'System.pas'", then something is wrong with your library path on the CI server.

Before going into the details of why, the quick solution is to set either of these environment variables in your build script

  • Delphi 2007, 2010: Win32LibraryPath
  • Delphi XE and up: DelphiLibraryPath

Now back to the details of why these might not be set, most information is from my Delphi build automation workshop.

Read the rest of this entry »

Posted in Delphi, Delphi 10 Seattle, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 1 Comment »

parted “Error: Can’t have a partition outside the disk!” sometimes means you’ve a bogus DVD inserted

Posted by jpluimers on 2016/11/07

At first sight I thought I had a damaged partition table on the HDD, but then I realised it was a bogus DVD.

parted -l would give me this:

Error: Can't have a partition outside the disk!
Ignore/Cancel? i                                                          
Error: Can't have a partition outside the disk!
Ignore/Cancel? i                                                          
Model: NECVMWar VMware IDE CDR10 (scsi)
Disk /dev/sr0: 4647MB
Sector size (logical/physical): 2048B/2048B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      7340kB  23.9MB  16.5MB  primary               esp, type=ef
 2      23.9MB  18.6GB  18.6GB  primary               boot, hidden, type=17

A simple eject /dev/sr0 solved the issue.

Too bad there is no way to force parted to ignore errors (or specify a default answer).

–jeroen

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

Kerlink IoT station page | LoRa | Semtech

Posted by jpluimers on 2016/11/07

This can be used for TheThingsNetwork.org.

Some downloads:

Attachments
File Last modified Size
Kerlink_gateway_channel_setup_v0.2.pdf 2015-05-18 17:20 838Kb
Kerlink_gateway_installation_R7.pdf 2015-08-13 14:32 805Kb
Python_gateway_spectrum_display.zip 2015-04-09 15:54 10Kb
kerlink_IoT_LoRa_update.zip 2015-08-13 14:27 63Kb
kerlink_IoT_LoRa_update_DHCP.zip 2015-08-13 14:27 64Kb

Source: Kerlink IoT station page | LoRa | Semtech

Posted in *nix, IoT Internet of Things, LoRa - Long Range wireless communications network, Network-and-equipment, Power User, Uncategorized | Leave a Comment »