Optimal Telelicious Coding From AK To CT
 

Posts Tagged ‘Web Development’

Randomly Select Photos From a Folder with PHP

Friday, July 13th, 2007

Joe Adu asked me how he could put photos in a folder and have php randomly choose one of the photos and display them. Then if more photos are added to the folder they would automatically enter in to the rotation.

(more…)

Two Geeks, One Company: Adventex Design

Tuesday, July 3rd, 2007

So Tom pointed me to some photos from the good old days working long hours in the computer science lab at Bowdoin. I guess I always thought I was a pretty chill/normal CS kid but the truth is in the photos and I’m not going to lie, we look like total dorks. Tom’s going to kill me for putting this up here but it’s a nice segue into what we’re both doing now.

This past winter Tom and I went into the web consulting biz together under the company Adventex Design which I started back in 2000. Currently we’re working on some top secret projects which we hope you’ll be hearing about soon ;) If you or someone you know has some programming talent and experience with web applications we’d be interested in chatting with you.

IE Repeats Text In Last Float

Monday, October 16th, 2006

Are you having problems with text being duplicated at the end of one of your floated div tags? It might not really be your fault. After spending about an hour verifying that my code was in fact OK I stumbled upon an article about the IE Duplicate Characters Bug.

(more…)

Remove last comma of string in PHP

Monday, September 11th, 2006

After building a list of items in a string (ie “x1,x2,x3,x4,”) I typically find myself needing to remove the last comma. After using this for the longest time:

$str = substr($str,0,strlen($str)-1);

I found:

$str = substr($str,'',-1);

This will actually remove the last character whatever it is so be careful, for my uses it’s perfect.

I know this is not novel but it’s elegant and these are the things that make my day.

Google Mapping Added

Tuesday, August 22nd, 2006

Yeah so I’ve wasted a lot of time today and at least I have something to show for it. Google maps. They’re awesome and getting better all the time. I’ve cleaned up the photo gallery and added a google map functinality that shows the location of where each photo was taken. It was quite complicated to get this just the way I wanted but I’ll go into further detail in later posts about collecting the data and other details; for now I’m anouncing the revision of my gallery and the ability to view maps of selected albums. Click on the photo for the Acadia post or navigate to an album in the gallery and then select “View Album on a Map.”

For those of you who make posts on this site, I’m going to make sure you can upload photos and map data just as I have. You’ll then be able to include photos from the gallery directly in the posts with the g2 button in the writing interface.

PHP Session Cookie Multiple Domains

Thursday, August 10th, 2006

It is quite hard to find good information on this topic so I will include my setup and am open to critiques.

If you are looking to keep session variables for your site users who might be using multiple sub-domains on your site there is a relatively easy way to set this up though not well documented till now.

You want xxx.domain.com, www.domain.com and maybe even just domain.com to share the same session? (more…)