35,618 Topics

Member Avatar for
Member Avatar for game06

i want to set a collision on my tile map using getBounds function. level class int map[][] = { {2, 0, 0} {1, 1, 0} }; 2 = player 1 = ground 0 = sky i want to set collision so player cant go though ground. so he should fall …

Member Avatar for JamesCherrill
0
349
Member Avatar for greyfox32

In my Advanced Data Structures class we have an assignment to implement a linked list using arrays. One array holds the data item, while another contains a reference to the next item. I'm not really sure about how to add/remove items. // **************************************************** // Reference-based implementation of ADT list using …

Member Avatar for greyfox32
0
1K
Member Avatar for deadsolo

Hi there everyone, I am having some difficulties getting a regular expression to work. I have a line of text with 5 numbers.I want to ignore the first number, and grab the other 4 numbers. Here is what the text I am dealing with looks like. 1681 12.33754513 7.066246057 6.079261254 …

Member Avatar for deadsolo
0
289
Member Avatar for mferarri

In main method which should I use? CarOwner owner = new CarOwner("Danni", "123456789"); or CarOwner owner = new CarOwner(); owner.setName("Danni"); owner.setPhoneNumber("123456789"); I know how to make both work, I can edit the class file to suit whichever way it is written in the main method. But what do people do …

Member Avatar for mferarri
0
328
Member Avatar for Raghu88

Hi, I have written coding for coverting jsp page to excel.It is working in IE browser after downloading file is saved with .xls extension .But in firefox browser i am trying to download then it saves with .jsp extension.any one pls help me how to solve this issue? here is …

Member Avatar for LastMitch
0
456
Member Avatar for farazpt007

program for moving a car or object using button(start and stop) in applet and thread function

Member Avatar for JamesCherrill
-2
45
Member Avatar for jmartzr1

Hey everyone, I am having trouble on this one practice problem. It is a question that requires another question I already completed to solve this one. The qusetion is "Implement a method allPerfect() that takes an integer parameter end. The method prints every perfect number from 1 to end. Use …

Member Avatar for JamesCherrill
0
539
Member Avatar for solomon_13000

I wanted to verify is this a good example of a flyweight design pattern: package com.flyweight; public interface Chemical { String getName(); String getSymbol(); Double getAtomicWeight(); } package com.flyweight; import java.util.HashMap; import java.util.Map; public class ChemicalFactory { private static Map chemicals = new HashMap(); private static ChemicalFactory factory = new …

Member Avatar for ~s.o.s~
0
188
Member Avatar for karan.geh

public class Jacobi{ // jacobi(a,n) public static void main(String[] args) { int n = 234567,a = 97770; if(n<=0 || (n %2) == 0) return (0); int temp, j=1; if(a<0) { a = -a; if((n % 4) == 3) j = -j; } do while (a!=0) { do while(( a % …

Member Avatar for stultuske
0
126
Member Avatar for jrosh

I am tryn a currency converter using hash table. What is the technique to use to enble covert both ways. Ex: Dollers to Euro and Euro to Dollers . I can understand how to do it one way using currency as the hashKey and rate as Hashvalue. (I hope that …

Member Avatar for JamesCherrill
0
163
Member Avatar for london-G

Hello, Could you please assist me i want to deploy this application as an executable file with the MYSQL database embedded. I have clean and build the application, the jar file is there but nothing happens. The database is stored on local host. Thank you

Member Avatar for jwenting
0
214
Member Avatar for game06

i recent been using my variables names like this boolean is_dead = false; turn out its not right. right conventions is boolean isDead = false; for some reason i dont like the 2nd one. may be bc i been using 1st one for so long. i was wondering is there …

Member Avatar for jwenting
0
212
Member Avatar for bobit

Hey, I need some assistance with an assignment that deals with Jframes. The assignment says "For questions 27 to 31, consider the following class: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class A extends JFrame ( private Container c; private JButton b; private JTextField tf; ) Now for the questions: …

Member Avatar for stultuske
0
90
Member Avatar for nithyananthanaiker

Hello guys. I am getting this error when I run this file. Can any of you clarify what is wrong in the code? public class csector_node { public double [] relations; public csector_node() { relations = new double [8]; for (int i = 0;i < 8;i++) { relations[i] = new …

Member Avatar for scudzilla
0
199
Member Avatar for Neha2907

hi... i have 1 jsp form. my form includes 6 text boxes and 8 dropdowns. I want to insert the data of these textboxe and dropdown to Database. I am using mysql server 5.1.The problem is that when I insert, a blank screen appears. (Data in dropdown is retrieved from …

Member Avatar for gian88r
0
186
Member Avatar for somjit{}

i wrote a code to implement some basics of priority queue , but apparantly its not giving desired output. the code is implemented using binary heap as its data structure. i tried tinkering here and there , nut no luck... i want to display a given number of max or …

0
140
Member Avatar for aldm

Hi to all, I'm making one application for video control in firm...what's the best way to make application which have to access to webcam? There should be option for watching videos from more cams in real time...I read something on google and I found that Swing framework has some options …

Member Avatar for gian88r
0
1K
Member Avatar for ganges

hi i try to create a new dynamic web project in eclipse indigo, tomcat 7 i am getting these types of errors: Errors occurred during the build. Errors running builder 'Faceted Project Validation Builder' on project 'mysql'. java.lang.ExceptionInInitializerError i have deleted the project and created new one and again i …

Member Avatar for LastMitch
0
526
Member Avatar for nHulk

**registerBean.java** public void onEdit(RowEditEvent event) { Connection con = null; PreparedStatement stat = null; ResultSet rs = null; try { Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection("jdbc:mysql://localhost:3306/db", "root", ""); stat = con.prepareStatement("update regtbl set fname=? where rno=?") ; stat.setString(1, fname); stat.setInt(2, rno); stat.executeUpdate(); con.close(); } catch (Exception e) { e.printStackTrace(); } } ** …

Member Avatar for LastMitch
0
493
Member Avatar for game06

les say i have a map: //my map is biiger but this is just a ex. int map[][] = {{1, 1, 1 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}}; int camera_pos_x = 0; int camera_pos_y = 0; int camera_speed = …

Member Avatar for game06
0
253
Member Avatar for Fuzzies

Hi! I recently started teaching Java to myself yesterday via TheNewBoston on youtube. I began working on a few programs from the programmingbydoing website but I'm stuck on this problem:http://programmingbydoing.com/a/gender-game.html It's a problem focusing on nested if statements. Here's my code!: import java.util.Scanner ; public class MainClass { public static …

Member Avatar for bguild
0
565
Member Avatar for l.worboyz

As part of my Uni course i have been given code to edit to create a MineFinder (mine sweeper) game. I have 3 seperate classes to create this game. But for now, my problem lies with this "MineFinderModel class... the tasks i am struggling to complete is as follows: > …

Member Avatar for JamesCherrill
0
154
Member Avatar for london-G

Hello, I have build my application and now that I am trying to run the jar file by double clicking on it nothing happens. I tried to access it from my terminal(mac OS) using this line: java -jar "C:\Users\Me\NetBeansProjects\BS1\dist\BS1.jar" But get the following error: Unable to access jarfile Can anyone …

Member Avatar for london-G
0
363
Member Avatar for venus87

hi friends im in need of the basic code for reading a video file as matrices in a frame by frame manner in java. can anyone please help me ?

Member Avatar for JamesCherrill
0
147
Member Avatar for game06

so i got finally done with make my player move right and left, and 1st level. now i want to make my player shoot bullets. i kind of now logic behind it but i need some help. and please let me know if you have a better method of bullet …

Member Avatar for JamesCherrill
0
1K
Member Avatar for anand01

Hi all, I have problem with mb spring application I want to configure my url,my url should be like this **www.site.com/admin/login, www.site.com/admin/addproduct** I tried following way , its working fine, <servlet-mapping> <servlet-name>dispatcher</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> but when I changed like this <url-pattern>/</url-pattern> my images are not loading Any one could help …

Member Avatar for LastMitch
0
104
Member Avatar for engrjd91

Hello i m the student of B.E ( Computer Systems ) .. i have to submit my Final year project proposal within 1 month.. my teachers had concerned me to work on android.. but being an engineer student they want a hardware based project from my side.. i have to …

Member Avatar for <M/>
0
115
Member Avatar for SHINICHI

I need a little help on writing the following program: Use the Account class to simulate an ATM machine.Create ten accounts in an array with id 0, 1,. . . 9, and initial balance $100. The system prompts the user to enter an id. If the id is entered incorrectly, …

Member Avatar for untio
0
905
Member Avatar for vishalonne

I am using Netbeans 7.1 I have 2 jFrame JFrame1 and JFrame2 I just not able to close or hide the JFrame1 when I switch to JFrame2 This is the JFrame1 Code - private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { try{ int flag=0; String sql="Select * from login;"; smt1=con.createStatement(); rs=smt1.executeQuery(sql); String log=jTextField1.getText(); …

Member Avatar for rush_parekh
1
10K
Member Avatar for game06

i trying to my background move left if user hit right key. and background right if user hit left key. that way it will look like my player is moving. the problem is that when ever i hold right key, the background waits 1 sec than moves to left. i …

Member Avatar for game06
0
324

The End.