35,618 Topics
![]() | |
My client-server program seemed to work fine, I could send and receive messages. But if I don't send any messages for a while (sometimes 2 minutes is enough, other times it takes an hour..) and then try to send one, I get the error "Software caused connection abort: recv failed" … | |
Hi all, I'm currently using SAX to parse an xml file. Recenlty I have encountered a problem where, one of the element consist of more than 50,000 characters (a DNA sequence ) and the SAX results nothing as an output. The code which I'm using is [CODE] public void getCommand() … | |
Hello Daniweb, What would you guys say is the most effective way to manage memory for powers? I'm thinking for smaller powers, like squares or something, it's probably just better to do x * x and Math.pow(x, 2) should only be used for bigger powers. I have a lot of … | |
I have a code for speech recognition but it not work good it has a problem in line 31 what is the solution ??? [code] import edu.cmu.sphinx.frontend.util.Microphone; import edu.cmu.sphinx.recognizer.Recognizer; import edu.cmu.sphinx.result.Result; import edu.cmu.sphinx.util.props.ConfigurationManager; import edu.cmu.sphinx.util.props.PropertyException; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.util.logging.Level; import java.util.logging.Logger; public class HelloWorld … | |
I dont understand why we are using super.paint() in this code. help me to figure out why? [CODE] public class SetJTextFieldBackgroundImage extends JTextField { public SetJTextFieldBackgroundImage() { JFrame frame=new JFrame("Set JTextField background image"); frame.add(this); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(300,65); frame.setLocationRelativeTo(null); frame.setResizable(false); frame.setVisible(true); } public void paint(Graphics g) { setOpaque(false); //Image that will be … | |
Hi, I'm trying to understand a java concept, I'm trying to get a piece of code to work without changing the main method. [CODE=java] public class TestProg2{ public static void main(String args[]){ String filler1="Rank"; String filler2="Suit"; Card card = new Card(); System.out.println(card); } } class Card{ public String Card(){ String … | |
Writing an abstract class for homework - here's what I have so far: [CODE]public abstract class Pet { String petName; double foodAmount; double foodSupply; int days; public Pet(String petName, double foodSupply) { //constructor to be used by sub-classes this.petName = petName; this.foodSupply = foodSupply; } public Pet() {//default constructor } … | |
please tell me step by step procedure to how to delete the thread that i post ?? please help me guys. | |
Hey i know this is a stupid question, but i have no idia how to google it. I have copied this code directly from a book: Btw, my main() method is empty. [CODE] package benytterning; public class Terning { public int værdi; public Terning() { kast(); } public void kast() … | |
I am working on this assignment in my java class, and am running into a few problems. Basically there are 2 classes and a main/client program that tests the classes. there is 1 superclass and a subclass that extends the superclass.. I have 2 constructors in my superclass but when … | |
I never worked in any company or organization, so you people can guess I do not have much idea. I am working on a quite big project of a website alone using Java/J2ee. As I am working alone so I am working on all the things at a time. Sometimes … | |
I have an option to take an independent study next semester related to websites. I basically teach myself a programming language of my choice for the semester, and do a project for my professor at the end. He suggested either advanced java or php. I asked him which would help … | |
I am very new to this and the computer programming world in general, and I'm having a problem with my program and I think I'm just making one little mistake, but I can't figure out what it is! I'm using class GetStats to be the main for my other class … | |
Hi all. I am learning Java, and having a problem with a sentinel loop to fill an array. I want the loop to terminate when -1 is added, OR when the array is filled. [CODE] int i = 0; int counter = 0; int[] array = new int[40]; System.out.print("Enter values … | |
Ok, so I have my code for the timer [CODE] computer = new Timer (4000, this); computer.start (); [/CODE] The timer starts at the end of a method, and is supposed to start another method via actionlistener after 4 seconds, the problem is, after 4 seconds, the timer gives a … | |
Write a class that accepts a user's hourly rate of pay and number of hours worked. Display the user's gross pay, the withholding tax (15% of gross pay) and the net pay, (gross pay - withholding) I have my code below, but I'm lost. I dont know what I'm doing … | |
ok so I have a JButton that has an image on it, and then after 4 seconds i want to put a differant image on it but the problem is the first image wont load I'm using [CODE] button1.setIcon (icon); try { Thread.sleep (4000); //sleeping for 4 seconds } catch … | |
This is what i am suppossed to do: Create an application that will ask the user for a number between 1 and 10 and then output the factorial of that number. Use a for loop to calculate the factorial. What is a factorial? A factorial is the product of all … | |
Hello All, I'm trying to create three independent animations that all occur in one main frame. I have to use the following methods in my code [CODE]--- Animate --- public interface Animate { void move( double x, double y); void changeConfiguration(); } --- Drawable ----- import java.awt.Graphics2D; public interface Drawable … | |
Hello all ! I have worked on PHP .There are many CMS available for PHP like Joomla,Wordpress,Magento,Cake,Druple etc.Is there any CMS which is available for java only? | |
i am working in Dijkstra code.which i want to get the vertexes from user by using Array list.but there is a problem in computepath method i can't solve it. [CODE] public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("insert the number of Vertexes:"); int nv=input.nextInt();//nv = number … | |
I am stuck, I know how binary tree works, but I don't have any clue how to add data recursively in a binary tree. The user needs to enter a formula with logical operators. If the user presses to a button e.g NOT(unary operator), then it should display at follow … | |
hi to all, i did a project in jsp for "online exams" in my college then here my problem is how can i put into server so that every student can write the exam by connecting to the server how can he connect to the application(jsp file) which i put … | |
Hi Gentles! My Self Raj, I am a new user of this site, i wants to create an application (with concept of Ecryption & Decryption) for transfer image with hiding (media file eg.mp3) Any one can help me how can do it, and how much possibilities combine hided media with … | |
hey guys, i am trying to create an app that would review text file that is on the server, how would i go around in doing that? i believe i need to login to the server for example root@123.123.123.123 and eneter the password, later i need to navigate the file … | |
Hi guys, I am looking out for a way to compress binary data. Please suggest me some java api for the same. Also is good to compress data using runlength encoding or deflate? THANKS Abhishek Waichal | |
I've got to explain this to my ten year old son, so please explain this in an easy way. (If you can, each and every thing about [ICODE]this()[/ICODE].) Thanks in advance. | |
![]() | Can you help me with this problem I have a class and I need to create separate class justo fro reste button, but I am not sure how to do this? Here is what I have done [CODE] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class MyEventC extends JFrame implements … |
Hi , I developed an application which checks mail(gmail) all the time and alerts me whenever new mail has come. In short its a email notifier or email alerter. The application uses IMAP protocol .The application opens the connection once and it continously checks whether a new mail has come. … | |
Hello, I have been told to design website in JSP. Firstly it contains login page.i hv designed login.jsp but it contains all HTML tags. For the database(Sybase) connection i m planing to write java file login.java which will be invoked in login.jsp action method.... ... ..is this a right way … |
The End.