Am writing a java program,how do I include validation check on all input?My program is designed to manipulate input in double and integer only.The validation check has to return an error if the user inputs nothing(i.e. blank space) or inputs a string character e.g(a,b h...),who can help me with ...
684 byte By
asciia at 2007-10-2 14:56:16
Can anyone provide some guidance or perhaps a working solution to this problem as I need this very urgently:Implement an animation program based on Java 2D which simulates the navigation of a tiled maze by a robot.The maze should be splitted into N x N cells (for example 100 x 100 tiles).The ...
115 byte By
thomasRa at 2007-10-2 14:59:58
Does anybody know if there are tree pattern matching algorithms available in Java ?Thanks in advance.
971 byte By
Dylberta at 2007-10-2 15:07:04
Hi all,I've been struggling trying to come up with a suitable algorithm for determining tick marks on an axis based on the range of values the axis should display.For example, if my initial data set contains the values[5,20,29,51,60,63,79,95]I can get the Range of 90I can specify I want, say, ...
Heey.. posting here since I think it falls under secerity.Im setting up an image database for over 1000 images. to be certain an image isnt used twice a friend of me advised to use message digest. I tried googling for tutorials and examples. googled this forum and read several docs I still cant ...
131 byte By
MattD_4a at 2007-10-2 15:10:42
Which is a better algorithm to use when sorting through arrays? I've heard that BubbleSort shouldn't even be used anymore.
Hi,I have some records in database related to supply chain.e.g. N1 supplies item I1 to Node N2 is represented as N1 I1 N2.Now I want to find all parent nodes or say chain of nodes supplying to particular node in an efficient way.Currently I am using recursion but for each recursion 1 query ...
okay, i wrote the isNum function which checks whether the input is a number. i made it in the recursive way. im just wondering what the different speed would be. is recursive way more efficiently?boolean isNum(String in){if(in == null || in.length() < 1) return false;int length = ...
hi:here is a design for a dictionaryDesignA dictionary is essentially a set of words. Dictionaries are used in various applications.In a spell-checker, a dictionary is used simply to decide whether a given word iscorrectly spelled. In information retrieval, however, the emphasis is on ...
Hi! I'm working on a type of the euclidian travelling salesman problem, and I'm going to try to solve it using an Genetic Algorithm.One solution may be a route like this: 1-2-4-3-7-6-5. This means travel from town 1 to 2 etc up to city number 5 and also implies travelling back to town 1 after ...
I am using an open source HTML parser and i have discovered that it cannot parse certain extended, or high unicode characters, including:[code]TRADE = '\u2122';EMDASH = '\u2014';ENDASH = '\u2013';RSQUO = '\u2019';LSAQUO = '\u2039';LDQUO = '\u201c';RDQUO = '\u201d';BULL = ...
1127 byte By
Vmastaa at 2007-10-2 15:42:58
Hello,Im trying to write another method called primeProduct that takes as input a positive integer n > 1and returns the product of the primes from 2 to n.So far i have only got the program to see if the number is prime or not.Is it easier to write primeProduct in an array? And is the ...
306 byte By
Fabio_Aa at 2007-10-2 15:44:51
Hi,I have the neccesity to save my java array into mysql db, as I must make?I have felt to speak of blob... I can use this object? mysql have blob how type of field, but after as I must make for to recover my array?thanks in advancebyps.sorry for my bad ...
I am trying to write a Java program to roll a two dice 1000 times. I then have to count the occurance of each double. Display the most frequently occuring double and draw a histogram of the occurances of each of the doubles. * The dice are standard 1-6 die. Any ips of help anyone can give me ...
432 byte By
ahlem77a at 2007-10-2 15:45:46
HelloI need to develop a timetabling algorithm that generates timetables for tutorials and lab sessions in JAVA. I have already found all the constraints associated with the algorithm. however, I still have not started writing the code.Could you please help me finding some source codes to help ...
Hi, I want to locate moving object in the avi (movie) file. I have red that mean shift algoritum is used for this purpose. I have searched for mean shift algorithum, bit i have not found algorithum in puscdo code. The algorithum in mathematical form is very difficult to understand. Can any body ...
hi, I am having a problem as the title suggests with a zip fil creation...using the basic example zip.java i wished to edit it so it doesnt zip a file fro the current directory but rather a directory i inputted.It is able to read the first file then throws out the following error with the code ...
im having problems making my round robin simulation...i think there are ways other than nested loops and data struct..can anyone help me..
How can I realy use Thread in Mobile Devices?I took part in a project to make a Karaoke application on mobile devices. It's very terrific project because I couldn't synchronize melody and subtiles with various mobile brand, such as Samsung, LG, NOkia, Motto,SonyErricsson, and so on. After ...
First time poster, long time readerI'm trying to write some serializable objects (ArrayLists) to file, but I wanted to compress them first. The GZIP stream isn't doing anything, even when it should. How should I be using it? Thanks if you can helppublic void save( String filename ){try {File ...
Hi,I have created a syntax tree of a binary operator that is associative but not commutative. The resultant is a unbalanced strict binary tree. I have tried using AVL tree as well as a heap. But they will occasionally destruct the non-commutative property of the syntax tree.Is there any ...
Hi all, is there any api fuction that would allow me to draw a graph (its the one defined as collection of nodes and edges) when i give as input an adjacecy matrix? I'm very new to java programming so please help this n00b out ...
Hi, all.Suppose we have a rectangle of width w and height h, which has w*h square grids. At any time each grid can either be empty or be occupied by a colored square. Whenever l squares in a series (horizontal, vertical or diagonal) have the same color, we call them "connected". Note l here is ...
Im starting uni project, and im basing it on a text compression application. Ill be using data based compression and was woundering what your views on this may be, ie easier than huffman to code, what possible problems can you for see me having?thanks for the help, great ...
Hi all, does anyone know any Java implementation of Marching Cubes algorithm, for surfaces generation ? It may also be an API, free or commercial, open source or not.Thanks in advance,Monique Monteiro
hi guys. this is my first post here and i really need help.i have a vector of vectors with variable length in the 2 dimensions and i wanna get all possible combinations. let me explain with an example:0123 (columns count)152431522 6147so if i have a vector of 4 columns(elements) and each column ...
How would I find the GREATEST node to the LEFT of a particular node? (this is part of a larger question, "how do I delete a node?", but I think if I get the smaller question answered I can figure it out.)
22652 byte By
yusefia at 2007-10-2 16:24:06
DECLARE SUB RentCar ()DECLARE SUB PayBill ()DECLARE SUB Main ()DECLARE SUB ReadCarData ()DECLARE SUB FindCar ()TYPE Car' User made Type To hold Car Data CarNumber AS INTEGER License AS STRING * 8 Year AS INTEGER CarMaker AS STRING * 16 CarName AS STRING * 16 Description AS STRING * 20 ...
41062 byte By
jedra at 2007-10-2 16:24:11
' =========================================================================== ' NAME..........: C.R.S. (Car Rental System) ' VERSION.......: 1.00 ' DATE CREATED..: Monday, March 20th, 2006 ' AUTHOR........: Jared Ramkellowan ' FILE NAMES....: Customer.dat and Cars.dat in same folder as ...
I'm working on a school assignment (not intending to cheat here) that consists of implementing a graph. I have every method of the graph working properly, as best I can determine (with extensive test code), except that I cannot figure out an algorithm for doing a minimum spanning tree if the ...
helloi'm really desperate for help, i'll mention that this is homework,but i need a small guidance.i need to code a calculator,we need to use the Scanner class to break the expression to tokens(we CANNOT use other classes).my main problem is about getting those tokens from the input string.i ...
495 byte By
MAKa at 2007-10-2 16:37:56
Hi everyone,I need help on deleting an already existing quota entry in MS Windows XP. I used java to run the commands available in FSUTIL QUOTA in CMD and I was able to create and modify quota...The problem is that I cannot delete an already existing quota entry using java... I used a vbscript ...
Hi,ALLThanks for your help.There are two points with given coordinates.So, let me connect with the two points to make a line( called center Line).now, the rectangle is:(let me do assume)There are two sides which are parallel.and the distance between center Line and each parallel side is the ...
427 byte By
ruvia at 2007-10-2 16:40:53
I need an ADT that maintains a set of keys (that can be sorted - numbers for example) that implements inserting and deleting a key in O(1) time worst-case and finding a key in O(n*log(n)) time worst-case. Also, the amortized time complexity of all operations should be O(log(n)).I need a ...
does anyone know where i can a get a copy of this table from, it is ot be used within a compression application.thanks,kelvin
1038 byte By
chris0a at 2007-10-2 16:50:25
With the advent of multi-core CPUs with potentially hundreds or thousands of cores introduced over the next 10 years, I don't feel we currently have the software technology to take advantage of this hardware.Whilst the Java thread model is quite reasonable for simple multi-threaded designs, it ...
hi everyiam need help to make project by using java advance and using JDK 1.5.0my project is talke about libarary wich has books and we can lend its books and books has serial numbers,names,and classthis project by using abstract methodthanke ...
hi guys,i have a maze program that reads coordinates in from a file which is the path and then puts the walls up as well. this is all done through a 2d array. i now need a recursive solution to solve the maze.at the moment i have thisstatic void solve(int x , int y){while(currentX != goalX || ...
HI,to all experts.i am facing a problem..plzzz help we have several different modules which are .ear file..now we have to combine those modules into one a big application,and we want to add new modules also..this is one task..the other one is,we 've already delivered some modules to client.now ...
hi,ALLIf I have two given coordinates(on real earth).The distance between these two coordiantes is short(<less than 500 meters).I want to cacluates the heading.what I means:There are A points(-79.345415,43.744741) and B points(-79.345104,43.743497).If Starts A points to B Points, What is the ...
Will this work for a compression algorithm:String of ASCI charactersconvert these char's into their binary formatt 1's & 0's(consist of 8 bits)Group the binary into groups of 4 bytes(32bits),Convert each group into int values,Would thsi give a good compression ratio, how do i go about ...
Hi all, The purpose of this program is listed in // Inputs the miles driven and gallons used (both integers) for each tankful.// Calculates and displays miles per gallon obtained for each tankful and print// the combined miles per gallon obtained for all tankfuls up to this point.// All results ...
1214 byte By
abhi73a at 2007-10-2 17:04:09
Hi, I have a mapping of zip codes and cities that are used by my application. Note a city can have many zip codes and a zip code can be in more than one city. Also in my application we maintain a preference of use of a zip code within a city and the city within the zip code. This information is ...
Hi.How can i find word in text file and add some other word in front of the founded, for example:"text1 text2 text3, text4" and before text1 i want to put <data> and behind text4 </data>, i need to create xml file from txt, and save to xml file. Thanks ...
1106 byte By
Salamaa at 2007-10-2 17:07:08
Hello, I wrote an algorithm to spilt an text image into line images using the image histogram of the text image, I need your comments and suggestions to make it works better.Here is the steps:1. Read an text image. http://nomatterwhat.jeeran.com/image.jpg2. Get the image horizontal ...
Could someone help me a little problem i am having with the double that appears most, I already have the occurences showing and a histogram but am unsure as to how to display the most frequent double(s), my code so far is:import cs1.*;import java.util.*; public class TestDice {public static ...
Hi!I've got code which changed text from BufferedReader and save in another txt file, thats the sample of the text from txt filesome text one, two, 3,4...another line of textand another some text one, two, 3,4...another line of textand another .....some text one, two, 3,4........another line ...
1193 byte By
Steve_wa at 2007-10-2 17:15:28
Hi,I am having a bit of a problem and would love some pointers. This is what I need to do:I need to create a bi-directional graph. The nodes are cities, the links are roads. The data is read in from a text file, and I have classes for the cities and the roads. I am currently storing all of the ...
I need to:Develop a program that uses recursion to create all permutations of a string argument and prints the permutations, one permutation per line. The string argument must be supplied as the first argument of the program execution call.If an argument is not supplied whenever the program is ...
I am half way through a project and I have a design issue. I need my Java program to generate a html page. I have designed a servlet that will do this for me. It basically takes input from a file and generates the html page. The html file is expected to be different each time as the input from ...