35,618 Topics

Member Avatar for
Member Avatar for jackmaverick1

During the process of creating my latest game, I've come across the problem of collisions. In the last few games I've made, I've used a system of collision detection that relyed on two rectangle's methods. This seems to work, but doesn't provide a method for dissallowing an entity entry into …

Member Avatar for jackmaverick1
0
213
Member Avatar for warpstar

Can someone explain the code below? Is .next an operator in java that pushes the pointer to the next node in the linked list? Node E < -- type node? public E dequeue ( ) throws EmptyQueueException { if (isEmpty ( )) { throw new EmptyQueueException (”Queue under flow”) ; …

Member Avatar for warpstar
0
144
Member Avatar for DanCuster

Hello everyone, I am building a tic-tac-toe game for my final and everything is going smoothly except for one problem. The names I ask the user to enter at the beginning of the game, a replaced with null when the messagebox that shows who won appears. Here is the code, …

Member Avatar for JamesCherrill
0
640
Member Avatar for nikolaos

How can i add some space between these four components and the JFrame window? ![jframe_view](/attachments/large/0/jframe_view.jpg "jframe_view")

Member Avatar for nikolaos
1
18K
Member Avatar for rupes0610

I have a tab delimited text file with text like this: Wed Jun 13 01:00:19 2012 | error | client xx.xxx.xxx.x | rdy 784 bsy 16 The pipe | signifies that the tab delimiter. I need to convert this into a CSV file using Java. I also need to split …

Member Avatar for Ezzaral
0
144
Member Avatar for malsmit2014

package furniture; import java.io.*; import java.util.*; public class Program3 { public static void main(String[] args) { //array of 10 Furniture object references String[] furniture = new String[10]; String filename = "furnitureData.txt"; Scanner input = null; try{ input = new Scanner(new File(filename)); }//end try catch(FileNotFoundException e){ System.err.println(e); System.exit(1); }//end catch }//end …

Member Avatar for DavidKroukamp
0
304
Member Avatar for GlenRogers

I need to search a Maps keys based on user input. So in a text field the user may type "M",then hit a button marked "search" this will bring up all keys that begin with M. Mike Molly Michael Michelle Marvin If they type "Mi" it will bring up Michael …

Member Avatar for JamesCherrill
0
111
Member Avatar for hyung101

Can someone help me with a short program that calculates age, the user will input their birthday and the program displays the age..

Member Avatar for poojavb
0
3K
Member Avatar for warpstar

Hi there, I am having trouble understand how they derive these running times for the code in the image below. [http://i.imgur.com/usK9U.jpg](null) I am having trouble especally with log n running times, how are they derived? especially the bottom left slide. If someone can shed some light on this, I would …

Member Avatar for Mbot
0
152
Member Avatar for koduruabhinav

I am retrieving a value from DB. Datatype in DB:---- number(6,2). So i retrieved as decimal from db as getdouble(attrubute) So if 10 is present in DB i am getting 10.0. Is there any way to get 10 and at the same time if 10.2 is there i require as …

Member Avatar for Ezzaral
0
103
Member Avatar for GlenRogers

Hey all I need a bit of help if someone can! im writing(trying to!) a small application for a friend who owns a computer repair shop. Its a 'booking in' application. Someone brings a computer/device in and whover is on the front desk takes some details. Name, Street, Town, Postcode …

Member Avatar for GlenRogers
0
337
Member Avatar for coroll

Hi ! I am writing simple email client that uses TCP/IP sockets to interact with an SMTP server to send email messages. this is my code import java.io.*; import java.net.*; import java.util.*; import java.text.*; public class TestSendMail { public static void main(String args[]) throws IOException { Socket socket; DataInputStream dataInput; …

Member Avatar for NormR1
0
125
Member Avatar for zazizu

meter billing for company and the application must hold information 5 customer . use array and repetition structure step is :- 1) prompt user to input type of customer (residential or industrial),past meter reading, & current meter reading. 2)seperate them as either r for residential or i for industrial use …

Member Avatar for JamesCherrill
0
91
Member Avatar for enakta13
Member Avatar for pitic

I have a task to create an app that scans a 2D code (DataMatrix) with a usb scanner (set to work as a serial port), then creat a zip file from the inputstream, unzip it and get an xml. i have managed to scan the code, get the inputstream but …

Member Avatar for pitic
0
267
Member Avatar for hprem991

Hello All, I am stumbled with one problem regarding HTML Tag Name which is a Varible and I am reassigned it value in runtime. Actually the Code is something like this. <% String var=null; for (int i=0;i<=5;i++) { var=(String)i; %> <div id=var> </div> <% } %> No if I want …

Member Avatar for kvprajapati
0
112
Member Avatar for pooja.shinde

I want to verify users using **Active directory**. I have simple code to connect to **LDAP server** from LDAP client. But it is giving "**Naming Exception :- simple bind fail**" msg. Can anyone help with this?

Member Avatar for ejosiah
0
63
Member Avatar for am30568

I new with database and java.I want to show result of the table WHERE USER = USER LOGIN NAME private void query() { try { Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con = DriverManager.getConnection("jdbc:oracle:thin:@andy-lcoyx7gfw:1521:orcl", "andy", "andy"); String sql = "select * from schedules where (userName = @User) "; //'{$_SESSION['username']}' Statement stmt = con.createStatement(); ResultSet …

Member Avatar for ejosiah
0
711
Member Avatar for jdseader

I have written many FORTRAN codes, but am new to Java, which I find much more powerful and more difficult. I have a program that was written several years ago in MS Access. The program consists of a main window with buttons that take you to other windows where you …

Member Avatar for twmgeo
0
887
Member Avatar for trektrak

Hey Guys, I'm playing with android webview.. and I would like to have it running background whenever I press home button... Please let me know if this is possible... Here are the codes, maybe I need to tweak anything .. package trektrak.GeoWebView; import android.app.Activity; import android.os.Bundle; import android.webkit.GeolocationPermissions; import android.webkit.WebChromeClient; …

Member Avatar for ejosiah
0
244
Member Avatar for enakta13

I intend to write a GUI java program which convert a decimal(base 10) to hexadecimal(base 16). Floating point decimals are also valid input. the code of my program private void myEnterButtonActionPerformed(java.awt.event.ActionEvent evt) { float mynum; mynum = Float.parseFloat(this.myNumberField.getText()); Float floatObject = Float.valueOf(mynum); myResultField.setText(Float.toHexString(mynum)); } but when I run the program, …

Member Avatar for enakta13
0
442
Member Avatar for 47pirates

I'm trying to make a search by different option say A, B . what i need is if user provide value of A only then it does the searching using parameter A only , if user provide A and B then it needs to do searching using condition A=value1 AND …

Member Avatar for 47pirates
0
306
Member Avatar for tracydo

Hi I'm writting this code to prepare electricity for as many users as there are input. I don't got when I compile it always shows something where the "if" start. I need a fresh look please. Thanks [code] import java.text.*; // format output import java.util.*; // Scanner class public class …

Member Avatar for Ezzaral
0
1K
Member Avatar for alemojarro
Member Avatar for daravindm

Hi friends,, please help anyone.. I want to send a auto mail when i apporve(button click) the user. how it possible, please provide the link or code.. thanks in advance

Member Avatar for poojavb
-1
78
Member Avatar for alemojarro

I can get it to save then load but it does it at the same time and not seperatly public void Load() { try { System.out.println("Where would you like to Load from?"); BufferedReader reader = new BufferedReader(new FileReader(Input.next())); String line; int count = 0; list = new doublyLinkedList(); while ((line …

Member Avatar for stultuske
0
87
Member Avatar for intelnf09

I am not sure if I am doing this correctly since it has been awhile since I last used Daniweb. I need some help with the code that I have submitted and am getting the following two errors. I am new to java and not sure of what to do. …

Member Avatar for NormR1
0
1K
Member Avatar for sameerge

Hi I need the answers one of my two questions which were asked by our teacher in class room. Q1. Languagess are system software or application software? Q2. In which software the languages are written? for example in which software the c++ language is written? plz give your answer with …

Member Avatar for WaltP
0
218
Member Avatar for Valiantangel

Hey after all the fuss about Composition and inheritance and drilling in the fact that Composition is superior,I dont understand why the need to know ploymorphism?Since it is gotten through inheritance.Is this a joke? Whats the industry practice?Are they use **widely**?

Member Avatar for stultuske
0
96
Member Avatar for km2011

Hello everyone, i want to do the summation below: x1= a0*x0 x2= x1+ a1*x1 x3= x1 + x2 + a2*x2 and so on............ supose we know x0 = 2; a0=1 ; a1 = 3; a2 = 2; how do i use for loop to do this? should i keep it …

Member Avatar for km2011
0
192

The End.