What is the best way to represent this kind of trees?

307 byte By Fantasio2006a at 2007-10-3 8:31:15
All is in the subject. I want to represent this kind of tree? > http://en.wikipedia.org/wiki/Image:Tree_graph.svgThey're actually forests. Is it possible with the Collection api or not ? Also, how can I design an XML file to store a forrest? Any help is ...

Probability Distribution

288 byte By scathacha at 2007-10-3 8:35:18
Hello,I would like to know how to coose elements from an array(or similar data structure) according to a probability distribution. For example a higher probability of choosing the elements nearer the start.Any tips or hints would be greatly appreciatedScathach

Need some help regarding properties.store

485 byte By Sarayu_Geethajalia at 2007-10-3 8:35:22
Hi,filename.properties===================test.url= http://google.comtest1.url= http://yahoo.comtry {properties.store(new FileOutputStream("filename.properties"), null);} catch (IOException e) {}The store method of the Properties class replaces all http:// to http\://test.url= http://google.com ...

Where does business logic go?

1524 byte By fedetxfa at 2007-10-3 8:37:59
We have a telephone ticket pricing application. We designed an object model and we have objects that have logic to decide how to price each ticket according to its characteristics and information from a database.The customer wants to remove all the logic from the application and build up the ...

Reagrding Syncronized Block

324 byte By rajpuniaa at 2007-10-3 8:39:30
Hi GurusWhat is the Benefit of Using static synchronized void amethod(){}VSsynchronized void amethod(){}Help is deeply ...

Standard deviation

72 byte By Rob111a at 2007-10-3 8:41:14
Hi How do I work out the standard deviation for an x and y array.

FreeOnlineGames

7442 byte By jingf78@126.coma at 2007-10-3 8:42:05
[img] http://bbs.366tian.net/attachments/day_051014/20043146425229120_xE3tDfHQWnhu.gif[/img] [size=3][color=red] Spooky Hoops [/color][/size]Introduction:Pick up all the pumpkins to gain some energy and then run into the basket zone to score a basket. Use ARROW KEYS to move and hit SPACEBAR ro ...

Who should be responsible for this?

2513 byte By caltuntasa at 2007-10-3 8:47:42
Hi everybody I need your help. I am working on a Vehicle tracking project using Applet and Swing. I have a form named MapClient. This form contains a MapViewer object that stores and displays Map Image. And I have a Controller class named MapClientController . This class getting requests from ...

Entity Beans Vs Hibernate

120 byte By jjjjjjjjjjjja at 2007-10-3 8:48:15
Can we use Hibernate and Entity beans together in any application?please help me.It is very urgent.

Solution/Pattern needed for complex buisiness problem

1586 byte By dawuada at 2007-10-3 8:48:28
We currently have a J2EE project built on EJB3 and were hoping to get some help on the design. A little background: Our company sells several products for various companies. Each of these companies have different business rules, etc. Initially when we built our application we were unable to ...

Some question on class method manipulating

299 byte By echizena at 2007-10-3 8:49:10
Hi i have code which looks like this class Test {...............public void display() { ......; }public void test(Object o){Test temp = (Test)o;temp.display();}}Any other method rather than doing

Simple Spring-Hibernate DAO problem.

2047 byte By max1983a at 2007-10-3 8:50:05
I have two tables in the DB, Categories and ProductsCategory one-to-many ProductsBelow is the mapping def. and a sneak view of the Product bean:<hibernate-mapping><class name="com.fivestaroffice.databeans.Category" table="categories"><id name="id" type="int" ...

Class Identification Via UseCase

238 byte By rajpuniaa at 2007-10-3 8:50:28
Hi Friends.......I know that use case is use for the purpose of requirment gatheringMy questios are1->How to Identify Classes through USE cases.2-->Is Use Case is High Level DesignThanks and Reagrd

Best string matching algorithms

425 byte By seemap123a at 2007-10-3 8:53:07
Hi,I have implemented the Levenshtien's algorithm for string matching to find the insertions, deletions and substitutions for converting one string to another. But, this works fine for small strings about 256 characters.Can anyone give me a suggestion as to which algorithm will work best for ...

2d spaceshooter help needed

688 byte By Astrofa at 2007-10-3 8:54:04
I've been trying to work on a 2d spaceshooter, but i'm having some problems. i've been wanting to make a semi-follow shot (for an enemy) so when it shoots it goes in the general direction of me. How would i go about doing this? i've found the center point of the player and the enemy, then i ...

problem connection mysql with struts

2305 byte By cedbxa at 2007-10-3 8:55:55
hi,i have a problem with my mysql database connection with struts. this is a part of my struts-config.xml: <data-sources><data-source key="domao" type="org.apache.commons.dbcp.BasicDataSource"><set-property property="driverClassName" value="com.mysql.jdbc.Driver" ...

SIP & JAVA

5578 byte By Cuea at 2007-10-3 8:57:10
Hi,I am trying to make a java chat klient using SIP, but i can't get it to work:import java.io.*;import java.util.*;import javax.microedition.io.*;import javax.microedition.midlet.*;import javax.microedition.lcdui.*;import javax.microedition.sip.*;public class sipClass implements ...

Is this an appropriate use of AbstractFactory pattern?

678 byte By cmangiaa at 2007-10-3 9:09:15
I am new to design patterns and have a question about the usage of the AbstractFactory Pattern. I want to allow the client program to specify the implementation details of my class. As an example, suppose I wanted to create a base class named Car and then allow client programs to implement ...

What string matching algorithm uses the class Matcher?

303 byte By p.h.o.e.n.i.xa at 2007-10-3 9:10:53
Hello,can anyone tell me what string matching algorithm the method .find() in the class Matcher uses?I need the answer for my diploma thesis ... because i use regular expressions for my implementation ... and want to describe how string matching works in java ...Best ...

Dijkstra's and Bellman-Ford Algorithm

361 byte By C_Zhaoa at 2007-10-3 9:11:03
I have been looking around on the Internet, but I couldn't really find a decent explanation of Dijkstra's and Bellman-Ford's Algorithm.Could someone explain how they work?Many of the explanations on the net that I've found use an optimized version of the algorithms, although I know that ...

watershed algorithm (Vincent and Soille)

102 byte By 12bProgrammera at 2007-10-3 9:11:20
can anyone post a simple watershed algorithms ?/simple code is enough...thanks...

Factory pattern problem?

552 byte By dzouzaa at 2007-10-3 9:12:18
I have an interface defined and I want few classes to implement this particular interface. All of these classes need to implement all the methods declared in the interface. The problem is few classes need same parameters and few classes need more parameters and few need less parameters. But the ...

Naive Bayes Algorithm

449 byte By Olgaa at 2007-10-3 9:19:11
Dear AllI have an implementation of Naive Bayes. The algorithm's ouput are class labels and their propabilities.I want to do the following: I want to the algorithm to sort the propabilities and then return the class label with the greater possibility.How can I do this? Array?Should I create a ...

error

190 byte By coooooooola at 2007-10-3 9:28:49
well i always get this error and i cannot fix it...in my if statements when i have the else if hting i sometimes comes up'else' without 'if' how do i fix it ?

Design a software for different clients

447 byte By chamalsla at 2007-10-3 9:31:38
Hi,What are the things that we have to consider when developing a software for different clients.For example if we have clients such as mobile phones, web and desktop.Should I make them call an ejb, web service or some other service.Can u plz guide me on the area's that I have to learn or are ...

Swing-agnostic Table&Tree models

2450 byte By jdupreza at 2007-10-3 9:31:56
Hello,several questions in one, really. They assume familiarity with Swing's Model classes, but are hopefully more general.Swing's JTable widget displays data found in an instance of a class implementing TableModel. Swing provides a default implementation (a Vector of Vector), but I find it ...

data structure similar to database table

702 byte By jakestera at 2007-10-3 9:34:19
i have the need for a data structure that will essentially be the same as a database table. this "table" can be queried against and sorted. currently, i am using an interface to abstract this "table" datastructure, and implementing the interface via jdbc calls.may someone point me in the right ...

fun question - minimizing IO

534 byte By rkippena at 2007-10-3 9:34:51
Assume you have "n" sorted files, each of size "B".Each sorted file contains the same number offixed length records. Each record has length "r".You want to merge these files into a single sortedfile. Assume you have an array of length "B" to usein memory.What is the function that describes the ...

Parsing an Algebraic Expression

327 byte By Paramesh_Andea at 2007-10-3 9:35:15
Hi ,Can any body provide me an idea to parse an algebraic expression in Java.Are there any built in classes for parsing an expression and evaluating after substituting the values for variables in the expression?If no classes are availble,plz provide me any algorithm for doing that.Thanks in ...

Java Code for PUYO_PUYO Game

174 byte By saurabh_hclinfoa at 2007-10-3 9:36:04
hi all,I am in urgent need of java code of puyo_puyo.send me at :- gsingh_icis@rediffmail.comif somebody is having.... Thanks in advance...

fun question - rephrased

877 byte By rkippena at 2007-10-3 9:38:12
Suppose you have two sorted files on disk, and youwant to merge them into a single sorted file. Thefiles are large and won't fit completely in memory.The files are equal size.Imagine you have a single array to store data.Your array will look like this:[ m |x1|x2]The x partitions are where the ...

How to design a system for a bank?

520 byte By Alex76a at 2007-10-3 9:45:01
The company I work for is about to design a system for a bank. This system will be used by office clerks to help their daily works. For example they can handle bank accounts, credit cards, credit products, loans, client data, stuffs like this. It's a kind of accountant system.As I don't want ...

Java Singleton Pattern Tutorial

13078 byte By hemanthjavaa at 2007-10-3 9:48:56
Singleton PatternThe Singleton Pattern is one of the commonly used design templates when there needs to be a control on how an object can be created. This design pattern proposes that at any time there can only be one instance of a singleton (object) created by the JVM. The Singleton class抯 ...

design pattern: facade for delete?

1069 byte By xianwinwina at 2007-10-3 9:49:42
Hi guys,I have the following info (db):department (dep_id, name, description)empl(empl_id, dep_id, name)invoice (inv_id, dep_id, description)....question is this: say I would like to delete the department (which include the empl as well). What is the best way to do that?obviously, I can do ...

file upload http or ftp

1075 byte By Shilpa_Koula at 2007-10-3 9:50:42
Hi,We have a requirement and i am working towards a good implementation design. I appreciate your inputs.We are J2EE web application serving on https. We have a requirement to accept documents from our clients (file uploads). We expect some of our clients to have a low bandwidth connections but ...

How to implement Data Structure with custom methods

2810 byte By Meirya at 2007-10-3 9:51:05
Hello allim not sure if the topic is right but what im trying to do is goes like this :i have Custom Data Structure this custom data structure have basic methods and have no logic some thing like this : public class MyStruct {protected int i ;protected String j ; public MyStruct(){this.i = ...

OO Batch Model and optimised Java for batch?

2536 byte By klanky68a at 2007-10-3 9:53:45
Hi All,I'm looking to see if there is any literature of OO models for batch processing and optimising of batch java.Thoughts & comments welcome.........I have an existing batch process running on a mainframe which is very successful. We would like to leverage this by building a similar ...

Search for string within files

709 byte By rak78a at 2007-10-3 9:54:56
I have thousands of xml files stored at some location of unix machine. I need to extract only those xml files which have some particular pattern of numbers stored. Right now, i have 300 such distinct patterns to be searched among those xml files.I am in search of some efficient way so that my ...

Who can give me a complete project about least square

96 byte By Kelvin_QUa at 2007-10-3 9:59:45
the project should input five or more parametrs and then get an equation ,thanks everyone

transparent png and Graphics.drawImage method

1149 byte By luisofta at 2007-10-3 10:00:40
Hi,I have a transparent PNG (640x320) file holding all tiles used in my game (each tile is 32x32 and has an id based on the position in the big PNG file.I load this image into a Image object and then use the following method to draw individual tiles:public abstract boolean drawImage(Image img, ...

bittorent approach

472 byte By sebvena at 2007-10-3 10:05:50
Hello,i would like to implement somekind of parallell download with java.I am thinking about algorithms about how to split any media files in pieces(maybe of fixed length) and uniquely identify each piece. Then a way for a computer to retrieve each piece.( i am dealing in Peer To Peer).i would ...

region growing and region merging algorithm

144 byte By 12bProgrammera at 2007-10-3 10:08:11
anyone know region growing, region merging and watershed algorithm?Pls post it here, thanks in advance .. a simple code also can..

Abstract class / interface question

886 byte By corrosivea at 2007-10-3 10:08:27
I need to manipulate references to two subclasses (let's call them Guitar and Bass, derived from Instrument). I thought about coding Instrument as an interface, but I have a problem.I have fields in Guitar and Bass (lets call them brand and price) that I would like to access without having to ...

Is page scraping a good practice?

267 byte By jigza at 2007-10-3 10:14:06
I need live/delayed stock market prices for my project.Some people suggested scrapping pages from yahoo finance etc butIs it a good practice? or is there an alternative to it aprat from paid subcription?thanks fo rur help in advace!

Java Search pattern from DB2

288 byte By crusedera at 2007-10-3 10:17:43
Dear all,Im not sure that I post this question in the right section.I would like to develope my own application to search pattern from DB2.Almost of this task is Thread Problem.I would like you comment on how can make search engine usefulladv thx

Preloading Data for Applet Game

820 byte By wspnuta at 2007-10-3 10:20:27
Hey all!I was wondering how I could go about preloading all of the images and sounds I use in my game (applet-form) before the user starts playing. It would be especially helpful to have a bar going across that would show the user their status.It would be even greater to allow the JAR files (I ...

pbit sorting algorithm

1500 byte By 4888188823276305609a at 2007-10-3 10:22:15
Hello everyone,i'm university student and i need to implement PBIT sorting algorithm in Java. PBIT is 'profit before interest and taxe'. Pesudocode for this algorithm in C++:Node *Pbit(Node *L, unsigned M, Node *P=NULL){ if(L) { M=M-K;Node *tab[]={NULL};for(Node *i,**in; i=L; ...

How can i prevent a user from logon on two mechines at the same time?

264 byte By mallik345a at 2007-10-3 10:23:45
Hi friends i want to prevent a user from logging on another machine if still his session is valid . and i want to display some message like you are already logon on another mechine, you cann't logon.How can i do this?ur'sMallik

what design pattern to use in this simple problem?

861 byte By xianwinwina at 2007-10-3 10:28:47
Hi there,help is very needed here as I don't know what pattern to use? (newbie)here's the deal: I have an empl that have the following information:1. account (id, first, name,...)2. projects (id, name of project, duration...)3. account_info (login_name, lastloged...)etcwhen the empl logs in, ...

Why are the most popular online games still written in Flash?

412 byte By jspiroa at 2007-10-3 10:31:04
Hi all,I am not a Java expert, but I notice that at http://www.miniclip.com and similar sites, most of the popular games are written in Flash. Why is this? Is it because of Flash's IDE? Or is there some other reason?If it is an IDE issue: Is there any Java IDE that makes basic Java game ...