Archive for August 17th, 2007

Filed under:

The Computer That Tends Bar

Boy, it’s a good thing ‘The Love Boat’s’ Isaac is no longer on the air to see this one: He, like all of mankind in due time, has been replaced by a robot — minus the sexual innuendo, of course.

The $2,275 MyFountain is an automatic beverage dispensing system. Yes, other attempts at mechanized imbibery have come before it, but this puppy is a cut above the rest, boasting a touch screen, password and child-proofing protection, and separate lines for different types of beverages (instead of piping beer and wine down the same lines as lemonade and Shirley Temples). There’s also the ability to program it with portion control. That means Grandma can self serve herself just enough Scotch to stay buzzed and happy, but not enough to make her cranky and violent.

Best of all, MyFountain is networked, which lets it hop online to retrieve drink recipes, or place orders when the bottles get low.

Now if only you could program it to completely ignore you when you want a drink — then it would really be like a human bartender. Well, if you’re not a blond in a tube top, anyway.

From Shiny Shiny

Related Links:

 

Permalink | Email this | Linking Blogs | Comments

Filed under: , , , ,

Len Wiseman did the nearly unthinkable this summer and made me like (not love, mind you, but certainly enjoy) a fourth Die Hard film. I was mighty concerned going in that the guy would dump all over one of the greatest movie series ever made, but instead Wiseman made a solid flick with some very cool action scenes (loved that tunnel “lights out” sequence in particular). Miraculously, the movie didn’t make me cringe once. Live Free or Die Hard won’t join “The Thrillogy” in my DVD collection, but it impressed me with all the mistakes it didn’t make. I never saw Wiseman’s Underworld films, but now there’s a much greater chance I’ll queue the suckers up. And Wiseman must be feeling pretty cocky these days, (being married to Kate Beckinsale probably helps) because he’s following up LFODH with another project that could potentially tick off action fans.

The Hollywood Reporter has announced that Wiseman is in negotiations to direct the remake of Escape From New York. 300’s abbed-up hero Gerard Butler is attached to star as Snake Plissken, a role memorably played by Kurt Russell in John Carpenter’s original film and the dreary sequel Escape From LA. Ken Nolan (writer of Black Hawk Down) wrote the script for the remake, which “will combine an origin story for Plissken merged with the story of the 1981 movie.” That story, for those of you who’ve never seen the Carpenter classic, envisions a futuristic (the original was set in 1997) New York City as one big maximum security prison. When the president’s plane crashes, inmate Plissken is sent on a mission to rescue him. Carpenter will executive produce the new film. For some past Escape news, here’s a script review, Kurt Russell’s angry response to Butler’s casting and the project in general, and his later, friendlier response to the film, What say you, Cinematical readers? Wiseman and Butler — can they pull this thing off?

Permalink | Email this | Comments

Filed under:

For those new iPhone owners who have been wearing that touchscreen keyboard out by sending as many texts as your thumbs can muster, you’ve probably been greeted by an unexpectedly large box from your neighborhood carrier. For Justine, that meant receiving “over 300 pages” of detailed billing from AT&T that spelled out every single SMS (and call, we presume) sent and received. If we actually needed another reason to choose eBilling over the obvious alternative, this would definitely be it. Check out the video after the break.

[Thanks, Alex]

Continue reading iPhone bill unboxed by i-Justine

 

Read | Permalink | Email this | Comments

Office Depot Featured Gadget: Xbox 360 Platinum System Packs the power to bring games to life!

Filed under: , , , , , ,

Main market news here: Before the bell: Futures fall on funds’ suspension

Google Inc. (NASDAQ: GOOG) is testing a feature that will display comments from figures in the news alongside any stories featuring them.

Johnson & Johnson (NYSE: JJ) is suing the American Red Cross, seeking to stop Red Cross’ business partners from using the cross emblem on first aid products sold to the public.

General Motors
(NYSE: GM) and Toyota Motor Corp. (NYSE: TM) both lowered their sales forecasts for the auto industry Wednesday, saying rising fuel prices and credit market weakness had softened the automobile market.

Blockbuster Inc. (NYSE: BBI) has acquired Movielink LLC, an online film download service owned and operated by six major movie studios.

Campbell Soup Co. (NYSE: CPB) said Thursday that it may sell off its money-making Godiva Chocalatier business because the decadent sweets don’t fit with its focus on healther foods.

 

Permalink | Email this | Linking Blogs | Comments

I just don’t want to believe that they are.

I mean, weird or unfortunate names are generally the result of some cruel parents…I just hope these people didn’t go the way of the future and choose to hyphenate their names. I think these news announcements would be enough, right?

poor sap is right

yeah.

But it’s not like they’re real, right? Somebody tell me these are clever photoshops, so I can rest easy.

When I was building my extension for finding unused CSS rules, I needed a way of qualifying any href value into a complete URI. I needed this because I wanted it to support stylesheets inside IE conditional comments, but of course to Firefox these are just comments — I had to parse each comment node with a regular expression to extract what’s inside it, and therefore, the href value I got back was always just a string, not a property or a qualified path.

And it’s not the first time I’ve needed this ability, but in the past it’s been with predictable circumstances where I already know the domain name and path. But here those circumstances were not predictable — I needed a solution that would work for any domain name, any path, and any kind of href format (remembering that an href value could be any one of several formats):

  • relative: "test.css"
  • relative with directories: "foo/test.css"
  • relative from here: "./test.css"
  • relative from higher up the directory structure: "../../foo/test.css"
  • relative to the http root: "/test.css"
  • absolute: "http://www.sitepoint.com/test.css"
  • absolute with port: "http://www.sitepoint.com:80/test.css"
  • absolute with different protocol: "https://www.sitepoint.com/test.css"

When are HREFs qualified?

When we retrieve an href with JavaScript, the value that comes back has some cross-browser quirks. What mostly happens is that a value retrieved with the shorthand .href property will come back as a qualified URI, whereas a value retrieved with getAttribute('href') will (and should, according to specification) come back as the literal attribute value. So with this link:

<a href="http://rss.sitepoint.com/test.html">test page</a>

We should get these values:

document.getElementById('testlink').href == 'http://www.sitepoint.com/test.html';
document.getElementById('testlink').getAttribute('href') == '/test.html';

And in Opera, Firefox and Safari that is indeed what we get. However in Internet Explorer (all versions, up to and including IE7) that isn’t what happens — for both examples we get back a fully-qualified URI, not a raw attribute value:

document.getElementById('testlink').href == 'http://www.sitepoint.com/test.html';
document.getElementById('testlink').getAttribute('href') == 'http://www.sitepoint.com/test.html';

This behavioral quirk is documented in Kevin Yank and Cameron Adams’ recent book, Simply JavaScript; but it gets quirkier still. Although this behavior applies with the href of a regular link (an <a> element), if we do the same thing for a <link> stylesheet, we get exactly the opposite behavior in IE. This HTML:

<link rel="stylesheet" type="text/css" href="http://rss.sitepoint.com/test.css" />

Produces this result:

document.getElementById('teststylesheet').href == '/test.css';
document.getElementById('teststylesheet').getAttribute('href') == '/test.css';

In both cases we get the raw attribute value (whereas in other browsers we get the same results as for an anchor — .href is fully qualified while getAttribute produces a literal value).

Anyway…

Behavioral quirks aside, I have to say that IE’s behavior with links is almost always what I want. Deriving a path or file name from a URI is fairly simple, but doing the opposite is rather more complex.

So I wrote a helper function to do it. It accepts an href in any format and returns a qualified URI based on the current document location (or if the value is already qualified, it’s returned unchanged):

//qualify an HREF to form a complete URI
function qualifyHREF(href)
{
	//get the current document location object
	var loc = document.location;

	//build a base URI from the protocol plus host (which includes port if applicable)
	var uri = loc.protocol + '//' + loc.host;

	//if the input path is relative-from-here
	//just delete the ./ token to make it relative
	if(/^(./)([^/]?)/.test(href))
	{
		href = href.replace(/^(./)([^/]?)/, '$2');
	}

	//if the input href is already qualified, copy it unchanged
	if(/^([a-z]+):///.test(href))
	{
		uri = href;
	}

	//or if the input href begins with a leading slash, then it's base relative
	//so just add the input href to the base URI
	else if(href.substr(0, 1) == '/')
	{
		uri += href;
	}

	//or if it's an up-reference we need to compute the path
	else if(/^((../)+)([^/].*$)/.test(href))
	{
		//get the last part of the path, minus up-references
		var lastpath = href.match(/^((../)+)([^/].*$)/);
		lastpath = lastpath[lastpath.length - 1];

		//count the number of up-references
		var references = href.split('../').length - 1;

		//get the path parts and delete the last one (this page or directory)
		var parts = loc.pathname.split('/');
		parts = parts.splice(0, parts.length - 1);

		//for each of the up-references, delete the last part of the path
		for(var i=0; i<references; i++)
		{
			parts = parts.splice(0, parts.length - 1);
		}

		//now rebuild the path
		var path = '';
		for(i=0; i<parts.length; i++)
		{
			if(parts[i] != '')
			{
				path += '/' + parts[i];
			}
		}
		path += '/';

		//and add the last part of the path
		path += lastpath;

		//then add the path and input href to the base URI
		uri += path;
	}

	//otherwise it's a relative path,
	else
	{
		//calculate the path to this directory
		path = '';
		parts = loc.pathname.split('/');
		parts = parts.splice(0, parts.length - 1);
		for(var i=0; i<parts.length; i++)
		{
			if(parts[i] != '')
			{
				path += '/' + parts[i];
			}
		}
		path += '/';

		//then add the path and input href to the base URI
		uri += path + href;
	}

	//return the final uri
	return uri;
}

One more for the toolkit!

This article provided by sitepoint.com.

Filed under: ,

Apple Adds Lennon to iTunes

Though Apple still can’t quite manage to get the entire Beatles collection on iTunes yet, it has managed to get 3/4 of the solo work that came after the Beatles squared away with the new addition of John Lennon’s 13 solo albums, adding on to the solo works of Ringo Starr and Paul McCartney, which are already downloadable from the service.

It’s been tough for Apple to offer the Beatles on iTunes, thanks to a nasty lawsuit that was recently settled over the use of the name Apple, which also happens to be the name of the legendary record label founded long ago by the Beatles. The feud actually dates back all the way to the very beginning of Apple Computer, but boiled over in the last few years with the company’s move into the music industry with the iPod and iTunes.

With things on their way to being patched up, the new Lennon additions include remastered studio albums like ‘Imagine,’ concert albums like ‘Live In New York City,’ the massive ‘Anthology’ collection, and even a selection of music videos to go along with the tunes.

Albums are available in standard and Plus formats, meaning DRM (digital rights management) haters can feel free to download, providing they’re willing to cough up the extra cash to set their music free. And really, that’s how Lennon probably would have wanted it.

From Shiny Shiny

Related Links:

 

Permalink | Email this | Linking Blogs | Comments

Chak De India arrives with a bang on August 10th. The movie is a much awaited release for SRK fans. Yash Raj Films has made all possible attempts to promote the film well as its last JBJ flopped badly at the box office.

Chak De is based on the real life story of an Indian hockey […]


A nice ambient way to check sms.

The +336+, designed by Robert Stadler of the French design group Radi Designers, is a mirror that is able to receive SMS messages sent from a mobile phone. The messages appear as luminous text, running on the mirrors’ surface when one gets close to the mirror. This clever piece of design is not affordable for most of us: this limited edition (of 20) costs $10,000! If this price tag is not a problem, you can purchase the mirror at Generate - Via The Style Files.

Filed under: , , , ,

close up picture of year old rotten bacon
When I was 6 years old, I conducted an unintentional experiment on what happens to perishable food when left out at room temperature for an extended period of time. I left a thermos full of milk in my school bag over the weekend. By Monday morning, when my mom opened it, the milk had turned into a gassy, curdled, explosive concoction. She was not happy.

About year ago, Carl started his own perishable foods experiment. He put a strip of bacon and an egg into their own air-tight plastic containers and let them sit. After two months, the bacon was starting to rot and ferment, while the egg looked almost the same. Now, a year later, they are quite gross. The egg has decomposed into a murky mess, while the bacon has both rotted and petrified. The picture above is a close-up of the year old bacon. If you didn’t know it was a putrid slice of porcine, it could almost be art.

Oh, the dedication to scientific discovery! It certainly puts my 48 hours of rotting milk to shame.

Via Serious Eats

Permalink | Email this | Comments

Close
E-mail It