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 ...
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.
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 ...
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 ...
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 ...
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 ...
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
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 ...
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, ...
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 ...
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 ...
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...
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 ...
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 ...
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
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 ...
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
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?
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 ...
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 ...
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 ...
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 ...
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. ...
how to convert any document file in TIFF File, is there any API to do that
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[][] ...
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 ...
I am new to UML and Java Design Patterns Please suggest some good books for UML and Java Design Patterns.Venu
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 ...
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 ...
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 ...
Hi, Can any one please send me the advantages and disadvantages of Struts frame.Regards,Sudhakar.
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 ...
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 ...
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 ...
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 ...
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
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: ...
Hi All What is the difference between Factory and Abstract Factory Pattern. I often get confuse between themThanks in advanceanu
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. ...
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 ...
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 ...
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.
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 ...
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 ...
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 ...
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 ...
Does hibernate eliminate the DAO design pattern? If yes what are the advantages and disadvantages of hibernate over DAO design pattern.Thanks in advance.
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 ...
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 ...
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.