the itjerk

my adventures with technology

Monthly Archives: December 2009

album of the day in php & xml

 <?php
     // load the xml file 
	if(!$xml=simplexml_load_file('sbtimeline.xml')){
	    trigger_error('Error reading XML file',E_USER_ERROR);
	}
    // generate a random number each day
	$today = date("Ymd");
	srand($today / pi());
	$max = count($xml->event) - 1 ;
	$num = rand (0,$max);
    // display random record with attributes
	echo "<span class=head>";	
	echo 'Album of the Day:<br />';
	echo $xml->event[$num]->attributes()->title;
	echo "<br />";
	echo "[html:img src=";
	echo $xml-]event[$num]->attributes()->image; 
	echo " width=150 height=150>";
	echo "<br />";
    //	convert from utf-8 to iso8859-1
	$review = iconv( "UTF-8", "ISO-8859-1//TRANSLIT", $xml->event[$num]);
	echo "<span class=item>";
    	echo $review	
?>

On the web:
SimpleXML

Advertisements

windows 7

I picked up a copy of Windows 7 Home Premium edition from DigitalRiver. The education special was indeed quite special: $29 for an upgrade edition, with the media costing an extra $13. So, I shrank my hard drive, made a new partition and popped in the Win7 disc. An hour later, I was in business.

The good news? All the hype about Windows 7 seems to be true. It is easier to navigate, it performs flawlessly, and even offered to download new drivers for my Samsung ML-1710 laser printer. I had IIS up and running my ASP/Access site in no time at all, and it runs perfectly fine on my old Dell C521, which is powered by an Athlon X2 4000 and 3GB of RAM. Still can't print from Linux however.

Oh yeah, and don't forget about "God Mode". Just create a folder with the text below and you'll be able to access hundreds of settings!

God Mode.{ED7BA470-8E54-465E-825C-99712043E01C}

dell such a deal! (two and one-half years later)


Not that I need it, but I can't stop thinking about getting a new computer ever since Windows 7 was released. The Dell Inspiron 537s Slim Desktop is a budget computer, but with an Intel E5300 Core 2 Duo processor (2MB L2, 2.6GHz, 800FSB) and a base price of $289, isn't it just too cheap to pass up?

As with any purchase, the key is not to turn a good deal into something more expensive. I could choose a faster processor: Dell offers the E7500 for $70 more. Would I really notice the faster CPU? I open web browsers, balance my checkbook, fiddle with some web stuff, and… that's about it. Home users generally have only two CPU-demanding needs: gaming and video. Since I neither game nor do any serious video/dvd authoring, why would I need to spend more money on a faster CPU? To future proof and that's about it. At any rate, a system will only run as fast as the slowest part: in this case, it's the 800MHz RAM that Dell puts in the computer. As for memory, if you have a 32bit operating system, get 4GB and no more – that's all it can physically address. But now that 64bit is standard, there's more temptation to buy more memory. By all means, buy the most computer for your money, but think before spending unnecessarily.

I found two deals for the Inspiron 537s, the first from Techbargains.com. It proposes a quad-core upgrade, but again, let's be reasonable: you must have software written specifically for a quad-core processor in order to gain any benefit from it. Sure, the OS may be multithreaded, but it's the apps that matter. Buy only if you have an application that can use those extra cores.

The other deal was from a Dell catalog I got in the mail (see the E-value Code below). It starts with the E5300 processor and adds Windows 7 Home Premium 64bit, a two year warranty and 3GB of RAM, all for $349. Pretty sweet deal, Dell. Now as I configure it, I don't want to go crazy and spend spend spend: I'll only add $19 for a media reader, as the $60 ATI 4350 video card can be bought for less elsewhere (I always recommend off-board graphics and will use the card in my current machine). Upgrading RAM to 4GB is fortunately just as cheap as buying the same dual channel kit elsewhere, so good on Dell for not ripping us off; it's $80 from 2GB and $35 from 3GB.

Two and one-half years later, do I really need a new PC? Well, this Inspiron 537s is just $404$394, has Windows 7 Home Premium 64bit, 4GB RAM, and a two year warranty. Maybe you'll see that old C521 up on eBay early next year…

On the web:
Techbargains.com
Dell.com/deals Enter E-value Code: 6F990-DDPCRN1