Skip to content

Instantly share code, notes, and snippets.

View deepakchethan's full-sized avatar
:shipit:
Focused

Deepak Chethan deepakchethan

:shipit:
Focused
  • India
View GitHub Profile
@deepakchethan
deepakchethan / fix_github_https_repo.sh
Created April 18, 2023 06:08 — forked from m14t/fix_github_https_repo.sh
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
// Enable component-scanning and auto-configuration with @SpringBootApplication Annotation
// It combines @Configuration + @ComponentScan + @EnableAutoConfiguration
@SpringBootApplication
public class FooApplication {
public static void main(String[] args) {
// Bootstrap the application
SpringApplication.run(FooApplication.class, args);
}
}
PART – A
1. Write a Program in C# to Check whether a number is Palindrome or not.
using System;
namespace LAB_Programs {
class Palindrome {
public static void Main(String[] args) {
int r, n, rev, m; Console.WriteLine("Enter the NO:"); n = int.Parse(Console.ReadLine()); m = n;
rev = 0; while (n != 0) {
r = n % 10;
rev = rev * 10 + r; n = n / 10;