Standard Algorithms in Java

Hello everone,
does someone of you know a collection of standard algorithms programmed in Java where you can download the examples
(a kind of library or documentation)
We are trying to standardize our code (e.g. complex loops and conditions) and this would be a great help!
thanks a lot
Julian

hi,
sorry for the misty question.
I searched of the solution of quite common programming
problems .
meant to find something like that but it should be a little
bit more complex:
http://www.acknowledge.co.uk/snippets/java/docs/
thank you
Julian

Similar Messages

  • Enhance Standard Mappings(xslt/java)

    As part of the SNC 7.0 components for PI. We get a bunch of standard content.
    This includes standard operational mappings between ECC IDocs and SNC Proxy structures.
    Our requirement involves enhancing the IDocs and proxy's with new fields and mapping the same in PI.
    Is there anyway to do this without editing the standard mapping code(java or xslt)?
    Thanks,
    Harsh

    Thanks all for your responses. As pointed out, the problem with copy or direct edit is that the SAP will no longer support the mapping code it provided. So I may add only two lines to the standard code, but what if the other 1000 lines have a bug?
    I'm trying to figure out if there is an elegant way to add-on without modifying the code.
    If not, then are there any recommended ways to go about editing the code? Any help on this would be much appreciated!
    Thanks,
    Harsh
    PS:  Some of the standard mappings are in xslt and others in Java.

  • Data Structures and Algorithms in java book

    Hi guys,
    I want to know a good book which is good for Data Structures and Algorithms in java. I am good at Core java but a beginner for Data Structures in Java. I am a little poor in Data Structures concepts.
    Following are the books I have found on the net. Could you help me the choose the best outta them.
    1. Data Structures and Algorithms in Java - Mitchell Waite
    2. Data Structures in Java - Sandra Anderson
    3. Fundamentals of OOP and Data Structures in Java - Richard Weiner & Lewis J. Pinson
    4. Object Oriented Data Structures Using Java - Nell Dale, Daniel T. Joyce, Chip Weems

    lieni wrote:
    I good data structures book doesn't have to be language-specific.Thx DrLazlo, my speachYes.
    The OP wrote:
    I have access to these books and dont know which one to start with.What I meant is that you shouldn't narrow your search to insist that the book you choose have "Java" in the title.

  • Classify and cluster documents with algorithm in java

    Hello everybody,
    I want to classify and cluster, let's say, 100 documents which are on the Intranet.
    I was thinking of including an algorithm in java who can do this.
    But i have no clue where to start of where to begin.
    Please give me some advice or maybe an example ;),
    Greetings,
    Thijs Leusink
    [email protected]

    I was thinking of including an algorithm in java who
    can do this.
    But i have no clue where to start of where to begin.Two steps:
    1. Find an algorithm that can do what you want.
    2. Write it in Java.
    Start with the first step: if you haven't done that yet, I don't think we can help you here. Possibly you could use Google to find an algorithm.
    Then go on to the next step: if you don't even know how to begin writing a Java program then there is a collection of introductory tutorials here:
    http://java.sun.com/docs/books/tutorial/
    If you are having problems after that, come back here and ask a specific question.

  • Quasi Newton Optimization Algorithm in Java

    I need to implement Quasi Newton Optimization Algorithm in Java, I�ve found it in C. Can anyone help me to find this in Java?

    Plagiarise in British English. Plagiarize in American English.
    These forums are used internationally, so either is reasonable.
    Don't correct other people's spelling unless you're really sure of your ground.

  • Duplicating wincrypt algorithm in JAVA

    Here is the background on this project: I am creating an automated licensing system for a company that sells telco products. Until now, they have been manually generating the activation keys using an exe program developed in house.
    I have been hired to remove some of the manual interaction required from the employees, one of which is to automatically generate these activation keys. I emailed the developer of their exe about the algorithm he was using to generate the activation keys (based on serial number and hardware ID) because I need to duplicate that server-side. He said it probably wouldn't be possible because his program relies on wincrypt.
    So my question is this: Is there any way at all to duplicate the wincrypt algorithm in JAVA? because i dont need that system to based on WINCRYPT, and using wincrypt.h will bound the user to have that file. I need to duplicate the wincrypt functionality exactly. Being off by even a little bit would render the script useless as it would generate invalid keys...
    If anyone has any insight, I would love to hear it.
    Sarwat
    Edited by: Curgol on Jun 25, 2009 6:54 AM

    Curgol wrote:
    So you are saying that by using JCA/JCE i can have the same functionality that is being provided by wincrypt ?? i can implement the same encryption and decryption algorithm without being dependent on wincrypt.h and associated files ??
    I know JCA/JCE packages provides encryption/decryption tools, but the problem is that i dont have any idea how wincrypt encrypt files, have it's cpp files though, but can the wincrypt functionality impolemented in JAVA ??.
    Wincrypt from Microsoft is a library of hundreds of encryption related functions. The JCE defines an interface that providers provide implementations for. Just about everything in Wincrypt is available though one or more of the JCE providers.
    There is no one encryption method provided by Wincrypt. If you are trying to match in Java an existing cryptographic process implemented using Wincrypt then you need to know exactly which of the Wincrypt algorithms (cipher, block mode, padding, key generation etc etc etc) is being used. Without this knowledge you are stuffed.

  • Different algorithms in Java

    What are the different algorithms in Java? Can someone list me each and its uses?

    Genetic Algorithm Method to Count Elephants:
    Have lots of babies. Wait till they're sixteen and
    throw them into Africa telling them to count
    elephants. After 1 year, have a family reunion and
    ask them to tell you how many they saw. Kill all the
    ones that didn't count as many as some threshold.
    Have the surviors have lots of kids, with each other.
    Have them repeat the process. Keep it up and it'll
    l converge to the right number, as long as they don't
    die from a horrible genetic disease.
    A. I don't think I can have babies. No uterus found. Pls advise.
    B. Your fitness function doesn't guarantee that your babies are counting unique elephants. Its not much help if your kids count the same elephant 1 billion times.

  • Announce: Generic Algorithms for Java, 0.3 release

    The latest release of jga: Generic Algorithms for Java is now available at
    http://jga.sf.net/
    Included in this release are a collection of algorithms adapted from STL that operate over generic collections and iterations. What's included are the algorithms that do not attempt to modify the collection/iteration that they're given: in other words, all of the find/search/count algorithms. Also included are the complete set of functors and predicates that were present in the last release, with a few modifications for easier use.
    The library is released under the LGPL, and includes the source for the library, the test framework, and a non-genericized version of the test framework that verifies that the library may be used without having the generic environment available.

    A (similar, it seems) parameterized collections library for JSR-14 Java.I had looked at JUtil some time ago, and I'm not sure of the similarity: JUtil looks to provide a number of interesting (if somewhat specialized) collections. JGA provides functors & predicates, and STL-ish algorithms that operate on collections and iterators. Looks to me to be more complimentary than similar.
    Mr. Ananian/Astaire's site is also the source of SinjDoc, the javadoc tool that I used to generate the javadoc at jga.sf.net, and with which I replaced the munge4doc.pl and mungedoclist.pl scripts that I had previously used and posted on this forum.

  • El Gamal Algorithm and Java problem

    I was trying to implement the El Gamal algorithm in java, but the problem is with the last part. I'm not getting the value of Message but according to algorithm i should get the value of message. Can anyone please tell me what did i do wrong?
    theory says, msg = x * (z^a)modInverse(p);
    import java.math.BigInteger;
    import java.math.*;
    import java.util.*;
    class ElGamel
         public static void main(String[] args)
              BigInteger p = new BigInteger("7747");
              BigInteger q = new BigInteger("3853");
              BigInteger a = new BigInteger("773");
              BigInteger k = new BigInteger("1193");
              BigInteger msg = new BigInteger("39");
              BigInteger y = new BigInteger("0");
              BigInteger x = new BigInteger("0");
              BigInteger z = new BigInteger("0");
              BigInteger temp = new BigInteger("0");
              BigInteger t2 = new BigInteger("0");
              int t1 = 0;
              y = q.modPow(a,p);
              System.out.println("Y is "+y);
              x = q.modPow(k,p);
              System.out.println("X is "+x);
              t1 = k.intValue();
              z = (msg.multiply(y.pow(t1))).mod(p);
              System.out.println("Z is "+z);
              t1 = a.intValue();
              x = x.pow(t1);
              temp = x.modInverse(p);
              msg = z.multiply(temp);
              System.out.println("Message is "+msg);
    }

    Reposting your code with markup. In future please use [code] tags, as you can see the effect it has on legibility: import java.math.BigInteger;
    import java.math.*;
    import java.util.*;
    class ElGamel
        public static void main(String[] args)
            BigInteger p = new BigInteger("7747");
            BigInteger q = new BigInteger("3853");
            BigInteger a = new BigInteger("773");
            BigInteger k = new BigInteger("1193");
            BigInteger msg = new BigInteger("39");
            BigInteger y = new BigInteger("0");
            BigInteger x = new BigInteger("0");
            BigInteger z = new BigInteger("0");
            BigInteger temp = new BigInteger("0");
            BigInteger t2 = new BigInteger("0");
            int t1 = 0;
            y = q.modPow(a,p);
            System.out.println("Y is "+y);
            x = q.modPow(k,p);
            System.out.println("X is "+x);
            t1 = k.intValue();
            z = (msg.multiply(y.pow(t1))).mod(p);
            System.out.println("Z is "+z);
            t1 = a.intValue();
            x = x.pow(t1);
            temp = x.modInverse(p);
            msg = z.multiply(temp);
            System.out.println("Message is "+msg);
    }

  • Standard Report Headings,  JAVA script usage,and  Report field fixed width

    My company has purchased Crystal Reports 2008 and I'm in the process of determining if the product will do everything we need and not become a maintenance nitemare. 
    We would like to setup some standard report headings to be used in all reports.  I've setup on already as a SUBREPORT and it works fine. We pass optional parameters that may be blank.
    We have several questions:
    1) Subreport...Once a SUBREPORT is setup as a standard heading and included in multiple reports, we are concerned about what is required if the standard heading subreport changes.  Will each report that uses this need to be opened or handled in any way to pickup the subreport changes?  Any suggestions how to handle this?
    2) Subreport....In order to get the "PAGE N of M" to work in the subreport we've setup the subreport to accept parameters that are passed from the main report and this works fine.  But this requires every report using the standard heading to setup the parameters in order to work.  Is there any other way that would minimize the setup needed for a standard heading?
    3) JAVA...  Can we call a Javascript function? If so, any hints/tips on how/where to do this?
    4) Standard Report... Creating the report is difficult with guessing the width to define to the field.  Is there a way that the report can know and display the exact size of the field being used?  A fixed field defininiton of some sort would make it MUCH easier in the layout of the report.
    5) Standard Report...We are currently testing with a stored procedure for the SQL query result data but because of the application we will need to build the query dynamically for every report.  Is there a way to bind the data and specify the field lengths? 
    6) Standard Report...When using a defined file structure I needed to add another field.  At the time it seemed like I had to start from scratch as the fields that were on the report were now gone.  Is there a update method that can be done import the changes and not loose existing fields on a report? 
    That all for now.  Sorry there are so many questions.  We are trying to clear up as many issues as we can before starting the 100+ reports needed.
    Thanks in advance.

    Hi Vitaly Izmaylov,
    I've taken your advice and split out questions 2-6 into seperate questions.  Anyone else please respond only to question 1 here. 
    I see the Re-Import subreport option....and I guess I can only assume that this means that any change to a report heading file (subreport) must be manually re-imported into every report it is used in.  There are no behind the scenes files or table that maintain a usage of these reports and can automate the population of the changes.
    I was hoping that maybe the subreports would be accessed when called for an pickup any new changes.  So if I create 100 reports with standard heading subreport, I would need to manually open and re-import that file in each report to update a report heading change.
    Does not sound real fun.
    Is all this true?
    Thanks,
    Tim

  • Oracle 11g Standard Edition + Locator Java API

    We have Oracle 11g Standard which includes the Oracle Locator package, but not the Oracle Spatial.
    I would like to use the Oracle® Spatial Java API in my java code, but am unsure of the licensing implications of this.
    I require some form of java api in order to access the geomettry objects stored in the database. Oracle do not allow the download of the java files seperately. I was unable to find any reference to a 'Oracle Locator Java API'
    Could someone let me know what exists in terms of Java API's, what i am entitled to use under the current licensing rules, and where I can download the necessary source/jar files?

    Thanks for letting me know the location of the jar files, that will at least help me get things going.
    I am still concerned about licensing issues, as your reply appears to contradict itself:
    "There is no licensing issues if you just want to use Oracle Spatial Java API(sdoapi.jar) with your spatial data in the Oracle 11g Standard DB."
    and
    "You cannot use some oracle spatial features (PL/SQL packages and their java APIs) in the standard edition."
    I could use some clarification on this. I'm currently assuming that you mean I can legitimately use the spatial java API with any features I have available within the 11g Standard DB (i.e Oracle Locator subset of the Oracle Spatial package), but that I can't take that for granted, especially considering how militant Oracle are being over licensing and patents these days.

  • Search Algorithm in Java

    Hey Guys,
    I have written a crude search algorithm which extracts 4 fields from a database table into the String type of Java. Then this String object is tokenized and then within these tokens I search for the text the user has used.
    Once, I faced this problem that one of the String pulled from the DB was so huge that I got the OutOfMemory exception. Simple stating it, the text was so big that my system could not store all that text in one String object.
    I resolved this by adding more heap to java by doing:
    java -Xmx512M MySearchClass
    Now I am afraid that if there is another HUGE text in the DB , I can still run out of memory.
    Do I just need to get MORE RAM to my system and allot really huge heap space, such as 4 GB or so , so that if need be, the JVM can use it ?
    Suppose I get a server machine with 4 GB RAM, at some stage I'd still have an upper limit on the amount of text I can extract from the DB, right ?
    Is there any other way to stream the text from DB and then search ? Remember that I am tokenizing the text in the algorithm, so I think I can't use a buffer, or can I ?
    thanks a ton !
    -AZ

    These are SQL queries. I use SQL queries to pull out the text in the DB and then store it in a String object. The problem is that the text in DB can get so huge that the String object cannot hold it anymore due to memory limits. The JVM gets assigned a heap size and the size of the String object can get really big to exceed the heap size.
    I used : java -Xmx512M MySearchClass
    That assigned 512MB to the JVM so I haven't encountered the OutOfMemory exception so far. But my guess is that for some other data set, the String can be so big that even 512MB might not be enough.
    This search algorithm will be deployed on a server class machine with about 4 GB RAM. So we can give JVM 4GB heap space to use. But its a limitation again , right ?
    These text in DB are extracted from PDF files.

  • Is there any Standard Web dynpro Java Components like in ABAP Web dynpro's

    Hi,
    Experts,
    I want to know that in web dynpro for Java there is any standard components exists or not like in ABAP web dynpro's standard components exits.Please clarify on that question..
    Thans in advance,
    Shaber Ahmed.

    Hi Ahmed,
    I dont think there are any standard components available on Webdynpro Java like ABAP. But, there are quite a few standard Project available on SDN if you want to practise some exercises. Just do a search on SDN you get lot of standard example projects that you download and Import them in to the WebDynpro Java Perspective of NWDS.
    I hope this help. Let me know if you need any more help.
    Regards,
    Ammu Gopal.

  • Standard XSLT for Java(XML) Doclet

    I've just found "Java Doclet" <http://wwws.sun.com/software/xml/developers/doclet> for generating XML documentation from Java source code files rather than generating HTML. It is just what I want because I can easily create customized HTML versions out of the XML using XSLT sheet.
    I've wondered if there's available an XSLT for generating standard HTML just like the output of the standard doclet, to use as starting point for modifications?

    BTW, the closest thing I can think of is xmlroff which uses the output of this
    XML doclet to produce PDF (without cross-reference links, I believe)
    http://xmlroff.sourceforge.net/
    See the Javadoc example:
    http://xmlroff.sourceforge.net/examples/javadoc/index.html
    The source is at sourceforge:
    http://sourceforge.net/projects/xmlroff/
    Also now available on SourceForge is the related PangoPDF project at
    http://pangopdf.sourceforge.net/
    and
    http://sourceforge.net/projects/pangopdf/
    Please let me know what you think of these.
    -Doug Kramer

  • JPG to JBIG Algorithm in JAVA

    Hi!
    I need to do the jpg to jbg compresion. (http://www.jpeg.org/jbig/)
    This is a bi-level fax compresion. I don't find any solution for it...
    I was looking at Markus Kuhn source code in c (http://www.cl.cam.ac.uk/~mgk25/jbigkit/), but I'm still in school and I don't have the knowledge to rewrite it into Java...
    I need to make an applet for that conversation (i get a jpg picture), I'm trying with IMageMagick (http://www.yeo.id.au/jmagick/) and servlet right now (not pure programing solution ;))
    Is there some other algorithms?? Perhaps in java (without native code)?
    Thanks!

    Take a look at the ImageIO stuff in java 1.4 and later.
    This is a pluggable framework for loading and saving images. By default it can load and save jpeg and tiff (which has a
    fax compression mode I believe).
    If not then you can obtain thrid party plugins for the framework that support your format (or you can write your own).
    If you wish to perform tasks such as colour conversion (convert the image to binary for example) then you may want to
    look at JAI. However that is probably overkill. You can perform many simple image processing tasks using Java 2D.
    matfud

Maybe you are looking for