|
Zaphod42 posted:I know, its all compiler-time, not run-time. But still, readability. I limit it's use for when I'm in the same function and I just told you the type on the RHS of the =. Never as the assignment of a method call that returns something, that's just killing your readability as you said.
|
# ¿ Sep 10, 2019 23:49 |
|
|
# ¿ May 9, 2024 12:02 |
|
Do you have the HTML structure for your page figured out? What are you using for your view (JSP, thymeleaf, are you writing out HTML in your servlet)? In any case what you want is a servlet that has a URL mapping likepre:/car/{VIN}
|
# ¿ Aug 6, 2020 19:55 |
|
Hippie Hedgehog posted:Yes. Infinitely yes. Look at this guys granytyping, not double VPN jumping like he should. seriously pray you don't have to do any coding in a java ide over remote desktop, it's the worst
|
# ¿ Feb 12, 2021 03:21 |
|
I sent you a PM, hit me up if you want to do a live debug over GChat
|
# ¿ Apr 8, 2021 03:08 |
|
Guildenstern Mother posted:I'm working on a project with a buddy and when I go to run his latest push I'm getting this error. I would expect that to happen since you are telling Spring to not start the DataSourceAutoConfiguration which would create the Bean needed by all of your data classes, so of course they are complaining about a missing bean. That kind of fix is like my monitor looks fuzzy, solution: unplug it. It could be a few issues, the properties you are setting are not the ones that Spring is looking for. i.e it can't find the URL because it's looking for it under a different prefix i.e. when using a connection pool. But I doubt this is your case since you are just trying to get it to talk to a single mysql db instance. I am going to guess and say that your mysql driver is not somewhere on the classpath that Spring can find. It does something on startup that registers the driver as something that can handle the jdbc:mysql url. If it's not on the classpath then the URL isn't going to work and leads to the kind of errors you are seeing. I recall having to manually put the jdbc driver in a tomcat folder, but I thought new Spring Boot stuff got rid of that. Still worth a shot to make sure the mysql driver is getting loaded in the embedded application server.
|
# ¿ Feb 18, 2022 01:26 |
|
I recall using an Enum to express the states of the SM and then creating a SM interface that defined the actions and the Enum implement it. In each enum I then had to define the action and return the next state. Then I created a execution class that would take that SM interface and basically just go through a loop until it reaches a terminal state. I don't know if it could be made simpler with the newer Java versions, but that should give you an idea.
|
# ¿ Mar 2, 2022 05:10 |
|
When I'm having trouble with lambdas I first try to write things as a function and then turn them into a lambda. In this case you just have a really convoluted boolean expression, Java code:
If you're sure that functions passes all the criteria you want, then you can convert it into a lambda easily. Java code:
|
# ¿ Sep 30, 2022 20:38 |
|
It seems like there is a specific type for the FruitInspector that has a pass method. Lambdas let you create a quick implementations of these simple interfaces and I'm guessing in this case this should workJava code:
|
# ¿ Sep 30, 2022 21:08 |
|
I really dislike teaching newbies the streaming APIs, what was wrong with doing it the old fashioned way with for loops. I feel like stuff was so much simpler to reason about.
|
# ¿ Nov 30, 2022 02:36 |
|
|
# ¿ May 9, 2024 12:02 |
|
Tempora Mutantur posted:(the answer will be "because their management pays you to write it using vert.x" but I'd like to know if there's an actual good reason) Seriously dude, you think working at any of the FAANG companies will get your relevant experience in technology X, only to find that internally they use some janky custom built poo poo that then spawned into the frameworks you love.
|
# ¿ Feb 1, 2024 19:46 |