• All Sites

2 answers

How do i work with two dimensional arrays

I constructed (poorly) a two dimensional array to hold student names and the grades. It does prompt me for the names of students equal to the amount that i want, but it dosn't for grades. Also it ...

2 answers | 33 secs ago by donovan linder on Stack Overflow
0 answers

(Android)How to get the value of int if the notification is clicked?

Hi I am creating a chat app notification, I do have two int which is numMessage and readCount, and if I will send a message, the numMessage will count. And the readCount will remain zero. Here’s my ...

0 answers

How package works?

Android developer documentation describes the package to be use for networking by apps. Now Android has a Linux kernel, so eventually any HTTP request made by the package has to translate ...

0 answers

Convert any attribute from org.bson.Document to JSON

I've org.bson.Document objects and I need to retrieve some attributes and convert them to JSON (String). public String example(){ // a random object, it could have different attributes ...

1 answer

How to dynamically add Entity in Hibernate?

I'm a java developer. I'm using spring 4.0.1 and hibernate 4.2.21. I have a class as follow: @Entity @Inheritance(...) public abstract class Feature{ @Id @GeneratedValue protected Long id; ...

0 answers

Consuming POST Request in RESTEasy

Earlier, I used POSTMAN tool to submit GET/PUT/POST/DELETE but right now I am trying to implement a POST operation without using any REST API client. For this purpose I referred to this website. I ...

6 answers

Randomly Generate Letters According to their Frequency of Use?

How can I randomly generate letters according to their frequency of use in common speech? Any pseudo-code appreciated, but an implementation in Java would be fantastic. Otherwise just a poke in the ...

1 answer

Java/Bukkit plugin & Fat Jar: ClassNotFoundError

I can't get my Bukkit plugin to load. Caused by: java.lang.ClassNotFoundException: [20:40:59 WARN]: at ...

1 answers | 4 mins ago by Axel M on Stack Overflow
5 answers

Which is fast URLConnection or Socket

For getting data from remote url which connection type will work fast URLConnection or Socket.

5 answers | 8 mins ago by vinoth on Stack Overflow
2 answers

Parse a structured flattened json object to list of object

I am current have a Json like : { "data":{ "gatewayId":"asd", "records":[ { "ms":123, "points":[ { ...

2 answers | 9 mins ago by Jeff Lee on Stack Overflow
1 answer

Implementation of a stack so that the stack[top] is the actual top of the stack?

Instead of the top variable pointing to the next array position above the actual top of the stack.... Linked list has the stack[top] as the actual top of the stack? Is this correct?

1 answers | 10 mins ago by user3408536 on Stack Overflow
2 answers

Using regex to parse a string from text that includes a newline

Given the following text, I'm trying to parse out the string "TestFile" after Address:: File: TestFile Branch OFFICE INFORMATION Address: TestFile City: L.A. ...

2 answers | 11 mins ago by Casey B. on Stack Overflow
1 answer

Auto update web page

I have a delivery report page in my application. My customers are always interested to know the latest status of delivery of goods. I need to add an ‘auto-refresh’ functionality so that customers can ...

1 answer

How can I get my delete button to actually delete the name and the checkbox next to it?

I'm trying to get my program for user to check a checkbox with a name next to it and then be able to delete the whole row (from arrayList) when pressing the delete button. My program will look ...

0 answers

Java Netbeans gui jframe form button control

so I am writing a program using netbean's gui editor and I have some text that cycles through every time I hit the continue button. i did this by changing 1 label in the continue listener, but after I ...

0 answers

What tech stack for React JS app?

I want to use react js for my project, but I don't know what stack to use. I see folks have blended it with angular, backbone, and even java. I'm most familiar with Spring MVC but I don't want to do a ...

1 answer

Sphinx4 Live Voice Recognition Only Works Once

I've been trying all day to get the Java Sphinx4 API to recognize my speech in real time, and it does. But it only does it once, after the program is opened. After it gets that first input, the ...

0 answers

I want write a dining philosophers Socket programming

I'm new to socket programming in Java, and I want to write a program for solving Dining philosophers problem by message passing in java on Windows. A program that creates N philosophers and whenever ...

3 answers

How to set the margin of a textview dynamiclly?

I will make a timetable for my organizer app. My problem is: - I have make a first row and make the second and every other row like this, but dynamically. - I have a layout.xml for this, but the ...

1 answer

Could not establish socket with any provided host Openfire

I've been searching for a solution for this problem for 2 days now.. I have an android chat application that I want to implement sending files into it. Here's the sending code: public void ...

0 answers

Android libgdx and Google Game Services exited with a 2

Alright I have been working on this for almost a week and it is getting annoying now. My project compiles in desktop mode perfectly all the time, the Android version works fine until I start ...

2 answers

How to Calculate Avg and how to allow only positive user input values for data in java?

I am looking to find a simple beginner way to add code that If any input is negative, the program should prompt user again until  they  input  a  non‐negative  value. I also not sure how to calculate ...

2 answers | 24 mins ago by GhOst on Stack Overflow
0 answers

Jar bundled with JDBC-Sqlite and Sqlite-DB wont connect

I have run into a very peculiar problem with generating a Jar that uses JDBC and has a bundled database. This is actually for a college course and is a redundant and elementary exercise that I have ...

0 answers

Activiti ProcessEngineConfiguration bean

Did somebody meet the issue, described bellow, related with processEngineConfiguration bean? When I trying to start my AppContext, I catch error. This is my bean: ...

0 answers

Spring Scheduler cpu usage

I've noticed that after i start using the @EnableScheduling and @Scheduled annotation the cpu usage on the host which the JVM is running stays fairly high. Can anyone provide any explanation to this? ...

1 answer

After I open up a new window in JavaFX by clicking a new button, i want to initialize some things. how?

I have an application in which I want to initialize some things after i open up a new JavaFX box. Here is the code for this new window: Method from first window that opens up the other window: ...

1 answers | 30 mins ago by Rahul Shah on Stack Overflow
1 answer

android java pick color from ImageView

I'm using the latest Android IDE. I have an eyedropper icon in my UI that lets the user select a color from a bitmap that the app has thrown up. I have a listener set up on the icon, but I can't find ...

1 answers | 32 mins ago by John Larysz on Stack Overflow
1 answer

Need advice on using the JButton ActionListener

I need help or guidance on how do I use the code actionlistener so that I could for loop the jButtons. It is multiplied by sixteen since it is the number of words from the files being read on the txt ...

0 answers

Multiple Security Policies in Axis2

I am trying to apply one WS Security policy for each operation in services.xml file. This way I can implement the authorisation as well, as Rampart do not support authorisation. I can implement a ...

4 answers

How do i create a method to display the result of the following array program? Any help will be greatly appreciated

Below is the code that i have been able to develop- but I having trouble to create a code to display the result. Thanks for your help in advance. import java.util.Scanner; public class Student2 { ...

4 answers | 36 mins ago by Viktor on Stack Overflow
15 30 50 per page
1 2 3