Todd's Blog

New Jackpot Alerts

Those who are subscribed to Mega Millions and/or Powerball Jackpot Alerts at USA Mega surely have noticed the new graphical alert e-mails.  It was a fun mini-project for me to give the Jackpot Alerts a complete makeover — something I've been meaning to do for a while.

One of the nice delivery features is that I have created the e-mails such that the one e-mail will work perfectly for both plain text e-mail readers and those who can display the graphics.  Both versions of the e-mail are enclosed every time.

The other nice thing is that it will display the nice graphics even in those e-mail software applications that block external graphics.  (Such as Outlook Express.)

That was actually a learning experience for me, as I worked to create an e-mail that would display correctly in any e-mail program.  It is VERY difficult, because they are all so different from each other.

The way it accomplishes the task is that instead of including links back to a web server to show images, it encodes the graphics and stores them inside the e-mail itself, so once the e-mail is downloaded, it already includes a plain text version, a graphical version, and all the graphics necessary to display.

I even tested the e-mail in Microsoft's new Outlook 2007, which is not available to the general public yet.  From my experience with it now, that e-mail software (Outlook 2007) is going to be a real challenge for web sites that deliver graphical e-mails, as it completely changes the way they are rendered [displayed].  It took a while, but I eventually figured it out, and the Jackpot alerts now look good on that software as well.

If you are receiving the Jackpot Alerts and would prefer to see just the plain text version, most e-mail software programs have an option to just show the plain text version.  For example, in Outlook Express, you would open the Options window, then go to the Read tab, and then find the checkbox for switching to the plain text view.

If there is anyone who is having trouble viewing the Jackpot Alerts in their e-mail software (I obviously could not test every software package out there!) please send me a PM and let me know what the problem is, what e-mail software you're using, and what version of Windows or Mac OS you're using.

Entry #154

Article published today

I had my first article published this morning at DotNetSlackers, an excellent community site for Microsoft .NET developers.

As I go through the very long process of re-programming this entire site using Microsoft's ASP.NET 2.0 technology (and other .NET technologies), there are lots of unique challenges created, just by the nature of the enormous size of this web site.

After creating a number of really cool solutions for some of those challenges, I thought that it would be nice to tell the development community about them, rather than burying them in a mass of web code.

I'll contiunue creating new solutions, and hopefully continue writing new articles.  Many thanks to DotNetSlackers for providing the space to share my ideas.

http://dotnetslackers.com/articles/aspnet/A_Better_BulletedList.aspx

Entry #153

Flattery

As they say, imitation is the highest form of flattery.

Entry #152

The Who return with 1st album since 1982

Good news for Who fans!

The new album will be released at the end of this month.

I really hope this isn't like the Rolling Stones albums that get churned out.  Pete Townshend is such a talented song writer that I have hope.

Here's some really cool trivia that I thought of while writing this blog entry:  If the last Who album released was back in 1982, then this album will be the first one they've ever produced that didn't premier on vinyl LPs!  Because CDs first debuted in 1983, the last Who album was released an entire year before CDs even existed.  Holy mackerel, if that doesn't put things in perspective!

Entry #151

Lottery Post supports new IE7 'Search Providers'

The new IE7 web browser (which I previously recommended that all IE users upgrade to) includes a feature called "Search Providers".

In the upper-right corner of the browser window there is a space to enter text, and a small search button and a "down-arrow".  It is a shortcut to quickly perform searches using your favorite search engine.

So you just tell it what search engine you use all the time (such as Google), and every time you enter text there and click the button, it immediately goes to your search engine and performs the search.  It is a nice time-saver.

Lottery Post fully supports that new IE7 feature, and allows you to set Lottery Post as your default search engine.

Even if you don't want to use Lottery Post as your default, you can save it in your search engine list, so going to Lottery Post and performing a search is as easy as entering the search terms, clicking the down-arrow, and selecting "Lottery Post".  Again, a nice time-saver.

When using IE7, you will know that a web site supports the Search Providers feature because the down-arrow next to the search button will glow orange, like this:

IE7 Search glowing orange

When you see that, you can add that site's Search Provider to your list by clicking the glowing down-arrow, and selecting "Add Search Provider".  In fact, if you're using IE7 right now, look up at the top of this page and you'll see it.

Right now the Lottery Post Search Provider is used to search the forums.  In the future, I will add search providers to the other areas in Lottery Post as well, such as blogs.

By the way, Firefox also supports a Search Providers, and Lottery Post has supported that feature from the beginning, so you can do exactly the same thing if you use Firefox.  I previously posted about it here: https://www.lotterypost.com/thread/129103.htm

Entry #150

Final version of IE7 ready!

If you are a user of Microsoft IE version 6 or lower, I urge you to upgrade.  IE7 is just wonderful -- a vast improvement over what you're using today.

It's a free download, and very easy to install.

After installing things that you should immediately familiarize yourself with:

  • Tabbed browsing -- have multiple browser sessions open within one window.
  • RSS feeds -- have web sites tell you when new information is available, rather than having to check everything yourself.  I can't stress enough how important this feature is.  Once you get a library of feeds working for you, you will want to see that Lottery Post Syndicated News Feed symbol on every web site.

You can see more information about IE7 here:

http://www.microsoft.com/windows/ie/

Or, you can go straight to the download page here:

http://www.microsoft.com/windows/ie/downloads/default.mspx

Entry #149

Lottery Post gets the special Google treatment

Today when I did a search for "lottery post" on Google, I got a pleasant surprise.

Google has made Lottery Post one of its premium sites by showing the Lottery Post listing with its top page categories broken out underneath.  It's something Google does when a web site is not only popular, but also has achieved a certain high status among all sites of its type.

Here is the Google listing:

http://www.google.com/search?hl=en&q=lottery+post

 

Entry #148

Wonderful song

Anyone who has watched Battlestar Galactica will have heard this song in the second episode of season 2.

This evening I finally figured out where the song came from.  It was difficult to locate, as it is not on the soundtrack.

Very haunting and beautiful, see if you agree...

Click here to download 

(Large file - approx. 9MB)

By the way, anyone who has not watched Battlestar Galactica is depriving themselves of one of the best shows in years.

Entry #147

DVD vs. HD-DVD

This is a follow-on the a forum post located here: https://www.lotterypost.com/thread/142461.htm

I located a web site that has photographs somebody took of his screen, which shows the difference between standard DVD movies and the new HD-DVD format. 

Note, HD-DVD is not the same thing as Blu-Ray, which is actually a competing high definition format.  The average Circuit City salesperson would confuse the issue, depending on which type of player they want to sell that day, but understanding that they are two distinctly different formats (HD-DVD and Blu-Ray) is important before making a purchase.  In my opinion, HD-DVD is better right now.

Anyway, back to the comparisons of HD-DVD to standard DVD (the type of DVD player that is right now hooked up to just about everyone's TV).

The photographs are good, in that they provide a good illustration of how that regular DVD picture -- which everyone, including myself, thought was so awesome -- looks like it has a blurry haze over it, compared to HD-DVD.  The pictures obviously cannot help someone understand the differences in sound quality, but from someone who owns both technologies, I can attest that the sound is improved at least to the same degree that the video is improved.

The interesting thing about the photos is that the person's video projector used to project the movie in the photos is not even displaying the HD-DVD video in the native 1080i or 1080p resolution, so it is being downconverted to whatever maximum resolution his projector supports.  That means the video, when shown with an appropriate TV or projector, will look better than what is shown, with a more striking comparison to standard DVD.

Here is one of the comparisons, taken from the movie Troy.  For the ladies's benefit I have posted a Brad Pitt comparison.

Standard DVD

HD-DVD

Pretty amazing, huh?  It's like the standard DVD had the camera out of focus.  I can tell you, it really does make a difference, especially for people with larger TV sets or projectors.

The rest of the comparison can be found here.  You can find a previous comparison the same person did with the movie Seabiscuit here.

Entry #146

How to get rid of the dreaded pound sign

This is my next installment of technical blog entries dealing with technology-related techniques I've created during my re-architecting of Lottery Post.  Lottery Post is built from Microsoft technologies, including ASP.NET 2.0 (running on IIS 6.0), SQL Server 2005, and Microsoft's Atlas technologies, soon to be called the Microsoft AJAX Library, ASP.NET 2.0 AJAX Extensions, and ASP.NET AJAX Control Toolkit.

This entry deals with an issue that some people may not know about, others may not care about, and the rest know exactly what I'm talking about:  the dreaded pound sign (#) in a web page URL (link).

Normally when a new URL is entered into a web browser's Address line, the browser jumps to a new page.  However, when a pound sign (plus an identifier name) is added to the end of a web page's URL, the web browser jumps to a new location within the page.

For example, if you're scrolling down a long web page and need to go back to the top of the page quickly, some pages include a "TOP" link, which takes you to the top of the page.  The way MOST web sites do that is to include a "name" tag in the HTML code near the top of the page, like this:  <a id="top"></a>  (or it could be <a name="top"></a>).  You don't actually see the tag, but it is there as a bookmark in the page.  Then, the "TOP" link is coded like this:  <a href="https://www.lotterypost.com/#top">TOP</a>.

When you click on the TOP link, it adds "#top" to the URL in the browser's Address line, and the page jumps to the tag named "top", which is located at the top of the page.  So, to the user, they have a nice feature:  a way to quickly jump to the top of the page.

But, there are a couple of annoyances with this process that as web users and developers, we have learned to live with.  The annoyances, as I see them, are:

  1. When the link is clicked and the pound sign and tag name (like "#top") are added to the URL, the web browser has actually created a new page in its history chain.  The web page itself is not reloaded, but now when we click the Back button it essentially stays on the same page, and jumps back to where we were when we clicked the TOP link.  In my view, the purpose of the Back and Forward buttons are to move back and forward between pages, not positions on a page.  So, the pound sign wrecks the functionality of the Back and Forward buttons.
  2. The second annoyance affects web developers.  When a URL containing a pound sign is examined through program code on the server, the pound sign, and everything after it, is truncated.  There are techniques for obtaining everything after the pound sign, such as this one, but most developers don't know about the techniques, or would have a hard time implementing them.
  3. The third annoyance is most dear to my heart, as the developer of the Lottery Post forum software, and that is to be able to permanently identify a link to a piece of content (in this case a forum post), and if that content is in the middle of a page, jump directly to it.  Before coming up with the technique I'll describe below, the way I did that was to add the dreaded pound sign to the end of the URL, making the page jump directly to the content when the page loads.  But that meant that a post's PermaLink (permanent link), a link that is supposed to be valid forever, has a pound sign in it.  Yuck!  A PermaLink is supposed to identify a piece of content, not identify a bookmark location on a page.  What if the user can select other formats for viewing posts, and it is undesireable to have a pound sign (jump) in the URL?  For example, what if that post is the only thing on the page?  Obviously the pound sign is not ideal in that case.

So annoyance #3 prompted me to create a new technique.  I needed a way to create a PermaLink to every forum post, without having a pound sign in the PermaLink, and I needed to create a technique that would mimic the pound sign, and have the page jump down to the post after the page loads.

The solution was pretty straight-forward, and in front of my face for a long time, but just required putting a couple of pieces together.  The genesis of the solution came from a technique I had seen to jump to the top of a page using JavaScript, without using the pound sign.

In Lottery Post, I don't use the code <a href="https://www.lotterypost.com/#top">TOP</a> to jump to the top of a page, I use <a href="javascript:scrollTo(0,0)">TOP</a>.  That JavaScript function call scrolls the browser window to the coordinates specified, in this case "0, 0", which is the coordinates of the top-left corner.  (You can see an example of this technique in action on the Pick 6 Wheels page — check out the "Top" buttons along the right side of the page.)

There are many benefits to using scrollTo() over the pound sign, including:

  • The performance is much quicker
  • In Internet Explorer you don't hear that "click" sound that indicates going to a new page
  • There is no pound sign inserted into the URL, so the Back button functionality is not wrecked
  • As a developer, there is no need to insert a <a id="top"> tag into the HTML.

The downside of using scrollTo() is that you need to know the pixel coordinates of where you want to jump to, which for a long time ruled out my usage of the function for anything other than going to the top-left (since it would always be coordinate 0, 0).

But after noodling on this for a while I came to realize it would not be such an enormous challenge to eliminate that pound sign after all.  I would need two things:

  1. A way to locate a specific element's y-coordinate on the page (since x will always be 0, the left side of the page) and jump to that coordinate, and,
  2. A way to kick off step 1 right after the page loads.

All of this would be created in JavaScript.  Since JavaScript is required in order to use Lottery Post (and most other forum web sites) anyway, this did not create any new requirements on the part of users.

So the first function I created was called ScrollToElement(), which finds the y-coordinate of the element passed to it, and jumps there.  Passing the object itself to the function is better than passing an ID and having the function lookup the element in the DOM, because (among other things) it allows constructs such as < ..... onclick="ScrollToElement(this)">.

function ScrollToElement(obj) {
   var posY = 0;

   while (obj != null) {
      posY += obj.offsetTop;
      obj = obj.offsetParent;
   }

   window.scrollTo(0,posY);
};

This is a pretty common technique.  It works by getting the y-coordinate of an object, relative to its containing element.  If the containing element is anything other than the whole page itself, it loops again, adding the coordinate of the containing element's containing element, and so on, until it reaches the whole page level, in which case the containing element is null.

Most HTML pages written will have containing elements, as they are used to create page layouts.  Unfortunately, there is no property of an element that gives its coordinates relative to the entire page, only to the containing element, so this jury-rig is necessary.

The best place to put this function is in the <head />.  Lottery Post uses its own library of common functions that is included on each page, and this function is a good one to include in there.

So now we need a way to kick it off.

First, we want to be sure that the entire page is loaded before attempting to jump to the element, because otherwise the function may run before that element is loaded, and no jump would occur.

So the first thing I did was to create a really good generic JavaScript function for adding tasks to the page's onload() event.  I can't assume that this will be the only thing kicked off when the page finishes loading.  So here it is:

function AddLoadEvent(func) {
  var oldonload = window.onload;

  if (typeof window.onload != 'function') {
      window.onload = func;
  }
  else {
      window.onload = function() {
        if (oldonload) {
            oldonload();
        }

        func();
      };
  }
};

Someone who is pretty familiar with JavaScript will be able to go through the code for this function and understand what's happening in there.  For those who aren't JavaScript hacks, it basically looks at what is currently setup for the page's onload event, and if there is currently an onload function setup, it dynamically creates and assigns a new function to onload, which calls the old function, and then calls what we added to it.  If there was nothing already assigned, it just assigns our function as the onload function.

The function can be added to the page in any of the normal methods, using the <script /> tag, preferably in the page's <head />.

Then, all that's needed is to write the AddLoadEvent() function (with ScrollToElement() as the argument) somewhere in the body of the page.  That can be accomplished using the ASP.NET RegisterClientScriptBlock method in either the page's Load or PreRender subroutine:

Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "ScrollToPost", "AddLoadEvent(function(){ScrollToElement(document.getElementById('ElementID'));});", True)

ElementID is substituted with the DOM element ID of the block tag containing the content we want to scroll to.  For example, many times <div /> tags are used to surround a post's content.  The div tag would be given an id attribute, and that id would be substituted for ElementID.

When those three pieces are put together on a page, the pound sign can finally be eliminated!

Using that technique, Lottery Post now has good PermaLinks to individual posts like this: https://www.lotterypost.com/thread/141544.htm?get=679422

Notice that there is no pound sign at the end, yet if you click the link it behaves exactly like it was there.  After the page finishes loading, the web browser jumps down the page to the post referenced in the "get=xxxxxx" portion of the URL.

This technique has great application for forum owners, but it can also be used by anyone who wants to avoid the annoyances of the dreaded pound sign.

Entry #145

Over 600,000 posts (and counting)

Lottery Post hit yet another milestone, with more than 600,000 posts on the forums.

It has been a challenge to keep the technology running smoothly as the number of posts ramps up, but I think it's been pretty good.  There aren't too many forums out there with 600,000 posts in the active portion of the database.

Once a certain quantity of posts is achieved, most forums only keep a small percentage of the posts in the active part of the database, and archive the rest.  That's done in order to keep the performance of the forums running snappy.

Lottery Post is different, in that every post made over the past 6½ years is available online, and completely searchable, together with all the current posts.  (Minus a few spam posts here and there that had to be removed. Wink)  I look at it as a large-scale database challenge.

Think about it: you can go to the Lottery Discussion forum (the one with the longest history), select the option to display "ALL" posts, and instantly jump to any of hundreds of pages of topics.  It goes to whatever page you choose with about 1 second.  Then you click in to any of those posts -- maybe a post that's five years old -- and you're looking at the post contents within 3 hundreths of a second.

That was my vision for this site a long time ago, and it's neat to see it come to pass.  I wanted to run the forum with a deep, searchable history, to create an extensive and valueable resource for any lottery player.

Also notable is that Lottery Post is approaching 20 million predictions posted.  Like the forum posts, those 20 million predictions posted by the membership are all available online.  Another technology challenge, especially in trying to calculate and re-calculate individual member statistics in real-time.

Entry #144

New version of ieSpell available

My people probably aren't aware that a new version of ieSpell is available for free download (version 2.4.0, released August 3, 2006).

ieSpell is the spell checker that Lottery Post uses in the Rich Text editor, and is accessed with the Check Spelling button .

ieSpell is an all-around awesome application which, once installed, allows you to check your spelling on any web page on any site.  You just right-click the text entry space, and choose "Check Spelling". 

If you haven't installed it, I highly recommend it.  ieSpell is free software, and completely ad-free and nag-free.

Here's the download link:

http://www.iespell.com/download.php

There have been a couple of versions released this summer, and they include the following enhancements to the software (copied from the ieSpell web site):

  • 2.4.0 (build 428) (released 3rd August 2006)

NEW - "Look up meaning" feature via right click menu for ANY word/phrase on the page.
NEW - Added more info about ieSpell in the "Add or Remove Programs" applet.
FIX - Clean up resource IDs (removing duplicates) paving way for the resource DLLs.
FIX - Bug that cause the caption of the Options dialog not to display properly.
FIX - Registration info displays in localized text after changing language.

  • 2.3.0 (build 264) (released 28th July 2006)

NEW - Allow user to change the location of the custom dictionary (either copy or move) in the "Edit Custom Dictionary" dialog.
NEW - Added persistent window placement (survive shutdown) with a user override option (default is on).
NEW - add installer switch to set a custom user dictionary location during installation.
FIX - Make Default button is no longer enabled when a selected custom dictionary is READ-ONLY.
FIX - Bug that cause ieSpell to think that a non-existent custom dictionary is read-only.
FIX - Memory leak in spell checker - options object not freed at shutdown.
FIX - Improved support for optional language packs.

  • 2.2.0 (build 647) (released 27th March 2006)

NEW - Multi-language support! The core application has been revamped to support localization. i.e. Not only will you be able to spell check in other languages, the UI itself will displayed in that language. We will be releasing language packs for the various European languages shortly. (starting with French)
NEW - Users now have the option to choose their preferred online reference dictionary to check the meaning of an unknown word.
NEW - Users can add on their own online reference dictionaries to the list provided.
NEW - Users can choose to show or hide the ieSpell items in the browser's right click context menu. (This feature is especially useful for users with multiple logon accounts on a PC as the default install only sets up the right click options for the windows account that performed the install.)
NEW - Users now have the option to remove all the custom dictionaries during the uninstall process.
NEW - Check write permissions on custom dictionaries, if its READONLY, disable the add/delete function in the edit custom dic dialog.
FIX - Checkdocumentnode does not work for INPUT type=text elements.
FIX - IE7 beta2 does not show the word highlighted until the doc is forced to redraw. This is considered a temporary fix as contents in a DIV tag are still not refreshed by this fix. We are monitoring the developments over at the Microsoft camp and will provide a more comprehensive fix closer to the IE7 launch date.
FIX - If user click on OPTIONS in the validator dialog and return to the check, they will lose the initial context (e.g. using CheckDocumentNode).

Entry #143

Browzar: Simple, Privacy-Oriented Web Browser

I came across a new web browser today that is something I'd recommend everyone get a copy of.

It is quite unique, and rather than give a long description, I'll bullet the highlights:

  • It never saves browser history, typed URLs, search history, passwords, auto-completes, or cached web pages to your hard drive.  Cookies are immediately and automatically deleted when you exit the browser.  Even if it crashes, the next time you load it, it figures out that it crashed last time, and cleans up.
  • The browser is VERY lightweight, so it does not consume a lot of memory, and can be used on just about any PC.
  • It uses the Internet Explorer rendering engine (behind the scenes), so it is compatible with just about every web site out there.  For example, Lottery Post works perfectly, and looks just like it does in IE, with semi-transparent menus, shadows, etc.
  • It does not require any installation at all.  You just save the file to your hard disk and run it.  If you want to uninstall it, just delete the file.  NOTHING else is stored on your hard drive.  No registry entries, no temp files, nothing.
  • There are versions for Windows, Macintosh, and Linux, so anyone can use it.

What are some advantages to using this web browser?

This is from their web site, and it makes sense to me:

  • You're at a friend's house and you want to check your email, download Browzar in seconds and protect your privacy.
  • You have one family computer at home that everyone shares, download Browzar in seconds and protect your privacy.
  • You are on holiday and you need to check your email from an Internet café, download Browzar in seconds and protect your privacy.
  • You're at work and looking for another job, download Browzar in seconds and protect your privacy.
  • You are at work and need to check your online bank account, download Browzar in seconds and protect your privacy.

Keep in mind that there are other ways an employer or ISP can track your computer usage, but using this browser will not leave any tracks on the PC it is used on.  So it is perfect to use from a public PC or friend's house, or any shared computer.

The fact that you can quickly download it, and that it does not need to be installed makes it perfect for the task.

What are the bad things about it?

The browser is far from perfect, even though it does many things well.  Here are some BAD things I immediately found.  There may be more, I just haven't come across them yet.

  • You can't access your Favorites (bookmarks)
  • You cannot adjust any options, other than the pop-up blocker (on/off).  So it is NOT a good everyday browser, because you can't be sure exactly what its settings are.
  • It is impossible to change its Home page, so you are stuck going to the Browzar home page every time it starts.
  • The Browzar search engine (its Home page) is a thinly-disguised advertisement network, so any searches using it are useless.  When you load the browser, the first thing you should do is get away form the Home page that comes up.
  • The Forward/Back buttons on your mouse won't work.
  • Using any multi-line text editor (including the Lottery Post editor) is strange, because nothing happens when you press the Enter key.  It does not go to the next line.  You need to press Ctrl-M to do a line break.  (The company says they are aware of the problem, and are in the process of fixing it.)
  • This web browser really has no features to speak of, so again, it is not a good everyday web browser, unless you never use any features.

OK, so here's the link to their home page:

http://www.browzar.com/

You'll find the download page very easily.  Give it a try.

By the way, this blog entry was written using Browzar.

Entry #142

Lottery seminar

Bird posted information about an upcoming seminar in the Mystical forum, so many of you may have missed it.

https://www.lotterypost.com/thread/140697.htm

He is giving two seminars on September 3rd, and there are only 30 slots available for each seminar.  So if you are interesting in attending, don't wait to signup.

You need to PM Bird to signup.

Entry #141

Support lifecycle for Microsoft products

Here's an interesting web site I found today.  It describes how Microsoft supports its products over time.

Microsoft Support Lifecycle

At the bottom there are links to various listings for each and every product, showing their current status.

For example, here's is the complete product list:

http://support.microsoft.com/gp/lifeselectindex

So, you can see things like the retirement of Windows 98.

Since just about everyone owns a Microsoft product, it is good to know that there is a place to find the up-to-date info on product retirement.

Entry #140