Category "java"

Regular expression with variable number of groups?

Is it possible to create a regular expression with a variable number of groups? After running this for instance... Pattern p = Pattern.compile("ab([cd])*ef");

Default properties of Java Annotation

What are the exact default values of two meta annotations (Target and Retention) in a user defined annotation? public @interface AnnotationWithDefaultProps { }

How to replace ppt/word template data using Aspose and java

I want to update a PowerPoint template using Java and Aspose library: For Example: I have key and value in ppt as firstname:${firstname} lastname:${lastname

Reading InputStream as UTF-8

I'm trying to read from a text/plain file over the internet, line-by-line. The code I have right now is: URL url = new URL("http://kuehldesign.net/test.txt");

How to force jboss to load classes from jars in webapp's lib

I am trying to deploy my web application on jboss-6.0.0Final, which is currently deployed on apache tomcat. I have two jars one that contains same package which

Howto get list of running processes in Java using JNA in a cross-platform environment?

I need to monitor servers in a cross-platform environment : Windows, Unix (Aix, Solaris) and Linux. It means : get processes, find some files, ... So i am focu

Difference result by using sign and verify for signature

I tried to use private key to sign the message digest to generate the signature, and then use public key to verify the signature to get message digest. I want t

Rotating BufferedImage instances

I am having trouble getting a rotated BufferedImage to display. I think the rotation is working just fine, but I can't actually draw it to the screen. My code:

Swipe gesture is very slow,...how to speed up my Swipe Gesture in android?

I have horizontal swipe gesture for my Appium test but when it is executed to the swipe gesture is very slow. Is there any posible way to do it? Suggestion will

Given two trees, return true if they are structurally identical they are made of nodes with the same values arranged in the same way

public static boolean identical(treenode<Integer> root1,treenode<Integer> root2) { boolean ans; for(int i=0;i<root1.children.

How to validate Hour and Minutes that came from a Swing textBox?

I have a window that contains a HH:mm time TextField in it, in 24 hours format I need to validate if the user entered any non valid hour, like 28:00, 99:00, 24

How do I call a @Before method from my Hooks class, in TestRunner?

I am setting up an automated framework to run tests on Android emulators, using Appium. I have added logic to launch Appium and the emulator programatically, bu

High application time in GC Log

Mystery in GC LOG - Application Time. GC LOG contains more details and there is found "Application time" field and 83 Seconds was there. In that time serve

Can not open project with IntelliJ IDEA

I have a project that was already working with IntelliJ IDEA but now,when I want to open it with IntelliJ IDEA, I am facing this error message:"Contains no Inte

How to validate Hour and Minutes that came from a Swing textBox?

I have a window that contains a HH:mm time TextField in it, in 24 hours format I need to validate if the user entered any non valid hour, like 28:00, 99:00, 24

How to decode JWT token to get details of Header and Payload using nimbus-jose-jwt?

I have the following JWT token that I want to decode: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik5UQXhabU14TkRNeVpEZzNNVFUxWkdNME16RXpPREpoWldJNE5ETmxaRFUxT

Minecraft forge 1.14.4: missing library error (snapshot) in eclipse

I am trying to start modding Minecraft using Forge 1.14.4 but because of a "missing library" which is a snapshot, I will not be able to. I have tried relentle

Is there any mobile testing tools? [closed]

I want to ask about a tool or software to test j2me mobile app. On different screens and different devices. Also if available to test if appl

How to merge 3 sorted arrays into 1 sorted array in Big-O(N) time?

Trying to merge 3 arrays into one so that the final array is in order. Given int[] a = {1,3}; int[] b = {2,4}; int[] c = {1,5}; Merge the arrays so that t

mongoDB, connection refused

Show my code conf.set( "mongo.input.uri" , "mongodb://127.0.0.1/stackoverflow.mrtest" ); conf.set( "mongo.output.uri" , "mongodb://127.0.0.1/stackoverflow.mrte