-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodes.html
More file actions
412 lines (336 loc) · 9.11 KB
/
codes.html
File metadata and controls
412 lines (336 loc) · 9.11 KB
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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Programming Notes</title>
<style>
/* RESET */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Arial, sans-serif;
}
body {
background: #0f172a;
color: #e2e8f0;
display: flex;
}
/* SIDEBAR */
.sidebar {
width: 25%;
background: #1e293b;
padding: 20px;
height: 100vh;
overflow-y: auto;
border-right: 2px solid #334155;
}
.sidebar h2 {
margin-bottom: 15px;
color: #38bdf8;
}
.sidebar section {
margin-bottom: 25px;
}
.sidebar li {
margin-bottom: 10px;
font-size: 14px;
}
/* MAIN CONTENT */
.main {
width: 75%;
padding: 30px;
overflow-y: auto;
height: 100vh;
}
h1 {
text-align: center;
margin-bottom: 30px;
color: #22c55e;
}
.card {
background: #1e293b;
padding: 20px;
border-radius: 12px;
margin-bottom: 25px;
box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.card h2 {
color: #facc15;
margin-bottom: 10px;
}
.card ul {
margin-left: 20px;
}
.card li {
margin-bottom: 10px;
line-height: 1.6;
}
code {
background: #334155;
padding: 3px 6px;
border-radius: 5px;
color: #38bdf8;
}
</style>
</head>
<body>
<!-- SIDEBAR -->
<div class="sidebar">
<h2>Quick Notes</h2>
<!-- Python -->
<section>
<h3>Python</h3>
<ul>
<li>Easy & beginner-friendly</li>
<li>Used in AI, ML, Data Science</li>
<li>No need to declare data types</li>
<li>Example: <code>print("Hello")</code></li>
</ul>
</section>
<!-- Go -->
<section>
<h3>Go (Golang)</h3>
<ul>
<!-- ================= BEGINNER ================= -->
<li><b>Beginner Level:</b>
<ul>
<li><b>Definition:</b> Go (Golang) is an open-source programming language developed by Google. It is designed for simplicity, performance, and efficient concurrency.</li>
<li><b>Key Features:</b>
<ul>
<li>Compiled language (fast execution)</li>
<li>Simple and clean syntax</li>
<li>Built-in concurrency support</li>
</ul>
</li>
<li><b>Basic Structure:</b>
<pre><code>
package main
import "fmt"
func main() {
fmt.Println("Hello World")
}
</code></pre>
</li>
<li><b>Variables:</b>
<pre><code>
var name string = "Go"
age := 20 // short declaration
fmt.Println(name, age)
</code></pre>
</li>
<li><b>Data Types:</b> int, float64, string, bool</li>
</ul>
</li>
<!-- ================= INTERMEDIATE ================= -->
<li><b>Intermediate Level:</b>
<ul>
<li><b>Functions:</b>
<pre><code>
func add(a int, b int) int {
return a + b
}
result := add(5, 3)
fmt.Println(result)
</code></pre>
</li>
<li><b>Arrays & Slices:</b>
<pre><code>
// Array
var arr [3]int = [3]int{1, 2, 3}
// Slice (dynamic)
slice := []int{1, 2, 3, 4}
slice = append(slice, 5)
fmt.Println(slice)
</code></pre>
</li>
<li><b>Loops:</b>
<pre><code>
for i := 0; i < 5; i++ {
fmt.Println(i)
}
</code></pre>
</li>
<li><b>Conditionals:</b>
<pre><code>
x := 10
if x > 5 {
fmt.Println("Greater")
} else {
fmt.Println("Smaller")
}
</code></pre>
</li>
</ul>
</li>
<!-- ================= ADVANCED ================= -->
<li><b>Advanced Level:</b>
<ul>
<li><b>Structs (like classes):</b>
<pre><code>
type Person struct {
name string
age int
}
p := Person{name: "John", age: 25}
fmt.Println(p.name)
</code></pre>
</li>
<li><b>Concurrency (Goroutines):</b>
<pre><code>
func printMsg() {
fmt.Println("Hello from Goroutine")
}
go printMsg()
fmt.Println("Main Function")
</code></pre>
</li>
<li><b>Channels:</b>
<pre><code>
ch := make(chan string)
go func() {
ch <- "Hello"
}()
msg := <-ch
fmt.Println(msg)
</code></pre>
</li>
<li><b>Error Handling:</b>
<pre><code>
func divide(a, b int) (int, error) {
if b == 0 {
return 0, fmt.Errorf("cannot divide by zero")
}
return a / b, nil
}
</code></pre>
</li>
</ul>
</li>
<!-- ================= USES ================= -->
<li><b>Real-World Uses:</b>
<ul>
<li>Backend development (APIs, servers)</li>
<li>Cloud systems (Docker, Kubernetes)</li>
<li>Microservices architecture</li>
<li>DevOps tools</li>
</ul>
</li>
</ul>
</section>
<!-- Ruby -->
<section>
<h3>Ruby</h3>
<ul>
<li>Simple & readable syntax</li>
<li>Used in web development</li>
<li>Popular framework: Rails</li>
<li>Example: <code>puts "Hello"</code></li>
</ul>
</section>
</div>
<!-- MAIN CONTENT -->
<div class="main">
<h1>Programming Language Notes</h1>
<!-- ================= JAVA ================= -->
<div class="card">
<h2>Java</h2>
<ul>
<!-- Beginner -->
<li><b>Beginner Level:</b>
<ul>
<li><b>Definition:</b> Java is a high-level, object-oriented programming language used to build platform-independent applications.</li>
<li><b>Basic Syntax:</b> Java programs are written inside classes and executed using the main method.</li>
<li><b>Example:</b> <code>System.out.println("Hello World");</code></li>
<li><b>Key Concepts:</b> Variables, Data Types (int, float, char), Operators</li>
</ul>
</li>
<!-- Intermediate -->
<li><b>Intermediate Level:</b>
<ul>
<li><b>OOP Concepts:</b> Class, Object, Inheritance, Polymorphism, Encapsulation, Abstraction</li>
<li><b>Collections Framework:</b> ArrayList, HashMap, HashSet</li>
<li><b>Exception Handling:</b> try, catch, finally, throw</li>
<li><b>Multithreading:</b> Running multiple threads simultaneously</li>
</ul>
</li>
<!-- Advanced -->
<li><b>Advanced Level:</b>
<ul>
<li><b>JVM Architecture:</b> ClassLoader, Memory Areas, Execution Engine</li>
<li><b>Spring Framework:</b> Used for enterprise applications</li>
<li><b>Hibernate:</b> ORM tool for database interaction</li>
<li><b>Microservices:</b> Building scalable distributed systems</li>
</ul>
</li>
<li><b>Uses:</b> Android apps, enterprise software, backend systems</li>
</ul>
</div>
<!-- ================= JAVASCRIPT ================= -->
<div class="card">
<h2>JavaScript</h2>
<ul>
<!-- Beginner -->
<li><b>Beginner Level:</b>
<ul>
<li><b>Definition:</b> JavaScript is a scripting language used to create interactive web pages.</li>
<li><b>Basic Syntax:</b> Runs inside browser</li>
<li><b>Example:</b> <code>console.log("Hello World");</code></li>
<li><b>Core Concepts:</b> Variables (let, const), Functions, Loops</li>
</ul>
</li>
<!-- Intermediate -->
<li><b>Intermediate Level:</b>
<ul>
<li><b>DOM Manipulation:</b> Changing HTML/CSS using JS</li>
<li><b>Events:</b> onclick, onsubmit, keypress</li>
<li><b>ES6 Features:</b> Arrow functions, template literals, destructuring</li>
<li><b>Asynchronous JS:</b> Callbacks, Promises, async/await</li>
</ul>
</li>
<!-- Advanced -->
<li><b>Advanced Level:</b>
<ul>
<li><b>Closures:</b> Functions remembering their scope</li>
<li><b>Event Loop:</b> Handles async execution</li>
<li><b>Frameworks:</b> React, Angular, Vue</li>
<li><b>Backend:</b> Node.js for server-side development</li>
</ul>
</li>
<li><b>Uses:</b> Web apps, APIs, full-stack development</li>
</ul>
</div>
<!-- ================= PYTHON ================= -->
<div class="card">
<h2>Python</h2>
<ul>
<!-- Beginner -->
<li><b>Beginner Level:</b>
<ul>
<li><b>Definition:</b> Python is a high-level, easy-to-learn programming language.</li>
<li><b>Syntax:</b> Simple and readable</li>
<li><b>Example:</b> <code>print("Hello World")</code></li>
<li><b>Basics:</b> Variables, Lists, Tuples, Dictionaries</li>
</ul>
</li>
<!-- Intermediate -->
<li><b>Intermediate Level:</b>
<ul>
<li><b>Functions:</b> def keyword</li>
<li><b>OOP:</b> Classes and objects</li>
<li><b>Modules:</b> Importing libraries</li>
<li><b>File Handling:</b> Reading and writing files</li>
</ul>
</li>
<!-- Advanced -->
<li><b>Advanced Level:</b>
<ul>
<li><b>Libraries:</b> NumPy, Pandas, Matplotlib</li>
<li><b>Machine Learning:</b> Scikit-learn, TensorFlow</li>
<li><b>Web Frameworks:</b> Django, Flask</li>
<li><b>Automation:</b> Scripts for tasks</li>
</ul>
</li>
<li><b>Uses:</b> AI, data science, automation, web apps</li>
</ul>
</div>