-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathC_notes.html
More file actions
289 lines (272 loc) · 8.56 KB
/
Copy pathC_notes.html
File metadata and controls
289 lines (272 loc) · 8.56 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/x-icon" href="images/MDai 1.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>C Programming Curriculum</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrious/4.0.2/qrious.min.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
body {
font-family: 'Roboto', sans-serif;
background: #eef2f5;
color: #2c3e50;
padding: 2rem;
line-height: 1.7;
}
h1 {
text-align: center;
color: #2c3e50;
font-size: 2rem;
margin-bottom: 1rem;
}
h2 {
color: #1565c0;
margin-top: 2rem;
font-size: 1.3rem;
border-bottom: 1px solid #ccc;
padding-bottom: 5px;
}
ul {
padding-left: 1.5rem;
}
.btn {
display: inline-block;
background: #1565c0;
color: white;
border: none;
padding: 10px 20px;
font-size: 16px;
margin: 1rem 0;
cursor: pointer;
border-radius: 5px;
}
.btn:hover { background: #0d47a1; }
#pdf-content {
background: white;
padding: 2rem;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0,0,0,0.1);
}
.cover-page {
text-align: center;
margin-bottom: 2rem;
padding-top: 50px;
}
.cover-page img.logo {
max-width: 120px;
margin-bottom: 20px;
}
.qr {
margin-top: 20px;
}
.footer {
text-align: center;
margin-top: 40px;
font-size: 0.9rem;
color: #666;
}
.page-number {
text-align: right;
font-size: 0.75rem;
color: #888;
margin-top: 1rem;
}
.page { page-break-after: always; }
.no-break { page-break-inside: avoid; }
.signature-block {
margin-top: 3rem;
font-size: 1rem;
text-align: left;
padding-left: 2rem;
}
.table-of-contents h2 {
text-align: center;
color: #444;
border: none;
}
.table-of-contents ul {
list-style-type: none;
padding: 0;
}
.table-of-contents a {
text-decoration: none;
color: #1565c0;
}
</style>
</head>
<body>
<h1>C Programming Curriculum</h1>
<button class="btn" onclick="downloadPDF()">Download PDF</button>
<div id="pdf-content">
<div class="cover-page page">
<img class="logo" src="https://cdn-icons-png.flaticon.com/512/5968/5968225.png" alt="Logo" />
<h1>C Programming Course</h1>
<h2>From Beginner to Pro</h2>
<p><em>Master the foundations and advanced topics of C programming</em></p>
<p><em>Maîtrisez les bases et les notions avancées de la programmation en C</em></p>
<div class="qr">
<canvas id="qr-code"></canvas>
<p style="font-size: 0.8rem;">Scan to visit: www.mdai.org</p>
</div>
</div>
<div class="page table-of-contents">
<h2>Table of Contents</h2>
<ul id="toc-list"></ul>
</div>
<div id="content-body"></div>
<div class="page">
<div class="signature-block">
<p>Kind regards,</p><br><br>
<p><strong>Mr. Symphorien</strong></p>
<p>Chief Executive Officer</p>
<p>MDai Programming Division</p>
<p>www.mdai.xyz</p>
</div>
</div>
<div class="footer">
<p>MDai Programming Division | <a href="https://symphorienpya.github.io/RINGA/">www.mdai.xyz</a> | Email: contact@mdai.org</p>
<p>© 2025 MDai Platform. All rights reserved.</p>
</div>
</div>
<script>
new QRious({
element: document.getElementById("qr-code"),
value: "https://symphorienpya.github.io/RINGA/",
size: 120
});
const cTopics = [
{
title: "1. Introduction to C / Introduction au C",
items: [
"History and Features / Histoire et caractéristiques",
"Installing a Compiler / Installation d'un compilateur",
"Structure of a C Program / Structure d’un programme en C",
"Hello World Program / Programme Bonjour le monde"
]
},
{
title: "2. Data Types & Variables / Types de données et variables",
items: [
"Basic Data Types / Types de base",
"Constants and Variables / Constantes et variables",
"Format Specifiers / Spécificateurs de format"
]
},
{
title: "3. Operators and Expressions / Opérateurs et expressions",
items: [
"Arithmetic Operators / Opérateurs arithmétiques",
"Relational & Logical Operators / Opérateurs relationnels et logiques",
"Assignment and Bitwise Operators / Affectation et bitwise"
]
},
{
title: "4. Control Flow / Contrôle de flux",
items: [
"if, else, nested if / Conditions",
"switch case / Instruction switch",
"for, while, do-while loops / Boucles"
]
},
{
title: "5. Functions / Fonctions",
items: [
"Function Declaration & Definition / Déclaration et définition",
"Parameter Passing / Passage de paramètres",
"Recursion / Récursivité"
]
},
{
title: "6. Arrays & Strings / Tableaux et chaînes",
items: [
"One & Multi-dimensional Arrays / Tableaux à une et plusieurs dimensions",
"String Functions / Fonctions sur les chaînes"
]
},
{
title: "7. Pointers / Pointeurs",
items: [
"Basics of Pointers / Notions de base",
"Pointer Arithmetic / Arithmétique des pointeurs",
"Pointers and Arrays / Pointeurs et tableaux"
]
},
{
title: "8. Structures & Unions / Structures et unions",
items: [
"Declaring Structures / Déclaration",
"Nested Structures / Structures imbriquées",
"Unions / Unions"
]
},
{
title: "9. File Handling / Manipulation de fichiers",
items: [
"File Operations (fopen, fclose, etc.)",
"Reading and Writing Files",
"Binary vs Text Files"
]
},
{
title: "10. Advanced Concepts / Concepts avancés",
items: [
"Dynamic Memory Allocation / Allocation dynamique",
"Command Line Arguments / Arguments de ligne de commande",
"Preprocessor Directives / Directives du préprocesseur"
]
},
{
title: "11. Projects and Practice / Projets et exercices",
items: [
"Mini Calculator Project",
"Student Record System",
"Banking System Simulation",
"Quiz Game in C"
]
}
];
const toc = document.getElementById("toc-list");
const content = document.getElementById("content-body");
let pageCount = 2;
cTopics.forEach((topic, i) => {
const anchorId = `section-${i+1}`;
const tocItem = document.createElement("li");
const link = document.createElement("a");
link.href = `#${anchorId}`;
link.textContent = topic.title;
tocItem.appendChild(link);
toc.appendChild(tocItem);
const section = document.createElement("div");
section.className = "page no-break";
section.id = anchorId;
const header = document.createElement("h2");
header.textContent = topic.title;
const ul = document.createElement("ul");
topic.items.forEach(item => {
const li = document.createElement("li");
li.textContent = item;
ul.appendChild(li);
});
const footer = document.createElement("div");
footer.className = "page-number";
footer.textContent = `Page ${++pageCount}`;
section.appendChild(header);
section.appendChild(ul);
section.appendChild(footer);
content.appendChild(section);
});
function downloadPDF() {
html2pdf().set({
margin: 0.5,
filename: 'C_Programming_Curriculum_MDai.pdf',
image: { type: 'jpeg', quality: 0.98 },
html2canvas: { scale: 2, useCORS: true },
jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' }
}).from(document.getElementById("pdf-content")).save();
}
</script>
</body>
</html>