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
open System.Collections.Generic | |
(* Helper Functions for Dicts *) | |
module Dict = | |
let toSeq d = d |> Seq.map (fun (KeyValue(k,v)) -> (k,v)) | |
let toList (d:IDictionary<_,_>) = d |> toSeq |> Seq.toList | |
(* | |
Input: votes = ["ABC","ACB","ABC","ACB","ACB"] |
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
### making a memory dump | |
adplus.exe -hang -iis -o c:\dumps | |
Symbol search path: srv*c:\symbols*http://msdl.microsoft.com/download/symbols | |
.loadby sos clr | |
!threads | |
!threadpool | |
~* e !clrstack ### show all clr stacks | |
.cls ### clear screen |
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
(** Taken from https://github.com/verbosemode/syslog-message/blob/4bde2739d889d553559ab823a976ea2556c9aad9/src/syslog_message.mli **) | |
(** The type for Facilities *) | |
type facility = | |
Kernel_Message | |
| User_Level_Messages | |
| Mail_System | |
| System_Daemons | |
| Security_Authorization_Messages | |
| Messages_Generated_Internally_By_Syslogd |
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
var len = function (list) { | |
var num = 0; | |
var getLen = function() { | |
var index = list[num]; | |
var isNull = function (thing) { | |
if (thing == null) { | |
return true; | |
} return false; | |
} | |
if (isNull(index)) { |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
0 | 1 | |
---|---|---|
-73.427242 | 40.871873 | |
-73.996700 | 40.750000 | |
-73.992363 | 40.740134 | |
-87.525537 | 37.942482 | |
-89.564576 | 44.501590 | |
-118.819400 | 34.192900 | |
-73.897400 | 42.774700 | |
-101.886595 | 35.149460 | |
-71.769200 | 42.249000 |
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
var margin = {top: 20, right: 20, bottom: 30, left: 50}, | |
width = 960 - margin.left - margin.right, | |
height = 500 - margin.top - margin.bottom; | |
var x = d3.time.scale() | |
.range([0, width]); | |
var y = d3.scale.linear() | |
.range([height, 0]); |
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
//carousel header | |
(function(){ | |
function fromScratch(){ | |
function clearDots(){ | |
$('.dots').each(function(){ | |
$(this).removeClass('active-dot'); | |
}); | |
} | |
function clearSlides(){ | |
$('.slides').each(function(){ |
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
//steam graph | |
(function(){ | |
var n = 20, // number of layers | |
m = 200, // number of samples per layer | |
stack = d3.layout.stack().offset("wiggle"), | |
layers0 = stack(d3.range(n).map(function() { return bumpLayer(m); })), | |
layers1 = stack(d3.range(n).map(function() { return bumpLayer(m); })); | |
var width = 1280, | |
height = 450; |
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
// Compute the new tree layout. | |
var nodes = tree.nodes(root).reverse(); | |
// Normalize for fixed-depth. | |
nodes.forEach(function(d) { d.y = d.depth * 180; }); | |
// Update the nodes… | |
var node = vis.selectAll("g.node") | |
.data(nodes, function(d) { return d.id || (d.id = ++i); }); |
NewerOlder