webtech-codes 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. webtech_codes-1.0.0.dist-info/METADATA +74 -0
  2. webtech_codes-1.0.0.dist-info/RECORD +50 -0
  3. webtech_codes-1.0.0.dist-info/WHEEL +5 -0
  4. webtech_codes-1.0.0.dist-info/entry_points.txt +2 -0
  5. webtech_codes-1.0.0.dist-info/licenses/LICENSE +21 -0
  6. webtech_codes-1.0.0.dist-info/top_level.txt +1 -0
  7. webtech_lab_codes/__init__.py +1 -0
  8. webtech_lab_codes/cli.py +107 -0
  9. webtech_lab_codes/experiments/Ex02_Blog/index.html +15 -0
  10. webtech_lab_codes/experiments/Ex02_Blog/styles.css +4 -0
  11. webtech_lab_codes/experiments/Ex03_Hotspot/index.html +15 -0
  12. webtech_lab_codes/experiments/Ex03_Hotspot/styles.css +3 -0
  13. webtech_lab_codes/experiments/Ex04_Registration_Form/index.html +18 -0
  14. webtech_lab_codes/experiments/Ex04_Registration_Form/styles.css +6 -0
  15. webtech_lab_codes/experiments/Ex05_College_Website/admission.html +2 -0
  16. webtech_lab_codes/experiments/Ex05_College_Website/contact.html +2 -0
  17. webtech_lab_codes/experiments/Ex05_College_Website/events.html +2 -0
  18. webtech_lab_codes/experiments/Ex05_College_Website/fees.html +2 -0
  19. webtech_lab_codes/experiments/Ex05_College_Website/index.html +2 -0
  20. webtech_lab_codes/experiments/Ex05_College_Website/results.html +2 -0
  21. webtech_lab_codes/experiments/Ex05_College_Website/styles.css +7 -0
  22. webtech_lab_codes/experiments/Ex06_Shopping_Webpage/index.html +9 -0
  23. webtech_lab_codes/experiments/Ex06_Shopping_Webpage/styles.css +11 -0
  24. webtech_lab_codes/experiments/Ex07a_Electricity_Bill/7a.js +7 -0
  25. webtech_lab_codes/experiments/Ex07b_Student_Marks/7b.js +8 -0
  26. webtech_lab_codes/experiments/Ex07c_ATM_PIN/7c.js +13 -0
  27. webtech_lab_codes/experiments/Ex07d_Shopping_Amount/7d.js +6 -0
  28. webtech_lab_codes/experiments/Ex07e_Employee_Salary/7e.js +11 -0
  29. webtech_lab_codes/experiments/Ex08a_Table_Mouse_Events/index.html +11 -0
  30. webtech_lab_codes/experiments/Ex08a_Table_Mouse_Events/styles.css +3 -0
  31. webtech_lab_codes/experiments/Ex08b_Digital_Clock/index.html +6 -0
  32. webtech_lab_codes/experiments/Ex08b_Digital_Clock/styles.css +2 -0
  33. webtech_lab_codes/experiments/Ex08c_Keyboard_Interaction/index.html +5 -0
  34. webtech_lab_codes/experiments/Ex08c_Keyboard_Interaction/styles.css +3 -0
  35. webtech_lab_codes/experiments/Ex08d_Form_Display/index.html +4 -0
  36. webtech_lab_codes/experiments/Ex08d_Form_Display/styles.css +2 -0
  37. webtech_lab_codes/experiments/Ex08e_Mini_Login/index.html +4 -0
  38. webtech_lab_codes/experiments/Ex08e_Mini_Login/styles.css +2 -0
  39. webtech_lab_codes/experiments/Ex08f_Dark_Light_Mode/index.html +4 -0
  40. webtech_lab_codes/experiments/Ex08f_Dark_Light_Mode/styles.css +2 -0
  41. webtech_lab_codes/experiments/Ex09_AngularJS_Validation/index.html +9 -0
  42. webtech_lab_codes/experiments/Ex09_AngularJS_Validation/styles.css +4 -0
  43. webtech_lab_codes/experiments/Ex10_React_Components_Props_State_Events/index.html +8 -0
  44. webtech_lab_codes/experiments/Ex10_React_Components_Props_State_Events/styles.css +2 -0
  45. webtech_lab_codes/experiments/Ex11_React_State_Input/index.html +6 -0
  46. webtech_lab_codes/experiments/Ex11_React_State_Input/styles.css +2 -0
  47. webtech_lab_codes/experiments/Ex12_Node_MongoDB/README.txt +17 -0
  48. webtech_lab_codes/experiments/Ex12_Node_MongoDB/package.json +7 -0
  49. webtech_lab_codes/experiments/Ex12_Node_MongoDB/server.js +33 -0
  50. webtech_lab_codes/experiments/SOURCE_README.txt +16 -0
@@ -0,0 +1,74 @@
1
+ Metadata-Version: 2.4
2
+ Name: webtech-codes
3
+ Version: 1.0.0
4
+ Summary: Terminal cheat-sheet browser for Web Technology Lab experiment code files
5
+ Author: Ajay
6
+ License: MIT License
7
+
8
+ Copyright (c) 2026 Ajay
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Keywords: web-technology,html,css,javascript,react,angularjs,nodejs,lab,education
29
+ Classifier: Development Status :: 4 - Beta
30
+ Classifier: Environment :: Console
31
+ Classifier: Intended Audience :: Education
32
+ Classifier: License :: OSI Approved :: MIT License
33
+ Classifier: Operating System :: OS Independent
34
+ Classifier: Programming Language :: Python :: 3
35
+ Classifier: Topic :: Education
36
+ Classifier: Topic :: Utilities
37
+ Requires-Python: >=3.9
38
+ Description-Content-Type: text/markdown
39
+ License-File: LICENSE
40
+ Dynamic: license-file
41
+
42
+ # WebTech Lab Codes
43
+
44
+ A small terminal utility that lists the Web Technology Lab experiment folders and prints every code file in a selected experiment. The bundled source files are from the provided `Web_Technology_Lab_Experiments_2_to_12.zip`.
45
+
46
+ ## Install from PyPI
47
+
48
+ ```bash
49
+ python -m pip install webtech-lab-codes-ajay
50
+ ```
51
+
52
+ ## Commands
53
+
54
+ ```bash
55
+ webtech show all exp
56
+ webtech display 2
57
+ webtech display "Ex02 Blog"
58
+ webtech display "Ex12 Node MongoDB"
59
+ webtech --help
60
+ webtech --version
61
+ ```
62
+
63
+ Experiment names are case-insensitive. `display` prints each file with a filename banner and preserves the source indentation. It prints files only; it does not execute HTML, JavaScript, Node.js, or database code.
64
+
65
+ ## Run from a source checkout
66
+
67
+ ```bash
68
+ python -m pip install -e .
69
+ webtech show all exp
70
+ ```
71
+
72
+ ## Build and publish
73
+
74
+ See `PUBLISHING.md` for step-by-step PyPI instructions. Check the package name on PyPI before publishing; if it is already taken, change `project.name` in `pyproject.toml` and use that name in install commands.
@@ -0,0 +1,50 @@
1
+ webtech_codes-1.0.0.dist-info/licenses/LICENSE,sha256=FpdtK5FGpULccqx_l1BiAPKeOWXDZ-Y81SxPuaAfXCA,1061
2
+ webtech_lab_codes/__init__.py,sha256=J-j-u0itpEFT6irdmWmixQqYMadNl1X91TxUmoiLHMI,22
3
+ webtech_lab_codes/cli.py,sha256=RHXfD9EvYV2NnB7j-CHaSwUGHi1qqOD-s_GVaD2Xl-0,3785
4
+ webtech_lab_codes/experiments/SOURCE_README.txt,sha256=cXhVGzB8hj0-J68aC0wTZ1fO0rndzECP08C37OFaue4,1119
5
+ webtech_lab_codes/experiments/Ex02_Blog/index.html,sha256=efhZ-4HVhkZmtGm6TFLv7vF7C-kCRf9cp8wiND5dKdE,752
6
+ webtech_lab_codes/experiments/Ex02_Blog/styles.css,sha256=kIeGg861GH4eWOZeGUljWkHavwfJPAEpnwLd7AY3tWs,199
7
+ webtech_lab_codes/experiments/Ex03_Hotspot/index.html,sha256=hcYZgOOXJuo5-RNAkMU6VZEdBH54giyYar1v5XtVO_c,1223
8
+ webtech_lab_codes/experiments/Ex03_Hotspot/styles.css,sha256=SUG-hhRhZHiEAHbt4k4brUIJPdmJLgSl76a8CNSRrYM,168
9
+ webtech_lab_codes/experiments/Ex04_Registration_Form/index.html,sha256=kB6vD59KjZduVXBVIVWi2zxf7wz6J_ziTiTNp4JausE,1059
10
+ webtech_lab_codes/experiments/Ex04_Registration_Form/styles.css,sha256=FfWTEKTVL3q1yzTjjN7Efbxa9KzxwSJDZBw43dPzE_Y,374
11
+ webtech_lab_codes/experiments/Ex05_College_Website/admission.html,sha256=9r89oB20pSX-xk3UshX9AUk76uL5QSITUQG5LsmSiqk,588
12
+ webtech_lab_codes/experiments/Ex05_College_Website/contact.html,sha256=7nKzD7UMiKsVP53xqONbV3WrgC9SXN35Z0zgYvmcqEM,683
13
+ webtech_lab_codes/experiments/Ex05_College_Website/events.html,sha256=AWPiZBjbp5E-ip5HujPSE36wPw7GCXzoceOjmq1TWvQ,544
14
+ webtech_lab_codes/experiments/Ex05_College_Website/fees.html,sha256=aW2fBSzYOOuyiBHFrOH9zdMFWg9N7xZWYKFXAPrXNI4,606
15
+ webtech_lab_codes/experiments/Ex05_College_Website/index.html,sha256=UlFppc2v91x5MWzDnfgIilcP3qGIUennhAzVsApOgGc,587
16
+ webtech_lab_codes/experiments/Ex05_College_Website/results.html,sha256=UfnTj8p03sUgFZrno3lXXrgjuVWPTniZ7Fho8UfrFXo,588
17
+ webtech_lab_codes/experiments/Ex05_College_Website/styles.css,sha256=hvmpQUQRwlEgQbPDSpNxPD1gRjZrlxsyfwCaIgOv_j0,416
18
+ webtech_lab_codes/experiments/Ex06_Shopping_Webpage/index.html,sha256=fWp1DU4bUz-fr9MiPR7i7oMr9HS4pn8KALrpJuq86y4,827
19
+ webtech_lab_codes/experiments/Ex06_Shopping_Webpage/styles.css,sha256=ZjkU2qPhU20rXFzBovPlGEh-ejgnr17lPgmva97vPF8,702
20
+ webtech_lab_codes/experiments/Ex07a_Electricity_Bill/7a.js,sha256=0C4cxhgWsw9Y_e-GJSUV9Cp2NL0E8I4y-4jnAIajOJM,249
21
+ webtech_lab_codes/experiments/Ex07b_Student_Marks/7b.js,sha256=u-eHvNktElWAwEavssIzL5B92xCzXA9_fD2TXT80VI4,316
22
+ webtech_lab_codes/experiments/Ex07c_ATM_PIN/7c.js,sha256=dyi3v_IuiKdNnYvk-KmpKrK_X2wf44nUJn-PDzuhjok,480
23
+ webtech_lab_codes/experiments/Ex07d_Shopping_Amount/7d.js,sha256=TNBS9BgWxcjO-L_-mxKQQPDbCsx0pFJ2OkwgTWK7cLQ,290
24
+ webtech_lab_codes/experiments/Ex07e_Employee_Salary/7e.js,sha256=fE43ZdZrJjQgATu0cAw_ZtIYcfB3Qv5TwiWi-AeVlLE,346
25
+ webtech_lab_codes/experiments/Ex08a_Table_Mouse_Events/index.html,sha256=QnU51qJ14aOcaYR_cQog8PtT3c09mYEbhH3dCKjQFPM,840
26
+ webtech_lab_codes/experiments/Ex08a_Table_Mouse_Events/styles.css,sha256=SqLhUY5D5MfczfPrIVXK4nnskOnFOs36VMXwrWfpMUM,177
27
+ webtech_lab_codes/experiments/Ex08b_Digital_Clock/index.html,sha256=1dUkiZ-nsPF9liqe7ZW9VcX3PZyOyJsam7gjMNopZ2c,339
28
+ webtech_lab_codes/experiments/Ex08b_Digital_Clock/styles.css,sha256=Af_FhS0GFZpu6y30M3v6M7W_EZanyZ_LG2GQhMV-vdk,106
29
+ webtech_lab_codes/experiments/Ex08c_Keyboard_Interaction/index.html,sha256=bhKtS8aWjjugZrk6V9xtuB51uaVfpRG1mNy1tLTG8Mc,595
30
+ webtech_lab_codes/experiments/Ex08c_Keyboard_Interaction/styles.css,sha256=BiR2bax72OTm2ItLXkeET5c4J7-JOCoWyj9fZBvGMxs,131
31
+ webtech_lab_codes/experiments/Ex08d_Form_Display/index.html,sha256=2INt0Mec6xB-Z3lIZ7E5WDqHe_D67QlenmsbBJfzFbY,449
32
+ webtech_lab_codes/experiments/Ex08d_Form_Display/styles.css,sha256=H1ekhV4a_k-HFOQu7nXLXTI3zqxrSXrXVmcS56gNeCU,75
33
+ webtech_lab_codes/experiments/Ex08e_Mini_Login/index.html,sha256=-lPUezA0smIBFPwoVclgHj8vEdjtr_oC7EKyW9PLk9Q,518
34
+ webtech_lab_codes/experiments/Ex08e_Mini_Login/styles.css,sha256=6jphc7wDFvs5svt7zlvdCUAhiYRkpaWjdy3XWSKCCJ0,107
35
+ webtech_lab_codes/experiments/Ex08f_Dark_Light_Mode/index.html,sha256=P_wAYcGsQUtHDqeyexNrD6MentkZjyn8uT63LlPid50,346
36
+ webtech_lab_codes/experiments/Ex08f_Dark_Light_Mode/styles.css,sha256=34yBrPJabW0a2ayq11OLUF-UamCGF_qMkKQwq1bvjX8,120
37
+ webtech_lab_codes/experiments/Ex09_AngularJS_Validation/index.html,sha256=ZAY4xeAMV0YUGn1YTteA_7wbPTFWs5q55v8E_UeNUqY,1127
38
+ webtech_lab_codes/experiments/Ex09_AngularJS_Validation/styles.css,sha256=dCN_J2u-nOxFt4SvkhlDL8bWOfQBV8rrCK_2fqj16Sw,181
39
+ webtech_lab_codes/experiments/Ex10_React_Components_Props_State_Events/index.html,sha256=YLXQmG9UEi1tnJgFy48KgThaUwRBYMoeMTAt2rY4KSw,742
40
+ webtech_lab_codes/experiments/Ex10_React_Components_Props_State_Events/styles.css,sha256=mG0r1buqVbSbHCLTrodi7Y0oCWOlTNn63nh7X2ZkOak,106
41
+ webtech_lab_codes/experiments/Ex11_React_State_Input/index.html,sha256=JkA8EVS2znOQHJERRdnsEL_CNgydSJ9oXSsRbKhDzTk,700
42
+ webtech_lab_codes/experiments/Ex11_React_State_Input/styles.css,sha256=_lQw0IY-DPgcjpWIvzg3916GV0xeURmgef4-4GYdhdQ,81
43
+ webtech_lab_codes/experiments/Ex12_Node_MongoDB/README.txt,sha256=6QtekDPfRYrC6MnWBJXlWCgKc9-h5JllrjZAgRJJEP4,624
44
+ webtech_lab_codes/experiments/Ex12_Node_MongoDB/package.json,sha256=xksBoYtJdGziRkJNIJG2WPuRjGqv8ivR6HDDuoiXtCw,191
45
+ webtech_lab_codes/experiments/Ex12_Node_MongoDB/server.js,sha256=8js8dYZha200LyXCVNkUL7Zja-XOv4PNkh9F4p5nC48,1690
46
+ webtech_codes-1.0.0.dist-info/METADATA,sha256=e78WNOoiEME0uhfUn1nhyKK25SZqi7vnxA4iue7X04I,3013
47
+ webtech_codes-1.0.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
48
+ webtech_codes-1.0.0.dist-info/entry_points.txt,sha256=W1bXOCreCrjXx2XnHaehurCWJ_4EM3xa8tod1qJdWuE,55
49
+ webtech_codes-1.0.0.dist-info/top_level.txt,sha256=JubKjMbM7OKlaJSPam_ha0ixU9frfOWJw5AiPcHfkb8,18
50
+ webtech_codes-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ webtech = webtech_lab_codes.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ajay
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ webtech_lab_codes
@@ -0,0 +1 @@
1
+ __version__ = "1.0.0"
@@ -0,0 +1,107 @@
1
+ from __future__ import annotations
2
+
3
+ import difflib
4
+ import sys
5
+ from pathlib import Path
6
+
7
+ from . import __version__
8
+
9
+ EXP_DIR = Path(__file__).resolve().parent / "experiments"
10
+
11
+
12
+ def _experiment_dirs() -> list[Path]:
13
+ return sorted((p for p in EXP_DIR.iterdir() if p.is_dir()), key=lambda p: p.name.lower())
14
+
15
+
16
+ def _normalise(value: str) -> str:
17
+ return " ".join("".join(ch.lower() if ch.isalnum() else " " for ch in value).split())
18
+
19
+
20
+ def _label(path: Path) -> str:
21
+ return path.name.replace("_", " ")
22
+
23
+
24
+ def show_all() -> None:
25
+ dirs = _experiment_dirs()
26
+ print("Web Technology Lab — Experiments 2 to 12")
27
+ print("=" * 48)
28
+ for folder in dirs:
29
+ files = sorted(p.name for p in folder.rglob("*") if p.is_file())
30
+ print(f"{_label(folder)}")
31
+ print(f" Files: {', '.join(files)}")
32
+ print(f"\nTotal: {len(dirs)} experiment folders")
33
+ print("Use: webtech display <experiment name>")
34
+
35
+
36
+ def display_experiment(query: str) -> int:
37
+ folders = _experiment_dirs()
38
+ wanted = _normalise(query)
39
+ if not wanted:
40
+ print("Please provide an experiment name. Try: webtech show all exp")
41
+ return 2
42
+ matches = []
43
+ for folder in folders:
44
+ candidates = {_normalise(folder.name), _normalise(_label(folder))}
45
+ exp_num = ''.join(ch for ch in folder.name.split('_', 1)[0] if ch.isdigit())
46
+ if exp_num:
47
+ candidates.update({_normalise(f"experiment {int(exp_num)}"), _normalise(f"exp {int(exp_num)}"), _normalise(str(int(exp_num)))})
48
+ if wanted in candidates or any(c.startswith(wanted) for c in candidates):
49
+ matches.append(folder)
50
+ if not matches:
51
+ choices = [_label(p) for p in folders]
52
+ close = difflib.get_close_matches(query, choices, n=5, cutoff=0.35)
53
+ print(f"No experiment matched: {query}")
54
+ if close:
55
+ print("Closest matches:")
56
+ for item in close:
57
+ print(f" {item}")
58
+ print("Run 'webtech show all exp' to see all names.")
59
+ return 1
60
+ if len(matches) > 1:
61
+ print("The name matches multiple experiments. Use one of these exact names:")
62
+ for folder in matches:
63
+ print(f" {_label(folder)}")
64
+ return 2
65
+ folder = matches[0]
66
+ files = sorted(p for p in folder.rglob("*") if p.is_file())
67
+ print(f"\n{'=' * 78}\n{_label(folder)}\n{'=' * 78}")
68
+ for path in files:
69
+ rel = path.relative_to(folder).as_posix()
70
+ print(f"\n--- FILE: {rel} ---")
71
+ print("-" * min(78, len(rel) + 13))
72
+ try:
73
+ content = path.read_text(encoding="utf-8-sig")
74
+ except UnicodeDecodeError:
75
+ content = path.read_text(encoding="latin-1")
76
+ print(content.rstrip())
77
+ print()
78
+ print(f"Displayed {len(files)} file(s) from {_label(folder)}.")
79
+ return 0
80
+
81
+
82
+ def main(argv: list[str] | None = None) -> int:
83
+ args = list(sys.argv[1:] if argv is None else argv)
84
+ if not args or args in (["--help"], ["-h"]):
85
+ print("Web Technology Lab Codes")
86
+ print("Usage:")
87
+ print(" webtech show all exp")
88
+ print(" webtech display <experiment name or number>")
89
+ print(" webtech --version")
90
+ return 0 if args else 2
91
+ if args == ["--version"] or args == ["-V"]:
92
+ print(f"webtech-lab-codes {__version__}")
93
+ return 0
94
+ if len(args) >= 3 and args[:3] == ["show", "all", "exp"]:
95
+ if len(args) > 3:
96
+ print("Unexpected extra arguments after 'show all exp'.")
97
+ return 2
98
+ show_all()
99
+ return 0
100
+ if args[0].lower() == "display":
101
+ return display_experiment(" ".join(args[1:]))
102
+ print("Unknown command. Use 'webtech show all exp' or 'webtech display <name>'.")
103
+ return 2
104
+
105
+
106
+ if __name__ == "__main__":
107
+ raise SystemExit(main())
@@ -0,0 +1,15 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head><title>My Blog</title><link rel="stylesheet" href="styles.css"></head>
4
+ <body>
5
+ <h1>My Personal Blog</h1>
6
+ <p class="center">Welcome to my simple blog page.</p>
7
+ <hr>
8
+ <h2>About Me</h2><p>I am a student interested in web technology and programming.</p>
9
+ <h2>My Skills</h2><ul><li>HTML</li><li>CSS</li><li>JavaScript</li></ul>
10
+ <h2>Education</h2><table><tr><th>Course</th><th>Status</th></tr><tr><td>B.E. CSE</td><td>Studying</td></tr></table>
11
+ <h2>My Daily Routine</h2><ol><li>Attend college</li><li>Practise coding</li><li>Study</li></ol>
12
+ <h2>Favourite Website</h2><a href="https://www.wikipedia.org">Wikipedia</a>
13
+ <h2>Quote</h2><p><i>Learning never stops.</i></p>
14
+ <h2>Contact</h2><p>Email: student@example.com</p>
15
+ </body></html>
@@ -0,0 +1,4 @@
1
+ body { font-family: Arial; margin: 25px; color: black; background: white; }
2
+ h1, .center { text-align: center; }
3
+ table { border-collapse: collapse; }
4
+ th, td { border: 1px solid black; padding: 8px; }
@@ -0,0 +1,15 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head><title>Image Hotspots</title><link rel="stylesheet" href="styles.css"></head>
4
+ <body>
5
+ <h1>Clickable Hotspots</h1>
6
+ <p>Click a marked region to open its information page.</p>
7
+ <svg width="360" height="300" viewBox="0 0 360 300" role="img" aria-label="Simple map illustration">
8
+ <rect x="1" y="1" width="358" height="298" fill="white" stroke="black"/>
9
+ <path d="M150 25 L190 45 L210 80 L195 110 L220 140 L205 180 L180 215 L155 265 L130 230 L115 190 L95 155 L120 120 L105 85 L130 55 Z" fill="white" stroke="black" stroke-width="2"/>
10
+ <a href="https://en.wikipedia.org/wiki/Delhi" target="_blank"><circle cx="155" cy="105" r="9" fill="white" stroke="black"/><text x="170" y="109" font-size="12">Delhi</text></a>
11
+ <a href="https://en.wikipedia.org/wiki/Tamil_Nadu" target="_blank"><circle cx="165" cy="225" r="9" fill="white" stroke="black"/><text x="180" y="229" font-size="12">Tamil Nadu</text></a>
12
+ <a href="https://en.wikipedia.org/wiki/Kerala" target="_blank"><circle cx="145" cy="230" r="6" fill="white" stroke="black"/><text x="40" y="250" font-size="12">Kerala</text></a>
13
+ </svg>
14
+ <p>Note: This is a simple illustration for practising clickable hotspots, not a geographic map.</p>
15
+ </body></html>
@@ -0,0 +1,3 @@
1
+ body { font-family: Arial; color: black; background: white; margin: 25px; }
2
+ h1, body > p { text-align: center; }
3
+ svg { display: block; margin: auto; max-width: 100%; }
@@ -0,0 +1,18 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head><title>Registration Form</title><link rel="stylesheet" href="styles.css"></head>
4
+ <body>
5
+ <h1>Application Registration Form</h1>
6
+ <form onsubmit="event.preventDefault(); document.getElementById('msg').textContent='Registration submitted successfully.';">
7
+ <label>Full Name <input type="text" required></label>
8
+ <label>Date of Birth <input type="date" required></label>
9
+ <label>Email <input type="email" required></label>
10
+ <label>Mobile Number <input type="tel" pattern="[0-9]{10}" placeholder="10 digits" required></label>
11
+ <label>Gender
12
+ <select required><option value="">Select</option><option>Male</option><option>Female</option><option>Other</option></select></label>
13
+ <label>Address <textarea required></textarea></label>
14
+ <label>State <select><option>Tamil Nadu</option><option>Kerala</option><option>Karnataka</option></select></label>
15
+ <label><input type="checkbox" required> I confirm the details are correct.</label>
16
+ <button type="submit">Register</button> <button type="reset">Reset</button>
17
+ </form><p id="msg"></p>
18
+ </body></html>
@@ -0,0 +1,6 @@
1
+ body { font-family: Arial; margin: 25px; color: black; background: white; }
2
+ h1 { text-align: center; }
3
+ form { max-width: 500px; margin: auto; }
4
+ label { display: block; margin: 12px 0; }
5
+ input:not([type=checkbox]), select, textarea { display: block; box-sizing: border-box; width: 100%; padding: 7px; border: 1px solid black; margin-top: 4px; }
6
+ button { padding: 7px 15px; }
@@ -0,0 +1,2 @@
1
+ <!DOCTYPE html><html><head><title>Admission</title><link rel="stylesheet" href="styles.css"></head>
2
+ <body><header><h1>ABC College</h1><p>Education and Excellence</p></header><nav><a href="index.html">Home</a> | <a href="events.html">Events</a> | <a href="admission.html">Admission</a> | <a href="fees.html">Fees</a> | <a href="results.html">Results</a> | <a href="contact.html">Contact</a></nav><main><h2>Admission</h2><p>Applicants should have completed the required qualifying examination.</p><p>Contact the college office to apply.</p></main><footer>ABC College</footer></body></html>
@@ -0,0 +1,2 @@
1
+ <!DOCTYPE html><html><head><title>Contact</title><link rel="stylesheet" href="styles.css"></head>
2
+ <body><header><h1>ABC College</h1><p>Education and Excellence</p></header><nav><a href="index.html">Home</a> | <a href="events.html">Events</a> | <a href="admission.html">Admission</a> | <a href="fees.html">Fees</a> | <a href="results.html">Results</a> | <a href="contact.html">Contact</a></nav><main><h2>Contact Us</h2><p>Coimbatore, Tamil Nadu</p><form onsubmit="event.preventDefault();alert('Feedback submitted');"><label>Name <input required></label><label>Message <textarea required></textarea></label><button>Send</button></form></main><footer>ABC College</footer></body></html>
@@ -0,0 +1,2 @@
1
+ <!DOCTYPE html><html><head><title>Events</title><link rel="stylesheet" href="styles.css"></head>
2
+ <body><header><h1>ABC College</h1><p>Education and Excellence</p></header><nav><a href="index.html">Home</a> | <a href="events.html">Events</a> | <a href="admission.html">Admission</a> | <a href="fees.html">Fees</a> | <a href="results.html">Results</a> | <a href="contact.html">Contact</a></nav><main><h2>College Events</h2><ul><li>Technical Symposium</li><li>Workshop</li><li>Sports Day</li></ul></main><footer>ABC College</footer></body></html>
@@ -0,0 +1,2 @@
1
+ <!DOCTYPE html><html><head><title>Fees</title><link rel="stylesheet" href="styles.css"></head>
2
+ <body><header><h1>ABC College</h1><p>Education and Excellence</p></header><nav><a href="index.html">Home</a> | <a href="events.html">Events</a> | <a href="admission.html">Admission</a> | <a href="fees.html">Fees</a> | <a href="results.html">Results</a> | <a href="contact.html">Contact</a></nav><main><h2>Fee Structure</h2><table><tr><th>Course</th><th>Fee per year</th></tr><tr><td>CSE</td><td>₹80,000</td></tr><tr><td>ECE</td><td>₹75,000</td></tr></table></main><footer>ABC College</footer></body></html>
@@ -0,0 +1,2 @@
1
+ <!DOCTYPE html><html><head><title>College Home</title><link rel="stylesheet" href="styles.css"></head>
2
+ <body><header><h1>ABC College</h1><p>Education and Excellence</p></header><nav><a href="index.html">Home</a> | <a href="events.html">Events</a> | <a href="admission.html">Admission</a> | <a href="fees.html">Fees</a> | <a href="results.html">Results</a> | <a href="contact.html">Contact</a></nav><main><h2>Welcome to Our College</h2><p>Providing education in engineering and technology.</p><p><a href='admission.html'>Apply Now</a></p></main><footer>ABC College</footer></body></html>
@@ -0,0 +1,2 @@
1
+ <!DOCTYPE html><html><head><title>Results</title><link rel="stylesheet" href="styles.css"></head>
2
+ <body><header><h1>ABC College</h1><p>Education and Excellence</p></header><nav><a href="index.html">Home</a> | <a href="events.html">Events</a> | <a href="admission.html">Admission</a> | <a href="fees.html">Fees</a> | <a href="results.html">Results</a> | <a href="contact.html">Contact</a></nav><main><h2>Sample Results</h2><table><tr><th>Name</th><th>Mark</th></tr><tr><td>Arun</td><td>85</td></tr><tr><td>Kavi</td><td>90</td></tr></table></main><footer>ABC College</footer></body></html>
@@ -0,0 +1,7 @@
1
+ body { font-family: Arial; margin: 0; color: black; background: white; }
2
+ header, footer { text-align: center; padding: 15px; border: 1px solid black; }
3
+ nav { text-align: center; padding: 12px; border-bottom: 1px solid black; }
4
+ nav a { color: black; margin: 5px; }
5
+ main { margin: 25px; }
6
+ table { border-collapse: collapse; } th, td { border: 1px solid black; padding: 8px; }
7
+ label { display: block; margin: 10px 0; }
@@ -0,0 +1,9 @@
1
+ <!DOCTYPE html><html><head><title>Shopping Page</title><link rel="stylesheet" href="styles.css"></head>
2
+ <body><header><h1>Simple Mart</h1></header>
3
+ <nav><a href="#">Home</a><div class="dropdown"><a href="#">Products ▾</a><div class="menu"><a href="#grocery">Groceries</a><a href="#fruit">Fruits</a><a href="#dairy">Dairy</a></div></div><a href="#offers">Offers</a><a href="#contact">Contact</a></nav>
4
+ <h2 class="center">Products</h2><section class="products">
5
+ <article id="grocery"><h3>Groceries</h3><p>Rice and pulses</p></article>
6
+ <article id="fruit"><h3>Fruits</h3><p>Fresh seasonal fruits</p></article>
7
+ <article id="dairy"><h3>Dairy</h3><p>Milk and cheese</p></article></section>
8
+ <p id="offers" class="center">Special offers available today.</p><p id="contact" class="center">Contact: shop@example.com</p>
9
+ </body></html>
@@ -0,0 +1,11 @@
1
+ body { font-family: Arial; margin: 0; color: black; background: white; }
2
+ header, .center { text-align: center; }
3
+ header { border-bottom: 1px solid black; }
4
+ nav { display: flex; justify-content: center; gap: 25px; border-bottom: 1px solid black; padding: 12px; }
5
+ nav a { color: black; text-decoration: none; }
6
+ .dropdown { position: relative; }
7
+ .menu { display: none; position: absolute; background: white; border: 1px solid black; min-width: 120px; }
8
+ .menu a { display: block; padding: 8px; }
9
+ .dropdown:hover .menu { display: block; }
10
+ .products { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
11
+ article { border: 1px solid black; padding: 20px; width: 180px; text-align: center; }
@@ -0,0 +1,7 @@
1
+ const units = 250;
2
+ let bill;
3
+ if (units <= 100) bill = units * 2;
4
+ else if (units <= 200) bill = 100 * 2 + (units - 100) * 3;
5
+ else bill = 100 * 2 + 100 * 3 + (units - 200) * 5;
6
+ console.log("Units:", units);
7
+ console.log("Electricity bill: Rs.", bill);
@@ -0,0 +1,8 @@
1
+ const marks = [85, 78, 92, 88, 76];
2
+ let total = 0;
3
+ for (let i = 0; i < marks.length; i++) total += marks[i];
4
+ console.log("Marks:", marks.join(", "));
5
+ console.log("Total:", total);
6
+ console.log("Average:", total / marks.length);
7
+ console.log("Highest:", Math.max(...marks));
8
+ console.log("Lowest:", Math.min(...marks));
@@ -0,0 +1,13 @@
1
+ const readline = require("node:readline");
2
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
3
+ const correctPIN = "2920";
4
+ let attempts = 0;
5
+ function ask() {
6
+ rl.question("Enter PIN: ", pin => {
7
+ attempts++;
8
+ if (pin === correctPIN) { console.log("PIN Verified"); rl.close(); }
9
+ else if (attempts === 3) { console.log("Wrong PIN Attempt\nATM Blocked"); rl.close(); }
10
+ else { console.log("Wrong PIN Attempt"); ask(); }
11
+ });
12
+ }
13
+ ask();
@@ -0,0 +1,6 @@
1
+ const prices = [500, 750, 250, 1000];
2
+ let total = 0;
3
+ for (let i = 0; i < prices.length; i++) total += prices[i];
4
+ console.log("Prices:", prices.join(", "));
5
+ console.log("Total purchase amount: Rs.", total);
6
+ console.log(total >= 2000 ? "Eligible for Discount" : "Not Eligible for Discount");
@@ -0,0 +1,11 @@
1
+ const employees = [
2
+ { name: "Arun", salary: 25000 },
3
+ { name: "Bala", salary: 30000 },
4
+ { name: "Charan", salary: 28000 }
5
+ ];
6
+ for (const employee of employees) {
7
+ console.log("Name:", employee.name);
8
+ console.log("Monthly salary:", employee.salary);
9
+ console.log("Annual salary:", employee.salary * 12);
10
+ console.log("---------------");
11
+ }
@@ -0,0 +1,11 @@
1
+ <!DOCTYPE html><html><head><title>Table Mouse Events</title><link rel="stylesheet" href="styles.css"></head><body>
2
+ <h2>Table Mouse Events</h2><p>Hover, click, or double-click a row.</p>
3
+ <table id="t"><tr><th>Name</th><th>Department</th></tr><tr><td>Arun</td><td>CSE</td></tr><tr><td>Rahul</td><td>ECE</td></tr><tr><td>Kavi</td><td>IT</td></tr></table>
4
+ <script>
5
+ document.querySelectorAll("#t tr:not(:first-child)").forEach(row => {
6
+ row.onmouseover = () => row.style.background = "lightgray";
7
+ row.onmouseout = () => { if (!row.classList.contains("selected")) row.style.background = ""; };
8
+ row.onclick = () => { row.classList.toggle("selected"); row.style.background = row.classList.contains("selected") ? "gray" : ""; };
9
+ row.ondblclick = () => { row.classList.remove("selected"); row.style.background = ""; };
10
+ });
11
+ </script></body></html>
@@ -0,0 +1,3 @@
1
+ body { font-family: Arial; margin: 25px; color: black; }
2
+ table { border-collapse: collapse; width: 400px; }
3
+ th, td { border: 1px solid black; padding: 10px; text-align: left; }
@@ -0,0 +1,6 @@
1
+ <!DOCTYPE html><html><head><title>Digital Clock</title><link rel="stylesheet" href="styles.css"></head><body>
2
+ <h2>Real-Time Digital Clock</h2><p id="clock"></p>
3
+ <script>
4
+ function showTime() { document.getElementById("clock").textContent = new Date().toLocaleTimeString(); }
5
+ showTime(); setInterval(showTime, 1000);
6
+ </script></body></html>
@@ -0,0 +1,2 @@
1
+ body { font-family: Arial; text-align: center; padding: 30px; color: black; }
2
+ #clock { font-size: 36px; }
@@ -0,0 +1,5 @@
1
+ <!DOCTYPE html><html><head><title>Keyboard Interaction</title><link rel="stylesheet" href="styles.css"></head><body>
2
+ <h2>Keyboard Interaction</h2><p>Press A to add a thick border. Press R to reset.</p>
3
+ <table id="t"><tr><th>Name</th><th>Department</th></tr><tr><td>Arun</td><td>CSE</td></tr><tr><td>Kavi</td><td>IT</td></tr></table>
4
+ <script>document.addEventListener("keydown", e => { if(e.key.toLowerCase()==="a") document.getElementById("t").style.border="4px solid black"; if(e.key.toLowerCase()==="r") document.getElementById("t").style.border="1px solid black"; });</script>
5
+ </body></html>
@@ -0,0 +1,3 @@
1
+ body { font-family: Arial; margin: 25px; }
2
+ table { border-collapse: collapse; }
3
+ th, td { border: 1px solid black; padding: 10px; }
@@ -0,0 +1,4 @@
1
+ <!DOCTYPE html><html><head><title>Form Display</title><link rel="stylesheet" href="styles.css"></head><body>
2
+ <h2>Simple Form</h2><form id="f"><input id="name" placeholder="Enter your name" required><button>Submit</button></form><p id="out"></p>
3
+ <script>document.getElementById("f").onsubmit = e => { e.preventDefault(); document.getElementById("out").textContent = "You entered: " + document.getElementById("name").value; };</script>
4
+ </body></html>
@@ -0,0 +1,2 @@
1
+ body { font-family: Arial; margin: 25px; }
2
+ input, button { padding: 8px; }
@@ -0,0 +1,4 @@
1
+ <!DOCTYPE html><html><head><title>Mini Login</title><link rel="stylesheet" href="styles.css"></head><body>
2
+ <h2>Mini Login System</h2><input id="user" placeholder="Username"><input id="pass" type="password" placeholder="Password"><button onclick="login()">Login</button><p id="msg"></p>
3
+ <script>function login(){ document.getElementById("msg").textContent = document.getElementById("user").value==="admin" && document.getElementById("pass").value==="1234" ? "Welcome" : "Invalid credentials"; }</script>
4
+ </body></html>
@@ -0,0 +1,2 @@
1
+ body { font-family: Arial; margin: 25px; }
2
+ input, button { display: block; padding: 8px; margin: 10px 0; }
@@ -0,0 +1,4 @@
1
+ <!DOCTYPE html><html><head><title>Dark Light Mode</title><link rel="stylesheet" href="styles.css"></head><body>
2
+ <h2>Dark / Light Mode</h2><p>Click the button to change the theme.</p><button id="toggle">Toggle Theme</button>
3
+ <script>document.getElementById("toggle").onclick = () => document.body.classList.toggle("dark");</script>
4
+ </body></html>
@@ -0,0 +1,2 @@
1
+ body { font-family: Arial; padding: 25px; background: white; color: black; }
2
+ .dark { background: black; color: white; }
@@ -0,0 +1,9 @@
1
+ <!DOCTYPE html><html ng-app="app"><head><title>AngularJS Form Validation</title><script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></script><link rel="stylesheet" href="styles.css"></head>
2
+ <body ng-controller="FormCtrl"><h2>Registration Form</h2>
3
+ <form name="f" ng-submit="submit()" novalidate>
4
+ <label>Name: <input name="name" ng-model="user.name" required></label><span ng-show="f.name.$touched && f.name.$invalid">Name is required.</span>
5
+ <label>Email: <input type="email" name="email" ng-model="user.email" required></label><span ng-show="f.email.$touched && f.email.$invalid">Enter a valid email.</span>
6
+ <label>Password: <input type="password" name="password" ng-model="user.password" ng-minlength="4" required></label><span ng-show="f.password.$touched && f.password.$invalid">Password must be at least 4 characters.</span>
7
+ <button ng-disabled="f.$invalid">Register</button></form><p>{{message}}</p>
8
+ <script>angular.module("app",[]).controller("FormCtrl",function($scope){$scope.submit=function(){$scope.message="Registration successful for "+$scope.user.name;};});</script>
9
+ </body></html>
@@ -0,0 +1,4 @@
1
+ body { font-family: Arial; margin: 25px; color: black; }
2
+ label { display: block; margin: 12px 0; }
3
+ input { display: block; padding: 7px; margin-top: 4px; }
4
+ span { display: block; }
@@ -0,0 +1,8 @@
1
+ <!DOCTYPE html><html><head><title>React Components</title><link rel="stylesheet" href="styles.css">
2
+ <script src="https://unpkg.com/react@18/umd/react.development.js"></script><script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script><script src="https://unpkg.com/@babel/standalone/babel.min.js"></script></head><body>
3
+ <div id="root"></div>
4
+ <script type="text/babel">
5
+ function Greeting(props){return <h2>Hello, {props.name}</h2>;}
6
+ function App(){const [count,setCount]=React.useState(0);return <div><Greeting name="Student"/><p>Button clicked: {count} times</p><button onClick={()=>setCount(count+1)}>Click</button></div>;}
7
+ ReactDOM.createRoot(document.getElementById("root")).render(<App/>);
8
+ </script></body></html>
@@ -0,0 +1,2 @@
1
+ body { font-family: Arial; margin: 25px; color: black; background: white; }
2
+ button { padding: 7px 15px; }
@@ -0,0 +1,6 @@
1
+ <!DOCTYPE html><html><head><title>React Input Handling</title><link rel="stylesheet" href="styles.css">
2
+ <script src="https://unpkg.com/react@18/umd/react.development.js"></script><script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script><script src="https://unpkg.com/@babel/standalone/babel.min.js"></script></head><body>
3
+ <div id="root"></div><script type="text/babel">
4
+ function App(){const [name,setName]=React.useState("");return <div><h2>Enter Your Name</h2><input value={name} onChange={e=>setName(e.target.value)} placeholder="Name"/><p>Hello, {name || "Student"}</p></div>;}
5
+ ReactDOM.createRoot(document.getElementById("root")).render(<App/>);
6
+ </script></body></html>
@@ -0,0 +1,2 @@
1
+ body { font-family: Arial; margin: 25px; color: black; }
2
+ input { padding: 8px; }
@@ -0,0 +1,17 @@
1
+ NODE.JS + MONGODB CRUD
2
+
3
+ 1. Install Node.js and MongoDB, or create a MongoDB Atlas database.
4
+ 2. Open terminal in this folder.
5
+ 3. Run: npm install
6
+ 4. Start MongoDB locally, or set MONGO_URI to your Atlas connection string.
7
+ 5. Run: npm start
8
+ 6. Open http://localhost:3000
9
+
10
+ Endpoints:
11
+ GET /students list students
12
+ POST /students create student; JSON body e.g. {"name":"Arun","mark":85}
13
+ GET /students/:id read one student
14
+ PUT /students/:id update student; JSON body e.g. {"mark":90}
15
+ DELETE /students/:id delete student
16
+
17
+ Use Postman, Thunder Client, or another API client for POST/PUT/DELETE requests.
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "simple-student-crud",
3
+ "version": "1.0.0",
4
+ "main": "server.js",
5
+ "scripts": { "start": "node server.js" },
6
+ "dependencies": { "express": "^4.21.2", "mongoose": "^8.9.5" }
7
+ }
@@ -0,0 +1,33 @@
1
+ const express = require("express");
2
+ const mongoose = require("mongoose");
3
+ const app = express();
4
+ app.use(express.json());
5
+
6
+ const uri = process.env.MONGO_URI || "mongodb://127.0.0.1:27017/studentdb";
7
+ mongoose.connect(uri).then(() => console.log("MongoDB connected"))
8
+ .catch(err => console.error("MongoDB connection error:", err.message));
9
+
10
+ const Student = mongoose.model("Student", new mongoose.Schema({
11
+ name: { type: String, required: true },
12
+ mark: { type: Number, required: true }
13
+ }));
14
+
15
+ app.get("/", (req, res) => res.send("Student CRUD API is running"));
16
+ app.post("/students", async (req, res) => {
17
+ try { res.status(201).json(await Student.create(req.body)); }
18
+ catch (e) { res.status(400).json({ error: e.message }); }
19
+ });
20
+ app.get("/students", async (req, res) => res.json(await Student.find()));
21
+ app.get("/students/:id", async (req, res) => {
22
+ try { const s = await Student.findById(req.params.id); if (!s) return res.status(404).json({error:"Not found"}); res.json(s); }
23
+ catch { res.status(400).json({error:"Invalid ID"}); }
24
+ });
25
+ app.put("/students/:id", async (req, res) => {
26
+ try { const s = await Student.findByIdAndUpdate(req.params.id, req.body, {new:true, runValidators:true}); if (!s) return res.status(404).json({error:"Not found"}); res.json(s); }
27
+ catch (e) { res.status(400).json({error:e.message}); }
28
+ });
29
+ app.delete("/students/:id", async (req, res) => {
30
+ try { const s = await Student.findByIdAndDelete(req.params.id); if (!s) return res.status(404).json({error:"Not found"}); res.json({message:"Student deleted"}); }
31
+ catch { res.status(400).json({error:"Invalid ID"}); }
32
+ });
33
+ app.listen(3000, () => console.log("Server running at http://localhost:3000"));
@@ -0,0 +1,16 @@
1
+ WEB TECHNOLOGY LAB — SIMPLE WORKING CODES (EXPERIMENTS 2–12)
2
+
3
+ Each experiment has its own folder. HTML experiments use index.html and styles.css.
4
+ Experiment 7 files are standalone JavaScript programs.
5
+
6
+ HOW TO RUN
7
+ 1. HTML/CSS/DOM experiments: open that experiment's index.html in a browser.
8
+ 2. Experiment 7: install Node.js, open a terminal in the experiment folder, run:
9
+ node 7a.js (change the filename for the required experiment)
10
+ 3. Experiment 9 (AngularJS): open index.html while connected to the internet (AngularJS CDN).
11
+ 4. Experiments 10–11 (React): these use React through CDN and Babel; open index.html with internet access.
12
+ 5. Experiment 12 (Node.js + MongoDB): install Node.js, install MongoDB locally or use MongoDB Atlas.
13
+ In the folder run: npm install, then npm start. Set MONGO_URI in your environment if needed.
14
+ This is a basic CRUD API; use the browser or an API client to test the endpoints.
15
+
16
+ All designs are intentionally plain black and white. Experiment 3 uses a simple inline SVG map-style image so it works without a separate image download; hotspot coordinates are illustrative.