James Revillini

Say 'no' to styrofoam.

Month: April 2012

Video Contest Photo Shoot

Photographer: David Archambault / ‌Hair+Makeup: Lindsay Stovall / ©2012 David Archambault

These images were taken of Alizabeth Louise and myself by friend and photographer David Archambault. They will be used to make posters for this year’s short film festival at Tunxis.

A Hike with Marc

It was a bit chilly and certainly mushy in parts on account of the bizarre snowfall the day before, but the hike in the Winsted Woods, which has entrances at Gilbert High and traces along old route 8 North, was scenic and enjoyable. Both Marc and I got a chance to break in and test out our new hiking boots (he in Scarpa’s and I in Columbia’s). We were both pleased with the results. We forgot to jam to some Van Morrison’s Into the Mystic, which has been on my mind lately, when we arrived home, so I’ve included it below to play if you wish.

 

Parse an uploaded CSV file in 2 lines in PHP/CakePHP

Nasty but gets it done:

or, if you want to be even more crazy, in 1 (note, config options are inline but I left the assignments so they are findable):

or, if you want it to be one expression, but more readable:

In the examples above, I’m assuming you already know the temporary name of the uploaded file. In regular PHP, you could prepend this code with

In CakePHP, you might just replace $tmpname with $this->data[‘Whatever’][‘csv’][‘tmp_name’];
This kind of assumes you had done something like this on the form page:

© 2017 James Revillini

Theme by Anders NorenUp ↑