Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed yesterday.
Improve this question
I have a java code which has a mapper, reducer, and sum. my current output is : I have a map reduce java code in which I am getting each character from a TEXT file.
The output is correct, something like:
a 4
b 5
c 6
d 6
Now I want to identify in a line that say "language: Engish" or any other language, I need the output to be for all my characteristics like:
English a 4
English b 5
English c 6
English d 6
What approach can I use in my mapper/reducer.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 17 days ago.
Improve this question
I am trying to produce all permutations of an array of size N (i.e. N = 9) with possible elements Z (i.e. Z = [0,1,2,3,4])
Duplicates are allowed, but there needs to be at least one. I am able to write the algorithm to go through all possibilities but the minimum of at least one of each of Z is the part I'm having trouble with.
Looking to do this algorithm in java. Can someone help?
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
When I use [^abc] it excludes a,b,c but I want to exclude only abc not a,b,c.
Just in principle? There are several ways to do it, depending on your context. You could use a negative lookahead, for example, which will assert what the following string must not look like.
Example text:
aba abc abx
Expression:
\b(?!abc)\w{3}\b
Matches:
aba, abx
You should update your question with context if you want specific help.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I am currently writing a game in Java, where words in a string will have to be all changed to equal 5 characters a word.
eg. I am writing in Java
Iamwr iting inJav a
I wonder if anyone knows how I would do this?
First remove spaces between words.
Then split that resulting String to length with 5.
Add a space after every 5 character.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I want to know where is the difference between System.out.write and System.out.print in my Java class.
The two methods of PrintStream have different meanings:
print(int) writes a decimal representation of the entire int, while
write(int) writes the least significant byte of the specified int to the output.
This leads to different results: if you call print(48), the output is going to be 48, but if you call write(48), the output would be system-dependent, but on most systems it would be 0.
Demo.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I need to define specific numbers out of an array of 52 numbers so I can assign them an image (yes I am creating an applet). I don't think that code is necessary for any of you to answer this question. Any help would be fantastic.
I'm not sure I understand what you're asking. You can set an item in an array this way:
myArray[4] = 52;
That would set array index #4 (remember it's zero based so it's actually the 5th item) to the value of 52. Is that what you're looking for?