I am going to be entering in the java 4k competition this year however I have hit a snag...For my Java 4k game entry I am in need of generating a starfield texture which which will be the texture for a sphere.Due to the restrictive space requirement I am unable to include a pre-rendered ...
849 byte By
Vivona at 2007-10-3 6:33:38
I have an object containing Hashtable. I want to take the value from the hashtable and use it for the LHS side of the rule. How do I do that? Object: Test Hashtable in Test: inputHT (the hashtable contains the key as 'age' and value as '21'. Like: inputHT.put(age, new Integer(21)) ) The ...
Hello all, I'm here because I can't seem to figure out how to create an algorithm that lists all possible quarter, dime, nickel and penny combinations in a dollar.I need to print the result to the console, and have it in the following formatq|d|n| p40003210So on and so forth.Any ideas are ...
Hi,I am doing POC for a fortune 10 client and they have some business rules before crud actions are going to take place in DB. We have very minimal tables (less than 10) and its small application but web service (btw, this has to be webservice app) consumers are around 200 per sec. The ...
1052 byte By
sri1025a at 2007-10-3 6:40:05
Hi,I have a setter method which throws an IllegalArgumentException which is of type RuntimeException... It means that I need not declare it in my method declaration, but I should explicity describe in Javadoc.Is it a good practice to declare it in throws clause just to make it more readable? or ...
Hello People:This week, The Server Side has posted mi proposal for a new EJB3 feature about implicit queries. The Servers Side's guys have suggested to me send this proposal to EJB JCP, but I don't know how to do it. Do you have any idea?Here is the discussion thread ...
Hi,Can anyone suggest me a good article on Singleton design pattern recently updated..?Thanks in advance.
Hi,I am facing an issue. Please find the following scenario.I have a login page which is under a secure host. When the login is successfull, the control will be directed to a non secure host, where I have to access a session variable which is set in the LoginPage (which is a secure host). Can I ...
153 byte By
echizena at 2007-10-3 6:45:13
i have a string which stores "26/05/06" ...how can i store it into a Date and retrieve the year to get the output "2006"thanks alot.
i have written the code for tic-tac-toe game partially.i am stuck at writing the code for "who is the winner"? and adding a button to start the new game ?please help me out to write the remaining?iam unable to attach the code now;Message was edited by: vamshijupally
I have some questions that I can never get anyone to really answer for me. 1. How do you make a game where others can play, like an mmo. Do you need a network, if so how do I do that?2. How do I make graphics in an application?3. I know basic Java but I just dont really understand how to get ...
404 byte By
SimonCa at 2007-10-3 6:49:31
Hi there. Just wondering if anyone could recommend a good book on design patterns, for someone who's relatively experienced at the nuts and bolts of programming in a few languages, but hasn't really considered design patterns before? Someone recommended Gamma et al's, 'Design patterns: ...
170 byte By
Gema at 2007-10-3 6:54:06
I am having trouble building a clock that goes from military time to regular time. It starts at 0930 and goes to 1730. It then performs a subtraction of the times.
I was wondering if anyone could help me with this problem?Two message boxes come up asking the user first to input a factor and then the next is to enter a multiple. I have to figure out if the first value is a factor of the second value. I know to use the modulus operator but I'm still ...
Hi All,Hope so every body doing well, How do we handle this Service Locator Pattern,If the EJB 2.0 contain Local interfaces or EJB 3.0?.Becuase the Handle might not there.Please help me.How do we go with this.Advance thanks any suggestion or information.Thanks- ...
486 byte By
tkssa at 2007-10-3 6:56:29
I've developed a Doubly Linked List which controls a Stack I have also designed.I am using the Stack to implement a infix to postfix conversion tool.Perhaps this should be under another forum topic, but my issue is that my DLL and Stack have been developed to accept Object, and my infix to ...
1329 byte By
bess12a at 2007-10-3 7:01:20
I need help with the statistic of eight coin toss, with the number of coins tossed with the input of 'h' and the number of coin tossed with the input of 't'.Here is what I have so far: with 2 errors, line 10 cannot find symbol, public class CoinToss {BufferedReader in;int ...
I'm having trouble with the code for my perfect numbers. It says that each number I enter is a perfect number.Can someone please look at it and see if they see anything wrong? Thanks. public static boolean isPerfect(int number) {boolean perfectInput = true;int count = 0;for(int x = 0; x <= ...
976 byte By
sri1025a at 2007-10-3 7:09:48
Hi,I have an abstract class, let's name the class Super and Super provides a lot of protected methods with default implementation for it's child classes. And Super is in package com.mycompany.superpackageNow, I have a class that extends Super and let's name it Child. Child class uses State ...
Hello,I'm writing a small web crawler - I've a prototype implementation using Threads and HttpURLConnection, but as the performance (the ability to fetch as much pages in parallel) is very important in my case, I've decided to reimplement it using NIO.But is there some 'HTTP Socket' class ...
488 byte By
sdpa at 2007-10-3 7:14:29
Dear all, I'm a bit stuck on my algorithm exercise, the problem asks us to construct an algorithm that finds the median of an array in theta(n^lg3) time. According the the Master Theoremthe recurrence relation of this algorithm should look like the following:T(n) = / theta(1)n =1 \ 3T(n/2) + ...
Any suggestion?
2446 byte By
valjoka at 2007-10-3 7:24:38
Consider a Gui, which controls some model. It may have listeners or strategies/templates observerving and reacting on the model changes. By running different programs, you invoke different strategies.The conventional way for coding two programs in java would be to instantiate a Gui and pass ...
Hi FriendsI have got one strnge Problem.I have got two Clases1>Door2>TimerOn some specified duration My door has to close suppose it is 15 sec.Also I have got two type of Doors a->Slidingb->RotatingMy Question is how to make them in class and what pattern will be more feasible to ...
Hi all,Does the following implementation represent a perfect thread safe implementation? public class Singleton {private volatile static Singleton test1;// Private constructor suppresses generation of a (public) default//constructorprivate Singleton() {}public static Singleton getInstance() ...
Greetings to all,I didn't know where I had to post that question exactly, so I've choosen to write that here. I hope I've not mistaken.So, I'm developing a plugin for a wiki clone (media wiki) and I've thougth to implement it as a web service because it can be resident on another host than ...
Hi,does anyone know where a can find sprites for the game i'm developing. For example i need a soldier that is walking, shooting. Then i need a sprite of a catapult, an archer and so on. Where can i find these? Thanks!
569 byte By
JPNa at 2007-10-3 7:42:05
I didn't see any other forums like this. My program reads in 3 CSV files as hashtables. The first table is compared to second, which is an exclusion list that causes the first to be reduced. The third table is a map that has the same keys as the first table with an extra element containing the ...
114 byte By
santanua at 2007-10-3 7:43:29
if you have the code then mail me the entire code to the following mail idsantanu.tripathy@gmail.com
114 byte By
santanua at 2007-10-3 7:43:31
if you have the code then mail me the entire code to the following mail idsantanu.tripathy@gmail.com
Hi all,I'm implementing the DAO pattern to interface my Session Beans with the DB.import java.rmi.*;import javax.ejb.*;import java.util.List;import java.util.*;public class FlightBean implements SessionBean {SessionContext sessionContext;public void ejbCreate() {}public void ejbRemove() ...
578 byte By
kyhoa at 2007-10-3 7:47:47
hi all,i guess many people instal anti virus software on their computer.we need to purchase/renew the subscription definition update every year. after paid, they will give me a product key e.g. 8CAFT7TST25ZDCKW563VSUJXXafter input the key, the software will renew the expire date.e.g. 2006 11/ ...
268 byte By
fergboba at 2007-10-3 7:47:51
public class MicroTankCanvasextends Canvasimplents Runnable {public void run( ) {while (true) {\\Update the game state. repaint ( );public void paint(Graphics g)Is this a good code to create the tank game?
hii'm new on java en all that stuffand i'm trying to write matrix class with several methodsi'm no sure but i think i'll have to start like this : public class matrix{private double t[ ][ ]=new double [ x ][ y ];public int x,y; public matrix(){but i don' know how to ...
Hey everyone.I'm a student from Europe, and I'm working on a java project with two others. We are building a java game library(obviously :)). We want to make it as modular and extensible as possible. At the moment we're just fleshing out the whole thing, and that's why I'm asking you to ...
1478 byte By
GetAwaya at 2007-10-3 7:53:12
Hi all,I am having some difficulities with converting a function into Java. It is originally written in C# .Net. Below is C# code and result.public string getMD5(string str){Encoder encoder1 = Encoding.Unicode.GetEncoder();byte[] buffer1 = new byte[str.Length * 2];char[] aa = ...
hi,i have a class DepthSearch that runs an depth search algorithm on a graph.The DepthSearch class provides the method search(Graph, node), which returns an boolean whether the node exists or not.now i can realize it in two different ways:1. make the searchMethod staticand invoke it like int ...
hi,let磗 say i have a graph with thousands of edges existing.Now i delete some of them, but i do not remember, which ones are deleted. Deleting should mean in this case i mark them as deleted, by setting a specific flag of the edge object to true.If i, lets say "push a button" then i want all ...
227 byte By
xeribea at 2007-10-3 7:57:23
Hello,Me and a friend are a university students and we got a project about fingerprint recognition.We need "fingerprint algorithm ".( tutorial / free e book)please help us.thank for your help.
1659 byte By
sri1025a at 2007-10-3 7:58:05
Hi Everyone,I am not sure whether this is the right place to post this question, definetly not a design problem but more of developer productivity and personal preference issue. Okay, let me explain my question.I am definetly not a marketing manager trying to sell monitors to computer firms. I ...
Is there any free tools that can auto generate UML diagrams? I know there are tools to generate class diagrams, but what about other diagrams? Please let me know if you have any to recommand. Thanks.
365 byte By
MithunKa at 2007-10-3 8:11:24
Hi all,I want to define a generic interface with set of operations, and the the different implementations of this interface are having different operations signiture. i.e how to define a generic interface for which each of the implementation can have operations with different signitures?Waiting ...
377 byte By
mtzo81a at 2007-10-3 8:16:56
hiis there any algorithm for tagging an item with the keywords and searching them according to these keywords.for example, in a library, a Java programming book can be tagged with the keyword "java, programming, object oriented". so, when a user search with any of these keyword, that book will ...
750 byte By
nhoryela at 2007-10-3 8:17:16
Hi! I'm a undergraduate student from the Philippines and I'm desperately asking for all of your help.I'm currently undergoing my self-study on pattern recognition specififically the face detection/recognition and to be honest I really had a hard time grasping the idea becuase of so many ...
2369 byte By
soulgoda at 2007-10-3 8:18:51
hi there, we are working on quite a big application and the implementation of the gui becomes a bit of a spaghetti and we decided to look at the patterns . Not so familiar with it and don't find anything good for design patterns in swing when using J2EE technology. So here is the situation for ...
678 byte By
SFLa at 2007-10-3 8:24:18
Hi,I have a player on a JPanel from a bird's eye view. I have to determine the angle (0 - 360) of the player's move: 0 or 360 | | | |270--Player--90 | | | |180The top of the JPanel corresponds to 0 or 360 degree, the right side to 90 degree etc.I have to determine the angle between the ...
Hi, I think there is a lot of messy code in JDK, and the most of it is done checking the null references. So I suggest use some keyword in declaration of methods. See an example:public class Foo{private final String text;private final Object obj;public Foo ( final String text, final Object obj ...
Hi Team,I have added an small artcal on "Singleton pattern" at http://javatouch.googlepages.com/singletonpatternI have used some of wisdom from contents of this forum in creating the artical. Please feel free to visit the link and do not hesitate to comment or note any thing missing or incorrect ...
well im a high school student who has a question i have a problem with this java program im trying to write a program that will print all the factors of a number that is entered in an input box. If there are no factors other than 1 and itself it will printout that the number is a prime number. ...
Is the rssutils code available? I want to make one small change and comment out the System.out.println(...) in DocumentHandler.java No need to re-invent the wheel for something so small.Chris