Graph isomorphism

867 byte By Alg_O._Rythma at 2007-10-2 18:03:53
I'm looking for an algorithm to determine if two graphs are isomorphic or not. I don't need the isomorphism itself. I know that this is a hard problem, and that it might be an NP-complete problem, but right now I'm using the naive method, where I permute all the vertices in the graph - just ...

linux, framebuffer, no X, swing

3107 byte By jacqa at 2007-10-2 18:04:27
When running a Java/Swing application on Linux, using X, I'm experiencing poor performance. This is partly caused by X. I'm therefore wondering if there is a possibility to directly use the video memory.With java NIO you can map a file into a buffer and write directly to this buffer. You can ...

Multiple function signatures in .tag file

1074 byte By lucboudreaua at 2007-10-2 18:06:38
I'm writing a jsp .tag file and I've encountered the following problem. I have those two functions :private void iterateThroughChildElements(Element element){for (Iterator i = question.getElements().iterator(); i.hasNext(); )this.parseAndDisplay( (Element) i.next() );}private void ...

big-Oh help

599 byte By sdpa at 2007-10-2 18:07:00
Hi guys, I'm reading some notes about big-Oh, but some points really confused me.First, there is a theorem on the notes that says (lg( n))^x is O( n^y ), for any constans x, y in R. Can anyone please tell me why? and how should the constant y be determined? Is y the power of n in lgn on the ...

[Newbie] Which JAVA API is a good choice for creating a game board?

579 byte By beyonddca at 2007-10-2 18:09:03
I'm a newbie in JAVA game programming.I would like to create a chess game for fun. I have a fairly good idea on how I want it to be, but I'm having some difficulty on the game board.I am not sure which set of JAVA API I should be using to design my board. I guess that the board will sits in ...

A complexer example of mvc ...

723 byte By der_mattia at 2007-10-2 18:10:41
... than every book shows. I'd like to ask you, what do you think is a good oo-design, using the mvc pattern.Suppose you have a data class (e.g. TelephoneBook) and you want to show its data in JTable and in a JList.TelephoneBook could look like this:class TelephoneBook { private List ...

Generics and Method overloading

1141 byte By ccapitoa at 2007-10-2 18:10:58
Hi there!I'm testing the Generic water, as it were, and have prompty stubbed a toe.I've got a class called Table with a method getColumns() that returns a list of Columns:public class Table {... public Collection<Column> getColumns() { ... }}I want to subclass Table and let this ...

Mathematical numbers in java

9894 byte By raindropa at 2007-10-2 18:11:14
The task is taken from post: http://forum.java.sun.com/thread.jspa?threadID=729292But it is very interesting problem. So I would prefer to discuss it in this forum.Define an Arith interface giving the add, sub, mul, div, abs methods to be supported for any number type.Define an Int class that ...

pseudocode help

286 byte By jksullivana at 2007-10-2 18:12:52
can someone provide me with assistant in writing pseudocode - some online links perhaps.I need to write a vending machine pseudocode.the vending machine is very simple, no currency conversion involved, only one drink in the machine.can someone please. thanks

button color

6607 byte By nicegyala at 2007-10-2 18:16:54
I consider myself a beginner in programming so I need a little help if that is possible卋elow is the code of my program ?i have designed 100 buttons by using 2D array method?But the problem that I抦 having is I can抰 figure out how to change the colour of any of the buttons when I click it import ...

How to find longest string?

59 byte By bonoza at 2007-10-2 18:17:00
How can I find the longest string in a string array?

OO design is provoking

3849 byte By alta at 2007-10-2 18:17:08
Hello,I want to build a good website rapidly that is easy to add new features. I want to program my site in a platform-independant programming language so it can be ported to different platforms easily.One suggestion is to program the interface using XSLT. There are XSLT compilers that ...

Fourier Analysis in Java?

545 byte By compadrea at 2007-10-2 18:17:19
I am a physicist working on Fourier series and transforms, and I am too lazy to do it by hand. So I decided that I would program a "Fourier" class to transform a function.The problem is that it is very difficult to do with object oriented programming (though I suppose one could make a function ...

about the code structure

1114 byte By cjrena at 2007-10-2 18:18:44
First, I must say that i'm newbie in java game. and i have a puzzle , i want to hear your opinions.(1)The way I saw in java2d examples when draw shapes is always:class MyClass extends JPanel { // as a canvas...public void paintComponent(Graphics g) { // draw the shapes}}(2)When it comes to ...

Bounding Box Rotation Using AffineTransform

1249 byte By hasman001a at 2007-10-2 18:19:05
Hi everyone,I'm making a 2D overhead view tank game (lots of those around, hey?). The problem I have is with collision detection using bounding boxes. I use the AffineTransform that I rotate the sprite image with to rotate that sprite's bounding box. The problem is that the bounding box ...

Building a Tree from array elements

538 byte By qwedwea at 2007-10-2 18:20:07
Hello everyone,I would like to build a tree structure from the elements of a sorted array. If the array is full, then it should split. A parent node is created and the elements of the array are placed in both left and right nodes of the parent.The middle element of the array becomes the parent ...

Thread

125 byte By knyaza at 2007-10-2 18:21:06
Please,if somebody have Thread Example please send it for this e-mail :reke.essential@gmail.com!!!!!!!!!!!!!!!!

where do i start

202 byte By saras_mcloeda at 2007-10-2 18:21:22
New online game rpg.The plan is to use a web startable 3d java front end connected to a sql back end (oracle 10g). Need 3d design tools. Also need to know what API's to use in the middle.

System.nanoTime() inaccurate?

902 byte By chris0a at 2007-10-2 18:22:18
Hi,I'm trying to do some accurate timing over long periods. I require at least sub 5ms accuracy over a number of years. Because System.currentTimeMillis() is only accurate to the system accuracy (which on Windows could be around 55ms) I am using the nanosecond timer as an offset from a base ...

Trouble Displaying Buttons in aGUI

5930 byte By some1stolemyusernamea at 2007-10-2 18:23:38
Hello there,can anyone take a look at this very short piece of code and tell me why my JButtons are refusing to show up!/** * Validate.java * * * Created: Mon Apr 24 13:02:50 2006 * * @author <a href="mailto:Samuel@EL-DIABLO"></a> * @version */import java.text.*;import ...

good books for oo principles

107 byte By ninjaprogrammera at 2007-10-2 18:24:51
Does anyone know any good books that explains oo principles and have examples in java for beginners?

when to go for Breadth first search over depth first search

217 byte By ajay_it01@yahoo.coma at 2007-10-2 18:25:54
hi,under which scenarios breadth first search could be used and under which scenarios depth first search could be used?what is the difference between these two searches?Regards,Ajay.

Please advise me about calculating length

376 byte By Bat_a at 2007-10-2 18:26:24
Dear all,I am converting a file which is encoded as ASN.1/BER. While I converting that file almost of it goes fine. But some record length is more than 256 is confusing problem. Java byte is not unsigned, so its values are -127...0 ... 127. I can calculate length that is lower than 256. How can ...

"Enclosure" sub-element

251 byte By Printisora at 2007-10-2 18:27:24
HiCan there be more then one enclosure sub-element for an item element? I am interested if an item can have more then one media object in both cases (RSS and ATOM based documents).Thank you for any info on this matter.Mihai

1D FFT. Where to cut?

343 byte By Ssjina at 2007-10-2 18:28:17
Hi,I'm using FFT algorithm on a vector data of 4096 elements, so i get a vector of 2048. I need to cut high frequencies, but i cannot understand where i should cut the vector. Time step of original data is 0.004 secs (Camp Freq=250Hz).Can someone explain to me how can i do the cut? (i.e. at ...

Controlling a thread's processing time

1983 byte By SebasGRa at 2007-10-2 18:30:35
Hey there. I know this subject is found everywhere, but I really couldn't find an answer to my problem... yet :)I have to support Runnable object not written by me, so I don't have access to their source code (decompiling them is not an option). So, I can't rewrite the run() method. ...

Load Maps f

362 byte By PhoenixRea at 2007-10-2 18:32:19
I have this project to make a pacman game and they want us to load a map from a txt file. The question is how do i do that on a frame.Furthermore , I was thinking instead of going that way to create a single map (coloured and graphic) but I am having problems. Can anyone post a link to ...

combining .java files

269 byte By justaregulara at 2007-10-2 18:32:25
i have 3 .java files that make up an application. DrawJPanel.java Elevator.java and MyRectangle.java.............i would like to put DrawJPanel.java and MyRectangle.java into Elevator.java.....and i'm not quite sure how that works......help would be appreciated

EJB3's impact on design patterns

1778 byte By gregrwadea at 2007-10-2 18:32:46
Well, I'm just starting to get into EJB3, and enjoying what I work with so far. I'm curious how EJB3 may impact my own use of certain design patterns, and I'm looking for input. It's a trade off between faster development, and "better design". I work on a moderately sized J2EE application, ...

Help needed with ActionListener

2977 byte By dannysmith83a at 2007-10-2 18:36:05
Im trying to add actionlisteners to my gui but i keep coming up with an error message, im new to java and this is driving me nuts at the min!Any help please?Sudoku.java:7: Sudoku is not abstract and does not override abstract method actionPerformeda.awt.event.ActionEvent) in ...

Competing consumer pattern example.

228 byte By Sailua at 2007-10-2 18:37:24
HiI am looking for an example of competing consumer pattern.If there are any articles or web site references that you are aware of please let me know. It will be really appreciated.Thanks,Sailu

How multiplayer games work ?

144 byte By Auxisa at 2007-10-2 18:39:35
Can anyone explain how java online multiplayer games like Yahoo chess work ? I wonder if they use sockets to communicate or someting else

Multiplayer pong

534 byte By ferkaa at 2007-10-2 18:40:13
Hey everybody, I'm writing a game for a final project and it is supposed to be a four player "Pong" I have my keyboard listener working just fine, the problem is that it just accept the input from one key, as soon as another key is pressed the first key stop working I know everybody says this, ...

Calculating Fan in / Fan out of a metrics project

946 byte By mchiciaka at 2007-10-2 18:45:27
Hey I am in the process of a coding a OOD metrics project. I am 90 percent done I just need a few more metric measurements to add to it, and two of the hard ones are fan in and fan out.The project consists of a GUI which allows opening of multiple files at a time, so it gets all of the java ...

Creating freqeuncy bars

872 byte By Jason_Homea at 2007-10-2 18:46:03
Hi,I'm trying to implement frequency bars (the ones that you would see in winamp or media player) where the bars change as an audio file progresses. e.g.I抦 starting with .wav files to keep things simple and so far I抳e created an application that reads a wav file and plays it and I can extract ...

Weighted Regression

7966 byte By regression_seekera at 2007-10-2 18:47:15
Hi, I have some difficulty to program the weighted regression in Java. I will be very thankful for anyone who could give some assistance on the implementation of weighted regression. Actually, I find a java code about regression (not weighted regression) from Google. But I do not know how to ...

Super() constructor must be first. Is it right?

2864 byte By valjoka at 2007-10-2 18:50:05
My previous discussion abot the this issue has been removed. I must reconstruct it to be aware of advantages, disadvantages and bypasses over the restriction.Obvously, the restriction prevents us from writing some perfectly valid code:class Unsigned7BitOscillatorInputStream extends ...

Multiple Page application

2003 byte By fryeta at 2007-10-2 18:53:02
I want to design an application that has dozens of pages. I could try and use CardLayout to accomplish this (although for the life of me I couldn't get CardLayout to work when I tried it on another application), however I would prefer not to have all of my pages in memory. Instead, I would ...

CRC32C checksum in Java

332 byte By ejnelsona at 2007-10-2 18:53:06
I'm having a hard time finding a java implementation of CRC32C checksum.There are some C versions from linux that I have found and attempted to convert to Java, but with no success yet. Anyone know of some existing code or be willing to at my code to help me figure out what I'm doing ...

robin-karp

236 byte By Dynamic_textFieldsa at 2007-10-2 18:54:12
I am doing work in pattern matching. And in that i want implementation of robin-rapk algorithm.If any body has implemented this algorithms, please give me the code. If not then any body help me implementing this algorithm.

Dynamics Matrices

1302 byte By compadrea at 2007-10-2 18:56:48
I am trying to make a class of something called tensors. What the user puts in is an integer which defines the rank of the tensor.What the rank does is it tells us how many "[]" operators there will be. So a rank 1 tensor would have private Object[] myStuff;a rank 2 tensorprivate Object[][] ...

UML

134 byte By Java12a at 2007-10-2 18:58:22
hi everyone,does anyone know how to get the sign ">" for the association, when doing the class diagrams?thanks

uml class diagrams

169 byte By Java12a at 2007-10-2 19:01:36
hi,when you do a web application you have to do a diagram for each use case, how would you apply this technique to desktop based applications?thanks

Score method in a Game

376 byte By archimidisa at 2007-10-2 19:02:33
hi..i almost finished writing my Pong game and one of the things left is the score..theoritically i know that the numbers will increase each time the ball goes off the screen (either from the left or from the right side). and i also heard that i need to use the drawString..i would appreciate it ...

How to replace if else loop for object creation

234 byte By j2eeprofessionala at 2007-10-2 19:04:25
i have to instantiate objects based on some if conditions. e.g. if this then create this object else if this then create this object etc....how should i go about dealing with this prob. I am sure there must be a smater way out.

reRoot algorithm

267 byte By scopriona at 2007-10-2 19:11:38
I`m looking the algorithm reRooting a binary tree:reArange the pointers of the roots (and leafs) and create a new Tree from a chosen root ( =one of the subTrees of the original root).(A Tnode holds data, and pointers to the left and right Tnodes.

What type of Class can I use?

474 byte By jimc08807a at 2007-10-2 19:12:23
Hi,Here is my dilemma.. I have 2 classes.. We can call them Policy and Quote. I need to have them on the session. I also have a class, BusinessModel, that will also hold onto these "same" objects. This way I can pass BusinessModel around with all the objects I require in my app..My dilemma is, ...

Problem opening HTML in MS Word

653 byte By Gudipatia at 2007-10-2 19:14:14
Hi,I have problem in opening an HTML file from MS Word.I have a HTML file and some related images(PNG files) placed on the server. From my UI, i show a link to access the file. When clicked on the link, to the end user, it opens as an attachment so that he can either open or save the document ...

Canvas - Flickering

1191 byte By emanoel_xaviera at 2007-10-2 19:15:01
Hi everyone!I'm using Canvas and i have problem with the flickering effect. I'm not sure if my problem is flickering because i'm brazilian and i don't know the exact meaning of 'flicker' but i think it's this. Well, i have read the other topics about the flickering and i think my code is ...

Indexing techniques

267 byte By krivina at 2007-10-2 19:17:11
Hello everyoneThis is my first post in this forums. I want to implement some indexing techniques. I don't know how to start indexing. Can anyone give me an idea how to start it or a sample code will be appreciated.Thanks in advance