Skip to content

Instantly share code, notes, and snippets.

View eMahtab's full-sized avatar
💭
مهتاب

Mahtab Alam eMahtab

💭
مهتاب
View GitHub Profile
@eMahtab
eMahtab / tea.html
Created December 3, 2015 06:29
My Tea Consumption
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<style>
div.chart{
font-family:sans-serif;
font-size:0.7em;
}
@eMahtab
eMahtab / SplittingString.java
Created December 9, 2015 14:09
Splitting a String without using String split() method
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Split {
public static void main(String[] args) {
List<String>pieces=new ArrayList<String>();
Scanner sc=new Scanner(System.in);
@eMahtab
eMahtab / DuplicateRemoval.java
Created December 9, 2015 14:20
Removing Duplicates from an array
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class RemoveDuplicate {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int size=sc.nextInt();
@eMahtab
eMahtab / StringWordReversal.java
Created December 12, 2015 16:24
Reversing the order of words in String
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class StringReversal2 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String input=sc.nextLine();
@eMahtab
eMahtab / typing_text.html
Created December 14, 2015 14:04
JavaScript Typing Text Effect
<html>
<head>
<style>
#myTypingText {
background-color:#000;
width:700px;
height:120px;
padding:12px;
color:#FFF;
font-family:Arial, Helvetica, sans-serif;
@eMahtab
eMahtab / typing_text_image.html
Created December 14, 2015 18:12
Typing Text with Image
<html>
<head>
<style>
#myTypingText {
padding:12px;
color:#FFF;
font-family:Courier New, Helvetica, sans-serif;
font-size:20px;
line-height:1.5em;
}

A Foodys guide

'' Part of the secret of success in life is to eat what you like - Mark Twain ''

I think each one of us loves eating, yes I know some were born to overeat. In this GraphGist we will see how a graph model can bring you closer to your favourite food. I usually have 6-7 cup of tea/coffee in a day which some people call as caffeine addiction but who cares. Next we will see how Neo4j can take you to the best buffet or latte place in the city

nerd quote technology download food

The Foody Model

Below is our Foody model, each restaurant is representated by a Node. Note that Restaurants are grouped by the area, IndiraNagar have Starbucks Coffee and Beanstalk, Frazer Town have Savoury Restaurant.

@eMahtab
eMahtab / invite.html
Created February 24, 2016 17:59
Uncompressed Invite Gist
var width = 1300,
height = 645
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height);
var colorScale=d3.scale.linear().range(["green","darkgreen"])
var force = d3.layout.force()
.gravity(0.05)
@eMahtab
eMahtab / menu.js
Created February 24, 2016 18:15
D3 Horizontal Menu
<script>
var width=1200;
var height=640;
var canvas=d3.select("body")
.append("svg")
.attr("width",width)
.attr("height",height)
.append("g")
@eMahtab
eMahtab / MongoDB-Aggregation.txt
Last active March 11, 2016 16:48
Mastering MongoDB Aggregation Framework
MongoDB comes with a great aggregation framework, which allows to write queries to fetch whatever data you might be interested into.
Before we even get into MongoDB aggreagtion and how to use it, first question is why we even need aggreagtion framework when we already have MongoDB query language and operations like find(), findOne(), limit(), skip(), sort(). The answer is aggregation framework is built into MongoDB to provide more complex analytics oriented functionality.
Lets dive into MongoDB aggregation framework and see what it have to offer.
Before getting into details of the aggreagtion framework lets see what all stages are available in MongoDB aggreation framework.
1. $match