command patter

63 byte By Ben.Kalea at 2007-10-2 12:59:39
what is the command pattern ?with regs,Ben

recognize pixel problem

234 byte By maniaca at 2007-10-2 13:01:24
how can i recognize a character such as "A" from jpeg or BMP file to editable text like microsoft word. the problem is, i don't how can system read the characters from jpeg and convert them to other file suck as word document.

Sudoku help needed

142 byte By bbrown79a at 2007-10-2 13:02:14
Complete newcomer to java!!I want to create a sudoku java game using a gui. How do i go about this? Whats the best way to start?

how to start game programming

116 byte By AnEeS_Bhaia at 2007-10-2 13:04:42
hiim a newbie to game programming. please help me that how to start game programming?thanx alot

How to sort a set of integers

351 byte By Wenxiaoa at 2007-10-2 13:06:09
I have an int array containing a set of integers, and an empty ArrayList.I want to find the biggest integer and add it into the ArrayList, and then find the second biggest one and add it into the ArrayList as well, and the 3rd biggest one, as so on. How to achieve that? Could anyone write a ...

Flexible Article

998 byte By hammouda at 2007-10-2 13:08:37
Hi all,currently i start building a new application for a customer.And i consider about to create a flexible article structure, which i can use also for other customers.1. Article can vary in different Attributs and number of attributes (size,color, ...)2. One Article can have several child of ...

Good coding style

292 byte By Wenxiaoa at 2007-10-2 13:09:58
I'm new to OO design. I find it easy to write all the procedures inside the main function: public static void main(String[] args) {}which I do not think is a good coding style. Could anybody tell me the disadvantages of it and how to modify it? Thanks in advance!

WWW networking / MMOG

2684 byte By aRyan316a at 2007-10-2 13:12:46
Hello everybody out there. In an attempt to never lose interest in the learning aspect of Java (or call my game engine complete), I have decided to *attempt* to learn how to create a fully-functional WWW server in java.Now, with not a lot of HTTP or PHP or whatever experience, I am at a loss. I ...

recursive alg question

1508 byte By JJPeerlessa at 2007-10-2 13:13:10
ok, i have a 8x16 grid of ints. if the grid has a 3 it is an empty space. if it has a 0 it is what im looking for, and if it has a 1 then its a path, basically33333333333333333333333333333333333333333333313333331133333113333331133333303333333333333333333331333333311333333311333333333333ok so ...

MVC model: JavaBeans vs. EJBs

310 byte By Smurfaa at 2007-10-2 13:15:20
I have to design and implement a web site for a Travel Booking Agency where users login, book trips and so on...My question is how to design it in the sense of whether use JSP-Servlets-JavaBeans or EJBs. I quite miss the idea when to use the one and when the other in more simpler cases...10x in ...

Looking for Alternative Design solution for Java Beans(Domain Object Design

383 byte By munn_2000a at 2007-10-2 13:17:23
Hi All,I am looking for alternative Design solution for Java Beans(regular beans). Right now I am using Java Beans to store the data that comes from DAO object. Setting this databean into request scope to use on JSP page. Now I want to change this databean design to Domain Object Design. Can ...

what is rule engines?

8 byte By at 2007-10-2 13:17:43
?

BigInteger... help me!!

1858 byte By parisa at 2007-10-2 13:18:54
Hi,Can anyone help me. I used BigInteger to calculate the factorial. Howeverit always printed error when I insert a number upto 4000.import java.io.*;import java.math.BigInteger;// A class represents factorial calculation.public class Factorial{// main method of the program.public static void ...

How to setup a (ui) class in a readable way ?

1125 byte By buggymana at 2007-10-2 13:20:24
I'm pretty new to java (and java's OO model) and i can't really think of a nice way to do this :I'm creating a UI, a JFrame which has a JTabbedPane (with 8 tabs)and each of these 8 tabs contains either a few listboxes or a pretty complex form (think: 8 textboxes, dragdrop lists, buttons, ...

Making an arcade game run smoothly

610 byte By WookieRebela at 2007-10-2 13:20:37
Okay so I'm making a mario/ adventure game with sound (I'm using javax media). I'm having issues with my sound being smooth as well as graphics. I was wondering if their were any good reads on efficient game programming. When I started making the game it ran smoothly, but as I added a layer ...

adding binary numbers in java please help!!

477 byte By trscookiea at 2007-10-2 13:20:55
Hello all, im a total newbie to java and i need your help urgently, i have two variables that are integers, that store binary numbers i.e.int tmpIntOne, tmpIntTwo;tmpIntOne = 1010;tmpIntTwo = 1110;i want to add these numbers together and return a binary result so far when you add them together ...

Image caching causing problems

1027 byte By WildFirea at 2007-10-2 13:21:38
I am making a Java based game. I'm using a mixture of static and animated gifs (things should switch to animated gifs now and then e.g. when something explodes).I am using Tookit.getImage() to get images, e.g.Toolkit kit;Image image;image = kit.getImage("images/Explode.gif");This caching is ...

round robin

977 byte By sam1986a at 2007-10-2 13:21:42
I am supposed to write a small program that will process a number of processes that will have a cpu job and io job each.I have not taken the OO class, so not really have to implement patterns or threads.I am just troubled....We have to schedule the Round Robin algorithm. If one process has ...

Using Objects to Initialize Static Fields: Good or Bad

1773 byte By ktm5124a at 2007-10-2 13:21:59
I have a Command interface and a bunch of Commands that implement it (i.e. CmdJoin,CmdQuit). These Commands' settings change at runtime (i.e. required access levels, String identifiers). I don't want to have to store an instance of each Command in a database to save their settings , so ...

network game data transfer

226 byte By rkippena at 2007-10-2 13:22:16
Suppose one were to make a game, like warcraft 2, where a majority of network data originates by mouse click. Is it possible to only send the mouse click information? Or are the coordinates of the sprites required also?

Need design pattern advice

682 byte By cinoda at 2007-10-2 13:22:53
HI all,Im trying to create a single router application that routes transactions to a number of Processing applications. Both applications reside on different machines. Upon system start up of the Processing application, the router will be notified and will register this application to its local ...

trying to implement a quadratic sieve!

308 byte By cakea at 2007-10-2 13:24:07
HiI am trying to write a quadratic sieve. Without posting the code, would anyone be willing to walk me through it, as to be completely honest, I am lost? The examples in the book 'Number Theory with Computer Applications' are as about as useful as a goldfish with a driving ...

Copy Constructor versus copy() methods

939 byte By Tuckya at 2007-10-2 13:24:13
Hi AllAm interested in some views on copy constructors versus copy methods. I work with a group of programmers many of whom diligently use copy constructors instead of copy methods. I think this is due to reading Bloch's views on the clone method and advocation of using a copy constructor ...

My version of (replacement for?) MVC - thumbs up or thumbs down?

2875 byte By Drake_Duna at 2007-10-2 13:25:09
I would like to get opinions on whether the following design approach has potential. I use MVC and command pattern terminology here.The model is a model. What more needs saying? It does not know anything about anything else. It just sits in its room listening to The Cure until someone comes ...

Singleton, Concurrency and Performance

4014 byte By blueboya at 2007-10-2 13:26:29
Dear all,Below is part of the code of my Singleton ServiceLocator:public class ServiceLocator {private InitialContext ic;private Map cache;private static ServiceLocator me;static {try {me = new ServiceLocator();} catch(ServiceLocatorException se) ...

J2EE design question: zipping files in memory vs hdd

609 byte By fastolfa at 2007-10-2 13:28:32
It is commonly known to be a bad practice to use the java.io package in the J2EE world. I'm currently architecting an J2EE app that is supposed to fetch a couple of files from an external system (web service interface) and make a zip file including all the files for further processing. I'm ...

ValueListHandler, Large Results and Clustering

469 byte By djeleya at 2007-10-2 13:29:07
Has anybody got experience of using the ValueListHanlder pattern with a session facade and potentially very large query results, e.g. millions of results (even when filtered)?How did this solution scale with many users each with a stateful session bean containing all of the results? How did ...

Best structure to use...class getting too big

1093 byte By jneaua at 2007-10-2 13:30:28
Need a little advise.I write a poker tournament management application. In the app, I have a "Player" class to track info on a player including their name, email, phone, etc. A also use that class to track information that changes dynamically throughout a tournament, such as:- money paid in- ...

Classes that reference each other

697 byte By jneaua at 2007-10-2 13:30:29
In my app, I need to track where people are sitting.The way I stupidly did it at first was as follows:"Person" has a "Table" and "Seat" attribute."Table" has multiple "Seats"."Seat" has a "Person" attribute.All seating is done through a class that handles the connections.What is the best way to ...

Bezier Cubic & quadratic curve Algorithm ?

454 byte By gekazodea at 2007-10-2 13:32:56
I have tried many different sites and algorithms to draw a cubic or quadratic curve in a bufferedimage. all of which have worked but when overlaped with java2d path output of the same curve, some pixel hance points are of by a pixel or two. But the general shape of the curve is true. So i was ...

Design question - implementing permissions

626 byte By ssv45324a at 2007-10-2 13:35:22
We have to implement permissions in our application. Which method do you gurus suggest?a) Checking if a user has the permissions to do a certain action and enabling/disabling/hiding the input control accordingly.The drawback i see in this approach is that a user who want to hack the application ...

how to caculate geographic extension

292 byte By lvguangchuana at 2007-10-2 13:36:17
Hi,ALLI have a question,PLZ heip me.I have a geographic coordinates(-79.65231,43.682334),treat this coordinates as centerpoint.I want to cacluate the rect with width (100m),height(150m)so I want to cacluate corner geographic coordinates.Thanks

postfix.?

198 byte By leri_19a at 2007-10-2 13:37:55
do you guys have any idea about post fix.?can you please help me.?I trying to make a calculator program but I can't make my mathematical sentence into a postfix.!

optimal Hamming Distance implementation

5406 byte By bbatmana at 2007-10-2 13:38:08
Anyone know how to optimally implement a Hamming distance and weight function?My first stab is this code:/*** Calculates the <b>Hamming distance</b> between 2 ints.* The ints are viewed as binary strings, so the result is the number of bits where the 2 ints differ.* In particular, ...

Switching Screens Speed?

16437 byte By Melosa at 2007-10-2 13:38:26
Hello everyone again,I'm pretty new to programming in Java and I'm getting an error in my program. The program runs fine but it's slower than I wanted. The Windows Consol does not give any errors. The program displays a title screen of a game I'm making with background music and a button. ...

3D Game Programming

415 byte By NickyP101a at 2007-10-2 13:39:02
Hey all,Im using Java with OpenGL (using lwjgl) to create a 3D shooter. Its come to the time where i need to implement some 3D models into my game, ive found some good ones on ithe internet in .3ds format. i have no idea how i can implement these models into my game?Im really not sure what ...

JLabel prob

158 byte By shadowssssa at 2007-10-2 13:41:03
how to use .setText to set the value on the JLabel if the value is integer type...any other ways can help me to solve this problem..thx..

Need help for this question to get output.(very very urgent)

646 byte By samuelea at 2007-10-2 13:42:35
Using Java, write a method that does an in-order traversal of a binary tree WITHOUT using recursion. based on the following code This program should run to get the output.I think I have this ListNodes method but I need some code to create a binary tree and pass the root node as parameter to ...

what is the use of the setter dependency injection in Spring?

571 byte By keepswimminga at 2007-10-2 13:42:47
What is the use of the dependency setter injection ?In a database driven app, I retrieve results, use the javabeans set methods to save stuff in javabeans and then call get on it.What is the use of having something set externally from a xml already ?Can someone provide an example when the ...

Generics and prototype patter

3781 byte By BigLebowskia at 2007-10-2 13:43:20
Hello, I'm trying to do the following (see C# example code): http://en.wikipedia.org/wiki/Prototype_patternThis is (bad) a try in my code:import......public class DataFactory{private DataFactory(){}private static HashMap<Type, Abstractdata><?>> instances = new HashMap<Type, ...

Miller-Rabin problem

2161 byte By cakea at 2007-10-2 13:43:38
HiTrying to code the miller-rabin primailty test, hit a problem and can't quite see where I am going wrong, err, help!public static boolean mr(BigInteger n, int t) throws Exception{//Miller-Rabin Primality Testsrnd = new SecureRandom();BigInteger s = n.subtract(ONE);BigInteger r = ...

Different types of Polymorphism

165 byte By HowardDana at 2007-10-2 13:44:54
What are different types of polymorphism in Java OOP? I read overriding is runtime. Please provide code sample as how overriding can happen at runtime.

"Conversion from ASACII to Hexdecimal"

189 byte By spinergywmya at 2007-10-2 13:46:34
Hi there,Is there anyone can help me on how to convert the hexdecimal to ASCII? Or any references that I can look into it? This is ASAP. Thanks.regards,Wooi Meng

How can you increase the effiency of a tetris program?

3045 byte By Mag9102a at 2007-10-2 13:49:44
Hi,I have been working on a tetris game and its starting out ok. The only problem is I can't speed up the timer that will drop the blocks one space. When I go faster then 1 second on the timer, the program skips spaces at random intervals. I think the program might take to much time processing ...

Problem with writing a Line to a Data Stream

906 byte By Logrosa at 2007-10-2 13:50:03
I am writing a server <--> applet type of game. I want to send player actions as strings that I can parse for neccessary data. First I used DataInputStream and DataOutputStream, but I found that the readLine method of DataInputStream is depricated and sun recommends the use of ...

what is the difference between a data object and a business object?

27 byte By nizzails11a at 2007-10-2 13:50:19
thanks for any input

PLEASE HELP ANSWER THIS QUESTION... I HAVE INTERVIEW THIS MORNING

693 byte By balogiza at 2007-10-2 13:51:59
Another object oriented application deals with roads. The application has a global list object containing Road objects. When the RoadNetwork class requires a particular road it searches through the global list until it finds the road name that matches. The City class also requires roads by ...

GUI Design Question

5824 byte By marek.ja at 2007-10-2 13:53:24
Hello, I wonder if you can give me some advice...I created a small application about 3 years ago now and I thought I would give it a re-write. I am building the GUI part and I'm torn between two ways of implementing it:-One way of building this GUI is by declaring all its controlling ...

Visitor Pattern - Help Needed

122 byte By murlia at 2007-10-2 13:54:57
In a tree of nodes how can one use Visitor Pattern. If possible please refer some sample code for helpThanks

Prime Number Solving Problem

1060 byte By mkveerapena at 2007-10-2 13:55:07
I am very new at this.Recently i got a question of making an output of prime numbers with no input involved. class PrimeNum8{ public static void main (String [] args) {int num=2;int i = 2;int q = 1;int term=100;System.out.println("Prime Numbers");if (num==2){System.out.print(num+ " ");}for (int ...