Velocity Reviews > HTML > Combinations alphabet?

# Combinations alphabet?

dorayme
Guest
Posts: n/a

 04-05-2009
In article <(E-Mail Removed)>,
richard <(E-Mail Removed)> wrote:

> So catch the wave and join the fun.

I swim rather than surf. Better exercise and not so dangerous.

--
dorayme

Chris F.A. Johnson
Guest
Posts: n/a

 04-05-2009
On 2009-04-04, richard wrote:
> On Sat, 4 Apr 2009 17:37:14 -0400, BootNic <(E-Mail Removed)>
> wrote:
>
>>On Sat, 04 Apr 2009 04:32:36 -0500
>>Ben C <(E-Mail Removed)> wrote in:
>><(E-Mail Removed)>
>>
>>> On 2009-04-04, Michèle <(E-Mail Removed)> wrote:
>>>> Hi,
>>>>
>>>> I'am trying to make an HTML programm of all possible combinations in the
>>>> Alphabet.
>>>
>>> Actually I have that on my CV in the "skills" section.
>>>
>>>> The code exists of 3 letters.
>>>> 26*26*26 = 17.576 possibilities!
>>>> Is there any possibility to have all combinations with a
>>>> programm? AAA, AAB, AAC, …
>>>> Many thanks in advance if somebody could help me out.
>>>
>>> Here is a Python program to do it:
>>>
>>> from string import uppercase as u
>>>
>>> for i in range(26):
>>> for j in range(26):
>>> for k in range(26):
>>> print '<span class="code">%s</span>' % (u[i] + u[j] + u[k])

>>
>>[snip]
>>
>>PHP version may look something like:
>>
>><ol>
>><?php
>>
>>\$range = range('A', 'Z');
>>foreach(\$range as \$A)
>> foreach(\$range as \$B)
>> foreach(\$range as \$C)
>> print "<li>\$A\$B\$C</li>\n";
>>
>>?>
>></ol>

>
> Hell, in run basic I can come up with 3 or 4 ways to do it.
> html "<ul>"
> For a =64 to 90
> for b=64 to 90
> for c=64 to 90
>
> show\$=chr\$(a)+chr\$(b)+chr\$(c)
> html "<li>";show\$;"</li>"
> next c
> next b
> next a
> html "</ul>"

In the bash shell:

printf "%s\n" {A..Z}{A..Z}{A..Z}

--
Chris F.A. Johnson, webmaster <http://Woodbine-Gerrard.com>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)

Raymond Schmit
Guest
Posts: n/a

 04-05-2009
On Sat, 04 Apr 2009 18:53:06 -0400, richard <(E-Mail Removed)>
wrote:

>On Sat, 04 Apr 2009 19:58:00 +0100, Martin Jay
><(E-Mail Removed)> wrote:
>
>>On Sat, 04 Apr 2009 14:22:51 -0400, richard <(E-Mail Removed)>
>>wrote:
>>>On Sat, 4 Apr 2009 10:05:42 +0200, "Michèle" <(E-Mail Removed)>
>>>wrote:

>>
>>>>I'am trying to make an HTML programm of all possible combinations in the
>>>>Alphabet.
>>>>The code exists of 3 letters.
>>>>26*26*26 = 17.576 possibilities!

>>
>>>You should look into this using PHP.
>>>A simple 3 level for/next loop is all you need.
>>>
>>>Or you could do it just as easy with BASIC.
>>>Probably fairly easy in javascript.

>>
>>Is your love affair with Run BASIC over?

>
>Hardly.
>I suggested PHP in this case because all that you need to do for the
>output PHP can handle just as well.

Javascript is also a possibility ..when php is not available on the
server of the webhosting.

Mike Duffy
Guest
Posts: n/a

 04-05-2009
http://www.velocityreviews.com/forums/(E-Mail Removed) (Raymond Schmit) wrote in
news:(E-Mail Removed):

> On Sat, 04 Apr 2009 18:53:06 -0400, richard <(E-Mail Removed)>
> wrote:
>
> Javascript is also a possibility

I already posted a javascript implementation earlier.

http://pages.videotron.com/duffym/test.htm

richard
Guest
Posts: n/a

 04-06-2009
On Sun, 5 Apr 2009 22:55:31 +0000 (UTC), Mike Duffy
<(E-Mail Removed)> wrote:

>(E-Mail Removed) (Raymond Schmit) wrote in
>news:(E-Mail Removed):
>
>> On Sat, 04 Apr 2009 18:53:06 -0400, richard <(E-Mail Removed)>
>> wrote:
>>
>> Javascript is also a possibility

>
>I already posted a javascript implementation earlier.
>
>http://pages.videotron.com/duffym/test.htm

That's why I like the simplicity of BASIC.

Mike Duffy
Guest
Posts: n/a

 04-06-2009
richard <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> On Sun, 5 Apr 2009 22:55:31 +0000 (UTC), Mike Duffy
> <(E-Mail Removed)> wrote:
>
>>(E-Mail Removed) (Raymond Schmit) wrote in
>>news:(E-Mail Removed):
>>
>>> On Sat, 04 Apr 2009 18:53:06 -0400, richard <(E-Mail Removed)>
>>> wrote:
>>>
>>> Javascript is also a possibility

>>
>>I already posted a javascript implementation earlier.
>>
>>http://pages.videotron.com/duffym/test.htm

>
>
> That's why I like the simplicity of BASIC.
>

I'm not sure of your point. She said she forget how to program, so now she
can get all the 3 letter codes she wants just by clicking on the link. What
could be simpler?

Raymond Schmit
Guest
Posts: n/a

 04-06-2009
On Sun, 05 Apr 2009 21:18:59 -0400, richard <(E-Mail Removed)>
wrote:

>On Sun, 5 Apr 2009 22:55:31 +0000 (UTC), Mike Duffy
><(E-Mail Removed)> wrote:
>
>>(E-Mail Removed) (Raymond Schmit) wrote in
>>news:(E-Mail Removed):
>>
>>> On Sat, 04 Apr 2009 18:53:06 -0400, richard <(E-Mail Removed)>
>>> wrote:
>>>
>>> Javascript is also a possibility

>>
>>I already posted a javascript implementation earlier.
>>
>>http://pages.videotron.com/duffym/test.htm

>
>
>That's why I like the simplicity of BASIC.

Without installing something ?
If the answer is no -> Your RunBasic solution IS NOT as easy
Javascript is running without installing something on the client and
without installing something on the webserver.
note for Mike: Good work !