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 / IntelliJIDEA-Getter-Setter-Format.md
Created October 27, 2018 04:11
Getter Setter Format For IntelliJ IDEA

Getter Template

public ##
#if($field.modifierStatic)
static ##
#end
$field.type ##
#set($name = $StringUtil.capitalizeWithJavaBeanConvention($StringUtil.sanitizeJavaIdentifier($helper.getPropertyName($field, $project))))
get##
@pethaniakshay
pethaniakshay / template.html
Last active December 10, 2017 10:43
Boot Strap Basic Template with CDN [ Boot strap , Jquery]
<!doctype html>
<html lang="en">
<head>
<title>Home</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
http://www.onlinetutorialspoint.com/spring/spring-mvc-login-form-example.html
@pethaniakshay
pethaniakshay / AESEncryption.java
Created August 3, 2017 14:59
AES Encryption algorithm in java
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
/*
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
For example, given n = 3, a solution set is:
"((()))", "(()())", "(())()", "()(())", "()()()"
*/
public class Solution {
@pethaniakshay
pethaniakshay / FXML2.fxml
Created June 8, 2017 19:43
Switching between Scenes (Screens) in JavaFx using the FXML
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.AnchorPane?>
<AnchorPane id="AnchorPane" prefHeight="237.0" prefWidth="448.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.60" fx:controller="FXMLDocumentController">
<children>
<Button fx:id="btn2" layoutX="159.0" layoutY="126.0" mnemonicParsing="false" onAction="#handleButtonAction" text="Click to go to scene 1" />
<Label layoutX="179.0" layoutY="71.0" text="You re in scene 2" />
@pethaniakshay
pethaniakshay / FullPageBackGroundImage.html
Created June 1, 2017 07:20
Full Page Image - Full Size Back Ground Image In HTML CSS
<!DOCTYPE html>
<html>
<head>
<style>
body, html {
height: 100%;
margin: 0;
}
.bg-pic {
@pethaniakshay
pethaniakshay / FXMLDocument.fxml
Created June 1, 2017 05:17
Splash Screen in JavaFX using FXML
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<AnchorPane fx:id="ap" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="splashscreen.FXMLDocumentController">
<children>
<ImageView fitHeight="300.0" fitWidth="442.0" layoutX="116.0" layoutY="50.0" pickOnBounds="true" preserveRatio="true">
<image>
@pethaniakshay
pethaniakshay / AnonymousObject.java
Created May 31, 2017 05:58
Example of Anonymous Object In Java
public class AnonymousObject{
public static void main(String args[]){
System.out.println("Addtion: " + new Calc().add(5,9));
System.out.println("Multiplication: " + new Calc().mul(3,5));
}
}
class Calc{
public int add(int n1, int n2){
@pethaniakshay
pethaniakshay / LabeledForLoop.java
Last active May 30, 2017 16:01
Example of Labeled For Loop in Java
public class LabeledForLoop{
public static void main(String args[]){
outer_loop:
for(int i=0 ; i<5 ; i++){
inner_loop:
for(int j=0 ; j<5 ; j++){
if(i==2 || j ==4){
break outer_loop;