By Ryan on September 14, 2009
I like to read over my blog posts from time to time, especially at the older entries since they always make me laugh. I have noticed a lag between the request time and complete rendering. Aside from the mass use of css and javascript from theme and plugins, I thought it’d be a good [...]
Posted in Tips, Wordpress | Tagged counter, query, tip, Wordpress
By Ryan on August 14, 2009
Using CakePHP to auto-populate forms is a great way to save your time when developing your applications. Here is an example of some code that isn’t going to auto-populate the form in my view file.
public function edit() {
if ( !empty($this->data) ) {
$this->User->save($this->data);
[...]
Posted in PHP | Tagged cake, form, PHP, populate, tip
By Ryan on November 7, 2008
I often have the need to fetch some HTML from a website and then parse some information out of it. The more popular the site is, the less likely the standard file_get_contents function will work properly. Sites like MySpace and Facebook block PHP’s user agent totally and return a page explaining that you need a [...]
Posted in PHP, Tips | Tagged curl, enhancement, PHP, tip
By Ryan on October 13, 2008
One thing I miss most of all is the ease of messing with arrays. In PHP, there are no distinctions between types, so any data can be in any array. In Java of course, things are very different. If you want an array of numbers, it needs to be an int array. If it’s an [...]
Posted in Java, Tips | Tagged Java, shuffle, tip