Hello, I have an android app which i have written, which exhibits some strange behaviour.
When i have an app open, say with three acitivties in the stack
A - B - C
where a is the entry point and C is the currently viewed activity, if i press the home button and reselect the icon for my app sometimes i see A, which on pressing the bac...
The idea would be to replace ERB with templates that are pure XHTML and that the view would be pure code manipulating the template content.
Have this been done already ?
...
I am using java.awt.geom.Rectangle2D.Double class to generate a rectangle. I want to generate a rectangle which is filled with a color (say green) and have a border (outline).
Now the problem is if I call
g2.draw(new Rectangle2D.Double(....)); // g2 is an instance of Graphics2D
then it doesn't fill the rectangle and when I call
g2.f...
hello,
i'm working with java.nio.channels.Selector and i'd like to create a separate thread for each selectedKey that is ready for read/write/accept but i want to make sure that the same socket is never handled by two different threads simultaneously. what would be the best way to do it ? i was thinking to cancel each selectedKey before...
I am developing an RCP application based on Eclipse and use i18n to load message resources. My requirement is that I need to change the View title based on locale/i18n. I am using setPartName to do that.
It does change it, but the issue is that it shows the title-changes only after the view has been clicked. So, in a way, it first disp...
Hi all,
I'm running into problems with the size of my Sessions with my Web Application that is based on the Jboss Seam Framework. I am using MessAdmin to investigate and it is reporting that as soon as a User logs in, their session size jumps from 50KB to 55MB (ouch). This seems crazy as I keep very few Objects in the Conversation/Sess...
Hello,
My code is as follows:
private static ArrayList<String[]> file;
...
void method()
{
file = new ArrayList<String[]>();
...
String[] s = str.split(";");
file.add(s);
}
In the above, str is a long String that is seperated by semicolons.
My problem is that I want to go through each array in the ArrayList and get one ele...
I have a system that is using java.util.prefs to cache the tiny/simple result of a (on-startup) SOAP call
Java's automatic sync is intermittently failing (1% of time using default JVM 30s backing store sync) dumping the following the exception:
Jan 8, 2010 12:30:07 PM java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't f...
I want to provide my application with simple licensing mechanism based on RSA algorithm.
Are there any free RSA libraries?
...
Is there an example out there for using IDecorationContext for label decorations?
By the looks of it, IDecorationContext class seems to provide some sort of contextual decoration support, but for the life of me, I can not find any sample code using this feature...
Has anybody actually used decoration context feature and if so, what use...
Hi,
I would like to reate a POST request to a given address, let it for example be
http://staging.myproject.com/products.xml?product[title]=TitleTest&product[content]=TestContent&product[price]=12.3&tags=aaa,bbb
for POST requests I've created an universal method:
private String postMethod(String url, HashMap<String, ...
Hello
My question is best illustrated with some code. Please browse through the code and read the question at the end.
enum PropertySourceEnum {
DEFAULT,
CALCULATED,
USER,
UNKNOWN
}
enum PropertyValidityEnum {
ERROR,
WARNING,
OK
}
class WorkerProperty <T>{
private T value;
private PropertyValidity...
I am using the following example for httpput connection but getting a response as bad request. Please tell me where I am wrong in the following Java code:
String responseXmlString = null;
HttpEntity responseEntity = null;
DefaultHttpClient client = new DefaultHttpClient();
UsernamePasswordCredentials credentials =
new UsernamePass...
I want to log every <jsp:include> tag.
Does the JavaServer Pages Standard Tag Library (JSTL) support logging and if so, how do I enable it?
...
(original title: help a newbie (Java))
I need a java code for downloading files from the internet ..For example I want to download doc,pdf files from the internet means i have to do it through my code ..So can anyone help me
...
I'm using Apache Ivy to manage dependencies in the project with several developers. They will share most of the Ivy configuration, but some pieces (like corporate proxy username and password) should be developer-specific. I've created a reference file for everyone to place in the ~/.ivy2/ivysettings.xml (this is where developer could spe...
How can we identify the primitive data type of a given variable?
...
I'm in the very peculiar position of trying to access a SOAP service whose answers are wrapped in HTML. This is a bug with the service provider ( SourceForge ) , acknowledged for seven months, with no ETA so far. Nitty-gritty details.
If I can intercept the actual response before passing it on to Axis, I would be able to strip the HTML ...
I'm new to Java, and have set myself a project to write so that I can do some "hands on" learning. I'm fluent with c++, but want to add another langauge to my skill-set.
Anyway, part of that project includes serial communications. I'm targetting a Windows XP platform, and cross-platform isn't really needed for this project.
I'm using N...
My dynamic compilation in Java 6 is working perfectly. However, I would like to change the output path. I have tried tons of things (I'll spare you) to no avail. Anyway, here's the working code
String[] filesToCompile = { "testFiles/Something.java" };
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
StandardJavaFileManager ...