News Focus
News Focus
icon url

Bob Zumbrunnen

10/11/02 1:53 AM

#17457 RE: Bob Zumbrunnen #17456

That was a fun little diversion. The Anagram Solver responds almost instantly now. Too a long time to get the right stuff added to the database, and the system seemed really mired while it was working, but all's fine now.

The fact that the system slowed down so much while that was happening is a bit puzzling. Will have to look at it later.

icon url

gotmilk

10/11/02 8:04 AM

#17458 RE: Bob Zumbrunnen #17456

Bob, Is there a list of all iHub boards with grouping
by the catagory you placed on the home page?

View Message Boards
--------------------------------
OTC BB Stocks
Listed & Nasdaq
Canadian Stocks
Stock Clubs
The Lounge
iHub Talk
Free Zone

Or just wondering which boards have huge message numbers,
as Zeev's Turnips Patch-No Politics (ZEEV) 34364 seems to
be going for Number 1 :o) and at a "young" age.

Also, might a new catagory be added:
Foreign Exchanges
That include all except 'Canadian Stocks'
and if so, then the following new board would fit there.

BULGARIAN STOCK MARKET (BG STOCKS)
#board-1375
http://www.investorshub.com/boards/board.asp?board_id=1375

You and Matt might experimint and create that level
on iHub's home page of Foreign Exchanges and list
all exchanges on planet Earth as place-holders with
message that an open invitation to anyone to start it.
(or)
too wild for u and matt ?

___________________________________________________
Si's Doug AK
gotmilk & skunk cabbage, no Zurnip or Krispy Kreme
icon url

PMS Witch

10/11/02 9:10 AM

#17459 RE: Bob Zumbrunnen #17456

I did my anagram solver differently. I wanted a C program where I could re-use the code elsewhere. I find the library functions strlen, strlwr, and memset efficient enough. It's surprising how often something I did for fun contains a bit of tricky code that I can apply to work later on. If I get ambitious, I'd substitute the array arithmetic var[index] to code using pointers.

Cheers, PW.

P.S.

 
Zero fill a 26 element array of integers.

Load the array by bumping the count for each letter in the jumbled string.

FOR (each word in the dictionary)
IF (length matches)
Zero fill a second 26 element array of integers.
Load the dictionary word into the array similarly to the jumbled word.
Print words when arrays match.
.
.
.
/* A bit (the testing part) from the actual code */

if (gl!=strlen(w)) return(0); /* Test the length */
memset(wa,0,AL); /* Zero fill arrays */
for (a=0;a<gl;a++) ++wa[w[a]-FL]; /* Count characters */
for (a=0;a<AL;a++) if (ga[a]!=wa[a]) return(0); /* Compare arrays */
return(-1); /* Pass if not fail */



icon url

PMS Witch

10/11/02 9:11 AM

#17460 RE: Bob Zumbrunnen #17456

I did my anagram solver differently. I wanted a C program where I could re-use the code elsewhere. I find the library functions strlen, strlwr, and memset efficient enough. It's surprising how often something I did for fun contains a bit of tricky code that I can apply to work later on. If I get ambitious, I'd substitute the array arithmetic var[index] to code using pointers.

Cheers, PW.

P.S.

 
Zero fill a 26 element array of integers.

Load the array by bumping the count for each letter in the jumbled string.

FOR (each word in the dictionary)
IF (length matches)
Zero fill a second 26 element array of integers.
Load the dictionary word into the array similarly to the jumbled word.
Print words when arrays match.
.
.
.
/* A bit (the testing part) from the actual code */

if (gl!=strlen(w)) return(0); /* Test the length */
memset(wa,0,AL); /* Zero fill arrays */
for (a=0;a<gl;a++) ++wa[w[a]-FL]; /* Count characters */
for (a=0;a<AL;a++) if (ga[a]!=wa[a]) return(0); /* Compare arrays */
return(-1); /* Pass if not fail */



icon url

PMS Witch

10/11/02 9:12 AM

#17461 RE: Bob Zumbrunnen #17456

I did my anagram solver differently. I wanted a C program where I could re-use the code elsewhere. I find the library functions strlen, strlwr, and memset efficient enough. It's surprising how often something I did for fun contains a bit of tricky code that I can apply to work later on. If I was ambitious, I'd substitute the array arithmetic var[index] to code using pointers.

It's amazing how may approaches there can be to perform a similar bit of work.

Cheers, PW.

P.S.

 
Zero fill a 26 element array of integers.

Load the array by bumping the count for each letter in the jumbled string.

FOR (each word in the dictionary)
IF (length matches)
Zero fill a second 26 element array of integers.
Load the dictionary word into the array similarly to the jumbled word.
Print words when arrays match.
.
.
.
/* A bit (the testing part) from the actual code */

if (gl!=strlen(w)) return(0); /* Test the length */
memset(wa,0,AL); /* Zero fill arrays */
for (a=0;a<gl;a++) ++wa[w[a]-FL]; /* Count characters */
for (a=0;a<AL;a++) if (ga[a]!=wa[a]) return(0); /* Compare arrays */
return(-1); /* Pass if not fail */