Design Comments and positioning problems

D

Dylan Parry

Using a pointed stick and pebbles, Marc scraped:
I don't want to download it, as my contracts never say that I'll ensure
compatibility with Opera, just IE and FF.

What's your point? My contracts never say that sites I create will be
accessible on Fridays, but that doesn't mean that I won't test them on a
Friday.
 
E

Els

Dylan said:
Using a pointed stick and pebbles, Marc scraped:


What's your point? My contracts never say that sites I create will be
accessible on Fridays, but that doesn't mean that I won't test them on a
Friday.

What!?
I thought I had everything covered by testing in all the browsers I
can get my hands on, and now it appears I have to test them on all
different days of the week as well? :-(

I suppose the same goes for days, nights, and bank holidays? :\
 
D

Dylan Parry

Using a pointed stick and pebbles, Els scraped:
I suppose the same goes for days, nights, and bank holidays? :\

That may be your understanding of the situation. My understanding might
be different. Freedom to waffle is very important.

--
Dylan Parry
http://electricfreedom.org -- Where the Music Progressively Rocks!

"I like long walks, especially when they are taken by people who annoy
me" - Noel Coward
 
E

Els

Dylan said:
Using a pointed stick and pebbles, Els scraped:


That may be your understanding of the situation. My understanding might
be different. Freedom to waffle is very important.

You may have a point.
Have a nice day.
 
N

Neredbojias

With neither quill nor qualm, Marc quothed:
Thanks Neredbojias. A thread isn't worth reading until you've posted
some big works in it... :D

Yup, I couldn't agree with you more. When it comes right down to it,
html and css and all that related junk are actually quite boring so it
helps to air out the air, so to speak, with fresh wind now 'n agin. I
like to shoot the breeze simply to provide a revitalizing atmosphere for
the staid doldrums which may occur with the lack of same. Don't you
ever feel like just spontaneously blowing yourself?
 
M

Marc

Dylan said:
Using a pointed stick and pebbles, Marc scraped:


What's your point? My contracts never say that sites I create will be
accessible on Fridays, but that doesn't mean that I won't test them on a
Friday.

I never said I wouldn't test them - I usually post websites on several
newsgroups and webmaster forums to get feedback of the website in a wide
range of user environments - my contracts just only *guarantee*
compatibility with IE and FF.

Marc
 
M

Marc

Neredbojias said:
With neither quill nor qualm, Marc quothed:

Yup, I couldn't agree with you more. When it comes right down to it,
html and css and all that related junk are actually quite boring so it
helps to air out the air, so to speak, with fresh wind now 'n agin. I
like to shoot the breeze simply to provide a revitalizing atmosphere for
the staid doldrums which may occur with the lack of same. Don't you
ever feel like just spontaneously blowing yourself?

Well, I'm honored you chose to 'shoot the breeze' avoiding the 'staid
doldrums' of my thread. Keep up the good work. ;)

Marc
 
T

Toby Inkster

Els said:
now it appears I have to test them on all different days of the week as
well? :-(

You do if you use day-dependent functions in server-side scripts.

<?php
$day = (int)date('w');

if ($day)
{
print "<p>The day of the week (in numerical "
print "form) is {$day}.</p>\n";
}
?>

Spot the problem.
 
E

Els

Toby said:
You do if you use day-dependent functions in server-side scripts.

<?php
$day = (int)date('w');

if ($day)
{
print "<p>The day of the week (in numerical "
print "form) is {$day}.</p>\n";
}
?>

Spot the problem.

I suppose I would have to know what 'w' stands for before I could spot
any problem?

My knowledge of PHP doesn't extend beyond the use of an include or a
simple if/else statement yet. I know that 'int' rounds a number to an
integer, but that's about as much as I can see in the above snippet.
Just a guess: somewhere in the week the value of 'w' rounds down or up
to the wrong integer to be accurate for the day?
 
N

Neredbojias

With neither quill nor qualm, Toby Inkster quothed:
You do if you use day-dependent functions in server-side scripts.

<?php
$day = (int)date('w');

if ($day)
{
print "<p>The day of the week (in numerical "
print "form) is {$day}.</p>\n";
}
?>

Spot the problem.

Isn't Sunday "0"?
 
D

Dylan Parry

Using a pointed stick and pebbles, Blinky the Shark scraped:
Mine don't work on Mondays or Tuesdays:

That sounds like me. Monday and Tuesday I am just getting over the
weekend, Wednesday I am starting to get into the swing of things,
Thursday I am back working 110%, and by Friday I am ready for the
weekend again :D
 
T

Toby Inkster

Els said:
My knowledge of PHP doesn't extend beyond the use of an include or a
simple if/else statement yet. I know that 'int' rounds a number to an
integer, but that's about as much as I can see in the above snippet.

Not quite. It's a "type cast". That is, it forces the string value "2" to
an integer value 2. PHP is a "weakly typed" language, which means that
most of the time, PHP will do all the casting you need for you. But it's
usually a good idea to do it explicitly, to prevent any nasty surprises.

<?php

if ("2"=="2.0")
{
print "This will never happen.\n";
}

if ( (int)"2" == (int)"2.0" )
{
print "This will happen!\n";
}

?>

Of course, if you have a fractional number and do a type cast to an
integer:

$x = (int)4.25;

it has the same effect as rounding the number -- but this is merely a
side-effect: the main operation has been casting a floating-point number
to an integer.
Just a guess: somewhere in the week the value of 'w' rounds down or up
to the wrong integer to be accurate for the day?

http://www.php.net/date

date("w") returns the current day of the week as a numeric string. If
today is a Monday, then it returns "1"; if today is Tuesday, it returns
"2"; etc.

If it's Sunday, it returns "0": thus "if ($day)" evaluates to "if (0)";
which is always false: so the paragraph does not get printed at all.
 
N

Neredbojias

With neither quill nor qualm, Blinky the Shark quothed:
<small, tasteful bow>

Sharks can't bow because they have no anatomical pivot point. The best
they can do is wow and flutter or yaw and curl, depending on the
species.
 
E

Els

Toby said:
Not quite. It's a "type cast". That is, it forces the string value "2" to
an integer value 2. PHP is a "weakly typed" language, which means that
most of the time, PHP will do all the casting you need for you. But it's
usually a good idea to do it explicitly, to prevent any nasty surprises.

<?php

if ("2"=="2.0")
{
print "This will never happen.\n";
}

if ( (int)"2" == (int)"2.0" )
{
print "This will happen!\n";
}

?>

Of course, if you have a fractional number and do a type cast to an
integer:

$x = (int)4.25;

it has the same effect as rounding the number -- but this is merely a
side-effect: the main operation has been casting a floating-point number
to an integer.


http://www.php.net/date

date("w") returns the current day of the week as a numeric string. If
today is a Monday, then it returns "1"; if today is Tuesday, it returns
"2"; etc.

If it's Sunday, it returns "0": thus "if ($day)" evaluates to "if (0)";
which is always false: so the paragraph does not get printed at all.

Got it :)

You really should be a teacher, you know that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top