Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi N - Z > Programmazione > [RAPACIOLI] programma esame
  Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
tesco85
booohhhhhh

User info:
Registered: Dec 2004
Posts: 76 (0.01 al dì)
Location: milano
Corso: informatica per le telecomunicazioni
Anno: in teoria 3
Time Online: 2 Days, 1:20:39 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
programma esame 1 anno rapacioli

qualcuno che mi da qualche input per il seguente programma:Gli eseguibili prodotti dalla compilazione devono essere due, Index e Find.

Il primo Index ha un solo parametro, il Path sul disco della radice del sottoalbero da indicizzare. Il programma Index indicizzerà il contenuto dei file *.txt dalla radice passata come parametro a tutte le sottodirectory fino alle foglie del sottoalbero.

Il servizio Find, ha sue parametri il Path sotto il quale cercare e la parola da ricercare, restituisce tutti i file *Txt presenti nel sottoalbero che parte da path che contengono la parola passata.
ve ne sarei grato grazie

03-01-2005 13:42
Click Here to See the Profile for tesco85 Click here to Send tesco85 a Private Message Find more posts by tesco85 Add tesco85 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
DeepBlue
tired guy

User info:
Registered: Sep 2003
Posts: 4258 (0.55 al dì)
Location: CSN
Corso: Info tlc
Anno:
Time Online: 52 Days, 8:40:31 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

E' simile a quello dell'anno scorso, con la differenza che l'anno scorso si poteva produrre un unico eseguibile.

Sicuramente il buon Rapacioli vi ha fatto studiare le hash table, che mi sembrano il modo migliore per realizzare Index.

La soluzione p iù pratica che mi viene in mente è di calcolare un hash per tutte le parole contenute nel file e memorizzarlo con il relativo path in un file (o nell'heap se siete capaci, ma non credo sia una buona soluzione se non siete VERAMENTE padroni dell'argomento puntatori, anche perché sarebbe difficile capire quanta memoria allocare e lavorare sulle realloc in funzioni ricorsive è come sdraiarsi sui binari).

A quel punto, scrivere Find è "semplice": gli date in pasto la parola da cercare, fate calcolare l'hash e lo fate confrontare con tutti gli hash contenuti in Index. Man mano che trova riscontri positivi, stampate il percorso e il nome del file a video.

Per facilitare l'attraversamento e la lettura di directory, ci sono delle system call per DOS e Win.
Non mi ricordo come si chiamano, ve le segnalo domani, se riesco.
Con un po' di ricorsione dovreste riuscire :)

Buona fortuna :)

__________________
~ get Debian! ~ get FreeBSD! ~ get OpenBSD! ~

12-01-2005 20:32
Click Here to See the Profile for DeepBlue Click Here to See the Blog of DeepBlue Click here to Send DeepBlue a Private Message Find more posts by DeepBlue Add DeepBlue to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
tesco85
booohhhhhh

User info:
Registered: Dec 2004
Posts: 76 (0.01 al dì)
Location: milano
Corso: informatica per le telecomunicazioni
Anno: in teoria 3
Time Online: 2 Days, 1:20:39 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

grazie dell'aiuto speriamo in bene

12-01-2005 21:56
Click Here to See the Profile for tesco85 Click here to Send tesco85 a Private Message Find more posts by tesco85 Add tesco85 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Rubi!
.amico.

User info:
Registered: Nov 2004
Posts: 38 (0.01 al dì)
Location: ...
Corso: TeLeCoM
Anno: Second
Time Online: 1 Day, 9:52:32 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

mi stavo chiedendo.... il risultato dell'indicizzazione compiuta da INDEX finisce in memoria....kiudendo index....il contenuto finito in memoria si cancella ?se si, devo quindi tenere aperto index per permettere a FIND di lavorare ? se no...meglio... :)

17-01-2005 20:14
Click Here to See the Profile for Rubi! Click here to Send Rubi! a Private Message Find more posts by Rubi! Add Rubi! to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
tesco85
booohhhhhh

User info:
Registered: Dec 2004
Posts: 76 (0.01 al dì)
Location: milano
Corso: informatica per le telecomunicazioni
Anno: in teoria 3
Time Online: 2 Days, 1:20:39 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
aiutoooo esame rapacioliii

ciao a tutti qualcuno sa darmi qualche input su come fare delle hash table per indicizzare un sottoalbero ? volevo sapere inoltre se all'orale il rapa fa un poò il bast..do o cosa.grazie ciauu

21-01-2005 10:58
Click Here to See the Profile for tesco85 Click here to Send tesco85 a Private Message Find more posts by tesco85 Add tesco85 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
DeepBlue
tired guy

User info:
Registered: Sep 2003
Posts: 4258 (0.55 al dì)
Location: CSN
Corso: Info tlc
Anno:
Time Online: 52 Days, 8:40:31 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Intervento del moderatore:
non aprite mille thread per lo stesso argomento. Leggete il regolamento.

Unisco i thread

__________________
~ get Debian! ~ get FreeBSD! ~ get OpenBSD! ~

21-01-2005 14:27
Click Here to See the Profile for DeepBlue Click Here to See the Blog of DeepBlue Click here to Send DeepBlue a Private Message Find more posts by DeepBlue Add DeepBlue to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
DeepBlue
tired guy

User info:
Registered: Sep 2003
Posts: 4258 (0.55 al dì)
Location: CSN
Corso: Info tlc
Anno:
Time Online: 52 Days, 8:40:31 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Rubi!
mi stavo chiedendo.... il risultato dell'indicizzazione compiuta da INDEX finisce in memoria....kiudendo index....il contenuto finito in memoria si cancella ?se si, devo quindi tenere aperto index per permettere a FIND di lavorare ? se no...meglio... :)


Basta farlo scrivere in un file


Originally posted by tescu85all'orale il rapa fa un poò il bast..do o cosa.grazie ciauu


Dipende da come gli gira ;)
L'importante è stare tranquilli ;)

__________________
~ get Debian! ~ get FreeBSD! ~ get OpenBSD! ~

Last edited by DeepBlue on 21-01-2005 at 14:59

21-01-2005 14:33
Click Here to See the Profile for DeepBlue Click Here to See the Blog of DeepBlue Click here to Send DeepBlue a Private Message Find more posts by DeepBlue Add DeepBlue to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Tiaz_82
.amico.

User info:
Registered: Sep 2004
Posts: 36 (0.00 al dì)
Location: Ghiffa
Corso: Informatica per le Telecomunicazioni
Anno: 1
Time Online: 16:49:11 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Io finora sono riuscito ad aggiungere un servizio nella libreria che gestisce l'hash table che, prima della chiusura , crea un file del genere :
parola1 \b percorso1
parola2 \b percorso2
parola3 \b percorso3

ora mi manca pero la funzione che nella find apre il benedetto file e carica tutti gli elementi nuovamente nella hash table per poi usare la find della hash table (leggermente modificata perche deve distinguere le parole uguali dalle parole con lo stesso hash (pippo e oppip per intenderci)).
Sarebbe meglio parlarne tutti di queste cose cosi magari ci si aiuta a vicenda :)
Sul indicizzazione dell'albero ancora alto mare.
Ciauz Tia

26-01-2005 14:53
Click Here to See the Profile for Tiaz_82 Click here to Send Tiaz_82 a Private Message Find more posts by Tiaz_82 Add Tiaz_82 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 13:38.    Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.043 seconds (66.43% PHP - 33.57% MySQL) con 28 query.