SumkindaPsycho's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
10 (0.01 per day)
Joined:
06-October 09
Profile Views:
1,100
Last Active:
User is offline Jul 22 2011 01:55 PM
Currently:
Offline

Previous Fields

Dream Kudos:
0

Latest Visitors

Icon   SumkindaPsycho has not set their status

Posts I've Made

  1. In Topic: qwerty help/question

    Posted 22 Jul 2011

    View PostGregBrannon, on 22 July 2011 - 01:33 PM, said:

    I was dozy and missed "on the same line of a qwerty keyboard."

    What are your ideas for solving?



    I was thinking either and array or string, but im not sure how to go about checking for whats adjacent? I was going to make a two dim array but then i thought about it, and wasnt sure if that was going to work.
  2. In Topic: qwerty help/question

    Posted 22 Jul 2011

    View PostGregBrannon, on 22 July 2011 - 10:46 AM, said:

    You're explanation of the assignment may not be complete or completely thought out. For example, which characters is the letter 'g' adjacent to on the qwerty keyboard? Are f, t, y, h, b, and v all adjacent to g? If that's the case, then you may have to develop a new lookup algorithm for each character that includes all physically adjacent characters.

    What are you thinking? What tools are you comfortable with: arrays, hash maps, or what other collections?


    Im usually pretty understanding with arrays, even how to store the data to text files things like that. Would a string be possible and then just use the scan utility? Im a little foggy when it comes to hash maps. Would it be easier if i attached the full problem on here? I actually have a link to the same problem that I found on a website. http://www.codechef....oblems/DDILEMMA



    -Thanks a bunch!

    View Postipushmycar, on 22 July 2011 - 10:38 AM, said:

    Do you have to do this in Java? Python seems easier.



    yes unfortunately.
  3. In Topic: Question on How to prohibit spaces

    Posted 22 Jul 2011

    While (thx = Thank You Guys!)

    {
    System.out.println(thx);
    }

    Thank You Guys! dunno if thats right but i think im close.... but thanks guys! :bananaman: :gunsmilie: :shuriken: :smartass: :rolleyes:
  4. In Topic: Question on How to prohibit spaces

    Posted 22 Jul 2011

    View Postg00se, on 22 July 2011 - 02:48 AM, said:

    Quote

    if(textField.getText().trim().length() == 0) should do the trick without all a custom


    Nope, that will only remove terminating spaces. Assuming you do it properly, removing spaces throughout the entire string, you're then going to have to display a message to the user explaining why the result is different from the input. Then - are you going to force the user to have what you selected? They might not want your result. So then you'd have to warn them you're about to change their choice and ask them if it's ok.

    The above is assuming you use the code to provide the ability for the user to choose credentials in the first place. Of course, if you don't, then their space-laden input simply won't match the credentials and that's their own hard luck. In that case, you don't actually need to do anything anyway


    Thanks goose, but im not sure i know how to go about that plainDocument? is there a tutorial on here, dont believe ive ever done that before...
  5. In Topic: Question on How to prohibit spaces

    Posted 21 Jul 2011

    View PostfromTheSprawl, on 21 July 2011 - 06:31 PM, said:

    Get the input string, loop through it and check if there's a space. If there is, throw an exception or just make a do while loop.





    ok, thanks wow totally forgot about those, ive been doing too much CL. My java kind of disappeared from my brain. Im sure theres a tutorial on that some where on here. Thanks!

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Click here to e-mail me

Friends

Comments

SumkindaPsycho has no profile comments yet. Why not say hello?