22 Dec 08 _ Fond Farewell: Casey Moves On


By tyler
in Friends, Office

Casey DSee that guy up there, his name is Casey. He’s been our lead programmer at work for over two years now. He started a month or so before I did at here and no one had any idea how awesome he’d be, and how much he’d revolutionize what we do with our websites and business. Read the rest of this entry »

Spread the Word:
  • Slashdot
  • Digg
  • Facebook
  • Reddit
  • del.icio.us
  • StumbleUpon
  • Technorati
  • NewsVine

12 Dec 08 _ What is the #twittersecret?


By Christopher
in Just for Fun, Pop Culture

Okay. So by now you’ve heard all the buzz about the big #twittersecret (read: “Twitter’s Secret” for you non tweeting types), and you’re wondering what’s going on. What is this big secret that everyone is clamoring to know? I’m afraid you’ll be a little let down if you’re not a die-hard twitter fan. So I’ll let you down gently…

Twitter’s big secret involves Direct Message (DM) tweeting, which is sending a tweet directly to another tweeter without posting to the entire tweeting public. Apparently, when DMing you’re allowed 115 extra characters to tweet with… that’s a full 255 characters for DM tweeting. Wow.

This is big news to the tweeter community who are used to the regular 140 character limit on tweets. Here’s the message (sent as a DM in twitter) that reveals the secret:

“So here’s the secret: A couple of days ago @davidson & @lebrun discovered that DM’s don’t have to be just 140 characters. That’s right | this is where it should have ended but it didn’t did it? No actually you can send up to 255 characters.” (source)

This is likely to be because the cell phone text message (SMS) limit is also 255 characters, and many people have twitter set up to send text messages to their cell phones. Why not offer people the extra 115 characters?

So who started this #twittersecret anyways? Was it a marketing attempt by an entrepreneurial tweeter? Did they know that you would be so intrigued that you would click a TinyURL link in hopes of uncovering it?

Well, now that you’re here be sure to check out the rest of our website! And now you know the secret.

Spread the Word:
  • Slashdot
  • Digg
  • Facebook
  • Reddit
  • del.icio.us
  • StumbleUpon
  • Technorati
  • NewsVine

14 Nov 08 _ MySQL Transactions With CakePHP 1.2


By casey
in CakePHP, Casey's Corner

Whew, been a while since I’ve posted something useful.

Hopefully, everyone is aware of MySQL transactions and how useful they can be.  They come in especially handy when you want to save multiple related entries into different tables in your app.  Cake actually already uses this in a behind the scenes way with the Model::saveAll() function, which does some of this for you (you can read more about saving your data with saveAll() here).

But you can easily use Transactions for anything you want to do.

Note: for this to work at all you have to make sure whatever table you’re using transactions with are of the type InnoDB, and not the standard MyISAM type.

ALTER TABLE table_name type=InnoDB;

Ok, in your model, set the variable:

var $transactional = true;

Then, in a function you want to use transactions, call the datasource object:

$db =& ConnectionManager::getDataSource($this->useDbConfig);

Then, before you start interacting with the database, you call:

$db->begin($this);

If your action is successful, run:

$db->commit($this);

Or, if there’s a failure, you can roll back your DB with:

$db->rollback($this);

Note that your DB will automatically rollback if there’s not a commit() command anyway.

In the course of a Model class, the usage of these functions could look something like this:


class YourModel extends AppModel {

var $transactional = true;

function someCoolModelAction()
{

  # Grab DataSource Object #
  $db =& ConnectionManager::getDataSource($this->useDbConfig);

  # Start Transaction #
  $db->begin($this);

  /* SQL or Model Functions for whatever you need to do go here */

  # If your database interaction was successful, then commit the changes to the Database ( I'm assuming there is some boolean
  # variable, $successVar, that describes whether the action was successful or not).

  if ($successVar === true) {
       return $db->commit($this);
  } else {
       # If it wasn't successful, rollback any changes and you're good #
       $db->rollback($this);
       return false;
  }
}

}

As you can see, it’s pretty easy. And cool.

Spread the Word:
  • Slashdot
  • Digg
  • Facebook
  • Reddit
  • del.icio.us
  • StumbleUpon
  • Technorati
  • NewsVine

13 Nov 08 _ Real Life Tutorial: Removing Cream Cheese From Apple’s Tiny Keyboard


By tyler
in BlogTorials, Food & Drink, Just for Fun

No Cream Cheese

We love our tiny, shiny Apple Keyboards (aside from the ridiculous USB placement/depth). We also love eating lunch at our desks. Today happened to be one of those days where lunch somehow ended up on my glorious keyboard. It could have been worse (soup). It could have been better (soft dinner rolls). But it was a bagel with cream cheese. Face down.

It wasn’t pretty, and rather than taking photos of the incident (depressing and poorly lit) I’ll walk you through how to remove a slightly messy substance from a slightly ridiculous keyboard. Read the rest of this entry »

Spread the Word:
  • Slashdot
  • Digg
  • Facebook
  • Reddit
  • del.icio.us
  • StumbleUpon
  • Technorati
  • NewsVine

20 Oct 08 _ WordPress Permalink Redirect (Archive 404)


By Katy
in BlogTorials

After upgrading our AWP Blog to WordPress to 2.6 (we are eagerly awaiting the 2.7 visual transformation, by the way), we noticed in the shuffle our Permalinks got messed up. For example, searching for my post div align top center, which is #1 right now, Google gives us blog.awpny.com/archives/206 (not a permalink). Following that URL used to get us to our 404 Error page. Whoops! Not so great for SEO ratings, not to mention reader frustration!

WordPress doesn’t automatically redirect your old permalinks to the new permalinks, unfortunately. The permalink for the above post is http://blog.awpny.com/2008/03/position-a-div-element-absolute-and-align-it-top-center/. I did a little research. More than a few people have been frustrated with this problem, as you can imagine. I discovered this plugin Permalink Redirect WordPress Plugin. It works perfectly! Thank you Scott Yang’s Playground.

Simply download & install the plugin. Edit the plugin settings (under Settings>Permalink Redirect). For our blog, in the ‘Path pairs to redirect from and to’ box, I used:

[from] /archives/%post_id% [to] /%year%/%monthnum%/%postname%/

And now, Google search results take me to the post, rather than a 404 Error page!

Spread the Word:
  • Slashdot
  • Digg
  • Facebook
  • Reddit
  • del.icio.us
  • StumbleUpon
  • Technorati
  • NewsVine

Download Full Movie Online Abilify Meet the Spartans download movie Enter the Dragon download movie Congo download movie Airheads download movie Canvas download movie Cashback download movie Heavenly Creatures download movie Finishing the Game: The Search for a New Bruce Lee download movie The Level download movie Wyvern download movie Little black book download movie In a dark place download movie Munich download movie Broken bridges download movie Shiloh 2: shiloh season download movie Scooby doo meets batman download movie ringtones for go phones uploading free ringtones make your own ringtones samsung awesome ringtones where to get free ringtones for att Meet the Spartans download movie Enter the Dragon download movie Congo download movie Airheads download movie Canvas download movie Cashback download movie Heavenly Creatures download movie Finishing the Game: The Search for a New Bruce Lee download movie The Level download movie Straight-Jacket download movie Deathline download movie Kung Pow: Enter the Fist download movie Showtime download movie Lean on Me download movie The Story of Anyburg U.S.A. download movie Tinker Bell download movie Under Siege download movie Killing Ariel download movie Street Trash download movie Smart People download movie Crimson Tide download movie Donald's Tire Trouble download movie The Donor Conspiracy download movie The Bank Job download movie The Final Conflict download movie The Lookout download movie Footlight Parade download movie Outside Providence download movie New York Stories download movie In the Heat of the Night download movie Taxi Driver download movie Carry on at Your Convenience download movie My Boss's Daughter download movie The Black Gestapo download movie 8MM 2 download movie Texas Rangers download movie