Archive for September, 2008

SourceForge Web Hosting Account Changed

Friday, September 26th, 2008

A few days ago I found that I could’t login to my SourceForge web hosting with SFTP. I thought the SourceForge broke down and I sent a feedback to the support team. But unfortunately, no replies. And many other project administrators report this problem.

Yesterday I read the site documents and finally I knew why. SourceForge changed the site documents and said the account of SFTP had been changed. Now the account username is “USERNAME,PROJECT-UNIX-NAME” and the host name is “web.sourceforge.net”. For example, my project unix name is “gchart” and my username on SourceForge is “ggggqqqqihc”, therefore, I need to use “ggggqqqqihc,gchart” as the SFTP username.

You can use Filezilla to login the SourceForge web hosting.

Site Changed

Tuesday, September 23rd, 2008

I changed this blog directory today. At first, the blog address is http://programmingnote.com/ and today I moved it to “blog” directory. So now its new address is http://programmingnote.com/blog. The reason I did it is that I want to install some scripts on this site. If the blog (WordPress) is installed in the root directory, managing files is not an easy work. So I decided to move the WordPress blog to a new sub-directory.

The homepage, http://programmingnote.com is very clean and simple. I added a Google custom search to the homepage. You can use it to search all my articles from this blog, Deepblue Spaces and some other sites.

Function Overloading in PHP 5

Tuesday, September 23rd, 2008

Function overloading means using one function to do more than one kinds of work. For example, there is a class whose name is “Container”. The container class maintains an array. It has a function called “add”. You can use “add” function to add some items to the class. The argument may be a single object or an array. i.e. $c->add(35) and $c->(add(array(35)) are the same. How to do it in PHP? (more…)

Adding Python CGI support to Apache

Tuesday, September 23rd, 2008

The reason I start to learn Python is to play with Google App Engine. So I think I should learn Python web programming. I need to add Python support to my Apache server. Someone recommanded me to use “mod_python”. But unfortunately I can’t install the mod_python correctly. Therefore, I have to use Python CGI. (more…)

I am Going to Learn Python

Tuesday, September 23rd, 2008

A few days ago I knew Google App Engine. A free service for hosting your own web application. App Engine uses the server farm of Google. So I think it is very stable and safe. However, up to now App Engine only support Python language. I knew a little about Python several years ago, but at that time I am not very interested in it. Last month I made a survey, most of people think that Python is the most interesting programming language. I believe it is true.

Although it is said that Google App Engine may support PHP and other languages. I don’t want to wait until the day comes. If I start to learn Python, after some days I can play with App Engine. I wish Python would give me more nice feelings.

Starting Emacs with Windows Script

Tuesday, September 23rd, 2008

Emacs is a classic editor in Linux/Unix world. However, it can also run on Windows. For Windows users, ntemacs is a good choice. What I don’t like is: Emacs needs the environment variable “HOME”, and it looks for its configure file “_emacs” in the “HOME” directory. I don’t like setting environment variables because it may cause conflicts. If there is a method so that I needn’t set any environment variable, I can avoid this problem. Lukily, I found the solution: Windows script. (more…)

GChart 0.1 Released

Tuesday, September 23rd, 2008

GChart is my first open source project. It took me about two weeks. GChart is a PHP library for data charts using Google Chart APIs. What is Google Chart API? According to the Google official document: (more…)

I Start to Use CVS

Tuesday, September 23rd, 2008

I start a project on Sourceforge.net. The project is a PHP library for drawing data charts using Google Chart API. The best thing is that Sourceforge provides many useful services for development. CVS hosting is one of them. Now I am woking on Windows, I downloaded a CVS client called WinCVS. I found that using CVS can make programming interesting. (more…)

How to Use "gzip" to Compress a File

Tuesday, September 23rd, 2008

This is a very short note for “gzip”. “gzip” is a standard compress utility in Linux operating system. It can compress a file. Unlike WinRAR or WinZip in Windows, gzip isn’t suitable for creating an archive files which contains many files and directories (this is “tar” task).

To compress a file, e.g. foo.txt, use ‘gzip foo.txt’. It will generate a file whose name is foo.txt.gz. However, the original file, foo.txt, will be removed. To uncompress a gzip file, use ‘gunzip’. e.g. after executing ‘gunzip foo.txt.gz’, the ‘foo.txt.gz’ will be replaced by ‘foo.txt’.

Sometimes I don’t hope gzip delete my original file. For example, if I have a file named “foo.img” and I want to backup it. I can use the argument “-c”:
gzip -c foo.img > foo.img.gz

Here, “-c” means put the compressed file to the stand output device, normally it is the screen. Then I use a redirect symbol “>” to specify the output file. In this way, the original file won’t be deleted.

How to Use SimpleTest

Tuesday, September 23rd, 2008

SimpleTest is a unit test framework for PHP. As its name, it is simple, easy to use. You can create many test cases with its help. Since I planned to develop a PHP library for Google Chart API. I decide to use SimpleTest to test my program. (more…)