35,618 Topics

Member Avatar for
Member Avatar for JohCarlo

i don't know if im in worng language or not but im using Eclipse for my program and then once i build my program using maven build. but i got a error No plugin found for prefix 'C' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available …

Member Avatar for JohCarlo
0
160
Member Avatar for anandhachandru
Member Avatar for Pobunjenik

I've managed to construct a working code for John Conway's Game of Life. Now I wish to GUI-ize it. My only problem is printing a matrix. I want a huge text field to print "_" for no life and "X" for life in each cell (much like I did in …

Member Avatar for sishenyelang
0
1K
Member Avatar for michael.james.90475

public void rotate(double theta) { // this is the matrix to multiply by.. //x*cos(theta) , y* sin(theta) // x* -sin(theta) //y * cos(theta) vertices[0][0]= vertices[0][0]* Math.cos(theta)+ Math.sin(theta)*vertices[0][1]; vertices[0][1]= vertices[0][0] * (-Math.sin(theta)) + Math.cos(theta)*vertices[0][1]; vertices[1][0]= vertices[1][0]* Math.cos(theta)+ Math.sin(theta)*vertices[1][1]; vertices[1][1]= vertices[1][0] * (-Math.sin(theta)) + Math.cos(theta)*vertices[1][1]; vertices[2][0]= vertices[2][0]* Math.cos(theta)+ Math.sin(theta)*vertices[2][1]; vertices[2][1]= vertices[2][0] * …

Member Avatar for michael.james.90475
0
254
Member Avatar for Gl753

I'm working on a programme that's supposed to accept input of doubles from an array however it's not quite working out for me. It takes in Integers alright but not the double values. Could someone point me in the right direction Any help is much appreciated double array[] = new …

Member Avatar for samson.dadson.3_1
0
229
Member Avatar for Markyboy

Help. I've been tasked with writing a program that calculates the average temp for a week, getting user input for daily temps, calculating the average and printing out the results. I got that part. The second part is asking me to print out a message (Too hot!) if the avg …

Member Avatar for samson.dadson.3_1
0
224
Member Avatar for Ant695

` This is the code /*Practice Assessment 2 - Question 5 Program to calculate how many days and weeks in a given month 24/2/15*/ import java.util.*; public class calender { public static void main (String []args) { Scanner keyboardIn = new Scanner (System.in); String month; int days_in_month, weeks, days; System.out.print …

Member Avatar for michael.james.90475
0
236
Member Avatar for amogh.max

I would like code to display ms access database dynamically in a jframe . here is my database.**[img]http://i.imgur.com/PtuGLnX.png?1[/img]**.I tried searching a lot but i think i need personal help in this area as this is a suppose to be dynamically updated Jframe.on the other hand i am open to suggestion …

Member Avatar for JamesCherrill
0
415
Member Avatar for lena1990

i want to record voice then play it at the same time but when i use the below code i got delay and echo of the voice and some noise i will be grateful for any help int bufferSize = AudioRecord.getMinBufferSize(frequency, channelConfiguration, audioEncoding); AudioRecord audioRecord = new AudioRecord( MediaRecorder.AudioSource.MIC, frequency, …

0
212
Member Avatar for serubiri

Hello Fello Programmers out there; I have been trying to build ajava app from net bean 8.0 and Jdk 1.8, An app that has a data base connection so that data can be worked with, it also has images. The problem is that i can get a jar that is …

Member Avatar for serubiri
0
370
Member Avatar for johnny70

I want to remove the first line in jtextpane and setting setContentType("text/html") at the same time. setContentType("text/html"); Element root = getDocument().getDefaultRootElement(); Element firstLine = root.getElement(0); getDocument().remove(firstLine.getStartOffset(), firstLine.getEndOffset()); When I use setContentType("text/html") in the code it does not remove the first line.

Member Avatar for JamesCherrill
0
769
Member Avatar for Kadian

int e=0; int Compatability=0; int numOfDisagreements=0; int tsize=likes.size()+dislikes.size(); int numOfCommonLikes=0; int numOfCommonDislikes=0; if (user.likes.get(e).equals(Stranger.likes.get(e))){ if ((Stranger.howDoYouLike(likes.get(e)))== 1 && user.howDoYouLike(likes.get(e))==1) { numOfCommonLikes=numOfCommonLikes+1; } } else if (user.dislikes.get(e).equals(Stranger.dislikes.get(e))){ if ((Stranger.howDoYouLike(dislikes.get(e)))== -1 && user.howDoYouLike(likes.get(e))==-1) { numOfCommonDislikes=numOfCommonDislikes+1; } else { numOfDisagreements=numOfDisagreements+1; } e++ ; } Compatability=(numOfCommonLikes+ numOfCommonDislikes)- numOfDisagreements; return Compatability; } Am getting a …

Member Avatar for JamesCherrill
0
164
Member Avatar for sesaso

what is correct solution in Inheritance ???? I am new to genetics in Java and I want to resolve this question I look at the question existing attachments please and what is the correct dissolved and thank you very much

Member Avatar for JamesCherrill
0
313
Member Avatar for Roger_2

this is my latest class assignment, i would really appreciate some assistence with my pseudo code to help me in the right direction. my code skeleton is provided at the end of this post. Deque A double-ended queue, often abbreviated deque and pronounced deck, is an object with the following …

Member Avatar for JamesCherrill
0
367
Member Avatar for Kujinn

Yo, I'm a first year Computer Science college student, I've been thinking of pursuing a career as a Game Programmer. I was wondering since the only languages we are learning at the moment are Java and SQL, how useful is Java for developing games. Should I self-teach other languages like …

Member Avatar for admiri92
0
197
Member Avatar for amogh.max

I have created the following button: <form method="post" action="website.sup"> <input type="submit" id="btn1" name="btn1"/> </form> I am trying to call a ".java" file when i press this button. Sample of my .java code : package website; import javax.swing.* public class sup implements Runnable{... How do i call my java file? Additional …

Member Avatar for stultuske
0
274
Member Avatar for prafulla23

I m new in jasper report and eclipse. Actually I created a receipt in jasper studio (.jrsml file) and I want to change the report properties on run time. Description: I want to fetch a report properties in jsp page and user can change this properties at runtime and save …

Member Avatar for prafulla23
0
531
Member Avatar for SkateX

Greetings, I'm having problems with my output. Essentially I am just trying to print out any Cat who is over 3 years old and has Claws. But my output keeps printing out either nothing at all or the 3rd cat 3 times. I've struggled with this for hours trying to …

Member Avatar for JamesCherrill
0
302
Member Avatar for jjones0150

Hello Guys, I'm having trouble getting my code to run correctly. I need the program to ask the user do they want to continue after they guess the number correctly. If they say "y" the loop should restart if they reply "n" the program should end and close. I will …

Member Avatar for JamesCherrill
0
2K
Member Avatar for manalibhadula

Hi I am trying to connect to a server, to transfer a file. I have added remote to the known host file of source server and generated public key. From terminal i am able to login to remote server without password, but here through java , i am getting below …

Member Avatar for manalibhadula
0
297
Member Avatar for Trevor_5

trying to get the maximum location in my matrix of 4 columns and 3 rows. can anyone help point me in the right direction import java.util.*; public class Program3{ public static void main(String[] args){ double [][] m = createArray(); double [] colsum= new double [m[0].length]; for(int i=0;i<m[0].length;i++) colsum[i]= sum(m,i); printResult(m, …

Member Avatar for stultuske
0
204
Member Avatar for Soujanya_2

My servlet is not working even though the code seems to be correct. where have I gone wrong? First.java import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class First extends HttpServlet { protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); try (PrintWriter …

Member Avatar for milil
0
19K
Member Avatar for Amenda.St

I'm new with java programming so I'm sorry if my question is a lazy one. I'm working on a project that consists on collecting job offers from the web. So as a first step, I want to extract data (job offer data) from a specific webpage. So I want to …

Member Avatar for peter_budo
0
253
Member Avatar for jyotibborade

How do I edit jasper report at runtime? means i have to edit previously created jasper report properties like page height,width,show and hide some fields

Member Avatar for stultuske
0
48
Member Avatar for ema-miles

please some one help me send for me the codes for programme that helps in compueting the marks of stusednts by finding out their average total marks position in class and also tell if one is able to go to the next class with in a short time for a …

Member Avatar for stultuske
-3
130
Member Avatar for skill11

how i can write java programme like this out put Enter the number of minutes:*1000000000* 1000000000 minutes is approximately 1902 years and 214 days

Member Avatar for JamesCherrill
0
119
Member Avatar for murali2489

Hi All, I have an online screen in which a form filed is filled with Numeric Characters .. if the entered four digits are not numeric, it will throw an alert message saying "**Only numerics allowed**". Now the new requirement is it should accept alphanumeric characeters instead of Numeric Characters. …

Member Avatar for djjeavons
0
174
Member Avatar for Farhanalee

Modify the previous program to read in a list of floating-point values. The end of the input is indicated by the user entering a sentinel value -999. The program will display the following: the average of the values, the largest of the values, The smallest of the values, the range, …

Member Avatar for stultuske
0
138
Member Avatar for cngerra

I'm still a noob in JavaFX, I can print the content of the table that I query, the problem is that I want the content to be placed inside the tableview. This is the code that I have done. public class TableViewController implements Initializable{ @FXML private TableView<studentInfo> tblViewer = new …

Member Avatar for bharath_5
0
7K
Member Avatar for prem2

Dear all, I am using linux fedora os. But i cannot able to set the java Classpath command. Step 1: whereis java java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java /usr/share/man/man1/java.1.gz Step 2: vi .bash_profile export JAVA_HOME=/usr/bin/java export PATH=$PATH:/usr/bin/java Step 3: java -version java version "1.6.0" OpenJDK Runtime Environment (build 1.6.0-b09) OpenJDK Server …

Member Avatar for sepp2k
0
2K

The End.