Search
Categories
Ad

Archive for June, 2009

Advanced Tables

Tuesday, June 9th, 2009

Problem

I want to merge two or more cells in a HTML Table

Solution

You can use “colspan” or “rowspan” attributes.

merged cell
cell1 cell2 cell3

<tr><th colspan="3">merged cell</th></tr>
<tr><td>cell1</td><td>cell2</td><td>cell3</td></tr>
merged cell2 cell3
cell4 cell5

<tr><td rowspan="2">merged</td><td>cell2</td><td>cell3</td></tr>
<tr><td>cell4</td><td>cell5</td></tr>

Check Syntax of Apache httpd.conf

Monday, June 8th, 2009

Problem

I want to check my httpd.conf and its including files.

Solution

Try running httpd.exe with “-t” option.

Hosts file in Windows

Monday, June 8th, 2009

Problem

Where can I find the hosts file in Windows?
I want to add “me-only” domainnames since I am currently developing new web site.

Solution

The hosts file can be found at

C:\Windows\system32\drivers/etc\hosts

Fortunately, the syntax is the same as that of your familiar Linux hosts.
So you can add new entry like,

12.34.56.78     www.example.com

More Than One Classname to one HTML Tag

Monday, June 8th, 2009

Problem:

I want to add one more classnames to one HTML tag

Solution:

It is not so hard, just put all the classnames with separated by spaces, like

<div class="class1 class2 class3"> ... </div>

REXML Error on Ruby1.9

Saturday, June 6th, 2009

Symptom

I encountered an REXML Error of

Last 80 unconsumed characters

when parsing utf-8 xml strings using REXML on Ruby1.9.1.

Solution

try check encoding

puts xmlstring.encoding #=&gt; 'US-ASCII' in my case

If the return value is not “utf-8″, you can change the encoding as below.

xmlstring.force_encoding("utf-8")

By this change, REXML will parse the input with the correct encodings.