32,199 Topics
| |
Ok guys i have a few questions about implementing a gneric hash table using linear probing. Ok first, i need to make an entry class Entry<K,V> then An Entry <K,V> table array but since its gneric must initiatied elsewhere my question is how does the class entry work , from … | |
I would like thoughts/advice on the project I am working on. I am trying to build a program that simulates the score of a baseball game given individual player statistics. As of right now, the program only has one team batting for nine innings. I am a computer science student … | |
Is there any easy IDE that lets you build a easy GUI with Java? I wish you could comply native Java using VS! :P | |
I have created an awesome text-based battle game, and i want others to see it. Is there a way to put this game online, without others stealing the code, but they can play it? | |
Hi all, can someone help me find what's going wrong in my code? When the program runs and it goes to get the user input, the program does not respond with any feedback, ie I type find Susan, and it does not tell me if Susan is in my txt … | |
In this example, what's the difference between creating a class variable from the "class Employee" & creating an object from the class GenQueue ?! What's the difference in uses and implementation? import java.util.LinkedList; class GenQueue { private LinkedList list = new LinkedList(); public void enqueue(E item) { list.addLast(item); } public … | |
Hi, I am looking for a java code which will provide the automatic login with out loading the login page also.After login automatically, i want to go to next page automatically. Can anyone help please.. | |
So I am trying to make a code that will read a file that contains an unknown number of students and an unknown amount of scores for each student. Then output each students average score. I have tried several different combinations of loops and each times some problem comes up. … | |
Hi, I've used keylisteners multiple times, but I am having trouble with this situation. I want the keylistener to recognize a series of characters. For example, if 'e' is typed, I want the program to listen for 'l', then 'e', etc. (spelling "elephant", if you wanted to know). It recognizes … | |
lets say i am print a image on screen. with (x1,y1,x2,y2,sx1,xy1,sx2,sy2) g.drawImage(player_image, x, y, x+width, y+height 0, 0, 30, 20 ,Sprite_Sheet.m1); so how would i flipthis image vertically. | |
I'm taking a beginning java class and I'm trying to create a helper method to get a input from a user and combine all four methods into a package I can use in my programs after. I keep running into trouble with the last method, getMenuStringFromUser, the error it gives … | |
Hey, been awhile. I'm working on a portal for distributors, some type of JIT (just in time) implementation. Now i've been reading alot on DB so i can implement the right database and the right data structure. Now i see, i can do alot more then i'm use to do. … | |
write a program to perform polynomial operations like addition, subtraction, multiplication and evaluation of polynomial using ADT in java | |
Hi all, Im having trouble with a program wheree a person starts in the middle of a 7 foot bridge. Heres the description: Someone is standing at the center of a bridge that is 7 ft bridge long. Their stride is exactly one foot. They can’t control the direction they … | |
This is my Java code at the moment (using netbeans IDE), I have tried to set th value of cell 4,4 to A in the following code, `outputCadence.getModel().setValueAt(items.A[5], 4, 4);` , however this does absolutely nothing, I'm a bit of a noob so I'm not sure if I'm missing something … | |
i am working on making a scientific calculator in netbeans using wing components and i used combo box for conversion purpose but the handler code i wrote isnt working for all conversion, it only works for the 1st item. and please help me with "action" and "item" on the right … | |
hi all, i am new to java programing... i have used jDateChooser and i want to extract just month i.e. int value of selected month or date i.e. int value of selected date from jDateChooser......? Eg. if choose date as 2012/11/07 I want all in separate like Year = 2012 … | |
<project basedir="/home/ubuntu/apache-jmeter-2.7"> <property environment="env"/> <property name="jmeter-home" location="/home/ubuntu/apache-jmeter-2.7"/> <path id="ant.jmeter.classpath"> <pathelement location="${jmeter-home}/lib/ant-jmeter-1.8.4.jar" /> </path> <taskdef name="jmeter" classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask" classpathref="ant.jmeter.classpath" /> <target name="clean"> <delete dir="results"/> <delete file="jmeter.log"/> <mkdir dir="results/jtl"/> <mkdir dir="results/html"/> </target> <target name="test1" depends="clean" > <jmeter jmeterhome="/home/ubuntu/apache-jmeter-2.7" resultlogdir="results/jtl" testplan="/home/ubuntu/pt/********.jmx" /> <xslt in="${basedir}/results/jtl/********.jtl" out="${basedir}/results/html/*********.xml" style="${jmeter-home}/extras/jmeter-results-report_21.xsl"/> </target> </project> when i build this file its … | |
i am having a problem getting my js file to work with my html file here is my jsfile function calculateTotal () { var hours = document.getElementByName("hours")[0].value; alert(please enter a number) var payrate = document.getElementByName("payrate")[0].value; alert(please enter a number) var pay = document.getElementByName("pay")[0].value; if (hours <= 40){ pay = (hours … | |
Hi, Thanks to all in advance. I am a newbie java learner. I have to create a project on java for my final term exam. But I cant find the topic of the project. Please suggest me some good but unique project topic. note: I would not like to create … | |
I'm trying to develop a packet sniffer using java and I've been using the JpCap library to capture the packets. I've run into a problem where Jpcap is capturing the packets from the NIC on my desktop, but I need to capture the packets from the gateway (MikroTik RouterBOARD) and … | |
I've been studying C++ for two years, then started Java two months ago. My performance in C++ wasn't good at all although I study hard. I thought that the problem is in not understanding the language concepts but when I started a new language with the intention of building up … | |
the applet compiles fine(no errors) but while running when i press the accountButton(only button in the applet) i get errors, what is wrong with my applet ? thanks in advance Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException at AppletMetodos.actionPerformed(AppletMetodos.java:96) at java.awt.Button.processActionEvent(Unknown Source) at java.awt.Button.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at … | |
public class hello_world { public void sample(){ System.out.println("Hello World"); } }; /*Now I can access this method using an Instance of it in my Main Class or by inheriting it.* Public Class main{ public static void main(String args[]){ hello_world sam = new hello_world(); sam.sample(); }; } /*Class using inheritance Public … | |
Hey Guys, This is my first program where I have used JLabel and JText. Im trying to create a program that will solve a simple quadratic equation. I have the program to the point where it will solve the equation, I just cant get it to display in the window. … | |
I am trying to store a file into an ArrayList and then have user input from console search for an element in the Arraylist and return found or not. It keeps giving me -1. public class arrayl { public static void main(String args[] ) throws FileNotFoundException { System.out.println("Please enter title … | |
hello i have some problem in showing button, when data exist and data not exist. i want the button show if data exist also data not exist. my current problem right now the button only show when data exist but the button automatically hide when data not exist. here what … | |
I'm trying to write a coding that will be able to determine if a number keyed-in is a Prime Number or not. Here's what I did: public class PrimeNumber { public static void main(String args[]) { int n; Scanner Prime = new Scanner(System.in); System.out.println(" Please enter a number: "); n … | |
I have stuck with one problem. I have created my own program that will work. In program there are two for loop. Now my problem is for(int i=0;i<q;i++) { for(int r=0;r<q;r++) { /*perform some kind of operations returns one integer value.*/ /*here q=4 so first time r loop execute 4 … | |
Is it possible to make some privileged instructions (eg sti, cli) available via some Java's API? (That is, to build a Java's library that would provide sti() and cli() as static methods) (Suppose this library is buit for a specific machine, not meant to be portable or anything) I've heard … |
The End.