iPhone screen shots made easy

If you have the new 2.0 software, follow the diagram below to take a screen shot of the current screen on your iPhone.

Press and hold the home button and the screen on/off button together. The screen will flash, and the image will be added to your camera roll, so you can download it or email it off. Great for remembering your settings!

Josh Highland + TechZulu.com

Oh man! I’m really excited about this. Last time I was behind a mic was a long time ago (unless you count my podcast).

My friend James Johnson runs the .NET User Group for the Inland Empire. He was having a special program to showcase some of the most valuable members of the .NET community in the Inland Empire. It was a pretty big deal, where were over $40,000 in prizes being given away to the winners.

TechZulu.com, a great site that covers tech events in Southern California, were going to be at the awards filming interviews with the participants and sponsors. One snag, all of their corespondents for TechZulu were on assignment. James hit me up and asked me if I could fill in and be a guest correspondent for TechZulu. He didn’t have to ask me twice (James blogged about it here).

The people that we interviewed at the event were very cooperative and had a lot of good things to say,  Efren from TechZulu is a great guy, and way fun to hang out with. I’m excited about the type of things he is doing to bring attention to tech in so. cal. Im glad I got to help contribute to their efforts. I’m going to try to make it to some of the event they have on their calendar

I was also very impressed by the .NET user group itself. It was great to see that many developers in the Inland Empire coming together to build a strong community. I was born in the Inland Empire, and have lived here all my life, and worked as a developer here. I think that the IE has a wealth of tech resources, so it makes me happy to see people like James Johnson and Efren of TechZulu taking the time to bring attention to developers in the IE.

Watch the interviews from the Inland Empire MVM Awards on TechZulu.com

100 Gigs of MP3s

It finally happened after I added the new Anniversary album, I have over 100 Gigs of music in my iTunes!

I’m very strict when it comes to my music. Minimum 192 kbps. I’ve made posts before about how to create good mp3 files through iTunes.

I’m just excited to break the 100 gig mark. My iPhone only holds 16 gig, but it’s nice to know I can listen to music for over 45 days and never hear the same song twice!

Excess, what’s that!

php sprintf + sql like

Sometimes I do my best programming when I’m tired. Don’t ask me why, I just do. It’s a skill I picked up in college.

Being tired and producing good code wasn’t the case last night. I was trying to use the sprintf PHP function with a SQL “Like” statement. I made some dumb mistakes that tripped me up for a while. Hopefully someone out there will find this post and help them not make the problems I made, sleepy or not!

Normally the LIKE is used in mysql like this:
SELECT name FROM users WHERE name LIKE 'J%';

That would get all names including: Josh, Jason, Jimi, etc.
In a SQL Like statement the % is a wild card, so the command is to match everything starting with “J”

Now when you use the sprintf() function it looks kind like this:
$query = sprintf("SELECT name FROM users WHERE name='%s'", $searchString);
The %s will be replaced with the value of $searchString

Trying to combined them is where I had some problems….

At first I tried to do something like this:
$query = sprintf("SELECT name FROM users WHERE name LIKE'%s'", $searchString);
didnt return what I was looking for at all, it had no wild cards in it!

Then I tried this:
$query = sprintf("SELECT name FROM users WHERE name LIKE'%s%'", $searchString);
didnt work either, this time it threw errors

But this worked great
$query =
sprintf("SELECT name FROM users WHERE name LIKE '%s'", $searchString . "%");

So the moral of the story is, if you want to use a SQL Like statement, appent the wildcard for the Like statement to the string to be inserted by the sprintf funtion.