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

Archive for the ‘Development’ Category

SvnBridge – Fiddler2 debug the TortoiseSVN traphic to Team Foundation Server

Posted by jpluimers on 2011/03/15

The link below shows you how to use Fiddler2 to trace how TortoiseSVN communicates with SVN Bridge.

TortoiseSVN is a well known SVN client that nicely integrates with the Windows Explorer shell.

SvnBridge sits on top of TFS so that you can use Subversion clients against Team Foundation System.

The settings are so that only the TortoiseSVN requests are captures.

Basically the trick is to start Fiddler2, have it stop capturing WinINET traffic, then modify the TortoiseSVN uses Fiddler2 as HTTP proxy.

Here are the details: SvnBridge – Use TortoiseSVN with Team Foundation Server.

Hope this helps a few of you debugging the TortoiseSVN path to SvnBridge.

–jeroen

Posted in Development, Source Code Management, Subversion/SVN, TFS (Team Foundation System) | Leave a Comment »

Convert Microsoft Access JET SQL to SQL Server T-SQL Cheatsheet and Access JOIN parenthesis

Posted by jpluimers on 2011/03/14

There are truckloads of differences in SQL between Microsoft Access and SQL Server.

This Convert Microsoft Access JET SQL to SQL Server T-SQL Cheatsheet helps you convert between the two.

It doesn’t cover the parenthesis thing that Access needs on joins, but you can read on that here, here and here.

–jeroen

Posted in Access, Database Development, Development, SQL, SQL Server | Leave a Comment »

online: Create a GUID

Posted by jpluimers on 2011/03/10

Don’t you love this kind of sites:

Create a GUID at createguid.com

–jeroen

via Create a GUID.

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

c# – PRISM + MEF — How to specify which export to use? – Stack Overflow

Posted by jpluimers on 2011/03/10

When you export different implementations of the same interface, importing the right one requires a “named contract“.

Like Danny Thorpe wrote: “Ah, named contracts. I had forgotten about that!”, indeed the first answer is nice!

–jeroen

via c# – PRISM + MEF — How to specify which export to use? – Stack Overflow.

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

C# generics: Constraints on Type Parameters

Posted by jpluimers on 2011/03/10

I usually forget the exact details on C# constraints when using generics.

One of the especially irritating things is that you cannot apply all the constraints you want.

Some built-in language features are covered by special types in the .NET framework class library, for instance enums.

Which means that code like this will not compile:

        // Error	1	Constraint cannot be special class 'System.Enum'
        public static T StringToEnum(string name) where T : System.Enum
        {
            return (T)Enum.Parse(typeof(T), name);
        }

You need to replace it with the code below, which uses the fact that an enum is a ValueType (hence the struct constraint) implementing the interfaces IComparable, IFormattable and IConvertible constraints: Read the rest of this entry »

Posted in .NET, C#, C# 2.0, Development, Software Development | Leave a Comment »

How to: Back Up a Team Foundation Server

Posted by jpluimers on 2011/03/09

A client tried to backup their TFS server with individual database backups.

You can’t properly restore those backups, because the underlying databases are correlated. The only way to backup them is using maintenance plans like the How to: Back Up a Team Foundation Server link shows.

–jeroen

via: How to: Back Up a Team Foundation Server.

Posted in Development, Source Code Management, TFS (Team Foundation System) | Leave a Comment »

Cool tool: .NET Version Detector

Posted by jpluimers on 2011/03/09

Cool tool from ASoft.NET Version Detector.

.NET Version Detector is a native application, which means it isn’t dependent on any version of .NET to run.

.NET Version Detector is a handy tool for vendors of .NET applications also.

Knowing which versions a user has installed and where they are located on the hard drive.

ASoft allows for a vendor to bundle .NET Version Detector with its application (for free!) so that it is easier to get some generic and exact information on the frameworks.

But before doing so, contact ASoft first!

–jeroen

via: .NET Version Detector.

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

Why is the result of RoundTo(87.285, -2) => 87.28 – Stack Overflow

Posted by jpluimers on 2011/03/08

Programmers on all sorts of platforms get this wrong all the time (I admit having done this in bad ways myself too).

In short: Don’t expect floating point values in a computer to be represented as decimals.

Rob Kennedy wrote a very nice answer on this:

The exact value 87.285 is not representable as a floating-point value in Delphi. A page on my Web site shows what that value really is, as Extended, Double, and Single:

87.285 = + 87.28500 00000 00000 00333 06690 73875 46962 12708 95004 27246 09375

87.285 = + 87.28499 99999 99996 58939 48683 51519 10781 86035 15625

87.285 = + 87.28500 36621 09375

And David Heffernan points to the best link you can get on this topic:

The classic reference on floating point is What Every Computer Scientist Should Know About Floating-Point Arithmetic.

For currency based calculations, if indeed this is, you should use a base 10 number type rather than base 2 floating point. In Delphi that means `Currency`.

–jeroen

via delphi – Why is the result of RoundTo(87.285, -2) => 87.28 – Stack Overflow.

Posted in .NET, Algorithms, C#, Delphi, Development, Floating point handling, Software Development | 14 Comments »

If you use MonoTouch for iOS, be sure to update the iOS SDK (it doens’t auto update)

Posted by jpluimers on 2011/03/08

If you don’t update the Apple iOS SDK (which doesn’t auto update), then the Apple Store will reject your MonoTouch apps.

A big thank you to Peter van Ooijen for figuring this out

–jeroen

via: The appstore, iOs versions and Monotouch (4.0 won’t do) | Visual Studio Feeds.

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

.NET JIT bugs

Posted by jpluimers on 2011/03/03

All software contains bugs, so for my own reference, when I bump into one of those below, it is good they are known .NET JIT bugs:

http://stackoverflow.com/questions/2135509/bug-only-occurring-when-compile-optimization-enabled/2135904

http://stackoverflow.com/questions/2056948/net-jit-potential-error/2057228

–jeroen

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