what is the command pattern ?with regs,Ben
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.
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?
hiim a newbie to game programming. please help me that how to start game programming?thanx alot
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 ...
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 ...
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!
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 ...
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 ...
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 ...
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 ...
8 byte By
at 2007-10-2 13:17:43
?
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 ...
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, ...
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 ...
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 ...
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 ...
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 ...
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 ...
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?
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 ...
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 ...
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 ...
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 ...
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) ...
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 ...
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 ...
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- ...
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 ...
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 ...
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 ...
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
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.!
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, ...
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. ...
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 ...
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..
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 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 ...
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, ...
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 = ...
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.
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
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 ...
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 ...
thanks for any input
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 ...
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 ...
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
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 ...