-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
212 lines (186 loc) · 8.42 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<!-- lesson.html -->
<!-- This is how you write a comment -->
<html>
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-1D9H4NHWKJ"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-1D9H4NHWKJ');
</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- try changing this to h1,h2,...,h5,h6. Change the closing tag too.-->
<h3 class="intro">Introduction to web apps, by web10</h3>
<center>Contact Info || Jacob Hoffman <br>347-209-2325 || [email protected]</center>
<br>
<button onclick="showhide(resources)">Show/Hide Resources</button>
<div id="resources" class="resources">
Platforms :
<a href="https://www.github.com"> GitHub</a> |
<a href="https://repl.it/"> repl.it</a> |
<a href="https://docs.web10.app"> web10 docs</a>
<br>
Resources : google things that you don't know i.e. "js how to write a function"<br>
stack overflow, geeks for geeks, w3schools <br><br>
Free Domain Names :
<a href="https://www.freenom.com"> Freenom</a> |
<a href="https://www.cloudflare.com"> Cloudflare</a>
<br>
Lesson Code :
<a href="https://github.com/jacoby149/lessons">jacoby149/lessons</a>
</div><br>
<button onclick="showhide(notesection)">Show/Hide Course Notes</button>
<div class="notesection" id="notesection" hidden>
<div class="topic">
<h4> Languages </h4>
<p><b>HTML</b> : A Markup Language.</p>
<p class="note">* Markup languages are for writing formatted documents.</p>
<br>
<p><b>CSS</b> : A Styling Language.</p>
<p class="note">* A styling language modifies the way HTML documents look.</p>
<br>
<p><b>Javascript</b> (JS abbreviated) : A programming language.</p>
<p class="note">* The main programming language on websites.</p>
<p class="note">* Entirely different from Java. (confusing)</p>
</div>
<div class="topic">
<h4>Tags</h4>
<p><b>html</b> tag</p>
<p class="note">* where the body, script, and style tags go inside</p>
<p><b>body</b> tag </p>
<p class="note">* for text, images, inputs, buttons</p>
<p><b>script</b> tag </p>
<p class="note"> * script tags are for writing javascript code</p>
<p class="note"> * can modify anything! body, style (and more).</p>
<p><b>style</b> tag </p>
<p class="note">* for setting format of things in the body</p>
</div><br>
<div class="related">
<div class="topic">
<h4>JS Functions</h4>
<p>
<b>1 </b>function add(a,b){ <br>
<b>2 </b> var answer = a+b;<br>
<b>3 </b> return answer;<br>
<b>4 </b>}<br>
<b>5 </b>var x = add(3,5);<br>
<b>6 </b>console.log(x);<br>
</p>
</div>
</div>
<div class="topic">
<h4>JS Functions Descriptions</h4>
<p>
Line 1 : a function named add is being defined with two inputs.<br>
Line 2 : a variable answer is made and set to the sum of the two inputs.<br>
Line 3 : answer is outputted from the function by the return statement.<br>
Line 4 : the function is closed with a curly brace.<br>
Line 5 : the add function is called on 3 and 5, and a new variable x is set to the output.<br>
Line 6 : the value of x is outputted to the console => 8
</p>
</div>
<div class="topic">
<h4>Notes on Arrays</h4>
<p>
an array is a list of variables<br>
A[i] gets the ith variable in A<br>
arrays are zero indexed, meaning the first element is a[0], not a[1]<br>
example<br>
var cars = ["toyota","ford","chevy"]<br><br>
var car = cars[0]<br>
car is equal to "toyota"<br><br>
car = cars[2]<br>
now car is equal to "chevy"
</p>
</div>
<div class="topic">
<h4>Notes on For Loops </h4>
<p>
for loops can repeatedly run a segment of code<br>
example<br>
for(var i=0;i<5;i++){<br>
console.log(i);<br>
}<br>
/* this line of code will run 5 times, and will print to the
console<br>
0<br>
1<br>
2<br>
3<br>
4
</p>
</div>
<div class="topic">
<h4>Notes on getElementByClassName()</h4>
<p>
e.getElementsByClassName(c) returns an array<br>
it returns an array of all elements inside element e with a class of c<br>
document.getElementByClassName(c) returns the array of elements with class of c in the whole document
</p>
</div>
</div>
<br><b>HTML, CSS, JS</b>
<ul>
<li><a href="lesson0/index.html">Lesson 0 || github pages "Hello" website </a></li>
<li><a href="lesson1/index.html">Lesson 1 || (+ - * / %) calculators (functions) </a></li>
<li><a href="lesson2/index.html">Lesson 2 || free fall simulation (vars) </a></li>
<li><a href="lesson3/index.html">Lesson 3 || isotope masonry layout (looping, arrays) </a></li>
<li><a href="lesson4/index.html">Lesson 4 || simulated ball objects (dictionaries) </a></li>
<li><a href="lesson5/index.html">Lesson 5 || snake game mechanics (mvc) </a></li>
<li><a href="lesson6/index.html">Lesson 6 || snake game scoring (mvc) </a></li>
</ul>
<b>Making Web Applications</b>
<ul>
<li><a href="web10-lesson1/index.html">Lesson 1 || web10 hello world (auth, apis) </a></li>
<li><a href="web10-lesson2/index.html">Lesson 2 || notes app (CRUD, DBs, integration) </a></li>
<li><a href="web10-lesson3/index.html">Lesson 3 || mail app (P2P streaming, messaging)</a></li>
</ul>
<button onclick="showhide(lesson1)">Show/Hide Lesson 1 - Arithmetic Calculators</button>
<div id="lesson1" hidden>
<!-- divs are a neat way to group things together-->
<div id="arithmetic" class="calculator">
<!-- Our First Calculator -->
<div class="abc">
<h4>Calculators : a ? b = c </h4>
<input id="a" type="number"> ?
<input id="b" type="number"> =
<input id="c">
</div>
<div class="calcbuttons">
<button onclick="add(a,b,c)"> Add </button>
<button onclick="subtract(a,b,c)"> Subtract </button>
<button onclick="multiply(a,b,c)"> Multiply </button>
<button onclick="divide(a,b,c)"> Divide </button>
</div>
</div>
</div>
<br>
<button onclick="showhide(nth)">Show/Hide - Nth Number Calculators</button>
<div id="lesson2">
<div id="nth" class="calculator" hidden>
<!-- Our Second Calculator -->
<div class="nth">
<h4>Calculators : nth ___ number </h4>
The <input id="n" type="number"> th ___ number is :
<input id="x">
</div>
<div class="calcbuttons">
<button onclick="even(n,x)"> Even </button>
<button onclick="odd(n,x)"> Odd </button>
<button onclick="prime(n,x)"> Prime </button>
<button onclick="factorial_wrapper(n,x)"> Factorial </button>
<button onclick="fibonnaci_wrapper(n,x)"> Fibonnaci </button>
</div>
</div>
</div>
</body>
<script src="script.js"></script>
</html>