Page 2 of 2 FirstFirst 12
Results 21 to 33 of 33
  1. #21
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default

    I'm trying to show him that regexes aren't evil, so that he can get rid of his multiple contains() calls ;)
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  2. #22
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,009
    Rep Power
    20

    Default

    Well, true...but let's be honest, they are evil...from the dawn of time, no less!

    Or possibly the 1950s...

  3. #23
    SwissR is offline Member
    Join Date
    Jul 2010
    Posts
    39
    Rep Power
    0

    Default

    Lol Regexes aren't evil. :)

    Im basically trying to say that if my resourceline contains only one character
    i.e. (a) or (b) etc etc then it is not a value i want to add.

    The values should be words so if resourcline is = 1 character

    and i want to add this in the if statement connected to my checks

    regards S

  4. #24
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default

    resourceline.length() < 2
    You're very vague here. "ab" ok? "aAa" ok? "1234a" not ok? "1324aa" ok?

    What is your exact spec? You need to be more precise.
    Last edited by PhHein; 07-28-2010 at 06:10 PM.
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

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

    Default

    Quote Originally Posted by SwissR View Post
    As for the Find method, i think when i joined up i was lucky enough to come accross something to start me off. It was kind of along the lines of what I wanted to do, just a bit smaller scale.
    It's nice to see how my code travels back and forth without any credits at all. b.t.w. what smaller scale?

    kind regards,

    Jos

  6. #26
    SwissR is offline Member
    Join Date
    Jul 2010
    Posts
    39
    Rep Power
    0

    Default

    Basically if any value bit a-z,A-Z,0-9 if its only one individual charater in length then just dont add it.

    lol to JosAh, thank you for your wonderful piece of enlightenment that has helped me alont the way of constructing this program.... would you like me to send you a cookie lol :)
    jks, but seriously thank you.
    I dont rli know how to find ppl on here atm, im still getting used to it. But now that you've announced yourself...Hi and thankyou very much.

    When i said smaller scale the other guy seemed to be reading in a file and then writing some output to it. In my program im reading in an entire folders contents and there are more constrictions as to what data can pass through the array etc.

    Thats all i meant, thats probably no different in your eyes though. With you guys being the super duper people around here :)

    I do appreciate all the help

  7. #27
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default

    Could you please stop posting sms spk, that's really annoying.
    add
    Java Code:
    resourceline.length() > 1
    to your if statement.
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  8. #28
    SwissR is offline Member
    Join Date
    Jul 2010
    Posts
    39
    Rep Power
    0

    Default

    Sorry, I didn't actually realise that I was doing it. I send so many texts lately it's becoming a nasty little habit.

    I'll try not to do it again in future posts :)

    Lol also by adding the resourceline.length() > 1 line it would have removed all the values consisting of more than once character lol. Which is everything i do want a simple change to <=2 worked though so thank you.

    I looked through the string API domentation for this and everything pointed to index of. I knew this is not what I wanted but im a little worried that it wasnt what I was looking for.

    Am I searching for related content in the wrong way, im a little concerned that im not being able to find this stuff out on certain occasions myself.

    Does sun provide a helpdesk etc aswel. I.e. is it possible to email someone a question relating to Java and then get a response directly in the same kind of way as a forum.

    Or is a forum the best approach? It may sound stupid but im just curious.
    regards

    S
    Last edited by SwissR; 07-29-2010 at 09:35 AM.

  9. #29
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default

    Quote Originally Posted by SwissR View Post
    I looked through the string API domentation for this and everything pointed to index of. I knew this is not what I wanted but im a little worried that it wasnt what I was looking for.

    Am I searching for related content in the wrong way, im a little concerned that im not being able to find this stuff out on certain occasions myself.

    Does sun provide a helpdesk etc aswel. I.e. is it possible to email someone a question relating to Java and then get a response directly in the same kind of way as a forum.
    No, they don't. They are called consultants ;)

    Via forums you get a much wider audience and often better replies, because we correct each other on the forums when seeing wrong or inaccurate replies. You won't get that when asking one person.
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  10. #30
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,009
    Rep Power
    20

    Default

    Quote Originally Posted by PhHein View Post
    No, they don't. They are called consultants ;)

    Via forums you get a much wider audience and often better replies, because we correct each other on the forums when seeing wrong or inaccurate replies. You won't get that when asking one person.
    Unless that person is Jos.
    He does use that split personality example a little too often...I suspect he argues with himself frequently.
    ;)

  11. #31
    SwissR is offline Member
    Join Date
    Jul 2010
    Posts
    39
    Rep Power
    0

    Default

    Lol, oh ok i was just wondering. I work for a small oracle partner specialising on the printing side and Enterprise content management.

    But we also do web based solutions and different bits and pieces, so im always doing different things. I havn't been with the company long and Java is pretty new to me but im gradually picking it up.

    Unfortunately im teaching myself and only have the options of taking various UCM courses etc so I don't generally have the option of being lucky enough to have a mentor or consultant.

    Forums seem pretty awesome tho. Occasionally i noticed people get annoyed with helping which can be a bit dissheartening at times. But generally people seem nice and helpful.

    I'd like to just sponge as much as i can to be honest but with so much stuff (you literally have no idea how much, well you might) thrown at you at once, Sometimes it's crazy how much you have to absorb.

    Do u ever come in and feel like one day ur heads going to explode.. lol

    regards S

  12. #32
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default

    Quote Originally Posted by Tolls View Post
    Unless that person is Jos.
    He does use that split personality example a little too often...I suspect he argues with himself frequently.
    ;)
    Only if he starts mixing Grolsch and Genever ;)
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

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

    Default

    Quote Originally Posted by PhHein View Post
    Only if he starts mixing Grolsch and Genever ;)
    Blasphemy! I never do that! I always keep the two in separate glasses! And my schizophrenic example is only used for recursion! I'm perfectly normal, ask my medical doctor and shrink!

    kind regards,

    Jos ;-)

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Writing the data into RandomAccessFile
    By vasavi.singh in forum New To Java
    Replies: 5
    Last Post: 01-31-2013, 07:12 AM
  2. Replies: 3
    Last Post: 07-28-2010, 02:49 PM
  3. Dont use this program, Im warning you!
    By Addez in forum JCreator
    Replies: 3
    Last Post: 11-28-2009, 07:18 PM
  4. Data Files - A problem that I dont understand :D
    By Exhonour in forum New To Java
    Replies: 7
    Last Post: 01-20-2009, 05:13 AM
  5. Writing Data or Objects?
    By Goodwine in forum New To Java
    Replies: 2
    Last Post: 11-26-2008, 12:36 AM

Posting Permissions

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