From 71d6973d350595ffbe29f5d791ec8972ccc23416 Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 8 Apr 2016 20:01:29 +0200 Subject: optimize further for 800x600 --- code/bostonset.js | 1 - index.css | 29 +++++++---------------------- index.html | 16 ++++++++-------- 3 files changed, 15 insertions(+), 31 deletions(-) diff --git a/code/bostonset.js b/code/bostonset.js index f5f1264..bfdbb63 100644 --- a/code/bostonset.js +++ b/code/bostonset.js @@ -36,7 +36,6 @@ var Bostonset = (function() { }; Bostonset.prototype.attributes = function() { - console.log(attrs); return attrs; }; diff --git a/index.css b/index.css index 13e9525..a3ca997 100644 --- a/index.css +++ b/index.css @@ -1,27 +1,12 @@ -/* reset */ -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; -} - h1, h2, h3, h4, h5, h6 { text-align: center; + color: #222; + line-height: 90%; +} + +body { + color: #444; + background-color: #EEEEEE; } .step { diff --git a/index.html b/index.html index 5a1b913..c649d6b 100644 --- a/index.html +++ b/index.html @@ -3,10 +3,10 @@ - + @@ -61,8 +61,9 @@ .style("height", parseInt(window.innerHeight) + "px"); d3.selectAll(".scale") .style("font-size", function() { - var lines = d3.select(this).selectAll("p")[0].length; // TODO a bit specific, may not work in all cases - return Math.min(this.clientWidth/10, this.clientHeight/lines*(1.5)) + "px"; // TODO replace by line height? + var lines = d3.select(this).selectAll("p")[0].length+1; // TODO a bit specific, may not work in all cases + if (lines<=1) return this.clientWidth/10 + "px"; + return this.clientHeight/10 + "px"; }); var scalePicture = function(d, i, me, extraRatio) { // "extraRatio" might scale vertically @@ -72,7 +73,7 @@ winH = window.innerHeight, picW = me.node().naturalWidth, picH = me.node().naturalHeight, - ratioH = 0.75*extraRatio, ratioW = 0.9; + ratioH = 0.7*extraRatio, ratioW = 0.7; if ((winW*ratioW)/picW > (winH*ratioH)/picH) { me.style("height", winH*ratioH + "px"); me.style("width", "auto"); @@ -82,7 +83,7 @@ } }; d3.selectAll(".scalepic").each(scalePicture); - d3.selectAll(".scalepic-half").each(function(d, i) { scalePicture(d, i, this, 0.5); }); + d3.selectAll(".scalepic-half").each(function(d, i) { scalePicture(d, i, this, 0.45); }); }; window.addEventListener("resize", sizeSlides); @@ -93,7 +94,7 @@ }); -
+

Künstliche neuronale Netze

@@ -175,7 +176,6 @@

Das Problem – Die Boston-Häuserdatenreihe

-

:homes:

@@ -193,7 +193,7 @@ }); // TODO highlight medv table.append("tbody"); - for(c=0; c<8; c++) { + for(c=0; c<5; c++) { var row = Math.floor(Math.random()*bostonset.length()); var tr = table.select("tbody").append("tr"); bostonset.rawData(row).forEach(function(val) { -- cgit v1.3.1