Safely using the Preview Pane in Outlook.

You CAN have the preview pane active in Microsoft Outlook without auto invoking all of the HTML spam you get.

To do this, just make a folder in your inbox that has the preview pane turned off. Then when HTML mail arrives, move it into that folder. You can also turn onthe auto-preview line that shows the first three text line for the email. This really helps cut down the spam that include refences to websites. That kind of email usually has your email address embedded in it (in code) so that the spammer can just tell when it has reached a live destination. Use this method for a few months and your name will drop off many of the spam lists.

To move only the HTML based email over to the ‘Suspect’ folder, create a rule that looks like this (leave a comment if you want more details than what is shown here):

Apply this rule after the message arrives
through the YOURACCOUNT@HERE.COM account
  and with ‘multipart/alternative’ or ‘multipart/related’ in the message header
move it to the SOME FOLDER WITH PREVIEW PANE TURNED OFF HERE folder
  and stop processing more rules

Resizing JPEGS in Delphi to create Thumbnails for posting to the web

I thought I might post this example… It works really well with the Light box java script plugin for WordPress… It is a single file (DPR) Delphi console app that can be used in a batch file to resize jpegs to any percentage of the original size.

I use it with ZTree by tagging all of the JPegs I wish to resize and then hitting CTRL B. Ctrl B will create a batch file out of all of the tagged files with the command line that I enter. So the command line I use is “ResizeJPeg %4.%5” and 10 seconds later, I have a large set of images and thumbnails I can post to the web.

BTW I use net drive to make drive X: be a my FTP directory. NetDrive is WONDERFUL!!! I dare say it is ALMOST as useful as ZTree…. Almost….

For those who have no care to be interested in compiling Delphi Source code, here is the EXE: ResizeJPEG.exe

[delphi]
// ****************************************************************************
// ResizeJPEG.DPR 01/Jul/2004
// Written by Brian Layman (AKA Capt. Queeg)
// Visit him at http://www.TheCodeCave.com
//
// This routine was written to help resize jpegs for posting to the web
//
//
// Warning: This routine opens your images and replaces files without
// warnings. It is not ever supposed to edit your original image, but
// if something unexpected happens, you could lose some important images.
// Understand every line of this example before you run it. Or better yet,
// do not run this example at all. You should stop right now and erase the
// files. For if it causes blue smoke to be emitted from your network card,
// if it erases all users from your computer, or if it makes your sister
// break up with her lawyer boyfriend and start dating a caver, it is
// not my fault. (Actually that last one might be an improvement, but
// it is still not my fault.) But the fact of the manner is, anything
// could happen when you mess with the registry and this example IS,
// in all seriousness, dangerous.
//
// Usage: ResizeJPEG.exe JPGNAME.JPG <-- Resizes the image to 10% of original // ResizeJPEG.exe JPEGNAME 50 <-- Resizes the image to 50% of original // // License - If this helps you - Great! Use it, modify it share it. // // Donations - If this project really helps you out, feel free to make a $5 // (US) token donation via Paypal to Brian@TheCodeCave.com or just leave a // comment on my blog and include your country of origin. // // History: // 01/Jul/2004 - BL - Created // // **************************************************************************** program ResizeJPEG; uses ExceptionLog, Forms, Classes, JPEG, Graphics, SysUtils; {$R *.RES} {****************************************************************************** DoResize This routine receives two JPEGs and the percentage (as a whole number) of the original size. It only does aspect ratio resizing. The creation and freeing of the JPEGs must be done outside this routine. srcJPEG must contain an image. destJPEG's contents will be overwritten. Passing a zero or negative percentage will ******************************************************************************} procedure DoResize(srcJPEG, destJPEG: TJPEGImage; const Pct: Integer; BMPName: String = ''); var Bitmap: TBitmap; begin // DoResize if (not(Assigned(srcJPEG) and Assigned(destJPEG))) then raise Exception.Create('There has been a programming error. ' + 'The JPEG parameters passed to DoResize have not ' + 'been initialized.'); // Error out if we don't have a valid source image if (srcJPEG.Empty) then raise Exception.Create('The parameters passed cannot produce a valid image. ' + 'The source image is blank.'); // Error out if we don't have a valid source image if (Pct <= 0) then raise Exception.Create('The parameters passed cannot produce a valid image. ' + 'The percentage (' + IntToStr(Pct) + '%) is invalid.'); Bitmap := TBitmap.Create; try Bitmap.Width := Trunc(srcJPEG.Width * (PCT/100)); Bitmap.Height := Trunc(srcJPEG.Height * (PCT/100)); Bitmap.Canvas.StretchDraw(Bitmap.Canvas.ClipRect, srcJPEG); destJPEG.Assign(Bitmap); if (BMPName <> ”)
then Bitmap.SaveToFile(BMPName);
finally
Bitmap.Free;
end;
end; // DoResize

var
JPEGOrig, JPEGTemp: TJPEGImage;
ImgName, imgExt: String;
Percentage: Integer;
CreateBMP: Boolean;
begin
Application.Initialize;
// Retreive first parameter and strip off any path info.
// That’s the file name. This now includes the extension.
ImgName := LowerCase(ExtractFileName(ParamStr(1)));

// Determine the extension
ImgExt := ExtractFileExt(ImgName);

// If there is an extension, remove it from the file name.
// If there is no extension, assume ‘.jpg’ for now.
if (ImgExt <> ”)
then ImgName := copy(ImgName, 1, Length(ImgName) – Length(ImgExt))
else ImgExt := ‘.jpg’;

// The third parameter is for the percentage of change.
// If not provided, it defaults to 10%
Percentage := StrToIntDef(ParamStr(2), 10);

CreateBMP := Boolean(StrToIntDef(ParamStr(3), 0));

// This if statement both verifies that the file is there and that it now has
// a .jpg or .jpeg extension. If these conditions are not met, the program
// exits without an error.
if (FileExists(ImgName + ImgExt) and ((ImgExt = ‘.jpg’) or (ImgExt = ‘.jpeg’)))
then begin
// Create the object for manipulating the new image
JPEGTemp := TJPEGImage.Create;
try
// Create the object for storing the original image
JPEGOrig := TJPEGImage.Create;
try
// Load the original
JPEGOrig.LoadFromFile(ImgName + ImgExt);

// Call the subroutine for resizing the original and putting it in the
// temporary object.
if (CreateBMP)
then DoResize( JPEGOrig, JPEGTemp, Percentage, ImgName + ‘_s.bmp’)
else DoResize( JPEGOrig, JPEGTemp, Percentage);

// Save the new image with a “_s” tacked onto the file name.
JPEGTemp.SaveToFile(ImgName + ‘_s’ + ImgExt);
finally // try around JPEGOrig usage
// Free the original object
JPEGOrig.Free;
end; // try around JPEGOrig usage
finally // try around JPEGTemp usage
// Free the new/temp object
JPEGTemp.Free;
end; // try around JPEGTemp usage
end; // if fileexists
end.[/delphi]

Mountain Bike

Monday nights are my nights off. I can go wherever I want. Unfortunately that often doesn’t amount to much. But this week it actually meant getting outside and having some fun.

I finally got to go ride the West Branch State Park Mountain Bike Trail. It was a blast even if I am not quite up to that skill level yet.

All winter long it is maintained by CAMBA – the Cleveland Area Mountain Bike Association.
Cleveland Area Mountain Bike Association

They put in bridges and other challenges along the trail. I even met two of the officers that night, Brian Lennon, president, and Mike Ryba, Treasurer. Unfortunately I can’t remember the names of the other people they were riding with, not even the one from Puerto Rico, but they were all really nice people. All winter long their members maintain the trails.

I tried out the camera on my new phone and got some quarter decent shots (they definately weren’t half decent) while it was still light. However, the exposure time must be really high when it gets dim. You can see that as the envening goes on, the shots get blurier. When taking pictures in twilight with the phone, I will have to stabalize it. Holding it by hand just isn’t sufficient (plus chances are mid-workout I wasn’t all that stable anyway…)

The trail followed along the resevoir and was beautiful with the sun setting... Some bridges offered alternate easy routes.  My helmet had not made this trip, so I was conservative on this one... A stone bump trail to make life interesting... too blurry to make out though...

The CAMBA web site has a great map of the park, but it’s a 2.5mb 1 page PDF. I mananged to convert it to a 45K JPEG that hasn’t lost much detail. This is a little handier to keep on PDAs and what not…
The blue dotted trail is the one I followed...

I even got myself a couple of badges… This all was mostly from one very tall root near the beginning of the trail. It was an up hill section that I’d started in the wrong gear and the root required about a foot worth of travel to get up and over it, though the root itself was probably just under 6 inches high. Anyway, I decided to push it and try it anyway. The result was I was slumped against the tree with only my front wheel making it over. The scrape was from sliding backwards down the bark as I got my footing…(Kneeing actually I guess)

I'm proud of this one! This one is just annoying...

I’m proud of the skinned knee… I probably haven’t skinned my knee falling from a bicycle in 20 years… Boy that makes me sound old…. Anyway, it meant I was pushing limits again, which is what living is all about and when you stop doing that, that’s in large part why people grow old… I had a few more bumps and bruises. For instance my right arm is scraped simply because there wasn’t enough room for me to get through between the trees that were there… All part of the fun and I’m smilin’ as I type…

Cycle Man

I had a wonderfully fun weekend. I was pit crew for my friend Tom Moyer. He came up to race and the Nelson Ledges racetrack. It’s a nice track but VERY bumpy. We had to do some structural reenforcement of his tachometer and fairing, but it went really well. He reported that turn 7 was interesting because of the washboard right before it. He said he hit that washboard at speed and thought he’d be dead when the corner came. But then it smoothed out.

My jobs were to help get the bike fueled with premix – measure the tire temp before and after the races to make sure the tires were heating up enough to be sticky during those corners and not so much that he’s flinging chunks of rubber all over the track.

Other than the cold weather combined with the sunburn, it was a very good day. BTW, Tom’s the yellow Yamaha RZ350 #262. It’s a two stroke and a blast to ride… (Yes, I speak from experience 🙂 )

Here’s a couple videos:
Movie 1
Movie 2

Learn more: Tom races in the Mid-Atlantic Roadracing Club

Images:








And Tom certainly had some admirers at our house afterwards. He’s the apple of Caleb’s eye at the moment…

“CycleMan!”