Emergency Aid for Chinese Earthquake: Need 2,6 million Tents right now!

First, here is the information on New York Time on how to help:
China Disaster Relief: How to Contribute
Suddenly receive message from Google China Adsense team, says that the earth quake victims in central China need at least 2,600,000 tents. A shock massive earthquake rocked central China province Sichuan on 12th, May. Due to non-stop raining on the area, the situation of the victims is very worrying. There are about 600,000 tents in need in Mianyang Beichuan where sheltered many victims there. Read the rest of this entry »

WordPress problem: Url encoding on Tag’s slug.

When you define or assign tags in WordPress, here is what WordPress does:

1. Every tag must have a name.

2. Every tag must have a slug, the url of the tag.

3. By default, WordPress will automatically generate the tag slug based on the name of the tag you entered.

4. However, if either the value of the tag name or the tag slug is new, then WordPress will consider it is a new tag in the system.

So, a problem will arise, when your blog has non-western language characters or terms been used as tags. Read the rest of this entry »

Curl better than simplexml_load_file when web screen scrapping

As in my previous post, I briefly introduced how you can use SimpleXML object to load various web services’ API query urls, if you so choose to mashup a website with data provided by the various websites, such as YouTube and Amazon. Of course, the pay off comes when you use some affiliate code in your query, such as the famouse Amazon’s ECS and you did a pretty well job on your page layout & design, and seo to attract many visitors to you sites. Read the rest of this entry »

How to use SimpleXML parsing XML data with namespace and CDATA

There are many social network websites (e.g. YouTube) and big brand websites(e.g. Amazon, Yahoo) use REST or SOAP or even RSS web services to provide the enormous data for developers. Using these data, we can build a website virtually with no own database at all, all the information are come from these big sites. The nice thing is that, virtually all of the data returned for your web service client request are a XML data stream. So, we can use the nice PHP5 built in SimpleXML object to parsing the XML data stream, and format the representation of the data according our own website needs. However, the XML data format vary from site to site, some of the XML data returned from the sever, includes namespace and CDATA; if this is the case, you need find a way to access a sub item in the XML data use the same ” -> ” syntax. Read the rest of this entry »

The philosophy of life

Life, I think is like a hyper-speed train running on a hyper-speed railway track, and you are the driver; plus you also have the ability to control which railway track you want to travel on. Time passes by so fast; things happen. What if one day you realize that your life is running on a wrong track? Or you just doubt and say to yourself “Maybe my life is not heading to the right direction?”
Of course, just realize above questions already required the person has done some considerable thinking about life. So, let’s just say we want to use this “hyper-speed-train-running” metaphor( and personally, I really think it is a “so Good” metaphor :) ), what you would do if you decide that your life is indeed heading into the wrong direction?
Read the rest of this entry »

Zend PHP5 certification Exam study review 12: supplementary III

Ok, this is the last part of my reviews. This post listed some WEIRD and STRANGE questions I found in the phparch’s simulator exam. You may think these are some advanced features of the PHP5 language, but some of them are actually mention in the GUIDE also. However, some of the questions, I found that there maybe some errors in the question itself; in this case, I marked with the “*” in front of the question. Therefore, some of the answer I gave maybe not right, or maybe I get the meaning of the questions wrong. So, if you have any comment on this post, please feel free to comment or send me a message. Thanks!

Read the rest of this entry »

Zend PHP5 certification Exam study review 11: supplementary II

In this and the up-coming Post, I listed some extra questions I found during I took the phparch’s Vulcan Zend PHP 5 Certification Testings. This post listed some EASIER but will not be frequently asked in the actual exam I think. But, they are worthy noted here, they can also serve as check points for you previously learned knowledge.

Read the rest of this entry »

Zend PHP5 certification Exam study review 10: Supplementary I

Since I mentioned before, I didn’t included the Language Basic and Function topics in these series of reviews, because I think you should already have a good knowledge about them. Anyway, if you have more time, then you can following this post to review some of these features in PHP. It mainly includes PHP’s String(since it is so important), Array, and Function feature; also, it contain some extra information just I think worthy to be reminded.
Read the rest of this entry »

Zend PHP5 certification Exam study review 9: OOP Design&Theory

Here is the second topic regarding the OOP paradigm. Trust me, read more about Design Pattern, don’t just for pass the exam sake. The exam regard to the Design Pattern and general OOP theory is very basic. Anyway, following I listed some basic Design Pattern may tested in the exam. Also, I think you should look into the SPL(standard PHP Library) and PECL(PHP Extension Community Library) and PEAR(PHP Extension and Application Repository).

Read the rest of this entry »

Zend PHP5 certification Exam study review 8: OOP In PHP 5

Object Oriented Programming is the norm in modern software programming. Sadly, prior PHP4, PHP lack a great OOP language support. PHP5 changes all that. That’s why the Exam has two topics especially regarding this area: the actual OOP feature in PHP5 and OOP design and theory. This post is a brief review on PHP5 OOP feature, you will spent some time on OOP in PHP if you are a well experienced structure-style programmer in PHP4 I think. OOP is actually easier once you shift you ideas around :) . Because, in life, not in one moment, we are not dealing with OBJECTS.

Read the rest of this entry »

Pages (6): « 1 2 [3] 4 5 6 »