I want to create a mirror image

1492 byte By Mesinaa at 2007-10-3 5:11:53
Hi, I want to create a mirror image effect: when the character is moving left it face left, when is moving right it face right.The character can move also up and down, but I want only this kind of effect: left and right.So, if my character have face left and it move up/down, it continues with ...

Hey,How can i calculate how many times i have the following pattern {num}

190 byte By AvihaiMara at 2007-10-3 5:14:18
Hey,How can i calculate how many times i have the following pattern {num}*** num - is a positive number .*** the number is between curly braces.Thank you .

Recommanded J2EE design pattern

692 byte By George_Smitha at 2007-10-3 5:15:15
I have a program with the following design:one WebServicewhich calls one EJB (Session bean).The EJB is calling one of 9 STATIC(!) methods (depends on parameter that webservice accept) which can call another static methods etc...I know this design is bad, and I want your recommended design for ...

want to submit contents of a form to a file how to do it?for RSS FEED

1040 byte By vj_makera at 2007-10-3 5:23:12
want to submit contents of a form to a file how to do it?i have a RSS form contents are :Channel, its id,url,desc,etc.then item,its id,url,desc etc.when i say submit i have to submit all the contents.Now add these contents to a class called item.how do i do this actually.sholud i start with ...

How to know a double has significant decimal part or not

582 byte By David_Leala at 2007-10-3 5:23:57
Dear members,I would like to know if a number stored on a double value is really a double or just an integer value.long iSum = Math.round(sum); // sum is double typedouble diff = sum - iSum;assert diff == 0.0: "The ammount should not be a decimal value";This is valid under floating ploint ...

Pattern Suggestion for Extractor Classes

1500 byte By quadfxa at 2007-10-3 5:27:04
I currently have several "extractor" type classes and I am curious if there is a more efficient way of doing what I am doing now.Let me explain with examples:I have several Extractor classes calledSnowExtractorWindExtractorMetaExtractorDepthExtractoretc.each extractor looks very similar but is ...

A bit confused about the Service Layer

1376 byte By aconst_nulla at 2007-10-3 5:27:08
So, I've got a "rich domain model" sorted for a fun little app Im playing with at home. All the "business rules" are in the model.So, next step - I guess I want a "Service Layer" which directs the use cases in the app, controls security and transaction demarcation and would be talked to by, ...

More VolatileImage trouble - unpredictable behavior

1861 byte By Bakemono_Samaa at 2007-10-3 5:35:32
trust me, i have been reading most of the topics with problems like this. Chances are im not understanding the concept behind VolatileImages, so any help wil be apreciated.im studying game development with java, and came up to 2D graphics. I have a small library, consisting basicly of 3 ...

How to display image in java console

331 byte By ggopia at 2007-10-3 5:35:36
Hi,I am new to this java game development. Now I am trouble to do the one game project. I have totally four simley face. Each simley face can having one seprate image file. I want to display that images in my java console. So can anyone help me please..........Message was edited by: ...

porting problem in SonyK750

440 byte By svbba at 2007-10-3 5:35:57
Hi all,I am working on porting for SonyK750. In this, If I will try to connect the remote server, I got the error"Warning: To avoid potential deadlock, operations that may block, such as networking, should be performed in a different thread than the commandAction() handler."and I can't to move ...

DAO pattern and Java Persistence API

1145 byte By jusia at 2007-10-3 5:37:14
HiThis is a question for anyone who might be familiar with the standard DAO design pattern and the Java Persistence API (JPA - part of EJB3). I'm new to this technology, so apologies for any terminology aberrations.I am developing the overall architecture for an enterprise system. I intend to ...

Single instance

199 byte By Deepika_nca at 2007-10-3 5:39:56
i want to know how to restrict second instance whiel first instance is running.any body plz help me in this regard.my id is deepikaachalla@gmail.com or deepika@nannacomputers.com

Att. Sun: www.javagaming.org: registration doesn't work

105 byte By MortenHjerlHansena at 2007-10-3 5:41:27
Please correct this. The registration service at javagaming.org doesn't send the activation mail.

Deadlock Free Minimum Hop Routing Table

1678 byte By proshnoUTa at 2007-10-3 5:41:33
I'm a student at UT Austin and currently facing critical problem in solving a problem called "Finding Deadlock Free Minimum Hop Routing Table Generation".In this problem a network topology will be given (as an adjacency list), and the output will be a routing table (adjacency matrix), such ...

Dual graph algorithm

1051 byte By M.M.a at 2007-10-3 5:41:44
Hello to all of you! Does anyone know a known algorithm to create the dual graph of a planar (undirected) graph? Or could you give me a hint? I tried to devise a DFS approach, which would use the back and cross edges of the DFS tree in order to form the faces. The problem is that I need the set ...

hiii - urgent

814 byte By ramnath_pa at 2007-10-3 5:42:38
Plese send me the javaconsole code for this gameRULES OF GAME:* Spheres come down from the top of the game board in pairs. A player can rotate them on their way down.* Spheres come in 4 different colors: red, blue, green, and yellow* Linking four spheres of the same color (horizontally, ...

Distribution Counting Sort

850 byte By JuppieJuxa at 2007-10-3 5:42:53
Hi all,I've been given an algorithm and am supposed to code it using Java. The thing is I'm not quite sure how to go about implementing the algorithm itself and would really appreciate it if somebody could extend their help.ALGORITHM DistributionCounting(A[0...n-1],L,u)//Sorts an array of ...

Substring Algorithm

781 byte By C_Zhaoa at 2007-10-3 5:42:59
Hi, I have been given a practice problem involving dynamic programming and i would appreciate some helpIf you are given 2 strings, str1 and str2, find the longest possible common substring.So, for example, if given the strings 'rebublican' and 'democrat' (sans quotes), the longest common ...

parse message algorithms..

7114 byte By kyhoa at 2007-10-3 5:45:10
hi all,we are involving in sms project. due to the limitation of sms..we need parse a exceed length message into smaller one.we have implement a method to split the message to an array of vector.but i got the the method seem very burte force. here is the example code. I am seeking a better ...

Reassigning a method parameter

177 byte By sri1025a at 2007-10-3 5:45:18
Hi,I was looking at the new features of eclipse 3.2's JDT and in there they have mentioned that re-assigning a parameter is considered a poor practice.Why?

Memory performance question

470 byte By George_Smitha at 2007-10-3 5:45:44
HelloI need to know what is preffered regarding memory usage : 1) using static methods or using non static methods2) using static members or using non static membersbecause from a test a made, it seems that a combination of using static methods and non static members, is the best choise and ...

Rush hour game algorithm

788 byte By cnaanta at 2007-10-3 5:51:31
I was playing a game called rush hour: http://www.freegames.ws/games/freegames/cargames/rushhour.htmAnd wrote a computer program to solve it. The algorithm was easy enough:1. pick a car randomly2. move it randomly.3. check if the rad car can exit4. back to step 1.This solution of course solves ...

Please recommend me the best J2EE design pattern

714 byte By George_.Smitha at 2007-10-3 5:51:47
HelloI decided to rewrite my J2EE application.This application will be installed on Websphere App Server 5.My application should return XML's (as String) from remote requests, probably by webservice/es .There should be 9 kinds of requests.Which design do you recommend me to use ?Please suggest ...

iText font

368 byte By patmugaa at 2007-10-3 5:52:14
Does anyone know how I can use arial Font in iText.Currently I am using Times_ROMAN because iText has no Arial_NarrowFont font= FontFactory.getFont(FontFactory.TIMES_ROMAN, 10, Font.NORMAL);table.addCell(new Phrase("Company:",font), new ...

linking UI to application layer

480 byte By aus_java_studenta at 2007-10-3 5:53:34
Hi,I consider myself pretty new to oo, so this question might sound stupid.How do I link the UI to the application/busines/ domain layer?I mean can I pass messages from the domain layer to the UI or does the UI send messages?For instance, to update a result in a textfield do I send a message to ...

Enterprise bus paradigm

768 byte By kilyasa at 2007-10-3 5:54:46
Looking at the Enterprise Service Bus architecture, where the bus is simply a static router and then adding on top of it some decision making capabilities it would be called a Dynamic Message Router as per "Enterprise Integration Patterns" and then further down the road, if you add a Business ...

adjusting images to monitor size

855 byte By Dr_Spuda at 2007-10-3 5:56:12
hey e1, I'm in the process of writing my first game so Im just learning the majority of the algorithms associated with games. When I started this game it was strictly for my computer (1280 x 800 monitor size) so I drew all the images to fill my monitor and usedframe.setExtendedState ...

Selection Sort

963 byte By JuppieJuxa at 2007-10-3 5:56:58
I was given this algorithm ALGORITHM SelectionSort(A[0...n-10)//Sorts a given array by selection sort//Input: An array A[0....n-1] of orderable elements//Output: Array A[0.....n-1] sorted in ascending orderfor i = 0 to n-2 domin = 1for j = i + 1 to n-1 doif A[j[ < A[min]min = jswap A[ i ] ...

Setting range for array

761 byte By JuppieJuxa at 2007-10-3 5:57:02
I need to set the range of numbers for my array where by I need to give a set maximum and minimum number to my array. This is what I thought up off but it isn't very efficient cause it will take too long for my program to executedo{for (int i=0; i<array.length-2; i++){array[ i ] = ( 1 + ...

Application architecture for high volume data transaction

940 byte By Zubsza at 2007-10-3 5:59:25
Hello,I came across a performance issue in one of the application developed for our customer. The application is n tier application involving a rich client, EJB application server, DAO layer and data base. The data is transferred within the layers from DAO to client using value objects. DAO ...

Read/write from a ArrayList without using synchronization

330 byte By akhannia at 2007-10-3 6:00:46
In a multithreaded environment, where multiple threads are reading and writing to a ArrayList, what is the most efficient thread safe way of reading and writing from a ArrayList without incurring the cost of using synchronized keyword.In simple words, have a thread safe arraylist, without using ...

SecureRandom best practice?

579 byte By LuisKarlosa at 2007-10-3 6:01:58
Maybe someone can help me with this.So far I found that SecureRandom is better than Math.rand, but is hard to find something like a best practice for SecureRandom, for example:1. How long the seed must be?2. I am going to use the SecureRandom for multiple games, should I use a global ...

permutations

340 byte By nocturncala at 2007-10-3 6:02:10
I am having a problem designing a code that deals with permutations recursively. What i am trying to do is design the code so that it takes in a phone number and gives me all the permutations of the number. the mapping from number to letter is just like the letters on a phone keypad. 1 and 0 ...

SCJP certification

486 byte By qassimgia at 2007-10-3 6:03:05
Hi Everyone,Can anyone tell me what is the best book/material to study for SL-275 (Java programming language) to become a SCJP? I have no previous experience of Java, though I been working with C, COBOL and Unix for the pas 11 yrs. I donot want to attend the sun training course bcoz I simply ...

Distribution count sorting

2145 byte By JuppieJuxa at 2007-10-3 6:04:06
I have written this piece of code:public static String DistributionCountingSort(int array3[], int firstindex1, int lastindex1, int arraySize1){int arrayrange = firstindex1 - lastindex1;//lastindex1 is 'l' and firstindex1 is 'u'int DArray[] = new int[arraySize1];int SArray[] = new ...

drawing image on frame..

273 byte By abhaykumara at 2007-10-3 6:08:41
hi frens..Is there way of drawing an image on Frame without erasing previous image. Each time the repaint() is called for drawing new image on frame using Graphics object, repaint() just clears the previous images , but i want previous image to be sustained .

Java EE App design question

1245 byte By JamesSelvakumara at 2007-10-3 6:09:08
Hi all,I've have to design an Java EE application which consists of a "Web Client Tier" which handles web based users and "App Client Tier" which consists of several application clients.Points to concern:1. The load from app clients will be more than from web clients.2. Typically the web ...

formatting string

121 byte By echizena at 2007-10-3 6:10:59
how do i store an int say value 6 and store it in as a string to hold "00006" in the string. thanks.

A design for document creation

412 byte By vislavtia at 2007-10-3 6:12:23
Hi All,I am working on a project which needs documents to be created. Currently we create 5 documents(pdf files). I would like to create a design so that tomorrow if there is need of creating new documents I can create them easily without much code changes. The documents format may be ...

Age calculation

222 byte By aelaraa at 2007-10-3 6:14:27
I am lookinf for an algorithm that will count the age of the students according to their date of birth. Also i want the program to extract the age of the students automatically in the next years.....thank you

Code generating unwanted '0'

800 byte By JuppieJuxa at 2007-10-3 6:15:16
I've written this piece of codefor (int i=0; i<array.length-2; i++) //assigning random numbers to the array{array[i] = ( (int)(Math.random() * lastNumber + 1)); }And I do not want it to generate the number 0 but it does. Can somebody please tell me where I went wrong? I thought even if ...

binary search tree in a file

634 byte By qwedwea at 2007-10-3 6:17:51
hello everyone,I need help in writing a binary search tree into a text file andlater, search the nodes in the file by using search function in the program. I have a binary search tree i.e.,7/\59/\/\36 810to be changed into ....file.txt=====75936810To search the node 3 in the file, I have to ...

Search algorithm PLEASE HELP !!!

367 byte By JKodera at 2007-10-3 6:18:38
HelloI need an algorithm for comparing 2 strings. IT must function like "LIKE" method in SQL.Can anyone help me on this ?I think it must be done with regular expresion, but i have no ideea how.For example:"Hello everybody in here, the java Forum" MUST mach with "everybody in here forum"Is this ...

Crc Help

972 byte By Joy-Energisera at 2007-10-3 6:19:02
Hi allIve recently been assigned the task to interface with a Quantum Dvr(digital video recorder) Kdvr1080.I can send and recieve streams on network and generally communicate with the dvr but im haviing trouble with the crc checksums.The manufacturer has taken far to long to send any help ...

Anyone want to help me out?

568 byte By game_virgina at 2007-10-3 6:21:05
Hi All,Dunno if im in the right place for this, but I need a favour from any kind soul out there...Im doing my university dissertation; the topic is to build a 2D game engine, in Java, for board games. So if there are any game developers out there, who have an interest in building a board game, ...

Is Java a Serious Game development platform - Except for Mobile Gaming

377 byte By DANa at 2007-10-3 6:22:15
I would like to know whether Java can be considered a serious gaming platform. When I say gaming I am basically talking about 3d Games. I know that Java3D is maturing and picking up fast, but Is it mature enough for real PC gaming? and are companies taking it up for game ...

Recursive algorithm

409 byte By rafael_josema at 2007-10-3 6:25:00
HI, im having problems with the following algorithm: Given n integer numbers, find combinations between them of sums and differences that totalize an objetive value Z. The program should have as input the n numbers and the objetive value Z, the output must be the combinations of numbers with ...

Recource allocation in grid computing(URGENT)!!!

422 byte By kyotia at 2007-10-3 6:25:03
Hi everybody, i want to develop a simple mechanism for resource allocation in grid computing, but the grid computing is a very big topic and I could not grab it all, I've read a lot of articles and I was confused, so please can anyone tell me resource allocation mechanisms that are easy to ...

Accessing Pictures from JApplet through JPanel

596 byte By Aakash.Polraa at 2007-10-3 6:28:00
Hi there!First of all, Thanks for giving time to read me!I made a game, which is in JPanel. It accesses some images from the file (JPEGs and GIFs) from local disk.Now, If I put that JPanel in an Applet (or JApplet), I am getting security errors of can't access files.I have used URLs in ...

Convertion of Decimal to Binary, Octal, and Hexadecimal in Applet

1367 byte By apoli87a at 2007-10-3 6:28:50
import java.awt.*;import java.awt.event.*; import javax.swing.*;public class SampleGui extends JApplet{JLabel lblDec, lblBin, lblOct, lblHex;JTextField txtDec, txtBin, txtOct, txtHex;JButton btnConvert, btnContinue, btnExit;Container con;JFrame f;public void init(){ int i; String ...