|
URLList
Jan 22, 2002 14:17:38 GMT -5
Post by 1.8T on Jan 22, 2002 14:17:38 GMT -5
one thing that i don't really get is when searching for title or url : lets say title in this case and the title is Roger's Page...., like that
when i do search Roger it shows up the correct url and title and all but wouldn't it make sense that if i type roger in lower case it should also show that page? .. just my 0.02 .., but I think THIS IS NOT REQUIRED. don't do this cuz they might have the autochecker check.,.,, YES , it makes more sense to search like this ,but NO, we're not suppose to do it.,.,,. anyways. just wanted to say how those ppl making these assignments don't really consider cases or fail to inform us of such cases.,.,.,., maybe this would be a good test in the tester class...,,.
|
|
|
URLList
Jan 22, 2002 14:19:22 GMT -5
Post by Goku on Jan 22, 2002 14:19:22 GMT -5
i can write my url's to a html file but the www.etc... does not show up, but only the title of the link below it ie.. - -BMW - -General Motors Canada it should look like this -http://www.bmw.com -BMW -http://www.gmc.com -General Motors Cananda has anyone encountered this problem? i think it might be an error with all the """" and /" but any advice would be appreicated
|
|
|
URLList
Jan 22, 2002 16:14:08 GMT -5
Post by 1.8T on Jan 22, 2002 16:14:08 GMT -5
i can write my url's to a html file but the www.etc... does not show up, but only the title of the link below it ie.. - -BMW - -General Motors Canada it should look like this -http://www.bmw.com -BMW -http://www.gmc.com -General Motors Cananda has anyone encountered this problem? i think it might be an error with all the """" and /" but any advice would be appreicated did u goto view source of the html final u generated? check wut's missing there.,.
|
|
|
URLList
Jan 22, 2002 16:29:51 GMT -5
Post by 1.8T on Jan 22, 2002 16:29:51 GMT -5
How are ppl returning from their vector to print?? like i think lots of ppl are wondering that,.
my program works but i dunno if i'm returing my list right.,
they say u can't return a vector., only an instance of a vector?.,. wut does that mean? ok this is wut i did.,., for those who did it this way., can u post.,,. so that i know i'm not alone.,., and for those who didn't do it this way.,., your input on this would be nice too., since i'm just wondering if i'm doing the right thing., and for those who didn't do it yet,..,., well doing it the way i did mine or any other ppl's way will risk plagiarism and if we're wrong u're screwed too.,.. anyways. back to my way of returning the instance of vector: i just use enumeration, . and added everything in my vector into ONE string .,,.. with \n between each url and title , so i return ONE BIG STRING with everything already spaced and dropped line etc..., and when i goto print list., i just system.out.print (my big String)
|
|
|
URLList
Jan 22, 2002 18:16:21 GMT -5
Post by EurasianVixen on Jan 22, 2002 18:16:21 GMT -5
I used an arraylist instead of a vector but from what I understand, an enumeration is returned by the elements()method (as stated in your API). It acts as a pointer to your vector list. Therefore, u have to return the address of the pointer (your enumeration) back to A1Driver so it knows where to find the vector in URLList. Hope that helps
|
|
|
URLList
Jan 22, 2002 18:40:08 GMT -5
Post by 1.8T on Jan 22, 2002 18:40:08 GMT -5
I used an arraylist instead of a vector but from what I understand, an enumeration is returned by the elements()method (as stated in your API). It acts as a pointer to your vector list. Therefore, u have to return the address of the pointer (your enumeration) back to A1Driver so it knows where to find the vector in URLList. Hope that helps ok.,.,., so i guess i hafta redo my prog so when i return enum its the instance of the whole vector? how do i take things out of it? or do i just treat it like a vector., like do i do something like this to return it Enumeration enum = urlList.elements(); where urlList is my vector and in my method i would : retrun enum; ??
|
|
|
URLList
Jan 22, 2002 18:46:20 GMT -5
Post by bladehunter on Jan 22, 2002 18:46:20 GMT -5
The answer to your question is in the Java API Handbook under the class Enumeration.
|
|
|
URLList
Jan 22, 2002 20:02:24 GMT -5
Post by Goku on Jan 22, 2002 20:02:24 GMT -5
when i load a html file, i can use the int indexOf(String s, int i) to find if the are any more urls in the file right? how do i search the names of the links cause it is just text, or will the names always be 2 index's away ie
<a href="page2.html">Relative Url example</a>
Relative url example is two spaces away form the last quote. DO we expect it to always be like this?
|
|
|
URLList
Jan 22, 2002 22:12:06 GMT -5
Post by Goku on Jan 22, 2002 22:12:06 GMT -5
bump
|
|
|
URLList
Jan 22, 2002 22:28:28 GMT -5
Post by 1.8T on Jan 22, 2002 22:28:28 GMT -5
when i load a html file, i can use the int indexOf(String s, int i) to find if the are any more urls in the file right? how do i search the names of the links cause it is just text, or will the names always be 2 index's away ie <a href="page2.html">Relative Url example</a> Relative url example is two spaces away form the last quote. DO we expect it to always be like this? well i'm not sure if its always two spaces. but what i did was i split url and its title.,., with a space., and used indexOf to find that space later to split.,.,., cuz i stored both as one elemetn in my vector as for my post.., I HAVE NO IDEA wut to do with enumeration ., all it says in the JAVA API book is Enumeration elements(); i even tried making an object of Enumeration.,., and returned and stuff,. doesn't work.,. unless i'm doing something wrong.,.which usually is the case
|
|
|
URLList
Jan 22, 2002 22:31:29 GMT -5
Post by Goku on Jan 22, 2002 22:31:29 GMT -5
|
|
|
URLList
Jan 23, 2002 8:32:19 GMT -5
Post by Yingster on Jan 23, 2002 8:32:19 GMT -5
i have the same problem ( ) i debugged my code and found out it stops at a line that contains a link.
|
|