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

What if you add @Nonnull to @PathParam(“version”)?
1 day ago
As I understand, AI/machine learning is for large organizations. Are there any ways, a small organization with say, few hundred thousand users, can benefit from it?
The answer is right before your eyes in the exception stack trace:
Failed to execute SQL script statement at line 10 of resource URL [file:/C:/Users//petstore/target/classes/db/h2/schema.sql]: CREATE TABLE users ( id INTEGER IDENTITY PRIMARY KEY, username VARCHAR(30) firstname VARCHAR(30) lastname VARCHAR(30) email VARCHAR(30) password VARCHAR(30) phone VARCHAR(20) userStatus INTEGER(2) ); nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "CREATE TABLE USERS ( ID INTEGER IDENTITY PRIMARY KEY, USERNAME
2 weeks ago
Junilu, even an integer is not guaranteed to be thread safe. That's why we have AtomicInteger.
What you pasted is a simple username-password authentication. Check out:
1 month ago
Svelte and Sapper combination looks awesome - simple and highly performant. Apart from lack of libaries, which react has, any other downside to using this in a big project.
If `writeControlMessage()` throws an exception, your task will stop getting executed by executor service. You could catch all exceptions in your `run` of the task, and see whether you find some clue.
I work on 3 microservices - one in Java, another in Kotlin, and another in node. My background is statically compiled languages, and I prefer immediate feedback I get in statically compiled language compilers. But, how can I be comfortable with working in node microservice?
Sorry, "chatty" was the wrong word; I meant "verbose"
9 months ago
I think for REST based APIs, there is more guidance available about how to design these APIs. However, for more chatty APIs like GraphQL, not enough material is available. Does the book cover that part?
9 months ago
My head spins every time I try to grasp all the concepts that Kubernetes introduces. Is it too complex for its own good?
9 months ago
You can use AtomicReference<Double> and AtomicReference<String> for balance and last5tx. And you can use synchronized methods for debit and credit, which will update these AtomicReferences.
You should test output of each individual transformation you are applying, if you are not sure. For your case:
1. When you are using String::split to remove "seats=" prefix, the first part is an empty string, and the second part is the string that you want. So, you should use [1] to access that part. So, you should remove Arrays::stream method, because you have only one part per "seats=xx" string.
2. For constructing Seat from integer, you can use constructor as a method reference - Seat::new. Of course, you can use plain lambda as well like this: (i -> new Seat(i))
9 months ago
I think you got this code from somewhere else, and trying to make it work. There are many things wrong with this code.
Your linked list is of StaffFactory instances, instead of Staff instances you create. Your print list does not print. There are just two things that stand out.
I suggest - instead of writing so many classes (abstractions) beforehand, approach the problem step by step.
1. Create a new staff of just one type first, add it to linked list, print the linked list.
2. Once this is working, create different types of Staff in your code (not from user input), and make sure the linked list is still working.
3. Add user input, and dynamic creation of different staff instances.
9 months ago