Good opensource library for suffix trees, longest common subsequence ..?

What opensource / free (preferably GPL/LGPL licensed) libraries for suffix trees, longest common subsequence and longest common contiguous subsequence do exist for Java?
Any practical experiences?

What opensource / free (preferably GPL/LGPL licensed) libraries for suffix trees, longest common subsequence and longest common contiguous subsequence do exist for Java?
Any practical experiences?

Similar Messages

  • Need a good charting library (for use in a servlet/jsp environment)

    Anyone know of a good charting library for use in a servlet/jsp environment.

    Use JFreechart combined with cewolf.
    www.object-refinery.com/jfreechart/
    To use charts in a jsp page you can use cewolf ( a taglib) based on jfreechart.
    http://cewolf.sourceforge.net/
    Both are free.

  • Java library for JPG Compression

    I have to compress the JPG images with good quality. Please suggest a good java library for image compression.
    Thanks

    Demo:
    import java.awt.*;
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import javax.imageio.*;
    import java.awt.image.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class ImageCompressExample implements Runnable, ChangeListener {
        private BufferedImage original;
        private JLabel compressedLabel;
        private JSlider slider;
        private int byteCount;
        public ImageCompressExample(String url) throws IOException {
            original = ImageIO.read(new URL(url));
        public void run() {
            slider = new JSlider();
            slider.setMajorTickSpacing(10);
            slider.setPaintTicks(true);
            slider.setPaintLabels(true);
            slider.addChangeListener(this);
            compressedLabel= new JLabel();
            updateCompressedLabel();
            JPanel labelPanel = new JPanel(new GridLayout(2,1));
            JLabel originalLabel = new JLabel(new ImageIcon(original));
            originalLabel.setBorder(BorderFactory.createTitledBorder("original image"));
            labelPanel.add(originalLabel);
            labelPanel.add(compressedLabel);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(labelPanel, BorderLayout.CENTER);
            f.getContentPane().add(slider, BorderLayout.SOUTH);
            f.pack();
            f.setResizable(false);
            f.setLocationRelativeTo(null);
            f.setVisible(true);
        public void stateChanged(ChangeEvent e) {
            if (!slider.getValueIsAdjusting())
                updateCompressedLabel();
        private void updateCompressedLabel() {
            int value = slider.getValue();
            compressedLabel.setIcon(new ImageIcon(compress(original, value/100f)));
            String title = String.format("compression quality = %d%%, bytes = %,d", value,  byteCount);
            compressedLabel.setBorder(BorderFactory.createTitledBorder(title));
        public BufferedImage compress(BufferedImage image, float quality) {
            try {
                Iterator<ImageWriter> writers = ImageIO.getImageWritersBySuffix("jpeg");
                ImageWriter writer = writers.next();
                ImageWriteParam param = writer.getDefaultWriteParam();
                param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
                param.setCompressionQuality(quality);
                ByteArrayOutputStream out = new ByteArrayOutputStream();
                writer.setOutput(ImageIO.createImageOutputStream(out));
                writer.write(null, new IIOImage(image, null, null), param);
                byte[] data = out.toByteArray();
                this.byteCount = data.length;
                ByteArrayInputStream in = new ByteArrayInputStream(data);
                return ImageIO.read(in);
            } catch (IOException e) {
                throw new RuntimeException(e);
        public static void main(String[] args) {
            try {
                String url = "http://www.rsportscars.com/foto/03/carreragt06.jpg";
                EventQueue.invokeLater(new ImageCompressExample(url));
            } catch (IOException e) {
                e.printStackTrace();
    }

  • Suffix Tree Library

    Is there any library for creation of suffix tree and which also has a method to search a substring in the suffix trees ??

    Now posted at [java-forums.org|http://www.java-forums.org/advanced-java/16734-suffix-tree-library.html].

  • Create a Library for common code

    I want to create a library of common PHP and JavaScript code. How do I do it? The conceptional problem I am having is how can I access this code across separate sites. Dreamweaver makes avail common code, like mysql code to access a database. I want to set up a similar the library for my code.
    Thanks for you help.

    Here is an example of one Snippet I frequently use.  A double click inserts the following code.
    <!--LATEST JQUERY CORE LIBRARY-->
    <script src="http://code.jquery.com/jquery-latest.min.js"></script>
    <!--FANCYBOX plugins-->
    <link href="http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.css" rel="stylesheet" media="screen">
    <script src="http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.pack.js"></script>
    <!--invoke FANCYBOX on page load-->
    <script>
    jQuery(document).ready(function() {
    $.fancybox(
    '<h2>Hi!</h2><p>Your custom message here...</p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam quis mi eu elit tempor facilisis et neque</p>',
    'autoDimensions'    : false,
    'width'             : 400,
    'height'            : 'auto',
    'transitionIn'    : 'elastic',
    'transitionOut'    : 'elastic',
    'overlayOpacity'    : 0.8,
    'speedIn'        :600,
    'speedOut'    :400,
    'overlayColor'    : '#FFF'
    </script>
    Or, if you prefer, you could insert those Snippets into a server-side include file.
    Nancy O.

  • Can anyone recommend a good UPK library structure for Oracle financials 11.5.10.2 (using UPK 11.1)?

    Hi, Can anyone recommend a good UPK library structure for Oracle financials 11.5.10.2 (using UPK 11.1) please?

    If you are using the application server that comes with Oracle Applications - you probably need to use the JDeveloper version that comes with that one too. (The OAF forum will have more info on this).
    If you are using JDeveloper 10.1.3 then you can use a stand alone OC4J 10.1.3 to deploy your applications - and save yourself the hassle of messing up with your apps server.

  • Using a Single Library for Entire Site and When to Use Subsites

    I'm hoping a discussion I am having with my coworkers can be solved.  We are trying to decide two things:
    Should the entire office be under a single site or should each division have their own site?  Our Office has 5 divisions that contain 17 Branches, one site for business functions and one top-level site for the entire office.
    Is it standard practice to create one huge library managed by metadata or should there be multiple libraries?  I tend to think one library will be too hard to manage with regard to metadata and site columns and that libraries should be based on business
    functions or subject domains (i.e., SOPs, Quality Documents, Business Documents, Technical Documents, etc).
    Currently, several workflows, libraries and lists have already been created under our business functions site.  In order to house everything under a single site, we would need to change the name of the site and move everything under it.  I'm not
    sure if changing the name of the existing site will cause problems.
    I group these two items together because they really seem related.  With everything under a single site, individual libraries, lists and workflows could get out of hand as everyone tries to manage their own division.  But then so would a single
    library for everyone.  The problem with more than one site is that data cannot flow freely between sites (via workflows) and search would be less effective so some are against separate sites.  So knowing one question may affect the answer for the
    other.
    Any thoughts on our library and site structure would be appreciated.  Thanks.

    As always the usual SharePoint consultant cop-out answer of 'it depends' is correct.
    Having said that there are certain trends that are quite relevant:
    It isn't common to use a single site collection for all sites. It can be done but it often leads to a state where you have a single monstrous site collection which is harder to backup, recover and maintain (see the boundaries and limits documents). The
    default behaviour in most cases is to have a central 'shared' site collection then one per <group> where Group is a team that works on the same content, has broadly the same area of interest and access. That might be one for HR, one for the Support team,
    one for the Sales team etc.
    In terms of libraries there's a wide variation. If there' no difference in views, security and metadata then keeping the library count down is generally a good thing. However using multiple libraries can make life easier and better for users by allowing
    more useful views, more secure by locking down libraries rather than using item level permissions (always a nightmare) and allowing more useful alerts and so on.
    SharePoint architecture is a science but it's a really, really hard one to formulate into If/Then rules. So, broadly answering your questions I would lean towards multiple site collections and I generally agree with you on point 2, although if there's only
    a small number of documents and simple structure then a single library might still make sense.

  • Suffix Tree and similar

    Hi,
    I'm stuck with the app i'm writing and i really need some good ideas.
    The basic problem is:
    I generate a list of string, everytime i produce a new string i need to check if it is already present in the list, if not i add it to the list.
    Each string is ordered and the list is ordered only respect to the first char.
    To cope with that i used Tree structure similar to a Suffix Tree where i insert the string into the tree and it easily checks if the string is already present or not.
    The tree works well but with strings of length 7 or more the heap goes out of bound.
    Maybe i need a better implementation of the suffix tree,
    do you know any?
    or some other idea that requires lower space?
    Thanks in advance!

    Use a Hashset and not a list. It's exactly for that purpose.
    You can later still fill that Set into a List and use a Comparator for custom sorting.

  • PS Library for Java?

    Does Adobe have a postscript print library for Java?
    I called Adobe Support - and got the typical India call center (no help of course). Hopefully Adobe has smart people someplace in the company... just not sure where.
    We have a Java Web Start desktop client for geospatial work that we need to add postscript support for large format printing (e.g. E size drawings). The goal is decrease print times over the normal Java2D/Windows "render a bitmap image on the client - then send it to the print server - then to the printer" method by creating a small postscript file to send to the printer - that can then create the large bitmap to print at the device.
    From what I can tell Adobe has no such library - is that really true?
    If so - does anyone have recomendations on a good solid commercial or open source library?
    Google seaches come up with only a couple (e.g. RiePS), none of which sound very robust. Does no one develep applications to output to postscript any more?
    Thanks in advance...

    Assuming that you are lookng for a library for creation of PostScript, no, Adobe offers no libraries for PostScript creation in Java or otherwise.
    Most applications in common operating systems environements (Windows, MacOS, etc.) rely on the operating system's internal graphics model and the provided PostScript driver to generate PostScript for the particular device and deliver same over the device's communication channel (Ethernet, USB, etc.).
              - Dov

  • How to extend  breadth first Search for Binary Tree to any kind of Tree??

    Dear Friends,
    I am thinking a problem, How to extend breadth first Search for Binary Tree to any kind of Tree?? ie each node has more than 2 leaves such as 1, 2,3,4 or any,
    I have following code to successfully apply for breadth first Search in Binary Tree as follows,
    package a.border;
    import java.util.ArrayList;
    import java.util.LinkedList;
    public class Tree
        int root;
        Tree left;
        Tree right;
        static ArrayList<Integer> list = new ArrayList<Integer>();
        static ArrayList<Tree> treeList = new ArrayList<Tree>();
        private static LinkedList<Tree> queue = new LinkedList<Tree>();
         * @param root root value
         * @param left left node
         * @param right right node
        public Tree(int root, Tree left, Tree right)
            this.root = root;
            this.left = left;
            this.right = right;
        /** Creates a new instance of Tree
         * You really should know what this does...
         * @param root
        public Tree(int root)
            this.root = root;
            this.left = null;
            this.right = null;
         * Simply runs a basic left then right traversal.
        public void basicTraversal()
            //Check if we can go left
            if (left != null)
                left.basicTraversal();
            //Add the root
            list.add(root);
            //Check if we can go right
            if (right != null)
                right.basicTraversal();
        public ArrayList<Integer> getBreadthTraversal(ArrayList<Integer> list)
            //Add the root to the arraylist, we know it is always the first entry.
            list.add(root);
            //Basically we add the first set of nodes into the queue for
            //traversing.
            //Query if left exists
            if (left != null)
                //Then add the node into the tree for traversing later
                queue.add(left);
            //Same for right
            if (right != null)
                queue.add(right);
            //Then we call the traverse method to do the rest of the work
            return traverse(list);
        private ArrayList<Integer> traverse(ArrayList<Integer> list)
            //Keep traversing until we run out of people
            while (!queue.isEmpty())
                Tree p = queue.remove();
                //Check if it has any subnodes
                if (p.left != null)
                    //Add the subnode to the back of the queue
                    queue.add(p.left);
                //Same for left
                if (p.right != null)
                    //Same here, no queue jumping!
                    queue.add(p.right);
                //Append to the ArrayList
                list.add(p.root);
            //And return
            return list;
         * Makes a tree and runs some operations
         * @param args
        public static void main(String[] args)
             *                             4
             *          t =           2       6
             *                      1   3    5   7
            Tree leaf6 = new Tree(1);
            Tree leaf7 = new Tree(3);
            Tree leaf8 = new Tree(5);
            Tree leaf9 = new Tree(7);
            Tree t4 = new Tree(2, leaf6, leaf7);
            Tree t5 = new Tree(6, leaf8, leaf9);
            Tree t = new Tree(4, t4, t5);
            t.basicTraversal();
            System.out.println("Here is basicTraversal ="+list.toString());
            list.clear();
            t.getBreadthTraversal(list);
            System.out.println("getBreadthTraversal= " +list.toString());
            list.clear();
        }Can Guru help how to update to any kind of tree??
    here this code is for the tree like:
             *                             4
             *          t =           2       6
             *                      1   3    5   7
             */But i hope the new code can handle tree like:
             *                             4
             *                           /   | \
             *                          /     |   \
             *          t =            2     8   6
             *                        / |  \    |    /| \
             *                      1 11  3 9   5 10  7
             */Thanks

    sunnymanman wrote:
    Dear Friends,
    I am thinking a problem, How to extend breadth first Search for Binary Tree to any kind of Tree?? ...The answer is interfaces.
    What do all trees have in common? And what do all nodes in trees have in common?
    At least these things:
    interface Tree<T> {
        Node<T> getRoot();
    interface Node<T> {
        T getData();
        List<Node<T>> getChildren();
    }Now write concrete classes implementing these interfaces. Let's start with a binary tree (nodes should have comparable items) and an n-tree:
    class BinaryTree<T extends Comparable<T>> implements Tree<T> {
        protected BTNode<T> root;
        public Node<T> getRoot() {
            return root;
    class BTNode<T> implements Node<T> {
        private T data;
        private Node<T> left, right;
        public List<Node<T>> getChildren() {
            List<Node<T>> children = new ArrayList<Node<T>>();
            children.add(left);
            children.add(right);
            return children;
        public T getData() {
            return data;
    class NTree<T> implements Tree<T> {
        private NTNode<T> root;
        public Node<T> getRoot() {
            return root;
    class NTNode<T> implements Node<T> {
        private T data;
        private List<Node<T>> children;
        public List<Node<T>> getChildren() {
            return children;
        public T getData() {
            return data;
    }Now with these classes, you can wite a more generic traversal class. Of course, every traversal class (breath first, depth first) will also have something in common: they return a "path" of nodes (if the 'goal' node/data is found). So, you can write an interface like this:
    interface Traverser<T> {
        List<Node<T>> traverse(T goal, Tree<T> tree);
    }And finally write an implementation for it:
    class BreathFirst<T> implements Traverser<T> {
        public List<Node<T>> traverse(T goal, Tree<T> tree) {
            Node<T> start = tree.getRoot();
            List<Node<T>> children = start.getChildren();
            // your algorithm here
            return null; // return your traversal
    }... which can be used to traverse any tree! Here's a small demo of how to use it:
    public class Test {
        public static void main(String[] args) {
            Tree<Integer> binTree = new BinaryTree<Integer>();
            // populate your binTree
            Tree<Integer> nTree = new NTree<Integer>();
            // populate your nTree
            Traverser<Integer> bfTraverser = new BreathFirst<Integer>();
            // Look for integer 6 in binTree
            System.out.println("bTree bfTraversal -> "+bfTraverser.traverse(6, binTree));
            // Look for integer 6 in nTree
            System.out.println("bTree bfTraversal -> "+bfTraverser.traverse(6, nTree));
    }Good luck!

  • About the support of commsuite 7 for two tree LDAP

    Hi all,
    We are giong to move our old IMS LDAP (ver 5.2) to a new hardware with DS version 6.3.1. Existing DS version 5.2 holds enterprise
    data in a two tree structure. ( Ex : dc=example,dc=com and o=isp) . Both trees carry user data. Documents released for
    commsuite 7 says the following,
    "Messaging Server and Calendar Server have introduced a one-tree structure, where there is no Domain Component (DC) Tree.
    All domain information is held in domain nodes in the Organization Tree."
    Paralley to the LDAP move the IMS version will also be upgraded to commsuite7. In this scenario how can I manage
    this whole process with the existenace of two tree structure. Any document regarding this issue?
    Appreciate your guidance..........
    Thanks

    nusagnar wrote:
    ### User data should not exist in the Domain Component tree.
    Yes. True. I knew it. Sorry about my bad terminology used in writing the sentence " Both trees
              carry user data.". Think this two-tree structure as a one configured properly. As I obeserved
              ( In Installation log files) this system uses schema 2. Not schema 1. How can I confirm which schema it used?Which system are you referring to? The iMS5.2 system or the Comm-Suite-7 system?
    iMS5.2 only supported Schema 1.
    For Comm-Suite-7 you can check by running:
    -bash-3.00# ldapsearch -b "o=comms-config" objectclass=sunCommsMetaData
    version: 1
    dn: cn=CommServers,o=comms-config
    objectClass: top
    objectClass: sunCommsMetaData
    sunkeyvalue: dssetup_ver=6.4
    sunkeyvalue: dssetup_rev=5.05
    sunkeyvalue: dcsuffix=o=isp
    sunkeyvalue: ugsuffix=o=isp
    sunkeyvalue: mlsuffix=o=mlusers
    sunkeyvalue: schematype=2
    cn: CommServersNote: "schematype=2"
    ### Which documents? Please provide the URL.
    Please read the title " Changes in the DIT Structure" in
    http://wikis.sun.com/display/CommSuite/Understanding+Communications+Suite+Product+Requirements+and+Considerations
    If you are using Access Manager then you need to use Schema 2. If you aren't using Access Manager then you can use Schema 1 or Schema 2. This is clearly stated in the "Schema Requirements" section of that document.
    ### Schema 2 is a single-tree structure. Comm-Suite-7 supports Schema 1.
    I understood it differently in this way after referring the doc above. Both schema 1 and 2 supports one-tree
         and two-tree systems.( I can create a new suffix with DC components ( Ex: dc=example,dc=com) in DS version 6.3
         with schema 2 ).I haven't come across any customers who are using a two-tree Schema 2 environment. So going down this path is potentially risky.
    But support for two-tree system depends on the LDAP parameters specified when preparing the DS
         using comm_dssetup.pl. Can you please guide me to find a good document on this?I don't understand your issue. If you are preparing a fresh Directory Server install with the comm_dssetup.pl tool and you want to use schema 1, then simply choose schema 1 when asked.
    ### Lets imagine there is a two tree structure ( whether it is schema1 or schema2 will depend on your next reply )
    and required to migrate to a DS system with schema 2 for commsuite 7. What is the possibility of doing it ? Do you have a specific requirement for using Schema 2 or not?
    Regards,
    Shane.

  • Adobe Photoshop 8.0 Object Library for PSE 8 ?

    Hi
    I want to write a program to loop over all tags and copy the associated fotos to folders named with the tag-name. By this way I have a good structure to select the fotos on stick / DigiFrame.
    I'm a Unify TeamDeveloper developer, so it's no problem for me. But: in TD I can generate the COM classes to access PSE. I think the right object library for this is Adobe Photoshop 8.0 Object Library.
    I have a complete installation of PSE 8 on my computer but this Object Library is not present.
    Does Adobe Photoshop 8.0 Object Library not serve for PSE8? Where can I get it?
    the one I have is Adobe Photoshop Elements 8.0 Media Client 1.0 Type Library. There are some methods like GetTags. But what is the input parameter tagIds? The return is a object. But the Media Client has no class Tags.
    I also searched google, perhaps already exists a plugin for such a export. But I found nothing.
    Can anybody help me?
    Best regards
    Thomas

    I have found a solution (psedbtools).

  • Using single iTunes library for multiple computers

    With the new Airport Disk utility, can I attach an external hard drive with my iTunes library and have multiple computers point to that library as the library for each?

    BKRonline wrote:
    neptune2000 wrote:
    A BIG WARNING (...) If you are a good guy and use ONLY one computer to read/write (i.e., to copy music to it) and all the others are read only (which cannot be enforced in software), then you're OK. Consider yourself warned.
    just to clarify...
    Use ONE computer and ONE COMPUTER ONLY for purchasing / adding new content to the 'master' iTunes library area. Use ANY OTHER COMPUTER that's looking at that 'master' iTunes library for reading (playing back).
    Yes. If you can enforce it by "persuasion", not software
    Would there be a conflict if someone rates songs from other computers etc?
    Yes. If they both rate at the same time.

  • One address book library for multiple users on notebook

    Good morning! I have been searching the forums but only find solutions if you are running OS X Server. I just bought a MacBook Pro running Leopard and my wife and I have separate accounts so we can keep our iTunes libraries, etc separate. I was able to successfully share an iPhoto library and now want to do that with Address Book. Any tips on how?

    I am new to the Mac and looking for the same solution of sharing the address book without using a mobile me account nor any other type of server. I have been searching the forums and have not found a solution for a very simple problem.
    Can anyone tell me how to share the address book so my wife and I see the same exact address book and both have permission to make changes?
    iPhoto was easy to share by moving my iPhoto library to the "Shared" users folder. I allowed read and write access to the iPhoto Library for both users, but my wife's account does get an error when it tries to save. It mentions that some recent changes may be lost. I double checked and my wife's account does have read and write privileges.
    Perhaps this is what eeperman meant by limited function.

  • How do I replace my uncle's itunes library for mine (without deleting it!?)

    The laptop I have my itunes on is breaking down slowly and I want to get more music on my phone but I can't use my laptop as it won't work.
    My uncle's itunes library is on our computer but I don't want to sync with his stuff and lose mine. But I also don't want to delete his. How can I replace mine with his without deleting his own. I pretty sure he has his library on a computer at his house. (I've tried deleting itunes but it keeps coming back up with his stuff. And I've been stuck trying to figure this out for two hours! Please help, going away on holiday soon and would love to have new songs!!)
    Thanks. (It's a windows PC either 7 or 8)

    If you can, backup your library to a portable hard drive. You don't need to be able to run iTunes, but the laptop has to start. Normally all you need to do is copy off the entire iTunes folder from <User's Music> to your external drive.
    Otherwise first learn how to create an alternate library and then switch between multiple libraries so you can restore your Uncle's library when you're done. See iTunes: How to open an alternate iTunes Library file or create a new one.
    Create a new empty library for yourself, ideally at the root of a portable drive so you're all set to use it elsewhere on another computer. Then recover the data from your iPhone with this user tip. Recover your iTunes library from your iPod or iOS device.
    Good luck.
    tt2

Maybe you are looking for