I'm searching for a library (preferably generic) that generates iterable combinations and permutations of data contained in collections. Cartesian product would also be nice.
The best way of describing what I want would be "itertools for Java".
...
Hi guys,
I am trying to execute a webservice method call from the javascript on the page, just before the user leaves the page. I got the javascript speaking the webservice perfectly. However, when I try to hook the javascript function to the window.onbeforeunload event, nothing happens.
<script type="text/javascript" language="javascr...
JMF is old, and doesn't support a lot of codecs properly. I get by these days by using FFMPEG in the background, but I would like to switch to a native java solution if one exists, does anyone know of a current open source Java project that has media manipulation functionality?
...
I am trying to start developing with Java and the Stripes Framework. I have the following in my web.xml file
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.su...
I have what should be an easy issue to solve, but I'm having no luck.
In my servlet-servlet.xml file, I have the following beans (in addition to others):
<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
<prop...
So I finally took the dive and installed maven2 but I've got some problems.
My code relies on some third party jars which I installed using install:install-file. I then listed those jars as dependencies in my pom. Maven can compile and package it all fine and dandy. But when I run my jar like so:
java -cp "target/*" com.blah.App
It do...
How do I validate a list of proxy servers, then checking whether the proxy is HTTP or SOCKS and whether the proxy transparent or anonymous?
the input are only hostname and the proxy port.
...
Hi
Can anyone help me in creating an X11 window in java swing using eclipse?And also the function to get the x11 id also.What are the basic requirement for creating an X11 window in java.
...
I have created a jar file now i created another java program. I want to unpack that jar file in some other directory means i want to do something like unzip.
If i run jar -xf filename.jar
This causes some error:
Exception in thread "main" java.io.IOException: Cannot run program "jar": java.io.IOException: error=2, No such file or direc...
Does this method work well for developing apps in windows?
Any testimonial or examples of apps developed in java using xmlvm?
Looking for the best free method to develop apps in windows.
Thanks.
...
Hi All,
I am not very sure about the auto commit mode of java JDBC, I am making a connection whose auto commit mode is set to false. After that I fire a select query on database, which works fine, I am under impression that commit has to be called only for insert, update, delete statements.
Now do I need to commit the connection for Se...
I am writing a java code.
I want to search a string on google and google images using my java code.
Previously i wasnt even able to search text and then i had to register with google and then i could do it.
Now i want to search a string against googleimages
How can i do it?
Regards
Manjot
...
Is there a way to control the optimization level of the java compiler that Eclipse uses when building a project?
Or is this question not relevant anymore, is all optimization deferred to the vm?
The reason I'm asking is that I recently wrote a quick test doing this:
private static int test_f(int i) { return i * 42; }
...
int z = 41;
...
What do you recommend as a UI creator for Java (WYSIWYG). I have used Balsamiq for website mockups but I am creating a spec that needs to be close to exact - Balsamiq is great for rougher mockups, is there anything you would recommend.
...
I am using the following code to generate a PDF document from a JSP, but it generates an Excel sheet.
<%@ page buffer="7024kb" %>
<%@ page contentType="application/pdf"%>
<%
String reportType=request.getParameter("reportType");
String fileName=reportType;
response.addHeader("Content-disposition", "attachment; filename="+fileName);...
I want to build a TreeModel from some Lists that contain the source data. Now, there's an utility class called DynamicUtilTreeNode that can be used to build trees from arrays, Vectors and Hashtables, but... not from Lists?! Of course I could use the List's toArray() method, but it gives a clone array of the List's state at the moment, so...
I have a Hibernate hbm.xml mapping file which defines a large number of class mappings. Each of these needs an <id> definition and a corresponding <generator> definition.
In this particular application, the <generator> definition is quite involved, including setting a number of parameters (e.g. increment size, optimizer, etc). Having t...
I created an editor using the eclipse PDE.
Every time I double click on the same file it opens a new instance of my editor instead of just selecting the one that already opened (like in .java files).
My Editor input implements IEditorInput.
How can I change it?
...
Hi all,
My program looked like this:
class Prog
{
BufferedImage offscreen;
KindOfDatabase db;
MyThread thread;
class MyThread extends Thread
{
volatile boolean abort=false;
long lastUpdated;
public void run()
{
try
{
KindOfCursor c = db.iterator();
while(c.getNext())
...
In a Struts Action, I want to get a parameter from the URL or from a hidden field, when the parameter in the URL is not set.
To retrieve the parameter from the URL is as follows:
String userId = request.getParameter("userId");
But the problem is now, the HTML is based on forms (legacy code). And I observerd that the parameter userId m...