updated folder structure
This commit is contained in:
Executable
+22
@@ -0,0 +1,22 @@
|
||||
<html>
|
||||
<head> </head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<h1>AJAX in action!</h1>
|
||||
<button type="button" onclick="call()">Go go greek God!</button>
|
||||
</div>
|
||||
<script>
|
||||
function call() {
|
||||
let xhttp = new XMLHttpRequest();
|
||||
let url = "some valid url";
|
||||
xhttp.load = function () {
|
||||
if (this.status == 200 && this.readyState == 4) {
|
||||
document.getElementById("content").innerHTML = this.responseText;
|
||||
}
|
||||
};
|
||||
xhttp.open("GET", url, true);
|
||||
xhttp.send();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+13
@@ -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"
|
||||
}
|
||||
}
|
||||
Executable
+10
@@ -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');
|
||||
});
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<p>Let's play a game!</p>
|
||||
<p>Of hide and seek...</p>
|
||||
<p class="easy">I'm easy to find!</p>
|
||||
<button id="hidebutton">Great idea</button>
|
||||
<button id="revealbutton">Found you!</button>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("#hidebutton").click(function () {
|
||||
$("p").hide();
|
||||
});
|
||||
$("#revealbutton").click(function () {
|
||||
$(".easy").show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Executable
+11
@@ -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...');
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<maaike></maaike>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
Vue.component("maaike", {
|
||||
template: "<p>Maaike says: good job!</p>",
|
||||
});
|
||||
|
||||
new Vue({ el: "#app" });
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<p v-if="!hide">
|
||||
Let's play hide and seek. <br />
|
||||
Go to the console and type: <br />
|
||||
obj._data.hide = true <br />
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var obj = new Vue({
|
||||
el: "#app",
|
||||
data: {
|
||||
hide: false,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="https://d3js.org/d3.v7.min.js"></script>
|
||||
<style>
|
||||
svg {
|
||||
background-color: lightgrey;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<svg id="drawing-area" height=100 width=500></svg>
|
||||
<script>
|
||||
let svg = d3.select("#drawing-area");
|
||||
svg.append("circle")
|
||||
.attr("cx", 100).attr("cy", 50).attr("r", 20).style("fill", "pink");
|
||||
svg.append("circle")
|
||||
.attr("cx", 200).attr("cy", 20).attr("r", 20).style("fill", "black");
|
||||
svg.append("circle")
|
||||
.attr("cx", 300).attr("cy", 70).attr("r", 20).style("fill", "grey");
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<script src="https://unpkg.com/react@17/umd/react.development.js" crossorigin></script>
|
||||
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js" crossorigin></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script>
|
||||
let p = React.createElement("p", null, "Hi Emile, what's up?");
|
||||
ReactDOM.render(
|
||||
p,
|
||||
document.getElementById("root")
|
||||
);
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<script src="https://cdn.jsdelivr.net/npm/underscore@1.13.1/underscore-umd-min.js
|
||||
"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
_.each([1, 2, 3], alert);
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user