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,604 other followers

Archive for December 18th, 2012

Happy 25th birthday Perl!

Posted by jpluimers on 2012/12/18

Wow, Perl turned 25 today, it seems my first use was like yesterday!

–jeroen

via: The First Twenty-Five Years – The Perl Foundation.

Posted in Development, Perl, Scripting, Software Development | Leave a Comment »

As of December 3rd, 2012, the WordPress.com statistics shows you unique visitor counts too

Posted by jpluimers on 2012/12/18

As of December 3rd, 2012, a WordPress.com blog stat page (https://wordpress.com/#!/my-stats/) now shows unique visitors in addition to total views.

The hint for each bar even does the views per visitor math (seems to average around 1.25 views per visitor on this blog, will update this when a longer period has passed).

The Your Unique Visitors from the Blog at WordPress.com explains some more details.

–jeroen

Posted in Power User, SocialMedia, WordPress | Tagged: , , , , , | Leave a Comment »

.NET/C# – How to create a file and its parent directories in one method call? (via: Stack Overflow)

Posted by jpluimers on 2012/12/18

Ever since .NET 1 there has been no built-in way to create a file including all its parent directories.

Hence small FileHelper class far below.

The fundament of the class is this CreateUnderlyingDirectory method, that uses System.IO.Path.GetDirectoryName to obtain the parent directory of a path, and then System.IO.Directory.CreateDirectory to create it (and any parent directories) if needed.

        public static void CreateUnderlyingDirectory(string path)
        {
            string directoryPath = Path.GetDirectoryName(path);
            Directory.CreateDirectory(directoryPath); // NOP if it exists, will create all parent directories if not
        }

A few helper methods get you a StreamWriter either empty/appended, or always empty Read the rest of this entry »

Posted in .NET, .NET 3.5, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development | Leave a Comment »

 
%d bloggers like this: