From 6e1df7995f8e0c25e3820abddd9febbc08748c70 Mon Sep 17 00:00:00 2001 From: brightboost Date: Fri, 19 Nov 2021 22:45:48 +0100 Subject: [PATCH] restructured last chapters --- chapter13/eventloop-async.js | 7 ++ chapter13/eventloop-sync.js | 6 ++ chapter14/bouncing ball | 46 ++++++++ chapter14/canvas image uploader | 43 ++++++++ chapter14/canvas rectangle | 27 +++++ chapter14/canvas stickman | 54 ++++++++++ chapter14/canvas text | 32 ++++++ .../ch14-browser-supporting-file-reader.html | 13 +++ chapter14/ch14-canvas-animation.html | 42 ++++++++ chapter14/ch14-canvas-circle.html | 21 ++++ chapter14/ch14-canvas-draw-mouse.html | 63 +++++++++++ chapter14/ch14-canvas-drawing-canvas.html | 31 ++++++ chapter14/ch14-canvas-lines.html | 23 ++++ chapter14/ch14-canvas-save-image.html | 34 ++++++ chapter14/ch14-canvas-saving-image.html | 38 +++++++ chapter14/ch14-canvas-text.html | 21 ++++ .../ch14-canvas-upload-image.html | 0 chapter14/ch14-canvas.html | 20 ++++ chapter14/ch14-drawing-image.html | 23 ++++ chapter14/ch14-geo-getlocation.html | 15 +++ chapter14/ch14-inspect-geo.html | 11 ++ chapter14/ch14-localstorage.html | 14 +++ chapter14/ch14-media.html | 18 ++++ chapter14/ch14-reading-file.html | 17 +++ chapter14/ch14-upload-file.html | 14 +++ chapter14/ch14-upload-files.html | 15 +++ chapter14/ch14.js | 6 ++ chapter14/countdown timer | 101 ++++++++++++++++++ chapter14/draw on canvas | 91 ++++++++++++++++ chapter14/ex1 Image Thumbnails | 37 +++++++ chapter14/ex1 Image preview | 37 +++++++ chapter14/flower.jpg | Bin 0 -> 4892 bytes chapter14/matrix effect | 44 ++++++++ chapter14/task List | 79 ++++++++++++++ chapter15/ch15-ajax.html | 22 ++++ chapter15/ch15-example-json.json | 13 +++ chapter15/ch15-express.js | 10 ++ chapter15/ch15-jquery.html | 22 ++++ chapter15/ch15-node.js | 11 ++ chapter15/ch15-vue-component.html | 18 ++++ chapter15/ch15-vue.html | 23 ++++ chapter15/exampled3.html | 24 +++++ chapter15/examplereact.html | 20 ++++ chapter15/exampleunderscore.html | 15 +++ chapter9/ch9-accessing.html | 3 + chapter9/ch9-domflow.html | 2 +- 46 files changed, 1225 insertions(+), 1 deletion(-) create mode 100644 chapter13/eventloop-async.js create mode 100644 chapter13/eventloop-sync.js create mode 100644 chapter14/bouncing ball create mode 100644 chapter14/canvas image uploader create mode 100644 chapter14/canvas rectangle create mode 100644 chapter14/canvas stickman create mode 100644 chapter14/canvas text create mode 100755 chapter14/ch14-browser-supporting-file-reader.html create mode 100755 chapter14/ch14-canvas-animation.html create mode 100755 chapter14/ch14-canvas-circle.html create mode 100755 chapter14/ch14-canvas-draw-mouse.html create mode 100755 chapter14/ch14-canvas-drawing-canvas.html create mode 100755 chapter14/ch14-canvas-lines.html create mode 100755 chapter14/ch14-canvas-save-image.html create mode 100755 chapter14/ch14-canvas-saving-image.html create mode 100755 chapter14/ch14-canvas-text.html rename chapter9/ch9.js => chapter14/ch14-canvas-upload-image.html (100%) mode change 100755 => 100644 create mode 100755 chapter14/ch14-canvas.html create mode 100755 chapter14/ch14-drawing-image.html create mode 100755 chapter14/ch14-geo-getlocation.html create mode 100755 chapter14/ch14-inspect-geo.html create mode 100755 chapter14/ch14-localstorage.html create mode 100755 chapter14/ch14-media.html create mode 100755 chapter14/ch14-reading-file.html create mode 100755 chapter14/ch14-upload-file.html create mode 100755 chapter14/ch14-upload-files.html create mode 100755 chapter14/ch14.js create mode 100644 chapter14/countdown timer create mode 100644 chapter14/draw on canvas create mode 100644 chapter14/ex1 Image Thumbnails create mode 100644 chapter14/ex1 Image preview create mode 100644 chapter14/flower.jpg create mode 100644 chapter14/matrix effect create mode 100644 chapter14/task List create mode 100755 chapter15/ch15-ajax.html create mode 100755 chapter15/ch15-example-json.json create mode 100755 chapter15/ch15-express.js create mode 100755 chapter15/ch15-jquery.html create mode 100755 chapter15/ch15-node.js create mode 100755 chapter15/ch15-vue-component.html create mode 100755 chapter15/ch15-vue.html create mode 100644 chapter15/exampled3.html create mode 100644 chapter15/examplereact.html create mode 100644 chapter15/exampleunderscore.html diff --git a/chapter13/eventloop-async.js b/chapter13/eventloop-async.js new file mode 100644 index 0000000..19f97fe --- /dev/null +++ b/chapter13/eventloop-async.js @@ -0,0 +1,7 @@ +console.log("Hi there"); +setTimeout(() => console.log("Sorry I'm late"), 1000); +console.log(add(4,5)); + +function add(x, y) { + return x + y; +} \ No newline at end of file diff --git a/chapter13/eventloop-sync.js b/chapter13/eventloop-sync.js new file mode 100644 index 0000000..f904d71 --- /dev/null +++ b/chapter13/eventloop-sync.js @@ -0,0 +1,6 @@ +console.log("Hi there"); +add(4,5); + +function add(x, y) { + return x + y; +} \ No newline at end of file diff --git a/chapter14/bouncing ball b/chapter14/bouncing ball new file mode 100644 index 0000000..546f857 --- /dev/null +++ b/chapter14/bouncing ball @@ -0,0 +1,46 @@ + + + + + Canvas HTML5 + + + + +
+ + + + diff --git a/chapter14/canvas image uploader b/chapter14/canvas image uploader new file mode 100644 index 0000000..0d1c08c --- /dev/null +++ b/chapter14/canvas image uploader @@ -0,0 +1,43 @@ + + + + + Canvas HTML5 + + + + +
+ +
+
+ + + + diff --git a/chapter14/canvas rectangle b/chapter14/canvas rectangle new file mode 100644 index 0000000..4f5e1cd --- /dev/null +++ b/chapter14/canvas rectangle @@ -0,0 +1,27 @@ + + + + + Canvas HTML5 + + + + + Not Supported + + + + diff --git a/chapter14/canvas stickman b/chapter14/canvas stickman new file mode 100644 index 0000000..159bd3e --- /dev/null +++ b/chapter14/canvas stickman @@ -0,0 +1,54 @@ + + + + + Canvas HTML5 + + + + + Not Supported + diff --git a/chapter14/canvas text b/chapter14/canvas text new file mode 100644 index 0000000..442965a --- /dev/null +++ b/chapter14/canvas text @@ -0,0 +1,32 @@ + + + + + Canvas HTML5 + + + + + Not Supported + + + + diff --git a/chapter14/ch14-browser-supporting-file-reader.html b/chapter14/ch14-browser-supporting-file-reader.html new file mode 100755 index 0000000..b7c63a0 --- /dev/null +++ b/chapter14/ch14-browser-supporting-file-reader.html @@ -0,0 +1,13 @@ + + +
+ + + diff --git a/chapter14/ch14-canvas-animation.html b/chapter14/ch14-canvas-animation.html new file mode 100755 index 0000000..d40f0eb --- /dev/null +++ b/chapter14/ch14-canvas-animation.html @@ -0,0 +1,42 @@ + + + + + + + + + + diff --git a/chapter14/ch14-canvas-circle.html b/chapter14/ch14-canvas-circle.html new file mode 100755 index 0000000..64ce4d7 --- /dev/null +++ b/chapter14/ch14-canvas-circle.html @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/chapter14/ch14-canvas-draw-mouse.html b/chapter14/ch14-canvas-draw-mouse.html new file mode 100755 index 0000000..7a622cb --- /dev/null +++ b/chapter14/ch14-canvas-draw-mouse.html @@ -0,0 +1,63 @@ + + + + + + + +
+ + + + + diff --git a/chapter14/ch14-canvas-drawing-canvas.html b/chapter14/ch14-canvas-drawing-canvas.html new file mode 100755 index 0000000..81a1b5d --- /dev/null +++ b/chapter14/ch14-canvas-drawing-canvas.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/chapter14/ch14-canvas-lines.html b/chapter14/ch14-canvas-lines.html new file mode 100755 index 0000000..cee95f5 --- /dev/null +++ b/chapter14/ch14-canvas-lines.html @@ -0,0 +1,23 @@ + + + + + + + + + + diff --git a/chapter14/ch14-canvas-save-image.html b/chapter14/ch14-canvas-save-image.html new file mode 100755 index 0000000..27d7f2a --- /dev/null +++ b/chapter14/ch14-canvas-save-image.html @@ -0,0 +1,34 @@ + + + + + + +
+ + + + diff --git a/chapter14/ch14-canvas-saving-image.html b/chapter14/ch14-canvas-saving-image.html new file mode 100755 index 0000000..1aad4c2 --- /dev/null +++ b/chapter14/ch14-canvas-saving-image.html @@ -0,0 +1,38 @@ + + + + + + + +
+ + + + + diff --git a/chapter14/ch14-canvas-text.html b/chapter14/ch14-canvas-text.html new file mode 100755 index 0000000..75a9952 --- /dev/null +++ b/chapter14/ch14-canvas-text.html @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/chapter9/ch9.js b/chapter14/ch14-canvas-upload-image.html old mode 100755 new mode 100644 similarity index 100% rename from chapter9/ch9.js rename to chapter14/ch14-canvas-upload-image.html diff --git a/chapter14/ch14-canvas.html b/chapter14/ch14-canvas.html new file mode 100755 index 0000000..68cca19 --- /dev/null +++ b/chapter14/ch14-canvas.html @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/chapter14/ch14-drawing-image.html b/chapter14/ch14-drawing-image.html new file mode 100755 index 0000000..0c49e2f --- /dev/null +++ b/chapter14/ch14-drawing-image.html @@ -0,0 +1,23 @@ + + + + + + + + + + diff --git a/chapter14/ch14-geo-getlocation.html b/chapter14/ch14-geo-getlocation.html new file mode 100755 index 0000000..d1f221c --- /dev/null +++ b/chapter14/ch14-geo-getlocation.html @@ -0,0 +1,15 @@ + + + + + diff --git a/chapter14/ch14-inspect-geo.html b/chapter14/ch14-inspect-geo.html new file mode 100755 index 0000000..27e4c8d --- /dev/null +++ b/chapter14/ch14-inspect-geo.html @@ -0,0 +1,11 @@ + + + + + diff --git a/chapter14/ch14-localstorage.html b/chapter14/ch14-localstorage.html new file mode 100755 index 0000000..e760139 --- /dev/null +++ b/chapter14/ch14-localstorage.html @@ -0,0 +1,14 @@ + + +
+ + + diff --git a/chapter14/ch14-media.html b/chapter14/ch14-media.html new file mode 100755 index 0000000..b1215d8 --- /dev/null +++ b/chapter14/ch14-media.html @@ -0,0 +1,18 @@ + + + + + + + diff --git a/chapter14/ch14-reading-file.html b/chapter14/ch14-reading-file.html new file mode 100755 index 0000000..55aca2f --- /dev/null +++ b/chapter14/ch14-reading-file.html @@ -0,0 +1,17 @@ + + + +
+ + + diff --git a/chapter14/ch14-upload-file.html b/chapter14/ch14-upload-file.html new file mode 100755 index 0000000..92ed0e3 --- /dev/null +++ b/chapter14/ch14-upload-file.html @@ -0,0 +1,14 @@ + + + +
+ + + diff --git a/chapter14/ch14-upload-files.html b/chapter14/ch14-upload-files.html new file mode 100755 index 0000000..783477e --- /dev/null +++ b/chapter14/ch14-upload-files.html @@ -0,0 +1,15 @@ + + + +
+ + + diff --git a/chapter14/ch14.js b/chapter14/ch14.js new file mode 100755 index 0000000..7fa387a --- /dev/null +++ b/chapter14/ch14.js @@ -0,0 +1,6 @@ +let varContainingFunction = function () { + let varInFunction = "I'm in a function."; + console.log("hi there!"); +}; + +varContainingFunction(); diff --git a/chapter14/countdown timer b/chapter14/countdown timer new file mode 100644 index 0000000..25556ed --- /dev/null +++ b/chapter14/countdown timer @@ -0,0 +1,101 @@ + + + + + JavaScript + + + + +
+ +
0 Days 0 Hours 0 Minutes 0 Seconds +
+
+ + + + diff --git a/chapter14/draw on canvas b/chapter14/draw on canvas new file mode 100644 index 0000000..8bcf0c1 --- /dev/null +++ b/chapter14/draw on canvas @@ -0,0 +1,91 @@ + + + + + Canvas HTML5 + + + + + +
+ + + Color: + Width: +
+
+ + + + diff --git a/chapter14/ex1 Image Thumbnails b/chapter14/ex1 Image Thumbnails new file mode 100644 index 0000000..4808498 --- /dev/null +++ b/chapter14/ex1 Image Thumbnails @@ -0,0 +1,37 @@ + + + + +     Complete JavaScript Course + + + + + +
+ + + + diff --git a/chapter14/ex1 Image preview b/chapter14/ex1 Image preview new file mode 100644 index 0000000..4808498 --- /dev/null +++ b/chapter14/ex1 Image preview @@ -0,0 +1,37 @@ + + + + +     Complete JavaScript Course + + + + + +
+ + + + diff --git a/chapter14/flower.jpg b/chapter14/flower.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a70e2b48a4d787d28af584db9cfb4ec033cd8a98 GIT binary patch literal 4892 zcmeHKeNzQ%4JpK*{_{`$Q{1vO*L|P4NTFuhx6-=75fWL>>E!_iXn*?|Yx;_rAa1 z^SpmN?k0CDsM9))`2b{R#{+)=02c%!EPz0Z{zoAk<~+v@( zWi$Q|kQuY#lg4@Q<^r&W2iR~$B9lsxGLMZw1W@5!mr5i^g$L2?2EebvgD8YCtX?*p z0(a|UZG{w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SKz9wvCkzm)s@v|)pgB&YU?*EE>F66;lvL+f6F;|Wx1+gAzs-L5qz<1XoX3z z%sSJRHpDWc`-pSqmCBG4N1w=D-eM~kEZo0nR^v5R`lc7Zt9vbXdwU#v_mY%BX@ZsA zzc#);gm($u^JOs+TU`fgkB^9KJGCW;JgfNW{qm(J&)E)5*>OI1+S=~=j>5qG(SPzc z-;KGOwRY7f_uKE4bY1%8WX+|VoM3Ii-og7j4+p3I-2UN$_0;L)1!w9nx7{n=m9^Nu zT)$-gu*{l$Z<(_)qpPsRv&<3f&bpuWknN7fZI?6i;zqwaq4CPMc;~cj`l^ng?49Fg zm&#W06~aSRSpAF(2MViHtcovN?+1SIDKSP?Q=V2iA{!uE?x9b#l-{0tOA`@V@!rJd z+M{=d$7aoCJCd(w$d;_u#(#E;yCQyN$lj{6u0tIMPL(ahns01AF#U|{=?h&)=9TZg mcDhB&M#F{Q$Gg&m+uzY<=}Ve6R-c?2J3qKV8 + + + + Canvas HTML5 + + + + + + +
+ + + + diff --git a/chapter14/task List b/chapter14/task List new file mode 100644 index 0000000..91d44dc --- /dev/null +++ b/chapter14/task List @@ -0,0 +1,79 @@ + + + + JavaScript + + + +
+ + +
+
    +
+ + + diff --git a/chapter15/ch15-ajax.html b/chapter15/ch15-ajax.html new file mode 100755 index 0000000..ef90287 --- /dev/null +++ b/chapter15/ch15-ajax.html @@ -0,0 +1,22 @@ + + + +
+

AJAX in action!

+ +
+ + + diff --git a/chapter15/ch15-example-json.json b/chapter15/ch15-example-json.json new file mode 100755 index 0000000..c7928fc --- /dev/null +++ b/chapter15/ch15-example-json.json @@ -0,0 +1,13 @@ +{ + "name": "Malika", + "age": 50, + "profession": "programmer", + "languages": ["JavaScript", "C#", "Python"], + "address": { + "street": "Some street", + "number": 123, + "zipcode": "3850AA", + "city": "Utrecht", + "country": "The Netherlands" + } +} diff --git a/chapter15/ch15-express.js b/chapter15/ch15-express.js new file mode 100755 index 0000000..e13267f --- /dev/null +++ b/chapter15/ch15-express.js @@ -0,0 +1,10 @@ +const express = require('express'); +const app = express(); + +app.get('/', (request, response) => { + response.send('Hello Express!'); +}); + +app.listen(3000, () => { + console.log('Express app at http://localhost:3000'); +}); \ No newline at end of file diff --git a/chapter15/ch15-jquery.html b/chapter15/ch15-jquery.html new file mode 100755 index 0000000..da80efc --- /dev/null +++ b/chapter15/ch15-jquery.html @@ -0,0 +1,22 @@ + + + + + +

Let's play a game!

+

Of hide and seek...

+

I'm easy to find!

+ + + + + diff --git a/chapter15/ch15-node.js b/chapter15/ch15-node.js new file mode 100755 index 0000000..1f09738 --- /dev/null +++ b/chapter15/ch15-node.js @@ -0,0 +1,11 @@ +const http = require('http'); + +http.createServer(function(req, res){ + res.writeHead(200, {'Content-Type': 'text/html'}); //header status code + let name = 'maaike'; + res.write(`Finally, hello ${name}`); //body + res.end(); +}).listen(5000); //listen to port 8080 + +console.log('Listening on port 8080...'); + diff --git a/chapter15/ch15-vue-component.html b/chapter15/ch15-vue-component.html new file mode 100755 index 0000000..b126e3b --- /dev/null +++ b/chapter15/ch15-vue-component.html @@ -0,0 +1,18 @@ + + + + + +
+ +
+ + + + diff --git a/chapter15/ch15-vue.html b/chapter15/ch15-vue.html new file mode 100755 index 0000000..e2ce949 --- /dev/null +++ b/chapter15/ch15-vue.html @@ -0,0 +1,23 @@ + + + + + +
+

+ Let's play hide and seek.
+ Go to the console and type:
+ obj._data.hide = true
+

+
+ + + + \ No newline at end of file diff --git a/chapter15/exampled3.html b/chapter15/exampled3.html new file mode 100644 index 0000000..4ca9b65 --- /dev/null +++ b/chapter15/exampled3.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/chapter15/examplereact.html b/chapter15/examplereact.html new file mode 100644 index 0000000..0c98e73 --- /dev/null +++ b/chapter15/examplereact.html @@ -0,0 +1,20 @@ + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/chapter15/exampleunderscore.html b/chapter15/exampleunderscore.html new file mode 100644 index 0000000..d5c5e65 --- /dev/null +++ b/chapter15/exampleunderscore.html @@ -0,0 +1,15 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/chapter9/ch9-accessing.html b/chapter9/ch9-accessing.html index 0310f1e..63d2975 100755 --- a/chapter9/ch9-accessing.html +++ b/chapter9/ch9-accessing.html @@ -5,4 +5,7 @@
Hi!
Hi!
+ diff --git a/chapter9/ch9-domflow.html b/chapter9/ch9-domflow.html index 152eaba..065706e 100755 --- a/chapter9/ch9-domflow.html +++ b/chapter9/ch9-domflow.html @@ -26,7 +26,7 @@ } let divs = document.getElementsByTagName("div"); for (let i = 0; i < divs.length; i++) { - divs[i].addEventListener("click", bup, true); + divs[i].addEventListener("click", bup); }