DEV Community

Cover image for One Commit at a Time Series - 1
Annapoorani Kadhiravan
Annapoorani Kadhiravan

Posted on

One Commit at a Time Series - 1

Sharing my journey of One Commit at a time series, where I learn and share it here. Hoping to bring a huge impact at the end of this series. Starting with Day - 1 :

LINUX

Commands and its usage :

ls - list the files
cd - change directory
pwd - present working directory
mkdir [dirname] - make a directory
rmdir [dirname] - remove a directory
cd / cd ~ / cd $HOME - move to home
cat >filename - create a file in directory with write mode
touch filename - create a file in directory
echo "content" >>filename - write content in the respective file
cat filename - to view the content inside the file


JAVA

# Program to find odd or even

import java.util.Scanner;

public class OddOrEven {
 public static void main (String args[]){
Scanner sc = new Scanner(System.in);
System.out.println("Enter the number:");
int num = sc.nextInt();
if(num%2 == 0)
{
System.out.println("The given number is Even : "+ num);
}
else
{
System.out.println("The given number is Odd : "+ num);
} 
sc.close();
}
}

Enter fullscreen mode Exit fullscreen mode

SPRINGBOOT

  1. Spring is a framework, which is used in building enterprise level applications.
  2. Spring will take care of object creation, we don't have to create any objects.
  3. It helps in creating loosely coupled application and also can integrate other frameworks easily.
  4. SpringBoot is the first project created by spring, hence it closely resembles spring.
  5. SpringBoot is famous for its conventions over configurations.
  6. It also have embedded server (Tomcat) available with it. Without server, it will show as "This site can't be reached".
  7. Using SpringBoot, APIs can be built in minutes. [ HTTP Methods : GET, POST, PUT, DELETE ]
  8. SpringBoot is a standalone application where output can be seen in IDE terminal rather than running it in a web browser.

SQL

1. To select Customer name starts with 'M' :

SELECT * FROM Customers  WHERE name LIKE '%M'

2. To select customer name ends with 'n' :

SELECT * FROM Customers WHERE name LIKE '%n'

3. To Select Customer name which contains 'r' in their name :

SELECT * FROM Customer WHERE name LIKE '%r%'

4. To Select Customer name whose name has 'r' in 3rd position :

SELECT * FROM Customer WHERE name LIKE '__r%' 

Enter fullscreen mode Exit fullscreen mode

References :

https://www.geeksforgeeks.org/linux-unix/basic-linux-commands/
https://www.geeksforgeeks.org/linux-unix/different-ways-to-create-file-in-linux/
https://www.youtube.com/watch?v=SSKVgrwhzus&list=PLNcg_FV9n7qZY_2eAtUzEUulNjTJREhQe&index=1
https://www.youtube.com/watch?v=7d0c_CaHgEc
https://www.w3schools.com/JAVA/java_practice.php

Top comments (0)