Hi, guys..I will make a client-server application using j2me and servlet. Servlet will send an png image as a response to j2me. The servlet's actions about the request are:1. servlet will put a small circle image in some parts of the main image, then2. servlet will crop part of the main image ...
471 byte By
qwedwea at 2007-10-2 20:37:03
hello everyoneI need some help to divide an array into 2 arrays with the middle element of the array as the root node. elements less than the root node should be in the left array & greater than root node should be in the right array.And after that if the left array is filled........ then ...
Hi, I'm trying to program this matchcard(memory) game for my school project. I need to know how I can set a timer for my program so that when a user clicks a card to flip over, then clicks a second card there is a delay so that both cards pictures are clearly shown, say for... 5 seconds so ...
I've created a number of simulations related to Nuclear power plants, but I've never gotten it right. Its actually quite a feat. I've used two models:1) There are a collection of vessels (reactor core, exchanger, reservoir, turbine, condenser) and pipes connecting them all. They all have a ...
after conrting for example the data is in the from of:1, 1, 12, 23, 15, 15, 15, 45, 45 ,13so how it arrange in final array(and # if 15 is repeate 2 time)plz can any body help me
im trying to make a method that takes in an array and makes a new array with the values from 0 to the array.length-1 so that the array it returns will corrispond with the values in the original array (if the number at the original element[ n ] is the higest number of all the array its value in ...
390 byte By
dounda at 2007-10-2 21:01:55
I am calculating the dot product the straightforward way (see below) and I don't think there is a better (i.e. more efficient) way to do it. I have to compute a very large number of these and was hoping someone might have a suggestion. Would there be a noticeable change if it was computed ...
Hi,I have 4 questions.1- i want to store my objects in tree because they are hierarchical and behave like tree nodes that start with one root. but should i consider any dependency between my objects(Top object and Butt Objects) as attributs or tree solves such dependencies? if tree could ...
For the life of me I can't understand how to implement a keylistener without using any gui elements. I am writing a text-based rpg and just need to check to see which keys are being held down at any given moment.if anyone could offer me some sample code i'd be immensely grateful. None of my ...
hi,the problem is say we have an equation a=b+c+d and i have values of a,b,d. now i need to evaluate d. so the equation should be rearranged as d=a-b-c. how do we do this programatically. i mean we have athe equation stored and at runtime we need to rearrange the equation. how do we go about ...
Hi,I want to initial my root Node to making a Tree. my data model columns are id,parent and leaf . how should i load this tree recursively? i have implemented TreeNode interface.thanks
Hello all.I am a high school student and regularly go to contests that involve problems of finding the shortest path to solve a maze. The path inputs will be from file, a grphical representation of the maze, with each grid either being a wall character (say, ' * '), a path character (say, ' ...
Hi Members,I want to write a program to download a zipped file from a web site.I mean my program should connet to that site and starts downloading the file.Can anybody please provide me the sufficient knowledge about this.Thanks in advance,NetBeans.
Hi.Does anyone of you know some nice (and possibly already implemented) algorithms for the k-shortest-path problem? In particular, I am interested in some special features: it has to work with a directed, weighted graph and should ignore loops, i.e. it should work with simple paths. And I ...
Hi,I am currently taking content out of a database to be displayed on a page in an XHTML format. However, the content I am receiving is a mixture of encoded and unencoded eg I sometimes get & and other times I get & within strings. This will typically be in a url. I wondered if anyone ...
889 byte By
Fabio_Aa at 2007-10-2 21:51:06
Hi,I have an application that calculates standard deviation of an image.the image is in RGB space and calculate standard deviation for each channel separately...this is the codefor (int i=0; i<256; i++){DeviationtempR+=Math.pow(((IstoRed[i]*i)-MediaR),2); ...
3920 byte By
qwedwea at 2007-10-2 21:54:33
Hello everyone,I need help in inserting values into an array of class, which i have read from a file. Length of the array is 5. I should insert values one by one into that array.If the array is full (if count = 5), then I should split the array into 2 arrays and adjust the values to left and ...
Is there some good method for determining the best order of items (without checking all combinations of course). I am using Taguchi method for checking several factors against several levels. But I would like to check several factors in different orders (of course, with the least number of ...
need help writeing method fillShape that takes in a 2D array of shapes and points(in other words it will draw the shape and fill it in into my Screen array(ex: Color[][] String = new Color[700][1000]) basicly a 2D array of colors which are painted in my paint method... anyways im sent this 2D ...
171 byte By
OcELLa at 2007-10-2 22:01:18
Hi! I need to check if a JPEG file is ok. I can't use any multimedia library. Anybody knows how can determine if a file is a JPEG file, and it's ok.Cheers!
381 byte By
ANDYAa at 2007-10-2 22:10:30
Does anyone have source code for a class able to compute multiple linear regression. I've been using the jama for matrix operations.A previous post was very similar to this, but I was unable to find anything in the linked answers that I could incorporate into what will be a high volume ...
While working on implementing a primality test based on Fermat's Little Theorem, I naturally came across java.math.BigInteger to mainly utilize it's method for Modular Arithmetic.I also noticed that it has two other methods; isProbablePrime and ProbablePrime.As such, I was wondering which ...
I need some help developing an algorithm for parsing and evaluating conditional statements. I need to be able to handle variables, logical operators, relational operators, mathematical operators, and parentheses.For example:if ( (a+1 > b*5) and ((c +2) * 6 <= 5) )All the variables ...
I have 2 vectors containing String objectsI need to determine whether each String present in the first Vector is present in the 2nd Vector or notIs there anyways to to this such that its complexity is less than O(n^2) i.e Order(n square)The result obtained should be fast as this is algorithm is ...
Hey Folks,I am trying to find a better implementation of Soundex algorithm than the org.apache.commons.codec.language.RefinedSoundex or org.apache.commons.codec.language.DoubleMetaphone. Has anyone any idea whether there are other implementations available? We are getting lots of false ...
341 byte By
LOLOa at 2007-10-2 23:12:37
Hello all,I'm trying to make a code that search inside some files.. I did it in sequential way but it's very slow and not effeicient..I want to do it using binary search tree.. how can I sort files (or strings) and then search within these strings..with all my respect..Message was edited by: ...
1299 byte By
at 2007-10-2 23:19:36
I have three quicksort related questions that are all related to each other more or less so I am grouping them here.1) Why does Collections.sort have to call toArray() ? This is just whining i suppose but I don't want my List implementation turned into an array because it defeats the purpose ...
829 byte By
mishimaa at 2007-10-2 23:23:18
Hi,I have to do produce an algorithm that takes any positive integer greater than 0 and less than 500 and once i have done this I need to produce a:A list of all the factors of the given integer .A statement of how many factors the given integer has.A statement of the sum of all the factors of ...
Hi I am using java regular expression to evaluate some string and it works fine with me when the pattern is english but when the pattern contains arabic character it is not working at all what I can do here is my codeString ...
I need to implement a pattern matching algorithm.. which searches a pattern in a directroy structure recursively.can anyone suggest an algo for this .I need to implement this in java
771 byte By
cxia at 2007-10-2 23:47:01
Hi all.I wanna generate patterns like below (every column is one pattern). My code missing some of them. Does anyone have a good algorithm to solve this kind of problem? Thanks ...
2269 byte By
ra2ora at 2007-10-2 23:47:47
Hi guys,Just curious on what ppl thought on methodolgy ...what ppl would suggest could be better.Thanks.Anyway,I've just made a lottery program for fun which randomly 6 non duplicate numbers from a range of 0 - 49.These numbers get saved to a text file. I want to spice it up by it outputting ...
504 byte By
rcd27a at 2007-10-2 23:51:51
Hi, guysCan you tell me what is the best way to do regular expression pattern serach. I am developping a message filter. Given all word patterns(patterns are all single word), I need find if each messages matchs one of the patterns. Once find one pattern match, program will stop the process for ...
1287 byte By
since81a at 2007-10-2 23:56:47
I have been struggling for a tree search problem for a good while. Now I decide to ask you experts for a better solution :-).Given a binary tree A. We know that every Node of A has two pointers. Leaves of A can be tested by if(node.right = =node). Namely, The right pointer of every leaf node ...
444 byte By
since81a at 2007-10-2 23:56:49
I want to get all the numerical constants from a line of java statement. Numerical constants here refer to 1. int 2. float3.doubleFor a example, by running the method on the statement "i = 232; f = 23.123f; c= f2h; int aa_2, b$99 ", we should get 232, 23.123f and f2h but not 2 and 99.How can I ...
While working on a math problem recently that involved Pythagorean Triples I spotted a connection with the complex numbers that I had never noticed previously. It is a trivial observation and I was surprised that in my many years as a mathematician I had never heard anyone mention this little ...
1640 byte By
alta at 2007-10-3 0:20:28
Hi,How do I find the partial derivative of an equation symbolically? How do I make the computer automatically find the derivative of a function without heuristics? The difference quotient can be used to find the derivative, but what about functions such as sin, cos, log, and special ...
Hi Is there any graph rendering tool that would automatically draw a tree like structure once the vertices are provided. I have a hashtable with states i have generated. so generally i have a state name and a quality and duration value. Is there anyway i can do a tree representation. Please let ...
818 byte By
since81a at 2007-10-3 0:37:02
Hi, again, I have difficulty handling tree search problems. The quesion is How to search for a node from a binary tree A, return true if found meanwhile generate the path which can be used to locate the node.I think the signature should be:// The path contains only 0s and 1s. 0 means go left ...
please could any one help me in findind source code in java for polyphase and balanced sortingthx for advance
Hi,How do I generate different cominations of a word.Eg: TestTESTTEst TESt TesT ...............Please let me know .Thanks,Sarayu.
Hi,i have a larg number of item seperated by semicolons and stroed in a String object.each item could includ pattern...we have following patterns:1- * (Asterisks)Use asterisk to filter on a match of zero or more characters.2- ! (Exclamation Mark)Use exclamation mark to filter the search using ...
HI all, I am new to regular expression.Can any one please tell me the regular expression for characters which are used in regular expression like " [({. tetc.Is there any particular expression to prefix before using these characters
I successfully implemented a minimax algorithm whoever when alpha beta pruning is added, the algorithm does not function correctly. Here is the code currently being used as the algorithm:public int Negamax(int depth, char[][] charBoard, int player, int alpha, int beta){int score = 0;char ...
Hi, I have general N-vertex polygon. It is exists any class, where is implemented method for test if specified point is inside this polygon?Radim
I m a student of Computer Science and working on my first project of the career. i have been assigned the project of Face Recognition Application. i have been working on it since one month but i m not satisfied to what i have worked. i m lover of java so i want to implement it in java. i have ...
Hi, I have a large array of over 5000 words. I need to take all these words and re list them by groups--e.g. have words like 'fire', 'flame', 'burn' and 'combustible' listed next to each other.Is there a thesaurus I can use to perform this operation? I would like to be able to use the ...
Hiwhat is the difference between (int)alongValueand(int)( alongValue ^ (alongValue >>> 32)I got confused with the use of ^ and >>> operator while going thru this link http://www.javapractices.com/Topic28.cjp
I currently have a program that takes two integers as parameters. It either returns a win or a loss (the program is a game). Would it be possible to use statistics or a genertic algorithm to come up with the best two integers to pass to the program (by running the program thousands of times)? I ...
Hello Everybody!! I have already posted this on the "Jave Programming" forum but this place might be more helpful. I am working on a diagram editor and what I want to do is to allow the user to connect pairs of objects using arcs. ( see this picture ...