| Subcribe via RSS

College Pick ‘Em: Coin Toss Version

August 17th, 2010 | No Comments | Posted in Bin

I decided as random as the outcome of collegiate football games, I’m going to leave it up to fate to decide my picks.
More »

Reading #hash Variables in URI

June 1st, 2010 | No Comments | Posted in Bin

Most of the time when you have a # (hash) symbol in the URI, the functionality is simply to point to an anchor on the page. This is handled by html and the functionality of your browser. In more advanced situations, this variable can be read by JavaScript to do other things like change content or tabs, or maybe even use some fancy script to scroll you to a point on the page. In the case of usability, knowing the hash variable in your PHP code can be extremely useful.

More »

My Experience with NetBeans

May 18th, 2010 | 5 Comments | Posted in Bin

I recently wrote about my switch to phpDesigner as my IDE. Since the article, I have received several comments/feedback telling me I should try NetBeans. I had already installed it once before and didn’t like it, but I couldn’t remember why. So, I thought I’d try it again, except this time, document my experience!

My favorite feature about phpDesigner, and the primary reason why I use it over any other IDE is it’s ability to take files in my project, wrap em all up and create the intellisense for all my classes, functions, methods, and constants, INCLUDING phpDoc comments in my code hints. And as I mention in my article, phpDesigner does this really fast! Even when reading a project off a network drive.
More »

Extended CodeIgniter Loader Library

April 9th, 2010 | No Comments | Posted in Bin

I’ve been trying to make contributions wherever I can to CI and one handy thing I’ve been using is an extended CI Loader Library. It adds 2 features:

1. The ability to alias auto-loaded models and libraries.
2. The ability to load a model or library from another CI application on the same server.

Here’s the link to the forum post with all the details:
http://codeigniter.com/forums/viewthread/151827/

If you just want the code, here’s the link:
http://solepixel.pastebin.com/6DHpxXuz
More »

Longest Spades Game Ever!

December 3rd, 2009 | No Comments | Posted in Bin

The past few months or so, I’ve been playing Spades online at MSN Games Zone. I like it SO much better than Yahoo. Well, they’ve got this version called Whiz. Basically the rules are same as normal Spades, however when you bid, you must bid either the number of Spades in your hand or Nil. I really enjoy this game, almost a little too much. So tonight I got in a room with 3 others and little did we know what was sort of game we had gotten ourselves into. I can’t remember the stats exactly, but it was a 2050 rated player paired with a 1600 rated player, vs. 2200 and 1480. This game went 50 rounds of rediculous back and forth setting and missed nils. It took so long the other 3 players dropped out before it ended. I pasted the scores here.
More »

Nested Sub-folder Controllers in CodeIgniter

November 1st, 2009 | 1 Comment | Posted in Bin

If you have gotten to the point where one sub-folder for your controllers just isn’t enough, you probably found a frustrating problem in CodeIgniter. Whether or not MVC Frameworks are supposed to allow nested sub-folders is debatable, however I like the organization. This post solved my problem (very simply) and I got right back to developing:

Multi Level Subfolder Controller in CodeIgniter
http://glennpratama.wordpress.com/2009/10/20/multi-level-subfolder-for-controller-in-codeigniter/

Thanks Glenn!

Switching IDEs! CodeIgniter Users Should Too!

October 18th, 2009 | 4 Comments | Posted in Code, PHP

I don’t know about you, but changing IDEs is a major thing for me. As my development skills have progressed over the years, I have been looking for more ways to take advantage of the development software I’ve been using. I am constantly wanting to improve my development experience and trying to find ways to speed up programming. Well, this past week, I basically did an assessment of Dreamweaver and here are my conclusions.
More »

PHP Function for URI and URI Segments

September 3rd, 2009 | 1 Comment | Posted in Code, PHP

Here’s a function I wrote to parse through the URI to get segments. I wrote it to use with CodeIgniter to get URI segments before they had been altered and “-” gets changed to “_”. It can be used in any application.
More »

Our First Big Fight

August 26th, 2009 | No Comments | Posted in Bin

I’ve been using CodeIgniter for the past 6 months or so and while we’ve had our minor indifferences, I’ve thought of CodeIgniter to be a pretty decent PHP MVC. There was very little learning curve for me and we hit off quite easily. We were like peas and carrots. Unfortunately, as go most relationships, I knew this “new love” wouldn’t last forever.
More »

Remap function for CodeIgniter

July 26th, 2009 | 1 Comment | Posted in Bin

I got tired of looking for this code in other projects so I wanted a handy place to keep it.

PHP:
  1. <?php
  2. function _remap($method)
  3. {
  4.     if (method_exists($this, $method)){
  5.         $this->$method($this->uri->segment(3));
  6.     } else {
  7.         $this->index($method);
  8.     }
  9. }
  10. ?>

In case you're wondering, this function is a reserved method in CodeIgniter controllers that will allow for a dynamic method name to be passed into the URL. Docs on it are here: codeigniter.com/user_guide/general/controllers.html#remapping.