• All Sites

5 answers

Calculate average of user input using for each

Hi Im new to java and trying to do some exercises to familiarize myself with it. I am trying to calculate the sum and average of the user input numbers using a for each or enhanced for loop. What i …

5 answers | 34 secs ago by Onedaynerd on Stack Overflow
0 answers

Dynamic Typecasting in Java

I'm writing a plugin for the Minecraft server implementation CraftBukkit, and I've come across a problem where I need to cast to a class that is found through reflection. Here's the deal. The ...

0 answers

Java Apache Lang 3.3.2 has StringEscapeUtils?

I'see that Apache commons Lang 2.6 version has the class StringEscapeUtils, but the 3.3.2 don't have it, how to escape HTML using the last version? ...

1 answer

french spell checker api

I'm working with extjs and Java EE and I have an extjs html xtype and I want to integrate a French spell checker API. But I haven't any idea about APIs and how to integrate them. Can any one give me …

1 answer

How to apply css to my html table using RenderSnake library?

I am trying to use Render Snake HTML library to programatically generate HTML for me. I am trying to make HTML table by using Render Snake as shown below - PoolName TotalSyncCount TotalAsyncCount …

1 answers | 1 min ago by user2809564 on Stack Overflow
2 answers

Deallocating memory allocated to objects in Java

In C++ you can deallocate the memory allocated to an object like this: int main(){ string myString("MyString"); string *stringPointer = &myString; cout<<myString<<" ...

2 answers | 2 mins ago by CodeWriter on Stack Overflow
1 answer

How can store ftp's username and password in android with securely way

In my class, I have ftp's username and password there is problem, if someone open and reverse .apk, it will be seen my ftp's information. How can I store and keep and secure my information in android? …

1 answers | 2 mins ago by massaimara98 on Stack Overflow
1 answer

Releasing instance of a singleton in java

I am using a singleton created by the initialization-on-demand holder idiom. When I´m done, I would like to "return" the singleton so that it can be used by other programs. Can I do this as follows... …

1 answer

Dynamc slicers and pivot charts in excel using Java

Do anyone have idea how to implement Dynamc slicers and pivot charts using any api. I would appreciate if you could send me any link or clue how to do it.I need to implement this in our BI ...

1 answers | 3 mins ago by Rati on Stack Overflow
0 answers

Try to run Fastcv's samples

Hi i try to run fastcv's samples in eclipse to Android but i can not. I follow the instructions of official tutorial but when i build app appears this error: Description Resource Path Location …

0 answers

how to edit JNI generated header file

I have an auto jni header file created with javah. Now i want to edit this header file and add/edit some functions. What is the best way to manually edit the jni header file? Things that i really need …

1 answer

Finding a regex to return all special characters in a single group

I want the regex to return all special characters in a single group. I have made the regex that would return the characters using [^a-zA_Z0-9] but this one does not return the characters not being a …

1 answers | 6 mins ago by jagvirsingh5 on Stack Overflow
2 answers

Allow worker thread to communicate with Activity

I have a thread running and it sends Events to other classes, sometimes those classes are Android Activities. In short I am using an Observer Pattern with a Thread. When an Android Activity receives …

1 answer

image in PDF from Apache FOP 1.1 with Java

i have a strange problem. im creating a PDF document from Java with apache FOP 1.1. If i create this file from eclipse, it works well. If i export my Programm as a jar file, it doesn work. the XSL-FO …

1 answers | 6 mins ago by user2942606 on Stack Overflow
0 answers

ByteBuffer causing underflow exception

I came across a problem when sending data over TCP with a custom protocol which relies on knowing the length of data so I decided that I could not send an int due to the size of the int could be ...

0 answers

How to resolve 404 error and no “header” found (Apache tiles) in the following Spring MVC project?

dispatcher-servlet.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="" xmlns:xsi="" ...

2 answers

Jersey 2.*. How to replace InjectableProvider and AbstractHttpContextInjectable of Jersey 1.*

I would like to create a class whose objects can be injected using the @Context annotation (or better yet a custom annotation for cases where I need to pass an argument to the annotation) into ...

0 answers

How to customize “Overview” page in JavaDoc?

I'd like the "Overview" page of my library's javadoc to essentially be a developer/API guide for the entire JAR. I know that adding a class to a package allows you to write ...

2 answers

How could I host my multiplayer servers?

I have a question. How could I host my multi player game? To be more descriptive, I am developing a 2D online game. I want there to be a server list, where the player can see all of the currently ...

1 answer

How to solve Execution Error in hive?

hive> CREATE TABLE page_view(viewTime INT, userid BIGINT, > page_url STRING, referrer_url STRING, > ip STRING COMMENT 'IP Address of the User') > COMMENT …

0 answers

How to upload file on android to Google Drive using python code

I am using the following python code to upload video to my Google Drive from the command on Linux. Is it possible to used on android since android based on Linux kernel? if not, is there any android …

0 answers

Deploy maven project to tomcat

I have Maven project and Tomcat server. I work in IDEA when I click in "Maven LifeCicle" -> "deploy", i have a problem: [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ TestMaven --- ...

0 answers

How to send a message to an actor from outside in Play Framework 2?

I am new to Akka and trying to write some code in Play Framework 2 in Java and use Akka. To create an actor and send a test message to it, I have: public class Global extends GlobalSettings { …

0 answers

How to write “key pressed commands” to a consol cmd?

I have the following situation: I want my Java program to interact with an external console. In order to "send" the individual commands to that console, I need to simulate what would be an "enter key …

4 answers

Eclipse jvm.dll error when loading

Trying to open Eclipse after a couple of months and get this error: So I checked that folder to see if it existed, and it did: I checked my PATH Was correct and it was also correct: When this …

0 answers

XmlAdapter not working correctly with newer version of JAXB

I'm executing a Maven Project with the below source package com.coderplus.jaxb; import java.util.HashMap; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; ...

1 answer

how to config gson to exclude 0 integer values

i hava a java class with a lot of integer fields and when i want to serialize this class to json some of them could have no value. so after serializing i have json with 0 valued integers ! i want to …

1 answers | 31 mins ago by hister on Stack Overflow
1 answer

Can't unmarchall elements from XML file with JAXB

I want to convert context of xml file to java object. But some part is extracted ok, and some has null values. Here is xml file: <OTA_AirLowFareSearchRQ EchoToken="50987" SequenceNmbr="1" ...

1 answers | 31 mins ago by nazar_art on Stack Overflow
2 answers

Cannot work with Jackson

I am wondering why there is not a determined way to work with Jackson. I just want to parse JSON string: ObjectMapper mapper = new ObjectMapper(); Customer[] myObjects = mapper.readValue(file, ...

2 answers

Nexus 5 Notification Light Color

I am using a Nexus 5 (SDK 4.4.4) and I try to send some notifications with different colors. I tried to test the colors with a simple code : @Override protected void onCreate(Bundle ...

15 30 50 per page
1 2 3