A page with input sliders for the two primary parameters, LinkDistance and Charge. Adjusting either slider will momentarily stop the force animation, adjust the parameter, and then restart the animation with the new values.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="analysis" style="font-family:helvetica, verdana, tahoma;font-size:12px"><center>This widget is evaluating the search term </center></div> | |
<div id="mysearch" style="display:none">ep.SearchTerm</div> | |
<script type="text/javascript" language="Javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
var searchterm = document.getElementById('mysearch').innerHTML; | |
if(searchterm == "hours" || searchterm == "library hours" || searchterm == "Hours" || searchterm == "Library Hours"){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="bartonplus_placard"> | |
<h2><a href="http://libraries.mit.edu/locations">Hours and Locations</a></h2> | |
<ul class="inline"> | |
<li><a href="http://libraries.mit.edu/barker">Barker Library</a></li> | |
<li><a href="http://libraries.mit.edu/dewey">Dewey Library</a></li> | |
<li><a href="http://libraries.mit.edu/hayden">Hayden Library</a></li> | |
<li><a href="http://libraries.mit.edu/archives">Institute Archives & Special Collections</a></li> | |
<li><a href="http://libraries.mit.edu/music">Lewis Music Library</a></li> | |
<li><a href="http://libraries.mit.edu/rotch">Rotch Library</a></li> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div><center>This widget is attempting to put an iframe into a custom placard area</center></div> | |
<div id="mysearch" style="display:none">ep.SearchTerm</div> | |
<script type="text/javascript" language="Javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
// functions | |
function CleanSearchTerm(strTerm) { | |
strTerm = strTerm.toLowerCase(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import json | |
import sys | |
from datetime import timedelta, datetime | |
from random import randint, choice | |
countries = ('004','008','010','012','016','020','024','028','031','032','036','040','044','048','050','051','052','056','060','064','068','070','072','074','076','084','086','090','092','096','100','104','108','112','116','120','124','132','136','140','144','148','152','156','158','162','166','170','174','175','178','180','184','188','191','192','196','203','204','208','212','214','218','222','226','231','232','233','234','238','239','242','246','248','250','254','258','260','262','266','268','270','275','276','288','292','296','300','304','308','312','316','320','324','328','332','334','336','340','344','348','352','356','360','364','368','372','376','380','384','388','392','398','400','404','408','410','414','417','418','422','426','428','430','434','438','440','442','446','450','454','458','462','466','470','474','478','480','484','492','496','498 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pullBartonPlusResults <- function(GAprofile,startDate,endDate) { | |
# taken from http://stackoverflow.com/questions/6434663/r-why-does-looping-over-a-date-object-result-in-a-numeric-iterator | |
days <- seq(from=as.Date(startDate), to=as.Date(endDate),by='days') | |
result <- data.frame() | |
master <- data.frame() | |
for ( i in seq_along(days) ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pullSearchesGA <- function(GAprofile,startDate,endDate) { | |
# taken from http://stackoverflow.com/questions/6434663/r-why-does-looping-over-a-date-object-result-in-a-numeric-iterator | |
days <- seq(from=as.Date(startDate), to=as.Date(endDate),by='days') | |
result <- data.frame() | |
master <- data.frame() | |
for ( i in seq_along(days) ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Translating the sudoku solver from VBScript to Python | |
# | |
# Libraries | |
from xlrd import open_workbook | |
from tempfile import TemporaryFile | |
from xlwt import Workbook | |
import datetime | |
from array import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# update summary data based on requests collection | |
# Imports | |
from pymongo import MongoClient | |
# Globals | |
log = '' | |
reqs = '' | |
sums = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Force based label placement</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.6.0"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.6.0"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?2.6.0"></script> | |
</head> | |
<body> |
OlderNewer