What sorting algorithm would cause a "StackOverFlow" for a big input if sorted ascendingly and descendingly? Is it insertion sort?
239 byte By
JN_a at 2007-10-1 5:22:42
I need to calculate the area under a normal (gaussian) curve between two given limits. Is there some algorithm or freely usable library which I could use to calculate this? I've searched around but so far have come up with nothing.
309 byte By
fayea at 2007-10-1 5:31:38
can someone help me with this one? it is a building block loaded in a virtual classroom. during an online discussion the professor can load a powerpoint presentation and when he turns into the next slide, the slide being viewed by the students will also change synchronously with that of the ...
Guys I need to work out the log of a biginteger does anyone know how?I don't want to convert the biginteger into an int, long, double...etc
Hi all,I have a task I believe I will solve relatively easy if I manage to detect all cycles within a graph that I can build from the data given. I googled for a while but I couldn't find some explanation that I can use. I came upon refrerences to some publication referred as "Reingold, ...
281 byte By
hexa at 2007-10-1 5:44:12
HiI am developing an application to guide a user from one point to another. I need to work out the shortest path between these two points.Is Dijkstra's algorithm the best to use? or should I be looking for a different one? I am looking for speed.Thanks
well the whole thing is a charge of a movie.And here what i wantI want to charge the customer for each day that passes (not from the moment that borrow the movie but when the day changes,example no from 16 sunday to 16monday but from sunday to monday) well this is vary easy because all you have ...
I am trying to write a method that return the inverse (bitwise not) of the top element on a stack using IJVM. The problem I am having is IJVM only provides a handful of instruction set and none of them allow me to manipulate the bitwise not (~). The book that I am reading is really suck at ...
111 byte By
yamnea at 2007-10-1 5:56:42
Where I can find java code of some algorithm for robotics planning or vision?thanksdamiano
3695 byte By
mjm87a at 2007-10-1 5:58:07
I am writing simple maze traversal software as an independent project in a java class at my University. I'm a first year student so please go easy on me. I wrote a recursive algorithm for depth first search which works great. It solves the maze fine. Now I need to write this using an iterative ...
1229 byte By
pbillena at 2007-10-1 6:02:16
Hello all,I have a question about the terminology used in problems concerning connectivity of graphs.Connectivity in a undirected graph is very simple: an undirected graph is connected if there exists a path between every two nodes.There are two kinds of connectivity in a directed graph:- A ...
1215 byte By
Only0nea at 2007-10-1 6:03:50
hi, im currently studying algorithms and am hoping to create a very simple program that makes a random sea. i have having some trouble with it however - i know what i want to do but not sure exactly how to do it. Currently i have a grid of squares ( 8 by 8 - using an array), all classed as ...
Hi I have a binary search tree which i want to insert any kind of object in to, so i have methods:insert(Object o)remove(Object o)....but how is it possible to compare values in these methods i.e.if(node.o < o) {...}I tried to use compareTo i.e.if(node.o.compareTo(o) > 0) {...}but I think ...
60 byte By
Shurela at 2007-10-1 6:08:14
How do I program sin(5x) using the Math.class?
1173 byte By
mjm87a at 2007-10-1 6:11:58
I've posted before here about other searching algorithms and here I am again asking about A*. I'm a first year programming trying to teach this to myself so please be patient with me. I want to implement an A* search of a maze I am creating (I use DFS or Prim to create the maze). I understand ...
I'm doing an individual final year project using IBM Aglet, JRun and J2ME. The topic is "Mobile agent shopping system", better with some theories. I have no idea about what types of application should be done. Initially, I intended to build a system for the customers to search for the products ...
113 byte By
fantabka at 2007-10-1 6:24:26
Hi all,I need a code to parse a string to get all URLs in that string. Pls help me.Thank you
This merge sort test can not run as expected. Can any one check it for me? Thank youSource code attached//MergeSort.java//application to show the mergesortpublic class MergeSort{public static void main(String [] args){if(args.length == 0){System.err.println("Format: java mergeSort [number1] ...
Hello!I need an Huffman coder/decoder. Do you know a Java Package or class that can do it?Do you know other classes that can do it?Thanks!Bye!
could some one help me with the motion estimation algo...
I want to bind some Objects into an Array, using a for-loop like this:for(int i = 0; i < z; i++){Object "i" = new Object();}the --"i"-- should be the name of the object, so every Object has a unique name. That's my first problem. The second one is how to pack those new objects into an ...
I was wondering if anyone could point me in the direction of an example of the row displacment algorithm used for compressing transition tables.Would be grateful for any help. Thanks
Is anyone here familiar with the internet protocol OSPF? I am trying to make a program for this protocol and I need the use of Dijkstra's Algorithm to calculate the shortest path from one router to all routers in the network. Hope someone could help.
I was wondering if there is an easy way to take a string of numbers thats inputted like "58794" and put each number into an array such as: array[0] = 5array[1] = 8array[2] = 7 array[3] = 9array[4] = 4I know how to set the number of elements of the array using the .length() of the string, but i ...
461 byte By
leiroa at 2007-10-1 7:06:32
I am searching for a programmer in java, to create one class that does the following things:1.- Obtain a jpg image from a data base2.- Transform from rgb to hls.3.- To make a histogram of H and S (Tonality and Saturation)4.- Fom the collected data of the histograms, apply the hashing and it磗 ...
306 byte By
gemza at 2007-10-1 7:11:19
hello friends....im really need a java program that can add and binary numbers and the output is in two's complement, as well as addition of hexadeciamal numbers output in two's complement.this is a two's converter java program. please help me guys, i really need this as soon as possible. ...
333 byte By
gemza at 2007-10-1 7:11:59
hello friends....i really need a java program that can add binary numbers and the output is in two's complement, as well as addition of hexadeciamal numbers output in two's complement.This is a two's converter java program. please help me guys, i really need this as soon as possible. thanksi ...
can anyone reccommend a way of inserting an object into the correct place in an ordered array using the Comparable classes' compareTo() method?thanks
Hey everyone. I was just wondering if anyone could point me in the right direction. One of my class assignments atm (yeah, I know, don't flame, read on.) is parsing an infix expression (3 + 5 * 4) and turning it into postfix and prefix. Every one has their own way of doing this but I figured I ...
I'm doing a project at the moment where i have to encrypt a piece using a very simple encryption method but i'm finding the method from the Encryptor Class is running very slow. Can anybody help.Here's the code//Instance Variablesprivate String file;private String ...
414 byte By
0zero7a at 2007-10-1 7:17:05
Hi all,I would like to create a software that finds repetitions in a text. For example:"Hey man, hey man, can you...".My software should said me that "hay man" has been repeated. Can anybody give me any advice to develop this software? I don't know if it will easier to store the sentence in a ...
1468 byte By
scifoa at 2007-10-1 7:19:32
Hi, Variant v2 has following elements in ArrayList variants = [a,b,c]Variant res1 has elements =[a,b]variant res2 has elements = [a,c,b]variant res3 has elements = [a,c,b,d]variant res4 has elements = [a,d]all the resxx variants are in ArrayList restrictions how can i easily check the araylist ...
1247 byte By
Luc4a at 2007-10-1 7:19:39
Hi all. I'm implementing an ordered dictionary for a course of algorithms and data structures at the university and I'm having some doubts. I've realised the dictionary through a skip list and everything seems to work fine. Now, I was trying to implement some methods which needs iterators on ...
Could anyone show me a grammar for boolean equation with 3 variables x,y.zthat i could use to help build a parser. thankspodger
Hey i was wondering do any of ye have a grammar for simple equations of the type2x-3y+7zi have to build a parser that accepts these values for any value of x,y or z and an acceptable grammar would helpthankspodger
467 byte By
kjoetiea at 2007-10-1 7:35:04
Hey,I made a distance matrix of 16x16 by using an 2-dimensional array. For example:matrix[1][2] = 6 means that the distance between node 1 and node 2 is 6. I want to use this to make a Minimum Spanning Tree using Dijkstra's algorithm, only i have no idea how to make such a thing. I would also ...
1834 byte By
7ussaina at 2007-10-1 7:54:26
hi I have developed a Web app which deploys simple use of jess statements, i have stored the jess statements in a clp file which is called by my servlet as follows******BufferedReader br = new BufferedReader(new FileReader("points.clp"));Jesp j = new Jesp(br, rete);****** however when i come to ...
335 byte By
valjoka at 2007-10-1 7:56:09
The problem: You have a number of sets. Equal elements present in multiple sets. The task is to eliminate the sets all elements of which are covered by other sets in order to get a miniaml number of sets. For ex, {1,5} {5,6} {6,7} can be reduced to {1,5} {6,7} as elements (5,6) present in the ...
Hey, whats the best way to represent a minus and divide in in java for a boolean equation? Say i have x-y, i sub a matrix of values in {(0,0),(1,0),(0,1),(1,1)} and i want o return their logical boolean result. So if i do it for plus i use the OR gate, and multiplication uses the AND gate.Do i ...
214 byte By
binb9a at 2007-10-1 7:58:07
HI,I have deployed an war file which have an directory named Images. I want after I upload any image the war file should be automatically uploaded, but should not be redeployed. Is it possible?
835 byte By
LIranya at 2007-10-1 8:01:55
Hello,I am trying to use JgraphT. it sure simplifies things BUT, I think there might be a problem in setting weight on an edge of undirected graph.here are few code lines that stuck:ListenableUndirectedGraph g = new ListenableUndirectedGraph ( );g.addVertex( "v1" );g.addVertex( "v2" ...
209 byte By
LIranya at 2007-10-1 8:02:02
I'm sorry. that was stupid. if any of you use it you probably know I should use this definition:ListenableUndirectedWeightedGraph g = new ListenableUndirectedWeightedGraph ( );bye.
Hey everyone, Heres my problem (sorry if its a bit long winded :)In a database I have a list of states and all these states have successors and predecessors (which are themselves states)This is an envisionment created by a Model Based Reasoning Engine.Now what I am doing is trying to determine ...
I'm trying to create java code that displays the square root of a number that the user enters, as I am not a great mathematician i cannot work out the logic for this. Any help would be great.This is the part of my code that I need assistance with: n1 is the number that the user enters and n2 ...
Hi-yaI want to use recursion with the dmoz data.The dmoz directory has about 600,000 endnodes with a typical depth of about 10.I ran a quick test on windows and I got a stack overflow at 16,683 recursions.So unless I am incorrect then I should be ok no? as long as I do not recurse down to a ...
405 byte By
Seruma at 2007-10-1 8:18:56
Hi,I have a text with 500,000 words and I need to find a word ex.: "Java". But problem is that word "java" in my text is "j_a_v_a" and all other words in the text are like this one.How can I compare "java" with "j_a_v_a" and recived message True not False.But remember I have a 500,000 words and ...
I was wondering if there is a better approach to making AI for a board game that isn't too complicated than the minimax approach. I know minimax largely depends on the eval function that you make, but it seems that there might be a whole different and better approach that i'm completely ...
Guys i need a way of working out how many integers there are after a decimal point.I can't do this with a simple algorithmiewhile(d-(int)d!=0){d*=10;count++;}I get infinity for some reason for an input value of something ...
814 byte By
parker1a at 2007-10-1 8:34:22
ok, i have this problem, i have to switch a string using recursion. i have most of it done, but i cant finish it. If someone could just hint me in some direction of what i am to do, i would be very greatfulpublic String reverse(String thing) { ?燬tring temp = null; ?爄f (thing.length() == 1) ?爗 ...
Hello, I am new to Java forums. I am a graduate student from Carnegie Mellon University. I am right now working on a project to find out the shortest path between the sensors and the sink. This network will always be symmetrical like 10 * 10 or n* n. There will be a sink in the center of all ...