Internally there was a race for the best-performing-solution on the following scenario:

A function has a string-parameter containing only digits. The function has to increment the value and return a string having the very same format.
For example: input is ’0100′ the returnvalue is ’0101′

Take this for granted:
- input is always numeric
- the incremented value will never have more chars then the input.

Requirements:
- increment the input-string by one
- padding must be dynamically, depending on the input-value (must also work for ’010′ and ’00100′)

And here is the result, starting with the fastest one:

  • return (int.Parse(input) + 1).ToString().PadLeft(input.Length, ’0′);
  • return (int.Parse(input) + 1).ToString(CultureInfo.InvariantCulture.NumberFormat).PadLeft(input.Length, ’0′);
  • return (Convert.ToInt32(input)+1).ToString(“D” + input.Length);

And the slowest one:

  • return (Convert.ToInt32(input) + 1).ToString(input.Aggregate(“”, (current, t) => current + “0″));

Summary:
- assigning values to variables is slow, so do it all within 1 line.
- using FormatProviders is slow.
- using linq is maximum slow.
- ‘Convert.ToInt32′ checks for NULL, then calls ‘int.Parse’, so better use int.Parse, if you don’t care for null.

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg

Click-once was not designed for registering com-components. These things are part of the work Windows Installer is meant for.
To use ActiveX in click-once applications too, remember these words: “Reg-Free COM“.

Here’s a short summary of what to do in a .NET project:

  • register the ActiveX Control on the developer’s machine.
  • add the control to a form
  • visual studio will add a reference to it.
    in solution explorer navigate there, and set it’s properties to “isolated” and “copy local”.
  • compile the project. VS will create a manifest to allow the usage of the activeX without registering it.
  • copy the activeX control to your output folder
  • Test it by compiling your app, unregister the control, and start your app.
    Lucky you, it will operate as desired.

Requirements: Windows XP and above, Visual Studio 2005 and above.

Note: Not every component is meant for Reg-Free COM, but in most cases it works.
And: it must be registered on the computer, the app is compiled on.

Get more information here (msdn magazin).

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg

Coding for Enterprise Architect often requires lookup of data not exposed by the GUI. So the coder ends up opening SQL Management Studio or MS Access to lookup data directly from the database tables.
EnAr Spy was built to ease lookups; here at LieberLieber, it reached essential-tool status rapidly.

EnAr Spy integrates into Enterprise Architect as a custom Add-In. Once installed, the developer needs to rightclick the item he wants to investigate, to get a view containing all properties and collections.

Also included in the current version:
- execute SQL directly out of Enterprise Architect
- lookup information from repository object
- remove Version-Control from the project.

Best of all: EnAr Spy is free of charge; just download and install.

Requirements: .NET 2.0 & Enterprise Architect 8 or above.

Please note, that we will not take any responsibility on possible data loss or damage to any software or hardware.

Downloads are here:

Setup: EnArSpy 1.1.122
Dokumentation: PDF 
Demonstration: Video (1080i)

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg

Unfortunately the best .net decompiler will not be free anymore. The version 7 of .NET Reflector will not be free of charge anymore. For more details see red-gates announcement. The good news is that others took this as opportunity.
The next version of Jetbrains Resharper is bundled with a decompiler and a free standalone tool will follow.
Another tool comes from the SharpDevelop Community. For more information about ILSpy see Daniel Grunwalds blog.

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg

I was searching for an easier way to maintain our WiX Setups for LieberLieber AMUSE.  My favorite search engine pointed me to WiX Integration by Matt Ward.

As this article points to an rather old Version of WiX  and SharpDevelop – I had to try with the latest version of SharpDevelop – and what I see makes me happy – we will test it in the real world and report our experience soon.

image

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg

This article describes the integration of Tortoise Svn and Jetbrains Youtrack.
On the working folder of your project you need to set three properties (don’t forget to apply them recursively):

  • bugtrac:message -> message for commit (%BUGID% is replaced with the issue number on commit)
  • bugtrac:url -> url to youtrack server (%BUGID% is replaced with the issue number on commit)
  • bugtrac:number -> false, because Youtrack uses an alphanumeric project id

If all is configured correctly you should be able to use the Youtrack IssueId in the commit dialog of Tortoise:

This work also if you use the Visual Studio Plugin AnkhSvn:

Now you can use integration of Youtrack in the Log Messages dialog of Tortoise. The entered Youtrack Id is converted to a working link to this issue.

Just click it to open the issue in youtrack.

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg

There is an easy way of integrating bugtracking tools into tortoise svn using properties.
Just add following properties to your working copy (don’t forget to apply them recursively):
-bugtraq:url (enables link to bugtracker and shows Bug-Id column in tortoise)
-bugtraq:message (enables Bug-Id input field on commit)

Example:

bugtraq:url

http://myBugtracker.com/?id=%BUGID%

-bugtraq:message
Defect:  %BUGID%.

%BUGID% is replaced with the issue number you entered on commit.

For more details see the tortoise documention.

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg