First, some test data:

declare @emp  table ( name  varchar(50)  primary  key )
insert @emp  values
    (  'Lino' ),
    (  'John' ),
    (  'Noel' )

Now, here's an example of the old, long way to do things. I'll use a custom while loop instead of cursors, because the cursor-based approach takes even more code than this:

select *
into #while_loop
from @emp

declare @name  varchar(50), @str  varchar(max)

while  exists (  select *  from #while_loop )
begin  select  top 1 @name = name
     from #while_loop
    
     delete #while_loop
     where name = @name
    
     set @str =  ...

While working on some custom editing controls in a WPF application, I began wishing I could provide my users with some simple spell-checking features.  Although I hadn't used it, I was sure that the RichTextBox control would allow spellchecking, but I was doubtful that my simple TextBoxes would be able to do the same thing.  I was happy to be proven very wrong! 

WPF TextBoxes do allow for spellchecking features, and enabling the feature is as easy as setting a boolean.  Here's the style XAML for two controls which enable spellchecking.

<Style  TargetType="{x:Type  TextBox}">
    ...

This is embarassing. I've been coding in T-SQL for years, and when I've had to invert a bit, I've been writing stuff like this:

case @bit  when 0  then  cast ( 1  as  bit )
     when 1  then  cast ( 0  as  bit )
     else  null
end

because the NOT operator doesn't work on bits. Today, I thought to myself: "Bitwise NOT. Didn't I see that in Books Online?" And yep, there it is. Instead of typing the above to invert a bit, all you need is the bitwise NOT operator "~".

~@bit

Forehead, meet palm.

My latest challenge is to learn everything there is about Sitefinity. When I first came to Falafel, one of my first assignments was to update some of Falafel's DNN modules, one of which was QuoteMax. This was a simple module that would manage a list of quotes and would pick one for display upon each page load. Of course, you might have a hard time saying any DNN module development was simple. In any case, this simple control would be my first try at custom Sitefinity development.

Taking a look at Sitefinity, I found that it had a list module ...

I am very proud to announce that our CTO, John Waters was nominated for the Kerzner International Project Manager of the year Award.

The purpose of the Kerzner International Project Manager of the Year™ Award is to recognize a project manager who has exemplified superior performance and outstanding project management methods, skills, and techniques, and their important contributions in business, industry, government community or not-for-profit environments. The award, established in 2006 by IIL, is named in honor of Dr. Harold Kerzner, Professor of Systems Management at Baldwin-Wallace College. He is a globally recognized expert on project management, total quality management, ...



Fifty thousand people attended PAX this year.  If you are not familiar with what this is, a couple of guys named Mike Krahulik and Jerry Holkins create a web comic called Penny Arcade, largely considered the most popular gaming comic on the internet and a well trusted game review site.  You may also know them from their yearly charity Child's Play Charity which collects donations of toys and money to provide games and toys for sick children in hospitals around the world.  Five years ago they decided to throw a LAN party for gamers to meet and play games ...

In a previous post, I explained how to use WPF validation rules and error templates to validate user input and provide meaningful feedback for invalid input in the form of tooltips.  Recently, I needed to use these techniques on a WPF textbox which already had non-error tooltip, and observed an unexpected behavior.  The local tooltip overrides the error tooltip, even when an error occurs.  For example, using the code from my previous blog, the following XAML adds a tooltip to the validated TextBox.

<TextBox  Margin="10"  Width="100"  ToolTip="Enter the number of seconds">
    <TextBox.Text>
        <...