3732 byte By
kill1234 at 2007-9-30 13:53:08
Hi;I try to find the run time for Fibonnaci on number 50, but the result cause me confuse, because the 5 times results are very differnt, could anyone tell me why?ThanksThe following is the report of the 5 times of the run times on the 50 - Execute recursiveBigFib: 12586269025 In the (1) time, ...
Hi there I am new to the idea of recursive methods but think I will need to implement on for my following problem: I have to write a method to return all possible draughts captures and if multiple captures are available, return the multiple captures: here is my attempt so far:private ...
273 byte By
OneZero5 at 2007-9-30 14:03:19
hi .. i need some help in pixels counting give a pic size by 120 x 80 .. i need to get the first pixels n retrive the color code till the last pixels of the pic any recommandation on what method i can use or any helpful webby ?-thanx- =)
I am trying to write a program in Java. Suppose i have an array of character of 26 letters like this.. char ch[]={'a','b','c',.............'z'}; I have to write a program and output will be like ...
239 byte By
Generics at 2007-9-30 14:04:00
hiWhen I overload method equals()first i run this program throws "NoSuchMethodException",however I add a expression "System.out,println();",compile it ,and run OK!?who can tell me why?thanks
1697 byte By
Generics at 2007-9-30 14:04:01
hiWhen I overload method equals()first i run this program throws "NoSuchMethodException",however I add a expression "System.out,println();",compile it ,and run OK!?who can tell me why? resource:import java.io.*;import java.awt.*;import java.math.*;class Points{private final int x;private final ...
99 byte By
nikipate at 2007-9-30 14:04:21
Hello!Can anyone help me. How can I API in Java Technology for files to find ?
Hi guys, I am trying to use vectors because I need a variable lenght and store 2D arrays in one coordenate of a vector. That is why I am using vector instead arrays. I can turn the type of variable using "Integer" (instead of "int" as arrays), "Double" (instead of "double") and so on. The ...
Hi thereI have constructed my own tree object made out of treeNodes.How could I return a Vector of all possible paths from the root node to each leaf node?
Hi, I have a page that displays a table with strings coming from collections in multiple columns. When i click on the header, i want the table to be sorted by that column. Can anyone please give me a sample code for the same. This is urgent. The data is like:Company NameName Email Id ...
Hi,Is there a thumb rule to select the initial population size in a GA. If I need to select 50 steps out of 500 available steps then do I need an initial population size of(500 !) / (450 ! * 50 !).How do we normally select the initial population. Any help is appreciated.. ...
Hi!I would like to write a server-side program which generates guaranteed ordered numbers (incremental, no hole and duplication) in a networking environment with clustered servers (Used by many clients and Lotus Notes). How should I start doing this? Where can I found great documentation for ...
388 byte By
chungkp at 2007-9-30 14:16:02
Hi allI have two one dimension arrays with the same length. I like to do the following operation:array1 = max( array2, array3 );The aim is to compare the elements in the arrays one by one, and assign the bigger value to the new array. The java Array class doesn't seem to support this feature, ...
152 byte By
kill1234 at 2007-9-30 14:23:06
Hi could anyone express to me why say the run time of insertion sort is O(n*n), and how I can get the operation is 1+2+...n Thanks
Suppose there is an array of random numbers that are unsorted, I wish to find out the median of them in O(n) time, what should I do? Can anyone give me an algorithm on this?ThanksJim
269 byte By
anvar_k at 2007-9-30 14:37:11
Hi all, I have polygon with n vertices.. I know the coordinate of each vertices..Now I want to split this polygon to a set of triangles... by using scanline technique...Anyone can help me...thanx in advance..Anvar
851 byte By
anvar_k at 2007-9-30 14:37:16
Hi, One more problem.... I have a cylinder in 3-Dimension... and it's base in x and z axis and height towards y-axis.Now , the top of the cylinder I am planning to slice away at a 45 degree..so the top face must be having an ellipse shape rotated in z-axis of an angle of 45 degrees.Now I need ...
is there any good tutorial on this?
1326 byte By
verdi96 at 2007-9-30 14:46:42
Hello,Is there a single data structure able to sort its members (each member isidentified with two keys) and facilitate O(log n) lookup using both keys?The reason I need a single data structure instead of two data structures (onefor each key) is to reduce memory usage.I have a routing table ...
4577 byte By
silk.m at 2007-9-30 14:53:12
Hi :)Consider this problem ...you have an array (b1) who's size is N.We have another array (b2) who's size is <= N.I would like to use b2 to "jiggle" b1 up a bit.This is what I wrote to accomplish it:public class TheJiggler {private static String pad2(String n){return ("0" + ...
466 byte By
chungkp at 2007-9-30 15:01:56
Hi AllI must admit I am not that good in Java and probably don't know enough Java API to do what I want to do, and here is my question ...Is there anyway I can cast the entire 2D array from byte[][] to int[][] without using nested loops to cast every single elements in the array? The reason I ...
Hi guys,i'm working on a project that has for goal to get any polynomials of the form:a x^n + b x^(n-1)+ kx+m the polynomial has to be read from console . we should then detect a and m (they are the most important) if there is a syntax error it should be mentioned. the expression of the ...
Hi There I have written a program that consists of a main GUI and another frame for entering details: I want the class with the main GUI in it to wait until the details in the other frame have been entered, but I dont know how to do this. I have tried Thread.wait() but this doesnt work as they ...
518 byte By
namanc at 2007-9-30 15:19:41
I created one linked List and one of the elements of the linked list is int. After that I assigned String value to that element. It compiled successfully and it is working. Code in C is struct node {int data;struct node* next;}..................struct node* head = null;head = ...
87 byte By
kill1234 at 2007-9-30 15:23:48
Could anyone tell me how to implement splay tree base on Treemap, thanks.
3716 byte By
sylviae at 2007-9-30 15:24:25
The USA has an unfortunate penchant for granting patents that arguably do not merit patent protection. Some of these are things that are blindingly obvious. Others are just not sufficiently inventive. Anyway, since I have no funds for patent searches, nor patent applications, and there are some ...
425 byte By
jverd at 2007-9-30 15:25:08
After reading various questions and comments on this or that sorting algorithm or tree implementation in these forums, it's become painfully apparent that my understanding of data structures an algorithms is, to be charitable to myself, a bit rusty.Are there particular texts on these topics ...
9830 byte By
kill1234 at 2007-9-30 15:29:24
Hi;I am trying to implement a quick sort with a sequence already sorted in descending order, and pick up a median element as pivot, but after sorting, the result is not correct, becase some number appear several time, like the number 4, 8 ,15, which is different with the originan array. Could ...
I am trying to connect to a btree and retrieve the information for formating the putting into a sql database (nexus). The btree is stored in files with extensions .dat .ndx and .dia. any help with how to retrieve the data would be great!CheersJack
1262 byte By
meszaj at 2007-9-30 15:32:13
my english is not very good. so please be patient... i am learning for an exam (algorithms and data structures) and i have a few questions on graphs. it would be grateful if anyone could answer this and correct my answers.also a short describtion why would be greatwould below algorithms work, ...
1462 byte By
duffymo at 2007-9-30 15:40:54
Sorry to bother folks with a question like this, but I'd like to ramp up with Monte Carlo and some advice on best intro texts would be greatly appreciated.I'm not a statistician by any stretch. I have a math background, but it's mostly calculus and linear algebra (except for two courses in ...
Hi all,I am trying to optimize a sequence of steps using Genetic Algorithms. For Mutation I would like to use either a PMX or a Cyclic Crossover since I want every chromosome to contain just one step of a certain type. Obviously I am doing this in Java. I was not sure where I could find more ...
What are the different algorithms in Java? Can someone list me each and its uses?
Posting this helps me to understand my problem better. I know the problem is not well defined here, maybe I'll refine it later. Don't know if anyone is bored/interested enough to have a look but anyway...I think my problem is that of averaging velocity vectors. I've devised an algorithm and ...
10051 byte By
kill1234 at 2007-9-30 15:49:38
Hi;First of all, i apologyed that i crosspost in the last time, please give a change, because nonone is perfact, and I am not very bad people, sometimes I just hurry to wait for the reply. please give me a change, and help me, we are man. anyway if you guys do like me, tell me dirctly, I will ...
I have a Polygon that represents the bounds of a spaceship in my game, the spaceship image rotates ( this is an asteroids remake), and I need the bounds to do the same. Right now I have two Polygons one is of the Polygon located at the origin, the second is the actual location of the Polygon ...
414 byte By
namanc at 2007-9-30 15:52:07
Hai,I want to know the logic behind, finding day of week from date. I want to write a java program that finds day of week using date (without using any existing java classes and methods .. I think we have function for finding day of week in Java). If any one knows pls help me ... I got the ...
69 byte By
jquannv at 2007-9-30 15:53:45
Does anyone have document about time billing algorithm?
2161 byte By
thematx at 2007-9-30 16:14:42
Ok, i need help writing an algorithm as my head will explode lol.Ok, well, i am hoping to write a program that will read files on the computer and do stuff like copy files and backing up. I also going to make it check if a file is older or newer so that i dont risk writing older data onto the ...
1500 byte By
dhm_le at 2007-9-30 16:24:38
To whom this may concern, can you please help me with this problem!I am trying to pass a wav file without the header just the data into a Vector in Java.I need to convert this Matlab (adaptive decorrelation filter) file into Java.function [v1, v2, a, b, c] = adf(y1, y2, mu1, mu2, delay, Na, ...
Hi,I want to store a string / combinations of strings in the database as numeric representation. Say I have a string ABCD or "ABCDEFGHIJKLMNOPQRSTUVWZYZ" or any other string. I want to store this as a number.Can I rely on String's hashCode method for this ? Will it give me a unique number for ...
hi:in garbage collection, the header points to the location where the next block of free emeory resides, but how does the pointer know where is the next free region?
I need a tree data structure to represent a category-subcategory. Only algorithm I need is to find all children from a given node. What is the effective constructure of such tree?Thanks.
179 byte By
kill1234 at 2007-9-30 16:38:48
Hi;when I try to reblance a tree to AVL tree, But I find i can get two different result, but they all satisfy the difinition of AVL, do you think they are ok? Thanks
I want to get the diff b/w two dates in years and monthshow tofor days i am using the following codeString date1="1/1/2004";String date2="2/1/2005";SimpleDateFormat formater = new SimpleDateFormat("MM/dd/yyyy");Date result1 = formater.parse(date1);Date result2 = formater.parse(date2);double ...
668 byte By
nico.inc at 2007-9-30 16:42:34
Hello,I'm using an algorythm which read a very huge memory structure in RAM (about 70 Mo) and write it to the disk (in ONE time, at the end...). The algo is very simple, it just translate the structure into an ascii format...The problem is that it's exponentialy slow, I mean that the first ...
I have a map datastructure in which keys map to an arraylist. The values of the arraylists elements themselves are keys within the map. For example:Map List of previous keysN -> MM -> I, LL -> KK -> JJ -> DD -> BI -> GG -> F,HH -> DF -> CC -> BB -> ASo from ...
I have a map datastructure in which keys map to an arraylist. The values of the arraylists elements themselves are keys within the map. For example:MapList of previous keysN -> MM -> I, LL -> KK -> JJ -> DD -> BI -> GG -> F,HH -> DF -> CC -> BB -> ASo from ...
Hello Java Developers!I am a relative newbie to Java programming. I've just started my second year of AP ComputerScience in high school, and I'm having some trouble with a sorting algorithm.I'm trying to convert this extremely fast, modified version of QuickSort ...
197 byte By
kill1234 at 2007-9-30 16:55:18
Hi;could anyone draw a graph and express to me to do the skip list in search?For example, a list is; 2,4,6,7,8,10,13,34,67,69and the search key is 34Thanks