This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class="hello"> | |
| <h1>{{ msg }}</h1> | |
| </div> | |
| </template> | |
| <script> | |
| export default { | |
| name: 'HelloWorld', | |
| data() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public abstract class Chain { | |
| protected Chain next; | |
| public Chain() { | |
| } | |
| public void setNext(Chain next) { | |
| this.next = next; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.manjula.starter.model.converter; | |
| import javax.persistence.AttributeConverter; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| import static java.util.stream.Collectors.toList; | |
| /** | |
| * @author Manjula Jayawardana |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface Component { | |
| void doSomething(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public abstract class AbstractTemplate { | |
| public final void execute() { | |
| operationInitialize(); | |
| operation1(); | |
| if (hook()) { | |
| operation2(); | |
| } | |
| System.out.println("we are done.."); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface Algorithm { | |
| void execute(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.List; | |
| public class ConcreteSubject implements Subject { | |
| private List<Observer> observers = new ArrayList<>(); | |
| private String message; | |
| public ConcreteSubject() { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.fasterxml.jackson.databind.JavaType; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import com.fasterxml.jackson.databind.type.CollectionType; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.web.client.RestTemplateBuilder; | |
| import org.springframework.http.HttpEntity; | |
| import org.springframework.http.HttpMethod; | |
| import org.springframework.http.HttpStatus; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SingletonEager { | |
| private static final SingletonEager INSTANCE = new SingletonEager(); | |
| private SingletonEager() { | |
| System.out.println("in the constructor"); // this will print first | |
| } | |
| public static SingletonEager getInstance() { | |
| return INSTANCE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <meta name="description" content=""> | |
| <meta name="author" content=""> | |
| <title>EMS</title> |