Using the JAI I am able to convert .tif images to jpg without issue. Now that I have the jpg, I need to convert it to Base64 to transport via XML. Is there a standard way of doing this? I'll look at Open Source, and packages if necessary, but would prefer not.Thanks.
1128 byte By
apcssa at 2007-9-30 2:25:38
public void insert(int id, int inv){ Object value = new Item (id, inv);DoublyListNode temp = new DoublyListNode(null, value, null); if (size == 0) addLast(value); else {DoublyListNode p = first; while ((p != null) && (((Item)p.getValue()).compareTo(value)) > 0) {p = p.getNext(); }if ...
1217 byte By
tabz123 at 2007-9-30 2:27:05
Hello everyone. Im a bit of a algorithms newbie- forgive me if this a basic question. Im trying to compare 2 many branching trees to check if they are the same. Im checking the data item in each tree to the other one, and the length of the branch if it is the same. The method returns true if ...
Hi guys;for those raedy to rise challenges i present this problem... Any ideas to solve it are welcomed..some code would be a generous action from your part... SHUTTLE PUZZLE The SHUTTLE PUZZLE of size 3 consists of 3 white marbles, 3 black marbles, and a strip of wood with 7 holes. The marbles ...
I have objects that are composed of multiple rows in my database. In order to determine whether on object meets criteria, I allow my users to specify formulas during their search, such that they might say "give me all objects where condition one is X and condition two is Y, OR condition one is ...
3303 byte By
blimblob at 2007-9-30 2:40:03
I have to write a very simple LZW algorithm based on the following psuedocode as part of my final year thesis.1. word=" ";2. while not end_of_filex=read_next_character;if word + x is in the dictionary word = word + xelse output the dictionary index for word; add word + x to the dictionary;word ...
468 byte By
scifo at 2007-9-30 2:40:49
Hi,I am looking for an algoritm that traverse a Jtree and display all the possible combinations of treenodesfe.root-A-1 -1_1 -1_2-2-B-3-4a want to create an output like thisABA,BA,1A,2A,1,2B,3B,4B,3,4A,B,3A,B,4A,B,3,4........but i cannot figure out how to do thisgreetings ...
667 byte By
ash_mod2 at 2007-9-30 2:48:22
Dears,The problem of generating unique hashcode for an object instance has been quested a lot, I need help in an object that depend on 2 integers as I try to represent a finite state machine so I need an initial state and transition to give me the future state, thats how I thought about it.My ...
Anyone know if a v42bis data compression library has been developed in Java, either free or for purchase?Please email me directly at marktjm (at) yahoo (dot) com.Thanks,Mark
Hi i'm currently struggling on a problem!i'm writing a program that will create a range of IP Addresses given a start and finish address.So far i'm using a nested 'For Statement' shown below!if( (A > 127) && (A < 192) ){ServerDialog.append("\nClass B Network");for(i=C; ...
727 byte By
s3nghly at 2007-9-30 2:56:48
Hi there, im looking for a way to refactor Java code, i've developed a syntax highlighter using ostermiller, and it basically reads in a java file, colors it, puts it into a document, and then that document goes into a JTextArea.But if the whole of the java code is one one line, eg. public ...
253 byte By
Techno1 at 2007-9-30 2:57:28
hi there, i am new to this and really need simple easy to understand help please.what is the shunting algorithm and how does it work? please explain to me in a nice and easy to understand words. i would appreciate this.Thanks
hallo everyone!here is a function i have to implement .public static Skyline merge(Skyline skyline1, Skyline skyline2){} Skyline is an class that contains two constructors;1) a constructor with three parameters (left,right,height)2) a constructor with one parameters (int[] coords)the question ...
Hello,I am writing a basic Image processing system, which reads an grayscale image, stores the pixels in an 2 dimensional array, then writes the array back to an bufferedimage for writing to file . I felt the bufferedimage was too slow to processing.I discovered, when coping the bufferedimage ...
Where can I find Gauss Elimination algorithm in java ?
3941 byte By
rkippen at 2007-9-30 3:13:36
I'm looking for the fastest replace method that does a simple substitution based on a left to right scan.Of the following, so far replace2 is the fastest:public class Replace { public static void main(String[] args) {StringBuffer sb = new StringBuffer(); long time = System.currentTimeMillis(); ...
Friends,I have come across a situation where the checksum provided by the Class Adler32 from the java.utils.zip package returns a value which does'nt match the checksum generated by C++ counterpart for the same string.Initially I thought it was the problem with the C++ implementation but after ...
716 byte By
Techno1 at 2007-9-30 3:18:19
Hi there. I have a coursework handed out - before you think anythin i am NOT asking for the answer - i would love to but things dont work out like that.:)I DO NEED YOUR HELP :)basicaly, i need to make a program that evaluates some input expression (maths nos. 1-9 +*-/() )and evaluate it using ...
2115 byte By
fedetxf at 2007-9-30 3:24:03
I had this code:static int byteToInt(byte x, byte y, byte z, byte w) {int xx = (int) x;int yy = (int) y << 8;int zz = (int) z << 16;int ww = (int) w << 24;return xx + yy + zz + ww;} static byte[] intToByte(int x) {int xMask = 0x000000ff;int yMask = 0x0000ff00;int zMask = ...
275 byte By
harras2 at 2007-9-30 3:25:37
I am trying to find the smallest number of iterations required to produce a value to a client defined precision. I have working code with a brute force solution, but need to optimise for when high precision required. What is best algorithm for this?haras
1066 byte By
zcox456 at 2007-9-30 3:26:32
Here's a (hopefully) interesting problem I though I'd submit to the Algorithms forum.Given a set of doubles (double[], Collection of Double objects, etc.), create a corresponding set of Strings such that: - each String is the text representation of one double - the Strings have a fixed but ...
Hi guys, this is my first post here, adn I'm taking first level Java. I just recently wrote this code and at first it had 2 errors which i was finally able to debug, and made a clean compile. But now when i run it, it always gives me a zero output. Hope you can enlighten me. I know this code ...
HiI am developing an application, which when loaded allows you to specify a directory, the app then searches that dir for jpgs, gifs, etc, and then displays them in a slideshow, that has a next button and previous button at the bottom. So far I have created a slideshow app that shows ...
hello, Can any one help me to sort out the problem i having, I have a set of points which form one cloud(cluster) and another set of points(cloud), i want to find the shortest distance of each point in first cloud to all the points in second set(cloud)using dynamic search , for example . . ...
hi,I am trying to write an applet that draw a simple spiral point by point ( g.drawLine (x,y,x,y);)I was thinking it was quite simple, but now I don't think so!please, can you help me? eml
899 byte By
qotsa at 2007-9-30 3:39:57
I've read other topics on this subject but they dont quite answer my question.I'm working on a project to create a guitar tuner for a pc. The idea is to take input of a note through the mic and indicate whether it should be tuned up or down. I pluck a guitar string into the mic and read the ...
526 byte By
ChrisJY at 2007-9-30 3:46:09
Put simply, I want to implement a "bag" data structure. So, when i select an item I don't know which one i'm going to get. I want to be able to select all the items once (so no replacing of items i.e. selecting the same item twice in one session).I can think of ways to implement it using ...
2277 byte By
wyrzy at 2007-9-30 3:49:01
I've been looking for a way to implement the Radix Exchange Sort in a Java app to sort a simple array. I'm having a little trouble understanding the code behind the algorithm. I know that the Radix Exchange Sort is set up like the QuickSort, but I was wondering if anyone can tell me how to ...
Does anyone have a good insight into how to make a regex-based tokenizer? I have a set of regular expressions that describe each of the possible tokens, and I'd like to tokenize a string using them.Obviously, I could just scan through the string, repeatedly trying each regex until one matched. ...
545 byte By
Ricky_s at 2007-9-30 3:50:36
Hi!This is my first post!For my dissertation, i am animating algorithms in Java (sorting, geometric etc) and I need to animate the algorithms step by step, and was wondering how it is possible to 'slow the algorithm down' so that it can actually be seen on my canvas!? I have also began ...
931 byte By
oldmicah at 2007-9-30 3:51:00
I'm writing a small shareware app that I would ideally like people to register. This is the classic, if they send in the registration code 'xxxxxx', then I can send the unlock code 'YYYYY' situation.Three criteria:1) I would like the registrtaion code xxxxx to be unique. I am toying with ...
Hi there,I having Sorted Array of Words withabout 1,00,000 Words.In present i am using Binary Search Method to Find Word. but it is giving stranger Resutls some time.Is there any faster Algorithem to Find Specicif Word index from Sorted List.Rem: At a Part of Application i am displaying Results ...
242 byte By
Hidwulf at 2007-9-30 4:03:46
Hello ... i just want to create or convert a png (or jpeg) image to a vectorial image. Or to create directly a vectorial image from a database in mysql where the data is stored, because it's a graphic.Please help me ....
I've met a loop implementation what was strange for me at the first time, because its against my natural logic.A., for (int i = a.size(); i-- > 0;) I was told it should be more effective, because there is just one function call at the initialization and nothing in the test part.I wonder if ...
Hi GuysI am trying to create and algorithm which allows me to retrieve a list of Customers from my Database in lots of 5 (as in my Code below specified as formatNo). Currently the Code below will display the list of Customer in lots of 5 and the page number showing 1| 2| 3| 4| 5| 6| 7| 8| etc. ...
I'm trying to make an algorithm that writes the following: 10 21 32 43 53 64 75 86 9610711812913914 1015 1116 1217 1218 1319 1420 15 The numer to the left is just a counter. The number to the right is a variable that counts upwardsbased on the counter.Anyone got any nifty ideas? And, before ...
461 byte By
itim100 at 2007-9-30 4:09:22
I need to parse an equation as a String to a Boolean; say i need a method parseEQ():parseEQ( "2x+3z == 16*y" )would return true or false, and the variables are doubles that i have defined.How could i go about doing this? I realize it is difficult, and i looked for examples, but what i find is ...
3840 byte By
cybotx at 2007-9-30 4:14:16
[nobr]Anyone think this is a good way to accomplish this task? Anyone see improvements or better way to do this? /*** Wrap text at a certain line length. Default line break character is HTML <BR>** @param string The String* @param lineLength The position to create a line break** @return ...
1244 byte By
Wan-Hi at 2007-9-30 4:17:44
Hi.I'm trying to implement a class that can read ID3v2 tags from MP3 files. The id3.org site seems to be the only source on the net where you can get information about the organisaton of ID3 tags.Unfortunately I haven't worked with bit operations before and get quite confused about the fact ...
6496 byte By
rkippen at 2007-9-30 4:18:09
I want one point to be attracted to a second point such that the one point moves in a visually smooth way to the second point. The second point may change in location. The point only has to move along a horizontal line. Here is the code so far, but the termination condition doesn't work when ...
702 byte By
AndyJoel at 2007-9-30 4:19:35
I am wanting to compare two strings to see if they are NEARLY equal, i.e. a user has given some input, and I want to compare it against a known String, and see if they are the same, but to allow for bad spelling. The result would be a score, say out of 100, something like:nearlyEquals("Some ...
1242 byte By
joiaknla at 2007-9-30 4:25:22
hii, i'm doing a program that's supposed to printOut a tree using iterative inOrder and with a self created Stack.so i created a ListStackclass ListStack{private java.util.LinkedList list;public ListStack(){list = new java.util.LinkedList();}public boolean isEmpty(){return ...
338 byte By
clemort at 2007-9-30 4:26:58
Hi,I have two histograms. Sometime first one has points above second one, and sometimes below second one.My need is to merge the histograms together so as to get the encapsulating histogram.Does anyone knows an algorithm or a library so as to merge the two histograms ?Any idea is welcomed ...
223 byte By
aviadmo at 2007-9-30 4:28:27
i'm loking for an O(nlgn) algorithm for finding the convex hull of a set of circles with different radiithe algorithm i found is O(nh) when h is the number of output circles on the convex bounds
I am fairly new to Java and am currently looking into Data structures, algorithms etc...I have designed a very basic ADT (Abstract Data Type) class called Loan which contains the following private instance variables 'loanNo, copyNo, membershipNo, dateDueBack, totalFines'.Basically I am trying ...
828 byte By
mathuoa at 2007-9-30 4:40:03
Hi, The analysis of the following problem is "a bit difficult", speaking in terms of theory. What I am searching for is not a theoretical result, but a way to compute the solution. A cayley table is a table with the property that no row or collumn has the same element twice.e.g. 1 22 1is a ...
I'm using 2D an array to represent the graph in first process I?m getting the minimum value but I have problem in 2ned process I?m getting again same value which I got it in first loop.I?m using Boolean Known [ ] array to check if it passed to node or not if (!known[k] && d[k]<m) { ...
i'm interested in knowing how to zip and unzip files in java....can you help
1005 byte By
kentkent at 2007-9-30 4:51:12
Hi-yaI want to detect when a web page has changed. To the best of my knowledge the last modified query on a web server is not req'd and also when implemented not accurate as to the real content. This problem addresses the problem of dynamic web pages that are served up and the names are ...
Hi,Does anyone know code for the Brute Force Matching Alg in Java? I've worked out Knuth Morris Pratt and Boyer Moore but cant get around Brute Force.Thanks