I can’t wait for online television to kill off cable. Cable companies run rackets and have terrible customer service.
That said, I can’t wait for online television to get it right.
I’m cheap and don’t want to pay for online television, but I will once it eclipses cable (and it is at the tipping point).
Fox is one company that is hurting the experience for those who don’t want to pay by delaying the availability of new episodes for an extended period of time. The result? Increased piracy.
The annoying thing is that the solution is already available. The value of online ads has to surpass the value of a general commercial on the old telly. With online television I get my shows when I want them, and Fox should be able to send me extremely targeted advertisements. The market will eventually realize the value of those advertisements, ergo Fox gets its money, there is less piracy, and I get my shows when I want them.
Boom.
This is the kind of simple genius I love. A seemingly complex problem solved with a simple if statement.
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!
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.
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);
?>