4232 byte By
asjfa at 2007-9-29 23:35:58
hi, for the zip algorithm in java.util.zip doessize(zip(A) + zip(B))==approxsize(zip(A+B))?I've run the code below on a few directories of a couple of thousand files and the results seem to more or less say yes. This seems surprising because I'd expected zip(A+B) to be able to compress more ...
I need some advises to improve my search algorithm.What I want to do is parse a file containing int values.I'm searching the first maximum/minimum value, so when there are two or more max/min values only the first one should be stored. Moreover I want to save the pointer position of the ...
Can anybody help me in a validating a email address without using Java mail API.the validations must include apart from syntax checking it should also have domain validation.
283 byte By
HolgerKa at 2007-9-29 23:41:19
Hi there,is there a way to shrink a jpeg image faster as by Image.createScaledInstance?I only need integer rate scaling.(Scaling a digital image from CF(2048) to 512 takes >20sec on my Zaurus which is way to slow.)Regards Holger Klawitter
525 byte By
joel24a at 2007-9-29 23:42:45
Hi, I'm trying to research Graph Layout to find some algorithms. I basically have to assign geometric data to some lines and nodes as part of an electrical system.I'm not necessarily looking for code, but perhaps pseudo code or algorithms which would help me generate a graph which could be ...
hi,not sure if "Algorithms" is the right forum for this but here it goes.I did some testing of Math.pow(x, 1.0d/3.0d) vs. Math.exp(1.0d/3.0d*Math.log(x)) for speed of computing cube roots. I found that the exp/log method takes about 2/3's of the time of the pow method.But I find it hard to ...
353 byte By
namanca at 2007-9-29 23:47:45
I want to recognize objects in the image (jpg, bmp etc). For example I want to recognize flight object (it is in any angle or scaled or transformed) from the image. I started with edge detection and now I don't how to proceed with this. Can anyone help me. If you have any website links pls ...
I have to stem a string based upon a list found on the database table (pretty long...about 175,000 rows)the databasetable examplewordalternative (where "|" is a deliminator)=============================java bean java cofee bean|java ground beanStringStringBuffer|StringTokenizer|String that is ...
want use dijkstra al gorithm to finde shoterst distance between two Nodes .If I'll go from node 1 to node 2 in matrix must go through node 3 , will be from 1 to 3 then 3 to 2 but i'm stuckin this part i went trough breadth first search it;s difficult to use it in matrix it's ok for graph.so ...
hello,im stumped to find an algorithm on how i can get a username by using a server/client connection. wait, let me rephrase that - i have made a server which supports multi clients. the client part loads up a gui chat app and connectes to the server. my question is how do i get the server to ...
I need help for understanding Arden's Lemma.Please help me.Thank you.This is Question:Assume that A, B are two languages with e(stands for empty) is not included in A, and X is a language satisfying the relation X = AX (union) B. Then, X = A*B.I can not understand this ...
Any ideas on the best complexity time for doing the following:Given an array A and an array B I want to sort the elements in array B based on their order in array A.E.g. Array A = [101, 240. 4, 16]Array B = [16, 4, 240, 101]I would like to return Array B in the following order : Array B = [101, ...
Hai,I want to know the use of integration & Differentiation in maths. They really used in what type of situations. I want to know it because now I am doing image processing project, in image processing there are lot and lots of integration and differentiation formulas are used. So can ...
756 byte By
binb9a at 2007-9-30 0:29:06
Hi..i m working in a project for school. Everything is fine but i am unable to find out a way to automatically create a time table for all the classes. The requirement is something like...administrator will make a collection of teachers and classes. Then my alogrithm is supposed to make a ...
838 byte By
Mordana at 2007-9-30 0:47:36
Hey,we all know Strings are memory hungry. So instead of storing Strings why not storing a long value (could be in a byte, short, integer).For that we need a bijective function between the two sets (String set and long set)Since Long values are bounded, the String set will also be bounded. We ...
hello1. A cost-map contains M*N cells, we have the cost rate for each individual cell. 2. The path is defined as a sequence of cells that connect to each other directly. 3. If two cells are in the same row or column, and there is no cell between them, these two cells are defined as directly ...
i have a ArrayList of string arrays with following type of datau1d11tu1d12fu1d13tu1d24fu1d25tu2d16fu2d17 tu2d28fwhat is the most efficeint logic to generate html table for this data with all reepeated values are merged (using <td rowspan> ...
I am just starting Java programming and need to develop a simple algorithm for this problem:Given the following assignment statement:String phrase="Olympic medal winners";String word="nne";Indicate whether the collection of letters in string variable word exists within the phrase. If it does, ...
The following codes contains one algorithm where the Java Collection classes seem to be insufficient. There are comments in the code that (hopefully) explain my reasoning. I am sure there are other cases where similar solutions are needed. I would like comments from the community before I put ...
Does anyone know how to use Hierholzers Algorithm to find a Euler tour of a graph with Java?Or anyone know of any sites that contain a program that already does this?Thanx
245 byte By
obusemea at 2007-9-30 1:03:40
I'm looking for some Java source code, libraries, APIs, or an easily translatable algorithm that will encode an uncompressed audio file into the Advanced Audio Coding format. Anyone know of where to look or how to start?Thank you.
Hi, I wish someone can help. Im really bad in recursion.I am supposed to solve this program using recursion. Input is a String, say "abcd". and Im supposed to get the output as all the possible sets of {a,b,c,d}.the output should b:// this is an empty line for null ...
241 byte By
joel24a at 2007-9-30 1:09:55
Does anyone know where I can find pseudocode for this? I've found code, but I want to come up with my own. I've been told this algorithm is not too difficult, but I'm not having any luck searching for pseudocode.Please help!
417 byte By
@miryaa at 2007-9-30 1:12:33
I need to write a random generator, not for normal distribution only but for any distribution function. That function can be a black-box distribution function, or that can be a table [ x | f(x) ]. For those not familiar with this term, distribution function is f(x) that returns the posibility ...
3048 byte By
KAMPOSa at 2007-9-30 1:18:50
Hi, im using a 3DES key written in a servlet to generate a key and to encrypt a string before it can be put in the database. ALong with that string i also put the session key in the database table. However when i want to view that string i need to use the same sessionkey that was used to ...
What are the algorithms used by the collections.
I am new in Java Currently i am trying to develop an application that need to cut a portion of a map(whole map is a jpg file). Can anyone know how to do it? I havetried to figure it for weeks but still dun have any idea. Thanks in advance!
2026 byte By
nbalpmma at 2007-9-30 1:21:20
Hi,I have posted the following to "General Programming" without success, maybe people here could be more helpful. Sorry for the inconvenience.-- -- --I need to port some C++ code to Java. I cannot copy it here, but I think it is not important.It is scientific computation, namely computation of ...
183 byte By
feisesra at 2007-9-30 1:23:34
how do I access elements from a list and assign each one to a BigInteger variable.The list contains three values and I want to print each one individually to the screen. thanks
Hi,Is it possible to resize an array of objects ? I create an array of 10000 objets. But I need ,after more calculations , only 8000 objects. Is it possible to resize the original array without create another array and copy the original in the new array ?Thank you for your ...
Anyone have an code example on CropImageFilter in java.awt.image?I need it urgently ! thanks
Can anybody help me in this case:Suppose a file is getting stored in a folder and at the same time it is also being copied, now the question is if the file is getting stored at that moment I do not want copy that file but other files which are already stored will get copied to another ...
1524 byte By
brettsga at 2007-9-30 1:35:54
I need to print out a graphical representation of a binary search tree. Here is the source code I'm working with but it doesn't display the children correctly sometimes, especially with large trees.Stack globalStack = new Stack();globalStack.push(root);int nBlanks = 32;boolean isRowEmpty = ...
Hi,I want to convert rgb color to cmyk.I used this code but the result is an image too bright:int k = Math.min(Math.min(r,g),b);int div = (255-k);int c = div!=0 ? (255 - (255*r)/div) : 0;c = c < 0 ? 0 : c;int m = div!=0 ? (255 - (255*g)/div) : 0;m = m < 0 ? 0 : m;int y = div!=0 ? (255 - ...
Can anybody help me in comparing the date and time in this format mm/dd/yyy hh:mm:ss
Method which tells the file is locked by Operating system in java
204 byte By
simbra1a at 2007-9-30 1:37:13
i am creating a card game and i was wondering how i would use the shuffle method to shuffle the cards(Jbuttons) around or is that not applicable. Can anyone give me an idea of how i would do this.
327 byte By
simbra1a at 2007-9-30 1:37:15
i am creating a game where the child is required to sort card(Jbuttons) into alphabetical order. As the letters on the cards are imageIcons how would i ensure that when a child selects a letter(button) that it appears at the bottom of the panel if it next in alphabetical order otherwise there ...
181 byte By
feisesra at 2007-9-30 1:37:52
When using the method 'pow' for BigInteger, I have to pass in an int value, pow(int exponent) but I'm working with a BigInteger. is there any way around this?cheers
Does anyone know a good book for studying algorithms in java?
I've been compressing my files for a long time, and the one thing that I immediately notice is that after one (or two) compressions, WinRAR or WinZip couldn't compress an already compressed file any further. At first, I ignored it because it didn't seem important to me, but after some time, ...
516 byte By
simbra1a at 2007-9-30 1:43:17
Hi,i want this random method to select two same numbers from the numbers between 1-10.That is i want number 1 to be randomly selected twice and number 2 to be selected twice and so on. does anyone know how i could do this. im[cd]=Rand();private String Rand() {int rawRandomNumber=0;int min = ...
Hi guys,i'm trying to find an Algorithm to solve the problem of closed fence..a closed fence is a sequence of points of cordinates xi,yi in the plan in counter clockwise direction..a valid fence is one that has no intersections: it means that each segment xi,yi xj,yj should not intersect ...
194 byte By
zauza at 2007-9-30 1:54:56
Hi,I'm looking for an algorithm for the rotation of an image. I don't have to loose informations, neither deform yhe image.Thanks a lot for your help, I'm lostZauz
280 byte By
clearmea at 2007-9-30 1:55:20
Hi everybody,Can any body direct me to a link from where i can get information regarding how to implement(logic) key depression pattern.plz note that i want to know how to implement and not just general information regarding key depression pattern.Thank you.
Hi folks. I figured two basic ways of how to compute the angle of two vectors that share one common point.The one uses the "law of cosine", deriving from Pythagoras' triangle-stuff, the other uses the dot and cross product of both vectors.My problem is now, that I cannot decide which one to ...
hican anyone plz tell me an algorithm for locking documents. by this i mean that for example if there is a file named A and two developers working on a network X and Y. If X is using the documnet A, it has to become read only for Y
2833 byte By
bbatmana at 2007-9-30 2:06:50
java.util.Random offers the nextDouble method, which returns a uniformly distributed double value in the interval [0.0, 1.0). This means that every possible double value from 0.0 (inclusive) to 1.0 (exclusive) is supposed to be equally likely to be returned.But how can you get a uniformly ...
Hi,in one of our old classes i found a very dumb way to remove every '\r' from an outputstream, the last programmer just overwrote the write method and made a if(b!= '\r') write(b) out of it, you could guess thats a very stupid thing to do. A 10 MB stream would take like 2 - 3 minutes.Now i ...
I need to be able to display polygons with holes. Looking around the web I think I need an extended version of Seidel's algorithm for triangulating polygons extended for polygons with holes. I have found some source which I think does this, but it is in C and looks quite complex. Does anyone ...