Misunderstanding with BigIntegers - no suprises there then...

1085 byte By cakea at 2007-10-2 11:59:42
HiI have a function for breaking down (supposedly) a BigInteger into a list, depending on the base! It works when I send it all my small test cases, however, when I do actually try and send it a 'big integer' it falls over, what am I doing wrong? Typical call ...

Logitude & Latitude Based Proximity Searching

973 byte By samblake0a at 2007-10-2 12:03:24
Hi,I want to do proximity searching based on longatude and latatued over the whole world. Basically I want to be able to have users find all other uses in a database that are close by (say 25 miles or something). So in some places the regions will be sparse and other densly populated.Initially ...

sudoku solver

185 byte By cmg2pa at 2007-10-2 12:05:03
I know many things have been posted about sudoku, but i have another question. is it best to use a 2D array to do this, and how does recurrsion help in solving this?thanks

random pick string...

234 byte By shadowssssa at 2007-10-2 12:09:32
how to random pick the string out....when we set the total for string eg:string a = " how to pick out the string"if i choose 3 string out, result: how to pick....or......pick out the....or out the string...

Barrel Distortion Correction

269 byte By the_beea at 2007-10-2 12:12:04
hello,i would like to know if anybody could tell me an algorithm for barrel distortion correction. I need to gather positional data of objects from an image and therefore i need the image to be accurate. Any help would be greatly appreciated.cheers

Random Number Generator

305 byte By anup_sunsysa at 2007-10-2 12:14:58
Within a specified lower bounds and upperbounds, generate specified percentage of Random Numbers.For eg., Generate 20% of random numbers out of (0 to 99). i.e., I should get 20 numbers randomly and UNIQUELY from 0 to 99 numbers.Thanks in ...

binary tree - a spesific node's height !

209 byte By JungleRata at 2007-10-2 12:17:15
hello ! im looking for a method to deterine a certain node's hight in a binary tree (that is its distance from the root ) please enlighten me on how to do this if you can thank you

TIFF File Viewer

5690 byte By Prankrishnaa at 2007-10-2 12:24:32
I am going to make a TIFF image viewer and I make that but I am facing some following problem -1. Its viewed big image how I resize every page of the Tiff image file.2. When I am going to make it in applet its not show the image, but in JFrame its show.I am attaching both java source file - 1. ...

Convert any document file in TIFF file

81 byte By Prankrishnaa at 2007-10-2 12:24:34
how to convert any document file in TIFF File, is there any API to do that

parallel arrays

2108 byte By shivers20a at 2007-10-2 12:34:58
A menu-driven program in which I choose one one of these options and the program will carry out the request. The program will then display the same menu again and get another choice from the user. 1.List students names 2. List credits3. Show total credits4. List gpa's5. Lits gpa's in ...

Binary Heap Implementation Using a Binary Tree

1492 byte By stellanora at 2007-10-2 12:35:21
My Java AP AB teacher has set forth a challenge:As a group, the four students in my class must implement a Priority Queue using a binary heap. This heap, however, needs to be implemented using a binary tree, without storing it in an array. It's more of a wager than an assignment; we are ...

Looping through RGB

969 byte By nadeemshafi9a at 2007-10-2 12:43:53
helloi am having some confusion over incrimenting the values of the RGB Colour obj in a loop, so far i hav been able to loop through 1 line of black to red. on the next line i want to change coulor creating a pallet.I am printing 255 pixels per line whith an incrimentation in the coulourThis is ...

Looping through RGB

969 byte By nadeemshafi9a at 2007-10-2 12:43:54
helloi am having some confusion over incrimenting the values of the RGB Colour obj in a loop, so far i hav been able to loop through 1 line of black to red. on the next line i want to change coulor creating a pallet.I am printing 255 pixels per line whith an incrimentation in the coulourThis is ...

Matrix Operations with Java

298 byte By bravoelt255a at 2007-10-2 12:44:04
Hi,I am currently working on a thesis. It involves the use of algorithms and I will also need to implement some 2-D matrix operations in java. I managed to do so however I have a problem in implementing the square root of a 2-D Matrix. Can anyone

Returning all possible combinations of values!!!

384 byte By Pharaosa at 2007-10-2 12:47:12
Hi buddies,Can u suggest me a method that can return all possible combination of values from a set of values and place it in a txt file?. Anyway i only need the method returning all possible combinations!For example:A = {2.0,3.5,6.7,8.9,9.9,10.0}one of the combination can be: ...

Algorithms for trigonimetric functions

147 byte By Samuraya at 2007-10-2 12:54:39
Does any one know any good site where i can find algorithm how cos , sin , etc. fuctions are beeing calculated.Thnx for all the help.

Image resolution algorithm

582 byte By ssaanna at 2007-10-2 12:56:00
Hello!I "reload" a request (first posted on the Java 2D Forum) hoping for more success, this time:Please, somebody help me, if possible, with an algorithm (or a pointer to such an algorithm) that allows saving an image in a file, with a pre-set resolution (pixels per inch), to have the ...

Trie

554 byte By bjb1440a at 2007-10-2 12:57:02
Does anyone know of a good open source implementation of a Trie. I've been assigned to look into the potential of using AJAX within our organization. As a test case, I'm trying to implement a simple auto-complete application for street addresses. The source of these addresses is a relational ...

How to sort a set of integers

351 byte By Wenxiaoa at 2007-10-2 13:06:09
I have an int array containing a set of integers, and an empty ArrayList.I want to find the biggest integer and add it into the ArrayList, and then find the second biggest one and add it into the ArrayList as well, and the 3rd biggest one, as so on. How to achieve that? Could anyone write a ...

recursive alg question

1508 byte By JJPeerlessa at 2007-10-2 13:13:10
ok, i have a 8x16 grid of ints. if the grid has a 3 it is an empty space. if it has a 0 it is what im looking for, and if it has a 1 then its a path, basically33333333333333333333333333333333333333333333313333331133333113333331133333303333333333333333333331333333311333333311333333333333ok so ...

BigInteger... help me!!

1858 byte By parisa at 2007-10-2 13:18:54
Hi,Can anyone help me. I used BigInteger to calculate the factorial. Howeverit always printed error when I insert a number upto 4000.import java.io.*;import java.math.BigInteger;// A class represents factorial calculation.public class Factorial{// main method of the program.public static void ...

adding binary numbers in java please help!!

477 byte By trscookiea at 2007-10-2 13:20:55
Hello all, im a total newbie to java and i need your help urgently, i have two variables that are integers, that store binary numbers i.e.int tmpIntOne, tmpIntTwo;tmpIntOne = 1010;tmpIntTwo = 1110;i want to add these numbers together and return a binary result so far when you add them together ...

round robin

977 byte By sam1986a at 2007-10-2 13:21:42
I am supposed to write a small program that will process a number of processes that will have a cpu job and io job each.I have not taken the OO class, so not really have to implement patterns or threads.I am just troubled....We have to schedule the Round Robin algorithm. If one process has ...

network game data transfer

226 byte By rkippena at 2007-10-2 13:22:16
Suppose one were to make a game, like warcraft 2, where a majority of network data originates by mouse click. Is it possible to only send the mouse click information? Or are the coordinates of the sprites required also?

trying to implement a quadratic sieve!

308 byte By cakea at 2007-10-2 13:24:07
HiI am trying to write a quadratic sieve. Without posting the code, would anyone be willing to walk me through it, as to be completely honest, I am lost? The examples in the book 'Number Theory with Computer Applications' are as about as useful as a goldfish with a driving ...

Bezier Cubic & quadratic curve Algorithm ?

454 byte By gekazodea at 2007-10-2 13:32:56
I have tried many different sites and algorithms to draw a cubic or quadratic curve in a bufferedimage. all of which have worked but when overlaped with java2d path output of the same curve, some pixel hance points are of by a pixel or two. But the general shape of the curve is true. So i was ...

how to caculate geographic extension

292 byte By lvguangchuana at 2007-10-2 13:36:17
Hi,ALLI have a question,PLZ heip me.I have a geographic coordinates(-79.65231,43.682334),treat this coordinates as centerpoint.I want to cacluate the rect with width (100m),height(150m)so I want to cacluate corner geographic coordinates.Thanks

postfix.?

198 byte By leri_19a at 2007-10-2 13:37:55
do you guys have any idea about post fix.?can you please help me.?I trying to make a calculator program but I can't make my mathematical sentence into a postfix.!

optimal Hamming Distance implementation

5406 byte By bbatmana at 2007-10-2 13:38:08
Anyone know how to optimally implement a Hamming distance and weight function?My first stab is this code:/*** Calculates the <b>Hamming distance</b> between 2 ints.* The ints are viewed as binary strings, so the result is the number of bits where the 2 ints differ.* In particular, ...

JLabel prob

158 byte By shadowssssa at 2007-10-2 13:41:03
how to use .setText to set the value on the JLabel if the value is integer type...any other ways can help me to solve this problem..thx..

Need help for this question to get output.(very very urgent)

646 byte By samuelea at 2007-10-2 13:42:35
Using Java, write a method that does an in-order traversal of a binary tree WITHOUT using recursion. based on the following code This program should run to get the output.I think I have this ListNodes method but I need some code to create a binary tree and pass the root node as parameter to ...

Miller-Rabin problem

2161 byte By cakea at 2007-10-2 13:43:38
HiTrying to code the miller-rabin primailty test, hit a problem and can't quite see where I am going wrong, err, help!public static boolean mr(BigInteger n, int t) throws Exception{//Miller-Rabin Primality Testsrnd = new SecureRandom();BigInteger s = n.subtract(ONE);BigInteger r = ...

"Conversion from ASACII to Hexdecimal"

189 byte By spinergywmya at 2007-10-2 13:46:34
Hi there,Is there anyone can help me on how to convert the hexdecimal to ASCII? Or any references that I can look into it? This is ASAP. Thanks.regards,Wooi Meng

Prime Number Solving Problem

1060 byte By mkveerapena at 2007-10-2 13:55:07
I am very new at this.Recently i got a question of making an output of prime numbers with no input involved. class PrimeNum8{ public static void main (String [] args) {int num=2;int i = 2;int q = 1;int term=100;System.out.println("Prime Numbers");if (num==2){System.out.print(num+ " ");}for (int ...

intersection of hyper-rectangles

255 byte By cunfua at 2007-10-2 13:56:10
Hi,If I define two hyper-rectanges in n-dimentional space by specifying their coordinates of lower-left corner and upeer-right corner, how can I determine if these two recs intersect with each other?Any hint appreciated!Thanks.

All 4 digit combinations

1407 byte By berta at 2007-10-2 13:56:24
Hello all I recently found a piece of code here I altered it slightly to serve my purpose.I want it to list out all possible combinations of 4 numbers out of from 0 to 9. The code below will do this but the problem is it repeats the same combinations over and over. Can anyone alter the code to ...

Finding the next largest number for any given number format

2190 byte By fragorla at 2007-10-2 13:57:34
Hello. I am writing some java code to model open and closed intervals, as well as a few other areas to do with set theory.More specifically, I have written a class that models a range of numbers. The class is generic in that it allows any subclass of Number for its lower and upper bounds, and ...

Looping around an arraylist of strings to find matches(more complicated!)

1180 byte By delboya at 2007-10-2 14:00:57
Total Posts: 1Help developing an algortimPosted: 03-05-2006 07:11 AMHi,I have been bashing my head with this for a while, so any help is much appreciated!I bascially have ONE arraylist which contains filenames as strings (e.g. file.txt, file1.xml, file2.doc, file2.xml, file2.txt)The arraylist ...

Java Function To Predict future Co-ordinates of line

947 byte By e-darda at 2007-10-2 14:01:39
Hi all this is my first post so first of all i would like to say hi!I am wondering if there is a java method which can help me.Given a straight line consisting of two cartesian points - (x1,y1) and (x2,y2) how do i predic predict a new value if i want to theoretically extend it?Maybe this will ...

HELP how do i math with tokenizing

1558 byte By ekimffora at 2007-10-2 14:03:01
I have a code that can input an equation ie: 1+4*3; i want it to solve in order of the equation not operations, only the problem is i cant figure out how to store any variables from the tokenizerheres my codeimport java.io.*;import java.util.StringTokenizer;public class Calculator{ public ...

Hash of regions

381 byte By psna at 2007-10-2 14:16:19
Hi,I need to hash a set of regions. Each region is a set of "start" and "end" coordinates.class Region{ int posStart; int posEnd;}Now the task is to find all regions that contain coordinate "pos" in log time. Regions in the set may intersect.Does anyone have an idea how to do it?Thanks in ...

JTextArea question..

517 byte By shadowssssa at 2007-10-2 14:29:09
well i have write a program to compare 2 documents in a text area..for an example,JTextarea a;string doc1= "i love u";string doc2= "love";the output will be print out the matched word in textarea where the "love" will be highlight with colour...how 2 write the code to print out the whole ...

how to install cldc and imaps

128 byte By meas.sokhoeuta at 2007-10-2 14:38:21
All every one please help me, How to install the cldc and imaps.I download already but i don't know how to install them.

calculate number of different characters between two equal length strings

1043 byte By analogAIa at 2007-10-2 14:40:10
Can anyone think of a more efficient algorithm to calculate # of char differences between two EQUAL-LENGTH strings?Basically I'm trying to avoid function calls such as String.charAt() or even for loops. Since i'm comparing large number of equal length strings, it would be best if there's a ...

Training a classifier

550 byte By oraistea at 2007-10-2 14:41:22
HeyFor a learning classifier is common practice to use the same dataset as the training data and the test data? I am asking because i did a college assignment which involved creating just the one dataset which was used as the training data and the test data.If this is a bad approach then when ...

how to implement lottery program ?

318 byte By bruslia at 2007-10-2 14:42:45
Hello everyone,can someone tell me the approach to implement a lottery program. I want to print out all the possible lottery number of 13.983.816 combinations. The number which i mean is the number of possible combinations of 6 numbers selected from 49 without repetition. Any help would be ...

Converting values

372 byte By patucosa at 2007-10-2 14:44:48
Hi everybody,I have a problem: i am implementing a java app which is becoming some range values from an algorithm but with this format: .10000E+01 to.10000E+26 .27000E+01 to.10000E+05Plase apologize my ignorance but i do not remember how to convert the values into decimal, to use them in the ...

how remove duplication in the array

1572 byte By shadowssssa at 2007-10-2 14:50:51
import java.util.*;public class stringlength{public static void main(String[] args){String p = "i love java very much.but i like it";String t = "i love java very much.but i like it";String[] sentence1 = p.split("\\.");String[] sentence2 = t.split("\\.");String[] EachLine1;String[] ...

TFIDF

311 byte By oraistea at 2007-10-2 14:53:10
Ive been reading an article on the TFIDF algoirthm as an incremental learner, because when analysing text documents it maintains a table of word frequencies for each new document. Just wondering if the algoirthm in itself is an incremental learner or if this depends on how it is ...

bisection algorihthm

388 byte By zurka at 2007-10-2 14:54:38
Hi! my english is very bad so dont be surprised, i have many mistakes in grammar.i am using the bisection algorithm in my program, but i have a problem.i tried to call bisection for function "x^3/(x^2-3)-x-7" in interval -1,-2 (the root is in interval -1.something).but it didnt work, can ...