All Questions
229
questions
-1
votes
2
answers
348
views
Find an element in a list/array (a big list)
I'm actually doing an easy CodinGame --> I have to find if an element exists in a list.
I've tested a first solution, it was working but it wasn't really optimized (according to the machine).
So I'...
0
votes
1
answer
63
views
How does if condition finds unique letter in the string?
I am newbie here!!
I am unable to understand how "s.indexOf(s.charAt(i), s.indexOf(s.charAt(i)) + 1) == -1 "
checking for unique letter in the string. Below is the code,
String s = "...
1
vote
0
answers
143
views
Using tFTPput to fetch a single file amongst 50000 files from the source local directory to upload to FTP
Is there a way to get exactly one file based on the exact match in filename from the list of 50000 files from the source local directory and upload it to FTP remote directory?
JOB:
context.dir="\\...
0
votes
1
answer
1k
views
find prime numbers between two numbers
I want to find prime numbers between two numbers that we get from the inputs, but I get this error:
num cannot be resolved to a variable
I read the code many times but couldn't find the problem!
Can ...
0
votes
1
answer
540
views
How to Highlight Replaced Word Using Apache POI
How to highlight Replaced Word:
I am using this code for find and replace words in docx file with Apache POI,
but I want the word that is replaced to be highlighted or its color changed.
...
-2
votes
2
answers
442
views
How to escape the html tag if its closing tag is not found in a string using java?
I have a string like below
"Its a great <strong><b>job</strong>".
I need to get the output like below
"Its a great <strong><b>job</strong>&...
-1
votes
1
answer
79
views
Find Word Count"- My code doesn't work properly
"Find Word Count"- Instructions:
Given an input string (assume it's essentially a paragraph of text) and a
word to find, return the number of times in the input string that the word is
found....
0
votes
1
answer
150
views
Finding certain words in a paragraph class with each line in an array
I have been trying to make a simple menu where the user can enter a line that they want to add to the paragraph and then search the word(s) that they enter.
However, in the case of searching the words ...
0
votes
1
answer
48
views
Finding multiple set of given words in a paragraph array
I'm searching for word(s) in a string array and if found I want to return their line.
I have tried to divide the searched input in an array and then search it in the paragraph array line by line. ...
0
votes
1
answer
193
views
How to find index of int element in array
everyone..
So I wanna find the index of an int element in array. but the element has 2 index (there is 2 index that have same element). How could I show the indexes for an element?
here is my ...
0
votes
0
answers
29
views
Array Index Out Of Bond while running the below code, but why? [duplicate]
public class Tester {
public static int[] findLeapYears(int year){
//Implement your logic here and change the return value appropriately
int[] findingYear = { };
int i=0;
do{
...
1
vote
2
answers
1k
views
Command Prompt can't find my java files no matter what i do
I've been trying to get this to work practically all day. I'm fairly new to programming and I had an assignment for school to create a chat server (though this is beside the point). So I finished my ...
0
votes
1
answer
184
views
How to find text on webview then highlight it?
Im successfully learn how to find a text on webview and highlight it using this code.
webview.findAllAsync(string);
And it perfectly work, I want to use it to trigger someting like If webview found a ...
1
vote
2
answers
41
views
Find Method in Linked List does not work with some numbers
I don't know why find() method does not work for some numbers. Here is the code.
I'm talking about finding element in Double Linked List.
public DLLNode<E> find(E o) {
if (first != null) ...
0
votes
3
answers
169
views
I am trying to code a find and replace Java program [duplicate]
this is the loop im executing
for(int i=0;i<str.length;i++){
if (str[i]==strFind) {
str[i]=strReplace;
count++;
}
}
The problem is that if the last word of the sentence has ...