An introduction to curl using GitHub's API
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
function Gauge(placeholderName, configuration) | |
{ | |
this.placeholderName = placeholderName; | |
var self = this; // for internal d3 functions | |
this.configure = function(configuration) | |
{ | |
this.config = configuration; | |
## Zoomable Treemap | |
Treemaps for visualizing hierarchical data. Click to zoom to the next level. | |
Click on the top orange band to zoom out. Based on Mike Bostock's | |
[Zoomable Treemaps](http://bost.ocks.org/mike/treemap/) | |
This template follows [pigshell](http://pigshell.com)'s convention for "gist | |
templates": | |
* It is supplied data using postMessage(), as a single object of the form |
// Restify Server CheatSheet. | |
// More about the API: http://mcavage.me/node-restify/#server-api | |
// Install restify with npm install restify | |
// 1.1. Creating a Server. | |
// http://mcavage.me/node-restify/#Creating-a-Server | |
var restify = require('restify'); |
name | p1 | p2 | p3 | p4 | p5 | p6 | |
---|---|---|---|---|---|---|---|
Rose Reber | 0.626 | 1.016 | 2.195 | -1.662 | -0.533 | 1.256 | |
Pansy Paisley | -1.026 | -0.272 | 2.083 | 0.688 | -1.270 | -1.770 | |
Nathaniel Nace | -0.182 | 3.786 | 2.599 | -1.688 | 1.442 | -0.679 | |
Leon Leblanc | 2.522 | 4.166 | -1.782 | 3.723 | 1.867 | 1.240 | |
Verla Vanish | 1.997 | 3.576 | -1.288 | 1.729 | 0.731 | 0.310 | |
Shona Sigmon | 1.960 | 3.719 | -1.421 | 1.785 | 0.777 | 0.265 | |
Columbus Cartee | 2.057 | 3.908 | -2.608 | 3.596 | 2.256 | 1.528 | |
Sunni Stalzer | -2.481 | -2.642 | 0.234 | 1.690 | 1.484 | 0.501 | |
Wes Wahl | 2.487 | 3.942 | -1.664 | 3.296 | 2.371 | 1.096 |
Word cloud implementation. | |
Example of how to | |
1. Change style from default. Uses linear scale | |
2. Alter word size | |
3. "Fit" it into the screen. At first the words were appearing out of view to the left. |
license: gpl-3.0 |
This example demonstrates how to prevent D3’s force layout from moving nodes that have been repositioned by the user. When the force layout’s drag behavior dispatches a dragstart event, the fixed property of the dragged node is set to true. This prevents the force layout from subsequently changing the position of the node (due to forces). Double-click to release a node.
Internally, the force layout uses three bits to control whether a node is fixed. The first bit can be set externally, as in this example. The second and third bits are set on mouseover and mousedown, respectively, so that nodes are fixed temporarily during dragging. Although the second and third bits are automatically cleared when dragging ends, the first bit stays true in this example, and thus nodes remain fixed after dragging.
Also note that the force layout resumes au
This example demonstrates how to prevent D3’s force layout from moving nodes that have been repositioned by the user. When the force layout’s drag behavior dispatches a dragstart event, the fixed property of the dragged node is set to true. This prevents the force layout from subsequently changing the position of the node (due to forces). Double-click to release a node.
Internally, the force layout uses three bits to control whether a node is fixed. The first bit can be set externally, as in this example. The second and third bits are set on mouseover and mousedown, respectively, so that nodes are fixed temporarily during dragging. Although the second and third bits are automatically cleared when dragging ends, the first bit stays true in this example, and thus nodes remain fixed after dragging.
Also note that the force layout resumes au
license: gpl-3.0 | |
height: 960 |