I wonder if anyone is able to help or advise with the following; I have to be able to take data from a data source and to be able to visualise that data as a decision trees on a web page all. This will be a single process which is seamless to an end user.
This will be done using JSPs and Java servlets but what concerns me are the underlying products. I'm thinking of passing the data to a Weka classifier and then doing something with the .dot file it creates, i.e. maybe feeding it to GraphViz or trying to use the Google Visualization API to present an interactive display.
But, can anyone tell me if this is a viable approach or suggest alternatives?
Thanks
Martin O'Shea.
I've had a lot of success creating data flow graphs with graphviz (I uploaded them with a script to a MoinMoin wiki and used the graphviz plugin). That plugin even allowed to have links in the graphs, so we could keep the individual graphs small.
For the UI we have added the JS stuff from http://www.mxgraph.com/ to display larger graphs to the user.
Your approach is viable however. GraphViz is a good tool.
Related
I am trying to make a GWT based web application which will be able to show 3D model from PTC Creo's .stp (STEP file). I am programming in Eclipse.
I started with Parallax3D framework, and I am able to make simple objects. But I'm stuck with how to parse the .stp file and make objects from that.
Later I saw that there is plenty of other tools for 3D on Web. There are "gwt-g3d", "gwtgl", "gwto3d",....
I also found JSDAI API, which should be able to parse .stp files. With very limited examples I couldn't manage to do anything usefull.
I am lost with all those things. Which path should I take?
Has anyone done that before OR is there a simpler opensource solution for that?
Thank you.
You could use the NIST STEP File Analyzer (free but not open source) to convert the STEP file to VRML/X3D. Three.js based frameworks can then view the VRML/X3D. If you want a completely open source solution, you need something to transform the STEP file, which often contains NURBS trimming that three.js lacks, to a tesselated form. FreeCAD, pythonOCC, node-occ or the underlying OpenCasCade can transform STEP to a mesh form.
I want to write a word search,which connects to a specific website(huge one),takes the word from user,searches the site and returns the strings which contain the word;this should be written in java and as an applet.I have read some tutorials and questions on this,and understood what have to be done is:
1.connect to a website and get the content of a website and save it to a string.(this should be done with a webcrawler which will be made from my own code for connecting to website and save the content to a string + jsoup library to parse the html code).
2.save the datas to a database(in my case nosql database).
3.index the datas in database.
4.query the database to show the results.
5.make a UI for showing the search results(I use swing.japplet).
now my qustions are:
1.have I understood correctly the steps which I have to go?(please explain me in details if a step is unnecessary or necessary)
2.Is it necessary to have a database?
notice:I want to implement it myself,without using ready things such as lucene,nutch,solr,...
edit:3 people told me applet is not suitable for such a thing,so what should be the replacement?
many many thanks for your help.
You should look at using Lucene, as it does most of what you want here.
You should not use applets.
For small data set, database should be sufficient. Databases like mysql comes with full text search functions.
For bigger data set, you might want to consider Lucene or Solr.
That is one way way to implement this. Another (simpler) way would be to use an existing text search / indexing engine like Lucene / Solr. Going to the effort of reimplementing the "text search / indexing" wheel using database technology strikes me as a waste of effort, unless you have a sound technical reason for doing so.
You do need to has some kind of database, because indexing a website on the fly would simply not work. Lucene will handle that.
I think your choice of Java applets to build the UI is a bad idea. There are other technologies that give results that are as good or better ... without the security risk of a Java browser plugin.
Finally, another way to make your website searchable is to get Google to do it for you. Make your website content indexable, and then use Google's search APIs.
I've searched and searched, coming across questions that address parts of the problem, but nothing comprehensive. I'm using GWT and eclipse to develop a website that uses highcharts to make some fancy plots.
The idea is that the user will be able to select one of their local data files of type csv and upon selection of the file, the plot will be rendered using their data and our fancy algorithms.
We don't want to send enormous amounts of data to the server as this will become costly and time consuming for the user. Is there a way to process or at least pre-process the user's data using Java code to be implemented in a GWT-eclipse project?
Any help is greatly appreciated!
This is a duplicate of GWT Toolkit: preprocessing files on client side
One of the answers points to these links:
http://code.google.com/p/gwt-nes-port/wiki/FileAPI - GWT wrapper for HTML5 File API
http://www.html5rocks.com/en/tutorials/file/dndfiles/ - HTML5 FileAPI
But, alas, the FileAPI is pretty new: http://caniuse.com/fileapi
The other alternative you have, to avoid server, is a text area to paste the CSV file into, then read that using GWT. This is a common trick and I think you can even copy+paste from certain spreadsheet programs this way.
You cannot do it in a universal way in GWT in all browsers currently. GWT translates to javascript and it does not have the required privileges to process client side the files.
For more detailed answer you can reference - How to retrieve file from GWT FileUpload component?
I am currently developing a website in which several images will be displayed on a single page. In light of performance, I'm searching for the best way to handle thes images.
First, I will explain my needs. The back-end of the website consists of a CMS in which images can be uploaded (and maybe resized by the user so the image will have the neede ratio of width/height). These images will be displayed on several pages in de website, requested by (hopefully) many users.
Secondly, I will shortly describe my environment. I am developing in Java EE, using JSF as front-end. I am using multiple libraries like Prime Faces et cetera.
I have done some research and it seems there are dozens of solutions, but I don't know in which direction to search. E.g.:
Saving images in database
Saving images as static images by using for example filestreams
So in short:
Which way of saving and requesting images would be best in this case?
What library would you advice to serve me in this?
Is there a JSF-solution to manually resize images?
Would ImageJ be the best solution to generate thumbnails? If not, what would be?
If any other details are needed, I'm happy to provide them.
Thanks in advance.
I wouldn't worry about performance until it becomes an issue. I would perhaps worry more about auditability, maintainability etc.
In order to make a future change easy, however, is abstract away your image store such that you can easily replace (say) a file-based system, with a database system (or a cloud-storage solution, or, or...).
That way you can easily substitute one for another and compare/constrast if need be, or simple swap out your implementation at a later date.
So..
Saving images as files is best
After some research it seems that PrimeFaces offers ImageCropper
File Upload can be achieved using PrimeFaces' FileUpload
But still, I have seen many discussions on Image Manipulation by Java and the best tooling for this. Some say ImageJ would be great, others don't. Is there any reason why I should go with one or another?
That's a simple question: is there an API to draw a B-tree in Java? I just dont want to spend much time reinventing the wheel. I am not having trouble with the algorithm per si, mine works perfectly fine after a lot of reading (specially Lafore's Data Structures & Algorithms in Java), I just dont know how to print a B-tree in a good way.
Thanks in advance.
You've got a couple of options to "render" a graph to screen -
Graphviz has a Java API (Edit: an addon called LJV which gives the API).
I think you ought to be able to use the free version of JGraph to do the same.
I know people have had success with daVinci (now uDraw). I haven't used it since 2003, but from what I remember, you have to generate a bracketed text file for your tree and the program parses it. You should be able to output your text by doing a simple tree traversal.
Have a look at yEd. I'm pretty sure, licensing yFiles just for an API to display tree structures is a bit exaggerated, but the graph editor is free of license costs and you can use it to render your trees. I usually dump my raw graph data in one of the supported file formats, open the output file with yEd and let it do the layout.