All Questions
21 questions
1
vote
2
answers
234
views
Parsing words from string
I am learning Java, so I am beginner. I know I can do this with split function but I want to improve my algorithm knowledge.
I will be glad if you help me. Thanks.
inputStr variable is contains the ...
2
votes
1
answer
301
views
Reading bytes between two quotes from a stream and decoding it to its appropriate character set [closed]
This is a component for a lexer which operates on a byte input stream that handles reading and decoding the contents of a string contained within double-quotes. The validity of the encoding is handled ...
0
votes
1
answer
2k
views
Parsing messages with fixed-width fields into Employee objects
I'm writing a application that reads from a queue of messages from a legacy mainframe system.
Some characteristics of message in the queue:
Message from the Q is always fixed length plain text : 64 ...
2
votes
4
answers
911
views
Split a string into a list of tokens
I have the following assignment that I succeeded in solving, but the code is very inefficient. I would appreciate if someone could show me a more efficient way, perhaps with substring. Note that I am ...
4
votes
2
answers
11k
views
Parsing a string with named sections and a key-value pair on each line
I have a response String as shown below which I need to parse it and store it my class. Format is shown below:
task name followed by this dotted line ------------- ...
1
vote
2
answers
74
views
Function that check's file type based on certain keywords
I have a function that breaks up a source file and checks each token against a keyword list to determine whether its a particular file type. How can I improve this function? ...
4
votes
3
answers
468
views
Parsing huge data coming from a URL
I need to parse the data coming from the URL which looks like this:
...
5
votes
1
answer
385
views
Create Java object from from page content or plain text
My job is to make a specified java objects from web page that contains following text:
Companies:
...
4
votes
1
answer
4k
views
Boolean expressions from infix to postfix notation using Dijkstra's Shunting Yard algorithm
I began working on a Java library that receives a boolean expression such as not A and (B or not C), compiles it to a circuit of logical gates \$\mathcal{C}\$, ...
8
votes
1
answer
918
views
A little integer parser vs clean code
I was said to post this as a new question. I improved my code from:
Little part of the string to integer parser vs Clean Code
However I think that it break SRP as it parses, iterates through string ...
4
votes
3
answers
280
views
Little part of the string to integer parser vs Clean Code
I started reading a Clean Code book and some other articles on the Internet about OOD and design patterns and I'm a little confused. I've started to code a little string to integer parser which ...
4
votes
3
answers
3k
views
Parsing a single CSV line into a list of strings
I've written this method to replace an older method that was much simpler, but used the regex split method and couldn't tell if a comma was in quotes/brackets/etc. and didn't read double quotes as ...
7
votes
2
answers
1k
views
Identifying which paragraph, if any, is a superset of all words in a document
Description
need to find out the paragraph number which is containing all the words in the file.
input file java.txt
What is a JVM?
What is the most ...
4
votes
1
answer
153
views
Stripping out all /* */ comments from a paragraph
I've written this code keeping the following cases in mind and I think I've covered them all. I'd really appreciate if someone could help me determine if I've covered all of them.
Cases I considered:
...
5
votes
3
answers
26k
views
Printing every digit of a number
Which of these three methods is better?
...