Skip to content

Instantly share code, notes, and snippets.

View milon's full-sized avatar
📧
Want a quick response? Tweet @to_milon.

Nuruzzaman Milon milon

📧
Want a quick response? Tweet @to_milon.
View GitHub Profile
@milon
milon / UndirectedGraph.cpp
Last active January 19, 2018 01:39
Data Structure: Undirected Graph
//Directed graph
//Author: Milon
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
int n;
cout<<"Enter the number of nodes: ";
@milon
milon / MysqlConnection.java
Created January 19, 2018 01:36
Connent MySQL with Java using JDBC driver
//Mysql connection
//Author: Milon
//import java.sql.*;
import java.sql.Connection;
import java.sql.Statement;
import java.sql.PreparedStatement;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
@milon
milon / Queue.java
Created January 19, 2018 01:34
Data Structure: Queue
//Queue
//Author: Milon
import java.util.NoSuchElementException;
//Node class
class Node{
//Instance variable
private Object data;
private Node nextNode;
@milon
milon / Queue.cpp
Created January 19, 2018 01:33
Data Structure: Queue
//Queue using array
//Author: Milon
#include<iostream>
using namespace std;
#define MAX 5 // MAXIMUM CONTENTS IN QUEUE
class queue{
@milon
milon / LinkedList.java
Last active January 19, 2018 01:31
Data Structure: Linked List
//Linked List class
//Author: Milon
import java.util.Scanner;
import java.util.Iterator;
import java.util.NoSuchElementException;
//Node class
class Node{
//Instance variable
@milon
milon / LinkedList.cpp
Created January 19, 2018 01:25
Data Structure: Linked List
//Linked list operations
//Author: Milon
#include<stdio.h>
#include<string.h>
#include<malloc.h>
//#include<conio.h>
void insert_first();
void insert_last();
@milon
milon / Stack.java
Last active January 19, 2018 01:29
Data Structure: Stack
//Stack
//Author: Milon
import java.util.NoSuchElementException;
//Node class
class Node{
//Instance variable
protected Object data;
private Node nextNode;
@milon
milon / stack.cpp
Last active April 24, 2018 21:47
stack.cpp
//Stack using array
//Author: Milon
#include<stdio.h>
//#include<conio.h>
#define max 50
void push();
void pop();
@milon
milon / bootstrap-tabs.js
Created December 1, 2016 07:25
This will add the tab's id appended to url as hash link, so that you can bookmark the tab.
var url = document.URL;
var hash = url.substring(url.indexOf('#'));
$(".nav-tabs").find("li a").each(function(key, val) {
if (hash == $(val).attr('href')) {
$(val).click();
}
$(val).click(function(ky, vl) {
location.hash = $(this).attr('href');
@milon
milon / elasticsearch_on_homestead.md
Last active November 23, 2022 15:18
Install Elasticsearch on Laravel Homestead

Install Elasticsearch on Laravel Homestead

Install Java

sudo apt-get install openjdk-7-jre-headless -y

Download & install the Public Signing Key

wget -qO - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -