Wordpress on the iPod Touch

January 7th, 2009

I like to lounge on the couch and play with my iPod Touch on occasion. The biggest drawbacks are of course the touch-screen based keyboard and the relatively short battery life. But I can’t help but be impressed with the variety and quantity of applications and games available for download and purchase.

I just downloaded the Wordpress app and in fact, this post is written on and posted from my iPod Touch.

While for serious work I definitely prefer my BlackBerry Bold, for chilling out and browsing a few webpages and playing some gsmes, the iPod Touch can’t be beat.

Wordpress

December 16th, 2008

Its been a while since I did any blogging.  After my IIS-hosted ASP-based version of tumanov.com went down with an old server, I didn’t know if I wanted to just stop blogging or if I wanted to resurrect the blog, perhaps even import old entries.  After a while though, I decided to go ahead and install WordPress on my new web server, and here it is – tumanov.com hosted on WordPress 2.7, with a custom theme that you’ll be seeing me work on over the near future.  I’ve worked with WordPress quite a bit in the past, and I have to saw I’m quite fond of it.  The latest release is absolutely awesome, the developers have really implemented an impressive set of features, and the base install is especially easy to upgrade with my Fantastico DeLuxe-enabled web server. Overall I’m extremely impressed, and happy that I don’t have to be catching up with the latest and greatest by coding my own blogkit.  I’ll keep you updated.

Getting Last Insert ID with PHP and MSSQL

March 1st, 2006

I wrote about getting the last insert ID before, and gave examples for using PHP’s mysql_insert_id function and an ASP alternative that used MSSQL’s @@IDENTITY function.

Using PHP, the solution is pretty easy but required some tinkering because you don’t need to SET NOCOUNT on and off, PHP’s mssql functions seem to want to return only the last recordset anyways. So:

$q = mssql_query("INSERT INTO TableName(...) VALUES(...) SELECT LAST_INSERT_ID=@@IDENTITY");
$r = mssql_fetch_assoc($q);

Beef up the above code with your preferred abstraction layer or error handling code and $r['LAST_INSERT_ID'] will have the last insert id for you.

Here’s my previous writeup about implementing this with ASP and MSSQL, ASP and MySQL, and PHP and MySQL:

MSSQL and ASP using vbScript:

This code assumes you have an ADODB.Connection object cn which is already connected to your database. For readability I concatenate different lines of the query into a single string and separate lines for SQL Server’s sake using vbCrLf.

Dim rs
Set rs = cn.Execute( _
	"SET NOCOUNT ON" & vbCrLf & _
	"INSERT INTO TableName(Column1,Column2) " & vbCrLf & _
	"VALUES(Value1,Value2) " & vbCrLf & _
	"SELECT LAST_INSERT_ID=@@IDENTITY " & vbCrLf & _
	"SET NOCOUNT OFF")
Response.Write "Last Insert ID: " & rs("LAST_INSERT_ID")
rs.Close
Set rs = Nothing

A great explanation of this including the bizzare lore of why you have to dispable affected row counting in order to actually get the result of this double query is available in this article on sqlteam.com, which is a great resource for T-SQL development.

MySQL and ASP using vbScript

With MySQL you can execute an INSERT using cn.Execute and then as long as you’re using the same connection object, just using the LAST_INSERT_ID() statement will give you the last insert ID.

cn.Execute "INSERT INTO TableName(Column1,Column2) " & vbCrLf & _
"VALUES(Value1,Value2);"
rs.Open "SELECT LAST_INSERT_ID();",cn,0,1
Response.Write "Last Insert ID: " & rs(0)
rs.Close

MySQL and PHP

Just use the mysql_insert_id() function in PHP after you perform an insert query.

if (mysql_query("INSERT INTO TableName(Column1,Column2) " .
"VALUES(Value1,Value2);")) {
echo "Last Insert ID: " . mysql_insert_id($link); }

Tony Hawk Underground 2 soundtrack

June 6th, 2005

I first saw Tony Hawk Underground 2 at E3 this spring. Needless to say, the visuals greatly impressed me, it just seemed like a definite hit. I mean, in what other game can you skate around as a fatso in tidy-whiteys? The game is coming out tomorrow (October 5th) and is probably going to break all kinds of records for sales, its been getting advertised all over the place. One thing that’s super impressive to me is the soundtrack, which includes one of my all-time favorite bands – Atmosphere. That’s right, their single off of 7’s Travels – “Trying to find a balance” is on there. I’m really glad to see them making inroads and getting placement for their music, its freakin’ awesome. Besides Atmosphere there’s Frank Sinatra, Johnny Cash, The Living End, and tons of other great bands. Unbelievable, Activision really scored with this lineup. Here’s the full list of music on the THUG2 soundtrack:

Read the rest of this entry »

Sunkist commercial – Blackalicious – Reanimation

May 28th, 2005

sunkist_commercial_songI’ve been watching FUSE more than usual lately – simply because they are the only decent music you can get on TV nowadays. In any case, they’re playing a lot of commercials for Sunkist orange soda. And the music (their website plays it) is just too groovy to resist researching further.

After a quick google search, found out that its a song by Blackalicious from their album NIA. Its called Reanimation, and let me tell you, this is one funky pick-me-up hip-hop song. The lyrics are choice as well. Go check it out on the Sunkist Soda website – click on Sunkist TV to view the commercial I’m talking about.

The lyrics follow..

Read the rest of this entry »