Skip to content

Instantly share code, notes, and snippets.

View vaibhav93's full-sized avatar

Vaibhav Bansal vaibhav93

  • Amherst, Massachusetts
View GitHub Profile
requirejs.config({
baseUrl: 'js/lib',
paths: {
//jquery: 'jquery-1.11.3.min',
knockout: 'knockout-3.3.0.js',
Materialize: 'materialize.amd',
app: '../app'
}
});
require(['jquery', 'Materialize'], function ($) {
console.log($);
$(document).ready(function () {
$('.show-search').click(function () {
$('.search-out').fadeToggle("50", "linear");
});
//user dropdown button
$('.dropdown-button').dropdown({
requirejs.config({
baseUrl: 'js/lib',
paths: {
//jquery: 'jquery-1.11.3.min', //no need to give path if jquery.js is located in baseUrl
knockout: 'knockout-3.3.0.js',
Materialize: '../materialize', //vanilla materialize .. no amd version
app: '../app',
hammerjs: 'hammer.min',
velocity: 'velocity.min',
jqueryHammer: 'jquery.hammer',
define(['jquery', 'Materialize'], function ($, Materialize) {
$(document).ready(function () {
//console.log(Waves);
$('.show-search').click(function () {
$('.search-out').fadeToggle("50", "linear");
});
//init waves
Waves.displayEffect();
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
{
"variables": [],
"info": {
"name": "testCollection",
"_postman_id": "a7a3c053-83c8-84d9-8f7f-871e6a5e8d90",
"description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
@vaibhav93
vaibhav93 / res.json
Last active August 13, 2016 21:23
response for nearby
[
{
"id": 3,
"name": "erwer",
"latitude": 23.3424,
"longitude": 32.324234,
"short_description": "as",
"featured_image": "https://ithakatalesassetsdev.s3.amazonaws.com/image-2c61623e86bee78e6ab444af456bccc7a1164095-ithaka-unnamed.png",
@vaibhav93
vaibhav93 / res.js
Created September 3, 2016 07:02
Nearby details : http://localhost:1337/v1/nearby/305
{
"id": 305,
"name": "Adhai din ka Jhopra",
"longitude": 26.4552512,
"latitude": 74.6251327,
"shortDescription": "Ithe oldest mosque in India mosque built by Qutub-Ud Din-Aibak, first sultan of Delhi.\n",
"knowMore": " Adhai din ka jhopra was an ancient temple & sanskrit college that was converted into a mosque by the sultan. Popular for its double depth calligraphic inscriptions, the area of the mosque is still used as a place of worship.However, a large number of architectural members and sculptures of temples are lying inside the verandah of the complex for safety and security purposes by the department which shows the existence of a Hindu temple in its vicinity during circa 11th-12th Century AD. This mosque, built from the dismantled remains of temples, is known as Adhai-din-ka-Jhonpra possibly from the fact that a fair used to be held here for two and a half days. \"Adhai Din Ka Jhonpra\" literally means \"shed of two-and-a-half days. A legend states that a part of the mosque was built in
@vaibhav93
vaibhav93 / res.js
Created September 3, 2016 07:03
Nearby images http://localhost:1337/v1/nearby/305/images
[
{
"id": 414,
"name": "test",
"url": "https://ithakatalesassetsdev.s3.amazonaws.com/image-fe6a9b64e7a78d00e8bccee7671935c816078422-ithaka-sampleImageChandniChowk.jpeg",
"caption": "tes",
"priority": 1,
"is_published": true,
"is_featured": true,
"created_at": "2016-09-03T06:58:04.834Z",
public int minMeetingRooms(Interval[] intervals) {
HashMap<Integer, Integer> map = new HashMap<>();
int min=0;
int max=0;
for(int i=0;i<intervals.length;i++){
if(!map.containsKey(intervals[i].start)){
map.put(intervals[i].start,0);
}
if(!map.containsKey(intervals[i].end)){
map.put(intervals[i].end,0);