sudo apt-get install openjdk-7-jre-headless -y
wget -qO - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -
| //Directed graph | |
| //Author: Milon | |
| #include<iostream> | |
| #include<cstdio> | |
| using namespace std; | |
| int main(){ | |
| int n; | |
| cout<<"Enter the number of nodes: "; |
| //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; |
| //Queue | |
| //Author: Milon | |
| import java.util.NoSuchElementException; | |
| //Node class | |
| class Node{ | |
| //Instance variable | |
| private Object data; | |
| private Node nextNode; |
| //Queue using array | |
| //Author: Milon | |
| #include<iostream> | |
| using namespace std; | |
| #define MAX 5 // MAXIMUM CONTENTS IN QUEUE | |
| class queue{ |
| //Linked List class | |
| //Author: Milon | |
| import java.util.Scanner; | |
| import java.util.Iterator; | |
| import java.util.NoSuchElementException; | |
| //Node class | |
| class Node{ | |
| //Instance variable |
| //Linked list operations | |
| //Author: Milon | |
| #include<stdio.h> | |
| #include<string.h> | |
| #include<malloc.h> | |
| //#include<conio.h> | |
| void insert_first(); | |
| void insert_last(); |
| //Stack | |
| //Author: Milon | |
| import java.util.NoSuchElementException; | |
| //Node class | |
| class Node{ | |
| //Instance variable | |
| protected Object data; | |
| private Node nextNode; |
| //Stack using array | |
| //Author: Milon | |
| #include<stdio.h> | |
| //#include<conio.h> | |
| #define max 50 | |
| void push(); | |
| void pop(); |
| 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'); |