I remind everyone of “IIf“. Another tremendously useful little bit of code that I use all the time. If your If-statement is designed to set a single variable, like this one:
If Request("index") Is Nothing Then
myVariable = 0
myVariable = Convert.ToInt32(Request("index")))
then you can easily convert it to a single line, as follows!
(thanks Kartal) myVariable = IIf(Request("index") Is Nothing, 0, Convert.ToInt32(Request("index")))
The documentation (if it's installed: ms-help://MS.NETFrameworkSDKv1.1/vblr7net/html/vafctiif.htm) shows that it's used like this:
Public Function IIf(ByVal Expression As Boolean, ByVal TruePart As Object, ByVal FalsePart As Object) As Object
(example stolen from the TimeTracker Starter Kit: line 48 of Usercontrols\Banner.ascx.) I again can't think of any good reason not to use it.
I just checked it out for the first time, and it looks fantastic. I'm sure there will be lots of great Longhorn info passed around in those there parts. Thanks to Robert McLaws & his company (Interscape Technologies) for setting it up.
I did notice that you have to be named “Robert” to even get a blog there though. There are blogs for Robert Scoble, Robert McLaws & Robert Wlodarczyk. What's that about, huh? :)
I went out last night spur-of-the-moment to buy either a printer or a digital camera. I've been wanting both for what feels like an eternity, and I can't believe I haven't just done it yet. So last night, I made a trip to Fry's Electronics. (I love Fry's.) Anyway, I went first to all the cameras. I picked them up, and tried to play with them. They all had no memory cards with them (so you couldn't take them out and steal them I suppose), but also so you couldn't actually take a picture to see what it looked like.
Since I couldn't evaluate them, I moved onto printers. Now, the last printer I owned was a Lexmark Z-something that cost $19.99 (and I'm not talking after rebate) and didn't make it through my move to Phoenix last November. So, I was pretty impressed with almost all of them. I wanted a regular (as in not specifically “photo”) printer. Someday, I'll get a really kick-ass photo printer, but first I just want to be able to print directions off of MapQuest.
What I came home with was an HP PSC 2410. First, (and, of course, least important) it's a pretty blue color and has a high-tech looking LCD screen where you can preview your photos that you're printing straight from the memory card slots. It's also a scanner, copier and fax machine, all for $299. It prints up to 21 ppm (in the crappy-quality mode), and some pretty amazing copying qualities. There was a display of some pictures and pages it had printed, next to it in the store, and I grabbed one of them and copied it right there. In the highest quality mode, it did go about 1ppm, but the result was an almost exact duplicate of the picture, only not glossy.
I didn't get so far as hooking it up last night (sometimes you really just *have* to clean the kitchen, you know?) but I cannot wait to start scanning pics and finally being able to print things!