Monday, November 13, 2006

Geek Babe Monday - Jessica Alba

Jessica Marie Alba was born April 28, 1981, in Pomona, California. She relocated with her family (her father was in the Air Force) several times; Biloxi, Mississippi, then back to California, followed by Del Rio, Texas, and finally back to the West Coast.

Alba knew she wanted to be an actress since the age of 5. Her first film role, in the 1994 film Camp Nowhere, came her way by chance. After one of the characters dropped out of the production, dark-haired Jessica was cast as the replacement, thanks to the fact that her hair matched that of the original actress. She then ventured onto the small screen, with commercials for Nintendo and J.C. Penney, and a recurring role in Nickelodeon's The Secret World of Alex Mack.

Following Nickelodeon, Jessica was cast as Maya in the 1995 series Flipper. While working with dolphins on the television series, Jessica was cast in the disastrous film Venus Rising, as well as the 1996 made-for-TV movie Too Soon for Jeff and an episode of Chicago Hope.

1998 was filled with television appearances, including a recurring role on the primetime soap Beverly Hills, 90210, Brooklyn South and The Love Boat: The Next Wave. As for film, audiences could catch Jessica in P.U.N.K.S. (aka Rebels), Never Been Kissed, and Idle Hands.

With Jessica's growing popularity and her exotic looks, it's no wonder that James Cameron cast her as the lead role in his television series, Dark Angel.
Jessica Alba in The Fantastic FourJessica Alba Swimsuit
Jessica returned to the scene with the title role in 2003's Honey. After her role as stripper Nancy Callahan in 2005's Sin City, Jessica starred in Into the Blue and Fantastic Four.

2007 promises to be a busy year. Jessica will be seen in a slew of movies: Saw IV, The Eye, Sin City 2, Fantastic Four: Rise of the Silver Surfer, Good Luck Chuck, Awake, Bill, and The Ten. Whew!

Friday, November 10, 2006

Counting Active Users in ASP

Although I have specifically addressed global.asa, I have written about it in the How to Filter out Bad Bots in ASP with Global.asa post. This method of keeping track of active users also uses the global.asa file along with an application variable. Put this in your global.asa:
<script language=vbScript runat=server>

sub session_onStart()
application.lock()
application("SCount") = application("SCount") + 1
application.unlock()
end sub

sub session_onEnd()
application.lock()
application("SCount") = application("SCount") - 1
application.unlock()
end sub

sub application_onStart()
' don't need a lock in onStart()
application("SCount") = 0
end sub
</script>
The, on any page you want to display the count, put
<%
Response.Write "Users Online: application("SCount")
%>
This method isn't 100% accurate and does have a few pitfalls:

It creates a "hotspot" during application.lock() that can cause delays when a new visitor arrives

You have no control over whether users launching new windows will trigger new sessions which will increment the count

You are constantly holding and modifying an application variable in memory, though you rarely use it

You need a modified copy of global.asa for each application, and have to aggregate different sites/applications separately

Nevertheless, for a quick and easy and mostly accurate way to count the number of active sessions, this will work.

Tuesday, November 07, 2006

Errors When Trying to do Response.Redirect

Ever tried to do Response.Redirect and get the following error?
Response object error 'ASP 0159: 80004005'
Header Error. The HTTP headers are already written to the client browser.
Any HTTP header modifications must be made before writing page content.
When calling response.redirect, you have to execute it BEFORE any client-side code, including the opening <html> tag.

This usually isn't a problem in IIS 6 (Server 2003) because in IIS 6 the default setting for Response.Buffer is True by default. This means the server holds the page content until it's all ready to go and then sends it to the client. If Response.Buffer is set to True, you can call Response.Redirect anytime before the page is complete and it will work.

In older versions of IIS, Response.Buffer is set to False by default. This means content gets sent to the client as the page is executing. In this scenario, you'll get an error if you try to execute Response.Redirect anytime after content has been sent.

The fix? If you're in a version of IIS older than IIS 6, set Response.Buffer = True at the top of the page.

Another error you can get when using Response.Redirect is Object Moved. One way to prevent this from happening is using Response.Clear first (note that buffering must be enabled). At the top of the page:
Response.Buffer = true
Before you call Response.Redirect:
Response.Clear
Response.Redirect "http://www.domain.com"

Monday, November 06, 2006

Geek Babe Monday - Erin Gray



This is a late post, since I was a little under the weather yesterday and didn't make time to post. Missed last week too....

This post might more rightly be called Retro Geek Babe Monday. Erin Gray was one of the first models to successfully crossover into television. She is best known as "Kate Summers" on the highly watched TV show "Silver Spoons" (1982), and (the reason for her status as a Geek Babe) Colonel Wilma Deering on the TV show "Buck Rogers in the 25th Century" (1979).
Erin Gray - ModelErin Gray - Col Wilma Deering in Buck Rogers

Erin Gray was born on January 7, 1950 in Honolulu. Gray moved with her family from Hawaii to California when she was eight years old and graduated from Pacific Palisades High School. She was fifteen when a chance meeting with Nina Blanchard, head of one of Hollywood's top model agencies, convinced her what she wanted to do in life.

Moving to New York, she became one of the town's most sought-after models, in elite company with Farrah Fawcett, Veronica Hamel and Susan Blakely. TV viewers encountered her commercials for Breck, Max Factor, Clairol, Camay Soap and RC Cola, and a classic spot for English Leather cologne in which she provocatively delcared, "My men wear English Leather - or they wear nothing at all!"

Between modeling assignments, she studied acting with well-known coach Warren Robertson and when movie-TV offers came in, she was ready. Universal was impressed by her performances on such series as "Police Story" and "Gibbsville" and signed her to a seven-year contract. Under that pact, the studio co-starred her as a tough-minded newspaper reporter in Irwin Shaw'sEvening in Byzantium (1978) (TV).

Her performance scored with both critics and audiences, and led directly to the role in "Buck Rogers in the 25th Century" (1979). As a result, she has become a regular commuter between Hollywood and New York, the hub of the magazine and fashion world.