java help

165 byte By IneedHelpPleasea at 2007-9-29 15:34:00
How do u get a decimal to work on java..like for a calculator? I have no idea how to do it because there's no way to do exponents in Java, apparently.

HashCode

299 byte By muthukumaran_ma at 2007-9-29 15:36:03
I just have a long string and i want to make a integer of fixed length from that string, i thought of using hashcode() method to get the integer, but the hashcode will not be unique, can one tell me how can i convert the string to UNIQUE FIXED LENGTH INTEGER.Thaning youM.

Need a Sine Wave generator

161 byte By Yokenthwatea at 2007-9-29 15:36:36
For an audio application. as simple and basic as possible.any good sites on this. Or do u have a good example I could look at.cheersJ

java help

4260 byte By IneedHelpPleasea at 2007-9-29 15:37:54
Please help me...i cant seem to get the decimal function to work on my calculator..that is all i need tpo make my calculator work : package calculators;/*** A simple Calculator*/public class SimpleCalculator {static final String OPERATORS = "+-*/=";public final static double ONE=1.0;public ...

better algorithm?

3049 byte By tnguyen1973a at 2007-9-29 15:38:56
I have to update a database table every Tues-Sat from 4AM-6AM.so i written a code for a threadthis is the body of the run() method of a worker class that extends the Thread class.Calendar calendar = Calendar.getInstance();int currentHour = calender.get(calendar.HOUR_OF_DAY);int day = ...

B-Spline Extension

554 byte By oracle3001a at 2007-9-29 15:44:39
Hi All,I am trying to fit a b-spline to a set of 3d points. I have a couple ofquestions that I can't see the answer to at the moment.1. How, if at all, can I extend the curve beyond the range of the points I have. I want to fit a curve to my data points, then extrapolate to see where the curve ...

JGraph layout algorithm

256 byte By spidey_a at 2007-9-29 16:32:16
hi,i developed a program which represents a struts-tree with a hard-coded root elementanyway, are there any pre-defined algorithm for representing a-bit-more-complex-than-trees graphs using with jgraph?thxbye--spid

Recursive method, help :)

1009 byte By pepetronsa at 2007-9-29 16:34:35
hi everybody ... this is my methodpublic Data matchByInd1(Data data, Vector vector, int i) {Data _data; Data notFound = new Data("notFound"); if (i < vector.size()) {_data = (Data) vector.elementAt(i);if (!_data.isVisited() && matchInd1(data, _data)) {_data.setVisited();return ...

Help on recursive methods, (corrections made)

1475 byte By pepetronsa at 2007-9-29 16:35:18
hi everybody ... this is my methodpublic Data matchByInd1(Data data, Vector vector, int i) { Data _data; Data notFound = new Data("notFound"); if (i < vector.size()) {_data = (Data) vector.elementAt(i);if (!_data.isVisited() && matchInd1(data, _data)) {_data.setVisited();return ...

Kalman Filter Implementation

573 byte By oracle3001a at 2007-9-29 16:41:41
Hi All,I am looking to use a kalman filter to predict the motion of a throw ball. I was wondering if anybody knew of a java implementation of the broad outline of the equations involved in kalman filters, or any specific examples of a java app / set of classes that have a kalman filter.I am new ...

Expression parsing and execution

568 byte By chauhansandeepa at 2007-9-29 16:41:56
Hi All,I need ideas/code/suggestions from you all. I am working on a Formula Builder UI. In this a user can create their own expressions choosing some variable values also. This will contain IF, AND , OR and NOT also from expression creation. For example it may look like this IF my_variable ...

Computing efficiency, general

482 byte By Peter_the_Swedea at 2007-9-29 17:02:30
Best groupmember,I just got to an intersection within my project where I have to decide what language to use for the part of my project that handles computing.What is the efficiency difference between different language, anyone having experience!? I'm most interested in the difference between ...

image compression algorithms for video stream

942 byte By rkippena at 2007-9-29 17:02:50
This is more of an algorithm question then a JMF question (maybe).Scenario: User connects to webpage and loads applet. Applet makes a connection to a servlet. Servlet starts webcam and sends image data (in the form of bytes) from a webcam to the applet. The applet displays the image ...

Luhn check digits

1025 byte By Parmenion0a at 2007-9-29 17:04:17
Does anyone know an efficient implementation of an algorith to calculate the Luhn check digit of a number? Or know of a library that provides this?Here's a definition:Luhn Formula:1) Double the value of alternate digits beginning with the first right-hand digit (i.e. low order).2) Add the ...

Youden Graphs

298 byte By meherdadba at 2007-9-29 17:08:18
Hello ,I require to create a youden Graph class. An applet would do good also as i have to display this graph to my clients over the net .I was looking for a ready made class or a pseudo code fr the same .Can any one help me ?Thank

Bin Packing Problem

285 byte By ForteDevelopera at 2007-9-29 17:12:34
Hello all,Can you please help me out a little bit on bin packing problem?I have a jpanel and i want to divide its space in order to put rectangles but having in mind that i have to take advantage of all the empty space provided by the jpanelthnx,John

alive object

404 byte By sahnianuja at 2007-9-29 17:13:05
I need to access the content of a Vector object, defined in a class (which keeps the references of database connection) from different classes.I don't know how can I share the reference of Vector object defined in one class, into other classes.You can consider that I want to design a middle ...

Create Sequential File extension method needed

450 byte By davidakoontza at 2007-9-29 17:13:24
I've got a requirement to generate filenames based on a general pattern that looks like: "something.nnn" where "nnn" is some number represented in a zero padded fixed field - so the 6th sequential filename would be "something.006".So in a directory with files: file.001, file.002, file.005The ...

Sorting very short arrays

385 byte By siniavinea at 2007-9-29 17:23:35
One part of my program requares to sort an array of 8 objects. Unfortunatelly there is no way to know how many times the sorting will take place, it could range between 10 to 10,000,000 and more times.What would be the fastest way to perform the task?Will Arrays.sort() be faster or i should ...

Tweaking shell-sort

1886 byte By pmuurray@bigpond.coma at 2007-9-29 17:24:22
Speaking of sorting ...You know the shell-sort algorithim for n objects for(shell_size = n/2; shell_size > 0; shell_size /= 2) {for(the_shell = 0; the_shell < shell_size; the_shell++) {// sort items[the_shell + shell_size * x] where //x = 0 to n/shell_size }}generally speaking, shell sort ...

Problems with a recursive stack

978 byte By GiertzschMarca at 2007-9-29 17:25:04
Hello!I?ve got problems with a recursive stack.I?ve got a stack overflow error. Hereis my push method.public void push(Object o) {StackRekursiv stack = new StackRekursiv();stack.top = top;stack.rest = rest;if(top==null && rest==null){rest = stack.rest = new StackRekursiv();top = ...

Directed Graph

540 byte By marky5uka at 2007-9-29 17:25:56
Hi,I'm trying to write a directed graph class.My graph is stored in a hash map, with key being an Object that describes the node (eg A) and the value being a list of Ojects (linked list) describing its neighbours (eg if A->B and A->C, value would contain B and C)I need a method which ...

Reversable simple number encoding

729 byte By gilroittoa at 2007-9-29 17:30:06
It is simple to uniquely encode a number to another number within a certain "MAX", eg 2^31. Given to primes MULT and PLUS we can do it like this:int encoded=(number*MULT+PLUS)%MAX;eg for MAX=8, MULT=253, PLUS=13:numberencoded0512273441566370All encoded numbers are unique.My question is: How do ...

Google method or algorithm

159 byte By a_antonioa at 2007-9-29 17:36:42
Hi guys,i would like to know which method or algorithm does Google use to recognise the user input and then match it accordingly.Thank you

Comparable intervals?

2018 byte By jsalonena at 2007-9-29 17:44:09
Is there a way to implement the Comparable interface for sorting intervals of numbers so that two intervals are considered equal if they overlap?Or, alternatively, is the last axiom for the compareTo method of the Comparable interface used/needed by the TreeMap/Set classes?Background: I have a ...

finding the best route between two stations in the subway (underground)

663 byte By HeshamGGa at 2007-9-29 17:58:56
Hello,I am trying to find a good algorithm for finding the best route between two stations on a subway transport system such as the London Underground. I have managed to read up on an algorithm called the breadth first search which is adapted to do this taks by using extra parameters such as ...

minimum cover 2D grid

391 byte By rkippena at 2007-9-29 18:04:17
0010010111001001111110110111001111001101Suppose given the above, what is the correct search term to describe putting rectangular boxes around groups of 1's until all one's are boxed (such that no boxes overlap) using the minimum # of boxes possible.I tried searching for "minimum rectangle ...

help with math library?

260 byte By aconstante_00a at 2007-9-29 18:07:50
Hello:I searching for some advance math library that let me evaluate a function whit various variables. I looking more than one, to then compare for performance?Please I some one help to find some clue, I will grateful.Best Regards.

the most effecient algorithm (almost said fastest)

1137 byte By korbitza at 2007-9-29 18:13:15
i wonder if anyone can help me out here, i have to design a piece of software, i have already written the software in C and i need a Java equivalent to compare the efficiency of both languagesthe basic problem is this,i have to implement a 10,000 x 10,000 array/matrix that allows adding, ...

Need a 64 bit Message Digest

968 byte By phluxoahua at 2007-9-29 18:15:37
I need a 64 (or 96) bit message digest function that acts like MD5 or something similar, but instead of spitting out 128 bit digests, it puts out either 64 or 96 bit digests. The problem is thus, we are currently using a piece of a proprietary library to create our pretty-close-to-unique keys, ...

Need Help with Methods

532 byte By punky_girla at 2007-9-29 18:16:43
hy guys, i'm totally screwed up. i can't figure out how to load an array of objects from a file into a separate method? it's always saying can't recognize symbols, because i'm putting buffered writer in the method, cause otherwise i don't know where to put it in the code in order to load ...

Foolproof?

1995 byte By UlrikaJa at 2007-9-29 18:24:03
This challange has been presented as hard and so far unsolved. Prove or disprove that the while loop terminates for a given value of x, where x is initially > 1.int x = ...;while (x > 1) {if (x % 2 == 0) // x is even x = x / 2;else x = 3 * x + 1;}Do you recognize this as an unsolved ...

Font Size

131 byte By Sanjay-Aa at 2007-9-29 18:33:43
Hi I have got a typical problem of setting font size in decimals. How do I achieve this. Please provide me some help.

search algorithms for searching a body of text

383 byte By mellowmoosea at 2007-9-29 18:38:38
Im looking for an efficent search algorithm which searches a body of text (under 3,000 words) looking for keywords.What would be the best algorithm to employ.The body of text may be a XML document (in which case id like to be able to search the XML elements eg search for 'Alan Turing' in the ...

Help with arrays, static/non staic please...

987 byte By commandy3a at 2007-9-29 18:40:26
Hi everyone,I'm relatively new to java and have been having some trouble with a program I'm creating. I'm trying to read a list of words from a text file into a 2D array and then use them to form the basis of a simple translator program with a GUI. One recurring problem early on was keeping ...

Navigating through a 2D array based maze

1245 byte By thc_ibexTalismana at 2007-9-29 18:43:09
Ok guys, I know you all hate being asked for outright answers so I hope this isnt the case, but i really need help.I've been designing a maze that loads up a properties file into a 2d array called coOrdinates. These coordinates relate to a bunch of static ints (Wall, Inner, Sprite, EndPos, ...

SPIHT algorithm

259 byte By usImagea at 2007-9-29 18:47:05
Does anyone know how to implement the SPIHT (Set Partitioning in Hiearchical Trees) algorithm in Java? It's used in Wavelet Comprssion in Image Processing.I have to implement it, but haven't a clue where to start. Thank you,Pete.

Problem with Gaussian algorithm

10677 byte By legacyea at 2007-9-29 18:59:49
[red]This message was edited by legacye at 2003-12-9 20:29:17[/red][hr]Hey...im having a little problem with this program.It normally takes in two files containing linked lists of data (normal) is the normal data and (test) is data which we know has errors in it.It gets the gaussian ...

algorithm to find all Eulerian cycles in a Graph

2390 byte By Carabaina at 2007-9-29 19:00:18
Hi there,I'm having problems designing an algorithm which returns all possible Eulerian Cycles in an unweighted and undirected Graph.(An Eulerian Cycle is a path which visits each edge in the Graph once, ending at the same vertex where te cycle started)Here's the code for finding one Eulerian ...

searching database

787 byte By caesarkim1a at 2007-9-29 19:03:33
I have a table that has bug(description,subject or something). i want to search it by keyword.for example, a user enters "compatibility with Internet Explorer". i want to find "compatibility" word and "Internet Explorer" from the table. then should i make a string arraylike String[] keywords = ...

Graph Algorithms (Kruskal and Prim)

214 byte By long_pbma at 2007-9-29 19:11:19
Hello All, If an arbitrary undirected and connected graph has edges with negative value how would the Kruskal and Prim algorithms be impacted? Also how would it change the complexity order? TIA

Combinatorics Question

276 byte By MarkFairchilda at 2007-9-29 19:14:18
Suppose I have n random variables that can take values from 1 to d. The sum of the n variables is m. How many possible assignments to the variables are there? And why?This is stumping me big-time. Combinatorics is not my forte.

cube or hypercubes of data

2116 byte By gilroittoa at 2007-9-29 19:14:36
I know this is an extremely hard topic and there is many really advance solutions to it, but I just don't seem to find what I'm looking for, so perhaps someone who like this kind of things can give me any suggestions.I want a structure for a cube or hypercube of data that has following ...

Dijkstra's Algorithm

268 byte By long_pbma at 2007-9-29 19:21:31
Hello All,In Disjktra's Algorithm when computing the shortest path from one vertex to other vertices if some edge (x,y) with weight k is deleted how would the shortest path from v be updated without running the algorithm again in its entirety?TIA

Dijkstra's Algorithm Edge Deleted

189 byte By long_pbma at 2007-9-29 19:25:20
Hello All,If one of the edges with a weight is deleted then how is it possible to update Dijkstra's algorithm with the shortest path without running it in entirety?TIA

random non-repeating number sequence generator

460 byte By klana001a at 2007-9-29 19:27:35
Hi,I am wondering whether it is possible generate a random sequence of non-repeating numbers without storing previously used numbers.This is because the number sequence i need is formed from all the numbers between 0 and 2^32 and storing already used numbers will lead to large memory usage.I do ...

Building a tree from database Help!

2323 byte By LiNuXaDDiKta at 2007-9-29 19:40:34
Hi all,What I want to do is to rebuild a tree from data stored in a database. I need help to build the algorithm since after many hours I still can't figure out how to do it. First, the data in the database is stored a certain way witch I think in english would translate "with intervals". I am ...

V. quick image processing question

701 byte By bamkin-ov-lestaa at 2007-9-29 19:53:58
Could anybody give me a method to calculate a gausian matrix / kernal of unknown width, height and standard deviation Please.public double[][] gauss(int w, int h, int sd)Could anybody give me a method to calculate a lapacian matrix / kernal of unknown width, height and standard deviation ...

reverse merge sort

3066 byte By klana001a at 2007-9-29 19:55:09
I have found and modified some existing merge sort code found using google. My modification is that i have added a boolean array which indicates when merging which half the element was chosen from. I hope to reconstruct the original unsorted array using a given boolean array.originally i ...

3D Graph Layout Algorithms?

1733 byte By AvengerDra at 2007-9-29 20:07:32
Hello there! I'm developing a project for my first computer science thesis at the university of Bari, Italy. This project consists in a OpenGL graph visualization tool but I'm having trouble in implementing a correct layout algorithm.The problem is that I have been unable to find any ...