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

Archive for 2015

Zenoss: Open Source Network Monitoring and Systems Management

Posted by jpluimers on 2015/01/19

Interesting stuff: Zenoss Open Source Network Monitoring and Systems Management.

Stuff like monitoring NNTP, monitoring HTTP, monitoring DNS, etc.

–jeroen

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

Apple Mac LC475 fun: New computer time. Well not exactly “new”. I needed to read/write some old…

Posted by jpluimers on 2015/01/18

Interesting talks about Apple Macintosh (now Mac) LC475, 800K floppies, System 7.6/7.7, SCSI, AppleTalk, Serial, Ethernet, hardware upgrades, etc.

New computer time. Well not exactly “new”. I needed to read/write some old….

Posted in Apple, History, Mac, Power User | Leave a Comment »

WordPress.com old stats and new stats links

Posted by jpluimers on 2015/01/17

Woot! Post 2400 (:

For my own reference.

My old stats: https://wordpress.com/my-stats?blog=7443331

My new stats: https://wordpress.com/stats/7443331

Hopefully the old stats stay for a while as they are far more useful.

–jeroen

Posted in Power User, SocialMedia, WordPress | 2 Comments »

*nix: Cron shortcuts @daily, @weekly, @monthly, … (via: Cron and Crontab usage and examples)

Posted by jpluimers on 2015/01/16

Even if you think you are familiar with something, it pays to keep your knowledge current.

I’ve been always struggling with the crontab syntax. It’s flexible, but for most cases overly complex, for instance I still thought I needed “0 0 * * 0” to run something weekly, which I needed.

So I am pretty sure there were no @monthly or @weekly in crontab last century.

Not so any more, and if I’d had the crontab documentation more often, I had known about the crontab shortcuts @reboot, @yearly, @annually, @monthly, @weekly, @daily, @midnight and @hourly many years ago: Read the rest of this entry »

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

Downgrading to SourceTree 1.5.x from 1.6.x, but keeping up with the youngest embedded Git and Mercurial

Posted by jpluimers on 2015/01/15

Hopefully it is not a coincidence that Steve Streeting left the SourceTree team four years after the first SourceTree release and shortly after the first release of SourceTree 1.6. version, but the SourceTree 1.6.x versions suck: it often hangs and is (often extremely) slow. This apart from numerous NullReferenceExceptions. I find this odd, as 1.5.x is far more stable in that respect, hence my hope it is not about Steve Streeting.

Even though many people complained about 1.6.x. being bad (read the comments on the release page), and quite a few ask for a way to downgrade, a downgrade option isn’t provided there.

A SourceTree downgrade itself is not that difficult. Ensuring the embedded versions of Git and Mercurial/Hg are up to date is more difficult. Getting that right is especially important on Windows: hgflow works much better with the embedded Mercurial/Hg. More importantly: both Git and Mercurial/Hg recently had a very nasty security issue.

So here are steps on how to downgrade, then upgrade the embedded versions of Git and Mercurial.

Read the rest of this entry »

Posted in Development, DVCS - Distributed Version Control, git, Mercurial/Hg, Power User, Software Development, Source Code Management, SourceTree, Windows | 7 Comments »

Delphi: ZEROBASEDSTRINGS and maintaining cross-version Delphi libraries

Posted by jpluimers on 2015/01/14

One of the features that bites me over and over again is the ZEROBASEDSTRINGS that got introduced in Delphi XE3 and is by default ON in mobile compilers and OFF in Desktop compilers.

Back then, Mark Edington showed a small example of the effects:


procedure ZeroBasedTest;
const
S: string = '012';
begin
{$ZEROBASEDSTRINGS OFF}
Writeln(S[1]); // shows "0"
Writeln(S.Chars[1]); // shows "1"
{$ZEROBASEDSTRINGS ON}
Writeln(S[1]); // shows "1"
Writeln(S.Chars[1]); // shows "1"
end;

view raw

gistfile1.txt

hosted with ❤ by GitHub

and then explained:

The XE3 RTL source code has been refactored to be string index base agnostic. In most cases this is done by utilizing string helper functions which are always zero based.
When it is necessary to traverse a string, the Char[] property is often used to access the individual characters without concern for the current state of the compiler with respect to zero based strings.

In addition, the “Low” and “High” standard functions can now be passed a string variable to provide further flexibility as needed.
When zero based strings are enabled, Low(string) will return 0,  otherwise it will return 1. Likewise, High() returns a bounds adjusted length variation.

The problem is the non-existent forward compatibility of the other compilers (Delphi XE2 and lower).

So if you have library code that needs to work in Delphi versions, you cannot use the High and Low to make the code ZEROBASEDSTRINGS neutral.

Many Delphi developers regularly skip many Delphi versions, so these are still popular:

  • Delphi XE1 and XE2 (the last 2 compilers before Delphi really started to support mobile)
  • Delphi 2007 (the last non-Unicode Delphi compiler)
  • Delphi 7 (the last non-Galileo IDE)

The result is that library code is full of conditionan IF/IFDEF blocks like these:

Fix: this works only in XE3 or higher: “for Index := Low(input) to High(input) do // for ZEROBASEDSTRINGS”


{$ifdef GX_VER240_up}
for Index := Low(input) to High(input) do // for ZEROBASEDSTRINGS
{$else}
for Index := 1 to Length(input) do
{$endif GX_VER240_up}

view raw

gistfile1.txt

hosted with ❤ by GitHub

–jeroen

via: Mark Edington’s Delphi Blog : XE3 RTL Changes: A closer look at TStringHelper.

Posted in Ansi, Delphi, Delphi 2007, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Encoding, Software Development, Unicode | 8 Comments »

“KeySweeper is a stealthy Arduino-based device, camouflaged as a functioning…

Posted by jpluimers on 2015/01/13

I never use wireless keyboards because of the bad signal quality. Now there is one more reason not to use them…

By Andrian Knoth, thanks to a link by Kristian Köhntopp:

KeySweeper is a stealthy Arduino-based device, camouflaged as a functioning USB wall charger, that wirelessly and passively sniffs, decrypts, logs and reports back (over GSM) all keystrokes from any Microsoft wireless keyboard in the vicinity.”

–jeroen

via “KeySweeper is a stealthy Arduino-based device, camouflaged as a functioning….

The sniffing assembly...

Posted in LifeHacker, Power User | Leave a Comment »

Debugging MSBuild script with Visual Studio – The Visual Studio Blog – Site Home – MSDN Blogs

Posted by jpluimers on 2015/01/13

A while ago, i had a failing msbuild script that I fixed by restoring a backup.

Next time, I’ll try debugging it first, so the below is on my research list.

Debugging MSBuild script with Visual Studio – The Visual Studio Blog – Site Home – MSDN Blogs.

–jeroen

Posted in Continuous Integration, Development, Software Development | Leave a Comment »

Cross-site Scripting (XSS) – OWASP

Posted by jpluimers on 2015/01/12

When I look what is possible with Cross-site Scripting (XSS), then I wonder how you can defend your site to any and all of these and future attacks.

Coming from a desktop application and back-end background, the jungle of the web keeps being overwhelming.

–jeroen

via: Cross-site Scripting (XSS) – OWASP

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

Password requirements by @NicvantSchip – via Koushik Dutta – Google+

Posted by jpluimers on 2015/01/12

Brilliant: password requirements by @NicvantSchip.

“Your password must contain at least 8 letters, a capital, a plot, a protagonist with good character development, a twist & a happy ending.”

And Dilbert via Thomas Kear:

“Starting today, passwords must contain letters, numbers, sign language and squirrel noises”

–jeroen

via: Koushik Dutta – Google+.

Read the rest of this entry »

Posted in Fun, LifeHacker, Power User | Leave a Comment »