Design to generate a Fixed-Rate flow

3685 byte By jdupreza at 2007-10-2 20:31:41
Hello,I have a Java client that has to issue requests at fixed rate to a remote server.The original programmer did it genuilely (and monothreaded):public class Client { public Client(int rate) {this.delay = ...; //conversion and rounding algorithm omitted; } public void sendRequests() {while ...

remove specific row and column from 2d array

409 byte By n_azmana at 2007-10-2 20:32:32
Hi,I would like to know how to remove the specific row and column from 2d array.for example, I have the original 4x4 array as below 2-1 -1 0 -1 20 -1 -1 -1 20-1 -1 -1 3let say that i want to remove row 2(bold) and column 2(bold), and the new 2d array should get as below2 -1 0-1 2 -1-1 -1 ...

Making aerial view snowboarding game

258 byte By vlad123a at 2007-10-2 20:32:37
I am making an aerial view snowboarding game where the snowboarder goes thru the terrain park hitting obstacles. The boarder's ability to land an obstacle is based on their speed and other factors at the time of hitting the obstacle. Can anyone help?

POJO X JAVABEANS

87 byte By maazevedoa at 2007-10-2 20:32:45
Hi there, What's the diference between POJO and JavaBeans ?Thanks

FINAL PROJECT FOR SCHOOL!!! HELP DUE NEXT WEEK T.T

235 byte By needhelpquicka at 2007-10-2 20:33:08
im making a spaceship kinda game kinda like galaga and we are having problems making the player or the enemy disappear after being hit by the bullets. We want the monster to die after 2hits and the player after 3. PLEASE HELP US

combining characters

530 byte By r5dtfvtsaba at 2007-10-2 20:34:45
I need to take an ArrayList of characters and print combinations of them. The length of the combinations should be from 1 character long to x (an input number) characters long. The characters in the ArrayList can be used more than once. What algorithm can I use?example:x = 5ArrayList contains ...

Difference between proxy pattern and session facade pattern

125 byte By anas_sauvegarde1a at 2007-10-2 20:36:08
Can some one explain me in simple terms the difference between proxy pattern and session facade pattern ?Thanks

crop image

530 byte By claudia168a at 2007-10-2 20:36:15
Hi, guys..I will make a client-server application using j2me and servlet. Servlet will send an png image as a response to j2me. The servlet's actions about the request are:1. servlet will put a small circle image in some parts of the main image, then2. servlet will crop part of the main image ...

Problem with dividing an Array

471 byte By qwedwea at 2007-10-2 20:37:03
hello everyoneI need some help to divide an array into 2 arrays with the middle element of the array as the root node. elements less than the root node should be in the left array & greater than root node should be in the right array.And after that if the left array is filled........ then ...

Advanced collision detection in breakout

914 byte By yahooa at 2007-10-2 20:37:55
Hi, I'd like to implement a feature in a breakout game. What I'm trying to achieve is to make blocks (or tiles, things that get destoyed, when hit) to be in different shape than rectangles. Also, I would like to introduce clipping to other objects as well, like balls, bonuses and such. Like ...

Timer?

567 byte By kRnpandaa at 2007-10-2 20:39:26
Hi, I'm trying to program this matchcard(memory) game for my school project. I need to know how I can set a timer for my program so that when a user clicks a card to flip over, then clicks a second card there is a delay so that both cards pictures are clearly shown, say for... 5 seconds so ...

Hydro/Thermodynamics Simulation

864 byte By PremierSullivana at 2007-10-2 20:39:52
I've created a number of simulations related to Nuclear power plants, but I've never gotten it right. Its actually quite a feat. I've used two models:1) There are a collection of vessels (reactor core, exchanger, reservoir, turbine, condenser) and pipes connecting them all. They all have a ...

Caching without Stale Objects

1086 byte By pauldeasona at 2007-10-2 20:41:43
Hi,I'm looking at caching various objects in memory but I cannot work out how it is possible to overcome the problem of child objects becoming stale in the cache:For example, say I had an Order object in cache with a reference to a Contact object. However, the Contact object is also used in ...

How to share Singleton in different JVM?

162 byte By t_rakesha at 2007-10-2 20:42:27
How to share Singleton in different JVM?Suppose we have two application installed at different server, how to share the same Singleton?Rakesh

design patterns

35 byte By roshca181a at 2007-10-2 20:42:56
What means "Design patterns"

Shall I use Value Objects?

340 byte By Kavansa at 2007-10-2 20:44:16
Hi,I am creating a web app with approx 25 web pages with not much business logic.I plan to use struts framework.What I wanted to know was, shall I use value object pattern for my web page? Is there some kind of questionaire which I can take to decide whether I should use VO or ...

BPEL Anyone?

449 byte By Saisha at 2007-10-2 20:48:09
I saw an excellent presentation on Seam, and aside from its integration with JSF and EJB 3.0, I was particularly interested in how they worked in JBoss's version of BPEL, jBPM. I'm not 100% sold on BPEL, but it definitely seems like a great way to reduce coupling and complexity in larger ...

Counting sort in java with final array how? without no duplication?

205 byte By Maan_PUCITa at 2007-10-2 20:48:50
after conrting for example the data is in the from of:1, 1, 12, 23, 15, 15, 15, 45, 45 ,13so how it arrange in final array(and # if 15 is repeate 2 time)plz can any body help me

Users/Roles design question

2062 byte By juanpetia at 2007-10-2 20:51:28
This may be quite trivial for many of you, but it's not my case...I am trying to implement roles on a user class I've created. What I thought of was creating 3 classes:- Role- Roles (a container for all the existing roles)- UserEach User should be able to contain none, one or many Role ...

question about keyboard class

255 byte By dontraiseplza at 2007-10-2 20:52:01
Im trying to make a simple text based betting game for schoolCan I enter number values into keyboard class and have it represent a betting amount? Or is keyboard only useful for "Y/N" type questions...Anyone recommend anything better?

DAO and Inheritance

154 byte By Sarah_Mahdavia at 2007-10-2 20:54:00
Hi,I have 2 objects that the first is extends the second. should i consider any thing in their DAO class or their DAO are distinct?tx

No frame refreshing when buffered window is called/created

2918 byte By backspacea at 2007-10-2 20:54:02
Hi,i'm programming a java-based game. It uses a JFrame that calls an "accelerated window" ( a buffered window with a Graphics2D Object ) to draw a basketball simulation. The problem is that when the accelerated window is running ( loop ) the refreshing and the listeners of the main window ...

DAO pattern Confuse

316 byte By musica at 2007-10-2 20:56:29
Hi all,I have 4 tables deal with 4 DAOs. But I have a funcion called search() that get infomation from 4 tables above. Will I put this function in which DAO ?.I see each DAO work only on self table. such as searchBy..., delete, update. But a query complex we will put in which DAO ...

Array in Order

1299 byte By sosleepya at 2007-10-2 20:57:21
im trying to make a method that takes in an array and makes a new array with the values from 0 to the array.length-1 so that the array it returns will corrispond with the values in the original array (if the number at the original element[ n ] is the higest number of all the array its value in ...

About RSS

188 byte By tripathy1984a at 2007-10-2 20:58:58
What is use of RSS feeds in a Website. In website when i clicked on the RSS Feed button then a XML file was opening in IE.Can u Pl clarify my doubts.Thanks in Advance.

pattern question - inheritance

1295 byte By aamya at 2007-10-2 21:01:34
Here's my pattern question:Vehicle ObjectSUV Object extends Vehicle ObjectSedan Object extends Vehicle ObjectDecisionMaker Class -- Decides what vehicle to use in the program depending on the weather e.g:public Class DecisionMaker{public Vehicle whatVehicleToUse(){if(raining) return new ...

Dot Product

390 byte By dounda at 2007-10-2 21:01:55
I am calculating the dot product the straightforward way (see below) and I don't think there is a better (i.e. more efficient) way to do it. I have to compute a very large number of these and was hoping someone might have a suggestion. Would there be a noticeable change if it was computed ...

tool development in Java

601 byte By searchandresearcha at 2007-10-2 21:03:23
I want to develop a tool in Java. It is a desktop tool with about 20 or so screens (some of which are complex using multiple controls that need to update each other on the same screen, and others are normal JTable based ones etc).I want to desing and develop the code in such a way that I write ...

Applet window not being painted

3013 byte By Futurisdom_Developera at 2007-10-2 21:07:03
public void paint(Graphics g) {map = mapb;gfx = buffer.getGraphics();for(i = 0;i < 11;i++) {for(n = 0;n < 11;n++) {switch (map[n][i]) {case 1: gfx.drawImage(grass,n*50,i*50,null);break;case 2: gfx.drawImage(water,n*50,i*50,null);break;case 3: gfx.drawImage(dirt,n*50,i*50,null);break;case ...

List of hosts on a port?

328 byte By Climaxa at 2007-10-2 21:07:26
Hi I'm writing a networkgame but would like to know how I can detect a list of available hosts on a specific port. I use sockets... I want the game to have a "Host Game" option and then a "Join Game" option which lists all available games. How can I do this. I'm new to networking with Java. ...

Comparing Two Design Ideas

2746 byte By ktm5124a at 2007-10-2 21:08:12
I am developing an online service and I need to validate users and process text messages. I have two ideas for this. Can you tell me which idea you think is better and more OO?1) Create a User object to validate the packet's sender every time I receive a packet. The User object will be ...

MVC and chess game design

483 byte By Galaxya at 2007-10-2 21:08:55
Hi,I am trying to do a chess game using mvc. The view obviously should handle all the drawing stuff and the model the logic, which means in mvc I have to have a pawn concrete class (model) and a pawnviewer class (view)?If that is the case is there a better solution than to check for the chess ...

Tree

876 byte By Sarah_Mahdavia at 2007-10-2 21:08:58
Hi,I have 4 questions.1- i want to store my objects in tree because they are hierarchical and behave like tree nodes that start with one root. but should i consider any dependency between my objects(Top object and Butt Objects) as attributs or tree solves such dependencies? if tree could ...

Help with keylistener

341 byte By theperson8a at 2007-10-2 21:11:18
For the life of me I can't understand how to implement a keylistener without using any gui elements. I am writing a text-based rpg and just need to check to see which keys are being held down at any given moment.if anyone could offer me some sample code i'd be immensely grateful. None of my ...

MVC sucks

3465 byte By ktm5124a at 2007-10-2 21:15:12
It has been my opinion for a while that MVC sucks. It seems to me that it takes away from the OOness of a program. An object should act reflexively -- a piece should move itself, a message should send itself, etc. -- and MVC puts the programmer in this limited mindset of:Controller -> Model ...

i need help with a high score list

252 byte By @@help@@a at 2007-10-2 21:15:40
I just started to modify the game Tail Gunner in my java class and one of the requirements is to add a high score list. I have the high score list working, but every time the player tries to play again, the list resets.Can anyone help me?

How to find a good AI strategy for a survival game?

2102 byte By nonamenoa at 2007-10-2 21:15:46
Hi, I'm a college student here developing a tank survival game for the finals. I have had very little experience in AI strategies, so I wonder if anyone here can give me a hint or two to start.Thanks.The game's description is below:Goal: Develop a good AI strategy for survival. ...

Rearranging a mathematical equation

323 byte By elitejyoa at 2007-10-2 21:16:24
hi,the problem is say we have an equation a=b+c+d and i have values of a,b,d. now i need to evaluate d. so the equation should be rearranged as d=a-b-c. how do we do this programatically. i mean we have athe equation stored and at runtime we need to rearrange the equation. how do we go about ...

Loading Tree

212 byte By Sarah_Mahdavia at 2007-10-2 21:18:43
Hi,I want to initial my root Node to making a Tree. my data model columns are id,parent and leaf . how should i load this tree recursively? i have implemented TreeNode interface.thanks

Simple Design question

592 byte By ssv45324a at 2007-10-2 21:19:08
The task is to generate a chart generator -I have two classes for the same -1) ChartValuesGenerator - this class generates the values which is required to plot the graphs.2) ChartGenerator- this class generates the charts which are required. To generate the chart it requires the values ...

web services client interface design

361 byte By badda1ka at 2007-10-2 21:21:19
I am looking into see how i can design a client side interface that will talk to mulitple web services. This client side interface will act as proxy and call multiple web services based on the input from web services clients. Can someone give some ideas/pattens that i could use to design this? ...

Singleton

292 byte By _AM__a at 2007-10-2 21:21:50
Hi, i have a basic question, how many instances of a singleton will be created in a multi threaded environment. 1. As every thread has it's own object... does it mean, every thread has its own instacne of singleton class? thanks in advance..thanksSJ

Quickest Maze Solve Algorithm?

763 byte By strategist333a at 2007-10-2 21:22:35
Hello all.I am a high school student and regularly go to contests that involve problems of finding the shortest path to solve a maze. The path inputs will be from file, a grphical representation of the maze, with each grid either being a wall character (say, ' * '), a path character (say, ' ...

Downloading zipped files from the site.

284 byte By NetBeansa at 2007-10-2 21:24:02
Hi Members,I want to write a program to download a zipped file from a web site.I mean my program should connet to that site and starts downloading the file.Can anybody please provide me the sufficient knowledge about this.Thanks in advance,NetBeans.

should I use a framework?

779 byte By drorasta555a at 2007-10-2 21:24:12
Hi GuysI'm making a multi player browser game. The game will have some forms to setup data into the database and the player will be able to check other players data.I will load the players data from the DB into a Bean when the application starts and then just get the other players information ...

Heritage Vs Delegating

191 byte By Euphremea at 2007-10-2 21:31:45
I'd like to have some opinions on each, what should be best used ?I'm a bit confused about wich should be used and when ... And what about Helper classes ?Thanks

graph theory

728 byte By Waldmeister_iiia at 2007-10-2 21:32:46
Hi.Does anyone of you know some nice (and possibly already implemented) algorithms for the k-shortest-path problem? In particular, I am interested in some special features: it has to work with a directed, weighted graph and should ignore loops, i.e. it should work with simple paths. And I ...

No Poison Pill?

391 byte By -@-a at 2007-10-2 21:32:48
I happened to read an article in today's San Jose Mercury describing impending layoffs at Sun. This article said that Sun had removed its "poison pill" measures that had been intended to counter any hostile take-overs. I am no expert on this subject. But I am wondering if MIcrosoft would ...

Effective Framework Design

257 byte By sreedevi2006a at 2007-10-2 21:34:32
I would like to know how a framework is built.What are the good design steps to be followed for an effective framework?Which are the design patterns to be followed?It would be helpful if anyone could enlighten me on this subject.

GUI Design

2455 byte By ktm5124a at 2007-10-2 21:40:12
I have some questions on GUI design. I'm making an Instant Messenger and, having finished the server, I am now working on the client. I've made many GUIs before -- I'm familiar with swing, awt, and swt --but I feel like my design of GUIs is bad. For this particular project I am using ...