ElegantCode

A software blog

14 Dec
2010

Yes you can write Inline Code in XAML

A couple of days ago I was spreading the WPF goodness and was talking about how MVVM (Model-View-ViewModel) helps promote separation of concerns by removing the need for the code-behind file from the associated XAML file.  After my statement someone replied with the following question, “So why even have it there, can you just delete […]

Read More
14 Dec
2010

Taking Baby Steps with Node.js – Using Non-Standard Modules

Category:UncategorizedTag: :

In previous blog posts, I provided a short introduction to Node.js while also discussing the event-based model that lies at its core. For this blog post, I want to show how to effectively use non-standard JavaScript modules from a Node.js application. As already discussed in the introductory blog post, Node.js comes with a number of […]

Read More
13 Dec
2010

WPF–Copy UIElement to Clipboard as Multiple Formats

So about a week ago I wrote a post showing how to Copy a WPF UIElement as an Image to the Clipboard.  In reply to that post Rob Relyea made a comment regarding supporting multiple formats on the Clipboard.  What do I mean by formats?  Well, when copying items to the Clipboard, you an specify […]

Read More
10 Dec
2010

ASP.NET (MVC) and the Tale of the Continuous Application Restarts

I made a classic rookie mistake with ASP.NET (MVC) the other day. In my spare time, I’m working on this small sample application for myself in order to learn more about ASP.NET MVC. After working on this small web application for a while, I came to the point where I needed to set up a […]

Read More
9 Dec
2010

A Burden Called Meetings

I?ve been working for an enterprise corporation for 5+ years, which I?m going to be leaving soon. This organization is suffering from a wide-spread malady called ?meetingitis?. This phenomenon bothers me from time to time, especially when I?m being pulled in those pointless meetings, wandering about the same thing over and over again without coming […]

Read More
9 Dec
2010

Duplicate DOM elements with the same ID

This is a short post. Saving this snippet it for myself for later. If you ever have a html DOM element with a duplicate ID value, how do you detect the issue? It’s sometimes hard to find/debug until you really understand what has happened. Taking inspiration from the solution in the following stackoverflow question. http://stackoverflow.com/questions/482763/jquery-to-check-for-duplicate-ids-in-a-dom […]

Read More
3 Dec
2010

Basic JavaScript Part 3 : Prototypes

Category:UncategorizedTag: :

In previous blog posts, I talked about the rich capabilities of functions and objects in JavaScript. For this post I want to briefly touch on the concept of prototypes. Having a decent understanding of prototypes in JavaScript is highly recommended as they are a very important part of the language. I have to admit that […]

Read More