Skip to content

Instantly share code, notes, and snippets.

View pethaniakshay's full-sized avatar
🎯
Focusing

Akshay Pethani pethaniakshay

🎯
Focusing
View GitHub Profile
@pethaniakshay
pethaniakshay / CenterTextInDiv.html
Last active May 28, 2017 07:43
HTML/CSS code to vertically+horizontally centre the text in div tag. https://www.codepuran.com/web-designing/vertically-horizontally-align-text-div/
<!DOCTYPE html>
<html lang="de">
<head>
<title>Verticlly Center Text</title>
<style>
.centre-text {
display: table;
height: 100px;
width: 100%;
text-align: center;
<!DOCTYPE html>
<html lang="de">
<head>
<title>Verticlly Center Text</title>
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
@pethaniakshay
pethaniakshay / Animation.html
Created May 26, 2017 08:04
Best CSS3 Animation Demo [Super Mario Animation In HTML CSS]
<!-----------------------------------------------
Author: Qaidjohar
Date Created: Nov 7 2016
Logical Comment: Leisure Activity
------------------------------------------------>
<html>
<head>
<title>Mario</title>
<style type="text/css">
@pethaniakshay
pethaniakshay / LinkedList.java
Created May 20, 2017 10:38
Java Implementation of the Linked List Data Structure.
import java.util.Scanner;
public class LinkedList {
static Node First =new Node();
static Node current,last;
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
@pethaniakshay
pethaniakshay / VigenerCipher.java
Created May 20, 2017 10:08
Implementation of the Vigenere Cipher In Java
import java.util.Scanner;
public class VigenereCipher {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
String plainText;
int i,j,p;
String key;
public class ConsoleOutputColorChangeDemo {
public static final String RESET = "\u001B[0m";
public static final String BLACK = "\u001B[30m";
public static final String RED = "\u001B[31m";
public static final String GREEN = "\u001B[32m";
public static final String YELLOW = "\u001B[33m";
public static final String BLUE = "\u001B[34m";
public static final String PURPLE = "\u001B[35m";
public static final String CYAN = "\u001B[36m";
@pethaniakshay
pethaniakshay / SendMail.java
Last active May 26, 2017 13:58
Java Program to send Email through SMTP server of Gmail. API used: Java Mail API by Oracle.
import java.util.Properties;
import javax.mail.*;
import javax.mail.internet.*;
class Mailer{
public static void send(String from,String password,String to,String sub,String msg){
//Get properties object
Properties props = new Properties();
props.put("mail.smtp.host", "smtp.gmail.com");
props.put("mail.smtp.socketFactory.port", "465");
@pethaniakshay
pethaniakshay / button.h
Created March 2, 2017 17:55
Sudoku Puzzel with Solver Program.
#include<iostream.h>
#include<conio.h>
#include<graphics.h>
class Button
{
private: int midx;
int midy;
int length;
int color;
char *name;
@pethaniakshay
pethaniakshay / FindDuplicateInArray.java
Last active May 26, 2017 10:00
Find Duplicate In Array Soltution.Without recursion and using most simplest way.
import java.util.*;
public class FindDuplicateInArray {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
System.out.println("Enter the No of elements: ");
int size =sc.nextInt();
package interviewbitProgramming;
import java.util.ArrayList;
import java.util.Scanner;
public class MinStepsInInfiniteGrid {
public static void main(String args[]){
System.out.println("Enter the No of Points: ");