The Wiert Corner – irregular stream of Wiert stuff

Jeroen Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    MPS_9791

    MPS_9795

    MPS_9793

    More Photos
  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 430 other followers

Archive for the ‘Uncategorized’ Category

WTF C# code of the month

Posted by jpluimers on 2012/03/14

When I come across code like this, I’m always astonished:

			catch(Exception ex)
			{
				string strMess = ex.Message;
			}

What was the person thinking when he wrote this? Did he get distracted and nobody else notice this before checking it into their version control system?

In the same module:

		private string ToString(object myVal)
		{
			try
			{
				if (myVal != System.DBNull.Value)
					return myVal.ToString().Trim();
			}
			catch{}

			return "";
		}

–jeroen

Posted in Uncategorized | Leave a Comment »

Dilbert comic strip for 2011-12-16: Smartphone listening in when Pointy Haired Boss asks Carol to make an appointment

Posted by jpluimers on 2011/12/19

Please Scott, do keep them coming like this:

–jeroen

via: Dilbert comic strip for 12/16/2011 from the official Dilbert comic strips archive..

Posted in Uncategorized | Leave a Comment »

Why can’t I move the Program Files directory via the unattend file? – via: The Old New Thing – Site Home – MSDN Blogs

Posted by jpluimers on 2011/10/07

You cannot move the C:\Program Files directory to another volume without installing Windows on that volume.

A small abstract from the explanation by Raymond Chen: The symbiotic relation between C:\Windows\WinSxS and C:\Program Files through NTFS hard links prevents you to move C:\Program Files (nor WinSxS) to a different disk volume. Both directories need to be on the same volume because of the NTFS hard link limitation.

NTFS hardlinks do save a ton of diskspace, even though WinSxS will keep growing over time, which means you need to do some careful disk volume planning, especially on SSD drives.

–jeroen

via: Why can’t I move the Program Files directory via the unattend file? – The Old New Thing – Site Home – MSDN Blogs.

Posted in Uncategorized | Leave a Comment »

#swisscom hotel #internet #fail: breaks Google Mail, lousy internet rates, for EUR 18 per day!

Posted by jpluimers on 2011/09/09

See the images below.

This is what Swisscom hotel internet gets you when you pay them EUR 18 per day.

Swisscom internet has a transparent http proxy that is not so transparent: it breaks Google Mail.

Actually it is low-speed internet; for like EUR 40 a month, I get way more speed at home, with the plus that it always works and always is “high” speed.
Swisscom hotel internet could reach 6 megabit downstream (but it doesn’t), also the upstream is lousy:

What you actually obtain is more like 2 megabit, not 6 megabit.
That download at home takes like 20 minutes at 10 megabit ADSL speed.

This is what they promise (click on the image to enlarge):

Read the rest of this entry »

Posted in Uncategorized | 2 Comments »

WebSphere MQ: SYSTEM.DEFAULT.MODEL.QUEUE

Posted by jpluimers on 2011/07/26

What started out as viewing Help – WebSphere MQ: System and default objects to see if SYSTEM.DEFAULT.MODEL.QUEUE is a good model queue to use (and generate dynamic temporary queues named AMQ.* or MQAI.*), ended up into a lot of reading on security and such:

  1. Allowing access to SYSTEM.DEFAULT.MODEL.QUEUE
  2. Using WebSphere MQ Explorer as a read-only viewer
  3. The Deep Queue – Episode #8: The good news and the bad news
  4. Help – WebSphere MQ – Access Control

In the mean time, I added some of the blogs to my Google Reader and learned that one of the blogs moved, and moved again.

  1. http://hursleyonwmq.wordpress.com/
  2. http://www.ibm.com/developerworks/mydeveloperworks/blogs/messaging/
  3. https://www.ibm.com/developerworks/mydeveloperworks/blogs/messaging/?lang=en (slow!)

Oh, and the Diagnosing Probmems with Data Conversion post, WMQ, Channel Security and  WebSphere MQ Security heats up posts will sure come in handy soon.

–jeroen

Posted in Uncategorized | Leave a Comment »

SharePoint 2010 error: Retrieving the COM class factory for component with CLSID {BDEADF26-C265-11D0-BCED-00A0C90AB50F} failed due to the following error: 800703fa – SharePointWiz

Posted by jpluimers on 2011/04/11

Somehow in a production environment I did get this error too:

System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {BDEADF26-C265-11D0-BCED-00A0C90AB50F} failed due to the following error: 80040154.

These two posts helped me to solve it:

SharePoint 2010 beta error: Retrieving the COM class factory for component with CLSID {BDEADF26-C265-11D0-BCED-00A0C90AB50F} failed due to the following error: 800703fa – SharePointWiz – Site Home – MSDN Blogs.

Rhythmic Coding: Retrieving the COM class factory for component with CLSID {BDEADF26-C265-11D0-BCED-00A0C90AB50F} failed due to the following error: 80040154.

The solution is deceptively simple:

Resolution: It is because you are trying to build a x86 application. Go to project properties and set type to x64 everywhere. Then rebuild and debug. The Error Vanishes!

The SharePoint 2010 dll’s are all x64, and Visual Studio 2010 by default still starts .NET projects in x86 mode for both Release and Debug settings.

–jeroen

Posted in Uncategorized | 6 Comments »

Got my Linksys WRT54GL working as a Client Bridge using dd-wrt: Client Bridged – DD-WRT Wiki

Posted by jpluimers on 2011/04/08

My primary wireless router is at the ground floor.

They made a small error when building our house some 15 years ago: all the spare PVC pipes running up stairs that were meant for additional cabling are full of concrete, so no way to get any network cabling upstairs.

I don’t need a lot of band width upstairs, but some of the devices are wired.

Solution:

  1. dig up my old Linksys WRT54GL router with hardware version 1.1
  2. ditch the Linskys firmware from my good old
  3. install dd-wrt mini as described on the dd-wrt Linksys WRT54GL pageI installed build 13064, the currently recommended build in the router database.
  4. run the steps in the Client Bridged – DD-WRT Wiki article (this YouTube video was also instructive, but the steps are better)
  5. connect a wired appliance

In fact, I had to make one change: the primary network is on 192.168.0.X, so the Linksys dd-wrt router is now on 192.168.0.50 (which is outside of the DHCP range of the primary router).

And I took a shortcut: I joined the WLAN of the primary router (on the site survey page)  instead of entering all the WLAN info manually.

It works, and took me less than 15 minutes total.

I could have gone one step less (Client only, which puts your LAN behind a NAT) or one step further: configure it into a Repeater Bridge (instead of a Client Bridge).
That would allow WLAN clients to my WRT54GL as well as LAN clients.
Right now I don’t need that.

Another option is Repeater Mode (where the WLAN and LAN clients of the WRT54GL are on a different subnet than the primary router).

Finally, if you run into trouble, read this thread on the dd-wrt forum on Broadcom based devices it contains a truckload of info in a very concise way.

–jeroen

via: Client Bridged – DD-WRT Wiki.

Posted in Uncategorized | Leave a Comment »

Domotica – WiFi thermostaten

Posted by jpluimers on 2011/02/28

Hier wat linkjes omdat ik de huidige thermostaat van onze CV door een WiFi variant wil vervangen.

Domotica dus :-)

We hebben nu de iSense thermostaaat dat via het OpenTherm protocol de CV aanstuurt: http://shop.kamerthermostaat.com/epages/62028128.sf/nl_NL/?ObjectPath=/Shops/62028128/Categories/Remeha

Remeha Recom software: http://nl.remeha.com/index.php?id=203

EcoBee heeft een interessant product, maar het is onduidelijk of ze OpenTherm ondersteunen: http://www.ecobee.com/

Quby interfaced niet alleen via OpenTherm met je CV, maar ook met je electiciteitsmeter: http://www.quby.nl/index.php/hoe-werkt-quby

Bwired heeft ontzettend veel informatie over domotica: http://www.bwired.nl/weblog.asp?cat=Bwired

Digit’s domotica blog: http://blog.hekkers.net/; hij heeft een Remeha monitor http://www.hekkers.net/domotica/Monitor_Remeha_Calenta.aspx

Tweakers.net thread: http://gathering.tweakers.net/forum/list_messages/1346842/10

Radiothermostat in gebruik

–jeroen

Posted in Uncategorized | 4 Comments »

Some #reflector URLs

Posted by jpluimers on 2011/02/17

While it is still free…

The current version: http://reflector.red-gate.com/Reflector.zip

The “Check for Updates” entry in the “Help” menu checks this URL: http://reflector.red-gate.com/Reflector.version

Which currently returns:

6.6.0.30
6.1.0.0

http://reflector.red-gate.com/Download.aspx?File=Reflector&Client={Client}&Version={Version}

When Reflector detects there is a new version, you get a dialog like this:

—————————
.NET Reflector
—————————
A new version of .NET Reflector is available. Do you want to install automatically?
—————————
Yes No
—————————

When you press [Yes], it starts downloading from a URL that depends on the current version: http://reflector.red-gate.com/Download.aspx?File=Reflector&Client=Reflector&Version=6.5.0.135

{Client} was replaced by Reflector, and {Version} was replaced by 6.5.0.135 (the version of the currently running Reflector).

–jeroen

 

 

Posted in Uncategorized | Leave a Comment »

Quora versus StackExchange – SE wins hands down

Posted by jpluimers on 2011/02/02

StackExchange wins hands down because of one reason:
the Quora page forces you to create an account before you can do anything else.

–jeroen

Posted in Power User, Uncategorized | Leave a Comment »

SEO guys taking over Google results: Search Filter and Stackoverflowizer Chrome extension

Posted by jpluimers on 2011/01/14

Over at least the last year, I keep adding more and more “site:domainname” clauses to my Google search queries because somehow content scrapers somehow rank higher in the Google results than the original content.

Some domainnames I often used because of good content:

  • stackoverflow.com
  • microsoft.com
  • wikipedia.org
  • apple.com
  • reference.com

Others too noticed the SEO guys are steadily taking over Google results: Jeff Atwood just wrote a great article on this topic (with an even greater list of comments), and there is even a Stackoverflowizer app redirecting back from the scrape sites back to the content!

The world upside down, but maybe this is some good news:
an opportunity for other search engines to fill the gap.
And it looks like they do, and Vivek Wadhwa wrote a nice article on those too.

There is an opportunity for browser extensions too, so here are some Google Chrome extensions:

Be prepared to fill your machines with some more memory as browser plugins do eat some.

–jeroen

Posted in Uncategorized | Leave a Comment »

Mac OS X v10.6.6 Update

Posted by jpluimers on 2011/01/11

Last week, Apple released OS X version 10.6.6, of which the main feature is the Mac App Store.

The about Mac OS X v10.6.6. Update document describes how to update.

In addition to the Mac App Store, this update also contains an Apple security updates: a fix for a PackageKit man-in-the-middle vulnerability.

Download: Mac OS X v10.6.6 Update (or perform an automatic download)

–jeroen

Posted in Apple, Power User, Uncategorized | Leave a Comment »

HTTPS Everywhere | Electronic Frontier Foundation

Posted by jpluimers on 2010/09/27

Currently this is FireFox-only.
I hope someone ports this to a Chrome extension and Internet Explorer plugin: HTTPS Everywhere | Electronic Frontier Foundation.

–jeroen

Posted in Uncategorized | 1 Comment »

Batch file tricks – double quotes splitting and downloading latest 7-zip

Posted by jpluimers on 2010/09/02

I needed a quick means to download the latest 7-zip from the command-line in Windows.

This batchfile makes use of these tools:

7-zip has a download page that contains lines like these:

    <TD class="Item" align="center"><A href="http://downloads.sourceforge.net/sevenzip/7z465.exe">Download</A></TD>

Read the rest of this entry »

Posted in Uncategorized | Leave a Comment »

Script to Restart VMware Tools Remotely | Daily Hypervisor

Posted by jpluimers on 2010/08/30

Sometimes the VMware tools need to be restarted in order to get the shared clipboard functionality working again.

From inside a Windows VM, you can do that like this:

net stop vmtools

This will create this output:

The VMware Tools Service service is stopping.

The VMware Tools Service service was stopped successfully.

Then start the service again:

net start vmtools

Giving this output:

The VMware Tools Service service is starting.

The VMware Tools Service service was started successfully.

From outside your virtual machine, you can do it like on this URL using schttp://www.dailyhypervisor.com/2009/03/25/script-restarting-vmware-tools-remotely/

–jeroen

Posted in CommandLine, Development, Software Development, Uncategorized | Leave a Comment »

TomTom Lifetime Maps/Traffic Subscription: should I do it?

Posted by jpluimers on 2010/08/12

I’m considering a TomTom Lifetime Maps/Traffic Subscription on a TomTom XXL 540 World Traveler’s Edition Series.

But given section 7 “Subscriptions (for Lifetime Maps/Traffic, see subparagraphs f and g only)” of their General Terms and Conditions (see below) – especially the underlined pieces below – I’m hesitating.

I have the gut feeling the same can happen with that device that happened with my HTC Advantage X7500 PDA:
it runs TomTom 6, since TomTom 7 does not support this PDA (might have to do with the 640×480 resolution of the PDA).
Newer maps don’t run on TomTom 6, so I’m stuck with old (Europe and USA) maps.

This TomTom XXL 540 WTE system is only available in the USA (not over here in Europe), and since I’ll be speaking at DelphiLive in less than 2 weeks from now: well, you’ll get my point :-)

I can’t seem to find out if this model has 4Gb or 2Gb memory; so anyone who knows that, please place a coment.
Also the screen resolution seems to be 480 x 272 (I’m used to 640 x 480), so I will probably need to get used to that if I buy.

So: Any opinions on what you think the map support lifetime of this XXL 540 WTE navi will be? Read the rest of this entry »

Posted in Opinions, Power User, Uncategorized | Leave a Comment »

routes.tomtom.com UI suggestion #fail

Posted by jpluimers on 2010/07/26

There is an address that I have been traveling from lately quite a bit: “Weena 505, Rotterdam, NL”.

So: routes.tomtom.com has put it in my history.

So why is it then that every time I select that address from my history, and I start planning my route, I get an additional choice of addresses to choose from this selection:

From:

  • Weena 505, Rotterdam, NL
  • Weena, Rotterdam, NL
  • Weena, Rotterdam, NL
  • The Westin Rotterdam, Rotterdam, NL

Or review your input:

  • Weena 505, Rotterdam, NL

They do this for all kinds of addresses.
It drives me nuts for two reasons:

  1. It takes an extra action from my side
  2. You cannot perform that action by keyboard (you have to use a pointing device)

Are interaction designers and UI builders ever going to learn?

–jeroen

Posted in Uncategorized | 1 Comment »

Solution: Can’t paste on a web-site with Ctrl-V

Posted by jpluimers on 2010/07/16

Quite a few web sites have fields where you cannot paste with Ctrl-V.
I don’t know why: pasting text input is a great way to speed up your work.

A solution for most of them: Read the rest of this entry »

Posted in Uncategorized | 1 Comment »

similarity: the symbols used for completely different products

Posted by jpluimers on 2010/06/19

Funny how two completely different products have very similar symbols:

Activia Symbol

Activia Symbol

Lactacyd Femina Symbol

Lactacyd Femina Symbol

–jeroen

Posted in Uncategorized | Leave a Comment »

Why SizeOf for character arrays is evil: stackoverflow question “Why does this code fail in D2010, but not D7?”

Posted by jpluimers on 2010/05/11

This Why does this code fail in D2010, but not D7 question on stackoverflow once again shows that SizeOf on character arrays usualy is evil.

My point in this posting is that you should always try to write code that is semantically correct.

By writing semantically correct code, you have a much better chance of surviving a major change like a Unicode port.

The code below is semantically wrong: it worked in Delphi 7 by accident, not by design:
Like many Windows API functions, GetTempPath expects the first parameter (called nBufferLength) number of characters, not the number of bytes. Read the rest of this entry »

Posted in Encoding, ISO-8859, Uncategorized, Unicode | Leave a Comment »

gmail harmless error message when editing settings: “Your changes have not been saved. Discard changes?”

Posted by jpluimers on 2010/01/28

When you edit your gmail settings, recently you often  get this message if you move the focus away from the settings pane:

Your changes have not been saved.
Discard changes?

The odd thing is that the settings are indeed saved just before you move the focus away.

So I always wondered if the message can be really ignored, and this thread confirms the message indeed is harmless.

I do still wonder why I get this message mostly in FireFox and Internet Explorer, but almost never in Chrome :-)

–jeroen

Posted in Uncategorized | Leave a Comment »

Anyone got the Delphi 2010 code formatter to work with anonymous methods?

Posted by jpluimers on 2009/12/24

With the default settings, the Delphi 2010 code formatter folds anonymous methods on one line.

Is there anyone who has found settings to circumvent this?
(You can also react on my Stackoverflow question here, I will update the blog with the relevant answers).

Original code:

procedure TUnit.AppendFinalization(const StringBuilder: TStringBuilder);
begin
  AppendMemberResults(StringBuilder,
    function(Member: TGeneratableInUnit): IStringListWrapper
    begin
      Result := Member.FinalizationText;
    end
  );
end;

procedure TUnit.AppendMemberResults(const StringBuilder: TStringBuilder; const GetMemberText: TFunc<TGeneratableInUnit, IStringListWrapper>);

Formatted code:

procedure TUnit.AppendFinalization(const StringBuilder: TStringBuilder);
begin
  AppendMemberResults(StringBuilder, function(Member: TGeneratableInUnit): IStringListWrapper begin Result := Member.FinalizationText; end);
end;

procedure TUnit.AppendMemberResults(const StringBuilder: TStringBuilder; const GetMemberText: TFunc<TGeneratableInUnit, IStringListWrapper>);

As you can see, the anonymous method is being formatted to one line.

I feel I’m missing some kind of setting here…

–jeroen

Posted in Uncategorized | Leave a Comment »

Reminder to self: what to do if RDP (MSTSC) or VMware clipboard sharing is broken

Posted by jpluimers on 2009/09/18

Some things to check when clipboard sharing for Remote Desktop (RDP/MSTSC) or VMware is broken. Read the rest of this entry »

Posted in Uncategorized | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 430 other followers