Tag Archives: java

Singleton Pattern


Design patterns are reusable solutions to common software engineering problems. They are best-practice in software design. It is not easy to apply them, and it often happens that pattern misuse may lead to bigger problems, a good design supported by patterns will last and give you less headaches. Examples in PHP and Java are given.

Singleton is a creational pattern (creational patterns deal with object creation mechanisms) which restricts instantiation of a class to one (and only one) object. We’ll discuss it in 3 chapters:

Tagged , , ,

Matlab 7 under Windows 7

If you have trouble installing, switch to “Windows Classic” theme under “Personalization” (should be done automatically). After the installation, we need to setup Matlab to use the newest Java version instead of the supplied one.

  1. Download and install the latest jre version
  2. Go to C:\Program Files\Java (or C:\Program Files (x86)\Java)
  3. Copy the folder name jre6 to <Matlab-installation-dir>\sys\java\jre\win32
  4. Go to <Matlab-installation-dir>sys\java\jre\win32
  5. Open the file named jre.cfg
  6. Instead of (in my case 1.4.2), write 6. Now Matlab will use jre6 instead of jre1.4.2.

Matlab should start now without problems.

Tagged , ,