35,618 Topics

Member Avatar for
Member Avatar for sha11e

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" …

Member Avatar for sha11e
0
304
Member Avatar for srikanth2321

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() …

Member Avatar for srikanth2321
0
379
Member Avatar for bloodbender

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 …

Member Avatar for bloodbender
0
107
Member Avatar for ghada ali

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 …

Member Avatar for ghada ali
0
356
Member Avatar for dineshswamy

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 …

Member Avatar for JamesCherrill
0
1K
Member Avatar for Goldfinch

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 …

Member Avatar for DavidKroukamp
0
132
Member Avatar for ThaiAmL

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 } …

Member Avatar for stultuske
0
767
Member Avatar for christian03

please tell me step by step procedure to how to delete the thread that i post ?? please help me guys.

Member Avatar for happygeek
0
152
Member Avatar for hust921

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() …

Member Avatar for zeroliken
0
136
Member Avatar for 3nrichedd

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 …

Member Avatar for hiddepolen
0
253
Member Avatar for warlord902

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 …

Member Avatar for peter_budo
0
235
Member Avatar for bo0ga

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 …

Member Avatar for Mehmaan
0
301
Member Avatar for monica86

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 …

Member Avatar for stultuske
0
7K
Member Avatar for MBPB

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 …

Member Avatar for DavidKroukamp
0
3K
Member Avatar for scheppy

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 …

Member Avatar for DavidKroukamp
0
191
Member Avatar for miss_lovely

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 …

Member Avatar for DavidKroukamp
0
2K
Member Avatar for scheppy

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 …

Member Avatar for scheppy
0
173
Member Avatar for brandon66

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 …

Member Avatar for brandon66
0
155
Member Avatar for Hypnos_16

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 …

Member Avatar for NormR1
0
2K
Member Avatar for Jashandeep

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?

Member Avatar for dmanw100
0
81
Member Avatar for behrad kiani

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 …

Member Avatar for NormR1
0
246
Member Avatar for jkembo

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 …

Member Avatar for jkembo
0
288
Member Avatar for ravi_91

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 …

Member Avatar for peter_budo
0
135
Member Avatar for raj.mscking

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 …

Member Avatar for JamesCherrill
0
149
Member Avatar for gedas

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 …

Member Avatar for DavidKroukamp
0
140
Member Avatar for abhishekwaichal

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

Member Avatar for JamesCherrill
0
36
Member Avatar for jackbauer24

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.

Member Avatar for jackbauer24
0
174
Member Avatar for mehnihma

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 …

Member Avatar for peter_budo
0
1K
Member Avatar for harinath_2007

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. …

Member Avatar for harinath_2007
0
128
Member Avatar for sagar2dumbre

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 …

Member Avatar for sagar2dumbre
0
170

The End.