Misunderstanding with BigIntegers - no suprises there then...

1085 byte By cakea at 2007-10-2 11:59:42
HiI have a function for breaking down (supposedly) a BigInteger into a list, depending on the base! It works when I send it all my small test cases, however, when I do actually try and send it a 'big integer' it falls over, what am I doing wrong? Typical call ...

Uml to design algorithms

264 byte By smicheaa at 2007-10-2 12:02:07
I use UML class diagrams and it's nice .But is there a way to design the algorithms (in UML or an extension or free tools) so that the complete code of the class is automatically generated (at least for java and PHP) ?Thanks,Sebastien.

bouncing squares, embarassing question

1597 byte By RochaMeloa at 2007-10-2 12:03:13
Hello,I'm a newbie programmer in Java, and in had a quite silly problem when making a game, maybe you gentleman can type one word or two, just to point me the right direction, please.The game consists in a series of squares with letters inside, which are suposed to bounce when touching each ...

Logitude & Latitude Based Proximity Searching

973 byte By samblake0a at 2007-10-2 12:03:24
Hi,I want to do proximity searching based on longatude and latatued over the whole world. Basically I want to be able to have users find all other uses in a database that are close by (say 25 miles or something). So in some places the regions will be sparse and other densly populated.Initially ...

DAO, DTO, and BO confusion

13103 byte By kcraft4826a at 2007-10-2 12:04:30
Hello,I have decided to use the DAO pattern for a project that I am working on. Unfortunately, the relationships between my BO's make the DAO's overlap quite a bit. This has caused a lot of issues, especially in the area of SPEED. I have read a few articles on DAO's that say DTO's ...

Please help me figure out how to use a listener.

2586 byte By PirateXinga at 2007-10-2 12:04:57
import java.awt.Point;import java.awt.event.*;public class LineListener implements MouseListener{private Point current;public void mouseClicked(MouseEvent event){current=event.getPoint();} public void mousePressed(MouseEvent event) {} public void mouseReleased(MouseEvent event) {} public void ...

sudoku solver

185 byte By cmg2pa at 2007-10-2 12:05:03
I know many things have been posted about sudoku, but i have another question. is it best to use a 2D array to do this, and how does recurrsion help in solving this?thanks

Simple Grid/Tile based layout

758 byte By curiousdevelopera at 2007-10-2 12:05:30
I am trying to create a simple game, where there is the human controlled character and some enemy placed in a maze. When you take one move, the enemy takes one move, until he reaches you or you reach the exit.What I'm having trouble figuring out is how I can lay all this out.What I'm ...

arraying a series of colors

1448 byte By bluecarrota at 2007-10-2 12:05:57
hi all, i'm facing a problem working on a matching game and wonder if anybody could point me in the right direction.see, i have a 9x10 gridboard with 90 pieces to match, and there're 45 pairs of pieces of the same Oval look, except with different colors. i am implementing 9 different colors, ...

Questions on 2D

737 byte By Tuckya at 2007-10-2 12:06:05
Hi AllThis is a pretty all encompassing question... I am scheduled to do some work soon on producing a 2D viewing application for seismic analysis. We'll basically be taking 3 and 4 dimensional lumps of data and cutting two dimensional planes through them, drawing rulers etc.I have heaps of ...

which technology is fast and lightweight anong all webtechnology in java/j2

359 byte By mishramishraa at 2007-10-2 12:08:32
hi,friends i want to know that which java technology or J2EE technology(JSP,SERVLET,SWING,APPLET,struts and etc) is lightweight and fast.because i am going to use the simplest and lighweight web component component .So friends Plese tell me that which technology is fast and easy and lightweight ...

random pick string...

234 byte By shadowssssa at 2007-10-2 12:09:32
how to random pick the string out....when we set the total for string eg:string a = " how to pick out the string"if i choose 3 string out, result: how to pick....or......pick out the....or out the string...

BO patterns

330 byte By syncroa at 2007-10-2 12:10:56
Hey allAre there any good creational patterns for business objects? I've been using a abstract factory pattern for my DAO layer which works fine, but which pattern should I use for my BO layer? All suggestions are welcomed, I would though prefer simple patterns since I don't want the BO layer ...

need of DAO factory

329 byte By am_newa at 2007-10-2 12:11:44
HiI was reading about DAO patterns in various threads here and some examples of the implementation.There is one thing I am not clear with, is the use of DAO factory.why can't we do daoObj = new DAOClass() ; wherever we want to use it instead of the factory method returning the same ...

Barrel Distortion Correction

269 byte By the_beea at 2007-10-2 12:12:04
hello,i would like to know if anybody could tell me an algorithm for barrel distortion correction. I need to gather positional data of objects from an image and therefore i need the image to be accurate. Any help would be greatly appreciated.cheers

Random Number Generator

305 byte By anup_sunsysa at 2007-10-2 12:14:58
Within a specified lower bounds and upperbounds, generate specified percentage of Random Numbers.For eg., Generate 20% of random numbers out of (0 to 99). i.e., I should get 20 numbers randomly and UNIQUELY from 0 to 99 numbers.Thanks in ...

binary tree - a spesific node's height !

209 byte By JungleRata at 2007-10-2 12:17:15
hello ! im looking for a method to deterine a certain node's hight in a binary tree (that is its distance from the root ) please enlighten me on how to do this if you can thank you

need sample code for proxy design pattern

77 byte By jimmy6a at 2007-10-2 12:17:35
I need some sample code for proxy design pattern. Where can i find it?

keylistener <->graphics and speed problem

1093 byte By Seahadesa at 2007-10-2 12:19:01
hello,ive been trying to make a little java game (cfr bomberman) and im experiencing several problems.the main problem is that the only way i can implement both graphics and a keylistener is by putting them in one class (so both extends canvas and implements keylistener)but i wouldnt really ...

question on BO

559 byte By am_newa at 2007-10-2 12:19:12
HiI read a lot about BO and DTO on a couple of threads in this forumhave a question on BO based on the following threas http://forum.java.sun.com/thread.jspa?forumID=425&threadID=575476This thread talks about the example of zipcode and where should the validation happen, validating the ...

Loading Images in Java Applications/Frames

464 byte By daviddostera at 2007-10-2 12:19:23
Hi, I'm making a game for my Java class in school, I've been looking around for about a week and read through a lot of tutorials about loading 2D Java Images...none of them have worked.Can anyone provide me with a simple source code, or something that will load an image through a JFrame, or ...

Pagination Handler Design advice

3477 byte By Jawahar_m2003a at 2007-10-2 12:24:03
Original Problem: one of the SQL queries in my application returns a large resultset. Instead of sending the whole resultset to the client app, I have added changes to return finite number of rows based on User Input.Solution: This is a classical problem and found numerous resources on the web ...

TIFF File Viewer

5690 byte By Prankrishnaa at 2007-10-2 12:24:32
I am going to make a TIFF image viewer and I make that but I am facing some following problem -1. Its viewed big image how I resize every page of the Tiff image file.2. When I am going to make it in applet its not show the image, but in JFrame its show.I am attaching both java source file - 1. ...

Convert any document file in TIFF file

81 byte By Prankrishnaa at 2007-10-2 12:24:34
how to convert any document file in TIFF File, is there any API to do that

Need help with a tetris game

1671 byte By Mag9102a at 2007-10-2 12:27:13
I am working on a tetris game and I am having problems with dropping the blocks when there isn't anything under it. The code works until the end, when it gets to the bottom of the screen and there is one block on the bottom the entire line above it stops. Here is the code:public static int[][] ...

Singleton Pattern problem

14243 byte By kota_balajia at 2007-10-2 12:27:33
Hi,I have a problem with Singleton Pattern, I have implemented Singleton Pattern for Connection Pool class for database, Singleton pattern is working perfectly fine. And I have another class(DatabaseConnection.java) with all database methods in it. Ideally, when I make some changes in ...

UML and Java Design Patters

144 byte By venuc_vgpa at 2007-10-2 12:31:31
I am new to UML and Java Design Patterns Please suggest some good books for UML and Java Design Patterns.Venu

Static Page Caching WAS 5

493 byte By MyJava_2005a at 2007-10-2 12:33:21
We have a need for caching a static page at server side so that it can be utilized by the client and also by a service being called by other processes. The data in the static page rarely changes but if it does there needs to be a mechanism to update it and then serve the requests with the ...

parallel arrays

2108 byte By shivers20a at 2007-10-2 12:34:58
A menu-driven program in which I choose one one of these options and the program will carry out the request. The program will then display the same menu again and get another choice from the user. 1.List students names 2. List credits3. Show total credits4. List gpa's5. Lits gpa's in ...

Binary Heap Implementation Using a Binary Tree

1492 byte By stellanora at 2007-10-2 12:35:21
My Java AP AB teacher has set forth a challenge:As a group, the four students in my class must implement a Priority Queue using a binary heap. This heap, however, needs to be implemented using a binary tree, without storing it in an array. It's more of a wager than an assignment; we are ...

Struts advantages and disadvantages in java

125 byte By JavaSudhakara at 2007-10-2 12:39:36
Hi, Can any one please send me the advantages and disadvantages of Struts frame.Regards,Sudhakar.

mapping DB tables and classes - newbie question

717 byte By anjaa at 2007-10-2 12:39:42
Let's say i have 3 tables in the DB:authorcdtrackEvery author can be related to many cds, and every cd can be related with many tracks. In the db relations are realized by identifiers. But in the classes should i use references? I mean, should an author have a reference to every cd he made?And ...

Performace while using ORM for Tables with key value pair

1390 byte By inquisitivea at 2007-10-2 12:40:57
Dear all, I have a requirement to design table which should support multiple fields. The number of fields are not fixed as in the normal case. The user is given an option to choose the amount of data that he needs to keep varying based on templates.(configurator) I would like to know how will ...

Looping through RGB

969 byte By nadeemshafi9a at 2007-10-2 12:43:53
helloi am having some confusion over incrimenting the values of the RGB Colour obj in a loop, so far i hav been able to loop through 1 line of black to red. on the next line i want to change coulor creating a pallet.I am printing 255 pixels per line whith an incrimentation in the coulourThis is ...

Looping through RGB

969 byte By nadeemshafi9a at 2007-10-2 12:43:54
helloi am having some confusion over incrimenting the values of the RGB Colour obj in a loop, so far i hav been able to loop through 1 line of black to red. on the next line i want to change coulor creating a pallet.I am printing 255 pixels per line whith an incrimentation in the coulourThis is ...

Matrix Operations with Java

298 byte By bravoelt255a at 2007-10-2 12:44:04
Hi,I am currently working on a thesis. It involves the use of algorithms and I will also need to implement some 2-D matrix operations in java. I managed to do so however I have a problem in implementing the square root of a 2-D Matrix. Can anyone

Returning all possible combinations of values!!!

384 byte By Pharaosa at 2007-10-2 12:47:12
Hi buddies,Can u suggest me a method that can return all possible combination of values from a set of values and place it in a txt file?. Anyway i only need the method returning all possible combinations!For example:A = {2.0,3.5,6.7,8.9,9.9,10.0}one of the combination can be: ...

Difference between Factory and Abstract Factory Pattern

156 byte By anu_montoa at 2007-10-2 12:47:38
Hi All What is the difference between Factory and Abstract Factory Pattern. I often get confuse between themThanks in advanceanu

Question on Design of a Custom IO Package

3468 byte By Endera at 2007-10-2 12:51:31
I am making a package for blocking i/o which I plan to use in many of my future client programs. I have thought about modelling it on Thread and Runnable; that is, you can create a concrete implementation by either subclassing a BlockingSocket class or overriding its Parseable interface. ...

sprite collision controll help

1012 byte By pi3rc3a at 2007-10-2 12:51:38
hey, im trying to make something in my game so that when a user clicks a sprite it becomes in a state of 'activity' and only 1 sprite can be in it at a time. now when a sprite is in 'activity' i want it so when the mouse gets a certaint amount of distance away from the sprite it will send ...

OO Design question.

582 byte By ssv45324a at 2007-10-2 12:54:38
I am supposed to design a report generator, to draw graphs, trend lines etc. So basically i was thinking my design to be in the following way -class DataGenerator - the class which fetches the required X axis values and Y axis values from the database.I was thinking may be i can stored ...

Algorithms for trigonimetric functions

147 byte By Samuraya at 2007-10-2 12:54:39
Does any one know any good site where i can find algorithm how cos , sin , etc. fuctions are beeing calculated.Thnx for all the help.

nested object equality - design pattern

2385 byte By netiquettea at 2007-10-2 12:55:12
Looking to solve a problem in my own code, I wanted to see if and how the problem is solved in the java library.I would have liked this code to output "true", to see how it's done.Set set1 = new HashSet();set1.add("a value");set1.add(set1);Set set2 = new HashSet();set2.add("a ...

Can delegate and strategy patterns coexist ?

773 byte By LS123a at 2007-10-2 12:55:55
Say I have an interface for persistence call that PersistenceInterface.Now for MySQL I created MySQLPersistenceClass and for DB2 I created one more class DB2PersistenceClass.Now to proceed with my busines slogic I have a class BusinessLogicHandler class.BusinessLogicHandler has a class member ...

Image resolution algorithm

582 byte By ssaanna at 2007-10-2 12:56:00
Hello!I "reload" a request (first posted on the Java 2D Forum) hoping for more success, this time:Please, somebody help me, if possible, with an algorithm (or a pointer to such an algorithm) that allows saving an image in a file, with a pre-set resolution (pixels per inch), to have the ...

Trie

554 byte By bjb1440a at 2007-10-2 12:57:02
Does anyone know of a good open source implementation of a Trie. I've been assigned to look into the potential of using AJAX within our organization. As a test case, I'm trying to implement a simple auto-complete application for street addresses. The source of these addresses is a relational ...

Hibernate question.

167 byte By ssv45324a at 2007-10-2 12:57:08
Does hibernate eliminate the DAO design pattern? If yes what are the advantages and disadvantages of hibernate over DAO design pattern.Thanks in advance.

Java and VRML for my project?

835 byte By hftwa at 2007-10-2 12:57:14
Firstly sorry if i'm posting this in the wrong section.I am currently doing a uni project which is as follows"To help new bird watchers develop their skill at spotting well hidden small birds in deep foliage a 2D (or 3D model) will present various simulated scenarios with one or more birds ...

User Interface Changes

1167 byte By klarissa@forumsa at 2007-10-2 12:58:56
Hello, We plan to update forums user interface and some elements of user experience and would like your feedback. In a a few days I will post some screen shots to this forum and would like to ask the community to vote. The changes will go first on swforum.sun.com and than to solaris and java ...

Need help

202 byte By rah23ma at 2007-10-2 12:59:18
I need a group of staff to help make a game we need 3 other people 2 programmers and 1 graphics if you want to join msn or e-mail me.Note you get payed once the game is up and people buy credits.