Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cs-uob/COMSM0085
Browse files Browse the repository at this point in the history
  • Loading branch information
m-j-edwards committed Jan 19, 2024
2 parents fdfb1c0 + e423380 commit c919e4e
Show file tree
Hide file tree
Showing 40 changed files with 347 additions and 681 deletions.
2 changes: 1 addition & 1 deletion docs/exercises/part1/build1/exercise.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ <h1 class="menu-title">Exercises</h1>
<main>
<h1 id="debugging-exercise"><a class="header" href="#debugging-exercise">Debugging exercise</a></h1>
<p>Clone the repository <code>git@github.com:cs-uob/COMSM0085</code> if you have not done so already and open the folder <code>code/debugging</code>.</p>
<p>There is a program <code>stackcalc.c</code> that attempts to implement the specification in <code>stackcalc.txt</code> for a RPN calculator, but it does not work correctly. For example, <code>1 2 +</code> should produce <code>3.0000</code> but produces <code>Error, operator on empty stack</code>. (Read the notes in the text file about how to compile the program with the required library.)</p>
<p>There is a program <code>stackcalc.c</code> that attempts to implement the specification in <code>stackcalc.txt</code> for a Reverse Polish Notation calculator, but it does not work correctly. For example, <code>1 2 +</code> should produce <code>3.0000</code> but produces <code>Error, operator on empty stack</code>. (Read the notes in the text file about how to compile the program with the required library.)</p>
<p>Your exercise is to debug and fix the program, making as few changes to the general structure as possible (so don't just rewrite the whole thing from scratch).</p>

</main>
Expand Down
2 changes: 1 addition & 1 deletion docs/exercises/part1/build2/spring.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ <h2 id="development"><a class="header" href="#development">Development</a></h2>
<p><em>You can also access the web page from the terminal on your host machine with <code>wget localhost:8080 -q -O /dev/stdout</code> which should print &quot;Hello, Software Tools!&quot; on your terminal. If you just do <code>wget localhost:8080</code> it will save the output to a file with the default name <code>index.html</code>.</em></p>
<p>The <code>@GetMapping</code> means, when a HTTP GET request comes in for a URL with the path in the annotation (such as a browser would send), then run this function. For example, accessing <code>localhost:8080/pages/index.html</code> would look for a mapping <code>/pages/index.html</code> where as the <code>/</code> mapping covers when you type no path at all. You can start to see that URL paths on the web are modelled on POSIX paths as you learnt in this unit, with forward slashes and a concept of a &quot;root folder&quot; <code>/</code> which is what gets returned when you type a website's name in your browser without a path on the end.</p>
<p>You've seen that build tools like maven automate the process of downloading the libraries your project needs and compiling your project. The Spring Framework automates (as far as possible) the process of running these libraries when your application starts, and getting them all to work nicely together (there is a <em>lot</em> going on in the background from a web request arriving to your function being called to get the page contents).
The obvious next step would be to use thymeleaf to render HTML templates to make proper pages. This is indeed something you'll learn about later in this unit and in your second-year software project next year, but there are a few more steps you'll need to know to do this, and I don't want to go into that today - that's quite enough material for one workshop.</p>
The obvious next step would be to use thymeleaf to render HTML templates to make proper pages. This is indeed something you'll learn about later in this unit, but there are a few more steps you'll need to know to do this - and that's quite enough material for one workshop.</p>

</main>

Expand Down
1 change: 0 additions & 1 deletion docs/exercises/part1/posix4/stat.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ <h1 id="inodes-and-system-calls"><a class="header" href="#inodes-and-system-call
<li>Use a command-line program provided by your distribution.</li>
</ol>
<h2 id="preparation"><a class="header" href="#preparation">Preparation</a></h2>
<p>Install the <code>musl-dev</code> package, which provides the header files for the C library, as well as <code>gcc</code> if you have not installed that yet.</p>
<p>Have a look at the manual page <code>man stat</code> for the <code>stat</code> system call. The abbreviated headers are:</p>
<pre><code class="language-C">#include &lt;sys/stat.h&gt;

Expand Down
5 changes: 2 additions & 3 deletions docs/exercises/part1/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -1650,7 +1650,7 @@ <h2 id="development"><a class="header" href="#development">Development</a></h2>
<p><em>You can also access the web page from the terminal on your host machine with <code>wget localhost:8080 -q -O /dev/stdout</code> which should print &quot;Hello, Software Tools!&quot; on your terminal. If you just do <code>wget localhost:8080</code> it will save the output to a file with the default name <code>index.html</code>.</em></p>
<p>The <code>@GetMapping</code> means, when a HTTP GET request comes in for a URL with the path in the annotation (such as a browser would send), then run this function. For example, accessing <code>localhost:8080/pages/index.html</code> would look for a mapping <code>/pages/index.html</code> where as the <code>/</code> mapping covers when you type no path at all. You can start to see that URL paths on the web are modelled on POSIX paths as you learnt in this unit, with forward slashes and a concept of a &quot;root folder&quot; <code>/</code> which is what gets returned when you type a website's name in your browser without a path on the end.</p>
<p>You've seen that build tools like maven automate the process of downloading the libraries your project needs and compiling your project. The Spring Framework automates (as far as possible) the process of running these libraries when your application starts, and getting them all to work nicely together (there is a <em>lot</em> going on in the background from a web request arriving to your function being called to get the page contents).
The obvious next step would be to use thymeleaf to render HTML templates to make proper pages. This is indeed something you'll learn about later in this unit and in your second-year software project next year, but there are a few more steps you'll need to know to do this, and I don't want to go into that today - that's quite enough material for one workshop.</p>
The obvious next step would be to use thymeleaf to render HTML templates to make proper pages. This is indeed something you'll learn about later in this unit, but there are a few more steps you'll need to know to do this - and that's quite enough material for one workshop.</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="build-tools-1"><a class="header" href="#build-tools-1">Build Tools 1</a></h1>
<h2 id="videos-5"><a class="header" href="#videos-5">Videos</a></h2>
<div class="table-wrapper"><table><thead><tr><th>Video</th><th style="text-align: right">Length</th><th>Slides</th></tr></thead><tbody>
Expand All @@ -1663,7 +1663,7 @@ <h2 id="exercise"><a class="header" href="#exercise">Exercise</a></h2>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="debugging-exercise"><a class="header" href="#debugging-exercise">Debugging exercise</a></h1>
<p>Clone the repository <code>git@github.com:cs-uob/COMSM0085</code> if you have not done so already and open the folder <code>code/debugging</code>.</p>
<p>There is a program <code>stackcalc.c</code> that attempts to implement the specification in <code>stackcalc.txt</code> for a RPN calculator, but it does not work correctly. For example, <code>1 2 +</code> should produce <code>3.0000</code> but produces <code>Error, operator on empty stack</code>. (Read the notes in the text file about how to compile the program with the required library.)</p>
<p>There is a program <code>stackcalc.c</code> that attempts to implement the specification in <code>stackcalc.txt</code> for a Reverse Polish Notation calculator, but it does not work correctly. For example, <code>1 2 +</code> should produce <code>3.0000</code> but produces <code>Error, operator on empty stack</code>. (Read the notes in the text file about how to compile the program with the required library.)</p>
<p>Your exercise is to debug and fix the program, making as few changes to the general structure as possible (so don't just rewrite the whole thing from scratch).</p>
<div style="break-before: page; page-break-before: always;"></div><h1 id="bonus-posix-activity"><a class="header" href="#bonus-posix-activity">Bonus POSIX Activity</a></h1>
<p><em>This activity is optional, and non-examinable. We recommend that you watch the videos anyway.</em></p>
Expand Down Expand Up @@ -1692,7 +1692,6 @@ <h2 id="exercises-5"><a class="header" href="#exercises-5">Exercises</a></h2>
<li>Use a command-line program provided by your distribution.</li>
</ol>
<h2 id="preparation"><a class="header" href="#preparation">Preparation</a></h2>
<p>Install the <code>musl-dev</code> package, which provides the header files for the C library, as well as <code>gcc</code> if you have not installed that yet.</p>
<p>Have a look at the manual page <code>man stat</code> for the <code>stat</code> system call. The abbreviated headers are:</p>
<pre><code class="language-C">#include &lt;sys/stat.h&gt;

Expand Down
2 changes: 1 addition & 1 deletion docs/exercises/part1/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/exercises/part1/searchindex.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/exercises/part2/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded affix "><a href="overview.html">Overview</a></li><li class="chapter-item expanded affix "><li class="part-title">Week 6: The Web</li><li class="chapter-item expanded "><a href="http/index.html"><strong aria-hidden="true">1.</strong> HTTP</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="http/setup.html"><strong aria-hidden="true">1.1.</strong> Setup</a></li><li class="chapter-item expanded "><a href="http/explore.html"><strong aria-hidden="true">1.2.</strong> Exploring HTTP</a></li><li class="chapter-item expanded "><a href="http/research.html"><strong aria-hidden="true">1.3.</strong> Online research</a></li><li class="chapter-item expanded "><a href="http/server.html"><strong aria-hidden="true">1.4.</strong> A server in Java</a></li></ol></li><li class="chapter-item expanded "><a href="html5/index.html"><strong aria-hidden="true">2.</strong> HTML5</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="html5/basic.html"><strong aria-hidden="true">2.1.</strong> Basic HTML5</a></li><li class="chapter-item expanded "><a href="html5/templates.html"><strong aria-hidden="true">2.2.</strong> Templates</a></li></ol></li><li class="chapter-item expanded "><li class="part-title">Week 7: CSS</li><li class="chapter-item expanded "><a href="css/index.html"><strong aria-hidden="true">3.</strong> CSS</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="css/text.html"><strong aria-hidden="true">3.1.</strong> Styling Text</a></li><li class="chapter-item expanded "><a href="css/framework.html"><strong aria-hidden="true">3.2.</strong> Frameworks</a></li></ol></li><li class="chapter-item expanded "><a href="cssgrid/index.html"><strong aria-hidden="true">4.</strong> CSS grids</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="cssgrid/intro.html"><strong aria-hidden="true">4.1.</strong> Introduction</a></li><li class="chapter-item expanded "><a href="cssgrid/curriculum.html"><strong aria-hidden="true">4.2.</strong> Curriculum exercise</a></li><li class="chapter-item expanded "><a href="cssgrid/trees.html"><strong aria-hidden="true">4.3.</strong> Trees exercise (responsive layout)</a></li></ol></li><li class="chapter-item expanded "><li class="part-title">Week 8: Javascript & Scraping</li><li class="chapter-item expanded "><a href="js/index.html"><strong aria-hidden="true">5.</strong> JavaScript</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="js/single.html"><strong aria-hidden="true">5.1.</strong> A single-page app</a></li><li class="chapter-item expanded "><a href="js/static.html"><strong aria-hidden="true">5.2.</strong> Static structure</a></li><li class="chapter-item expanded "><a href="js/dynamic1.html"><strong aria-hidden="true">5.3.</strong> Dynamic structure, part 1</a></li><li class="chapter-item expanded "><a href="js/dynamic2.html"><strong aria-hidden="true">5.4.</strong> Dynamic structure, part 2</a></li><li class="chapter-item expanded "><a href="js/exercises.html"><strong aria-hidden="true">5.5.</strong> Further exercises</a></li></ol></li><li class="chapter-item expanded "><a href="scrape/index.html"><strong aria-hidden="true">6.</strong> Web scraping</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="scrape/crawl.html"><strong aria-hidden="true">6.1.</strong> Crawling</a></li><li class="chapter-item expanded "><a href="scrape/soup.html"><strong aria-hidden="true">6.2.</strong> BeautifulSoup</a></li></ol></li><li class="chapter-item expanded "><li class="part-title">Week 9: React & The Cloud</li><li class="chapter-item expanded "><a href="react/index.html"><strong aria-hidden="true">7.</strong> React</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="react/installing.html"><strong aria-hidden="true">7.1.</strong> Installing React</a></li><li class="chapter-item expanded "><a href="react/hello.html"><strong aria-hidden="true">7.2.</strong> Hello World in React</a></li><li class="chapter-item expanded "><a href="react/character.html"><strong aria-hidden="true">7.3.</strong> Exercise</a></li></ol></li><li class="chapter-item expanded "><a href="cloud/cloud1.html"><strong aria-hidden="true">8.</strong> The Cloud</a></li><li class="chapter-item expanded affix "><li class="part-title">Week 10: A Complete Application</li><li class="chapter-item expanded "><a href="app1/index.html"><strong aria-hidden="true">9.</strong> A complete application, part 1</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="app1/setup.html"><strong aria-hidden="true">9.1.</strong> Setting Things Up</a></li><li class="chapter-item expanded "><a href="app1/walkthrough.html"><strong aria-hidden="true">9.2.</strong> Walkthrough</a></li><li class="chapter-item expanded "><a href="app1/lifecycle.html"><strong aria-hidden="true">9.3.</strong> React Lifecycles</a></li><li class="chapter-item expanded "><a href="app1/extent.html"><strong aria-hidden="true">9.4.</strong> The Extent Problem</a></li><li class="chapter-item expanded "><a href="app1/ex.html"><strong aria-hidden="true">9.5.</strong> Exercise</a></li></ol></li><li class="chapter-item expanded "><a href="app2/index.html"><strong aria-hidden="true">10.</strong> A complete application, part 2</a></li></ol>
<ol class="chapter"><li class="chapter-item expanded affix "><a href="overview.html">Overview</a></li><li class="chapter-item expanded affix "><li class="part-title">Week 6: The Web</li><li class="chapter-item expanded "><a href="http/index.html"><strong aria-hidden="true">1.</strong> HTTP</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="http/setup.html"><strong aria-hidden="true">1.1.</strong> Setup</a></li><li class="chapter-item expanded "><a href="http/explore.html"><strong aria-hidden="true">1.2.</strong> Exploring HTTP</a></li><li class="chapter-item expanded "><a href="http/research.html"><strong aria-hidden="true">1.3.</strong> Online research</a></li><li class="chapter-item expanded "><a href="http/server.html"><strong aria-hidden="true">1.4.</strong> A server in Java</a></li></ol></li><li class="chapter-item expanded "><a href="html5/index.html"><strong aria-hidden="true">2.</strong> HTML5</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="html5/basic.html"><strong aria-hidden="true">2.1.</strong> Basic HTML5</a></li><li class="chapter-item expanded "><a href="html5/templates.html"><strong aria-hidden="true">2.2.</strong> Templates</a></li></ol></li><li class="chapter-item expanded "><li class="part-title">Week 7: CSS</li><li class="chapter-item expanded "><a href="css/index.html"><strong aria-hidden="true">3.</strong> CSS</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="css/text.html"><strong aria-hidden="true">3.1.</strong> Styling Text</a></li><li class="chapter-item expanded "><a href="css/framework.html"><strong aria-hidden="true">3.2.</strong> Frameworks</a></li></ol></li><li class="chapter-item expanded "><a href="cssgrid/index.html"><strong aria-hidden="true">4.</strong> CSS grids</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="cssgrid/intro.html"><strong aria-hidden="true">4.1.</strong> Introduction</a></li><li class="chapter-item expanded "><a href="cssgrid/curriculum.html"><strong aria-hidden="true">4.2.</strong> Curriculum exercise</a></li><li class="chapter-item expanded "><a href="cssgrid/trees.html"><strong aria-hidden="true">4.3.</strong> Trees exercise (responsive layout)</a></li></ol></li><li class="chapter-item expanded "><li class="part-title">Week 8: Javascript</li><li class="chapter-item expanded "><a href="js/index.html"><strong aria-hidden="true">5.</strong> JavaScript</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="js/single.html"><strong aria-hidden="true">5.1.</strong> A single-page app</a></li><li class="chapter-item expanded "><a href="js/static.html"><strong aria-hidden="true">5.2.</strong> Static structure</a></li><li class="chapter-item expanded "><a href="js/dynamic1.html"><strong aria-hidden="true">5.3.</strong> Dynamic structure, part 1</a></li><li class="chapter-item expanded "><a href="js/dynamic2.html"><strong aria-hidden="true">5.4.</strong> Dynamic structure, part 2</a></li><li class="chapter-item expanded "><a href="js/exercises.html"><strong aria-hidden="true">5.5.</strong> Further exercises</a></li></ol></li><li class="chapter-item expanded "><a href="react/index.html"><strong aria-hidden="true">6.</strong> React</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="react/installing.html"><strong aria-hidden="true">6.1.</strong> Installing React</a></li><li class="chapter-item expanded "><a href="react/hello.html"><strong aria-hidden="true">6.2.</strong> Hello World in React</a></li><li class="chapter-item expanded "><a href="react/character.html"><strong aria-hidden="true">6.3.</strong> Exercise</a></li></ol></li><li class="chapter-item expanded "><li class="part-title">Week 9: Web Scraping</li><li class="chapter-item expanded "><a href="scrape/index.html"><strong aria-hidden="true">7.</strong> Web scraping</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="scrape/crawl.html"><strong aria-hidden="true">7.1.</strong> Crawling</a></li><li class="chapter-item expanded "><a href="scrape/soup.html"><strong aria-hidden="true">7.2.</strong> BeautifulSoup</a></li></ol></li><li class="chapter-item expanded "><li class="part-title">Week 10: Practical Encryption</li><li class="chapter-item expanded "><div><strong aria-hidden="true">8.</strong> Practical Encryption</div></li><li><ol class="section"><li class="chapter-item expanded "><div><strong aria-hidden="true">8.1.</strong> OpenSSL</div></li><li class="chapter-item expanded "><div><strong aria-hidden="true">8.2.</strong> PGP</div></li></ol></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle">
<div class="sidebar-resize-indicator"></div>
Expand Down
Loading

0 comments on commit c919e4e

Please sign in to comment.