Hello World in Spring Boot

Build Maven Porject in Intellij Edit POM <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.example</groupId> <artifactId>myproject</artifactId> <version>0.0.1-SNAPSHOT</version> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.6.1</version> </parent> <!– Additional lines to be added here… –> Adding Classpath Dependencies <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> </dependencies> Write Main and Controller Run Program

Quick Sort

QuickSort is a Divide and Conquer algorithm. It picks an element as pivot and partitions the given array around the picked pivot. There are many different versions of quickSort that pick pivot in different ways. Always pick first element as pivot. Always pick last element as pivot (implemented below) Pick a random element as pivot. …

TreeMap in Java

Introduction The TreeMap in Java is used to implement Map interface and NavigableMap along with the AbstractMap Class. The map is sorted according to the natural ordering of its keys, or by a Comparator provided at map creation time, depending on which constructor is used. This proves to be an efficient way of sorting and …

Permission to one repository denied to another(unwanted) git account

My personal solution to solve this problem is: 1. Check the credentials ssh -T git@github.com The name printed out should be your wanted user name. If not, go step 2. 2. Connect ssh. cd ~/.ssh 3. Connect to wanted ssh ssh-add ~/.ssh/id_rsa_account1 4. Check the connected ssh list ssh-add -l If there shows your wanted …

How to import JavaXT in maven project

Maven Coordinates JavaXT releases are available via Maven using this site. All other Maven repositories, including Maven Central, are out of sync with this site. To add this maven repository to your project, simply update your project pom.xml file. Example: <repositories> <repository> <id>javaxt.com</id> <url>http://www.javaxt.com/maven</url> </repository> </repositories> Next, you will need to add one of the …

How to use two ssh keys to access two different GitHub account.

I tried to use two ssh keys for my two GitHub accounts, one for my personal account, one for my school account. However, I screwed the ssh credential for GitHub verification. When I tried to use my personal account to push my code, I got permission denied A-account@git.com to B-account. I took some time searching …

How to install tensorflow on Mac and use it in Pycharm

How to install TensorFlow on Mac Chck if you have intalled pip pip3 install tensorflow using pip3 pip3 install tensorflow check tensorflow version pip3 show tensorflow How to set TensorFlow in Pycharm Click file -> New Project Setting -> Preference Choose Python interpreter Click the plus sign on the left bottom Search for tensorflow and …