Welcome back to the world of the list :-) long while no see. Reply inline.
Matt ----- Original Message ----- From: "HouseDad" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 23, 2004 10:33 PM Subject: [vbhelp] Password Generation / Text File Manipulation > > Hello all! > > It's been a while since I've bugged you, but I have some new > programming projects coming up and thought I would tap this vast pool > of experience to see if you could offer any advice on approaching > these programming puzzles. > > The first thing I am curious about is password generation. I am > going to have to generate passwords for about 8000 people, plus or > minus some. I don't know if I should try to generate passwords based > on an algorithm looking at their name or other unique information, or > just some code that can generate 8000 unique passwords. Either way > would work. I can assign unique passwords to the people myself if > the password is not based on their name or other info. The approach to take depends greatly on the reason you are implementing the password. But if you are allocating them, as simple method as any is use a dictionary file to generate passwords, download one of the word lists from the web and use it to pick a random password from the list. For extra security, append a couple of random numbers to the selected word. Simple clean and not likely to be to suseptible to attempts to guess, or attack with dictionaries. > > I have another project that deals with manipulating a text > file. I am trying to decide which approach to take. I can read the > fields that the file deals with into a database, but there are many, > many fields, and this would have to be done for three different forms > (or projects) which in itself is pretty time consuming. The other > approach I am leaning towards is simply searching the text file for > the record, which is multiple lines within the text file, by strings > of text, then using text manipulation to change the info, using > random file access. Does anyone have experience with this type of > project and or the pros and cons associated with strict text file > manipulation vs database. I have done both, but this is a bigger > project in the size of the data files I am dealing with. I am pretty > sure if I can approach it with a dependable text file manipulation > strategy I am going to cut time required to do the project by about > 75%. The structure of the file is basically : > > HEADER (with document number identifier) CRLF > RECORD 1 CRLF > RECORD 2 CRLF > " > RECORD 9 CRLF > > ======= The files are about 96 documents, so the above is repeated > about 96 times for each document (which has about 9 pages, or records > each). I am hoping I can use random access to find text strings in > the file I need and change them. I basically want to know if for a > file this size if it's going to be a waste of time to deal with the > text directly as opposed to just creating a database with all the > many fields per document. If I understand you correctly you will be looking for particular lines withing the file. If this is the case, simply open the file fgor input and read each line sequentially into a variable. INSTR() will scan the variable for you and when you hit the data you want, write it into an array--- Or back out to the file system to your output file. The may be those that would say use a database, but for this type of activity the overhead of creating the recordset would probably out weigh the benefits. To be sure, you might provide some detail as to the sorts of information you would want to extract from each line. But I can say, that I have used a similar process to read 4000 text files varying in size from 2kb to 500kb (25,755,536 kb on disk, as I am still refining the data input this is quite topical for me), and the reading of the files, extracting of the 8 wanted lines from each and the loading into a listview takes about 60 seconds or less. Matt > > Any input appreciated! Thanks! > > [C] > > > > > > > '// ======================================================= > Rules : http://ReliableAnswers.com/List/Rules.asp > Home : http://groups.yahoo.com/group/vbHelp/ > ======================================================= > Post : [EMAIL PROTECTED] > Join : [EMAIL PROTECTED] > Leave : [EMAIL PROTECTED] > '// ======================================================= > > Yahoo! Groups Links > > > > > ------------------------ Yahoo! Groups Sponsor --------------------~--> Yahoo! Domains - Claim yours for only $14.70 http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/k7folB/TM --------------------------------------------------------------------~-> '// ======================================================= Rules : http://ReliableAnswers.com/List/Rules.asp Home : http://groups.yahoo.com/group/vbHelp/ ======================================================= Post : [EMAIL PROTECTED] Join : [EMAIL PROTECTED] Leave : [EMAIL PROTECTED] '// ======================================================= Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/vbhelp/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
