Skip to content

Instantly share code, notes, and snippets.

View answerquest's full-sized avatar

Nikhil VJ answerquest

View GitHub Profile
@answerquest
answerquest / DataStructures.Tree.js
Last active August 29, 2015 14:13
D3.js Zoomable Sunburst visualization from self-referencing CSV input. See index.html
/*from https://github.com/stephen-james/DataStructures.Tree */
/*
15.12.2014 : Edited version of DataStructures.Tree.js to be able to take more data into the JSON.
FOR CUSTOMIZING AND PUTTING IN ALL THE CUSTOM VALUES THAT YOU WANT TO GO INTO YOUR HIERARCHICAL JSON, JUMP TO THE LINES BELOW:
simpleChildRepresentation.push(decorateNode
AND YOU WILL SEE THE TEMPLATE BELOW. THERE IS ANOTHER TEMPLATE JUST BELOW THAT, FOR THE ROOT NODE, SO BE SURE TO EDIT THAT TOO.
*/
var DataStructures = DataStructures || {};
@answerquest
answerquest / youtube data extract.html
Created March 25, 2015 16:06
youtube data extract
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
border-collapse:collapse;
}
th, td {
padding: 5px;
@answerquest
answerquest / Punebudget_to_Unicode_converter.html
Last active September 11, 2017 12:08
Convert legacy font in Pune's Budget book to Unicode Devnagri script
<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<head><title>PuneBudget <==> यूनिकोड परिवर्तित्र (12-11-2014) </title>
<script type="text/javascript">
// for Marathi script used by Pune Municipal Corporation in their budget book, http://www.punecorporation.org/informpdf/budget/1415%20SC%20BUDGET%20BOOK.pdf
function convert_to_unicode()
@answerquest
answerquest / ShreeDev-to-Unicode-converter.html
Last active August 29, 2015 14:18
ShreeDev to Unicode Converter
<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
function convert_to_unicode()
{
var array_one = new Array(
//PMPML ADDITIONS
@answerquest
answerquest / zapper.html
Created April 12, 2015 02:38
Convenient single page to Zap extra spaces, commas, newlines, tabs in the text in a textarea (paragraph textbox) through different buttons
<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<head><title>Zap extra spaces, commas etc</title>
<style>
input {
width: 15em; height: 3em;
}
</style>
<body>
@answerquest
answerquest / words-replacer.html
Last active December 18, 2015 01:40
Words Replacer : Find-and-Replace on Steroids! User-entered substitution table
<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<head><title>Words Replacer : CTRL+H on Steroids</title>
<script type="text/javascript">
function ImproveEnglish()
{
var array1 = document.getElementById('badenglish').value.split('\n');
@answerquest
answerquest / bulk Lat-Long from address.html
Last active November 14, 2022 05:34
Find latitude, longitude of a list of addresses using Google Geocoder, in a timed loop. CSV and HTML output with link to location.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
<!--
function GetLocation() {
var geocoder = new google.maps.Geocoder();
var array1 = document.getElementById('txtAddress').value.split('\n');
@answerquest
answerquest / pune-info.html
Last active June 2, 2021 06:45
Leaflet combine geojson map data with CSV data (working example)
<!DOCTYPE html>
<html>
<head>
<title>Pune Info</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="lib/leaflet.css" /> <!-- original: http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css -->
<link rel="stylesheet" href="lib/leaflet-search.css" />
<link rel="stylesheet" href="lib/leaflet-measure.css">
<link rel="stylesheet" href="lib/leaflet.label.css">
<link rel="stylesheet" href="lib/Control.FullScreen.css" />
@answerquest
answerquest / mapwarper-tiles-lister.html
Created July 20, 2015 17:32
List all map tiles coming within specified lat-long bounds for a range of zoom levels
<html>
<head>
<meta charset="utf-8" />
<title>Tiles Lister</title>
</head>
<body>
Long-min <input id="longMin" value=73.73577>
...........Long-max <input id="longMax" value=73.98056>
<br><br><br>
Lat-max <input id="latMax" value=18.62933>
@answerquest
answerquest / cycle through dropdown.html
Last active August 29, 2015 14:27
Cycle through a dropdown list : Previous/Next buttons to traverse through the options in a dropdown list. See working example: http://codepen.io/nikhilsheth/pen/pJmvEd
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<input type="button" value="previous" onClick="nextTiles(-1)">
<select id="overlaySelector" onChange="changeTiles()">
<option value="1" selected="selected">Option 1</option>
<option value="2">Option 2</option>