Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What is the best algoritm for displaying a very special html table

7 views
Skip to first unread message

Tony

unread,
Apr 22, 2013, 7:51:49 AM4/22/13
to
Hello!

All these bridges below must be opened when a vessel must pass that's why we
talk about bookings.
Each booking consist of three parts. These are ö,v and c.
Each ! is a DateTime in format yyyy-MM-dd hh:mm
In the table below I have written !ö! which means.
A booking time for the bridge to open.
A start time when the bridge start to open and the end time when the bridge
is fully opened.

The !v! below means.
A start time when the vessel can pass the opened bridge and the end time
when the vessel has passed the opened bridge.

The !c! below means.
A start time when the bridge start to close down and the end time when the
bridge is fully closed.

I need to create a html table that is different to the normal html table.
The table consist of 9 columns [1-9] and different number of row but the
column width is the same for all columns.
The column to the left is the name of a bridge.
If we had for example three rows then the column to the left could be
Göta älv bron
Marieholmsbron
Jordfallsbron

Now to the difficult part of the html table.
Each row describe one or more bridge booking in some way.
For example in row 1 Göta älv below I have written a booking !ö!v!c!
So each interval column of hour is of same width but the time for ö,v and c
could be very different.
Can anybody give me some hint about what kind of algoritm is suitable to use
when displaying the html table with it's contents ?

I have written some example here.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
BridgeName | 11:00 | 12:00 |
13:00 | 14:00 | 15:00 |
16:00 | 17:00 | 18:00 |
______________________________________________________________________________________________________________________________________
Göta älv bron | !ö!v!c! ! ö ! v ! c !
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Marieholmsbron |
! ö ! v ! c !
!ö!v!c!
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Jordfallsbron |
!ö!v!c!
!ö!v!c!
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

//Tony

JJ

unread,
Apr 22, 2013, 8:53:00 AM4/22/13
to
On Mon, 22 Apr 2013 13:51:49 +0200, Tony wrote:
> Now to the difficult part of the html table.
> Each row describe one or more bridge booking in some way.
> For example in row 1 Göta älv below I have written a booking !ö!v!c!
> So each interval column of hour is of same width but the time for ö,v and c
> could be very different.
> Can anybody give me some hint about what kind of algoritm is suitable to use
> when displaying the html table with it's contents ?

You're probably looking for spanned-column or spanned-row table cells.

> I have written some example here.

You might want to use "Courrier New" font when composing a newsgroups text,
cause the result looks awful.

Stefan Weiss

unread,
Apr 22, 2013, 9:40:15 AM4/22/13
to
On 2013-04-22 13:51, Tony wrote:
> All these bridges below must be opened when a vessel must pass that's why we
> talk about bookings.
...
> I need to create a html table that is different to the normal html table.
> The table consist of 9 columns [1-9] and different number of row but the
> column width is the same for all columns.
> The column to the left is the name of a bridge.
> If we had for example three rows then the column to the left could be
> Göta älv bron
> Marieholmsbron
> Jordfallsbron
>
> Now to the difficult part of the html table.
> Each row describe one or more bridge booking in some way.
> For example in row 1 Göta älv below I have written a booking !ö!v!c!
> So each interval column of hour is of same width but the time for ö,v and c
> could be very different.
> Can anybody give me some hint about what kind of algoritm is suitable to use
> when displaying the html table with it's contents ?

I tried to write an explanation, but it got too complicated.
Is that what you were looking for?

http://foo.at/paste/2013/bridges.html

Note, there is NO error handling and no boundary checking, you'll have
to add that yourself.

- stefan

Tony

unread,
Apr 23, 2013, 11:20:17 AM4/23/13
to


"Stefan Weiss" wrote in message news:kl3ek0$tk9$1...@news.albasani.net...
many thanks Stefan this will be useful

//Tony

0 new messages