Repository: incubator-edgent-website Updated Branches: refs/heads/asf-site 00f24bc6d -> 399cc8082
http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/blob/399cc808/content/recipes/recipe_value_out_of_range.html ---------------------------------------------------------------------- diff --git a/content/recipes/recipe_value_out_of_range.html b/content/recipes/recipe_value_out_of_range.html index a07c060..ddabdcf 100644 --- a/content/recipes/recipe_value_out_of_range.html +++ b/content/recipes/recipe_value_out_of_range.html @@ -165,6 +165,12 @@ + + <li class="dropdownActive"><a href="/">edgent.apache.org</a></li> + + + + </ul> </li> @@ -280,7 +286,7 @@ window.location.href = uri; <ul id="mysidebar" class="nav"> <span class="siteTagline">Edgent</span> - <span class="versionTagline">Version 1.0.0</span> + <span class="versionTagline">Version 1.0.0-incubating</span> @@ -670,7 +676,7 @@ $('#toc').on('click', 'a', function() { <span class="kd">static</span> <span class="kt">double</span> <span class="n">OPTIMAL_TEMP_HIGH</span> <span class="o">=</span> <span class="mf">91.0</span><span class="o">;</span> <span class="kd">static</span> <span class="n">Range</span><span class="o"><</span><span class="n">Double</span><span class="o">></span> <span class="n">optimalTempRange</span> <span class="o">=</span> <span class="n">Ranges</span><span class="o">.</span><span class="na">closed</span><span class="o">(</span><span class="n">OPTIMAL_TEMP_LOW</span><span class="o">,</span> <span class="n">OPTIMAL_TEMP_HIGH</span><span class="o">);</span> - <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">Exception</span> <span class="o">{</span> + <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="n">main</span><span class="o">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">Exception</span> <span class="o">{</span> <span class="n">DirectProvider</span> <span class="n">dp</span> <span class="o">=</span> <span class="k">new</span> <span class="n">DirectProvider</span><span class="o">();</span> @@ -689,7 +695,7 @@ $('#toc').on('click', 'a', function() { </code></pre></div> <h2 id="simple-filtering">Simple filtering</h2> -<p>If the corn grower is interested in determining when the temperature is strictly out of the optimal range of 77°F and 91°F, a simple filter can be used. The <code>filter</code> method can be applied to <code>TStream</code> objects, where a filter predicate determines which tuples to keep for further processing. For its method declaration, refer to the <a href="http://edgent.incubator.apache.org/javadoc/latest/org/apache/edgent/topology/TStream.html#filter-org.apache.edgent.function.Predicate-">Javadoc</a>.</p> +<p>If the corn grower is interested in determining when the temperature is strictly out of the optimal range of 77°F and 91°F, a simple filter can be used. The <code>filter</code> method can be applied to <code>TStream</code> objects, where a filter predicate determines which tuples to keep for further processing. For its method declaration, refer to the <a href="https://edgent.incubator.apache.org/javadoc/latest/org/apache/edgent/topology/TStream.html#filter-org.apache.edgent.function.Predicate-">Javadoc</a>.</p> <p>In this case, we want to keep temperatures below the lower range value <em>or</em> above the upper range value. This is expressed in the filter predicate, which follows Java's syntax for <a href="https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html#syntax">lambda expressions</a>. Then, we terminate the stream (using <code>sink</code>) by printing out the warning to standard out. Note that <code>\u00b0</code> is the Unicode encoding for the degree (°) symbol.</p> <div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">TStream</span><span class="o"><</span><span class="n">Double</span><span class="o">></span> <span class="n">simpleFiltered</span> <span class="o">=</span> <span class="n">temp</span><span class="o">.</span><span class="na">filter</span><span class="o">(</span><span class="n">tuple</span> <span class="o">-></span> @@ -704,7 +710,7 @@ $('#toc').on('click', 'a', function() { <p>The <code>deadband</code> filter is a part of the <code>edgent.analytics</code> package focused on handling sensor data. Let's look more closely at the method declaration below.</p> <div class="highlight"><pre><code class="language-java" data-lang="java"><span class="n">deadband</span><span class="o">(</span><span class="n">TStream</span><span class="o"><</span><span class="n">T</span><span class="o">></span> <span class="n">stream</span><span class="o">,</span> <span class="n">Function</span><span class="o"><</span><span class="n">T</span><span class="o">,</span><span class="n">V</span><span class="o">></span> <span class="n">value</span><span class="o">,</span> <span class="n">Predicate</span><span class="o"><</span><span class="n">V</span><span class="o">></span> <span class="n">inBand</span><span class="o">)</span> </code></pre></div> -<p>The first parameter is the stream to the filtered, which is <code>temp</code> in our scenario. The second parameter is the value to examine. Here, we use the <code>identity()</code> method to return a tuple on the stream. The last parameter is the predicate that defines the optimal range, that is, between 77°F and 91°F. it is important to note that this differs from the <code>TStream</code> version of <code>filter</code> in which one must explicitly specify the values that are out of range. The code snippet below demonstrates how the method call is pieced together. The <code>deadbandFiltered</code> stream contains temperature readings that follow the rules as described in the <a href="http://edgent.incubator.apache.org/javadoc/latest/org/apache/edgent/analytics/sensors/Filters.html#deadband-org.apache.edgent.topology.TStream-org.apache.edgent.function.Function-org.apache.edgent.function.Predicate-">Javadoc</a>:</p> +<p>The first parameter is the stream to the filtered, which is <code>temp</code> in our scenario. The second parameter is the value to examine. Here, we use the <code>identity()</code> method to return a tuple on the stream. The last parameter is the predicate that defines the optimal range, that is, between 77°F and 91°F. it is important to note that this differs from the <code>TStream</code> version of <code>filter</code> in which one must explicitly specify the values that are out of range. The code snippet below demonstrates how the method call is pieced together. The <code>deadbandFiltered</code> stream contains temperature readings that follow the rules as described in the <a href="https://edgent.incubator.apache.org/javadoc/latest/org/apache/edgent/analytics/sensors/Filters.html#deadband-org.apache.edgent.topology.TStream-org.apache.edgent.function.Function-org.apache.edgent.function.Predicate-">Javadoc</a>:</p> <ul> <li>the value is outside of the optimal range (deadband)</li> @@ -793,7 +799,7 @@ Temperature may not be optimal! It is 77.5°F! * and a deadband filter to determine when the temperature * is out of the optimal range. */</span> - <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">Exception</span> <span class="o">{</span> + <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="n">main</span><span class="o">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">Exception</span> <span class="o">{</span> <span class="n">DirectProvider</span> <span class="n">dp</span> <span class="o">=</span> <span class="k">new</span> <span class="n">DirectProvider</span><span class="o">();</span> http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/blob/399cc808/content/title-checker.html ---------------------------------------------------------------------- diff --git a/content/title-checker.html b/content/title-checker.html index 6f36952..c3aa553 100644 --- a/content/title-checker.html +++ b/content/title-checker.html @@ -2699,5 +2699,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Problem: The top drop-down navigation item title "edgent.apache.org" does not match the page title "Edgent". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + </body> </html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/blob/399cc808/content/titlepage.html ---------------------------------------------------------------------- diff --git a/content/titlepage.html b/content/titlepage.html index 0587304..d65cf4b 100644 --- a/content/titlepage.html +++ b/content/titlepage.html @@ -165,6 +165,12 @@ + + <li class="dropdownActive"><a href="/">edgent.apache.org</a></li> + + + + </ul> </li> @@ -280,7 +286,7 @@ window.location.href = uri; <ul id="mysidebar" class="nav"> <span class="siteTagline">Edgent</span> - <span class="versionTagline">Version 1.0.0</span> + <span class="versionTagline">Version 1.0.0-incubating</span> http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/blob/399cc808/content/tocpage.html ---------------------------------------------------------------------- diff --git a/content/tocpage.html b/content/tocpage.html index 017554b..8be80f0 100644 --- a/content/tocpage.html +++ b/content/tocpage.html @@ -165,6 +165,12 @@ + + <li class="dropdownActive"><a href="/">edgent.apache.org</a></li> + + + + </ul> </li> @@ -280,7 +286,7 @@ window.location.href = uri; <ul id="mysidebar" class="nav"> <span class="siteTagline">Edgent</span> - <span class="versionTagline">Version 1.0.0</span> + <span class="versionTagline">Version 1.0.0-incubating</span> http://git-wip-us.apache.org/repos/asf/incubator-edgent-website/blob/399cc808/content/urls_mydoc.txt ---------------------------------------------------------------------- diff --git a/content/urls_mydoc.txt b/content/urls_mydoc.txt index 838d85a..17d1c7d 100644 --- a/content/urls_mydoc.txt +++ b/content/urls_mydoc.txt @@ -219,5 +219,12 @@ faq: +/: + title: "edgent.apache.org" + url: "../" + link: "<a href='../'>edgent.apache.org</a>" + + +
