I have code that generates a data-driven SVG graph and I'd like to display the graph directly.
The method:
javax.microedition.m2g.ScalableImage.createImage
can take either a URI or an InputStream as the source data for the graph, what would be a good way to pass my graph data in? It's in String form in memory, so from what I can see ...
Basically I need webservice where client can request with id one boolean value from our webservice. What technology would be most suitable for this small API? Of course it is possible that there will be more functions to interface, but now we need only one function. It also needs to have authentication, so that only auhtorized clients ca...
Friends,
I'm working on a requirement where I need to call a Java API from Apex.
The solution I put forward was to create a Java class, store it the database and add a PL/SQL wrapper and then use it. Which is pretty much what is described here.
Whilst I am happy with this, I am interested to know if this is the only method? are ther...
Is there any reason why enums in Java cannot be cloned?
The manual states that
This guarantees that enums are never cloned, which is necessary to preserve their "singleton" status.
But returning the instance itself would also preserve its status, and I would be able to handle associated enums the same way as other clonable objec...
I have object, tree/model/hierarchy, whatever the correct term is. It consists of what could be characterized as a one-to-one mapping of the desired XML.
That is i have the following (in a non-standard UML sort of syntax)
class A {
class B b[*]
class C
class D
}
class B {
class C c[*]
string AttributeFoo = "bar"
}
...
if wanted to make a this method print using zero pad how do you do so
int month, day;
public void printNumeric()
{
System.out.printf("month +"/" +day +" \n");
// i would like the month if it is 5 to be 05 same thing with the day
}
...
Hello :-)
I am building a facebook platform web app using GWT and hosting it on App Engine.
I am adding validation code that uses supplied query string parameters in the callback url. GWT allows me to get these parameters by calling Window.Location.getParameterMap() and the returned Map is immutable.
I may be wrong however I think thi...
I am working on a java program concerning the pascal's triangle.
So this is how it is coded:
for(int i = 0; i < 5; i++){
for(int j = 0, x = 1; j <= i; j++){
System.out.print(x + " ");
x = x * (i - j) / (j + 1);
}
System.out.println();
}
and it shows:
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
But when I tried to...
When I am using HTTP protocol, there is no issue with sessions. But when I am using HTTPS protocol, I am facing problem in JSP. When it is moving from one tab to another tab, session is automatically getting expired. How can I resolve this issue?
...
i m jst confused that which of the two exists in the memory a class or the object?
...
I am trying t make a date that comes in like this mm/dd turn into the name of the month and day like it comes in 8/15 i want it to say August, 15
public void printAlphabetical()
{
int month,day;// i got the month and day from a user previously in my program
String s = String.format("%B, %02d%n",month,day);
Date...
I have a Spring Batch process which takes a set of rows in the database and creates a number of flat files from those rows, 10 rows per file. To do this, I've created a Spring Batch process, similar to this:
<batch:job id="springTest" job-repository="jobRepository" restartable="true">
<batch:step id="test">
<batch:tasklet>
...
I'm trying to get the jfreechart PieChart3D to hide labels. I can't find anything in the documentation.
Anyone know how to do this?
<% response.setContentType("image/png"); %><%@page import="org.jfree.data.general.*"%><%@page import="org.jfree.chart.*"%><%@page import="org.jfree.chart.plot.*"%><%@page import="java.awt.Color" %><%
...
Recent JVM's have a lot of XX parameters for garbage collection (see here for example), but what are the options which can make a client side Swing application really perform better?
I should note that one of the things that really annoys me on client side java applications is the large delay in stop-the-world garbage collection. In Int...
hi,
i'm trying to get my program to compile but its giving me 5 errors
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.io.*;
import java.lang.*;
import java.text.*;
import java.net.*;
import java.util.Scanner;
public class AddressBook extends JFrame implements ActionListener
{
FlowLa...
I have a question regarding the struts2 value stack. Let's say I have an Action class called RegisterAction that has an execute method as follows:
public String execute() {
ValueStack stack = ActionContext.getContext().getValueStack();
stack.push(new String("test string"));
return SUCCESS;
}
My struts.xml looks like this:
...
I am deploying my application to Tomcat 6.0.20.
Application uses Hibernate as ORM, Spring, and JSF for web-tier.
I also made simple runner from main() method to test Spring-Hibernate collaboration. And it does work fine and hibernate.cfg.xml is parsed pretty well.
I can append some code or full stack trace but I'm not sure that it's n...
Hi!
I have a strange problem with eclipse galileo.
I set java 1.6 as jre. And for this line of the code
List templates = new ArrayList ();
I see such error in eclipse problem list:
The type Collection is not generic; it cannot be parameterized with arguments <? extends E>
But I don't have any problems with building this project wit...
For Blackfish for Windows which is included in Delphi 2009 I would like to write a Java client and use a JDBC connection. If I understand correctly, this is supported: http://edn.embarcadero.com/de/article/36851
The database clients and servers are
interchangeable. Windows clients can
connect to Java servers and Java
clients ca...
I am making an address book GUI with Java and I have a JList that displays all the names of the people in my ArrayList (this is populated by the updateinfo method mentioned below). I want it so when I click an item on the JList, the TextFields are then updated with that persons details. Before I have only used buttons and therefore actio...