Lately, I have been looking into Apache Forrest as a code documentation solution. From Apache's website,
"Apache Forrestâ„¢ software is a
publishing framework that transforms
input from various sources into a
unified presentation in one or more
output formats. The modular and
extensible plug-in architecture of
Apache For...
I am trying to make a request to a webpage that requires cookies. I'm using HTTPUrlConnection, but the response always comes back saying
<div class="body"><p>Your browser's cookie functionality is turned off. Please turn it on.
How can I make the request such that the queried server thinks I have cookies turned on. My code goes some...
I have problem with JSP tags - how I can insert into attribute value in Java code?
This is my code:
<%!
String ii = new String();
%>
<%
try {
String id = request.getParameter("a");
int i = Integer.valueOf(id);
ii = String.valueOf(i);
} catch (Exception e) {
response.sendError(500);
}...
I have a class with Maps from Ks to Set<V>s, for several different Vs. I'd like to use a generic factory ala:
protected static <T> Set<T> SetFactory(int size) {
return new HashSet<T>(size);
}
to do something like
for (K key : keySet) map.put(key, SetFactory());
and have the generic part work (I get a compile error, type misma...
Is there a good implementation of continuations in Java?
If so, what is the overhead like? The JVM wasn't designed with these sort of things in mind, right? So is this kind of going against the grain?
...
We have a large (>500,000 LOC) Java system that depends on 40-50 OSS
packages. The system is built with Ant, and dependency management is
handled manually at present. I'm investigating Ivy and/or Maven to
automate dependencies. We looked at Maven as a build automation
system last year and rejected it because it would require totally
r...
Where can I learn about text compression in Java?
What classes would be used, and how would I use them?
...
Hi all,
when I try putting my JLayeredPane inside a JScrollPane I get a blank window (with white background) instead of the content I am trying to render (it could be an image, a button, a canvas). Does anyone know of a problem with layout managers that might cause it? Is it possible?
EDIT:
thanks to camickr help, I can now put a JLaye...
We have a Java app, as well as a number of C#-based plugins for other apps (e.g. Excel) that can communicate with the main app. The communications layer is implemented using Apache MINA on the Java side and xsd for the .NET plugins. Typically things run on the same (Windows) machine, though it would be better not to assume that (e.g., al...
I have downloaded the Android source code and can see the java source files for the built-in applications (e.g. com.android.contacts.ContactsListActivity). I am trying to discover how these applications re-use one another via Intents etc. I would also like to see how the UI layouts are assembled for these applications as a design for m...
I'm trying to figure out a nice way to limit the rate at which I send geocode requests to the Google Maps API v3 geocoder service. I know that Javascript does not have any nice wait or sleep because its execution is, for the time being, single-threaded.
Each geocoder request is sent inside of a jQuery each function. So, the general code...
Hi,
In the software 'Teamviewer', the quality from the images can be changed. It looks like the image comes from 32bit to 16bit (Or other values, like in the screen divece settings in windows). The image is realy smaller because you notice that the speed from the connection is higher. I don't want something like: "scale down, send and t...
I have a double in Java and I want to check if it is NaN. What's the best way to do this?
...
How do I move my spring xml configuration outside of my java web application?
I'd like to store my spring.xml outside of my web application so I don't have to create a new build of my application to change the configuration.
What is the best way to do this?
...
I'm using OpenGL ES to display some objects exported from Blender. Blender provides a list of vertices, a list of the face indices and a list of the 2d texture co-ordinates. Within Blender, and I believe generally in OpenGL, the texture co-ordinates map to each vertex described in the index array.
I suppose I have two questions:
I...
I'm looking for ideas on the best way to refactor this scenario (better design, minimal effort).
Starting from the following example abstract class (actual has many more fields, methods and abstract methods) :
abstract class Car
{
private int manufactureYear;
// ... many more fields that are hard to clone
public Car(int ma...
So, here's the situation. We'd like to be able to query active directory for a user's roles/group memberships, etc. Now, I can already do that using standard Java API (javax.naming), but I need a username, domain server name/address, and a password to do it. Users also have limited rights, so I can't use any external calls to fancy admin...
How do I add image to GWT Button or how do I use Mosaic's Buttons to add image. I can't figure out how to use THIS example in my code. What library do I need to add. I have Mosaic Library in my project and I can use it but the example that they have there does not work for me.
Thanks
...
Is it possible to change the target table for a Hibernate mapping? My use case is that while I get the data from one table, in cases where the data cannot be processed it is stored in a error table for later analysis.
Although it is possible to define entity-names in hibernate mappings, in my opinion it is not appropriate because it re...
Hi,
i need to read classes contained in a java package. Those classes are in classpath. I need to do this task from java program directly. Do you know a simple way to do?
List classes = readClassesFrom("my.package")
...