forked from larskotthoff/assurvey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
145 lines (134 loc) · 5.38 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html>
<head>
<title>Algorithm Configuration Literature</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script type="text/javascript" src="d3.min.js"></script>
<script type="text/javascript" src="jquery-1.6.2.min.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
<style type="text/css"></style>
</head>
<body>
<a href="http://coseal.net/"><img style="position: absolute; top: 10px; right: 10px; border: 0; width: 8%" src="coseallogo.png" alt="Fork me on GitHub"></a>
<h1>Algorithm Configuration Literature</h1>
<h2>Last update 13 February 2015</h2>
<div class="contact">Comments? Suggestions? Corrections?<br/>
<a href="mailto:[email protected]">Let me know!</a></div>
<div class="expl">click headings to sort<br/>click citations to
expand</div>
<script type="text/javascript">
(function() {
var down = "↓", up = "↑", idx = 0,
headers = ["Citation", "Category", "Domain", "Year"];
function id(d) {
return d;
}
function getSelectedText() {
var text = "";
if (typeof window.getSelection != "undefined") {
text = window.getSelection().toString();
} else if (typeof document.selection != "undefined" && document.selection.type == "Text") {
text = document.selection.createRange().text;
}
return text;
}
function cellcont(d) {
if(d.short) {
d.showShort = d.showShort || true;
if(d.showShort) { d3.select(this).html(d.short); }
else { d3.select(this).html(d.long); }
d3.select(this).on("mouseup", function(d) {
if(getSelectedText().length == 0) {
d.showShort = d.showShort ^ true;
if(d.showShort) { d3.select(this).html(d.short); }
else { d3.select(this).html(d.long); }
}
});
} else {
d3.select(this).html(d);
}
}
function compare(h, a, b) {
var ah = null, bh = null;
if(h == "Citation") {
ah = a[h].short, bh = b[h].short;
} else {
ah = a[h], bh = b[h];
}
return ah < bh ? -1 : (ah > bh ? 1 : 0);
}
function citesort(f, h) {
return function(a, b) {
var tmp = f * ((h == "Year") ? a[h] - b[h] : compare(h, a, b));
if(tmp == 0 && h != "Citation") {
return f * compare("Citation", a, b);
} else {
return tmp;
}
};
}
function addSeparators(i) {
var prev = null;
$("tr.data td:nth-child(" + (i+1) + ")").each(function(j, d) {
if(prev != null && prev != $(d).html()) {
$(d).parent().css("border-color", "black");
}
prev = $(d).html();
});
}
var table = d3.select("body").append("table");
table.append("tr").selectAll("th").data(headers).enter()
.append("th")
.attr("width", function(d) {
if(d == "Citation") {
return "30%";
}
if(d == "Category") {
return "20%";
}
if(d == "Year") {
return "5%";
}
})
.html(id)
.on("click", function(h, i) {
$("tr.data:first").css("border-top-width", 1);
var html = $(this).html(),
last = html[html.length-1],
suf = "", f = 1;
if(last == down) {
suf = up;
f = -1;
} else {
suf = down;
}
table.selectAll("th").data(headers).html(id);
$(this).html(h + suf);
table.selectAll("tr.data").sort(citesort(f, h));
$("tr.data").css("border-color", "#ddd");
if(h != "Citation") {
addSeparators(i);
}
$("tr.data:first").css("border-top-width", 0);
});
table.append("tr").classed("pad", true).append("td");
d3.json("lit.json", function(lit) {
table.selectAll("tr.data").data(lit).enter()
.append("tr").classed("data", true)
.style("border-color", "#ddd")
.selectAll("td").data(function(d) {
return $.map(headers, function(e) {
return d[e];
});
}).enter()
.append("td")
.each(cellcont);
$("tr.data:first").css("border-top-width", 0);
});
})();
</script>
<footer>
<a href="http://www.uni-freiburg.de/impressum">Impressum</a> | <a href="mailto:[email protected]">Contact</a> | <a href="https://github.com/mlindauer/acsurvey">GitHub Project</a> | Template by <a href="https://github.com/larskotthoff/assurvey">Lars Kotthoff</a>
</footer>
</body>
</html>