You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by le...@apache.org on 2020/02/20 18:42:02 UTC
[incubator-datasketches-website] 02/03: Interim update
This is an automated email from the ASF dual-hosted git repository.
leerho pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-website.git
commit d4bb22136d7e478d8d96de8acf861cc6d866ba52
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Wed Feb 19 18:37:39 2020 -0800
Interim update
---
src/main/java/org/apache/datasketches/docgen/ErrorTables.java | 2 +-
src/main/java/org/apache/datasketches/docgen/TocGenerator.java | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/datasketches/docgen/ErrorTables.java b/src/main/java/org/apache/datasketches/docgen/ErrorTables.java
index 33ea61f..b4fbf82 100644
--- a/src/main/java/org/apache/datasketches/docgen/ErrorTables.java
+++ b/src/main/java/org/apache/datasketches/docgen/ErrorTables.java
@@ -73,7 +73,7 @@ public class ErrorTables {
static String rse(int lgK, int stdDev, double factor) {
double k = 1 << lgK;
- double rse = (stdDev * factor * 100.0) / Math.sqrt(k - 1.0);
+ double rse = stdDev * factor * 100.0 / Math.sqrt(k - 1.0);
return String.format("%6.3f%%", rse);
}
diff --git a/src/main/java/org/apache/datasketches/docgen/TocGenerator.java b/src/main/java/org/apache/datasketches/docgen/TocGenerator.java
index 539b387..2baf995 100644
--- a/src/main/java/org/apache/datasketches/docgen/TocGenerator.java
+++ b/src/main/java/org/apache/datasketches/docgen/TocGenerator.java
@@ -25,10 +25,10 @@ import java.io.File;
import java.io.PrintWriter;
import java.util.Iterator;
+import org.apache.datasketches.Files;
import org.json.JSONArray;
import org.json.JSONObject;
import org.testng.annotations.Test;
-import org.apache.datasketches.Files;
/**
* @author Lee Rhodes
@@ -53,7 +53,7 @@ public class TocGenerator {
* </ol>
* @author Lee Rhodes
*/
- //@Test
+ @Test
public static void runTocGenerator() {
final String jsonSrcFile = "src/main/resources/docgen/toc.json";
final String htmlScriptFile = "src/main/resources/docgen/tocScript.html";
@@ -71,7 +71,7 @@ public class TocGenerator {
public TocGenerator(final String jsonSrcFile, final String htmlScriptFile, final String tgtTocFile) {
jsonScrFile = jsonSrcFile;
this.htmlScriptFile = htmlScriptFile;
- if ((tgtTocFile != null) && (!tgtTocFile.isEmpty())) {
+ if (tgtTocFile != null && !tgtTocFile.isEmpty()) {
final File file = new File(tgtTocFile);
if (file.exists()) { file.delete(); }
pw = openPrintWriter(tgtTocFile);
@@ -89,7 +89,7 @@ public class TocGenerator {
if (clazz.equals("TOC")) { emitToc(jo, sb); }
else if (clazz.equals("Dropdown")) { emitDropdown(jo, sb); }
else { emitDoc(jo, sb); }
- if ((htmlScriptFile != null) && (!htmlScriptFile.isEmpty())) {
+ if (htmlScriptFile != null && !htmlScriptFile.isEmpty()) {
final String script = Files.fileToString(htmlScriptFile);
sb.append(script);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org