Daniel Demesmaecker

+ Follow
since Sep 14, 2017
Daniel likes ...
Java MySQL Database Spring
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 Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Daniel Demesmaecker

So I rebuild my project, that's seemed to fix the biggest problem.
I can connect to my db and everything works, but on startup I still get an error, that seems to be of no importances, so I could ignore it, but it still bugs me, so maybe one of you could explain to me what it meens and how to fix it?

17 hours ago
I forgot the most important thing,

The Stacktrace:

1 day ago
I'm making a standalone springbootapp that uses jpa-hibernate for the databasconnection and javafx as frontend.
First I was using a testdb from db4free, everything was working fine, untill it didn't anymore...
I don't see what the problem is, cause I have done the same thing numerious times before and reusing a lot of the code.
Since I couldn't make it work with the db from db4free, I set up a local mysqldb.
I removed my .m2 folder, cleaned my project and recompilled.
But I stille get some errors, while before I got a nullpointer for the transactionmanager, now I can't connect to the db at all.
I tested my connection with datagrip, so the database is online and I'm using the right credentials.

Something that's also weird, it should the 5.1.46 mysqlconnector, but in my stacktrace I could see it refers tot he 5.1.39 connector.

Any tips would be greatly appreciated...




A Entity:

A Repo:
1 day ago
In javafx you could consume the event, but I don't know if it will work in swing
1 day ago
There would be six
2 weeks ago
A full house is still three of a kind, if the player chooses to put it at three of a kind instead of full house, cause for example he already has filled in full house, he should be able to.
Poker and yahtzee are about the same, one is with dice, the other with cards...
2 weeks ago
I come from a java background, but start a new job tommorow, where everything still is written in vb6.
To get myself a bit familierd with the language I started to make a simple yathzee game.
Everything works great, but somethings take way more could as they should.
For example I included the code I use to check if the player has a three of a kind...

Take note of the second if statement, there most be a easier way to do this...?
2 weeks ago
I don't understand the question really, especialy the part about the constructors, but I can tell you this, you can't change the size of an array, you would have to create a new array each time with a different size.
I would use an arraylist instead
1 month ago
Interface variables are by default static, that why you can call it simply by the variablename, they're also final, so you wouldn't be able to change it
2 months ago
Since this is java general and not beginner, I worked out a example.
You could find ways to make it harder, but this is just to get you started.


2 months ago

Thomas K. Gallant wrote:in my AllQuestion I wanna make sure that the good answer is always the D answers which is the good one but shuffled in the code.

I don't realy understand what you meen by this

I need to be able to run this in console mode but I have no idea how.

To aske the question you could use System.out.println, like you have bin doing. To take in the result you have to use a scanner.

By the way this question is a duplicate : duplicate question
2 months ago
I didn't run you code, but at first glance you make two rectangle, but instead of positioning them different, you give them a different size, so the first rectangle is probably shown but is hidden behind the second.
I would advise you to eather set the positioning with x and y or use a splitpane instead of a stackpane
2 months ago
If I was you I would use an arrayList, not an array, if you use an arraylist you don't have to ask the user how mutch values the user wants to put in.
Anyhow, you could ask the user to seperate the values by an space. Take it all in as an string (String s = array.nextLine();), then split the string (String[] splited = s.split(" ");).
Loop through it (for(int i = 0, i < size, i++)) and asign in it (arr[i] = Integer.parseInt(splited[i]);)
2 months ago
@Amadeus: Which idea do you use, dosn't have it an build in scene builder? That also could fix your problem
2 months ago