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,861 other subscribers

Archive for 2011

Zipping .lnk files

Posted by jpluimers on 2011/11/04

.lnk files are very usefull as they can link to both files and directories.

However, somehow the GUI tools for zipping .lnk files tend to compress the .lnk target, not the .lnk itself.
I tried the Windows Explorer, WinZIP and 7zip GUIs to no avail.

The 7za command-line to the rescue:

7za a -tzip lnk-files.zip *.lnk

Unpacking the zip using the GUI works fine though.

You can get the latest 7za here.

–jeroen

Posted in 7zip, Batch-Files, Compression, Development, Power User, Scripting, Software Development | Leave a Comment »

EKON15 download materials on-line at bo.codeplex.com

Posted by jpluimers on 2011/11/03

I uploaded the EKON15 conference download materials to http://bo.codeplex.com.

The changeset you are after is http://bo.codeplex.com/SourceControl/changeset/changes/70872

It contains most of the materials for the Delphi Tage and the Delphi Live conferences too, though I will upload the missing pieces soon.

With the [WayBack] demise of codeplex, these links now have moved to

–jeroen

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

Using InputBox in C#

Posted by jpluimers on 2011/11/03

Sometimes you just want to ask a user for a simple string of input.

The InputBox function is an easy way to do do this. It has a tiny issue with the icon (it uses the one that belongs to the application installation, not the icon in the project properties).
InputBox has been part of Visual Basic since the 90s. And it is very easy to use from C# and other .NET languages:

  1. Add the Microsoft.VisualBasic assembly (which has been part of the .NET FrameWork since it first got released)  to your solution
  2. Make a call like
    Microst.VisualBasic.Interaction.InputBox("Did you know your question goes here?","Title","Default Text");

Sometimes you have to look a bit further than your regular toolbox for simple solutions.
I should dig up my 2006 session on the My Object in Visual Basic:  that is also very easy to use in C#.

–jeroen

via: Input Message Box in C#?.

Posted in .NET, C#, C# 2.0, C# 3.0, C# 4.0, Development, Software Development, VB.NET, VBS | Leave a Comment »

You need at least 5Gb free space for Update 2 for #Delphi XE2, C++Builder XE2 and RAD Studio XE2

Posted by jpluimers on 2011/11/02

Yesterday, Update 2 for Delphi XE2 / C++ Builder XE2 / RAD Studio XE2 became available for download.

A few notes from my experience upgrading from a full RAD Studio XE2 Update 1 install (from ISO):

  • You need at least 5 Gb free disk space to install Update 2.
    The installer won’t warn you in advance: it will indicate it needs more disk space when it cannot update the first file that does not fit.
    In my case (VMware image of 40 Gb with 4 Gb free), that was not enough.
  • It will leave a 300 Mb directory at %temp%\radstudio_xe2_update2_download
  • Downloads are available from the altd http and ftpd ftp servers for registrered users at about 300 kilobyte per second each.
    Expect a total download time of at least:

    1. 15 minutes for the 300 Mb XE2 Update 2,
    2. 90 minutes for the complete 2.5 Gb XE2 install ISO that includes Update 2,
    3. 40 minutes for the 800 Mb XE2 Help Update 1,
    4. 20 minutes for the 350 Mb RADPHP XE2 Update 2.
  • The Update 2 install will wait a very long time in the “Validating” phase. Just be patient, it will get there in the end.
  • Though the  Help Update 1 is a lot bigger download, you usually only install one language and then it needs around half a gigabyte.

There are a ton of changes (154 changes files in the C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\source directory tree alone) including some of the things I came across that now have been fixed:

  1. warnings about duplicate resources when including MidasLib
  2. refreshing of BindingList
  3. when the FireMonkey designer is visible, Alt-key combinations now work again

–jeroen

Via: Update 2 for Delphi XE2, C++Builder XE2 and RAD Studio XE2 now available – DelphiFeeds.com.

Posted in Delphi, Delphi XE2, Development, Software Development | 8 Comments »

.NET/C# WinForms: simple solution to Panel.Dock Fill ignoring other Panel.Dock setting – Stack Overflow

Posted by jpluimers on 2011/11/02

It has been a while, but I have done some WinForms maintenance on business apps. For those kinds of apps, WinForms still is a productive environment, apart from one thing:

When you have a Dock of Fill, sometimes that control fills more than it should.

The reason is the order in which things are being calculated.

I always forget the trick, as other very productive environments for writing business apps don’t have this peculiarity (they have others, life is full of interesting peculiarities <g>).

Simple solution:

  1. Right-Click on the control that has Dock=Fill
  2. Choose “Bring to Front”

Now it fills exactly the wanted area :)

Thanks Jeff Cuscutis for posting this concise solution.

–jeroen

Via: c# – Panel.Dock Fill ignoring other Panel.Dock setting – Stack Overflow.

Posted in .NET, Development, Software Development, WinForms | Leave a Comment »

Delphi: solution for “How can I find all the units in my Delphi app?” (via Stack Overflow)

Posted by jpluimers on 2011/11/01

Delphi Tricks (from Chris Hesik, see link below) to show which units are compiled into an app:

  • Use the modules view, this will show you what units (and source files!) the debugger knows of for your modules.
  • Use the –depends switch on the commandline: this will output a .d file listing all the .dcus and .dcps for your modules.

–jeroen

Via: debugging – How can I find all the units in my Delphi app? – Stack Overflow.

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

Fikse #phishing actie voor #XS4ALL #Secure #Webmail

Posted by jpluimers on 2011/10/31

Ik heb in mijn omgeving een phishing mail gezien zoals onderstaande.

Je ziet op de web-site een kopie van de xs4all webmail site; maar dan niet secure, en zeker niet van xs4all.

Niet op in gaan!

———- Forwarded message ———-
From: XS4ALL Internet bv <announce@xs4all.nl>
Date: Sun, 30 Oct 2011 15:42:02 -0800
Subject: E-mail account Annulering
To: …accountnaam…@xs4all.nl

Geachte gebruiker,

Dit is onze laatste waarschuwing voor u om uw account te upgraden binnen de
volgende 24 uur anders wordt uw e-mail wordt geannuleerd en u zult niet
hebben toegang tot het account.
Klik op de onderstaande link om te upgraden.

http://xs4all.ctrlhub.com

U heeft 24 uur om deze e-mail account te upgraden.
Bedankt voor uw begrip

Met vriendelijke groet,
XS4ALL Internet BV

Het lijkt een herhaling van een eerdere phishing run eind augustus.

Freak-Search had er vandaag ook al eentje, waar ook de headers bij staan: rechtstreeks vanuit Phoenix (ip 108.62.214.248) op de xs4all SMTP server afgeleverd.

Op de server van de phishing site staan ook andere sites waarvan in ieder geval een deel legitiem lijkt te zijn.

–jeroen

Edit: het origineel met headers:

Return-Path: <announce@xs4all.nl>
Received: from smtp-vbr5.xs4all.nl (smtp-vbr5.xs4all.nl [194.109.24.25])
       by mxdrop233.xs4all.nl (8.13.8/8.13.8) with ESMTP id p9UNg5JI093574
       for <...account...@xs4all.nl>; Mon, 31 Oct 2011 00:42:05 +0100 (CET)
       (envelope-from announce@xs4all.nl)
Received: from SETUP-71E06881F
(108.62.214.248.rdns.ubiquityservers.com [108.62.214.248] (may be
forged))
       (authenticated bits=0)
       by smtp-vbr5.xs4all.nl (8.13.8/8.13.8) with ESMTP id p9UNfkg7018382
       for <...account...@xs4all.nl>; Mon, 31 Oct 2011 00:41:59 +0100 (CET)
       (envelope-from announce@xs4all.nl)
From: "XS4ALL Internet bv" <announce@xs4all.nl>
Subject: E-mail account Annulering
To: ...account...@xs4all.nl
Content-Type: multipart/alternative; charset="ISO-8859-1";
boundary="vq5IP9Z6GutAsjrFSLDbPAxyCNtQ=_5axJ0"
MIME-Version: 1.0
Date: Sun, 30 Oct 2011 15:42:02 -0800
Sensitivity: Private
Message-ID: <71212678828692@smtp.xs4all.nl>
X-Virus-Scanned: by XS4ALL Virus Scanner
X-CNFS-Analysis: v=1.1 cv=BV6iOS6O7aV3pd42iKzuhu9AXfb4rD1J2pLXhYW4ImA= c=1
       sm=0 p=Cv8De4IAAAAA:8 p=9Xcd3dMEXsvCXAUVWdEA:9
       p=TmgxwhVlkHPXNhtMxGUA:9 p=xOja8WcQ0Eu_BXAgI9UA:7 a=9jgdD2efK0wA:10
       a=8nJEP1OIZ-IA:10 a=zN6mbt9uKPqgxNxLRsltVQ==:17 a=wPNLvfGTeEIA:10
       a=/zf/YJhaauBg/KYV17tUBA==:117
X-XS4ALL-Spam-Score: 3.7 (***) ALL_TRUSTED, CMAE_1, T_CMAE_1_MD
X-XS4ALL-Spam: NO
Envelope-To: ...account...@xs4all.nl

This is a multi-part message in MIME format

--vq5IP9Z6GutAsjrFSLDbPAxyCNtQ=_5axJ0
Content-Type: text/plain ; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

Geachte gebruiker,

Dit is onze laatste waarschuwing voor u om uw account te upgraden binn=
en de
volgende 24 uur anders wordt uw e-mail wordt geannuleerd en u zult nie=
t
hebben toegang tot het account.
Klik op de onderstaande link om te upgraden.

http://xs4all.ctrlhub.com <http://xs4all.ctrlhub.com>

U heeft 24 uur om deze e-mail account te upgraden.
Bedankt voor uw begrip

Met vriendelijke groet,
XS4ALL Internet BV

--vq5IP9Z6GutAsjrFSLDbPAxyCNtQ=_5axJ0
Content-Type: text/html ; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

<HTML><HEAD>
<META content=3D"MSHTML 6.00.5730.13" name=3DGENERATOR></HEAD>
<BODY>
<P>Geachte gebruiker,</P>
<P>Dit is onze laatste waarschuwing voor u om uw account te upgraden b=
innen de<BR>volgende 24 uur anders wordt uw e-mail wordt geannuleerd e=
n u zult niet<BR>hebben toegang tot het account.<BR>Klik op de onderst=
aande link om te upgraden.</P>
<P><A href=3D"http://xs4all.ctrlhub.com">http://xs4all.ctrlhub.com</A>=
</P>
<P>U heeft 24 uur om deze e-mail account te upgraden.<BR>Bedankt voor =
uw begrip</P><SPAN class=3DApple-style-span style=3D"WORD-SPACING: 0px=
; FONT: 16px 'times new roman'; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0=
); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORD=
ER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizonta=
l-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-dec=
orations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text=
-stroke-width: 0px"><SPAN class=3DApple-style-span style=3D"FONT-SIZE:=
 13px; FONT-FAMILY: Arial; -webkit-border-horizontal-spacing: 5px; -we=
bkit-border-vertical-spacing: 5px"><STRONG>Met vriendelijke groet,<BR>=
XS4ALL Internet BV</STRONG><BR></SPAN></SPAN></BODY></HTML>

--vq5IP9Z6GutAsjrFSLDbPAxyCNtQ=_5axJ0--

Posted in LifeHacker, Power User | 2 Comments »

Shortcut to LinkSys DHCP Client Table

Posted by jpluimers on 2011/10/31

Somehow the LinkSys router menus have never been really intuitive, using popups for much of their functionality.

The link to the DHCP Client Table looks like http://192.168.x.1/DHCPTable.asp

–jeroen

Posted in Power User | Leave a Comment »

The Antec TruePower Quattro TP4-850 EC power supply in HAL died, replaced by a Corsair HX850W power supply

Posted by jpluimers on 2011/10/28

After 3.5 years of operation, my Antec TruePower Quattro TP4-850 EC power supply died in machine HAL.

HAL is my storage server, it consists of this hardware:

It is organized as 2 RAID 5 arrays of 7 drives (each netting almost 11TB) each that are mirrored by a nightly job. 2 drives are hot spares. I could have done RAID 50 (now it is twice RAID 5), but this gives me the advantage of having a “yesterdays” view of the storage. Sometimes that is convenient :)

A separate (currently PATA!) disk contains the OS (currently Windows Server 2003), which will be upgraded to a SATA SSD running Windows Server 2008 later this year.

850 watts is perfectly OK, since the RAID drives don’t spin up all at once, and according to Extreme PSU Calculator Lite a 600 watt power supply should suffice.

Is it bad having the power supply to die? I think it is, especially in the way this one dies: it works for 10 minutes, then stops. The fan is still OK, so I don’t know why it dies.

Besides, my 2 Linux boxes both still run on an IBM PC 300PL Pentium 3 machines (that is, after replacing the capacitors a couple of years ago) and – though from 1999 –  they run fine (and are about to be virtualized) without any power supply problems whatsoever.

Anyway: I have replaced it with a Corsair HX850W power supply, which is modulair too, and the Molex 8981 connectors are far easier to insert and retract than the Antec ones.

Being in picky mode today, I still have two tiny things on this new power supply:

  1. Though modular, I couldn’t use the Antec power cables to the hard drives: as the connectors at the PSU side are the same, but the pin layout differs.
  2. The Corsair HDD power cables for SATA and Molex 8981 aren’t colour coded (only black stripes)

–jeroen

PS: Having used HDDs since the mid-80s of last century, it is very nice to see how sizes have been coming down, and capacities going up.

Posted in Power User | 4 Comments »

TODO: batch file to properly backup Skype history

Posted by jpluimers on 2011/10/27

This is on my todo list: Smarter Skype Backups | Universe’s Blog.

–jeroen

Posted in Batch-Files, Development, Power User, Scripting, Software Development | Leave a Comment »