rest – How to Implement DDD with Spring Boot + MySQL

Create an application using Spring Boot in the framework you probably already know: Controller -> Service -> Repository. And from there I have my model package that contains the entities and is used by the packages above.

And from there, I saw that in the DDD model, I put my rules in the "model", which happens to be called the "domain", and that redirects the call to the repository.
And I would like to know if you have any Practical example to better understand how this structure works. I know that she has focused on the domain, but in practice and by coding she wanted to understand how that works.
Thank you

ux designer – The best way to implement breadcrumbs on mobile devices

In general, breadcrumbs are useful for current location communication and navigation.

What you should know before placing a breadcrumb on a cell phone:

  • Will it cause fat fingers?

  • Will it break several lines? (As mentioned in a Nielsen Norman Group article, breadcrumbs are good for mobile devices as long as they do not span multiple lines.)

  • Can the number of steps / screens be reduced to avoid breadcrumbs?

Personally, I would avoid bread crumbs and instead simplify the flow and the mobile app.

A similar question was asked 7 years ago: Breadcrumbs: OK for mobile sites?
I do not think this question is twofold, as many things have changed over the years.

Left: on-mobile-dcbd08cc1d01

Typoscript – How to implement an interface in the class?

I have a custom class called Greeter.
It called a method vonJson This takes an object as a parameter and assigns the class all the properties of that object.
I used an interface called GreeterInterface to do type checking on the class and the object parameter.

Interface GreeterInterface {
Welcome: String;
name: string;
Surname: String;
Age: number;
Class Greeter implements GreeterInterface {
Constructor (message: string) {
this.greeting = message;
fromJson (obj: object) {
Object.assign (this, obj)
return this;
to greet() {
Return hello + this.greeting;

let param: GreeterInterface = {
greeting: "hello",
Surname: & # 39; hina & # 39 ;,
Name: "Love",
Age: 1
let greeter = new greeter (& # 39; hola & # 39;). fromJson (param);

let button = document.createElement (& # 39; button & # 39;);
button.textContent = "Say:";
button.onclick = function () {
console.log (greeter)

document.body.appendChild (button);

This will not be compiled. It says greeter has no greeting.

popup – What's the best way to implement a search mechanism that changes the content of the UI

I had an argument with my colleague about the best way to implement a search feature that could change the content of the page.

Basically, we had two options, one is in the page search where we could have a field with some information like job ID and after a hotkey could be turned into a "search" field, so the field "job ID" as Search box can be used.

And my option is, somehow the same, but a "pop-up" field into which you would insert this value for the search.

Help me decide which way is the right one.

I hope I have made myself clear, if not, do not hesitate to ask questions.

unity – How can I implement spin in billiards?

I am not sure if you played billiards or snooker before. If you have played, you should know about the spin.
But if you do not know about it, you can see it in this video

I want to implement spin like this game


The difference between Top Spin and Back Spin is for example:

Top spin


Turn back


spinning behavior

If you aim behind the ball, you can shoot the ball in all directions


If you aim at the next one to the right, you can simply aim to the right


If you aim to the left, you can just aim to the left


I found a problem using Torque in stackoverflow, but I do not know why it did not work!

Top spin

GetComponent() .AddTorque (Vector3.back * cueStrength);
GetComponent() .AddForceAtPosition (cueStick.forward * cueStrength, transform.position, ForceMode.Acceleration);


Turn back

GetComponent() .AddTorque (Vector3.forward * cueStrength);
GetComponent() .AddForceAtPosition (cueStick.forward * cueStrength, transform.position, ForceMode.Acceleration);

Record_2019_03_12_00_45_23_544 – Which scheme should I implement for food?

I am working on a food delivery website. I can find MenuItem Scheme, but it is for the listing of the page. Everything that I have for a single element, eg. B. for the schema format, would like to implement Italian pizza on the page with the individual foods. I'm confused, which one should I choose product or MenuItem? I would also like to show delivery time.

How can I correctly implement hook_bootstrap_colorize_text () to change the color of the buttons in a bootstrap sub-topic?

I've read similar questions here, but I still have to look for an answer for that.

I'm trying to implement hook_bootstrap_colorize_text () to change the colors of the buttons in a bootstrap sub-topic.

I'd like to add some specific text elements to the array that determine how the buttons are colored. For example, I have some buttons that have the class "btn-default", and I want to specify certain texts that should display "btn-success" or "btn-warning" instead.

The bootstrap.api.php describes this process:

/ **
* Allows sub-topics to change the array used to color text.
* ...
* @ see _bootstrap_colorize_text ()
* /
function hook_bootstrap_colorize_text_alter (array & $ texts) {
// This matches the exact string: "My Unique Button Text".
$ Lyrics['matches'][t('My Unique Button Text')]    = & # 39; primary & # 39 ;;

// This would also match the above string, but the returned class
// be the one above; "Matches" takes precedence over "contains".
$ Lyrics['contains'][t('Unique')]    = & # 39; notice & # 39 ;;

// Remove the match for strings containing "apply":
not set ($ texts['contains'][t('Apply')]);

// Change the class that matches "Rebuild" (originally "Warning"):
$ Lyrics['contains'][t('Rebuild')]    = & # 39; success & # 39 ;;

Therefore, I tried to implement the following code without success in my template.php file for the subtopic (MethodsTheme).

I also tried:

And I also tried:

    Array (
t (& # 39; request rotation & # 39;) => & # 39; success & # 39 ;,
& # 39; contains & # 39; => array (
t (& # 39; Alert & # 39;) => & # 39; succeed & # 39 ;, & # 39;
t (& # 39; Set & # 39;) => & # 39; success & # 39 ;,
t (& # 39; Mark & ​​# 39;) => & # 39; success & # 39 ;,
t (? Assign?) =>? success ?,
t (& # 39; report & # 39;) => & # 39; warning & # 39 ;,
t (& # 39; request & # 39;) => & # 39; info & # 39 ;,

And yes, after each attempt, I clear the caches to see if the code changes to the desired result. However, I am still empty-handed. I place the file template.php in my folder sites / all / themes / methodstheme / templates. The subtopic was already established and worked well (d. H., I think it's set up right).

I am using Drupal 7.64 (with the installation profile varbase, but I have largely removed the use of the varbase profile and modules) and the latest version of the Bootstrap 3 theme as the base theme.

Can anyone give help or suggestions about the problem?

Implement MVC patterns properly in Tkinter

I've written a very simple Tkinter program to turn miles into kms: it consists of a text entry box, a button, and a text box where the output is printed.

The model only performs the multiplication and the view sets the layout of the three widgets.

I am worried about the following code in my regulator Class (the method is bound to the button):

execute def (self, event):
km = self.view.e1_value.get ()
miles = self.model.km_to_miles (km)
Self-esteem. Issue (miles)


Does this follow the MVC pattern or do I mix GUI and "business" logic?

The repo is uploaded here: is the code that was presented in a lecture I tried to translate into the MVC presser,