Raised This Month: $ Target: $400
 0% 

Reading from file error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 08-31-2009 , 19:43   Re: Reading from file error
Reply With Quote #1

I have never used a trie, so I may be wrong, but I don't think this is a good example of when to use them. As I understand, a trie is good for when you have a lot of strings and you expect to do a lot of looking up, not to pack them all in, use one, and then destroy it. I think that defeats the purpose, unless I'm reading this wrong.

In this case, we're not actually searching for a string, we just want any of them.

Edit: Heh, couldn't we just use

PHP Code:
 random(file_size("file",1)) 
and read that one line?

I think we're being a little overcomplicated.
__________________

Last edited by Bad_Bud; 08-31-2009 at 19:50.
Bad_Bud is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode