May 2008 Archives

Just got the news about MT 4.2 rc release.

It looks like a small upgrade for new features.
Let us have a close look about it.

  1. A faster and more efficient user experience
  2. More design options and our simplest and most powerful templates yet
  3. The best, most effective anti-spam solution

In the first feature, the most important is described as below:

Completely Rewritten Search - Movable Type's venerable built-in search system has been rewritten from the ground up to be modernized, much more flexible, and lightning-fast. Now it's easy to create custom-filtered views of your content.

MT-search is heavy CPU load script on my host.
If the new search can solve it, I would like to keep use it instead of Google Search.

It announced that Common tasks in Movable Type 4.2 are up to 100 times faster.
Do you believe it?

Indoor HDTV Antennas

| No Comments | No TrackBacks

There are some free-on-air HDTV channels in the big city, such as Vancouver and San Francisco.


Requirements:
1) HDTV with ATSC

An ATSC tuner, often called an ATSC receiver or HDTV tuner, allows reception of ATSC digital television (DTV) signals broadcast over-the-air by TV stations in North America and South Korea. Such tuners may be integrated into the television, VCR, digital video recorder, and set-top box which provides audio/video output-connectors of various types.

2) HDTV Antennas
I prefer Indoor antennas.
It is a list of Indoor TV Antennas for HDTV

3) HDTV TV station/channel
Digital Television/HDTV Channel List in San Francisco Bay Area
(within 100 miles of San Francisco)

Now new HDTV set with HDTV programs.

Let's see some hacker skills on Google Search.
Enter following query into Google Search box.

inurl:"viewerframe?mode=motion"

google_hack_1.gif

Click any results, you will see the real-time webcam.
google_hack_1.1.jpg

This is the quick link here.

There is a great highlight tool written by javascript.
syntaxhighlighter is a Google code project.
It is easy to use and looks perfect.
The following are some examples.
1) PHP script
//
// Pull the array data from the lang pack
//
$j = 0;
$counter = 0;
$counter_2 = 0;
$faq_block = array();
$faq_block_titles = array();

for($i = 0; $i < count($faq); $i++)
{
	if( $faq[$i][0] != '--' )
	{
		$faq_block[$j][$counter]['id'] = $counter_2;
		$faq_block[$j][$counter]['question'] = $faq[$i][0];
		$faq_block[$j][$counter]['answer'] = $faq[$i][1];

		$counter++;
		$counter_2++;
	}
	else
	{
		$j = ( $counter != 0 ) ? $j + 1 : 0;

		$faq_block_titles[$j] = $faq[$i][1];

		$counter = 0;
	}
}
2) CSS script
.tag1{
font-size: xx-large;
color: #6588c7;
}
.tag2{
font-size: x-large;
color: #5578a7;
}
.tag3{
font-size: large;
color: #4568a7;
}
This code project covers C++ C# CSS Delphi Java Java Script PHP python Ruby Sql VB XML/HTML.
Let's discuss how to use it in MovableType.

I alway want to have a US Bank account for some reasons. Do you want it?
As a Canadian, I can visit US any time without Visa.
Let me tell you the reason why Canadian needs a US Bank account.

I do buy some stuff from eBay. More and more seller just sell item to US or ship to US address only. The most big issue is they just accept the payment in confirmed address. That means I have a Canadian Paypal account. I can not buy anything as a gift to US address. You may ask why not buy it from a Canadian seller. The answer is less Canadian seller on eBay.
If I have a US Credit Card with US billing address, I can link it to my new US Paypal account and make it as confirmed address. Then I can buy or sell in USA.

And also some online merchants, such as Amazon, has two sites. One for US customers, one for Canadian customers. If I use a user account in amazon.com, I can make an order and ask them ship it to Canada. It accepts Canadian credit card and will ship the orders to US address. If I want some books, I have to use amazon.ca site. You know, the price on these two site are different. The international shipment may tax related.

And some online merchants, do not accept Canadian credit card.

That make me think about to have a US credit card and a cheque account.

The following is the real-time chatting between CSR of Bank of America and me.

Watch TV online - TVU

| No Comments | No TrackBacks

Just know this site and service and software, TVU networks

You don't need to sign up. Just download the client software and launch it.

There are hundreds channels can be watched through it.

Of course you need the high speed Internet to keep TV video smoothly.
A typical TVU channel has a bandwidth of 280-400; channels with bandwidth under than will usually be of lower quality. Channels with a bandwidth of 400-550 will be high-quality. Channels with bandwidth over 550 can work well, but only if the broadcaster and the viewers have very high-speed Internet connections.

I watch ROC President Ma's speech live yesterday. Good video quality of TVBS-N.


I have a Home Server at home.
It should have following functions:


  • Printer server;

  • Fire sharing server;

  • AMP server, including Apache, MySQL, PHP for testing purpose;

  • P2P client to download something for fun with web interface;

  • Backup server, to backup the files on the desktops in home lan.

P2P software, I use aMule.

Backup, I want to use Restore, but failed. They don't have the release for Ubuntu 8.04. Someone said it is good on 7.10.
A lot of request for the 8.04 version posted on its forum. I have to wait for the new one.

The way to install Restore is here:
http://distro.ruffdogs.com/restore/


I tried to install SP3 on my wife's Compaq desktop. It has Windows XP Home Edition.

In the first time. I installed SP3 within the Windows Updates. When it restarted after the installation, it did not boot normally. It failed and auto-rebooted, then stay in the boot menu.
I can boot in the Safe Mode.

So I remove the SP3 and downgrade it in Safe mode.

I don't know what's wrong with SP3 or this Compaq.

Later I Googled a guide tell me the problem is created by HP (Compaq).

First problem, affecting AMD-based computers with OEM images, primarily HP Desktops

Just like Compaq Presario SR1520nx. It has AMD Sempron 1.8 GHz CPU and SIS chipset.

To double check the problem, do the following steps.
You may not see the error code because the computer reboots too fast. ( Just like me)To force the computer to stop when it crashes, you need to set an option during startup. To do so, hit the F8 key during restart right when you see the black Windows XP screen come up. Then select the "Disable automatic restart on system failure" option, as shown below:
Disable-Automatic-Restart.jpg

Microsoft Updates for May 2008.
3 Critical Updates


  • Vulnerabilities in Microsoft Word Could Allow Remote Code Execution (951207)


  • Vulnerability in Microsoft Publisher Could Allow Remote Code Execution (951208)


  • Vulnerability in Microsoft Jet Database Engine Could Allow Remote Code Execution (950749)

1 Moderate update
Vulnerabilities in Microsoft Malware Protection Engine Could Allow Denial of Service (952044)

Click your Windows Updates from you IE to get these updates.

This morning, The official death toll climbed to 14,866, as rescuers pulled at tangled chunks of buildings for signs of life on Wednesday.

Hundreds of thousands of troops, firefighters and civilians raced to save more than 25,000 people buried across a wide swathe of southwest Sichuan province under collapsed schools, factories and hospitals after Monday's 7.9 magnitude quake.

China government send the first request for help to other country, Japan.

China has asked Japan for aid after an earthquake killed nearly 12,000 people and Tokyo is set to provide an initial $4.8 million in cash and goods, the Japanese foreign minister said on Tuesday.

Japan itself suffered a devastating earthquake in Kobe in 1995 that killed more than 6,400 and caused an estimated $100 billion in damage.

The United States, Britain, the European Union, South Korea and Taiwan have also offered assistance since the disaster, which came three months ahead of the Beijing Olympics.

The International Olympic Committee on Tuesday said it had decided to donate $1.0 million and the United Nations also offered support.

I got China Earthquake news just after it happen. I was surfing at 1:00AM (PST) May 12.
My friends from China send this news through MSN and QQ.

News Site reported that it is in Wenshui(汶水), Sichan(四川).

I tried to contact my friend, XiaoQing, right in Sichan. I tried different ways, such as cellphone, MSN, QQ. Even the VOIP Phone.

I sent a SMS to him through VOIPstunt.

In the morning May 12, I sat in the office and check the message. He send a message to me . Said he is OK now.

He left the building and stay out side from 2:30 PM and whole night in the park. No sleeping.
I contact him yesterday night. He is in the office. When we were chatting, he said, it shakes again, I have to go off the building. His office is in the third floor.

Later, he left the message. The company he works announced that everyone take the vacation until next announcement.

The official Xinhua News Agency said the death toll exceeded 12,000 in Sichuan province alone, and 18,645 were still buried in debris in the city of Mianyang, near the epicenter of Monday's massive, 7.9-magnitude quake.

My friend, Awflasher, has a very detailed post with photos and videos.

To help the people on my homeland. I make a donation to them through Canada Red Cross.
I can not do it yesterday, because Red Cross site is under maintenance. I do it this morning. redcross-china-earthquake.jpg

If you want to do something, you can make a donation to help them.

I have a WordPress blog running on the old version, v2.13.

There are some updates between them.

I upgraded it last week. It is not difficult to upgrade WordPress 2.5.1, but following steps should taken to avoid crash.

1) Backup data: backup database and export everything from WP.

2) De-active all plugins.
I have following plugins.
Akismet, ExtendedLive Archive, Get Recent Comments, Google Site Maps, Sideblog, Simple Tag, and wordpress stats.

3) Backup all physical files.
I SSH the hosting server and tar all files.

I changed the theme of this Blog.

The purpose is to make it display faster and looks clear.

I removed some gadgets on the side column. Change the color to emphasize the good stuffs I recommend.

I also add a Google search to replace the search provided by Movable Type.

I received email from my Hosting provider, Dreamhost. It said my load is over the limit.
mt-search.cgi has one of the biggest problems.
Spammer is so strong. I have to stop using mt-search.

Anyway, Google Search is good. I do like it and it is my first choice in Search Engines.

You may like it or not. If you have any comments for this theme change, just leave it below.

Now PHP 5.2.3 is installed on Dreamhost. If you don't know how to do it, just refer to my previous post, Install customized PHP5 on Dreamhost.

Let us see how to add Zend Optimizer support on your own PHP installation.

1) Go to Zend official site. http://www.zend.com/

2) Find and download the Zend Optimizer 3.3. You may need sign an account to download it. To install it on Dreamhost, you may choose Linux x86 (32bit) (TAR.GZ) | 9.74MB | 3.3.3 package.

3) I suggest to download it through SSH.
wget http://downloads.zend.com/optimizer/3.3.3/ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz

4) Decompress it.

tar xvfz ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz

5) cd ZendOptimizer-3.3.3-linux-glibc23-i386

6) We use complied ZendOptimizer so file.

cd data/5_2_x_comp

7) There are two files.
ZendOptimizer.so is the complied file.

8) Copy this file to the PHP installation folder.

cp ZendOptimizer.so ~/jiuan4/php5/lib/php/

Now ZendOptimizer 3.3.3 installation finished.

9) To enable ZendOptimizer, you need to edit your domain's php.ini file.

cd php5/etc/php5/youdomainname

10) Edit php.ini file.

vi php.ini

Install a customized PHP5 on Dreamhost can help you to make php work better and work more. That means you can add more extension on it.

Let's go to the details of installation.
Install/Compile PHP 5
1) Copy the PHP5_installscript (see the last portion of this post) into a text editor and replace YOUR DOMAIN HERE on the 4th line with your site's domain name. For example your domain is abc.com, you need to add it same as it.
2) Copy the new contents to your clipboard.
3) Log in to your account using SSH, create a new folder as temp and cd temp.
4) Create a new file in your SSH by entering the command:

vi installscript

5) Hit i for insert mode, then right-click to paste your clipboard (the install script) contents, then hit Esc, type :wq (that's 'colon', 'w', 'q'), and press Enter to save and exit.
6) Make the file executable by entering the command:
chmod +x installscript

7) Run the script by entering the command:
./installscript

8) After it has finished you will need to edit your htaccess file appropriately. Add the following:

Options +ExecCGI
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php.cgi

<FilesMatch "^php5?.(ini|cgi)$">
Order Deny,Allow
Deny from All
Allow from env=REDIRECT_STATUS
</FilesMatch>


to a file called .htaccess and place it in the root folder of your domain you specified above (/home/YOUR USERNAME/YOUR DOMAIN HERE/.htaccess)

I have a post tell you how to install PHP 5.2.0 on Dreamhost in Chinese last December.

aMule is a replacement of eMule on Linux.

My request is to running aMule on Ubuntu server without monitor. I have to use web interface to control it.

SSH to Ubuntu server.
Runing following command to install amule-common and amule-daemon

sudo apt-get install amule-common amule-daemon

After finished installation, modify the configuration file to make it accept web control.
open /etc/default/amule-daemon
Make it run.

Open ~/.aMule/amule.conf
There is a setting for webserver.
Find AcceptExternalConnection, set it to 1.
Find ECPassword, set the password for web connection. But it is not the password itself, it is a MD5Sum value of password.

The question is how to get the MD5Sum value of password.
You can use a php page to generate a MD5Sum value by md5() function. Or use the command below.
echo -n yourpassword | md5sum | cut ' ' -f 1

After that, run amuleweb -w to make a setting file for amuleweb.

The last step is sudo /etc/init.d/amule-daemon start
aMule is running as a service.

Connect the aMuleweb through the post 4711.
So the web address is looks like http://yourserver:4711/

Joomla! is a wonderful open source CMS. But the performance of content on Search Engine Results is not good enough.

Some SEO (Search Engine Optimize) hacking should be taken to make it better on SERP.
The first one is H1 tag.

Joomla does not take H1 on it template. So the Search Engine can not find the important part of the page.

To add H1 on the page title, article title, you need to do following html hack.
Use whatever html editing tools you like, I use Dreamweaver now.
The template files are sitting here.
\website root\components\com-content\views\frontpage\tmpl\default_item.php
\website root\components\com-content\views\article\tmpl\default.php
\website root\components\com-content\views\category\tmpl\default.php
\website root\components\com-content\views\section\tmpl\default.php

Find "contentheading"
Then add <h1> </h1> around the heading tag.

Save them and upload them to site.

When you browse the page after H1 hacking, the title will looks bigger than before.
You can also use css to add H1 style for them.

I have a script file used in cron jobs.
I create and edit this file on Windows 2000. The editor is UltraEdit.
When I finished editing, I upload the file to Dreamhost by FTP.

I tried to use it through SSH command.
It failed with following error notes.

:bad interpreter: No such file or directory

I double checked the file by vi editor. It looks OK.

Do you know why? Let's go back to today's topic. Dos format and Unix format of text file.
The file I created is DOS format. The script running well on my Dreamhost when I convert it to Unix format.

dos-unix-format.gif

It is all DOS format fault.

FLV Video Quality

| No Comments | No TrackBacks

There are many video formats in computer world. Say MPG, WMV, AVI, MP4, The FLV is a video format played by flash player, which is installed almost 99% of computers all over the world.

Video quality of the different formats widely vary. MPG compression is quite bad, a thing from the past. Regular FLV, WMV and MP4 have a similar, decent quality/ filesize performance. Quicktime 7 introduced a superior new codec (H.264) in 2004, which is used in MP4 and MOV files. Flash Player 8 introduced a similar impressive new codec, the ON2 VP6. And the latest Windows Media (version 10) has the excellent VC-1 codec. What does this mean? If you use one of these newer codecs you get great video quality at small filesizes, but since the software is less widely adopted, it's possible that your visitors first need to upgrade their plugin.

The only weak point of the flash player is that it solely supports its native FLV format, so you'll have to convert your existing videos to the FLV format. MP4 support is on it's way as well, but the required plugin version hasn't spread yet.

To make a better quality of FLV video. The following instruction are suggested.
1) Rescale the source (720x540) to (480X360) or 320x240 to an uncompressed intermediate file.
2) Use the 2-pass VBR converter, use a keyframe for every 2 seconds (50 frames) for video with little motion up to a keyframe every half second (10 frames) for video with a lot of motion.
3) Bitrate for the video: 200 - 1000 kbps. Audio is set to 32, 64 or 96 kbps mp3. 32 for just speech, 96 for cool music.

The price of gas is 130.2 cents per liter.

Vivian took the picture on the way to Costco last Saturday.
gas130.jpg

And this week, I saw the new high record, 132.0.

Some news paper said it will be 150 on summer.

If you install new Joomla! 1.5.2 on your server, you get the 'Welcome to the Frontpage' title on your Frontpage. Sometimes, it is difficult to find, where you can change this title.

Go to your Joomla! 1.5.2 Administration site and login. In your administration site go to:

* Menus - Main Menu (now you are in: Menu Item Manager: mainmenu).
* Click on 'Home' link to edit this link (you are now in: Menu Item: Edit).
* Click on Parameters System in the right side and change or delete the Page title.
o If you change the Page title, changed title will be displayed on your Frontpage as a title.
o If you delete the Page title, Menu link will be displayed on your Frontpage as a title (in the present case 'Home' will be displayed as title, because 'Home' is the name of the link to the Frontpage).
o If you don't want to display any title, set Show Page Title below Page title parameter to 'No'.
* Don't forget to save changes.

During last two nights, I tried Ubuntu 8.04 server on my old computer.
Ubuntu 8.04 Long Term Support (LTS) Server Edition

The computer which I installed server on is used as my main desktop before. It has AMD CPU and mobo 7 years old and two old Harddisk, one 60G, one 40G. I put 3 memory modules, total 1,536M, or 1.5G.

The performance is good.

I would like to make it as my Home Server with following features.


  • File server for desktops and/or laptop in future.

  • Printer server, attached by Samsung printer.

  • Media server, with capacity for MP3, Video files.

  • Web Server for testing purpose.

The installation is very simply, no more words to say.

About this Archive

This page is an archive of entries from May 2008 listed from newest to oldest.

April 2008 is the previous archive.

June 2008 is the next archive.

Find recent content on the main index or look in the archives to find all content.

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.21-en

Online Tools