775 byte By
BCAa at 2007-9-28 8:43:43
hi guys........i'm working on a brute force program which as u all must be knowing uses massive recursion(without multithreading, lots of painting etc) . i thought that because of the very architechture of java, it might take longer than any native windows programming language and so also ...
776 byte By
BCAa at 2007-9-28 8:44:02
hi guys........i'm working on a brute force program which as u all must be knowing uses massive recursion(without multithreading, lots of painting etc) . i thought that because of the very architechture of java, it might take longer than any native windows programming language and so also ...
http://forum.java.sun.com/thread.jsp?forum=54&thread=349902&tstart=0&trange=15
528 byte By
msisto1a at 2007-9-28 8:48:49
Hi, I am trying to implement a variation of the K-Nearest-Neighbour algorithm using an array of values. I want to find the kth minimum values, i.e if k=4 then I want to find the four smallest values. But what I really need to store is the index that these smallest values are stored at in the ...
741 byte By
lynlvLa at 2007-9-28 8:51:48
I want to translate C to Java Code.The C code is the following:#define HmsToDeg(hh,mm,ss) ((hh + mm/60. + ss/3600.)*15.)printf("just for test: HmsToDeg(12,23,45):%f\n",HmsToDeg(12,23,45));result is: just for test: 185.937500in Java I do:double HmsToDeg(int hh, int mn,double ss) {val = ((hh + ...
Hi,Can any one help me in finding out the algo of Expression Evaluator,Changing Pre fix to Post Fix and vise versa.Tx in advance.fromgomes_deb
13936 byte By
silkma at 2007-9-28 9:14:10
Okay, I've been making a simple little encryption program and I'm currently trying to improve it.The reason i'm posting it here is that i've found a few problems with it and need some advice in how to improve it.Problems i've found are:1. The ciphertext is at least 3x larger then the ...
What is the best algorithm to score a typing test?A user types from a sample. You compare the two samples and determine how accurate the sample is. A missed word, an extra word or a misspelled word are wrong. Having more than 2 spaces between words is also incorrect. Having more than 10 words ...
11728 byte By
zooo79a at 2007-9-28 9:31:06
i have a few question. first sorry for my english.down are my declarations and definitions for a graph that can be directed and not.The definition for the edges are now that you can create only an edge that can go directly from one vertex to the other. I don't know how to change the definition ...
Hi all! i need your help for the following.I am trying to develop an application that will calculate market holidays and calendars.One of the requirements is that the calendar data should persist in a registry or a property file but not in databse.So i should have some kind of process that ...
Hello ,Do you a tool or algorithme in java which helps to check banquer's reference?Thanks.FS.
i am looking for algorithms that can answer questions such as: Xth day of a month M in year Y(third monday of january 2003 for ex).Any tips or links?Thanks.
3163 byte By
gteseia at 2007-9-28 9:53:21
With this code (it computes the number of days from the 1st of two months ago till now):*********************************************import java.util.Calendar;public class TimeUtil {protected Calendar cal;Day today, begin_day;long days;public TimeUtil() {this(-1,-1,-1);}public TimeUtil(int ...
hi there,are there any examples of layout algorithms being implemented in java?such as the one of Sugiyama (Kozo Sugiyama, 1980).Can anyone direct me to some sources please?I would be grateful to any help I can get.SincerelyKarlheinz Toni
799 byte By
j057a at 2007-9-28 10:03:12
Hi I am very new to programming with Java. I have been given a project to design a train timetable simulation where i have to try and maximise on train numbers but minimise on delays. At the moment i am looking at a fictional train line with only three stations A, B and C i know a few things ...
a man walking in the little rain,for 5 minutes,what will the weight of the rain water be on his body?-it was taken out when having interview to Microsoft.
2509 byte By
BLC29a at 2007-9-28 10:44:32
Hi, I'm currently trying to make a calculator GUI, but have run into some problems. My main problem is, I believe, coming from my operator actions. A portion of my code ("=" button and "+" button) is as follows:if (e.getSource()==buttonEqual){String s1 = resultText.getText();currentNumber = ...
Hi people,i've got this quetsion below, which i've solved, but desperately need to up the runtime speed (its way too slow!). The hint given was through the use of memoization, which i've tried to implement by putting a global array, but it still times out.I am starting to think it's a ...
1858 byte By
zzenitha at 2007-9-28 10:55:00
Hi,I am trying to implement kmeans algorithm in java for my data.I have my data stored in ms access format and my application use sql to retrieve selected. I was testing to put sample data into vector.e.g. {fund A, 0.022,0.45}, {fundB, 0.432, 0.888} etc.As I learn the theory concept of kmeans ...
394 byte By
cechyna at 2007-9-28 11:14:32
I齧 looking for an JAVA algorithm, which can compute the roots ofan polynomial given by coefficients f.e. in array:[a0 a1 a2 a3 ...]polynomial: a0 + a1*x + a2*x^2 + a3*x^3...= 0 x = ?Could anybody help me to find some web links to source codes ofadvanced mathematics functions such as finding ...
1093 byte By
tashi2a at 2007-9-28 11:23:41
I am using the following code to do a quick sort on different data sizes. When I increase the data size frm 1000 to 10000 or above I get stack over flow message at line 41.public static void quickSort(int [] array){q_sort(array, 0, array.length - 1);}public static void q_sort(int [] array, int ...
Here is a challenge that rewards the best answer with $10,000 and their code in Borland's developer magazine each year. It's not easy!Networks are complex. Transporting data from point A to point B in the shortest time and traveling the smallest distance.Here, we have two variables - Speed ...
162 byte By
rprrsna at 2007-9-28 11:41:49
Hi all,I have an algorithm to add and subtract numbers which are in a char array.This is urgent. Appreciate your help,thanks,NR
I have a pretty nasty sum that consists of n number of nestedsummations. n is a parameter. I need a nice way of coding it. I'm thinking recursion but there might be a better way. for some reason I can't find much references on this.nikita
Eight Puzzle using Depth-first Iterative Deepening SearchDoes anyone have some sample code to explain how this works.psuedo-codealgortihmsactual codeI'll take anything
Hi All,I'm doing debugging and found the following error: A simple math calculation for 400 - 381.28 - 18 - 0.72 should return 0 as a result, however in Java code:System.out.println("400 + (-381.28) + (-18.0) + (-0.72) = " + (400 + (-381.28) + (-18.0) + (-0.72)));System.out.println("400 - ...
Hi all.I have a simple problem. I written an algorythm to make a list of files and directories in a path:It has 2 classes.In NetworkList.java:package myprojects.networklist;import java.awt.*;import java.awt.event.*;import myprojects.Directory.*;import java.util.ArrayList;class NetworkList ...
I want to write a program, which given two integer inputs j and k will output the combinations of j things partitions into k groups. For instance if j=5 and k=3 the output would be (5, 0, 0)(4, 1, 1)(3, 2, 0)(3, 1, 1)(2, 2, 0)I've got no idea what to do. I think I should use nested loop or use ...
i have the following questioni need to find the distance of the polynominal in order to step thru time correctly so i am plotingexactly 1 pixel per step of time.i need to know the distance of the curve before i plot it.in the following a = time; time steps thru .0 to 1.0 on a value i specifyand ...
I am a programmer at Axa and me and my team have an interesting question for you.Where can I find the Big O for every method in the package java.lang.util. I don抰 understand why there is no javadoc tag for this crucial information. How can I be absolutely sure that methods of the ArrayList ...
Hi all expert,I am writing a method that copy a file to another location.My case need to copy many large size files at one time, i think my algorithem is quite slow.Anybody could modify my algorithem to make it as fast as possible ?My algorithem is as follow, it is simple:public void ...
I've been trying to figure out how the interpolation search algorithm works. Was wondering if anyone could direct me to a explanation or a code example. I'd be interested to see a comparisson between interpolation and binary searching.Appreciate any help.
I stumbled on a book by John Horton Conway, "Winning Ways".He had an iterative solution to the Tower of Hanoi puzzle. Could someone recommend some other interesting algorithm books?I'd prefer your comments, rather than links to search engines or book sites, thanks.
My application displays graphs from given data and I need to somehow get it to show between 8 and 12 tick marks on the x and y axis. They also have to be rational values i.e. 120.0 130.0 140.0, etc not like 120.25432 or 132.5363 or 143.94. The program can put the tick marks at regular intervals ...
158 byte By
owsa at 2007-9-28 14:01:51
Does anyone has any links to algorithms for topics such as power, load flow anaylsis?How to go about having inverse matrix in java?thxk!
(forgot to close the code tag on that last one!)Hi there,I am in desparate need of getting the object identifier given a particular line of source code. I need this for the debugger I'm writing, and since the jdb forum never gets reponses; just more unanswered questions.Right so, here's my ...
145 byte By
pythonea at 2007-9-28 14:10:00
Does anyone know of a Java package which supports integer linear programming that is either free or has a limited-time free trial version?
533 byte By
Cdomscha at 2007-9-28 14:20:13
Hi Guys.Maybe some of u know a good implementation to this algorithmic problem. The problem itself seems to sound simple. Find the longest, circle-free path in a graph. That is, taken from "Settlers of Catan", find the longest road of a player.I dont know how to solve that, and from searching ...
please could somebody help me put this code into an algorithm. plus could you tell me what 'Hashtable' does and how it work. thanks private class AplhabetShift{//define the alphabetchar[] alphabet = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H','I','J', 'K', 'L', 'M', ...
Can anyone please help me with an algorithm which takes a String and prints out all combinations of the characters in the String.Ex:I want all combinations of "abc".abcbacbcacbacabacb//David
I need someone to help me out with making ConvexHull Algorithm and coding it in java. I am using 1.3.1. So far i researched, convex hull was implemented with Triangles and Vertex, can anyone explain the use of these?Hasham
979 byte By
Seiyoa at 2007-9-28 14:42:19
Hi, I have been solving a problem to find a Eularian tour in a given graph. I have solved this by creating a method that generates circuits until there are no "unvisited edges". Each circuit is represented by an ArrayList of the Nodes' labels. All these circuits are stored in a LinkedList. For ...
3376 byte By
owsa at 2007-9-28 15:04:12
Hi i have a linear equation problem as follow:2X(b) + X(c)= 7 - eqn12X(a) + 4X(b) + 4X(c) = 22 - eqn2 3X(a) + X(b)= 5 - eqn31) use eqn1 to solve for X(a),so change order of eqn:3X(a) + X(b) = 5 - eqn12X(a) + 4X(b)+ 4X(c) = 22 - eqn2 2X(b)+ X(c) = 7 - eqn32)divide eqn1 by 3: 3X(a)/3 + X(b)/3 = ...
Hi!I have to convert data in a Vector to a new format. The Vector represents a tree structure.Format of the source vector. { id, level, caption }The id is unique.sample data:1 1 xx2 2 xx3 2 xx4 3 xx5 4 xx6 2 xx7 1 xxthe new format should be {id, id_of_mother_node, caption}sample data1 -12 1 xx3 ...
If I have a number of differents sets, how do i go about printing on the screen all the differents combinations that could be made with elements of each set.ex.set1 = {1, 2, 3}set2= {a, b}set3={x, y}all combination = {1,a, x}, {2, a, x}, {3, a, x}, {1, a, y}, ..., etc..in my case i have a ...
hi guys.,..I am finding difficulty to figure out (x1 y1) and (x2 y2) from graph to draw line Y=mX+c . i have to find out these co -ordinates , since drawline accepts co ordinates only.I have eqn like: w1x+w2y+w3.any one has idea..how to find co ordinates...Thanks in advance. ...
Hi, the quadtree data stucture seems so simple, and fits alot of problems, but coding it properly is a problem.The purpose of the tree is to find which objects are with in a visible area.So each node has dimensions x,y,width, height. And child a,b,c,d. Plus a object list.The main method to ...
Dear all,I am developing a 2D Graph generation application. I am using my own developed architecture for it.Problem is, i want to know about an effecient algo that would help me repaint the object once its properties are changed e.g: if i change the color of the curve or change the line width ...
Any body have the source code for the file encryption and decryption using Knapsak algorithm. please help me. if you have this one pls mail me at theroyalviceroy@yahoo.com thank in advance
hi ,i have a problem regarding sorting.I have 1 million records in my DB table.When i open my swing application i sort the records in table [ORDER BY col1,col3,col4] like that and want that order record ids .upto here no problem.i am getting the ids in array and in my swing application when i ...