Forum: Java Jan 14th, 2009 |
| Replies: 8 Views: 1,293 Ah, so then calculate M, as defined by the wikipedia site (http://en.wikipedia.org/wiki/Magic_square) Salem provided and ensure the calculated sums match M? |
Forum: Java Jan 14th, 2009 |
| Replies: 5 Views: 447 Oh I didn't mean that your post wasn't called for ~s.o.s~, I certainly respect a featured poster such as yourself. I actually skimmed the original post and didn't notice he mentioned JavaScript hehe.... |
Forum: Java Jan 14th, 2009 |
| Replies: 8 Views: 1,293 Oh gosh, your code is rather confusing... I think it's because I'm not sure what your methods and variable are meant to do. If the algo is taking that long to compute the answer (does it give the... |
Forum: Java Jan 13th, 2009 |
| Replies: 4 Views: 1,303 Hmmm, so you're developing a web application using JavaEE hey? So depending on whatever the user typed in web form, you want to search for a matching city... then the SQL statement you have will not... |
Forum: Java Jan 13th, 2009 |
| Replies: 5 Views: 447 I'm a bit perplexed... since this topic is in the Java forum I'm assuming that some Java programming is involved. As such, I'm imagining a Java Applet since we're speaking about something that's web... |
Forum: Java Jan 13th, 2009 |
| Replies: 8 Views: 1,293 I'd like to help... but I have no knowledge of magic squares or the mentioned algorithm... or perhaps I do and it just sounds foreign. Care to explain what a magic square is? An example would... |
Forum: Java Jan 13th, 2009 |
| Replies: 6 Views: 995 Please marked this post as solved, thank you. |
Forum: Java Jan 13th, 2009 |
| Replies: 4 Views: 1,303 I'm not sure why you said 'no,' sillyboy? But yes, since chicago1985 instantiated the object to null, there wouldn't be anything to 'get.'
What concerns me is that he actually declared the... |
Forum: C# Jan 8th, 2009 |
| Replies: 11 Views: 136,682 Hmmm, perhaps I'm mistaken but there are no 'Excel databases.' I think you simply wish to read from an Excel file > that is, a spreadsheet. In which case, there are probably (or rather must be) API's... |
Forum: Java Dec 18th, 2008 |
| Replies: 12 Views: 1,058 When I said, 'Where ... refers to the code after the line String s = inFile.readLine();' I meant all of the code. A loop will allow for a set of instructions to be executed 0, 1 or more times. If all... |
Forum: Java Dec 17th, 2008 |
| Replies: 13 Views: 1,291 Oh! So that's what that was :D hehe it shouldn't be in an if statement though. |
Forum: Java Dec 17th, 2008 |
| Replies: 13 Views: 1,291 uh hum I just gave you the answer! If you run the loop I gave you and set n to 100 you'll see that comp will have a final value of 4950.
But the idea is rather simple, you can count individual... |
Forum: Java Dec 17th, 2008 |
| Replies: 13 Views: 1,291 I wouldn't say your code is wrong... like I said, the selection sort can be done in many ways. Here's the algo from Wikipedia (http://en.wikipedia.org/wiki/Selection_sort):
for i ← 0 to n-2 do
... |
Forum: Java Dec 17th, 2008 |
| Replies: 12 Views: 1,058 Aww I can see that you need sleep hehe you'd need a looping structure to read the entire file! I guess I could have given you a better hint!
The basic idea is that you'd read from the file while... |
Forum: Java Dec 17th, 2008 |
| Replies: 13 Views: 1,291 Oh!! My bad, I completely read the question incorrectly... actually I was so off I wonder how I managed to confuse myself that much lol
You aren't keep track of the number of comparisons you're... |
Forum: Java Dec 17th, 2008 |
| Replies: 12 Views: 1,058 Oh yes I was actually going to comment on that. As it stands your program would only cater for the first line because you're only asking it to read the first line. In order to read the entire file... |
Forum: Java Dec 17th, 2008 |
| Replies: 13 Views: 1,291 So my first question would be: what are you comparing? I only see that you've implemented the Selection Sort... are you wanting to compare different methods of carrying out the selection sort?
... |
Forum: Java Dec 17th, 2008 |
| Replies: 12 Views: 1,058 Hi there, I'm not entirely sure why you're running that for loop that contains the undeclared variable. Remember that the end of line terminator is not returned by the readLine() method of... |
Forum: Java Dec 17th, 2008 |
| Replies: 4 Views: 998 Not a problem :) If you found your solution, please mark this thread as solved. |
Forum: Java Dec 4th, 2008 |
| Replies: 4 Views: 998 Read this thread: http://www.daniweb.com/forums/thread42410.html
You'll find that there are multiple ways to do what you need. I suggested getResource(). |
Forum: Java Dec 4th, 2008 |
| Replies: 5 Views: 474 Ah well then doesn't that answer your question about logging in? Comparing input with predefined values in your program seems perfectly acceptable for your application. I guess what you want to know... |
Forum: Java Dec 3rd, 2008 |
| Replies: 8 Views: 1,494 lol that was funny! The Timer class is definitely the way to go. And since the Timer class uses ActionEvents, the way the count down is displayed is controlled by you (that is, the ActionEvent can be... |
Forum: Java Dec 3rd, 2008 |
| Replies: 5 Views: 474 I agree with stephen84s, you need some sort of overall view of how the different parts of your system pull together.
Generally if you have an applet, it would probably have to communicate with a... |
Forum: Java Dec 3rd, 2008 |
| Replies: 2 Views: 451 Interesting... I haven't actually dealt with applet windows before but there is a method setResizable() that belongs to the Frame class. I believe this method will prevent the user from resizing the... |
Forum: Java Dec 2nd, 2008 |
| Replies: 3 Views: 557 While there isn't a stringent specification for these files, I doubt Microsoft Excel will allow such character encodings. So I tested it out... I copied one of the characters you gave as an example... |
Forum: IT Professionals' Lounge Nov 13th, 2008 |
| Replies: 2 Views: 763 hehe that would seem like an obvious site! :icon_redface: It actually didn't come up in my searches. Another site I found that seemed interesting is Engineering Applications of Computational Fluid... |
Forum: Java Nov 5th, 2008 |
| Replies: 2 Views: 395 You make use of certain classes that aren't part of the standard Java API so I'm unable to really follow the code you've given. I did notice that you create a Pixel array in method decryptPicture()... |
Forum: IT Professionals' Lounge Nov 5th, 2008 |
| Replies: 2 Views: 763 Hi guys, I'm a MSc student and my research topic involves developing a Sensor Web application that predicts the spread of wildfire in South Africa. Part of that research involves creating a wind... |
Forum: JSP Oct 15th, 2008 |
| Replies: 3 Views: 3,424 Hi there, I'm not sure which part you wanted me to elaborate on? Suppose you ran an SQL query that retrieved row that had two columns, colA and ColB. You'd then create a Java Bean that abstracts... |
Forum: Java Oct 15th, 2008 |
| Replies: 6 Views: 683 I agree with Ezzaral. Since you've declared the class attributes (or class variables) as being private, there would be no way for yo to access the values stored in those variables outside of your... |
Forum: JSP Oct 8th, 2008 |
| Replies: 3 Views: 3,424 I'm a little confused and that's probably because I'm not sure what a dynamic row is? I looked at your attachments which are quite long when opened...
I noticed you're using JavaScript. Is there a... |
Forum: Java Oct 7th, 2008 |
| Replies: 4 Views: 646 Indeed the problem at hand it rather complex and evolutionary programming has given results much better than previously employed mathematical models. There input set space has too many dimensions... |
Forum: Java Oct 7th, 2008 |
| Replies: 2 Views: 471 lol well said Ezzaral! As per rules, member help other members with programming... we don't give out solutions > we assist in making them work. Regardless, your question is very vague, you have to be... |
Forum: Java Oct 7th, 2008 |
| Replies: 6 Views: 683 Oopsy, didn't see your reply there Ezzaral. I agree with you! Only stuff up the main method when you're experimenting on small pieces of code.... only for the brave at heart hehe |
Forum: Java Oct 7th, 2008 |
| Replies: 6 Views: 683 Hi there, well your approach is actually one of the best ways to pass data between classes. One usually does this via the class constructor just as you have in the parking ticket class.
The class... |
Forum: Java Oct 3rd, 2008 |
| Replies: 3 Views: 1,502 The program I'm trying to automate input to isn't a Java program but your solution does sound interesting. Suppose that it was the case that the required resources are declared private, would it even... |
Forum: Java Oct 1st, 2008 |
| Replies: 3 Views: 1,502 Hi guys, I'm not really sure how to ask this or what to even search for. I want to write a Java program that can feed data into another program. If the other program had command line parameters then... |
Forum: Java Aug 5th, 2008 |
| Replies: 7 Views: 10,405 sabithpocker, so that's how you'd access an image? I agree that the image can be included in the generated jar file. However, my feeling is that the file will not be accessible via the Java code... |
Forum: Python Jul 25th, 2008 |
| Replies: 5 Views: 3,310 Hi guys, thank you so much. Jlm699 was correct, I needed to commit the changes to the database. I knew that there was a commit call that has to be used but I was calling it on the cursor (cur)... |
Forum: Python Jul 24th, 2008 |
| Replies: 5 Views: 3,310 Hi there, I'm trying to connect to a PostGIS database (which is basically an enriched PostgreSQL database) and I'm having trouble with the INSERT statement. Here's my code:
import psycopg2
try:... |