Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
In the apache commons-codec API what is the difference between generating a shaHex, sha256Hex, sha384Hex, sha512Hex?
These are static methods in the DigestUtils class.
These are simply implementations of different algorithms in the SHA family. See this section of the Wikipedia page on SHA for a summary of the differences.
And in fact the javadoc for DigestUtils makes it clear which methods implement which functions.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am having a lot of trouble solving this error. Please help. The error is with fxRates.
private HashMap.String.Long.fxRates = newHashMap<String.Long>(40);
You have to use , not .
private HashMap<String,Long> fxRates = new HashMap<String,Long>(40);
Please read some basic java tutorial before proceeding.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I got a question states that, "we will give you a string ex:Most of the people are living in apartments and they are rich too. In this given string we have to remove "are" and we have to display the rest things...
I don't know what to do???
By simply using : "Most of the people are living in apartments and they are rich too".replaceAll("are","");
see the documentation
http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#replaceAll(java.lang.String, java.lang.String)
use
"Most of the people are living in apartments and they are rich too".replaceAll("are","")
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm trying to translate a chess application that I had made in cpp, to java.
In my cpp version I had a structure which created a tree of strings.
Note, it was not a binary tree.
It was a vector of pointers, so from each node I had multiple subnodes stemming from it.
Does any one know how I could create a similar class in java?
public class ChessObject() {
private String description;
private List<ChessObject> subChessObjects;
}
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a question about how to write a regex expression to get the key and value pairs from below string?
{"ReturnCode":"0","ErrorMsg":"success","EncryToken":"##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
Could someone help me learn on what this can be done?
Thanks very much.
This one should suit your needs:
"([^"]+)"\s*:\s*"([^"]+)"
The key is in the first group, the value in the second one.
Visualization by Debuggex
You can use Java JSON or the Google Gson to parse this JSON string ...
as illustrated here - http://answers.oreilly.com/topic/257-how-to-parse-json-in-java/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have to store this value.but eclipse shows error on that.
private final long cal_To_eV = 26131952998320000000L;
plz tell me how to store this.
Have a look at the class BigInteger.
You can use String not long. Also you can use BigInteger or BigDouble.
private final BigInteger cal_To_eV = new BigInteger("26131952998320000000");