Archives
-
Displaying User Input - Part 2
Back in June I posted a cryptic little entry that highlighted a potential issue that can arise when displaying user input.
-
RegexLib.com - recent additions
Just thought that I'd mention that RegexLib.com has received 10 new patterns this week. Here's a couple of interesting titbits:
-
ShowUsYour<Calendar>
I've just uploaded the newest version of the ShowUsYourCode Dhtml Calendar. This cross-browser started its life over 2 years ago and has evolved into quite a slick unit. The latest version incorporates some UI/Css related changes that were put forward by one of its users - Caitlin Fegan.
-
Match opening tags improvements
I've made a couple of alterations to the opening tag regex.
-
HOW TO: Using RegexSnippets
I was just chatting to Thomas about RegexSnippets and how I use it to test my regex's. I think that most people haven't cottoned-on to the fact that you can write test modules within RegexSnippets itself. To use the code IDE do the following:
-
Regex to match opening Tags
While fiddling around in RegexSnippets tonight I concocted this regex to match opening tags and to capture the various elements:
-
OT: Monkey Business
-
Blogging Html
Blogging about mark-up is difficult, I often try to do it with mixed success. I've been using Word to transfer the colorized mark-up from VS.NET into my blog but, often it will complain about Word's xml formatting. The new “Word Clean“ function in the .Text blog admin tool not only removes the errant xml metadata but, oftentimes it will remove all coloring!
-
Computing aggregated data in a DataTable
The other day I was struggling to come to terms with how to perform aggregate queries on a DataTable. I was able to create calculated columns to display calculated data but, I couldn’t work out how to return aggregated data from a query over a DataTable.
-
ICompare langugages
Today one of the guys and I were having a conversation about "stuff"; not particularly interesting or relevant but, nonetheless it was "stuff". Now this was your typical bored-nerd conversation, you know the one:
-
Books to buy
Today I had a day of training; the course was a training course for peers that have been elevated to the lofty ranks of middle-management and talked about how to manage "sucessful projects". It was quite a good day and the group of co-middle-managers were all enthusiastic and keen in their participation. I actually like days such as these because you get to excercise your brain and challenge some core beliefs/assumptions. My favourite part was at the beginning when we each had to talk about our favourite "fantasy"; nearly all people talked about financial freedom or sensual holidays in the Greek Isles - not me! I thought that I'd establish my geek-cred early by talking about my dream of building a time machine :-)
-
{see's Rachels post} AndAlso...
The OrElse keyword *always* cracks me up because I can imagine the compiler emitting an "OrElseWhat?" exception if it fails :-)
-
RegexLib.com - Rss + Notifications!
For the 2nd time this week I've used the code in the recent Rss article on Msdn to write an Rss feed, this time it was to make available a feed of the latest Regex patterns that are added to the RegexLib.com site. I've added the little orange "Xml" link on the side menu and you can add the feed to your aggregator by pointing it to the following link:
-
The development phase - time for some practice.
I think that the good folk at Msdn have upped Kent's medication lately because I've noticed a rash of new content streaming into my aggregator which is addressed c/- ASP.NET developer center.
-
RegexLib.com features added
I spent some time this weekend altering RegexLib.com to try and push more information to the "front" of the site. I've added a couple of repeaters to the Home page that show a listing of recent patterns and also the top 10 contributors. Clicking on a top contributor takes you to a page that shows all patterns submitted by that particular user. This is a new page and I'm hoping that it will make the site even more popular and further entice people to use RegexLib.com to store their own patterns.
-
A new look and feel
As I mentioned last week, I've changed the look and feel I've my blog ( thanks to ScottW! ).
-
Broadsheeted Blogging
I stumbled across this site today which points to the future direction of the blogging “industry“:
-
Work for yourself - the good life
In my recent discussion titled: "Is Structure Good", I pondered aloud about what type of company I should be working with today in order that I stitch up a lucrative position with Microsoft in 10 years time.
-
Automating reCRUDescent tasks
For anyone interested in the science of code generation, I'm sure that Joseph's blog will be one to keep an eye on ;-)
-
Regex to capture an attribute collection
Wayne posted an elegant solution on the regex list today in answer to the following question: "How do I find all INPUT tags and pick out the attribute/values within them?". For the record, here's the pattern that Wayne came up with
... and here is some sample code that he provided for demonstrating its use (NOTE: the usage of the Captures on each Match'ed item):<input \s+ ( (?'Attr'\w+) \s* = \s* (?'Value' [^\s"'>]+ | "[^"]*" | '[^']*') \s* )* #match zero or more Attrs /?>
Regex rex = new Regex(@" <input \s+ ( (?'Attr'\w+) \s* = \s* (?'Value' [^\s""'>]+ | ""[^""]*"" | '[^']*') \s* )* #match zero or more Attrs /?>", RegexOptions.ExplicitCapture | RegexOptions.IgnorePatternWhitespace); foreach(Match m in rex.Matches( textToSearch )) { Console.WriteLine("Found a match with these attributes:"); for(int i=0; i < m.Groups["Attr"].Captures.Count; i++) { Console.WriteLine("Attr: " + m.Groups["Attr"].Captures[i].Value); Console.WriteLine("Value: " + m.Groups["Value"].Captures[i].Value); } Console.WriteLine(); }
-
Dumbfounded by dumb logic
Reading Paul's blog (as you do), I was amused to read about the conundrum faced by dumb people. Did you know that "they" think that "you" are dumb!
-
Is structure good?
I've asked many programmers/developers about where they want to end up and, often the reply is: "Me? I'm going to work for Microsoft. Gunna cut some elite code working on the kernel!". Which I always interpret to mean: "Me? Well apparently Bill's got a shitload of money and he's giving everyone free Jolt cola... that's where I'm heading!".