As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

[chat]zilla

1246781

Posts

  • Options
    KalkinoKalkino Buttons Londres Registered User regular
    Doge coin really pleases me

    Freedom for the Northern Isles!
  • Options
    bloodyroarxxbloodyroarxx Casa GrandeRegistered User regular
    update Fiancee's hand is ok nothing broken

    Probably going to lose a nail or 2 but nothing she hasnt dealt with before

  • Options
    EchoEcho ski-bap ba-dapModerator mod
    edited December 2013
    Chanus wrote: »

    Obama admin announces an initiative to ass

    Echo on
  • Options
    kedinikkedinik Captain of Industry Registered User regular
    edited December 2013
    Okay, I'm within a method that's being called from the main method. Don't worry about the HashSet stuff, I'm just trying to get this thing to read from a file.
    public static void writeFileToHashTable(HashSet names, String inputFilePath) throws FileNotFoundException
    {
         File inputFile = new File(inputFilePath);
         Scanner in = new Scanner(inputFile);
    
         while (in.hasNext())
         {
              String test = in.next();
              System.out.println(test);
         }
         in.close();
    }
    

    I know the filepath is working properly, because I've doublechecked the filepath and also it would throw the FileNotFound Exception if the filepath was wrong. I know there's content in the .txt file it's reading from. I can't figure out why the damn thing won't print anything. Am I missing something obvious?

    My java knowledge is spotty, but are you set up to catch the exception if it's thrown, or would your IDE notify you of it regardless?

    kedinik on
    I made a game! Hotline Maui. Requires mouse and keyboard.
  • Options
    ChanusChanus Harbinger of the Spicy Rooster Apocalypse The Flames of a Thousand Collapsed StarsRegistered User regular
    Gim wrote: »
    Chanus wrote: »
    So It Goes wrote: »
    Chanus wrote: »
    So It Goes wrote: »
    gross I hate jam music

    just because it's boring and terrible i bet

    I don't necessarily mind that style of music but I just need it in much smaller doses

    I was way into Phish back in the late 90s

    Then I stopped smoking pot

    Funny how it was no longer awesome to listen to 20 minute noodley songs after that

    What are your thoughts on the Grateful Dead?

    Similar, though I still think American Beauty and Workingman's Dead are listenable albums

    Allegedly a voice of reason.
  • Options
    bloodyroarxxbloodyroarxx Casa GrandeRegistered User regular
    oh shit the Steam xmas sale starts on my birthday

  • Options
    Hi I'm Vee!Hi I'm Vee! Formerly VH; She/Her; Is an E X P E R I E N C E Registered User regular
    Chanus wrote: »
    Okay, I'm within a method that's being called from the main method. Don't worry about the HashSet stuff, I'm just trying to get this thing to read from a file.
    public static void writeFileToHashTable(HashSet names, String inputFilePath) throws FileNotFoundException
    {
         File inputFile = new File(inputFilePath);
         Scanner in = new Scanner(inputFile);
    
         while (in.hasNext())
         {
              String test = in.next();
              System.out.println(test);
         }
         in.close();
    }
    

    I know the filepath is working properly, because I've doublechecked the filepath and also it would throw the FileNotFound Exception if the filepath was wrong. I know there's content in the .txt file it's reading from. I can't figure out why the damn thing won't print anything. Am I missing something obvious?

    System.out.println prints to the terminal, I think. I think printing to a file is a different thing like PrintWriter I think it's called

    Oh yeah, I'm trying to print to the terminal, just so I can immediately see what's going on. The problem is that this isn't even printing to the terminal; there's no output at all.

    vRyue2p.png
  • Options
    y2jake215y2jake215 certified Flat Birther theorist the Last Good Boy onlineRegistered User regular
    So It Goes wrote: »
    ok gimme your hot accessible jams for a party playlist plz

    we talkin like, katy perry california gurls jam party or like, hard jamz with a z

    http://www.youtube.com/watch?v=SPxkp2F-nAQ

    http://www.youtube.com/watch?v=_aZ-YRoJrnQ

    http://www.youtube.com/watch?v=2Z3mYRGMWu0

    http://www.youtube.com/watch?v=Zk-SDreueMw

    C8Ft8GE.jpg
    maybe i'm streaming terrible dj right now if i am its here
  • Options
    MentalExerciseMentalExercise Indefenestrable Registered User regular
    edited December 2013
    kedinik wrote: »
    Okay, I'm within a method that's being called from the main method. Don't worry about the HashSet stuff, I'm just trying to get this thing to read from a file.
    public static void writeFileToHashTable(HashSet names, String inputFilePath) throws FileNotFoundException
    {
         File inputFile = new File(inputFilePath);
         Scanner in = new Scanner(inputFile);
    
         while (in.hasNext())
         {
              String test = in.next();
              System.out.println(test);
         }
         in.close();
    }
    

    I know the filepath is working properly, because I've doublechecked the filepath and also it would throw the FileNotFound Exception if the filepath was wrong. I know there's content in the .txt file it's reading from. I can't figure out why the damn thing won't print anything. Am I missing something obvious?

    My java knowledge is spotty, but are you set up to catch the exception if it's thrown, or would your IDE notify you of it regardless?

    An uncaught exception will filter out until it terminates the program.

    I'd look at the documentation for scanner.in first thing.

    MentalExercise on
    "More fish for Kunta!"

    --LeVar Burton
  • Options
    DeebaserDeebaser on my way to work in a suit and a tie Ahhhh...come on fucking guyRegistered User regular
    oh shit the Steam xmas sale starts on my birthday

    Subtle

  • Options
    ChanusChanus Harbinger of the Spicy Rooster Apocalypse The Flames of a Thousand Collapsed StarsRegistered User regular
    Chanus wrote: »
    Okay, I'm within a method that's being called from the main method. Don't worry about the HashSet stuff, I'm just trying to get this thing to read from a file.
    public static void writeFileToHashTable(HashSet names, String inputFilePath) throws FileNotFoundException
    {
         File inputFile = new File(inputFilePath);
         Scanner in = new Scanner(inputFile);
    
         while (in.hasNext())
         {
              String test = in.next();
              System.out.println(test);
         }
         in.close();
    }
    

    I know the filepath is working properly, because I've doublechecked the filepath and also it would throw the FileNotFound Exception if the filepath was wrong. I know there's content in the .txt file it's reading from. I can't figure out why the damn thing won't print anything. Am I missing something obvious?

    System.out.println prints to the terminal, I think. I think printing to a file is a different thing like PrintWriter I think it's called

    Oh yeah, I'm trying to print to the terminal, just so I can immediately see what's going on. The problem is that this isn't even printing to the terminal; there's no output at all.

    Oh

    Put test in quotes

    it thinks test is a method/object/i forget which is the right term

    Allegedly a voice of reason.
  • Options
    AngelHedgieAngelHedgie Registered User regular
    Chanus wrote: »
    Okay, I'm within a method that's being called from the main method. Don't worry about the HashSet stuff, I'm just trying to get this thing to read from a file.
    public static void writeFileToHashTable(HashSet names, String inputFilePath) throws FileNotFoundException
    {
         File inputFile = new File(inputFilePath);
         Scanner in = new Scanner(inputFile);
    
         while (in.hasNext())
         {
              String test = in.next();
              System.out.println(test);
         }
         in.close();
    }
    

    I know the filepath is working properly, because I've doublechecked the filepath and also it would throw the FileNotFound Exception if the filepath was wrong. I know there's content in the .txt file it's reading from. I can't figure out why the damn thing won't print anything. Am I missing something obvious?

    System.out.println prints to the terminal, I think. I think printing to a file is a different thing like PrintWriter I think it's called

    Oh yeah, I'm trying to print to the terminal, just so I can immediately see what's going on. The problem is that this isn't even printing to the terminal; there's no output at all.

    Have you stepped through to see what is being put into test?

    XBL: Nox Aeternum / PSN: NoxAeternum / NN:NoxAeternum / Steam: noxaeternum
  • Options
    ShivahnShivahn Unaware of her barrel shifter privilege Western coastal temptressRegistered User, Moderator mod
    I don't know Java, but in C++ you send stuff to the buffer and it won't always print until it hits an end of line command.

  • Options
    So It GoesSo It Goes We keep moving...Registered User regular
    jake I had to reject all of those except boys noize who is da best

  • Options
    Hi I'm Vee!Hi I'm Vee! Formerly VH; She/Her; Is an E X P E R I E N C E Registered User regular
    kedinik wrote: »
    Okay, I'm within a method that's being called from the main method. Don't worry about the HashSet stuff, I'm just trying to get this thing to read from a file.
    public static void writeFileToHashTable(HashSet names, String inputFilePath) throws FileNotFoundException
    {
         File inputFile = new File(inputFilePath);
         Scanner in = new Scanner(inputFile);
    
         while (in.hasNext())
         {
              String test = in.next();
              System.out.println(test);
         }
         in.close();
    }
    

    I know the filepath is working properly, because I've doublechecked the filepath and also it would throw the FileNotFound Exception if the filepath was wrong. I know there's content in the .txt file it's reading from. I can't figure out why the damn thing won't print anything. Am I missing something obvious?

    My java knowledge is spotty, but are you set up to catch the exception if it's thrown, or would your IDE notify you of it regardless?

    My experience has been that my IDE terminates the program if it throws a FileNotFoundException.

    I've checked and re-checked the file, though, and it's present, with the correct name, and it has content.

    I'll try a different txt file and see if that works, but I think the issue is with the programming somewhere.

    vRyue2p.png
  • Options
    bloodyroarxxbloodyroarxx Casa GrandeRegistered User regular
    edited December 2013
    Deebaser wrote: »
    oh shit the Steam xmas sale starts on my birthday

    Subtle

    oh god no, I have a large enough backlog as it is

    I dont need anymore games, also there is nothing out there that interests me.

    I was hoping to pick up South Park for my birthday but it got pushed back till Spring.

    bloodyroarxx on
  • Options
    So It GoesSo It Goes We keep moving...Registered User regular
    that old guy dances like Dee

    the hula hooper is hot

  • Options
    Nova_CNova_C I have the need The need for speedRegistered User regular
    I bought a four pack of Starbound for me and my friends. One of 'em was all, "Now I need to get you something." I, of course, said he didn't have to, and I wasn't expecting anything like that.

    About 20 mins later he asks, "So, what's a game you've been thinking about getting, but haven't?" I repeated that he really doesn't need to do that. "Oh, no, I'm not planning on getting you a game or anything."

    Yeah. I said, "Oh, very subtle. I have no idea what you're planning, not at all."

  • Options
    GimGim a tall glass of water Registered User regular
    I will nominate the Robert Randolph song from the last page as party music, though it is inoffensive and most likely classifies as parent rock.

  • Options
    ChanusChanus Harbinger of the Spicy Rooster Apocalypse The Flames of a Thousand Collapsed StarsRegistered User regular
    ignore that last thing i wrote VH it was dumb because i didn't see test is a String you declared

    Allegedly a voice of reason.
  • Options
    bloodyroarxxbloodyroarxx Casa GrandeRegistered User regular
    oh shit that new LoL login screen

  • Options
    y2jake215y2jake215 certified Flat Birther theorist the Last Good Boy onlineRegistered User regular
    So It Goes wrote: »
    jake I had to reject all of those except boys noize who is da best

    i just throwin things out there, i'll think of more stuff like boys noize

    knew birdy nam nam was a stretch didn't really think you'd be throwing a spring breakers esque banger

    C8Ft8GE.jpg
    maybe i'm streaming terrible dj right now if i am its here
  • Options
    bloodyroarxxbloodyroarxx Casa GrandeRegistered User regular
    fuck 7800 ip for the new champ

  • Options
    EchoEcho ski-bap ba-dapModerator mod
    oh shit that new LoL login screen

    He built a really shitty house with his sword.

  • Options
    Hi I'm Vee!Hi I'm Vee! Formerly VH; She/Her; Is an E X P E R I E N C E Registered User regular
    Okay, I've narrowed it down a bit. I changed the system.out line to System.out.println(": " + test);

    Which should have produced, at the very least, a bunch of lines of ": "

    But nothing's being outputted, so I think the issue is that the program is, for some reason, immediately setting in.hasNext() to false, so the while loop never occurs. Still not sure why this is, though.

    vRyue2p.png
  • Options
    21stCentury21stCentury Call me Pixel, or Pix for short! [They/Them]Registered User regular
    LOL, I still feel guilty about playing a video game when I have finals soon...

    But i studied all day, I should be okay monday...

    Agh...

  • Options
    TavTav Irish Minister for DefenceRegistered User regular
    what filepath are you using? I think with Java you need to use double slashes because of escaping

    so your filepath will be like "\\Users\\Documents\\Mytext.txt"

  • Options
    Hi I'm Vee!Hi I'm Vee! Formerly VH; She/Her; Is an E X P E R I E N C E Registered User regular
    Okay, the problem is with the file somehow. I tried it on a different text file and it worked perfectly.

    vRyue2p.png
  • Options
    ChanusChanus Harbinger of the Spicy Rooster Apocalypse The Flames of a Thousand Collapsed StarsRegistered User regular
    weird

    maybe there's a space in the file or something so when it first reads it it doesn't see anything there?

    Allegedly a voice of reason.
  • Options
    QuidQuid Definitely not a banana Registered User regular
    Whoo! That was fun.

  • Options
    Hi I'm Vee!Hi I'm Vee! Formerly VH; She/Her; Is an E X P E R I E N C E Registered User regular
    Chanus wrote: »
    weird

    maybe there's a space in the file or something so when it first reads it it doesn't see anything there?

    It starts with "The name Shakespeare..." and goes on for awhile, but there's no space in the beginning or anything. As far as I can tell it's no different from the other text file I used, aside from having different words, obviously.

    Fuck me this is so stupid.

    vRyue2p.png
  • Options
    ShivahnShivahn Unaware of her barrel shifter privilege Western coastal temptressRegistered User, Moderator mod
    Quid wrote: »
    Whoo! That was fun.

    WHAT DID YOU DO

    What you call fun I call sin

  • Options
    DelmainDelmain Registered User regular
    Okay, the problem is with the file somehow. I tried it on a different text file and it worked perfectly.

    That's strange.

  • Options
    kedinikkedinik Captain of Industry Registered User regular
    Chanus wrote: »
    weird

    maybe there's a space in the file or something so when it first reads it it doesn't see anything there?

    It starts with "The name Shakespeare..." and goes on for awhile, but there's no space in the beginning or anything. As far as I can tell it's no different from the other text file I used, aside from having different words, obviously.

    Fuck me this is so stupid.

    http://threepanelsoul.com/2013/04/15/on-infinite-loops/

    I made a game! Hotline Maui. Requires mouse and keyboard.
  • Options
    Shazkar ShadowstormShazkar Shadowstorm Registered User regular
    @so it goes the solution is be lazy and put on correct songza playlist

    poo
  • Options
    MentalExerciseMentalExercise Indefenestrable Registered User regular
    Chanus wrote: »
    weird

    maybe there's a space in the file or something so when it first reads it it doesn't see anything there?

    It starts with "The name Shakespeare..." and goes on for awhile, but there's no space in the beginning or anything. As far as I can tell it's no different from the other text file I used, aside from having different words, obviously.

    Fuck me this is so stupid.

    Are the files in the same directory?

    "More fish for Kunta!"

    --LeVar Burton
  • Options
    TaminTamin Registered User regular
    Chanus wrote: »
    weird

    maybe there's a space in the file or something so when it first reads it it doesn't see anything there?

    It starts with "The name Shakespeare..." and goes on for awhile, but there's no space in the beginning or anything. As far as I can tell it's no different from the other text file I used, aside from having different words, obviously.

    Fuck me this is so stupid.

    Nothing screwy with the permissions of the file or the directory in question, I assume?

  • Options
    y2jake215y2jake215 certified Flat Birther theorist the Last Good Boy onlineRegistered User regular
    edited December 2013
    i can't really think of other boys noizes so...

    www.youtube.com/ watch?v=-CreEuaS8QY

    (beware the video has a lot of random boobs i think despite not seeming like it should)
    e: goddammit the still has to be a boob.

    http://www.youtube.com/watch?v=1Vh0iP5BziQ

    http://www.youtube.com/watch?v=ftSUchAdVTE
    (i just love this album so i'm putting the most partyish song)


    and the no. 1 party song ever

    http://www.youtube.com/watch?v=aINmJ5ieM6Y

    y2jake215 on
    C8Ft8GE.jpg
    maybe i'm streaming terrible dj right now if i am its here
  • Options
    DasUberEdwardDasUberEdward Registered User regular
    y2jake215 wrote: »
    So It Goes wrote: »
    ok gimme your hot accessible jams for a party playlist plz

    we talkin like, katy perry california gurls jam party or like, hard jamz with a z

    http://www.youtube.com/watch?v=SPxkp2F-nAQ

    http://www.youtube.com/watch?v=_aZ-YRoJrnQ

    http://www.youtube.com/watch?v=2Z3mYRGMWu0

    http://www.youtube.com/watch?v=Zk-SDreueMw

    lo that boys noize is pretty sweet

    steam_sig.png
  • Options
    OrganichuOrganichu poops peesRegistered User, Moderator mod
    jake you should break that first url in two, the thumbnail is bewbs

This discussion has been closed.