Thursday, March 10, 2011

CakePHP, Eclipse PHP plugin initial setting....configure .ctp file in Eclipse

I already had Eclipse 3.6 but not PHP development environment.

PHP development environment in Eclipse is called PDT.
I followed the instruction in the following page.
http://wiki.eclipse.org/PDT/Installation#From_Update_Site

Then, I wanted to use Aptana plugin.
I found the instructions in the following page.
http://docs.aptana.com/docs/index.php/Plugging_Aptana_into_an_existing_Eclipse_configuration

Now,  you want to configure .ctp(view) files in Eclipse as php files.
  • Firstly open the  Eclipse workspace.
  • Now go to Preferences from Window menu.
  • From Preference click on the General tab from the list.
  • Now click on Content-Types under General  tab.
  • On the right panel in the Content-Types, expand the Text tab.
  • Select PHP Content-Types .
  • Now click on the Add button and type the fie extension e.g. *.ctp in the content type input field.

Wednesday, March 2, 2011

Free SVN GUI Client for MacOS

I've been looking for free subversion client for MacOS.

I've downloaded SmartSVN.
79 USD for Professional version but Foundations version is free.
Just download and run the application.
It will tell you that once the trial period expires for professional version, it automatically downgrade to Foundation version.
I will update you once my professional trial period expires whether the Foundations version is usable.

Tuesday, February 15, 2011

Gimp changing the interface language back into English

So today, I installed Gimp to play with some pictures.
I'm using Vista by the way....yes...can't wait to change the OS.

Anyhow, go to C:\Users\<User Name>\.gimp-<version>
It's a hidden folder so you have to set the folder option to show hidden folders.
Delete .gimp-<version> folder.
Start Gimp, it should be in English.

Friday, February 11, 2011

Wordpress Contact Form Problem: Mail Not Sent

I've used Contact Form 7 Plugin for my website contact form.
Installation, super easy.
Sending email, super easy....but

I had this problem.
I see a response message “Your message was sent successfully” with green border, but I never receive a mail for that.
Which was exactly an FAQ at Contact Form 7 site.

I know the cause can vary according to your server.
In my case, the reason was postfix wasn't working.

So I typed the following command, and everything works fine.
sudo /etc/init.d/postfix start
sudo /sbin/chkconfig postfix on

Thursday, February 10, 2011

How to hide a page from menu in Wordpress

Since I set a static page called "Welcome" as "HOME".
In my menu, I see "HOME" and "Welcome".

Well, this is quite annoying and makes the page less professional.
I used the following plugin to work around this problem.
It let me exclude a page from showing up in menu.

Exclude Pages Plugin
http://wordpress.org/extend/plugins/exclude-pages/installation/

configuring sun-java6-jre license screen: can't press

I'm still struggling my way through with Ubuntu Linux.
I was installing java6-jdk with the following command.

$ sudo apt-get install sun-java6-jdk

Then, configuring sun-java6-jre license screen shows up.
It has <ok> but I couldn't figure out how to select it.

The solution was Press <TAB> and then Press <Enter>.

Well, this was really annoying....
http://ubuntuforums.org/showthread.php?t=657917
http://forum.nginx.org/read.php?26,120455,120455

Wordpress Admin Login Page URL

I just started using Wordpress for my friends website.
I changed a theme, then, I lost access to the Admin page.
Here's the URL.

If the website can be accessed  using the following URL
http://localhost/wordpress/

Then, the Admin login page is at the following URL
http://localhost/wordpress/wp-login.php

Monday, January 31, 2011

Where to install Eclipse on Ubuntu

I don't know. I'm not an expert on Linux system at all.
However, I found a nice post and decided to install under /opt folder.

sudo mv eclipse /opt/eclipse cd /opt sudo chown -R root:root eclipse
sudo mv eclipse /opt/eclipse cd /opt sudo chown -R root:root eclipse
sudo chmod -R +r eclipse
sudo chmod +x `sudo find eclipse -type d`
Then create an eclipse executable in your path
sudo touch /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipse
sudoedit /usr/bin/eclipse
With these contents:
#!/bin/sh
export ECLIPSE_HOME="/opt/eclipse"
$ECLIPSE_HOME/eclipse $*

http://informationideas.com/news/2008/11/16/where-to-install-eclipse-on-ubuntu/
http://flurdy.com/docs/eclipse/install.html

VirtualBox Screen Size too small: Windows Host OS + Ubuntu Guest OS

I've been using VirtualBox to run Ubuntu on my PC.
The screen size is too small.
So here's what you have to do to install GuestAdditions.


1. Start the virtual machine
2. Select "Mount CD/DVD-ROM" from the "Devices" menu in the virtual machine's menu bar and then "CD/DVD-ROM image".
3. Before installing the Guest Additions, you will have to prepare your guest system for building external kernel modules. This works similarly as described in Section 2.3.2, “The VirtualBox kernel module”, except that this step must now be performed in your Linux guest instead of on a Linux host system, as described there.

Again, as with Linux hosts, we recommend using DKMS for Linux guests as well. If it is not installed, use this command for Ubuntu/Debian systems:

sudo apt-get install dkms

4. Mount the VBoxGuestAdditions.iso file as your Linux guest's virtual CD-ROM drive.

5. Change to the directory where your CD-ROM drive is mounted and execute as root:

sudo ./VBoxLinuxAdditions-x86.run
In a 64-bit Linux guest, use VBoxLinuxAdditions-amd64.run instead.

6. Restart the system

7. After the system starts, Host Key + F (Default setting is Right CTL + F) to try out Full Screen mode.
This worked for me, and hopefully this will work for you too.

After all of this, I found a very useful post.
http://www.nerdgrind.com/how-to-increase-screen-size-or-resolution-in-virtualbox-for-ubuntu-or-linux/

YUI Theater

Here's a great source for JavaScript developers!!!
http://developer.yahoo.com/yui/theater/

Great source of links to html, css, javascript materials
http://home.comcast.net/~richarduie/


http://www.webdeveloper.com/javascript/javascript_js_tutorial.html
http://www.sitepoint.com/forums/forumdisplay.php?f=15
http://articles.sitepoint.com/category/javascript
http://www.ozzu.com/javascript-tutorials/tutorial-javascript-introductory-t86155.html
http://w3schools.com/js/default.asp

Installing OpenCV on Mac OS

Here is the official installation guide.

I'll show you how to build opencv from source using the CMake build system.

1.  Open Terminal. Move to a folder where you want to download opencv source code.

2. Type in the following commands.

$ svn co https://code.ros.org/svn/opencv/trunk/opencv
(This will download source code from repository)

$ cd opencv
(moving into the opencv folder just downloaded)

$ mkdir build
$ cd build
$ cmake ..

If you want to configure the make
$ ccmake .
(This will give you an opportunity to choose to build samples and install examples)

3. Build and install opencv
$ make -j8
$ sudo make install

Ubuntu Linux PATH problem

I was trying to build Android from source code.
http://source.android.com/source/download.html

I had to install Repo and set it to PATH.
I've been used to MacOS now but Ubuntu is not my cup of tea yet....well MacOS neither...but anyhow...
The problem was, that in ~/ directory, I find .profile and .bashrc files.
In .profile, I find the following line.
     if [ -d ~/bin ] ; then
          PATH=~/bin:"${PATH}"
     fi



So it seems this should work, however when I type "repo", the terminal doesn't recognize this command.
I went through quite a number of posts online.
And finally I found a solution.
Here, I quote
The .bash_profile file is read and executed when bash is invoked as a login shell, otherwise the .bashrc file will be read and executed.
That's why this code:
if [ -d ~/bin ] ; then
    PATH=~/bin:"${PATH}"
fi
which is located in .bash_profile, doesn't seem to work...it's not being read. But, if you enter this into your terminal:
bash --login
then all your scripts in ~/bin will execute properly for your current terminal session.
A good solution is to cut those 3 lines of code out of .bash_profile and put them in your .bashrc file. If you don't cut (or comment out) the code in .bash_profile it will be read twice since .bash_profile includes the .bashrc file.

So I followed this suggestion and it worked perfectly.
Here's the reference to the post.
It's frustrating to be a beginner....isn't it?



Thursday, January 27, 2011

Compile Error: Error generating final archive: java.io.FileNotFoundException: ..\bin\resources.ap_ does not exist.

So as the title says, this is the error I got when compiling a project I build for about a year ago.

Compile Error: Error generating final archive: java.io.FileNotFoundException: ..\bin\resources.ap_ does not exist.

Cause:
In strings.xml I had the following format arguments "%s/%s"
ex. <string name="template_user_agent">"%s/%s (Linux; Android)"</string>

Now, format arguments had to be changed to "%1$s/%2$s"

Then, the error should dissapear.

I found the solution from the following pages.


http://stackoverflow.com/questions/4437023/resources-ap-does-not-exist-when-compile-my-android-project

http://developer.android.com/guide/topics/resources/string-resource.html

http://mobile.tutsplus.com/tutorials/android/android-sdk-format-strings/