IE And Firefox CSS Compatibility Problem

There are many differences between firefox and IE in terms of parsing CSS file and rendering web page.

When I built this site, I suffered the pain, that when I designed a HTML page with a CSS style, it looks pretty fine in Microsoft’s IE but terrible in Firefox. Here is an example, people often use nested “<div>” tag in their HTML file and so do I. If you also do such things and hope people have good experiences when browse your website using Firefox you should be careful with your CSS style design.

Continue reading “IE And Firefox CSS Compatibility Problem”

Update my CSS style

It is really complicated, I think, at least for me! I havn’t learnt CSS before, therefore, it took me lots of time to change the default CSS style to the current one.

Here is some useful site that I visit on a regular basis :

456 Berea Street
A personal blog that concerns CSS.
W3Schools
Huge resources including CSS tutorial with examples, quizzes, references in this offical site.
HTML dog
HTML and CSS Tutorials, References. This is the first site I refered to when I plan to study HTML and CSS.

Recommend a Website Host

I just find a website host service called dreamhost by accident when surfing on the internet. I am not using their service at present, but I think I will plan to transfer my site to dreamhost. (update: I am using their service now) The “Crazy Domain Insane!” level hosting cost $7.95/mo–as I know, it is not expensive,If you enter a promotion code when you sign up, the price will be much lower!

Continue reading “Recommend a Website Host”

How to Install MovableType on Windows

MovableType is a very popular blog platform and having seen lots of publishing system, finally I choose this one.
It tooks me about 3 hours to install the Movable Type in my Windows xp machine while it just took me much fewer time in Linux. I’d like to record the steps for other’s reference. It is also a good resource for myself if I need to rebuild the server.

Continue reading “How to Install MovableType on Windows”

Notes of Introduction to Algorithm(Order Statistics)

The ith order statistic of a set of n elements is the ith smallest element. For example, the minimum of a set of elements is the first order statistic (i = 1), and the maximum is the nth order statistic (i = n). The asymptotic running time of the simple problem of finding a minimum or maximum is Θ(n). Yet select the ith smallest element appears more difficult but it also only need Θ(n) time.

Continue reading “Notes of Introduction to Algorithm(Order Statistics)”

Basic Operations on Binary Tree

Binary Tree is the most often used Data structure in the programming world and is also the basis of other complex data structures. So as a Computer Science student, it is very important to understand it thoroughly. The following paragraph is quoted by Standford Univ.’s Website explaining Binary Tree:

A binary tree is made of nodes, where each node contains a “left” pointer, a “right” pointer, and a data element. The “root” pointer points to the topmost node in the tree. The left and right pointers recursively point to smaller “subtrees” on either side. A null pointer represents a binary tree with no elements — the empty tree. The formal recursive definition is: a binary tree is either empty (represented by a null pointer), or is made of a single node, where the left and right pointers (recursive definition ahead) each point to a binary tree.

Continue reading “Basic Operations on Binary Tree”

Notes of Introduction to Algorithm(Exercise 2.3.7)

The problem is:
Describe a Θ(n lg n)-time algorithm that, given a set S of n integers and another integer x, determines whether or not there exist two elements in S whose sum is exactly x.
Solution:
1.Sort the elements in S using merge sort.
2.Remove the last element from S. Let y be the value of the removed element.
3.If S is nonempty, look for z= x – y in S using binary search.
4.If S contains such an element z, then STOP, since we have found y and z such that x= y+ z. Otherwise, repeat Step 2.
5.If S is empty, then no two elements in S sum to x.
Step 1 takesΘ(n lg n) time. Step 2 takes Θ(1) time. Step 3 requires at most lg n time. Steps 2–4 are repeated at most n times. Thus, the total running time of this algorithm isΘ(n lg n). The following is my implement code:

Continue reading “Notes of Introduction to Algorithm(Exercise 2.3.7)”

Select maximum and minimum using 3*(n/2) comparisons

It is not difficult to devise an algorithm that can find both the minimum and the maximum of n elements using Θ(n) comparisons. Simply find the minimum and maximum independently, using n – 1 comparisons for each, for a total of 2n – 2 comparisons.In fact, at most 3(n/2) comparisons are sufficient to find both the minimum and the maximum in the array of size n.We compare pairs of elements from the input first with each other, and then we compare the smaller to the current minimum and the larger to the current maximum, at a cost of 3 comparisons for every 2 elements.

Continue reading “Select maximum and minimum using 3*(n/2) comparisons”