Forum: Java 25 Days Ago |
| Replies: 7 Views: 4,698 Re: Adding images to JAR file (Netbean 5.0) 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: 419 Re: psycopg2: database connectivity to PostgreSQL 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: 419 psycopg2: database connectivity to PostgreSQL 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:
... |
Forum: Legacy and Other Languages Jul 21st, 2008 |
| Replies: 4 Views: 526 Re: Perl to Python hehe considering the file extension I think you're you're right! I'd like the original algorithm instead of translating from one language to anther. Anyway, thank you for your assistance! |
Forum: Legacy and Other Languages Jul 20th, 2008 |
| Replies: 4 Views: 526 Re: Perl to Python Oh my I did not realize that. I was told that it was Perl and that I should convert it to Python. Can someone please tell me what programming language it is? It had the file extension .m |
Forum: Legacy and Other Languages Jul 19th, 2008 |
| Replies: 4 Views: 526 Perl to Python Hi guys, I'm trying to make sense of some Perl code. I haven't actually programmed in Perl before but I do image the functions/methods are similar to other languages. Here's the code:
function [dir,... |
Forum: Java Jun 9th, 2008 |
| Replies: 11 Views: 448 |
Forum: Java Jun 6th, 2008 |
| Replies: 2 Views: 123 Re: this is what i want it to fo ... Alex is correct:
There is already a LayoutManager that will allow you to achieve your goal. It's called the GridLayout and you should certainly check the Java Docs on that one. Here is code from... |
Forum: Java Jun 6th, 2008 |
| Replies: 3 Views: 332 Re: Problem using exceptions and looping I think I might have made the same mistake. The way Scanner works, is by matching patterns in some stream. When you use nextInt() it will attempt to find an integer value in the input stream. If it... |
Forum: Java Jun 6th, 2008 |
| Replies: 13 Views: 1,160 Re: How to draw a graph in Java applet Alex said:
Well that's not exactly true; the gradient (i.e. rate of change) of a Sin curve depends on the input. Though I did misread the part about the circle, my bad :icon_redface:
Good work... |
Forum: Java Jun 4th, 2008 |
| Replies: 1 Views: 315 |
Forum: Java Jun 4th, 2008 |
| Replies: 5 Views: 460 Re: Need help with the java code! I've not checked if Alex is correct, but as per your question regarding the storage of your array information. It can so easily be done by writing the entire array object to a file.
The is a... |
Forum: Java Jun 4th, 2008 |
| Replies: 13 Views: 1,160 Re: How to draw a graph in Java applet Hi guys, drawLine() doesn't require the points to vary. In fact drawLine(10,10,10,10) would simply result in a point being drawn.
It's Math.PI because all constants, as per the Java convention, are... |
Forum: Java Feb 1st, 2008 |
| Replies: 10 Views: 1,110 Re: New to Java aww yeah I'm sorry, I should have said in my personal opinion! My bad :icon_mrgreen: |
Forum: Java Feb 1st, 2008 |
| Replies: 8 Views: 1,808 |
Forum: Java Feb 1st, 2008 |
| Replies: 10 Views: 1,110 Re: New to Java hehe yeah we hadn't done a bit of Visual Basic, because it really shouldn't be used for enterprise application development since it is not a strongly type checked language. |
Forum: Java Jan 31st, 2008 |
| Replies: 8 Views: 1,808 |
Forum: Java Jan 31st, 2008 |
| Replies: 6 Views: 934 Re: ArrayIndexOutofBoundException That is rather interesting... ah such is life that a new day brings new knowledge. P.S. don't forget to mark your post as solved :icon_wink: |
Forum: Java Jan 30th, 2008 |
| Replies: 6 Views: 934 Re: ArrayIndexOutofBoundException hehe Indeed he does have his indices mixed up! But I would like to check up on the instantiation of the array outside the constructor. I think that the new value of no_of_attributes would be updated... |
Forum: Java Jan 30th, 2008 |
| Replies: 8 Views: 1,808 |
Forum: Java Jan 30th, 2008 |
| Replies: 6 Views: 934 Re: ArrayIndexOutofBoundException I just noticed, you shouldn't have if(br.readLine().equals("Y") || br.readLine().equals("y")) as you're requesting data from the input stream twice if the user actually presses a y the first time.... |
Forum: Java Jan 30th, 2008 |
| Replies: 6 Views: 934 Re: ArrayIndexOutofBoundException Oh gosh, that's a large post! First, I don't think you require throws IOException in the constructor of ENTITY. Second, please use the Java convention ... |
Forum: Java Jan 30th, 2008 |
| Replies: 10 Views: 1,110 Re: New to Java I agree with Jwenting, once you've learned how to do Object Oriented Programming, you should be okay doing any. Though Java tends to be the easiest to use (hehe and in my opinion, more... |
Forum: Java Jan 22nd, 2008 |
| Replies: 5 Views: 613 Re: installing tomcat server One would have to restart Tomcat whenever a Java file (usually a servlet) is recompiled. This is because Tomcat uses a cache. Changes to JSP files do not require a restart. I recommend that you use... |
Forum: Java Jan 22nd, 2008 |
| Replies: 4 Views: 523 Re: Help with removeElement() in vectors Well you'd have to search through the Vector; once you've found the code, you'd have access to the Object you need to remove and thus v.remove(empData); will work. The easiest way to iterate over the... |
Forum: Java Jan 22nd, 2008 |
| Replies: 5 Views: 613 Re: installing tomcat server Well the first step is to identify that indeed Apache Tomcat is up and running. If you go to localhost:8080 it should display a Tomcat page. If that doesn't work then the Tomcat service is not... |
Forum: Java Jan 19th, 2008 |
| Replies: 23 Views: 2,633 Re: OS Detection Tool Like Nmap I agree with Paul; Plus it seems like the easiest way (plus I'm not really sure of any other way to test if a port is open!). But what extra information would you want from the packet? There is... |
Forum: Java Jan 19th, 2008 |
| Replies: 23 Views: 2,633 Re: OS Detection Tool Like Nmap Very interesting project. I think your first step is to test open ports and then assume the service running on that port. Windows NT for example, have alota open ports and if enough of them are open... |
Forum: Java Jan 16th, 2008 |
| Replies: 1 Views: 517 Re: request.getParameter() Perhaps try the JSP forum under Web Development? I don't have that much experience with JSP but of course if you're using a text box in the form then the data would be received as a String object and... |
Forum: Java Jan 16th, 2008 |
| Replies: 5 Views: 413 Re: Java Questions I actually believed the guy :icon_redface: Regardless I hope he learnt something. |
Forum: Java Jan 11th, 2008 |
| Replies: 5 Views: 413 Re: Java Questions 6) Let’s try an elimination process. I'm not really sure what's meant by field. Most likely it refers to the attributes of a class, then most certainly option A is not valid. To me there is a... |
Forum: Java Jan 9th, 2008 |
| Replies: 1 Views: 576 Re: Help needed for saving high scores I have a few suggestions for you:
1) It would be advisable to use the .length attribute of the array object. So instead of for(i=0;i<10;i++) please uses for (i=0; i < ns.length; i++) Btw, why do you... |
Forum: Java Jan 9th, 2008 |
| Replies: 2 Views: 1,076 Re: adding a JFrame component to JTabbedPane I agree with Masijade, and I think you could probably just change the JFrame inheritance to JPanel, well depending on your actual coding hehe Anyway, what I wanted to recommend is NetBeans. It’s a... |
Forum: RSS, Web Services and SOAP Jan 9th, 2008 |
| Replies: 7 Views: 1,641 Re: Accessing a Web Service JSP is really a cool extension of HTML. I think the most common way to interact with a servlet via a JSP is to use the HTML <form> tag. I have managed to successfully create a connection to the... |
Forum: Java Jan 8th, 2008 |
| Replies: 4 Views: 1,067 Re: Bubble Sort a txt file I agree with javaAddict (To err is human, to write java code is divine - I like that!), you should read the data into a Vector<String> object. There are many ways the Bubble sort can be done, I would... |
Forum: Java Jan 8th, 2008 |
| Replies: 1 Views: 1,267 Re: limit input only two decimal I'm a bit confused as to what you're saying :icon_confused: But I do understand that you want to only allow real input with two decimal places. If you have a GUI then JFormattedTextField is the class... |
Forum: RSS, Web Services and SOAP Jan 8th, 2008 |
| Replies: 7 Views: 1,641 Re: Accessing a Web Service I understand that the wsdl file is written in xml and describes what remote methods (which could be regarded as services) are accessible and what their parameters are. I noticed that in Eclipse one... |
Forum: RSS, Web Services and SOAP Jan 8th, 2008 |
| Replies: 7 Views: 1,641 Re: Accessing a Web Service Thanks for replying! So I should find a .wsdl file somewhere within the application if I was indeed working with a web service? Then I most definitely do not have a Web Service. That's one doubt... |
Forum: Java Jan 8th, 2008 |
| Replies: 6 Views: 408 Re: Problem with line of source code,help please? I think that you've added private System.out.printIn; in attempt to fix the error you would have gotten with System.out.printIn("wear some shorts and sandals"); I agree with Masijade, you meant... |
Forum: RSS, Web Services and SOAP Jan 8th, 2008 |
| Replies: 7 Views: 1,641 Re: Accessing a Web Service I think that a Web Service offers remote procedure calls (methods that can be called over the internet). The application I'm working with is really a servlet that accepts xml requests so I guess it... |