Type: Posts; User: ProgrammablePeter

Search: Search took 0.25 seconds.

  1. Removing from a ListView w/ PopupMenu

    Basically, I have a slight problem with interprating a remove feature. The user clicks on a button that is in the ListView, a PopupMenu is then promted and displays "Unfriend", "Unfollow", "Messgae"...
  2. Re: ArrayIndexOutOfBounds in Android - help with debuuging

    I cracked the problem. It was occurring at line 62:
    friendList.add(new Friend(nameBlock[i], descBlock[i], imageBlock[i]));

    The reason: I have an xml. string-array that had 1 value. And I was...
  3. ArrayIndexOutOfBounds in Android - help with debuuging

    public class MainActivity extends ListActivity {
    private ArrayList<Friend> friendList;
    private EditText et;
    private int[] imageBlock;
    private String[] nameBlock;
    private String[] descBlock;...
  4. Why does my lecturer use the key word ".this"

    I've never actually understood what they key word ".this" is in Java, my lecturer seems to use it in every single place in his code. And when I asked him, he just said "I don't really know myself" ...
  5. Replies

    Id counter

    What I'm trying to do here is apply id's to all of the Vehicle's objects in my program.

    When a vehicle is added the counter should turn to 1... and increment every time a vehicle is added.

  6. Replies

    [SOLVED] Searching a Stach

    Not sure how to implement this. I basically want to search a Stack for a particular Object value

    Could someone provide an example of how to achieve this. Plain english? Possibly some PSUEDO
  7. Replies

    Re: Replacing Node Value

    public Node replace(Object data, Object value) {
    Node current = head;

    while(current != null) {
    if(current.getData() == data) {
    return current;
  8. Replies

    Replacing Node Value

    Hey Guys, Could somebody point me in the right direction to replacing a node in a linked list?

    I have no clue on where to start, thus. I have no code to supply.

    I current have, a destory...
  9. Re: How to get an Array of US cities?

    Cheers, I've used that way. Didn't realise I could do it from a text file, added them now. Cheers Kevin!
  10. How to get an Array of US cities?

    Is there a way in my preferred JAVA IDE (Eclipse/Netbeans) in which i can construct an array of US Cities. I'm creating a Tree in which the user can select a runnable server. So in this case, the...
  11. Commenting your code: RIGHT or WRONG way?

    From an experienced Programmers point of view, or any level of Programers point of view. What would be a right way of commenting your code. What should I note and what should I note? Is too much...
  12. Replies

    Re: Problem with Scanner

    Just out of curiosity what operating system are you running? 32-bit/64-bit?

    --- Update ---

    Wow that is super weird, I downloaded the file from pastebin that I uploaded and then slammed it into...
  13. Replies

    Re: Problem with Scanner

    database.txt -

    Thanks for helping man, appreciate it!
  14. Replies

    Re: Problem with Scanner

    That made it alot better, but still. I added a counter, notepad++ says there is 998 lines and the counter says there is 610 lines, 300 lines of the text file is missing! So frustrating!
  15. Replies

    Problem with Scanner

    So I have a text file which is 47 kb big, it includes database information.

    Basically I have a problem the scanner only seems to output up to a random line and then completely stop.

    Scanner x...
  16. Re: Input Validation - Take no Symbols or Numbers

    Not very helpful. I already know I need a while loop. But, I just don't know where it should be, or how it should be structured≈...
  17. Input Validation - Take no Symbols or Numbers

    So what I'm trying to do is take String input and validation to the following correspondences:

    1. Take no Digits "1234567890"
    2. Take no Symbols/Special Characters "!@$%^&*()"

  18. Problem with converting Numbers to Words! Kindly ask for help:(

    So the theory is, convert a number to the worded value. 1 = ONE 2 = TWO 3 = THREE etc.. If user enters anything over 5 then display the numerical value of its type. The problem is this:
    The output...
  19. Need help with formatting output - PLEASE HELP :(

    Basically all I'm after is to be able to format a String that is inputted by the user:

    For example:

    My code would look something like this:

    public class TestData {
    public static void...
  20. Re: Need help with making code more efficent! - PLEASE HELP:(

    Okay, thank-you for your advise. Greatly appreciated! and I have no idea why i'm passing in the variable premium when i'm changing it in the method. I study Computer Science 1st year, and we have...
  21. Re: Need help with making code more efficent! - PLEASE HELP:(

    Haha, thank-you. Sorry about that :/
  22. Need help with making code more efficent! - PLEASE HELP:(

    So basically, I am developing a program to calculate Annual and Monthly premiums for Insurance.

    I am a beginners level Java Programmer. Studying Computer Science. and here is my code.

Results 1 to 22 of 22