Archive for June, 2011

WordPress Widgets and Plugins

Jun 21 2011 Published by under Graphic Design,Web

Wanted to show some love to http://jamesbruce.me and his post that I read here. After searching high and low for a good resource that introduced how to develop widgets, I found this to be the best guide. Still working out the kinks, but I have my widgets working pretty much how I want them. Thanks, James!

No responses yet

I Bought the Airline

Jun 20 2011 Published by under Uncategorized

Wallpaper inspired by the quote from Inception. Not available in widescreen, because I’m jealous of people with widescreen monitors. If you want it in widescreen, buy me a widescreen monitor.

No responses yet

Tiling Backgrounds from Photoshop Fills

Jun 17 2011 Published by under Graphic Design,Web

When doing web design work, I often throw a fill over top of a background to give it some texture. The problem is, I didn’t know what resolution that the repeating texture Photoshop supplied was. For anyone else interested in taking a Photoshop fill and using it as an HTML element in their design work, the fills are normally 200×200 pixels. Boom.

No responses yet

First PHP Project

Jun 10 2011 Published by under Technology,Web

Today I wrote a script that allows you to input a single string of text separated by commas and outputs that text with line breaks where the comma was. It works whether or not there is a space between the comma and the next item.

I was inspired to write this because I had a long string of data separated by commas that I wanted to insert into individual rows in a spreadsheet rather than individual columns.

The website http://www.tizag.com/phpT/fileupload.php was a great resource when learning how to interact with user given input.

There are two parts to the code – the first HTML page that takes the input and then the second php file which contains the script that does the magic.

Example input: one,two,three (or: one, two, three)
Example output:
one
two
three

Here is the code:

<?php
$text=$_POST['text'];
$i = 0;
$match = ',';
$index=0;
for ($i = 0; $i < strlen($text); $i++ ) {
  if (($text[$i])==$match) { //finds the next comma
    echo substr($text, $index, $i-$index);
    echo "<br>";
    if ($i+1==' ') {        //checks to see if there are spaces after commas
    $index = $i+2;         //stores new index to use as starting point for substring 
    }
    else {
    $index = $i+1;
    }
  } 
  
}
// In case the last item doesn't have a comma following it
echo substr($text,$index,strlen($text)-$index);  
?>

No responses yet

Tressel

Jun 02 2011 Published by under Sports

George Dohrmann had a goal in mind when writing the article featured in Sports Illustrated recently. That goal was to publicize the NCAA violations that happened under Jim Tressel. He would not dare leave anything on the table.

In the end he believed to have enough evidence to claim that 28 players had violated NCAA rules without appropriate punishment. 28. That is 2.8 players a year for 10 years at one of the, if not the most, prominent football programs in the country. 2.8 players out of a 105 man team. Less than 3% of the roster.

Tressel is being crucified nationally because on average 3 out of 105 guys every year decided to make a choice that violated a silly NCAA rule. Believe it or not, not all of the guys that play football are angels.

No responses yet