Hi (first question)
I'm trying to find the physical location of a computer using a language like Java/C. The only good accurate solution seems to be Google Gears (http://code.google.com/apis/gears/api%5Fgeolocation.html). MaxMind have an API but it only uses IP addresses and seems very inaccurate (I want the exact address whenever possi...
Hi, does anyone knows how to use the blackberry JDE API to create a screen slide animation similar to Featured Items screen in the Blackberry App World? I am aware that in blackberry 5.0, there are some transition apis to perform that. But I am looking to do it for version 4.6 OS. It has the nice scrolling effect using the scrolling ball...
What is the best J2EE server to deploy coldfusion 9 on? I know there is Tomcat but i'm sure there are others.
...
J2ME String Tokenizer:
public String[] split(String toSplit, char delim, boolean ignoreEmpty) {
StringBuffer buffer = new StringBuffer();
Stack stringStack = new Stack();
for (int i = 0; i < toSplit.length(); i++) {
if (toSplit.charAt(i) != delim) {
buffer.append((char) toSplit.charAt(i));
} else...
I have several finished, older PHP projects with a lot of includes that I would like to document in javadoc/phpDocumentor style.
While working through each file manually and being forced to do a code review alongside the documenting would be the best thing, I am, simply out of time constraints, interested in tools to help me automate t...
How do I remove a JPanel (or any other JComponent) from a CardLayout?
I do not have direct access to the Component I want to remove, but I have the index (the one used to show the Panel, when we call cardLayout.show(parentComponent, index);).
...
I have used LinkedHashMap because it is important the order in which keys entered in the map.
But now I want to get the value of key in the first place (the first entered entry).
Should there be a method like first() or something like that?
Do i need to have an iterator to just get the first key entry? That is why i used LinkedHashMap!...
I'm trying to build mS-java compatible applet and I have references to classes in com.ms.*.
But I can't find the required libraries.
...
Hi,
A snippet from my Java application:
JFrame f = new JFrame();
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gd = ge.getDefaultScreenDevice();
gd.setFullScreenWindow(f);
So what it does is make it self fullscreen. Now the odd thing is that the program is fullscreen but only on one mo...
Does anyone know how you would get the screen width in java? I read something about some toolkit method but I'm not quite sure what that is.
Thanks,
Andrew
...
I have a page in JSP that list some file that could be downloaded by a user.
Thoses files are not on the local server, they are on a remote file server.
When the user click to download a file, the webserver connect via TCP to the file server. The web server download the file and create a HTTP response for the client.
Here is my code:
...
I am trying to run a JRuby app in Spring. I use Eclipse to run it. But it doesn't compile. Does anybody know what's going on here?
Exception in thread "Launcher:/oflaDemo" [INFO] [Launcher:/oflaDemo] org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support...
Hello
I have a developed two small Java applications - a vanilla Java app and a Java Web application (i.e. Spring MVC, Servlets, JSP, etc.).
The vanilla application consists of serveral threads which read data continously at varying rates (from once a second to twice a minute) from several websites, process the data and write it to a dat...
Hi,
since Java doesn't provide a default way to do this,
what's a fast way to convert an Integer into a Byte Array?
e.g. 0xAABBCCDD => {AA, BB, CC, DD}
...
I get the following error from following piece of code. I am trying to login to Google sites service through GAE apps.
"The page you requested is invalid. "
String authenticationUrl = userService.isUserLoggedIn()
? userService.createLogoutURL(MainServlet.MAIN_URL)
: userService.createLoginURL(MainServlet.MAIN_URL+"?clo...
We are using HttpURLConnection API to invoke a REST API to the same provider often (kind of an aggregation usecase). We want to keep a pool of 5 connections always open to the provider host (always the same IP).
What is the proper solution? Here is what we tried:
System.setProperty("http.maxConnections", 5); // set globally only once...
How would you write a method to detect if the mouse cursor is inside a JFrame in java? The method should return true if it is inside or else false.
Thanks, Andrew
...
Hello. Im stuck on writing Word occurrence in a string.
I got some tip(in task notes) to use is compareToIgnoreCase. so I tried something like this:
splitwords = StringCont.split("\\s");
for(int i=0; i<splitwords.length; i++)
{
if(splitwords[1].compareToIgnoreCase(splitwords[i]) == 0)
splitcount++;
}
It is of course just w...
So if I was writing pseudo code:
if(mouseInsideFrame==true)
frame.setVisible(true);
else
frame.setVisible(false);
What method would I use for the mouseInsideFrame in the if statement?
Thanks
...
This is the first time I've ever tried to use JAXB for anything at all and I'm running into a problem.
I'm trying to use JAXB's XJC tool to convert an XSD file into Java class files when I get this error:
parsing a schema...
[ERROR] The prefix "msdata" for attribute "msdata:ColumnName" associated with an element type "xs:simpleConten...