Thứ Năm, 1 tháng 3, 2018

Auto news on Youtube Mar 1 2018

Hi,

I'm Thorben Janssen from thoughts-on-java.org with a new Hibernate Tip.

I got the following question via email and thought

that it is an interesting topic for a Hibernate Tip.

So here it is:

I saw JPQL queries using JOIN,

LEFT JOIN and JOIN FETCH clauses

What are the differences between these 3 join clauses?

You might know the JOIN and LEFT JOIN clauses from SQL.

It supports clauses with the same name

and a very similar syntax.

The JOIN FETCH clause is specific to JPA

Let's take a closer look at all 3 options.

Let's start with a simple JOIN clause.

In JPQL, you can define a JOIN clause,

based on a specified association between 2 entities.

Your persistence provider, for example, Hibernate,

translates this into an SQL JOIN clause.

The SQL JOIN clause tells the database

to combine the columns of 2 tables

to a set which you can use within the same query.

You can define a join condition that specifies which rows

of each table shall be joined

with each other.

All rows which don't fulfill the condition are not part of the set.

In most cases, this condition compares the

values of a primary key column of one table

with the values of a foreign key column of an associated table.

But you can also define more complex conditions

using multiple columns of both tables.

In JPQL, you need to define join clauses

based on association mappings.

This mapping provides the names of the foreign key and primary key columns.

That makes the definition of the join clause easier,

but you can't add any additional predicates.

Here's an example of a JPQL query that returns all Author entities

who've written a Book

which title contains the word "Hibernate".

It joins the Author entity with the Book entity

and uses the title attribute of the Book

in the WHERE clause.

If you activate the logging of SQL statements,

you can see that Hibernate generates the

following statement for the JPQL query.

It uses the defined many-to-many association

to join the Author table with the

association table BookAuthor.

It then joins the association table with the Book table.

The LEFT JOIN clause is similar to the JOIN clause.

The main difference is that a LEFT JOIN clause includes all rows of the entity

or table referenced on the left side

of the clause.

I use a LEFT JOIN clause in this query

to select all Authors with the lastName "Janssen"

and their Books.

If the database contains a Book for a specific Author,

the query returns it as the

second element in the Object array.

Otherwise, that array element is null.

A simple JOIN clause would only return the Authors

who have written a Book.

The second element of the Object array

would never be null.

Hibernate generates the following SQL statement

for this query.

It selects all columns mapped by the Author

and Book entities

and uses the defined association to create a left join

between the Book and the Author tables.

The FETCH keyword of the JOIN FETCH clause is JPA-specific.

It tells the persistence provider to not only

join the 2 database tables within the query

but to also initialize the association on the returned entity.

You can use it with a JOIN and a LEFT JOIN statement.

Let's change the first example and replace the

JOIN clause with a JOIN FETCH clause.

The JPQL query selects Author entities.

But as you can see in the SQL statement,

Hibernate now selects all columns mapped by the Author

and the Book entity.

Hibernate then maps the result set to Author and Book entities.

It uses the Book entities to initialize the

books attribute of each Author entity

before it returns a List of Author entities.

OK, that's it for today.

If you want to learn more about Hibernate,

you should join the free Thoughts on Java Library.

It gives you free access to a lot of member-only content

like an ebook about the Java 8 support in Hibernate,

a printable PDF version of this Hibernate Tip,

lots of cheat sheets and a video course.

I'll add the link to it to the video description below.

See you next week for a new Hibernate Tip

and if you like today's video,

please give it thumbs up and subscribe below.

Bye

For more infomation >> Hibernate Tip: What's the Difference Between JOIN, LEFT JOIN and JOIN FETCH - Duration: 6:16.

-------------------------------------------

What Is the Difference between Laxatives and Stool Softeners? - Duration: 2:36.

For more infomation >> What Is the Difference between Laxatives and Stool Softeners? - Duration: 2:36.

-------------------------------------------

Difference Between Fan Zhendong and Tomokazu Harimoto - Duration: 6:28.

Welcome back to my channel.

Today, I want to share with you my coaching opinion

about the forehand topspin technique in table tennis.

I want to analyze the difference between top Chinese players (Fan Zhendong,

Ma Long) and Harimoto Tomokazu.

Some players asked me to correct their forehand techniques.

For me, during the stroke, you should focus on the position of the elbow.

Because this is the connection between your body (power generation) and your forearm

(power transfer).

However, I realized that there are some different opinion about this aspect.

I've discussed with some coaches in France (BE1,

or even BE2 coaching certificate).

Some of them don't emphasize on the position of the elbow, or insiste the player

to put their elbows far from the body.

Meanwhile, I always ask my players to keep their

elbow close to the body during the forehand topspin.

For Chinese table tennis coaching, the forehand topspin stroke is an extend of the

forehand drive technique, but with the use of the body and the leg.

Chinese coaching focuses on the consistency of the stroke.

Consistent first, and then Power later.

Let's look at the forehand drive technique of Ma Long and Fan Zhendong.

They both put the elbow very close to the body.

Because it's the drive, to control the ball (not to loop

kill the ball).

The closer you contact the ball near the body, the more precise

direction that you can drive.

And then, Fan Zhendong stepped back, and performed the forehand topspin technique.

Look at the elbow of Fan Zhendong, he kept it very close to the his body.

And then he used the leg, the rotation of the hip to

generate power to the stroke.

Elbow Close TO THE BODY

Step Back

Weight Transfer

Rotate the hip

HIt forward

This is the key that Chinese players always dominate the rally with their powerful,

and consistent forehand.

They make less error during the rallies.

I've discussed this aspect with some coaches, but they didn't

agree with me.

They said that players should put the elbow about 25 cm far from the body, to hit

the ball.

So it depends on the coach, that you can have the different techniques.

It's up to you to choose your approach.

Look at Ma Long forehand techniques.

He also puts his elbow very close to the body (touch the body) at the beginning of the strokes.

And then rotate the hip, and then release the forearm and the elbow a little

bit forward.

This is the Chinese forehand technique which uses a lot of footwork, and the

lower part of the body in the strokes.

And this is the forehand topspin technique of Harimoto.

You can clearly see the difference.

The elbow is far from the body from the beginning to the end of the stroke.

He rotates more his shoulder.

For me, this stroke mecanism is easier to learn and to apply the force to the stroke.

But it is prone to making more error because of the far distance of the elbow.

So it's up to you to choose.

Chinese forehand technique is harder to learn, but you

can control the force with your body.

Please note that, Harimoto is still growing.

For now, his physical is not good enough to use the "power from the ground".

But in the near future, he will have a much more powerful strokes.

At this moment, his main weapon is the agressive backhand

attack.

He is not like other Japanese players, he has more Chinese style (power orientation).

(His parents are both ex-Chinese players).

And also, he doesn't use Chinese rubber on his forehand.

Harimoto uses Japanese rubbers on his forehand.

So his forehand technique rightnow is adequate to Japanese rubber.

So it's up to you to choose!

Chinese techniques or Japanese techniques or European

techniques, both have advantages and disadvantages.

Try to master one and enjoy this wonderful sport!

See you, EmRatThich!

For more infomation >> Difference Between Fan Zhendong and Tomokazu Harimoto - Duration: 6:28.

-------------------------------------------

The UF Health Difference with Endometriosis - Duration: 1:17.

The UF Health difference is we have all sub-specialties presented

under the same umbrella. So, we can collaborate with other specialties

either on the medical side to make the make sure the patient is ready for

surgery, she's healthy enough and will endure the stress of surgery. Or

surgically speaking, working with other surgeons from different specialties in

this way. The patient will not have one surgery

and then come back for another surgery and then you don't need anything else

done. From the minute the patient gets referred to UF Health to her first visit

with us, all my nurses, all my staff are all educated on endometriosis, pelvic

pain, surgery complications, how to spot complications on the phone and when to

bring the patient back. All the nurses in the pre-op area, in the operating room, or

even the scrub techs and the post-op area, they're all trained under the same

umbrella and we have an educational program for all the staff that touches

or gets involved in the care of minimally invasive surgical patients. So this is

the UF Health difference.

For more infomation >> The UF Health Difference with Endometriosis - Duration: 1:17.

-------------------------------------------

What's the difference between thermoplastics and thermoset plastics? - Duration: 1:09.

>> The way I explain this to my mom.

Is there's two different kinds of plastic.

>> Both of which you use when you make breakfast.

All right. And the two different kinds of plastic.

Are butter and eggs.

Butter is what we call a thermal plastics

when you heat it up it melts.

>> And when you cool it down you put it back in the fridge

it becomes solid again.

That's a thermal plastic butter thermostat is an egg.

An egg is liquid it's a liquid what we call a resin.

And then when you cook it it becomes a solid.

And then if you heat it up more you don't melt it.

That's a thermal set as an egg.

So people make butter make eggs.

And our technology is an egg that melts.

For more infomation >> What's the difference between thermoplastics and thermoset plastics? - Duration: 1:09.

-------------------------------------------

The Difference Between Gratitude and Appreciation, with Dr. Sara Algoe - Duration: 1:54.

Is there a difference between gratitude and appreciation? Are those two of the

same things are they slightly different? Umm it depends on who you ask.

So the way I think about the word gratitude really is about that

momentary emotional experience and then once you start to move away from that

kind of spontaneous experience and then toward these more naturalistic

conversations that are after the fact, and I'm telling you the things that I

feel grateful for I think you can start to move into this broader domain of

appreciation. I also sometimes, so I think of appreciation of the broader construct

and I also think about it as there's another whole different line of research

on on gratitude and it really is thinking about

in general the good things one has in their lives, their life, their lives.

Thinking about the good things you have in your life and then and then

appreciating them and so some people call that gratitude and it's been

thought of as like counting your blessings and that kind of thing and

that's not necessarily caused by another person and so that's the other sense in

which I use the word appreciation. It's just kind of a more global sense of

feeling, recognizing that you have good things in your life and it might be

another person. So it seems like in general everyday conversations those two

words are so close together that we use them interchangeably when it comes to

research when it comes to science you might all get a little bit more

particular on whether this is gratitude or appreciation

For more infomation >> The Difference Between Gratitude and Appreciation, with Dr. Sara Algoe - Duration: 1:54.

-------------------------------------------

WISE Words with Ran Neu-Ner - The difference between disruption and innovation - Duration: 2:14.

Even though disruption been around for centuries I mean our world is changing

exponentially how can we change our mindset to think more disruptively?

Disruption hasn't been around for ages, disruption is in my mind

a very new concept. Innovation's been around for ages okay

so you gotta understand the difference between innovation and disruption so

very simply innovation refers to taking something that's existing and making it

better okay that's innovation, disruption refers

to changing and industry's competitive patterns, give an example,

Uber disrupted taxis, in the old days innovation in taxis was lower fares more

comfortable cars that's innovation and taking an existing product and making it

better, disruption changes the metric on which

you compete as an industry, so today if I said to you a taxi is one round or two

round more expensive per kilometer than an Uber would you care, no, because what

you care about is you care about this and the convenience and they disrupted

an industry, so we live in an age of disruption today it's very scary because

once you get disrupted you ain't never coming back.

Yeah yeah, so how do we

change that mindset to think in a more disruptive manner?

So first of all think

in platforms not businesses, how can your business become a platform for other

people to do things and the second thing is when you go into a meeting and you're

going in to change your business start with the mindset of not bettering the

existing business but disrupting the entire industry and bring in people into

the room that ordinarily shouldn't be there because if you put the same people

in the room, in the same room all the time you get the same answer, the same answer.

Không có nhận xét nào:

Đăng nhận xét