From 390916c417b04e6afdce7c2f7c733af13377f717 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Mon, 4 Mar 2013 09:09:31 +0100 Subject: [PATCH 1/3] fix stringbuffer appending for special numeric values --- lib/ShapedJson/shaped-json.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/ShapedJson/shaped-json.c b/lib/ShapedJson/shaped-json.c index f7409f9e98..3c67eb703c 100644 --- a/lib/ShapedJson/shaped-json.c +++ b/lib/ShapedJson/shaped-json.c @@ -1476,7 +1476,23 @@ static bool StringifyJsonShapeDataNumber (TRI_shaper_t* shaper, int res; v = * (TRI_shape_number_t const*) data; - res = TRI_AppendDoubleStringBuffer(buffer, v); + // check for special values + + if (v != v) { + // NaN + res = TRI_AppendStringStringBuffer(buffer, "null"); + } + else if (v == HUGE_VAL) { + // +inf + res = TRI_AppendStringStringBuffer(buffer, "null"); + } + else if (v == -HUGE_VAL) { + // -inf + res = TRI_AppendStringStringBuffer(buffer, "null"); + } + else { + res = TRI_AppendDoubleStringBuffer(buffer, v); + } if (res != TRI_ERROR_NO_ERROR) { return false; From df28db2210890d642154534bddb6ce047730fd4e Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Mon, 4 Mar 2013 09:11:09 +0100 Subject: [PATCH 2/3] updated CHANGELOG --- CHANGELOG | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index d30e7b0abd..3bc7c726cc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,11 @@ v1.3 (XXXX-XX-XX) ----------------- +* fixed shapedjson to json conversion for special numeric values (NaN, +inf, -inf). + Before, "NaN", "inf", or "-inf" were written into the JSONified output, but these + values are not allowed in JSON. Now, "null" is written to the JSONified output as + required. + * added AQL functions VARIANCE_POPULATION(), VARIANCE_SAMPLE(), STDDEV_POPULATION(), STDDEV_SAMPLE(), AVERAGE(), MEDIAN() to calculate stastical values for lists From 2384995cdf596b47ed1333ee7a4a977e60a2ee31 Mon Sep 17 00:00:00 2001 From: beckmann73 Date: Mon, 4 Mar 2013 10:01:04 +0100 Subject: [PATCH 3/3] pagination with icons footer not fixed --- frontend/css/collectionsView.css | 2 ++ frontend/css/footerView.css | 6 ++---- frontend/index.html | 6 +++--- frontend/js/templates/documentsView.ejs | 19 +++---------------- 4 files changed, 10 insertions(+), 23 deletions(-) diff --git a/frontend/css/collectionsView.css b/frontend/css/collectionsView.css index 3646e2374e..873b70f957 100644 --- a/frontend/css/collectionsView.css +++ b/frontend/css/collectionsView.css @@ -98,6 +98,8 @@ #transparentHeader i { margin-top: 2px; margin-right: 2px; + left: 10px; + position: absolute; } #transparentHeader a.disabledBread { diff --git a/frontend/css/footerView.css b/frontend/css/footerView.css index 5552f8bf2b..b9b4e04cf7 100644 --- a/frontend/css/footerView.css +++ b/frontend/css/footerView.css @@ -3,12 +3,9 @@ font-size: 14px; margin: 30px auto 0; text-align: center; - position: fixed; - bottom:0; left: 0; right: 0; - bottom:200; - margin-top:100px; + margin-top:200px; } .footerExtra { @@ -48,6 +45,7 @@ .footer p { padding-top: 10px; padding-bottom: 10px; + margin-bottom:0; } .footer span a { diff --git a/frontend/index.html b/frontend/index.html index 8aadbfe56e..9549e36f6b 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -42,11 +42,11 @@
-
-
- +
+
+ diff --git a/frontend/js/templates/documentsView.ejs b/frontend/js/templates/documentsView.ejs index 3d65b2eb74..80925d7c4a 100644 --- a/frontend/js/templates/documentsView.ejs +++ b/frontend/js/templates/documentsView.ejs @@ -2,8 +2,8 @@
@@ -20,20 +20,7 @@ - - - - +