Who among us can ignore the allure of really funny math puns?

Willow ,'Empty Places'


Buffistas Building a Better Board  

Do you have problems, concerns or recommendations about the technical side of the Phoenix? Air them here. Compliments also welcome.

To-do list


Katie M - Nov 19, 2002 2:23:30 pm PST #1627 of 10000
I was charmed (albeit somewhat perplexed) by the fannish sensibility of many of the music choices -- it's like the director was trying to vid Canada. --loligo on the Olympic Opening Ceremonies

Okay. Using quotes, and using them twice. Got it.


Typo Boy - Nov 19, 2002 2:38:32 pm PST #1628 of 10000
Calli: My people have a saying. A man who trusts can never be betrayed, only mistaken.Avon: Life expectancy among your people must be extremely short.

Thanks for that PHP stuff Gar, I did actually know that you can use arrays in order and as associative arrays, but coming from a Perl background where one has to be a @ and the other has to be a %, it freaks me out when everything's a $.

But the end() function actually did help, right? The rest was just a thought that if you did not know the end() command, you might have missed some of the other functions.

And, yeah the one thing you have to get used to in PHP is how it makes your life easier. Except when it makes your life harder. Or impossible. In short, just like any other programming language.


Typo Boy - Nov 19, 2002 2:38:35 pm PST #1629 of 10000
Calli: My people have a saying. A man who trusts can never be betrayed, only mistaken.Avon: Life expectancy among your people must be extremely short.

John H - Nov 19, 2002 2:49:08 pm PST #1630 of 10000

Not only did the "end()" function help, I've finished a prototype tag-syntax checker at [link] on the strength of it.

I say "tag-syntax" checker because it won't figure out problems with quotes.

It uses Method A (ordered array) and Method B (associative array), but if B is happy it over-rides A.

It explains what it's doing, so just play with it.

For testing, it just checks the integrity of any lowercase bold, italic and font tags, but you know, proof of concept.


Rob - Nov 19, 2002 2:54:44 pm PST #1631 of 10000

I tried it, John, and it doesn't seem to catch any errors at all.

I put in

a
<bold>
a
<bold>
a
<bold>
a
</bold>

and it spit out

found tags: bold, bold, bold, /bold, Trying to match openers and closers:
Diagnosing: Length of outstanding tags array: 0
Sum for each tag (opener +1, closer -1):
bold count =
Sum of all tags: 0
Conclusion: code passes both tests and appears unbroken.


Typo Boy - Nov 19, 2002 2:56:28 pm PST #1632 of 10000
Calli: My people have a saying. A man who trusts can never be betrayed, only mistaken.Avon: Life expectancy among your people must be extremely short.

Also, it happily accepts extra close tags. It did detect some crossed tags nicely though.


Typo Boy - Nov 19, 2002 2:57:52 pm PST #1633 of 10000
Calli: My people have a saying. A man who trusts can never be betrayed, only mistaken.Avon: Life expectancy among your people must be extremely short.

And it does detect an opening tag with not close. The problem is that it takes one closing tag as sufficient for any number of opening tags.


Jon B. - Nov 19, 2002 3:50:56 pm PST #1634 of 10000
A turkey in every toilet -- only in America!

I tried it, John, and it doesn't seem to catch any errors at all.

I think he only tested for t b t i and t font

t b <> t bold

Jeez I need to go home.


Typo Boy - Nov 19, 2002 4:06:48 pm PST #1635 of 10000
Calli: My people have a saying. A man who trusts can never be betrayed, only mistaken.Avon: Life expectancy among your people must be extremely short.

Every test I could come up with worked - except add extra close tags. It liked extra close tags just fine - for example:

< b > < b > gar </b></b></i></i>

Also, this is proof of logic for most things. But you still have to handle the hard cases malformed <A HREF tags and TD and TR commands outside of tables.


John H - Nov 19, 2002 4:09:33 pm PST #1636 of 10000

<bold>

Yes, as Jon said, you have to use actual tags, not ones you've made up yourself!

it takes one closing tag as sufficient for any number of opening tags.

No it doesn't! I mean, no it shouldn't! What were the diagnostics?

It was a bit early when I coded the last bit. I'm happy that it's grabbing the tags and counting them and pushing and popping correctly, but I'm a bit confused about my control structure at the end.

Here's the logic (where A is the push/pop structure, add-a-tag, remove-a-tag in order and B is the Sum Of All Tags, checking that for every open there is a close.):

Result Diagnosis A equals zero, B equals zero Everything is fine. A greater than zero, B equals zero

Bad HTML, but probably not broken.
Tags aren't closed in order, but do all close.

A equals zero, B less than zero Bad HTML, but probably not broken.
All tags close, but extra closing tags found. A greater than zero, B greater than zero Broken.

Can someone translate that into an if/elseif/else for me? My brain's in a slump.