Age calculation

222 byte By aelaraa at 2007-10-3 6:14:27
I am lookinf for an algorithm that will count the age of the students according to their date of birth. Also i want the program to extract the age of the students automatically in the next years.....thank you

Code generating unwanted '0'

800 byte By JuppieJuxa at 2007-10-3 6:15:16
I've written this piece of codefor (int i=0; i<array.length-2; i++) //assigning random numbers to the array{array[i] = ( (int)(Math.random() * lastNumber + 1)); }And I do not want it to generate the number 0 but it does. Can somebody please tell me where I went wrong? I thought even if ...

binary search tree in a file

634 byte By qwedwea at 2007-10-3 6:17:51
hello everyone,I need help in writing a binary search tree into a text file andlater, search the nodes in the file by using search function in the program. I have a binary search tree i.e.,7/\59/\/\36 810to be changed into ....file.txt=====75936810To search the node 3 in the file, I have to ...

Search algorithm PLEASE HELP !!!

367 byte By JKodera at 2007-10-3 6:18:38
HelloI need an algorithm for comparing 2 strings. IT must function like "LIKE" method in SQL.Can anyone help me on this ?I think it must be done with regular expresion, but i have no ideea how.For example:"Hello everybody in here, the java Forum" MUST mach with "everybody in here forum"Is this ...

Crc Help

972 byte By Joy-Energisera at 2007-10-3 6:19:02
Hi allIve recently been assigned the task to interface with a Quantum Dvr(digital video recorder) Kdvr1080.I can send and recieve streams on network and generally communicate with the dvr but im haviing trouble with the crc checksums.The manufacturer has taken far to long to send any help ...

Recursive algorithm

409 byte By rafael_josema at 2007-10-3 6:25:00
HI, im having problems with the following algorithm: Given n integer numbers, find combinations between them of sums and differences that totalize an objetive value Z. The program should have as input the n numbers and the objetive value Z, the output must be the combinations of numbers with ...

Recource allocation in grid computing(URGENT)!!!

422 byte By kyotia at 2007-10-3 6:25:03
Hi everybody, i want to develop a simple mechanism for resource allocation in grid computing, but the grid computing is a very big topic and I could not grab it all, I've read a lot of articles and I was confused, so please can anyone tell me resource allocation mechanisms that are easy to ...

Convertion of Decimal to Binary, Octal, and Hexadecimal in Applet

1367 byte By apoli87a at 2007-10-3 6:28:50
import java.awt.*;import java.awt.event.*; import javax.swing.*;public class SampleGui extends JApplet{JLabel lblDec, lblBin, lblOct, lblHex;JTextField txtDec, txtBin, txtOct, txtHex;JButton btnConvert, btnContinue, btnExit;Container con;JFrame f;public void init(){ int i; String ...

Spherical starfield texture generation?

810 byte By klana001a at 2007-10-3 6:32:43
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 ...

How to use Hashtable in Rules Engine. And objects within objects in rules

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 ...

List all possible combinations of coins in a dollar

349 byte By icedevil6a at 2007-10-3 6:38:25
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 ...

store a date from string

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.

Java code the list all the factors of a number

372 byte By Limeblaira at 2007-10-3 6:54:26
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 ...

inFix to postFix

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 ...

newbie, please help with statistics of eight coin toss

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 ...

Pefect Numbers ?

555 byte By Limeblaira at 2007-10-3 7:06:52
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 <= ...

HTTP / Sockets / NIO

478 byte By Tomas_Vondraa at 2007-10-3 7:13:33
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 ...

Finding median in theta(n^lg3) time

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) + ...

Additional element to existing key/value pair in hashtable

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 ...

product key generation algorithm.

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/ ...

Class matrix

343 byte By leboucana at 2007-10-3 7:49:33
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 ...

How do you conver this function?

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 = ...

fingerprint algorithm

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.

Tagging item according to keywords

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 ...

How to start on Face Detection/Recognition?

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 ...

really need help..please

531 byte By billjonesa at 2007-10-3 8:29:48
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. ...

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 ...

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.

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

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 ...

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...

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 ?

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 ...

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 ...

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

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..

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; ...

Does anyone know an algorithm to find fields of close points?

318 byte By ricard.lopeza at 2007-10-3 10:32:06
Hi everybody,I have the following problem:I have some points in a 2D space, and I need to find fields of close points in it, the maximum distance between the points is given by the user, the algorithm needs to be fast because sometimes there are a lot of points.Thank you for your help! ...

basic - predicting stock market trend

244 byte By jigza at 2007-10-3 10:34:15
Does anyone know any basic algorithm that can be used to predict a company's share? I think there must be some formula or algorithm.I know one cannot predict stock martket trend but I'm sure someone must have made some attempts.

I need help reviewing my mini-max algorithm

8368 byte By amir650a at 2007-10-3 10:50:51
Hi,I've created a game of chess bottom up - I've been working on it for about one year now. This is a for fun project that I'm working on for pleasure, not a homework assignment or some.I have reached the point where I'm interested in making a computer player who makes 'smart' decisions. ...

Regular Expression Question

619 byte By popohomaa at 2007-10-3 10:53:49
Hi all, I am suffering in java regular expression, and I hope you guys can help me out. I want to use the String api ".matches" to find out any string pattern like "xxxx.xxxx" where xxx can be only english word(both upper and lower case). Actually I will use this kind of expression to represent ...