Author name: Yang Yang

Hello, I'm Yang. I build online businesses that please people. Want to join in and post some useful articles on Kavoir.com? Shoot me a message.

Linux: Change Directory or CD to the Previous Directory / Last Path

cd is the command in Linux to change the current working directory. While you can change to your home directory by cd ~, you can change to the previous directory or last directory you were in by: cd – Which would come very handy when you are working across multiple directories back and forth. To …

Linux: Change Directory or CD to the Previous Directory / Last Path Read More »

How to prevent or stop my website and pages from being indexed by search engines?

It’s really weird that one would like to do this but perhaps you are running some private website dedicated to just an intimate group. Anyway, you can stop search engines indexing your web pages by putting a meta tag in the header section of them: <meta name="robots" content="noindex" /> That’s it. Any search engines abiding …

How to prevent or stop my website and pages from being indexed by search engines? Read More »

How to redirect the visitor to another page or website?

This is one of the most common tasks in website development and also one of the most frequently asked question according to some of the keyword research tools. Well, you have 3 ways to achieve a web page redirection. Use PHP header() function to modify and send a HTTP Location header: header("Location: /thankyou.html"); // redirect …

How to redirect the visitor to another page or website? Read More »

The Planet Coupon Promo Code for 50% – 70% Off Dedicated Servers

Overture: Apply this Rackspace Cloud promo code to get $25 rebate / refund discount of the Rackspace Cloud managed hosting. Read some reviews of them. Update: I’m very pleased to warn you that this The Planet dedicated server coupon code is so UNIQUE and POWERFUL that it gives an incredible discount on the plan Dual …

The Planet Coupon Promo Code for 50% – 70% Off Dedicated Servers Read More »

Linux: Check how much disk storage each directory takes up (Disk Usage command – du)

The Linux command du stands for disk usage which is used to check the amount of disk storage any particular directory or file is using. By default, the simple command: du Would return the disk usage in God-knows-what-unit of each of the directories in the current working directory and those beneath them — in a …

Linux: Check how much disk storage each directory takes up (Disk Usage command – du) Read More »

MySQL: How to change or convert MyISAM to InnoDB or vice versa?

After we have discussed the advantages and disadvantages of MyISAM and InnoDB, you might want to convert them back and forth and see the performance differences yourself. For small website, the difference may be minor but for a large popular application, MyISAM tables yield better performance results in selecting data records InnoDB tables give better …

MySQL: How to change or convert MyISAM to InnoDB or vice versa? Read More »

MySQL Engines: InnoDB vs. MyISAM – A Comparison of Pros and Cons

The 2 major types of table storage engines for MySQL databases are InnoDB and MyISAM. To summarize the differences of features and performance, InnoDB is newer while MyISAM is older. InnoDB is more complex while MyISAM is simpler. InnoDB is more strict in data integrity while MyISAM is loose. InnoDB implements row-level lock for inserting …

MySQL Engines: InnoDB vs. MyISAM – A Comparison of Pros and Cons Read More »

PHP, JavaScript: Stop and prevent others from framing your site or web page

Though it does increase traffic and the pageviews, it doesn’t feel quite good with someone who’s loading your website or page as a part of theirs in the form of a <frame> or <iframe>, leeching your content as part of theirs. To prevent them from loading your pages this way, and make the visitor browser …

PHP, JavaScript: Stop and prevent others from framing your site or web page Read More »

CSS: How to align HTML input checkbox and radio with text on the same line?

The common HTML form input controls of checkbox (<input type=”checkbox“>) and radio (<input type=”radio“>) can be tricky to be aligned correctly in the same line with the text or image across all modern browsers. Without any CSS styling, they usually place themselves 3 or more pixels above or below the normal text flow which look …

CSS: How to align HTML input checkbox and radio with text on the same line? Read More »

Please, by all means, don’t use overflow:hidden for content!

No matter how fairy or pretty your design / template is, never use overflow:hidden for content containers. Content comes a thousand times more important than any design or layout. I don’t care how much you hold proud your artistic work and how you think accommodating the content in any way possible would ruin the holy …

Please, by all means, don’t use overflow:hidden for content! Read More »

CSS: Set width on inline elements with inline-block

With display:block elements we can freely set the hard width of them. However for inline elements, width:200px simply won’t work at all. One approach is to float the element which usually causes other problems and isn’t handy at all. So how to set width to inline elements without floating them in CSS? The answer is …

CSS: Set width on inline elements with inline-block Read More »

CSS: Curved or Rounded Corner Boxes and Images Using border-radius

In CSS3, border-radius is the rule you would use to achieve curved corner borderlines, but for now, IE and Opera doesn’t support this trick. With a little script help in the form of a .htc, you can make a cross browser compatible rounded corner box such as a <div> or an <img>. -moz-border-radius: 9px; -webkit-border-radius: …

CSS: Curved or Rounded Corner Boxes and Images Using border-radius Read More »

Linux: How to find all the files containing a particular text string?

At Linux command line, to find a particular text string in all the files from the current directory recursively (that is, including all those files from the child or grandchild directories), use something like this via SSH: find . -exec grep -l "needle" {} \; This command searches through all directories from the current directory …

Linux: How to find all the files containing a particular text string? Read More »

How to make IE6 to style HTML 5 tags?

HTML 5 comes with a bunch of new tags that IE6 cries that it doesn’t know them, thus refusing to style them according to the CSS. To baby-sit this stupid browser one last time, adding these JavaScript lines in the <head> of your web page that utilizes HTML 5 tags: <script> document.createElement(‘header’); document.createElement(‘nav’); document.createElement(‘section’); document.createElement(‘article’); …

How to make IE6 to style HTML 5 tags? Read More »

PHP: Session ID changes automatically at every request / page load

Ideally the initial session id will remain the same throughout a session unless the developer has explicitly asked PHP to change it by the session_regenerate_id() function or the session_id() function. However, there’s a slight chance that you may encounter this problem of automatic changing session ID upon every new request when you are developing things …

PHP: Session ID changes automatically at every request / page load Read More »

CSS: Rotate Text / Image Elements by 90, 180 or 270 Degrees

As a quick digest of this article by Jonathan. You can literally rotate any HTML element by a certain degree with CSS, be it text or image or something else. After testing across a few modern browsers, the only one that’s not supporting this rotation technique is Opera. The CSS rules you need for a …

CSS: Rotate Text / Image Elements by 90, 180 or 270 Degrees Read More »

Scroll to Top