 Friday, March 28, 2008
Handbrake 0.9.2 is out
I'm a little late on this one, but a new version of Handbrake was released last month with significant improvements. One of the things I noticed right away is that the Windows GUI has drastically improved (the presets are no longer collapsed by default!). Also, there is now a preset for the Xbox 360!!! I am always trying to walk people through ripping their DVDs to play on their Xbox. This is one less step I have to explain!
Friday, March 28, 2008 6:36:04 PM (Eastern Standard Time, UTC-05:00) Handbrake | Xbox | Tech Support
 Wednesday, March 26, 2008
Changing a control's CSS class name during validation
So I'm converting an ASP.Net prototype that was written entirely in VB Script (don't ask) to C#. As part of the conversion, I am putting in ASP.Net validation controls on all the input fields in the application. I was showing off my progress to the graphics designer, and he pointed out that he wanted to dynamically change the CSS class on the input field control that was being validated if it failed validation. Hmm, I can set the CssClass attribute on the validation control, but I couldn't find anywhere to automatically change the CSS class name on the actual control being validated.
I *could* write custom validators for each input control and change the class name in the javascript validation function, but that seemed like too much work. So I thought to myself, surely there is some way to add an event listener to the DOM on the validation control to see if it changed it's display attribute. After some researching, I got it to work. <head runat="server"> <title>Test Page</title> <style type="text/css"> .error { border: solid 1px red; background-color: Yellow; } </style> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div> <asp:TextBox ID="txtBox" runat="server" /> <asp:RequiredFieldValidator ID="reqField" runat="server" ControlToValidate="txtBox" Display="Dynamic" EnableClientScript="true" ErrorMessage="* Required" SetFocusOnError="true" /> <asp:Button ID="btnSubmit" runat="server" Text="Submit" /> </div> <script type="text/javascript" language="javascript"> function pageLoad() { $addHandlers($get('<%= this.reqField.ClientID %>'), { 'DOMAttrModified' : changeTextBoxClass, 'propertychange' : changeTextBoxClass }); } function changeTextBoxClass(eventName) { $get('<%= this.txtBox.ClientID %>').className = $get('<%= this.reqField.ClientID %>').style.display != 'none' ? 'error' : ''; } </script> </form> </body> </html>
DOMAttrModified is not supported in IE (shocking!!!) - onpropertychange is the IE equivalent. Basically, whenever the ASP.Net validators fire and change the "display" attribute on their enclosing <span> tags, I added an event handler that will dynamically set the CSS class on the corresponding input control. Notice in the example above that I'm using the ASP.Net Ajax library to make my life easier.
Before validation:
And after the "Submit" button is clicked:

Wednesday, March 26, 2008 9:14:38 PM (Eastern Standard Time, UTC-05:00) .Net | Ajax | ASP.Net
 Saturday, March 22, 2008
Reminder! Atlanta Code Camp on 3/29
Just wanted to post a friendly reminder that the Atlanta Code Camp will be taking place at Devry Tech in Decatur next Saturday (3/29). If you haven't done so already, register for the event to make sure you get a spot. If you are going, the City of Decatur is sponsoring an electronics recycling event that very same day at Decatur High School. The high school is just over a mile away from Devry. I strongly encourage you to bring any outdated, left-over, unused, or otherwise useless old electronic equipment you have lying around for recycling. Click on the map below for directions from Devry to Decatur HS. View Larger Map
Saturday, March 22, 2008 12:11:57 PM (Eastern Standard Time, UTC-05:00) .Net | Conferences
 Friday, March 21, 2008
Well that was unpleasant
Cornell looked nothing like a team that had won 16 straight games going into the NCAA tournament by getting absolutely humiliated by Stanford. I don't think I've ever seen a game where a team shot 16% in a half. Now I can't say I was expecting Cornell to win, but I was expecting them to put up a much better showing than they did. After all, they had held their own against Syracuse and Duke on their home courts, and even beat a Siena team that had beaten Stanford early in the season. As bad as it was (and believe me - it was *bad*), it still wasn't the worst performance by a team that day. That distinction belongs to Kent St., who scored 10 points and had 17 turnovers in the first half against UNLV.
Friday, March 21, 2008 2:50:55 PM (Eastern Standard Time, UTC-05:00) Cornell | Sports
 Wednesday, March 19, 2008
Is it time to start a new company?
If you're reading this blog, you're probably like me and have at least *some* technical skills. While I am nowhere near qualified to run an IT enterprise, I know enough to fool the average Joe. So I'm probably not the only out there to have become "technical support" for a growing list of friends and family. I have set up wireless routers for a couple of my neighbors, and it always makes me smile over the way they think how amazing my mad technical skills are. The other day we were having a neighborhood happy hour in somebody's front yard. One of the people for whom I set up a wireless router told me a story about going over to her mom's house that very morning. Apparently, her mother bought a new laptop and was trying to get on the ol' interweb. Her mom was furious that she couldn't get the browser on her new fancy and expensive laptop to connect to anything. My neighbor asked her mom, "Well, where's your wireless router?" At which point her mom looked at her with the same look you'd get from George W. Bush if you asked him to divide 3,670,879 by 47,546. So my other neighbor said, "Chris, you need to open a business for people like us. Just be brutally honest and call it, 'You're a dumbass - Give me a $100 and I'll fix your shit.'"
Wednesday, March 19, 2008 11:44:56 PM (Eastern Standard Time, UTC-05:00) Dumbass | Humor | Tech Support
 Monday, March 17, 2008
The Big Red in the OC
Unfortunately for me, the Cornell Big Red will be playing their first round NCAA tournament game in Anaheim against Stanford. Oh well. I was hoping for a matchup within driving distance - Birmingham or Raleigh would have been nice. If you haven't seen this already, check out the story on Cornell player (and Atlanta native) Khaliq Gant. He was paralyzed diving for a ball in practice two years ago, and has recovered to the point where he can walk without a cane. He now is back at Cornell and lifts weights with the team and serves as the team's manager.
Monday, March 17, 2008 2:53:11 AM (Eastern Standard Time, UTC-05:00) Cornell | Sports
|

Subscribe to this feed
 Email Me
 Follow Me On Twitter
| | Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| 30 | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 10 | 11 | 12 | 13 | | 14 | 15 | 16 | 17 | 18 | 19 | 20 | | 21 | 22 | 23 | 24 | 25 | 26 | 27 | | 28 | 29 | 30 | 31 | 1 | 2 | 3 | | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
Search
Navigation
Tag Cloud
Archive
Blogroll
|