Ryan Rampersad
Opinions, Thoughts and Ideas - PHP, Java and Javascript
  • Home
  • About
  • Contact
Browse: Home / tip

tip

Wordpress Query Counter

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 | Leave a response

Auto Populate a Form with CakePHP

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 | Leave a response

Get remote html with CURL and PHP

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 | 2 Responses

Shuffle an Array in Java

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 | Leave a response

Recent Posts

  • Create a Branch and Switch to it in Git
  • Setting Build Path has Encountered a Problem in Eclipse
  • Queue Ajax Requests in Mootools
  • CakePHP 1.3 Helper $text truncate error
  • CakePHP – 1and1 – 500 Internal Server Error

Tags

(fluff)Grabber 2.7 2009 Apple array beta blog blogs Browser Browsers CakePHP chrome CSS Design Error Firefox fluff friends fluff grabber free Google html iGoogle internet explorer Java Javascript mac Microsoft Mootools music PHP plugin plurk program review School SEO solution string tip Tips update vista Windows windows 7 Wordpress

Search

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
QC: