Hi all,
I am using Buildr with a java/scala project.
Dependencies are descried in the buildfile. An as you may know, Buildr downloads dependencies into ~.m2 folder (as maven2 does).
I am wondering how can I import dependencies (from ~.m2 folder or buildfile) into my Intellij project to enjoy the code completion and error detection amo...
Im from php, so i want to lear java.
In php in a for loop if i want to create an array i just do
$items = $this->getItems();
for($i=0;$i<count($items);$i++)
{
$myarrayitems[$i] = $items[$i];
}
return $myarrayitems;
But in java i got arrayoutofexponsion or like that.
here is the code im trying
public String[] getItems(String url)...
Hi
There's a web page with a search engine:
http://www.nukat.edu.pl/cgi-bin/gw_48_1_12/chameleon?sessionid=2010010122520520752&skin=default&lng=pl&inst=consortium&search=KEYWORD&function=SEARCHSCR&SourceScreen=NOFUNC&elementcount=1&pos=1&submit=TabData
I want to use its search engine from a java app...
I am uploading files to s3 using amazons s3 web service.
It takes about 1 second per file, is there a way I could fire up multiple threads to do this in parallel?
Say I have a method that does the upload call:
public void uploadToS3(string filename);
how can I call fire up 3 threads and each make this call?
...
I need to retrieve and change a number in a text file that will be in the first line. It will change lengths such as "4", "120", "78" to represent the data entries held in the text file.
...
Hello there,
I'm creating an application that installs 3 Record Stores for the first run. Then on it has to work with the already installed values. The application works fine during the first run both in the emulator and in a mobile. But the second time run shows a null pointer exception after my splash screen loads. After the splash scr...
I am using adjacency lists to represent a directed weighted graph and based on the example code provided by this SO question, I have created the following:
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.Map;
import java.util.Set;
public class _Graph {
private Map<String, Link...
would you use springs AOP (aspects) if you had to track user points throughout your application?
it seems like a potential fit, since points are awarded etc. throughout the application, kind of like security checks.
(just reading on AOP, trying to grasp its potential and usage other than say security or logging).
when you wire up your...
Here's the JSP page applet tags:
<applet code="localfile" width=150 height=150>
<param name="archive" value="localfile.jar">
</applet>
Applet Code is:
package locf;
import java.applet.*;
import java.util.*;
import java.lang.*;
import java.io.*;
public class localfile extends Applet
{
@Override
public void init() {}
...
I'm trying to use javamail in a groovy script to send out an email via gmail. I've looked many places online and have been unable to get it working thus far. The error I'm getting when running my script is:
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 25, isSSL false
Caught: javax....
I am using gwt with google maps api and i have a set of tabbed infowindows. in one of them i want to have a recent tweets script running. it works fine in firefox, but it comes up as blank in ie and chrome. heres the HTML that im putting in the tab:
HTML recentTweets = new HTML(
"<body>"+
"<div style='...
Hi,
I am having some issues with an app I have deployed on GAE. Specifically, I am intermittently running into the DeadlineExceededException where the server is not responding within the 30 seconds required.
What is odd is that the code is not overly complex, it should run in milliseconds. My guess is that the delay is in dealing wit...
For Every Equal Object their Hashcode must be equal.
Java returns a unique hashcode if we do not override the hashCode() method
/* A program to check hashcode values for object
@Author Myth17
*/
class HashValue
{
int x;
public boolean equals(Object oo)
{
//if(oo instanceof Hashvalue) uncommenting ths gives error.dunno why? :|
Ha...
I would like to set the context-root of the web application part of my enterprise application (bundled as an EAR). I added an "application.xml" file which looks like this:
<application>
<module>
<web>
<web-uri>SearchResulter-war.war</web-uri>
<context-root>/searcharoo</context-root>
</web>
...
How to make a JTable non-editable? I don't want my users to be able to edit the values in cells by double-clicking them.
Any help would be greatly appreciated.
Thanks.
...
I have a simple WS that is a @PUT and takes in an object
@Path("test")
public class Test {
@PUT
@Path("{nid}"}
@Consumes("application/xml")
@Produces({"application/xml", "application/json"})
public WolResponse callWol(@PathParam("nid") WolRequest nid) {
WolResponse response = new WolResponse();
respo...
I would like to create a word document using a template, replace some variables (fields) and save it as a new word document.
I was thinking using Apache POI, http://poi.apache.org/ is it the best for this purpose?
can you share your impression from it?
...
/* Multiple Threads Executing
* Author Myth17
*/
class T1 implements Runnable
{
public void run()
{
for(int c=0;c<10;c++)
System.out.println(Thread.currentThread().getName()+" running....");
}
}
class T2 implements Runnable
{
public void run()
{
for(int c=0;c<10;c++)
System.out.prin...
Hi,
I created an application which reads an xml document from url address. Lately the logic has been modified and now instead of receiving the url address of the XML document I receive the document content itself so I have to modify the following method:
public List<Product> getProducts(String content){
List<Product> products = new...
I'm trying to create a program which needs to access a web service. E.g. a mobile program that accesses a a super market service. How do I go about it?
...