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

    20120127-Microsoft-Visual-Studio-2010-New-Work-Item-menu-still-loading...-(try-again-in-a-moment)

    20120127-Microsoft-Visual-Studio-2010-Cannot-navigate-to-definition.Disable-this-productivity-power-tool

    20120127-Microsoft-Visual-Studio-2010-Cannot-navigate-to-definition

    More Photos
  • Pages

  • All categories

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

    Join 366 other followers

Archive for May, 2009

TFS 2008 Folder Comparison Filter for both C# and Delphi projects

Posted by jpluimers on 2009/05/25

When using TFS (Team Foundation System) 2008 as a Version Control / Source Code Management system not only for your C#, but also for Delphi projects, this is a good filter string when using the ‘Compare Folders‘ function of TFS:

!*.pdb;!*.obj;!*.dll;!*.exe;!*.res;!*.resources;!*.cache;!*.ilk;!*.ncb;!obj\;!objd\;!bin\;!lib\;!*.local;!*.identcache;!*.dcu;!__history\;!*.dsk;!*.~*;!*.stat;!*.drc

This is the regular Folder Comparison Filter – the bold above is the addition and the link contains an explanation of the filter syntax:

!*.pdb;!*.obj;!*.dll;!*.exe;!*.res;!*.resources;!*.cache;!*.ilk;!*.ncb;!obj\;!objd\;!bin\

Hope this helps some of you in reducing the amount of clutter in the resulting comparisons :-)

–jeroen

Posted in .NET, C#, Delphi, Development, Software Development, Source Code Management, TFS (Team Foundation System) | 3 Comments »

Edited: Conferences, seminars and other public appearances « The Wiert Corner

Posted by jpluimers on 2009/05/15

I have edited the Conferences, seminars and other public appearances/ page and extended the list of conferences I have attended in the past including many sessions.

Topics covered in these sessions have been C#, Delphi, Databases, Linux, Kylix, debugging, Compact Framework, and much much more.

Let me know which sessions you’d like to see online first.

The list is far from complete, but it is another step into getting the list more accurate.

–jeroen

Posted in .NET, C#, C# 2.0, Component Development, Conferences, Database Development, Delphi, Designer Development, Development, Event, Firebird, InterBase, Package Development, Software Development, SQL Server, Visual Studio and tools, XML, XML/XSD | Leave a Comment »

Speaking @ BASTA! 2009 – .NET Everywhere!, September 21-25, 2009, Rheingoldhalle, Mainz, Germany on .NET gems, C#, WPF multi-media and much more.

Posted by jpluimers on 2009/05/15

Masoud Kamali just notified that 2 of my sessions got accepted for the German BASTA! 2009 – .NET Everywhere! conference that is being held from September 21 til 25 in the Rheingoldhalle (which is in Mainz right in between the river Rhine and the city centre).

These are the sessions I’m going to do:

  • WPF multi-media: smart client with audio, photos and video 
  • .NET gems – small pieces of code that make your day

It’s gonna be fun!

Posted in C#, C# 2.0, Conferences, Development, Event, Software Development | Leave a Comment »

Delphi – more for … in support for TComponent.Components using a class helper

Posted by jpluimers on 2009/05/12

With my blog posting last week on Delphi – class helper to add for … in support for TComponent.Components/ComponentCount  I ‘lied’ a bit. 

What I actually wanted to do was write code like this:

  for Component in Self.ComponentsOfType(TSQLQuery) do
    (Component as TSQLQuery).SQL[1] := FTableName;

This filters the enumeration to only enumerate components that are of type TSQLQuery or descend from type TSQLQuery.

So I wanted to write a ‘richer’ enumerator than just iterating over all components.
The scond part of the lie is that such an enumerator in fact already exists: there is already a TComponent.GetEnumerator method.
Primoz Gabrijelcic’s – web/blog – rightly noted in the comment where he pointed to a similar blog post he wrote for TControls.

Since I wrote this post last week as well, but scheduled to be published right before DelphiLive!, I just added a reference to his comment, site, blog and posting.

TComponent already has a GetEnumerator since Delphi 2006.
But my TComponentEnumerator was meant as a base class to show you how to descend from it.
And that’s what this blog post is about.
Read the rest of this entry »

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

Adest Musica flyer for World Music Contest 2009 entry

Posted by jpluimers on 2009/05/11

Menno de Jong created a paper flyer for the World Music Contest 2009 entry that our marching band Adest Musica is going to perform.

New truck for Adest Musica with "the Musketeer" theme for their WMC 2009 show  

New truck for Adest Musica with “the Musketeer” theme for their WMC 2009 show

Like the new truck on the right, it perfectly fits the theme “the Musketeer”, and reflects our journey to the WMC in Kerkrade.
April 30 in Ede was part of that journey, and we regret that the release could not take place: the tattoo on which we would have performed got cancelled due to the attempted attack on the Royal Dutch Family that day.
However, the parade in Ede that day did take place, so we were able to show the public our new marches.

People wanting to join us in August 2nd at the WMC in Kerkrade can order tickets here: (Dutch link only) http://www.adestmusica.nl/wmc/bestelformulier_wmc_toegangskaarten.php

The images of the flyer are below (click on them for an enlargement):

wmc_flyer_voorkant
wmc_flyer_voorkant

Posted in About, Adest Musica, Personal | Leave a Comment »

StUF – receiving data from a provider where UTF-8 is in fact ISO-8859

Posted by jpluimers on 2009/05/08

Recently when receiving information from a StUF webservice created by a large Dutch provider of government IT systems, we had an issue with characters having their high bit set.

Although the web-service pretended to send their information as UTF-8, in fact they were encoding using a form of ISO_8859.

The most likely character set they used is ISO-8859-1 (since that is the default encoding for the HTTP protocol), but it might also be ISO-8859-15 which is an adaption of ISO-8859-1 trading some typographic characters for the euro-sign and some characters from French and some characters used for transliteration of  Russian, Finnish and Estonian.
(note that the printable characters of both ISO-8859-1 and ISO-8859-15 can be displayed by the Windows-1252 code page)

Since it is not possible to reliably “guess” the right encoding (there are way to many possibilities, even IsTextUnicode that is used by Notepad fails, see below), the only way is to use a fixed reencoding that depends on the StUF data provider. Read the rest of this entry »

Posted in Development, Encoding, ISO-8859, ISO8859, UTF-8, UTF8, XML, XML/XSD | 4 Comments »

Delphi – class helper to add for … in support for TComponent.Components / ComponentCount

Posted by jpluimers on 2009/05/07

You might have discovered that I’m a fan of Delphi class helpers.

This is another case where I’d like to use the for … in statement: accessing the Components of a TComponent instance.

So I wanted to end up with this:

procedure MyForm.FormCreate(Sender: TObject);
var
  Component: TComponent;
begin
  for Component in Self do
  begin
  // business logic goes here
  end;
end;

Read the rest of this entry »

Posted in Component Development, Delphi, Development | 11 Comments »

Delphi – class helper to get SourceFileName from an EAssertionFailed

Posted by jpluimers on 2009/05/06

In one of our applications, we have a default Config.xml file that is in our source tree, but it can be overridden by a Config.xml file relative to the application’s .EXE file.
So we have a two step process looking for the Config.xml, and we’d like to have the full path to the source file where the sources were build.
It seems the only way to get that, is by looking inside the Message of an EAssertionFailed exception.

So I wrote yet another class helper to get this code to work:
Read the rest of this entry »

Posted in Delphi, Development, Software Development | 1 Comment »

Delphi – Michael Justin had strange floating point results when his 8087 FPU Control Word got hosed

Posted by jpluimers on 2009/05/06

Two days ago, Michael Justin (who just released version 1.7 of the Habari Active MQ Client components) posted a blog entry about a strange circumstance when 1.99 would not compare equally to 1.99.
He tracked it down to the 8087 (more formally: Intel FPU) Control Word being hosed on his system.

I could not reproduce his particular case, but since I have seen similar issues in the past, I wrote the DUnit test case below which shows you what can happen by manually setting the 8087 Control Word.

The difference between the 8087 Control Word values $1372 (default) and $1272 (failure) is the internal mantissa precision (see the “Art of Assembly Language” and the Intel FPU Control Word documentation on this).
Edit: Found a much more complete description of the bits in the FPU Control word.

It changes from 64 bits to 53 bits, which is enough to make 1.99 not equal to 1.99.

I have seen behaviour like this in the past with some networking stacks in the Turbo Pascal 7 era, with some C++ DLL’s in the Delphi 1-3 era, and some printer drivers in the Delphi 5-7 era.
Let me know in the comments (or using the contact form) where you have bumped into this.

The code below makes use of the Jcl8087 unit which is part of the JCL (JEDI Code Library) at SourceForge
Add the unit to any DUnit test project you created and observe the results.
Read the rest of this entry »

Posted in Delphi, Development, Software Development | 5 Comments »

Delphi / .NET interop – Atozed announced Crosstalk

Posted by jpluimers on 2009/05/06

On 20090504, Atozed announced Crosstalk: a technology that allows native Delphi code to consume .NET assemblies in a really intuitive and transparent way.atozed-logobig-white-bg

The announcement contains a FAQ.

It is a promising technology, not only because it is dead easy to use, but also because it is backed by Atozed: a team of people that have made complex technology like Web Apps easy to use by creating IntraWeb.

Expect demos soon (maybe even at Delphi Live!).
Here is a short example:

Read the rest of this entry »

Posted in .NET, Delphi, Development, Software Development | 3 Comments »

StUF – patch download for version 2.04 (patch.bg0204.2009.04.22.zip)

Posted by jpluimers on 2009/05/05

Late last month, EGEM i-team released a patch for StUF 2.04 (Dutch link) that you can download.

There are a few fixes in it, for us, the most important one was a fix we already patched ourselves: the fact that the element kadestraleGemeentecode was not of type KadestraleGemeentecode, but of the wrong type Gemeentecode.

More on that below, but first an error that is in the new patch: the bg0204.wsdl has one include too much. You have to remove this one in order to make it work correctly:

	<import namespace="http://www.egem.nl/StUF/StUF0204" location="..204\stuf0204.xsd"/>

Note that due to a bug in the WordPress parsing engine (it usually kills backslashes that are followed by a zero), you might not see the correct path above:

It needs to start as follows:
dot
dot
backslash
zero
two
zero
four

You have to remove this because of two reasons:

  1. the imported bgstuf0204.xsd already includes the stuf0204.xsd (you do not want double includes!)
  2. for compatibility reasons WSDL documents should not contain backslashes

Read the rest of this entry »

Posted in Development, Software Development, StUF, XML/XSD | 6 Comments »

Dutch municipality ambivalence for stuff er… StUF

Posted by jpluimers on 2009/05/03

While on the one hand, Dutch municipalities are trying to ban stuff near schools by closing down coffeeshops that are withing a 250 meter of a school, they also love StUF.

This other StUF is the “Standaard UitwisselingsFormaat” or standard interchange format for IT-systems within municipalities.

It is an interesting set of standards that describe information interchange using either XML files defined by XSD or synchronous and asynchrous web-services defined by WSDL.

EGEM i-teams is the Dutch organization setting the StUF standards; their logo is on the right side. 
Maarten van den Broek is the guy behind the StUF standard.
The current version of the standard is 3.0 (Dutch link), but as it goes with standards, the actual version in use is 2.04 (Dutch link).

Since I have done quite some communication using the StUF 2.04 standard, I’d like to share some experiences with you in my blog.

Standards try to define a perfect world, where in fact the world is not perfect at all.
This holds for StUF 2.04 as well: in practice, the standard is not complete, has some pecularities (here and there even a bug) in it, and leaves things open for interpretation.
Also the parties implementing StUF do not always follow the rules, or sometimes extend the rules or add things that are not yet part of the standard.

This doesn’t make StUF a bad standard (actually, it is really good), and makes it really interesting.

So: enough stuff to talk about :-)

–jeroen

Posted in Development, StUF | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 366 other followers