java

Search by topics and extract keywords from articles in Wikipedia

Hi. I'm doing a project in java in which I have to process a wikipedia dump file. I'm looking for a library to extract keywords in wikipedia articles... Basically I want to read every tag page in the wikipedia xml dump and compare it with a list of topics and categories and if it is correct , to choose it and add to my results. I'm not i...

Convert Java's java.util.calendar to PHP code

I'm looking to convert this line of code to PHP's mktime(): Calendar timeStartPoint = Calendar.getInstance(); timeStartPoint.set(11, 0); timeStartPoint.set(12, 0); timeStartPoint.set(13, 0); timeStartPoint.set(14, 0); timeStartPoint.set(5, monthStartPoint ? 1 : 5); timeStartPoint.set(2, 0); timeStartPoint.set(1, 2004); I imagine 1 is...

Is it possible to have multiple rows with jsf h:datatable

Hi all, With h:datatable we can display data as follows Jems tom chirs harry but can I display the same as shown below: Jems 2. tom chris 4. harry Ragards, Abhi ...

How do we display a photo from Picasa java API?

Okay, it seems to be a stupid question, since we have this: http://code.google.com/intl/en/apis/picasaweb/docs/2.0/developers_guide_java.html However, up to the moment, I can only succeed in displaying the thumbnails by using: PhotoEntry photo = //somehow I get the instance photo.getMediaThumbnails().get(0).getUrl() The biggest photo...

Adding a png image to a java applet

Hello all, I am very new to java, I want to add a PNG image to my applet. From some reason when I add this image I receive the following error: Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space at java.awt.image.DataBufferInt.(Unknown Source) at java.awt.image.Raster.createPackedRaster(Unknown So...

addressing an input stream in java ee project

i have a java ee project which has a text file that uses a xml for loading data but i cannot address the test file xml which is behind the java test file. in the test file i use this statement: InputStream inputFile = AddressTreeTest.class.getClassLoader().getResourceAsStream("test/testAdr.xml"); but when i run the file inputFile is n...

Should I make Linux Shell Script or Java program?

I need to generate multiple databases to SQL, so I need script/program to automatically generate those to SQL and generate files to jboss server. Our client server is running in Linux, but I develop on Windows machine. Should I make script with as Linux script or write Java program that could make same things? ...

JAX-WS returning a complex object?

Hi, Im pretty new to Java Web Services, but I cant find a good explanation anywhere. I have 2 Java web projects within NetBeans. One as a web service and one as a client for that web service. I have also created my own class called "Person", which has what you'd expect: name, dob, etc. I would like to have a web service method called "...

How to do basic authentication with Prowser using e-mail address-based usernames?

I am using Prowser to screen scrape internal corporate websites. Some of the sites use basic authentication where the username is: [email protected] According to the documentation, in order to user digest or basic auth, I need to open the URL like this: https://username:[email protected]/ But when I actually construct the URL, it lo...

In enterprise Java/.Net projects, does every developer have all dependencies in their classpath?

On large-scale Java/.Net Enterprise projects, does every developer need to have all the components/libraries/dependencies in their classpath/local development environment, in order to make it build? Or are they divided up into smaller sections can be built in isolation (so that they don't need to reference all the dependencies)? In o...

JAVA Dynamic List Type

Is it possible to make a method return a dynamic List type. Such as a method a(Object b) can return a List<Integer> when the b is Integer type? ...

Java applet won't load

Hi all, I am building a small applet in java. It works fine (really!) when I run it in eclipse as an applet. Problems start when I export it as a jar and than try to load it through an html page. Here's the html code: <body> <applet archive="myJar.jar" width=650 height=850> </applet> </body> Now when I run other jar files in this ...

Drawing over a JPanel and adding the JPanel to JFrame

I need to draw a graph over a JPanel by overriding the JPanel's paintComponent() method. While designing gui using netbeans when i drag/drop a JPanel over JFrame it generates code by creating a private variable, JPanel object. In such a case how can i override its method to draw over it... or else if i write code for a class by exten...

How to reduce Scala (/ Java) startup overhead?

I'm pretty ignorant of the Java world (I do mostly C / Python) but Scala looked interesting enough to pull me in. One problem I'm having with it is the enormous startup overhead - 0.3 seconds minimum, much more if I'm using the interpreter instead of compiling, compared to effectively 0 for Python or C. So even though the language is ten...

j2ee good and reliable books

Can anybody suggest some good books for starting J2EE? I have done Core and Advanced Java ( up to Swing). ...

Reading a remote file using Java

Hi all, I am very new to java, and have been struggling with it. I am looking for an easy way to get files that are situated on a remote server. For this I created a local ftp server on my windows xp, and now I am trying to give my test applet the following address: try { uri = new URI("ftp://localhost/myTest/test.mid"); File mid...

JTable RowFilter

Is is possible to some how get the index of the selection corresponding to the non filtered table? After the table is filter using a regexFilter. JTable getSelectedRow returns the index of the filtered table? ...

How can I write a WebDAV server with Delphi?

There are some WebDAV clients available for Delphi (for example included in Indy 10). Is there also a simple WebDAV server solution written with Delphi? If there is none yet, maybe you know an implementation in a different language (C#, Java) which you can recommend as a starting point for a WebDAV server implementation? (It does not ha...

How can I change the namespace on every node in a DOM?

How can I, given a w3c DOM (Java's default implementation, specifically) change the namespace of every element/attribute/node in that DOM? Efficiently, preferably. The DOM doesn't seem to have a setNamespaceURI method on it, which is inconvenient. I've tried XSL approaches, but they've failed to work in the JAXP transformers (although...

alternative to memcached that can persist to disk

I am currently using memcached with my java app, and overall it's working great. The features of memcached that are most important to me are: it's fast, since reads and writes are in-memory and don't touch the disk it's just a key/value store (since that's all my app needs) it's distributed it uses memory efficiently by having each ob...