diff options
Diffstat (limited to 'native_client_sdk')
-rw-r--r-- | native_client_sdk/doc_generated/cds2014/cpp.html | 10 | ||||
-rw-r--r-- | native_client_sdk/doc_generated/cds2014/python.html | 14 | ||||
-rw-r--r-- | native_client_sdk/doc_generated/sdk/download.html | 5 | ||||
-rw-r--r-- | native_client_sdk/src/doc/cds2014/cpp.rst | 12 | ||||
-rw-r--r-- | native_client_sdk/src/doc/cds2014/python.rst | 12 | ||||
-rw-r--r-- | native_client_sdk/src/doc/nacldev/setup_web.inc | 2 |
6 files changed, 25 insertions, 30 deletions
diff --git a/native_client_sdk/doc_generated/cds2014/cpp.html b/native_client_sdk/doc_generated/cds2014/cpp.html index 761972e..c437318 100644 --- a/native_client_sdk/doc_generated/cds2014/cpp.html +++ b/native_client_sdk/doc_generated/cds2014/cpp.html @@ -204,6 +204,8 @@ This will require digging into some C++ code.</p> since you might decide later that you like fire better, I know I do:</p> <pre class="prettyprint"> cp fire.cc water.cc +git add water.cc +git commit -am "adding water" </pre> <p>For this codelab, you’ll only need to change <cite>water.cc</cite>.</p> <p>The task of turning fire into water involves two key challenges:</p> @@ -222,7 +224,7 @@ our flame effect is actually monochrome. A single intensity value is used in the flame simulation. This is then converted to color based on a multi-color gradient. To alter the color-scheme, locate this palette, and exchange -the red component for blue.</p> +the red component (first) with blue (third).</p> <p>Hint: Focus your energies on the CreatePalette function.</p> <p>You can test you changes at any time with:</p> <pre class="prettyprint"> @@ -234,11 +236,7 @@ While smoke, and well flame, rises, we want our water to go down.</p> <p>The simulation of fire loops over each pixel, bottom row to top row, diffusing “fire stuff” behind the sweep. -You’ll want to reverse this. -Note the simulation buffer is stored in <a href="http://en.wikipedia.org/wiki/Row-major_order" - target="_blank">Row-major order</a> from bottom to top. -Accesses of + width and - width are used to reach rows above and below -the current line.</p> +You’ll want to reverse this.</p> <p>Hint: You’ll need to change the y loop direction in the UpdateFlames function.</p> <h3 id="up-high-down-low">Up high, down low</h3> <p>While you can now use the mouse to inject a trickle of water. diff --git a/native_client_sdk/doc_generated/cds2014/python.html b/native_client_sdk/doc_generated/cds2014/python.html index bef59c75..4955a4c 100644 --- a/native_client_sdk/doc_generated/cds2014/python.html +++ b/native_client_sdk/doc_generated/cds2014/python.html @@ -43,7 +43,7 @@ if (!('application/x-pnacl' in navigator.mimeTypes)) { <h2 id="setup">Setup</h2> <p>For this codelab, you will need to point your web browser at the Beta preview of our in-browser NaCl Dev Environment.</p> -<a href="https://naclports.storage.googleapis.com/builds/pepper_41/trunk-169-gc77aece/publish/devenv/pnacl/app/bash.html" +<a href="https://naclports.storage.googleapis.com/builds/pepper_41/trunk-176-g9b9e342/publish/devenv/pnacl/app/bash.html" target="_blank">Click here to open the environment.</a><p>While no installation is needed, the first load of the page will require you to agree to allow the page unlimited storage (Click “Ok” in the bar at the top of your browser window.)</p> @@ -191,15 +191,17 @@ Just one thing is missing, that whole diffing thing...</p> <pre class="prettyprint"> make </pre> -<p>This will copy the sample to /tmp/differ (clobbering whatever is already -there). It will also attempt to open the sample, but will be blocked by -a popup blocker. Click on the URL to accept the popup.</p> +<p>This will attempt to open the sample, but will be blocked by +a popup blocker the first time. Click on the URL to accept the popup. +It also clobbers /tmp/differ for good measure.</p> <p>As you can see, this isn’t quite what we’re going for.</p> <p>You’ll want to modify diff.py, using the editor you selected earlier. You’ll probably want to consult the <a href="https://docs.python.org/2/library/difflib.html" target="_blank">difflib</a> documentation. I would suggest you check out the HtmlDiff class and make use of -the make_file member function. I would also suggest the splitlines +the make_file member function. Note our goal is to create a +full HTML diff, so the make_table function is insufficient. +I would also suggest the splitlines function may come in handy.</p> <p>You can test diff.py manually as you would in a normal UNIX environment. It can be run like this:</p> @@ -207,7 +209,7 @@ It can be run like this:</p> ./diff.py before.txt after.txt out.html </pre> <p>Once everything is working diff.html will contain an html diff. -Run <cite>make</cite> again to deploy and test the full app.</p> +After the initial <cite>make</cite> you can hit “Run” to test your changes.</p> <p>Now get to it, and good luck!</p> <h2 id="what-you-ve-learned">What you’ve learned</h2> <p>While the details of building and packaging Python have been diff --git a/native_client_sdk/doc_generated/sdk/download.html b/native_client_sdk/doc_generated/sdk/download.html index 496bb7d..acb1b32 100644 --- a/native_client_sdk/doc_generated/sdk/download.html +++ b/native_client_sdk/doc_generated/sdk/download.html @@ -23,13 +23,12 @@ command line.</li> </ul> <p>Follow the steps below to download and install the Native Client SDK.</p> <h2 id="prerequisites"><span id="id1"></span>Prerequisites</h2> -<h3 id="python-2-7"><span id="python26-27"></span>Python 2.7</h3> +<h3 id="python-2-7"><span id="python27"></span>Python 2.7</h3> <p>Make sure that the Python executable is in your <code>PATH</code> variable. Python 3.x is not yet supported.</p> <ul class="small-gap"> <li>On Mac and Linux, Python is likely preinstalled. Run the command <code>python -V</code> -in a terminal window, and make sure that the version you have is 2.6.x or -2.7.x.</li> +in a terminal window, and make sure that the version you have is 2.7.x.</li> <li>On Windows, you may need to install Python. Go to <a class="reference external" href="http://www.python.org/download/">http://www.python.org/ download/</a> and select the latest 2.x version. In addition, be sure to add the Python directory (for example, diff --git a/native_client_sdk/src/doc/cds2014/cpp.rst b/native_client_sdk/src/doc/cds2014/cpp.rst index e217aca..9c62ffb 100644 --- a/native_client_sdk/src/doc/cds2014/cpp.rst +++ b/native_client_sdk/src/doc/cds2014/cpp.rst @@ -73,6 +73,8 @@ Before you begin, you'll want to copy our fire program to a new name, since you might decide later that you like fire better, I know I do:: cp fire.cc water.cc + git add water.cc + git commit -am "adding water" For this codelab, you'll only need to change `water.cc`. @@ -93,7 +95,7 @@ our flame effect is actually monochrome. A single intensity value is used in the flame simulation. This is then converted to color based on a multi-color gradient. To alter the color-scheme, locate this palette, and exchange -the red component for blue. +the red component (first) with blue (third). Hint: Focus your energies on the CreatePalette function. @@ -111,14 +113,6 @@ The simulation of fire loops over each pixel, bottom row to top row, diffusing "fire stuff" behind the sweep. You'll want to reverse this. -Note the simulation buffer is stored in |row_major| from bottom to top. -Accesses of + width and - width are used to reach rows above and below -the current line. - -.. |row_major| raw:: html - - <a href="http://en.wikipedia.org/wiki/Row-major_order" - target="_blank">Row-major order</a> Hint: You'll need to change the y loop direction in the UpdateFlames function. diff --git a/native_client_sdk/src/doc/cds2014/python.rst b/native_client_sdk/src/doc/cds2014/python.rst index bc4b5d2..07d235c 100644 --- a/native_client_sdk/src/doc/cds2014/python.rst +++ b/native_client_sdk/src/doc/cds2014/python.rst @@ -62,16 +62,18 @@ To see where things stand, deploy the sample like this:: make -This will copy the sample to /tmp/differ (clobbering whatever is already -there). It will also attempt to open the sample, but will be blocked by -a popup blocker. Click on the URL to accept the popup. +This will attempt to open the sample, but will be blocked by +a popup blocker the first time. Click on the URL to accept the popup. +It also clobbers /tmp/differ for good measure. As you can see, this isn't quite what we're going for. You'll want to modify diff.py, using the editor you selected earlier. You'll probably want to consult the |difflib| documentation. I would suggest you check out the HtmlDiff class and make use of -the make_file member function. I would also suggest the splitlines +the make_file member function. Note our goal is to create a +full HTML diff, so the make_table function is insufficient. +I would also suggest the splitlines function may come in handy. You can test diff.py manually as you would in a normal UNIX environment. @@ -80,7 +82,7 @@ It can be run like this:: ./diff.py before.txt after.txt out.html Once everything is working diff.html will contain an html diff. -Run `make` again to deploy and test the full app. +After the initial `make` you can hit "Run" to test your changes. Now get to it, and good luck! diff --git a/native_client_sdk/src/doc/nacldev/setup_web.inc b/native_client_sdk/src/doc/nacldev/setup_web.inc index 6fd32db..dd6ae51 100644 --- a/native_client_sdk/src/doc/nacldev/setup_web.inc +++ b/native_client_sdk/src/doc/nacldev/setup_web.inc @@ -6,7 +6,7 @@ the Beta preview of our in-browser NaCl Dev Environment. .. raw:: html - <a href="https://naclports.storage.googleapis.com/builds/pepper_41/trunk-169-gc77aece/publish/devenv/pnacl/app/bash.html" + <a href="https://naclports.storage.googleapis.com/builds/pepper_41/trunk-176-g9b9e342/publish/devenv/pnacl/app/bash.html" target="_blank">Click here to open the environment.</a> While no installation is needed, the first load of the page will |