Results 1 to 16 of 16
Like Tree1Likes
  • 1 Post By SurfMan

Thread: how to list the domains using java

  1. #1
    Leela Madhuri is offline Member
    Join Date
    Jan 2014
    Posts
    3
    Rep Power
    0

    Default how to list the domains using java

    can we list the domains by connecting with the net using java...
    please help me about this

  2. #2
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: how to list the domains using java

    What domains?
    Get in the habit of using standard Java naming conventions!

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,453
    Blog Entries
    7
    Rep Power
    20

    Default Re: how to list the domains using java

    Quote Originally Posted by kjkrum View Post
    What domains?
    All of them; why ask?

    kindest regards,

    Jos ;-)
    cenosillicaphobia: the fear for an empty beer glass

  4. #4
    zFollette is offline ▼ dafuq did I do?
    Join Date
    Dec 2013
    Posts
    203
    Rep Power
    0

    Default Re: how to list the domains using java

    "First, I want to access the Internet, then list every domain added since the 1960s". Please help.
    1000011 1100001 1101110 100000 1111001 1101111 1110101 100000 1110010 1100101 1100001 1100100 100000 1000010 1101001 1101110 1100001 1110010 1111001 111111

  5. #5
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    936
    Rep Power
    2

    Default Re: how to list the domains using java

    Quote Originally Posted by zFollette View Post
    "First, I want to access the Internet, then list every domain added since the 1960s". Please help.
    I think it would be easier if you sent every word in the dictionary as a search to Google and screenscrape all the search results and RegExp all the domain names. After all the words in all the dictionaries are done, all the domains in the world MUST be listed, right? RIGHT?
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,453
    Blog Entries
    7
    Rep Power
    20

    Default Re: how to list the domains using java

    Quote Originally Posted by SurfMan View Post
    I think it would be easier if you sent every word in the dictionary as a search to Google and screenscrape all the search results and RegExp all the domain names. After all the words in all the dictionaries are done, all the domains in the world MUST be listed, right? RIGHT?
    Wrong, most domain names aren't words and shouldn't be in a dictionary, e.g. gov, edu, nl, co.uk ...

    kind regards,

    Jos.nl/unox/rookworst/prijsvraag/winnaars
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    936
    Rep Power
    2

    Default Re: how to list the domains using java

    Quote Originally Posted by JosAH View Post
    Wrong, most domain names aren't words and shouldn't be in a dictionary, e.g. gov, edu, nl, co.uk ...

    kind regards,

    Jos.nl/unox/rookworst/prijsvraag/winnaars
    Wrong wrong. I didn't say that dictionary words are domainnames. What I said was: enter all words from the dictionary into Google search. Parse each result then you'd have a domainname. Let me make it easy for OP (and Jos :)):
    Java Code:
    Set<String> domainNames = new HashSet<String>();
    Google g = new Google();
    for ( Dictionary d : dictionaries) {
       for (String word : d.getWords() ) {
          List<Result> results = g.search(word);
          for ( Result r : results) {
             domainNames.add(r.getDomainName());
          }
       }
    }
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  8. #8
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,900
    Rep Power
    5

    Default Re: how to list the domains using java

    But that would create incomplete domains, since a domain is not only a word, it is followed by an extension which Jos explained. So to complete your code, you'd have to take every possible extension in existence and then for each word in the dictionary, generate a domain name. And also for each NAME in the world, which are usually not in the dictionary. IE. jos.nl, jos.com, jos.co.uk, etc.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  9. #9
    Leela Madhuri is offline Member
    Join Date
    Jan 2014
    Posts
    3
    Rep Power
    0

    Default Re: how to list the domains using java

    By taking a word which user enters, by comparing with the given word the domains which are matched with the word should be displayed in a list........
    please help.........
    Thank you

  10. #10
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    936
    Rep Power
    2

    Default Re: how to list the domains using java

    Quote Originally Posted by gimbal2 View Post
    But that would create incomplete domains, since a domain is not only a word, it is followed by an extension which Jos explained. So to complete your code, you'd have to take every possible extension in existence and then for each word in the dictionary, generate a domain name. And also for each NAME in the world, which are usually not in the dictionary. IE. jos.nl, jos.com, jos.co.uk, etc.
    No no no no no!! Gee, it's friday isn't it?

    Look, here's how this scheme works:
    Dictionary -> each word -> Google -> search result -> use domainname of the search result.

    Drop the idea of using the dictionary to create domainnames. I never said that. The search result of Google generates the domainnames for you.

    Now, about that double espresso...
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  11. #11
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,900
    Rep Power
    5

    Default Re: how to list the domains using java

    Oooooooooooooooooooooooooooooooooooooooooooooooooo ooooooooh. Doink.

    But then you assume that Google returns all results of course, yet we all know that mister Google returns filtered and pre-ordered results. Sorry, it ain't gonna fly.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  12. #12
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    936
    Rep Power
    2

    Default Re: how to list the domains using java

    Quote Originally Posted by gimbal2 View Post
    Oooooooooooooooooooooooooooooooooooooooooooooooooo ooooooooh. Doink.

    But then you assume that Google returns all results of course, yet we all know that mister Google returns filtered and pre-ordered results. Sorry, it ain't gonna fly.
    Crap. My plan is foiled. Can we add Yahoo and DuckDuckGo to the list as well? And more dictionaries? And [0-9]*? That must be close to getting at least 95% of the domainnames.

    Oh well, forget it. It's never going to get to 100%.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  13. #13
    Leela Madhuri is offline Member
    Join Date
    Jan 2014
    Posts
    3
    Rep Power
    0

    Default Re: how to list the domains using java

    In google it displays all the links where ever the word will be found , but here only the domains which are matched should be displayed

  14. #14
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    936
    Rep Power
    2

    Default Re: how to list the domains using java

    It's a joke. This started because a) it's fun-friday, and b) your question: "can we list the domains by connecting with the net using java" is a bit cryptic. kjkrum asked "what domains?" but you never answered that one. The rest is all a stab on that.

    Here's a breakdown on your question:
    - "list the domains"? Your domains? Our domains? The whole interwebz domains? The content of the 13 DNS root-servers?
    - "the net"? Besides this being a horrible movie starring Sandra Bullock, what net? Is "net" a network? The whole interwebz again? Your "net"? The local network?
    - "using Java"? What is Java supposed to do here? Getting all the domains? Showing a UI? Getting user input? All of the above?

    Be specific, be exact. Try explaining this to me as if I was a 6 year old toddler.

    how to list the domains using java-7ldqq97.jpg
    kjkrum likes this.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  15. #15
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,900
    Rep Power
    5

    Default Re: how to list the domains using java

    "fun-friday", I like that!

    The Net always confused me because at the beginning of it she's playing what looks like an altered version of Wolfenstein; back in 1995 people were not in the habit of modding games just yet.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  16. #16
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,453
    Blog Entries
    7
    Rep Power
    20

    Default Re: how to list the domains using java

    Quote Originally Posted by SurfMan View Post
    Crap. My plan is foiled. Can we add Yahoo and DuckDuckGo to the list as well? And more dictionaries? And [0-9]*? That must be close to getting at least 95% of the domainnames.

    Oh well, forget it. It's never going to get to 100%.
    True, Strings aren't countable (ref: Cantor's diagonalization proof). I rest my case.

    kind regards,

    Jos (<--- awake now)
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Replies: 4
    Last Post: 05-21-2013, 09:21 AM
  2. Replies: 1
    Last Post: 03-25-2012, 09:25 PM
  3. Linked List, Array List time complexity
    By Rick99771977 in forum New To Java
    Replies: 4
    Last Post: 08-18-2011, 05:37 AM
  4. how to create list of list in java ???
    By ilayaraja in forum Advanced Java
    Replies: 1
    Last Post: 10-26-2009, 04:30 PM
  5. Hot domains for sale with high appraisals
    By Bettypeng in forum Reviews / Advertising
    Replies: 0
    Last Post: 01-22-2008, 08:44 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •