Salil Wadnerkar

Ranch Hand
+ Follow
since May 28, 2016
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Salil Wadnerkar

We are thinking of how to migrate spring jersey app to webflux gradually, by converting jersey services to webflux controllers, and converting jersey filters to webfilters one by one, controlled by a feature flag. Since webflux can run on modern servlet containers, I am thinking of mapping the original path to a servlet that just does the forwarding based on the value of the feature flag. However, as I understand, spring boot does not allow webflux to co-exist with spring MVC/Jersey. What's a best way to migrate existing app to webflux?
1 week ago
Thank you, Jeanne!
In what ways OCP 11 is more stringent than OCP 8? I have OCP 8 certification, and I am finding out how much I need to prepare for OCP 11.
What are some of the compelling reasons for companies using Spring 4 to upgrade to Spring 5? We have Spring REST based microservices.
1 month ago
You can check winCheck again in an if statement, before executing parts which you don't want to execute if that check is true.
5 months ago
To answer your first question, scanner.nextXXX() methods are blocking, and they wait for user input.
5 months ago
JSON web token serves two purposes: to authenticate user, and to store user session related information. So, yes, user-id, their last question, are all fair bets, for adding to JWT.
About splitting of APIs, ideally, you should not mix adding data (POST) with getting data (GET). So, you should keep them separate.
5 months ago
"\b" just matches the end of a word character, which is space. But, since you specified only one character match, <space><space>, is interpreted as <space><empty word><space>, and that is why you are getting an empty word as one of the values. Try "\b+" or "\s+" so that it matches all the spaces between the words.
5 months ago
I suggest that since you are not familiar with how java servlets work, you can forget about this task for now, and just get "hello world" servlet working. This will introduce you to servlet mapping, and writing simple servlet that handles GET request from browser. Then you can develop a simple program where you submit your name via POST request, and the server responds back with "Hello, <your name>". Once you have these basic pieces working, you can easily finish your task.
Your interpretation of moves doesn't seem correct to me. Depending upon the existing heads and tails, you need to choose the move. And there are only 4 moves that you can choose.
Also, it's a dynamic programming question, I think. Because from the solution to the sample problem, it doesn't look like greedy solution will solve this.
5 months ago
Assuming saveItem method raises an exception if the item already exists in DB, you can surround this call with try.. catch, and collect the items in a list for which this call raised an exception, and then return this list from saveItem method.
5 months ago
Browser sending you the data, and the servlet saving it can be done via POST request.
Typically, index.html is the first page people see, and I am assuming you want to provide both GET and POST for this page.
Your player.html handling servlet should handle the GET request by reading from database, and creating a response (typically via JSP).
Your web page is the code browser executes. So, that is javascript code in the HTML page your server sends to the browser, upon browser request.
Your servlet is the code executed by your server so that it can send a HTML page (+ javascript) to the browser.
In Java, you can use a servlet container like Tomcat to execute servlets. You can just google for any introductory article about writing servlets and executing it on Tomcat.
p is a parameter to the lambda, just like "panda" is a parameter in your method "check". And just like when you invoke "check", you pass arguments, which then become parameters to "check" (and that is how "panda" parameter gets the value), when you call a lambda, the argument you pass becomes the parameter ("p" in your case)
5 months ago