Tagged Questions
0
votes
0answers
16 views
Get part of string that is not html in Java
In my Java application I have String that have to be edited. The problem is that these Strings can contain HTML tags/elements, which should not be edited (no id to retrieve element).
Scenario (add ...
4
votes
1answer
68 views
What am I missing here? [Solved]
I've been trying to solve P17(http://projecteuler.net/problem=17) on ProjectEuler, but apparently I'm missing something, since the answer I get (20908) is smaller. Can somebody take a look at my code ...
0
votes
1answer
18 views
Java method which uses a file system hierarchy to create a tree
I'm facing the following issue and I've been racking my brain looking for a solution, but nothing comes to my mind by now:
I have a file system hierarchy, something like:
/HANDLERS/HANDLER1
...
0
votes
3answers
32 views
I need to check the occurrence of a particular symbol at the beginning of my String
I need to check the occurrence of a particular symbol say #$ at the beginning of my String.
Simply, I need to get the
boolean symbolExist true for all the following cases,
#$MyString
...
0
votes
5answers
52 views
How to return the next indexOf after a previous?
For example:
str = "(a+b)*(c+d)*(e+f)"
str.indexOf("(") = 0
str.lastIndexOf("(") = 12
How to get the index in second bracket?
(c+d) <- this
0
votes
0answers
16 views
“document: null” from DocumentBuilderFactory on an XML response?
I am creating jUnit tests to check that my proxy servlet which fetches XMLs for a client application returns them without corruption or any changes.
In my jUnit class I have a doGet method which ...
0
votes
3answers
39 views
In Java String, How to cut a part of a String by just 1 line of code (probally use Regex)?
given this string http://verylongurlverylonngurl/image.jpg & I wanna cut all the part before the last "/". For example, I wanna remove the part http://verylongurlverylonngurl/ of the string above. ...
-3
votes
0answers
29 views
concatenate two String of data error
I am creating a program to concatenate two String however I keep receiving an error with "dna.concat_DNAs" I tried making "dna.concat_DNAs" a constant and a field but I am still receiving can anyone ...
0
votes
2answers
16 views
How do I read a certain string on a line from a file, using scanner?
I'm trying to read a text file which looks like this:
A,32,0,0,0,0
And right now I have a static method which reads from that file. I'm getting this NoSuchElement exception, while earlier I had a ...
-1
votes
0answers
23 views
Writing a base64-encoded file in Java
I have a problem to write a file encoded in base64.
I have the contents of a xml files stored in a field of a table in a database. Some of them are stored in base64, not all.
What I need is to write ...
1
vote
7answers
52 views
Java - Split string
i have string which is separated by "." when i try to split it by the dot it is not getting spitted.
Here is the exact code i have. Please let me know what could cause this not to split the string.
...
0
votes
3answers
63 views
Sorting a string alphabetically
I am a Java beginner. I need to sort a String of names alphabetically. the Strings are not submitted by the user but read from a file with a list of first names, last names and phone numbers. I am ...
0
votes
2answers
19 views
Implementing a complex method to compare two sets of Strings when groups of one are associated with a third
I have a rather complex method that I need to implement. So please bear with me as I try to describe it in as simple a way as I can.
I'm given a set A of Strings that represent filenames - let's say ...
0
votes
3answers
40 views
Combining 2 string characters
I need to create a method which asks the user to enter two words. The first word in one variable, and second word in another variable. The program is to combine the user’s entry as shown in below:
...
0
votes
2answers
35 views
Removing select characters from a string
I'm a student trying to figure out a problem.
I need to create a method that removes any characters found in a specified string from another string.
So if String str = "hello world" and String remove ...