Ron McLeod

Bartender
+ Follow
since Feb 12, 2013
Ron likes ...
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
Forum Moderator
Richmond, BC, Canada
Cows and Likes
Cows
Total received
276
In last 30 days
3
Total given
101
Likes
Total received
522
Received in last 30 days
6
Total given
796
Given in last 30 days
22
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ron McLeod

Rather than opening the war file in the editor as a text file, use the jar command from the command line to show the contents of your war file

For example:
8 hours ago
It looks like the server-side is having problems dealing with the user name provided by the client.

This is what a normal FTP log-in dialogue looks like:


In your case, it appears like the server had an issue with the user name provided by the client, and aborted the log-in procedure.


Check the log for the server-side to see if it provides any clues.  Also, if you can capture the network traffic using something like tcpdump or Wireshark / tshark, and take a look at the messaging between the client and server - what user name did the client provide to the server?

12 hours ago

tony narloch wrote:I have a new error. .. "YearData cannot be converted to City"


Maybe I am missing it somehow, but I don't see any reference to YearData or City in the code that you have posted.
1 day ago
You could modify your regex to allow the last group to have between zero and three digits.  You should also escape the period, since it has a special meaning in regex expressions.

There are plenty of online sites to use to test and tune your regex expressions.  This one is quite good: Regular Expression Test Page

Mark D Anthony wrote:This is working fine if the timestamp has 3 milliseconds, but if there are 0 milliseconds, 1, 2, etc. then the test fails.

What changes should I make so that this assert statement would cater for all of the possible timestamps?


Do you mean that the milliseconds portion of the timestamp could have between zero and three digits?:
    zero digits:   2018-11-16 13:55:23.
    one digits:   2018-11-16 13:55:23.4
    two digits:   2018-11-16 13:55:23.41
    three digits:   2018-11-16 13:55:23.415

Markus Herrera wrote:Here are the requirements for a project I'm having trouble with. ...


Welcome to the Ranch

Maybe start by explaining where you are running in to trouble.
2 days ago

bad mad wrote:.. the time was determined by comparing the total time spent in the application vs the TTFB reported by Chrome Dev Tools.


Did you take network latency in to account?

2 days ago

zach pass wrote:I have tried a little but the code is quite ugly but this is what i currently have ...


Also very difficult to try and debug.  This is an example of what your output would look like .. little things like missing quotation marks are difficult to spot which when everything is assembled in one large string.
2 days ago
Also - this object inside your document has a duplicate key - p1 is used twice.


If that was by-design, you might want to just have one object named p1 containing key-values pairs from both.
3 days ago

Isaac Ferguson wrote:I am using the next code.


What are you expecting that the code will do?
3 days ago

Isaac Ferguson wrote:I get the error when using reader.beginArray();


You didn't include the complete stack trace, but I bet that this exception was at line 11:
    String value = reader.nextString();
not line 8:
    reader.beginArray();


Isaac Ferguson wrote:Any idea, please?


After entering the array, you are trying to read a string, but the next value found was an object.

Looking at your document, it has a [ token which indicates the start of an array, followed by a { token which indicates the start of an object.  There is no string.

3 days ago

ameer shamaa wrote:i have one error i dont know how fix it help


There's a lot of code there - what exactly is the error?
4 days ago

Isaac Ferguson wrote:I think that as it is a json result fro a rest call, I should convert it into a array...


What you have posted appears to be part of a larger JSON document, which looks mal-formed.  Right at the beginning, the [ character indicates an array is following, but then there rather than array values, there are key-value pairs, which would normally be part of an JSON object. 

Can you post a smaller and complete one to look at?

Changing the beginning array to an object, your data would look like this:
4 days ago
Your WordsCompare class has a method called setWords which is never called, so wordOne and wordTwo do not get set was you want.
6 days ago

Steve Dyke wrote:Can this be corrected with a replaceAll method?


Maybe - but it should be fixed whatever is providing the information, not on the consumer-side.  Shouldn't the information actually be something like: NAME: DIVAN 2 PAX TYPE: ASF ?
6 days ago