Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 299 300 [301] 302 303 ... 796

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 902560 times)

MadocComadrin

  • Bay Watcher
  • A mysterious laboratory goblin!
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4500 on: June 14, 2013, 05:11:39 pm »

Yes, that's true: I was mainly using the Fib series as an example, and I wasn't sure if making a note about there being better ways to calculate the Fibonacci series--especially if you're generating the whole series up to a certain number or are using it sparingly--would confuse the issue. In fact, if you recall, I had made a post earlier in the thread self-warning that trying to use dynamic programming for simple issues can lead to inefficient solutions.
Logged

Zanzetkuken The Great

  • Bay Watcher
  • The Wizard Dragon
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4501 on: June 14, 2013, 05:16:40 pm »

How do I add new libraries to java so my program will compile?  I cannot find anything to help me with this.
Logged
Quote from: Eric Blank
It's Zanzetkuken The Great. He's a goddamn wizard-dragon. He will make it so, and it will forever be.
Quote from: 2016 Election IRC
<DozebomLolumzalis> you filthy god-damn ninja wizard dragon

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4502 on: June 14, 2013, 05:29:32 pm »

How do I add new libraries to java so my program will compile?  I cannot find anything to help me with this.
I'll assume you're using Eclipse. In that case, right-click on your project folder in the package explorer, look under Build Path, and click either Add External Archive or Add Library (depending on what you're using).
Logged

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #4503 on: June 14, 2013, 05:39:03 pm »

As an aside, did anybody else notice this announcement a couple of months ago? JetBrains. Doing C++ IDE.

Awww yeah. Now, JetBrains for those who don't know did IntelliJ and Resharper. IntelliJ is by far the best Java IDE simply due to it's incredible refactoring support, able to automate a lot of nifty things like bringing functions out into other classes, and Resharper brings that refactoring support to C# as a Visual Studio plugin (but ain't free sadly). And they're bringing their refactoring voodoo to C++? The lack of such tools is the biggest problem with C++ development atm for me, so...awww yeeeaaah :D
Logged

Zanzetkuken The Great

  • Bay Watcher
  • The Wizard Dragon
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4504 on: June 14, 2013, 05:40:45 pm »

How do I add new libraries to java so my program will compile?  I cannot find anything to help me with this.
I'll assume you're using Eclipse. In that case, right-click on your project folder in the package explorer, look under Build Path, and click either Add External Archive or Add Library (depending on what you're using).

I'm not using Eclipse.  I'm using a compiler by the name of Jgrasp, because I have dial-up, and it takes me nearly an hour to download a 10mb file like Dwarf Fortress.
Logged
Quote from: Eric Blank
It's Zanzetkuken The Great. He's a goddamn wizard-dragon. He will make it so, and it will forever be.
Quote from: 2016 Election IRC
<DozebomLolumzalis> you filthy god-damn ninja wizard dragon

Stargrasper

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4505 on: June 14, 2013, 10:18:31 pm »

How do I add new libraries to java so my program will compile?  I cannot find anything to help me with this.
I'll assume you're using Eclipse. In that case, right-click on your project folder in the package explorer, look under Build Path, and click either Add External Archive or Add Library (depending on what you're using).

I'm not using Eclipse.  I'm using a compiler by the name of Jgrasp, because I have dial-up, and it takes me nearly an hour to download a 10mb file like Dwarf Fortress.

I took a quick look at jgrasp.  Looks like to add external libraries, you need to follow Settings->PATH/CLASSPATH and select the Classpaths tab.  From there, press the New button and browse to the library.

In Java, to add things like libraries, you need to place them into the classpath.  IDEs, thankfully, pretty much always have some means to do this partially for you once you tell it what libraries you want.  If you're ever using an unfamiliar IDE, just look for something labelled classpath.
Logged

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4506 on: June 15, 2013, 06:37:20 am »

I have dial-up, and it takes me nearly an hour to download a 10mb file like Dwarf Fortress.
And to think my connection was slow... Do you have that connection speed because you don't need any faster, or because you don't have anything better available where you live?
Logged

Zanzetkuken The Great

  • Bay Watcher
  • The Wizard Dragon
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4507 on: June 15, 2013, 10:40:41 am »

I have dial-up, and it takes me nearly an hour to download a 10mb file like Dwarf Fortress.
And to think my connection was slow... Do you have that connection speed because you don't need any faster, or because you don't have anything better available where you live?

Nothing better, apparently.  What is worse is my neighbor has wi-fi...

Managed to get Eclipse via download from the library, though.
Logged
Quote from: Eric Blank
It's Zanzetkuken The Great. He's a goddamn wizard-dragon. He will make it so, and it will forever be.
Quote from: 2016 Election IRC
<DozebomLolumzalis> you filthy god-damn ninja wizard dragon

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #4508 on: June 15, 2013, 11:24:29 am »

This error is confusing me terribly, in C++.

Code: [Select]
//// Header
#include <map>
typedef std::pair<int,int> coord;

class node
{/* stuff */
};

/* ... */

//////// Cpp file.
vector<coord> Pather::path(const coord& starting, const coord& destination, const double waveResistance)
  {
  map<coord, node> closedset;
  map<coord, node> openset;

  coord start = starting;
  coord dest = destination;
  openset[start] = node(start, 0, heuristic(start, dest), true);

  /* LOGIC */
  }

Causes the errors
Spoiler (click to show/hide)

What in the world would prevent map<coord, node> from being legal? ._. Been on this for like 20 minutes. Making it more perplexing is the fact that it worked just fine in a different file with near identical everything, including context and class construction.


Edit: NVM, apparently it's a naming conflict >_>
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Zanzetkuken The Great

  • Bay Watcher
  • The Wizard Dragon
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4509 on: June 15, 2013, 03:59:07 pm »

I've been trying to use this tutorial in order to get the basics of how to program a rougelike game, but for some reason, despite it apparently working for the person who wrote the tutorial, the following segment of code, specifically the bolded portion, isn't working.


Spoiler: Error (click to show/hide)

What is going on?
« Last Edit: June 15, 2013, 05:16:06 pm by Zanzetkuken The Great »
Logged
Quote from: Eric Blank
It's Zanzetkuken The Great. He's a goddamn wizard-dragon. He will make it so, and it will forever be.
Quote from: 2016 Election IRC
<DozebomLolumzalis> you filthy god-damn ninja wizard dragon

olemars

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4510 on: June 15, 2013, 04:18:39 pm »

You'll need to copy and paste the actual errors, or at least the details of the problem, to get any meaningful answers to that.
Logged

Zanzetkuken The Great

  • Bay Watcher
  • The Wizard Dragon
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4511 on: June 15, 2013, 05:16:33 pm »

You'll need to copy and paste the actual errors, or at least the details of the problem, to get any meaningful answers to that.

Edited to include the error.
Logged
Quote from: Eric Blank
It's Zanzetkuken The Great. He's a goddamn wizard-dragon. He will make it so, and it will forever be.
Quote from: 2016 Election IRC
<DozebomLolumzalis> you filthy god-damn ninja wizard dragon

Mego

  • Bay Watcher
  • [PREFSTRING:MADNESS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4512 on: June 15, 2013, 05:25:41 pm »

Looked at the code found here.

Code: [Select]
public WSwingConsoleInterface(String windowName, Properties configuration)

This is the class you want.
« Last Edit: June 15, 2013, 05:28:24 pm by Mego »
Logged

Zanzetkuken The Great

  • Bay Watcher
  • The Wizard Dragon
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4513 on: June 15, 2013, 06:07:43 pm »

Looked at the code found here.

Code: [Select]
public WSwingConsoleInterface(String windowName, Properties configuration)

This is the class you want.

Wait, where do I put that class?  In the WSwingConsoleInterface.java or somewhere else?
Logged
Quote from: Eric Blank
It's Zanzetkuken The Great. He's a goddamn wizard-dragon. He will make it so, and it will forever be.
Quote from: 2016 Election IRC
<DozebomLolumzalis> you filthy god-damn ninja wizard dragon

Mego

  • Bay Watcher
  • [PREFSTRING:MADNESS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #4514 on: June 15, 2013, 06:16:43 pm »

No, use it instead of the Property class. The tutorial is outdated.
Pages: 1 ... 299 300 [301] 302 303 ... 796