├── L31-Typescript ├── script.js ├── tsconfig.tsbuildinfo ├── package.json ├── 1_interface-as-object.txt ├── script.ts ├── 5_creatingAbstract-class.txt ├── 2_interface-as-class.txt └── 4_question.txt ├── L16-Class-DOM ├── 2_DOM │ ├── script.js │ ├── 1_AccessElements.js │ ├── 2_InnerContent.js │ ├── 3_CSSHandling.js │ └── index.html ├── 3_DOM-2 │ ├── script.js │ ├── index.html │ ├── 1_CreateAndAppendElement.js │ ├── 2_AppendEntireMovieList.js │ └── 3_innerHTMLvsAppenChild.js ├── script.js ├── 4_DOM-Task │ ├── index.html │ └── script.js ├── 5_DOM-Parent-Child-Sibling │ ├── script.js │ └── index.html └── 1_Classes │ ├── 2_ClassesInheritance.js │ └── 1_StaticMethods.js ├── L41-Redux ├── 1_rtk │ ├── src │ │ ├── index.css │ │ ├── App.jsx │ │ ├── main.jsx │ │ ├── store │ │ │ └── store.js │ │ ├── redux │ │ │ └── slices │ │ │ │ └── todoSlice.js │ │ └── components │ │ │ └── Error.jsx │ ├── vite.config.js │ ├── .gitignore │ └── index.html └── fullStackApp │ ├── frontend │ ├── src │ │ ├── index.css │ │ ├── utils │ │ │ └── axios.js │ │ ├── App.jsx │ │ └── main.jsx │ ├── Screenshot 2025-07-15 at 9.58.55 PM.png │ ├── vite.config.js │ ├── .gitignore │ └── index.html │ └── backend │ ├── package.json │ └── app.js ├── L43-Multer ├── client │ ├── src │ │ ├── App.css │ │ ├── index.css │ │ └── main.jsx │ ├── vite.config.js │ ├── .gitignore │ └── index.html └── backend │ ├── .env │ ├── uploads │ └── img-1753459525015-808439992.jpg │ └── package.json ├── L18- TodoApp-NodeJs └── 1_TodoApp │ ├── Todos.js │ └── 1_GetTaskFromInput.js ├── L42-Project-Blog ├── client │ ├── src │ │ ├── App.css │ │ ├── index.css │ │ ├── components │ │ │ ├── ProtectedRoute.jsx │ │ │ └── PublicRoute.jsx │ │ ├── api │ │ │ ├── posts.js │ │ │ └── auth.js │ │ ├── store │ │ │ └── store.js │ │ └── main.jsx │ ├── vite.config.js │ ├── .gitignore │ └── index.html └── backend │ ├── .gitignore │ ├── prisma │ └── migrations │ │ ├── migration_lock.toml │ │ ├── 20250731161040_adding_imageurl_posts │ │ └── migration.sql │ │ ├── 20250718151839_init │ │ └── migration.sql │ │ ├── 20250722140737_adding_posts_collection │ │ └── migration.sql │ │ └── 20250731142906_adding_tags_model │ │ └── migration.sql │ ├── routes │ ├── tags.js │ ├── auth.js │ └── posts.js │ └── middleware │ └── auth.js ├── L3-HTMLCSS ├── sample │ ├── src │ │ ├── features │ │ │ ├── .gitkeep │ │ │ └── actions │ │ │ │ └── counter.jsx │ │ ├── App.jsx │ │ └── main.jsx │ ├── vite.config.js │ ├── .gitignore │ ├── index.html │ └── README.md ├── 4_tableTag │ ├── reference_1.png │ └── reference_2.png ├── 1_HTMLTags │ └── index.html └── 3_Lists │ ├── 1_unorderedList.html │ └── 2_orderedlist.html ├── README.md ├── .gitignore ├── L32-Postgresql ├── .gitignore ├── src │ ├── user.ts │ └── db │ │ └── index.ts ├── tsconfig.tsbuildinfo └── package.json ├── L19-JS-NODEJS ├── 3_Todos.js │ └── data │ │ └── todos.json ├── .DS_Store ├── 1_ArrayFunctions │ ├── forEach.js │ ├── map.js │ ├── filter.js │ └── reduce.js └── 2_NodeJS │ ├── 3_Create-Sync.js │ ├── 7_Delete-Callback.js │ ├── 6_Read-Sync.js │ ├── 5_Read-Promises.js │ ├── 2_Create-Promises.js │ ├── 4_Read-Callback.js │ └── 1_Create-Callback.js ├── L23-FileDependency-TodoApp ├── 4_todoApp │ ├── public │ │ ├── style.css │ │ └── script.js │ ├── .DS_Store │ ├── package.json │ └── updatingStatusInArray.js ├── 2_FileDependency │ ├── working.png │ ├── script.js │ ├── andaBirth.js │ └── murgiBirth.js ├── 1_basics │ ├── makingObjectShorthand.txt │ ├── script.js │ └── destructureObject.txt └── 3_FileDependency-CircularDependency │ ├── StoringReferences.txt │ ├── ValuesAreSame.txt │ ├── Screenshot 2025-04-09 at 8.13.45 PM.png │ ├── Screenshot 2025-04-09 at 8.14.57 PM.png │ ├── murgiBirth.js │ ├── script.js │ └── andaBirth.js ├── L22-ExpressJS ├── 2_sendingfiles │ ├── script.js │ ├── style.css │ ├── .DS_Store │ └── index.html ├── 3_sendingStaticContent │ ├── public │ │ ├── script.js │ │ ├── style.css │ │ └── index.html │ ├── .DS_Store │ └── app.js ├── .DS_Store ├── 4_middlewares │ ├── .DS_Store │ ├── Lecture-15-HTTP (1).pdf │ ├── Screenshot 2025-04-07 at 10.05.13 PM.png │ └── package.json └── 1_queryandparams │ └── package.json ├── L12-AsyncProgramming ├── 4_ExecutingAsyncTasksSequentially │ ├── randomfile.txt │ └── 1_Callbacks │ │ └── argumentAndParameterConcept.js ├── 3_setInterval │ ├── script1.js │ ├── index.html │ └── script.js ├── 2_AsyncTask │ ├── script.js │ └── index.html ├── ResourcesToRead.txt └── 1_SyncTasks │ ├── script.js │ └── index.html ├── L39-Routers-Hooks ├── 6_TodoApp │ ├── src │ │ ├── index.css │ │ ├── main.jsx │ │ ├── components │ │ │ ├── TodoDisplay.jsx │ │ │ └── TodoInput.jsx │ │ └── App.jsx │ ├── vite.config.js │ ├── .gitignore │ └── index.html ├── 3_reactrouters │ ├── src │ │ ├── index.css │ │ ├── main.jsx │ │ └── components │ │ │ ├── About.jsx │ │ │ └── Contact.jsx │ ├── vite.config.js │ ├── .gitignore │ └── index.html ├── 5_lazyLoading │ ├── src │ │ ├── index.css │ │ ├── main.jsx │ │ └── components │ │ │ ├── Contact.jsx │ │ │ ├── About.jsx │ │ │ └── Navbar.jsx │ ├── vite.config.js │ ├── .gitignore │ └── index.html ├── 4_nestedRoutes │ ├── vite.config.js │ ├── src │ │ ├── components │ │ │ ├── Centers.jsx │ │ │ ├── NotFound.jsx │ │ │ ├── Team.jsx │ │ │ ├── Contact.jsx │ │ │ └── NotFound.css │ │ └── main.jsx │ ├── .gitignore │ └── index.html ├── 1_anchortag-issues │ ├── vite.config.js │ ├── src │ │ ├── components │ │ │ ├── Home.jsx │ │ │ ├── About.jsx │ │ │ └── Contact.jsx │ │ ├── main.jsx │ │ └── App.jsx │ ├── .gitignore │ └── index.html └── 2_anchortag-correct │ ├── vite.config.js │ ├── src │ ├── main.jsx │ └── components │ │ ├── About.jsx │ │ └── Contact.jsx │ ├── .gitignore │ └── index.html ├── L9-MediaQueries-JS_Basics ├── 2_JS-Basics │ ├── JS-Agenda.txt │ ├── 1_Variables.js │ └── installation-instructions.txt └── 1_MediaQueries │ ├── WhyMediaQueries.png │ └── styles │ └── navbar.css ├── L2-TerminalCommands ├── songs │ └── hindisong.txt ├── .DS_Store ├── 5_FutureTasks.txt └── classwork │ ├── 1_pwd.md │ ├── 4_mkdir.md │ └── 0_Setup.txt ├── .DS_Store ├── L17-DOM-API ├── .DS_Store ├── random.js ├── 3_Api │ ├── 0_WhatisJSON.js │ └── 1_fetch.js ├── 1_DOM_Events │ ├── 2_keyboardEvents.js │ ├── 3_formEvents.js │ └── 1_mouseEvents.js ├── 4_weatherApi │ └── index.html └── 2_Form │ └── script.js ├── L24-TodoApp ├── .DS_Store └── package.json ├── L37-ReactJs ├── .DS_Store ├── 2_useEffect │ ├── vite.config.js │ ├── src │ │ ├── main.jsx │ │ ├── App.jsx │ │ └── CleanUp.jsx │ ├── .gitignore │ └── index.html └── 1_rerendering │ ├── vite.config.js │ ├── src │ ├── main.jsx │ └── RenderFix2.jsx │ ├── .gitignore │ └── index.html ├── L21-ExpressJS ├── .DS_Store ├── package.json └── app.js ├── L30-TypeScript ├── dist │ ├── script.js │ ├── types_ts │ │ ├── 3_typeUnionExample.js │ │ ├── 2_typeUnion.js │ │ ├── 4_typeIntersectionExample.js │ │ ├── 1_types.js │ │ └── 5_Task.js │ ├── interfaces │ │ ├── 2_interfaces.js │ │ └── 1_interfaces-learn.js │ ├── functions.js │ └── passingFunctionToFunction.js ├── src │ ├── script.ts │ ├── types_ts │ │ ├── 2_typeUnion.ts │ │ ├── 3_typeUnionExample.ts │ │ ├── 1_types.ts │ │ ├── 4_typeIntersectionExample.ts │ │ └── 5_Task.ts │ ├── interfaces │ │ ├── 1_interfaces-learn.ts │ │ └── 2_interfaces.ts │ ├── functions.ts │ └── passingFunctionToFunction.ts ├── package.json └── tsconfig.tsbuildinfo ├── L29-JWT-Sessions ├── .DS_Store ├── 2_cookies │ ├── .DS_Store │ ├── Lecture-22-Cookies-Sessions-JWT-HBS.pdf │ ├── package.json │ └── public │ │ └── index.html └── 1_jwt │ └── package.json ├── L44-Websockets ├── .DS_Store ├── server │ ├── .env │ ├── models │ │ └── messages.model.js │ ├── 1_basicsOfWs.js │ ├── package.json │ ├── 3_BroadCasting.js │ └── 2_ClientToServerData.js └── client │ ├── vite.config.js │ ├── src │ └── main.jsx │ ├── .gitignore │ └── index.html ├── L4-CSS ├── 2_CSS │ ├── 1_resources-mdn.link.txt │ ├── style.css │ ├── 2_inline.html │ ├── 3_Internal.html │ └── 5_external.html ├── Lecture-4-Live Batch.pdf ├── LP01 - Introduction To WebDev.pdf ├── 4_CSSBOXModel │ └── index.html └── 3_Specificity │ └── 1_index.html ├── L25-Databases-MongoDB ├── .DS_Store └── package.json ├── L33-Prisma ├── prisma │ └── migrations │ │ ├── 20250531152200_adding │ │ └── migration.sql │ │ └── migration_lock.toml ├── .gitignore ├── tsconfig.tsbuildinfo ├── package.json └── src │ ├── read.ts │ ├── delete.ts │ └── read-user-post.ts ├── L28-MongooseAndProject ├── .DS_Store ├── 3_Bcrypt-Salt │ ├── routers.png │ ├── salt-concept.png │ ├── reference-concept.png │ ├── readme.md │ ├── package.json │ └── models │ │ └── User.js ├── 1_ProjectStructure │ ├── .DS_Store │ ├── database │ │ └── db.js │ ├── package.json │ ├── models │ │ └── Todos.model.js │ └── app.js └── 2_AdvancedMongoose │ ├── .DS_Store │ └── package.json ├── L5-CSS ├── 3_Positions │ ├── 1_Relative.png │ ├── 3_Absolute-Advanced.png │ └── 1_Relative.html ├── 1_revision │ └── index.html └── 4_units │ └── 3_percentage.html ├── L26-TodoComplete-Mongoose ├── .DS_Store ├── 2_mongoose │ ├── .DS_Store │ ├── package.json │ └── JsClasses.js ├── 1_todoComplete │ ├── .DS_Store │ └── package.json └── 3_mongooseTodo-Users │ ├── .DS_Store │ ├── models │ ├── Users.model.js │ └── Todos.model.js │ └── package.json ├── L11-Closure-Scopes-AsyncProgramming ├── 4_letVsVar │ ├── 2_Scopes │ │ ├── 4_Question.js │ │ ├── 2_var-Scope.js │ │ ├── 5_Question.js │ │ └── 3_Questions.js │ └── 1_Hoisting │ │ ├── afterHoisting.js │ │ ├── script.js │ │ ├── 3_FunctionAssignedValues.js │ │ └── 4_AfterHoisting.js ├── 1_Revision-Closures │ └── script.js ├── 2_Currying │ └── script.js └── 5_ClosureMemoization │ ├── fibonacci.js │ └── factorial.js ├── L13-Promises-Prototypes ├── 3_Prototypes │ ├── 2_cppClasses │ ├── 4_StructureOfPrototype.png │ ├── 5_StructureWithConstructor.png │ ├── 9_UsingFunctionsToCreateObjects.png │ ├── 8_InternalStructureWithOurFunctions.png │ ├── 6_CreatingObjectFromObjects.js │ ├── 5_AddingFunctionForAll.js │ └── 2_cppClasses.cpp ├── 1_Promises │ ├── 2_sort.js │ ├── 4_promise-race.js │ └── 3_Promises-allExample.js └── 2_EverythingInjs-IsAnObject │ └── script.js ├── L27-MongoDB-DeepFive └── Lecture-18_19-Mongoose (1).pdf ├── L1-GettingStarted └── index.html ├── L7-Flexbox-Grid-MediumClone ├── 2_GridLayouts │ ├── FrUnit.png │ ├── FlexVSGrid.png │ └── Grid-Initial-Task.png └── 3_GridTemplateAreas │ └── areasMapping.png ├── L15-Bindings-Classes ├── 2_classSyntax │ ├── 1_BasicsStructure.png │ ├── 3_DefaultFunctionsAndPrototypes.png │ ├── 1_Basics.js │ └── 4_getterAndSetter.js └── 1_Bindings │ ├── 2_defaultBinding.js │ ├── 6_BindingQuestion.js │ ├── 7_BindingQuestion2.js │ ├── 3_explicitBindings-call.js │ ├── 4_explicitBindings-apply.js │ ├── 11_newKeyword.js │ ├── 9_BindingQuestion4.js │ ├── 1_implicitBinding.js │ ├── cppCode.cpp │ ├── 10_WhyThisAndNotArgument.js │ ├── 8_BindingQuestion3.js │ └── 5_explicitBinding-bind.js ├── L6-CSS-Flexboxes-Grids-Positions ├── Lecture-6-Live Batch.pdf ├── 1_Revision │ └── style.css └── 4_img │ └── index.html ├── L34-ReactJS ├── 4_reactjsbasics │ ├── src │ │ ├── App.jsx │ │ └── main.jsx │ ├── vite.config.js │ ├── .gitignore │ └── index.html ├── 3_ClientSideRendering │ ├── package.json │ └── app.js ├── 1_TraditionalWay │ └── index.html ├── 2_ServerSideRendering │ └── package.json └── 4_ClientAndServerSideCombined │ └── package.json ├── L8-MediumClone └── 1_MediumClone-Part-2 │ ├── 2_UserInfoNavbar │ └── Structure.png │ ├── 3_mainBlogsHeaderCSS │ ├── blogs-structure.png │ └── active-psuedoelement-css-structure.png │ └── 4_MainBlogs-RecommendedBlogs-Structure │ └── ReactionsExcalidraw-Structure.png ├── L10-JS-Arrays-Objects-Loops-Functions ├── 1_Classwork │ ├── 10_ClosureKiNeed.png │ ├── 11_ClosureKaConcept.png │ ├── 13_RemovingConfusionWorking.png │ ├── 8_HigherOrderFunction-DryRun.png │ ├── 9_HigherOrderFunctions2-DRYRUN.png │ ├── 10_Closure.js │ ├── 13_RemovingConfusionOf10_ClosureAdd.js │ ├── 5_Functions.js │ ├── 8_HigherOrderFunctions.js │ ├── 9_HigherOrderFunctions2.js │ ├── 7_ArrowFunction.js │ ├── 2_Arrays_InbuiltFunctions.js │ ├── 1_Arrays.js │ ├── 4_ObjectLoops.js │ └── 6_FunctionAsDataTypes.js └── 2_HomeWork-Closure │ └── 13_ClosureAssignment-Homework.pdf ├── L36-ReactJS ├── 4_task │ ├── vite.config.js │ ├── .gitignore │ └── index.html ├── 1_components │ ├── vite.config.js │ ├── src │ │ ├── components │ │ │ ├── TodoDisplay.jsx │ │ │ └── TodoApp.jsx │ │ └── main.jsx │ ├── .gitignore │ └── index.html ├── 2_customhooks │ ├── vite.config.js │ ├── .gitignore │ ├── src │ │ └── hooks │ │ │ ├── useCounter.jsx │ │ │ └── useCounterAdvanced.jsx │ └── index.html └── 3_MycustomTodos │ ├── vite.config.js │ ├── .gitignore │ └── index.html ├── L35-ReactJS ├── 2_todoApp │ ├── vite.config.js │ ├── src │ │ └── InfiniteLoop.jsx │ ├── .gitignore │ └── index.html └── 1_reactjsbasics │ ├── vite.config.js │ ├── .gitignore │ ├── index.html │ └── src │ └── 1_basics.jsx ├── L40-ReactJS-Statemanagement ├── 3_redux │ ├── src │ │ ├── store │ │ │ └── store.js │ │ ├── reducer │ │ │ ├── reducers.js │ │ │ └── Counter.js │ │ ├── actions │ │ │ └── Counter.js │ │ └── main.jsx │ ├── vite.config.js │ ├── .gitignore │ └── index.html ├── 1_memo │ ├── vite.config.js │ ├── src │ │ ├── main.jsx │ │ └── App.jsx │ ├── .gitignore │ └── index.html └── 2_contextAPI │ ├── vite.config.js │ ├── src │ ├── Child.jsx │ └── main.jsx │ ├── .gitignore │ └── index.html ├── L13-Promises ├── 4_FunctionReturn.js ├── 3.1_PromiseChaining.js ├── 3.2_PromiseChaining.js ├── 2_PromiseBasics2.js ├── 3_PromiseChaining.js └── 5_PromisesNames.js └── L20-InterviewQuestions └── 1_Polyfill_MFR ├── FunctionInfiniteArguments.js ├── Functions.js ├── Bind.js └── Filter.js /L31-Typescript/script.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /L16-Class-DOM/2_DOM/script.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /L16-Class-DOM/3_DOM-2/script.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /L41-Redux/1_rtk/src/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /L43-Multer/client/src/App.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /L43-Multer/client/src/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /L18- TodoApp-NodeJs/1_TodoApp/Todos.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /L42-Project-Blog/client/src/App.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /L42-Project-Blog/client/src/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /L3-HTMLCSS/sample/src/features/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WebDev_LiveBatch-15Jan2025 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | data/ 3 | 4 | 5 | -------------------------------------------------------------------------------- /L32-Postgresql/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | /dist 3 | -------------------------------------------------------------------------------- /L41-Redux/fullStackApp/frontend/src/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /L19-JS-NODEJS/3_Todos.js/data/todos.json: -------------------------------------------------------------------------------- 1 | ["Hockey"] -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/4_todoApp/public/style.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /L22-ExpressJS/2_sendingfiles/script.js: -------------------------------------------------------------------------------- 1 | console.log("Hello World"); -------------------------------------------------------------------------------- /L12-AsyncProgramming/4_ExecutingAsyncTasksSequentially/randomfile.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/6_TodoApp/src/index.css: -------------------------------------------------------------------------------- 1 | /* @import "tailwindcss"; */ -------------------------------------------------------------------------------- /L9-MediaQueries-JS_Basics/2_JS-Basics/JS-Agenda.txt: -------------------------------------------------------------------------------- 1 | 1. Variables 2 | 2. DataTypes -------------------------------------------------------------------------------- /L22-ExpressJS/3_sendingStaticContent/public/script.js: -------------------------------------------------------------------------------- 1 | console.log("Hello How are you?"); -------------------------------------------------------------------------------- /L2-TerminalCommands/songs/hindisong.txt: -------------------------------------------------------------------------------- 1 | We are writing a song, and its name is despacito. 2 | -------------------------------------------------------------------------------- /L31-Typescript/tsconfig.tsbuildinfo: -------------------------------------------------------------------------------- 1 | {"root":["./script.ts"],"errors":true,"version":"5.8.3"} -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/.DS_Store -------------------------------------------------------------------------------- /L22-ExpressJS/2_sendingfiles/style.css: -------------------------------------------------------------------------------- 1 | p{ 2 | background-color: red; 3 | color: beige; 4 | } -------------------------------------------------------------------------------- /L12-AsyncProgramming/3_setInterval/script1.js: -------------------------------------------------------------------------------- 1 | setInterval((name)=>{ 2 | console.log(name); 3 | }, 1000, "devansh"); -------------------------------------------------------------------------------- /L17-DOM-API/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L17-DOM-API/.DS_Store -------------------------------------------------------------------------------- /L22-ExpressJS/3_sendingStaticContent/public/style.css: -------------------------------------------------------------------------------- 1 | p{ 2 | background-color: pink; 3 | color: darkblue; 4 | } -------------------------------------------------------------------------------- /L24-TodoApp/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L24-TodoApp/.DS_Store -------------------------------------------------------------------------------- /L32-Postgresql/src/user.ts: -------------------------------------------------------------------------------- 1 | export interface User { 2 | id: number; 3 | name: string; 4 | email: string; 5 | } 6 | -------------------------------------------------------------------------------- /L37-ReactJs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L37-ReactJs/.DS_Store -------------------------------------------------------------------------------- /L19-JS-NODEJS/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L19-JS-NODEJS/.DS_Store -------------------------------------------------------------------------------- /L21-ExpressJS/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L21-ExpressJS/.DS_Store -------------------------------------------------------------------------------- /L22-ExpressJS/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L22-ExpressJS/.DS_Store -------------------------------------------------------------------------------- /L30-TypeScript/dist/script.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | let x = "Hello world"; 3 | x = "Learning Strings"; 4 | console.log(x); 5 | -------------------------------------------------------------------------------- /L30-TypeScript/src/script.ts: -------------------------------------------------------------------------------- 1 | let x: string = "Hello world"; 2 | 3 | x = "Learning Strings"; 4 | 5 | console.log(x); 6 | -------------------------------------------------------------------------------- /L29-JWT-Sessions/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L29-JWT-Sessions/.DS_Store -------------------------------------------------------------------------------- /L44-Websockets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L44-Websockets/.DS_Store -------------------------------------------------------------------------------- /L4-CSS/2_CSS/1_resources-mdn.link.txt: -------------------------------------------------------------------------------- 1 | https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Styling_basics/What_is_CSS -------------------------------------------------------------------------------- /L2-TerminalCommands/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L2-TerminalCommands/.DS_Store -------------------------------------------------------------------------------- /L25-Databases-MongoDB/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L25-Databases-MongoDB/.DS_Store -------------------------------------------------------------------------------- /L33-Prisma/prisma/migrations/20250531152200_adding/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "User" ADD COLUMN "password" TEXT; 3 | -------------------------------------------------------------------------------- /L4-CSS/Lecture-4-Live Batch.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L4-CSS/Lecture-4-Live Batch.pdf -------------------------------------------------------------------------------- /L43-Multer/backend/.env: -------------------------------------------------------------------------------- 1 | CLOUD_NAME='du99v4tip' 2 | CLOUDINARY_API='556146194316937' 3 | CLOUDINARY_API_SECRET='WFNrAzrS-2DBqP556OWnjs0wNGs' -------------------------------------------------------------------------------- /L28-MongooseAndProject/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L28-MongooseAndProject/.DS_Store -------------------------------------------------------------------------------- /L32-Postgresql/tsconfig.tsbuildinfo: -------------------------------------------------------------------------------- 1 | {"root":["./src/crud.ts","./src/user.ts","./src/db/index.ts","./src/joins/innerjoin.ts"],"version":"5.8.3"} -------------------------------------------------------------------------------- /L5-CSS/3_Positions/1_Relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L5-CSS/3_Positions/1_Relative.png -------------------------------------------------------------------------------- /L26-TodoComplete-Mongoose/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L26-TodoComplete-Mongoose/.DS_Store -------------------------------------------------------------------------------- /L29-JWT-Sessions/2_cookies/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L29-JWT-Sessions/2_cookies/.DS_Store -------------------------------------------------------------------------------- /L42-Project-Blog/backend/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | # Keep environment variables out of version control 3 | .env 4 | 5 | /generated/prisma 6 | -------------------------------------------------------------------------------- /L22-ExpressJS/2_sendingfiles/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L22-ExpressJS/2_sendingfiles/.DS_Store -------------------------------------------------------------------------------- /L22-ExpressJS/4_middlewares/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L22-ExpressJS/4_middlewares/.DS_Store -------------------------------------------------------------------------------- /L3-HTMLCSS/4_tableTag/reference_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L3-HTMLCSS/4_tableTag/reference_1.png -------------------------------------------------------------------------------- /L3-HTMLCSS/4_tableTag/reference_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L3-HTMLCSS/4_tableTag/reference_2.png -------------------------------------------------------------------------------- /L44-Websockets/server/.env: -------------------------------------------------------------------------------- 1 | MONGODB_URL='mongodb+srv://kartik:@cluster0.97kax2o.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0' -------------------------------------------------------------------------------- /L11-Closure-Scopes-AsyncProgramming/4_letVsVar/2_Scopes/4_Question.js: -------------------------------------------------------------------------------- 1 | { 2 | var x = 10; 3 | console.log(x); // 10 4 | } 5 | 6 | console.log(x); // 10 -------------------------------------------------------------------------------- /L30-TypeScript/dist/types_ts/3_typeUnionExample.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | let kid = { 3 | name: "Shahnawaz", 4 | age: 20, 5 | }; 6 | console.log(kid); 7 | -------------------------------------------------------------------------------- /L33-Prisma/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | # Keep environment variables out of version control 3 | .env 4 | 5 | /generated/prisma 6 | 7 | /generated/prisma 8 | -------------------------------------------------------------------------------- /L4-CSS/LP01 - Introduction To WebDev.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L4-CSS/LP01 - Introduction To WebDev.pdf -------------------------------------------------------------------------------- /L5-CSS/3_Positions/3_Absolute-Advanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L5-CSS/3_Positions/3_Absolute-Advanced.png -------------------------------------------------------------------------------- /L22-ExpressJS/3_sendingStaticContent/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L22-ExpressJS/3_sendingStaticContent/.DS_Store -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/4_todoApp/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L23-FileDependency-TodoApp/4_todoApp/.DS_Store -------------------------------------------------------------------------------- /L26-TodoComplete-Mongoose/2_mongoose/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L26-TodoComplete-Mongoose/2_mongoose/.DS_Store -------------------------------------------------------------------------------- /L28-MongooseAndProject/3_Bcrypt-Salt/routers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L28-MongooseAndProject/3_Bcrypt-Salt/routers.png -------------------------------------------------------------------------------- /L13-Promises-Prototypes/3_Prototypes/2_cppClasses: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L13-Promises-Prototypes/3_Prototypes/2_cppClasses -------------------------------------------------------------------------------- /L22-ExpressJS/4_middlewares/Lecture-15-HTTP (1).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L22-ExpressJS/4_middlewares/Lecture-15-HTTP (1).pdf -------------------------------------------------------------------------------- /L26-TodoComplete-Mongoose/1_todoComplete/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L26-TodoComplete-Mongoose/1_todoComplete/.DS_Store -------------------------------------------------------------------------------- /L27-MongoDB-DeepFive/Lecture-18_19-Mongoose (1).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L27-MongoDB-DeepFive/Lecture-18_19-Mongoose (1).pdf -------------------------------------------------------------------------------- /L28-MongooseAndProject/1_ProjectStructure/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L28-MongooseAndProject/1_ProjectStructure/.DS_Store -------------------------------------------------------------------------------- /L28-MongooseAndProject/2_AdvancedMongoose/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L28-MongooseAndProject/2_AdvancedMongoose/.DS_Store -------------------------------------------------------------------------------- /L1-GettingStarted/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hello world 5 | 6 | 7 | 8 | Hello world!!!!!!! 9 | 10 | 11 | -------------------------------------------------------------------------------- /L28-MongooseAndProject/3_Bcrypt-Salt/salt-concept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L28-MongooseAndProject/3_Bcrypt-Salt/salt-concept.png -------------------------------------------------------------------------------- /L7-Flexbox-Grid-MediumClone/2_GridLayouts/FrUnit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L7-Flexbox-Grid-MediumClone/2_GridLayouts/FrUnit.png -------------------------------------------------------------------------------- /L15-Bindings-Classes/2_classSyntax/1_BasicsStructure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L15-Bindings-Classes/2_classSyntax/1_BasicsStructure.png -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/2_FileDependency/working.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L23-FileDependency-TodoApp/2_FileDependency/working.png -------------------------------------------------------------------------------- /L26-TodoComplete-Mongoose/3_mongooseTodo-Users/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L26-TodoComplete-Mongoose/3_mongooseTodo-Users/.DS_Store -------------------------------------------------------------------------------- /L33-Prisma/prisma/migrations/migration_lock.toml: -------------------------------------------------------------------------------- 1 | # Please do not edit this file manually 2 | # It should be added in your version-control system (e.g., Git) 3 | provider = "postgresql" 4 | -------------------------------------------------------------------------------- /L7-Flexbox-Grid-MediumClone/2_GridLayouts/FlexVSGrid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L7-Flexbox-Grid-MediumClone/2_GridLayouts/FlexVSGrid.png -------------------------------------------------------------------------------- /L28-MongooseAndProject/3_Bcrypt-Salt/reference-concept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L28-MongooseAndProject/3_Bcrypt-Salt/reference-concept.png -------------------------------------------------------------------------------- /L30-TypeScript/dist/types_ts/2_typeUnion.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | let teacher; 3 | teacher = "Monu"; 4 | console.log(teacher); 5 | let myUser; 6 | myUser = "Arnab"; 7 | console.log(myUser); 8 | -------------------------------------------------------------------------------- /L43-Multer/backend/uploads/img-1753459525015-808439992.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L43-Multer/backend/uploads/img-1753459525015-808439992.jpg -------------------------------------------------------------------------------- /L6-CSS-Flexboxes-Grids-Positions/Lecture-6-Live Batch.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L6-CSS-Flexboxes-Grids-Positions/Lecture-6-Live Batch.pdf -------------------------------------------------------------------------------- /L9-MediaQueries-JS_Basics/1_MediaQueries/WhyMediaQueries.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L9-MediaQueries-JS_Basics/1_MediaQueries/WhyMediaQueries.png -------------------------------------------------------------------------------- /L13-Promises-Prototypes/3_Prototypes/4_StructureOfPrototype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L13-Promises-Prototypes/3_Prototypes/4_StructureOfPrototype.png -------------------------------------------------------------------------------- /L34-ReactJS/4_reactjsbasics/src/App.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const App = () => { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | 11 | export default App -------------------------------------------------------------------------------- /L42-Project-Blog/backend/prisma/migrations/migration_lock.toml: -------------------------------------------------------------------------------- 1 | # Please do not edit this file manually 2 | # It should be added in your version-control system (e.g., Git) 3 | provider = "postgresql" 4 | -------------------------------------------------------------------------------- /L7-Flexbox-Grid-MediumClone/2_GridLayouts/Grid-Initial-Task.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L7-Flexbox-Grid-MediumClone/2_GridLayouts/Grid-Initial-Task.png -------------------------------------------------------------------------------- /L12-AsyncProgramming/2_AsyncTask/script.js: -------------------------------------------------------------------------------- 1 | console.log("Hello"); 2 | 3 | // Async wait 4 | setTimeout(function(){ 5 | console.log("5 seconds poore ho gaye") 6 | }, 5000); 7 | 8 | console.log("World"); -------------------------------------------------------------------------------- /L29-JWT-Sessions/2_cookies/Lecture-22-Cookies-Sessions-JWT-HBS.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L29-JWT-Sessions/2_cookies/Lecture-22-Cookies-Sessions-JWT-HBS.pdf -------------------------------------------------------------------------------- /L42-Project-Blog/backend/prisma/migrations/20250731161040_adding_imageurl_posts/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Post" ADD COLUMN "imagePublicId" TEXT, 3 | ADD COLUMN "imageUrl" TEXT; 4 | -------------------------------------------------------------------------------- /L7-Flexbox-Grid-MediumClone/3_GridTemplateAreas/areasMapping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L7-Flexbox-Grid-MediumClone/3_GridTemplateAreas/areasMapping.png -------------------------------------------------------------------------------- /L8-MediumClone/1_MediumClone-Part-2/2_UserInfoNavbar/Structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L8-MediumClone/1_MediumClone-Part-2/2_UserInfoNavbar/Structure.png -------------------------------------------------------------------------------- /L13-Promises-Prototypes/3_Prototypes/5_StructureWithConstructor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L13-Promises-Prototypes/3_Prototypes/5_StructureWithConstructor.png -------------------------------------------------------------------------------- /L22-ExpressJS/4_middlewares/Screenshot 2025-04-07 at 10.05.13 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L22-ExpressJS/4_middlewares/Screenshot 2025-04-07 at 10.05.13 PM.png -------------------------------------------------------------------------------- /L41-Redux/fullStackApp/frontend/src/utils/axios.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | const axiosInterface = axios.create({ 4 | baseURL: 'http://localhost:4444' 5 | }); 6 | 7 | export default axiosInterface; -------------------------------------------------------------------------------- /L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/10_ClosureKiNeed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/10_ClosureKiNeed.png -------------------------------------------------------------------------------- /L15-Bindings-Classes/2_classSyntax/3_DefaultFunctionsAndPrototypes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L15-Bindings-Classes/2_classSyntax/3_DefaultFunctionsAndPrototypes.png -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/1_basics/makingObjectShorthand.txt: -------------------------------------------------------------------------------- 1 | > let a = 1; 2 | undefined 3 | > let obj = {a} 4 | undefined 5 | > obj 6 | { a: 1 } 7 | > let obj1 = {"a":a} 8 | undefined 9 | > obj1 10 | { a: 1 } -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/2_FileDependency/script.js: -------------------------------------------------------------------------------- 1 | const murgiBirth = require('./murgiBirth'); 2 | const andaBirth = require('./andaBirth'); 3 | 4 | console.log(murgiBirth); 5 | console.log(andaBirth); 6 | 7 | -------------------------------------------------------------------------------- /L30-TypeScript/dist/types_ts/4_typeIntersectionExample.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | let kid1 = { 3 | name: "Shahnawaz", 4 | age: 20, 5 | marks: 90, 6 | class: "10th Class", 7 | }; 8 | console.log(kid1); 9 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/3_reactrouters/src/index.css: -------------------------------------------------------------------------------- 1 | .active { 2 | text-decoration: underline !important; 3 | color: blue !important; 4 | } 5 | 6 | .navlink{ 7 | color: black; 8 | text-decoration: none; 9 | } -------------------------------------------------------------------------------- /L41-Redux/fullStackApp/frontend/Screenshot 2025-07-15 at 9.58.55 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L41-Redux/fullStackApp/frontend/Screenshot 2025-07-15 at 9.58.55 PM.png -------------------------------------------------------------------------------- /L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/11_ClosureKaConcept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/11_ClosureKaConcept.png -------------------------------------------------------------------------------- /L12-AsyncProgramming/4_ExecutingAsyncTasksSequentially/1_Callbacks/argumentAndParameterConcept.js: -------------------------------------------------------------------------------- 1 | function sum(a, b) { // a, b are parameters 2 | console.log(a + b); 3 | } 4 | 5 | sum(10, 20); // 10, 20 are arguments -------------------------------------------------------------------------------- /L13-Promises-Prototypes/3_Prototypes/9_UsingFunctionsToCreateObjects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L13-Promises-Prototypes/3_Prototypes/9_UsingFunctionsToCreateObjects.png -------------------------------------------------------------------------------- /L16-Class-DOM/script.js: -------------------------------------------------------------------------------- 1 | console.log(process.argv) 2 | let inp1 = process.argv[2]; 3 | let inp2 = process.argv[3]; 4 | let inp3 = process.argv[4]; 5 | 6 | console.log(inp1) 7 | console.log(inp2) 8 | console.log(inp3) 9 | -------------------------------------------------------------------------------- /L3-HTMLCSS/sample/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L36-ReactJS/4_task/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L41-Redux/1_rtk/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L43-Multer/client/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L13-Promises-Prototypes/3_Prototypes/8_InternalStructureWithOurFunctions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L13-Promises-Prototypes/3_Prototypes/8_InternalStructureWithOurFunctions.png -------------------------------------------------------------------------------- /L28-MongooseAndProject/3_Bcrypt-Salt/readme.md: -------------------------------------------------------------------------------- 1 | Users 2 | - GET request to fetch a user 3 | - Post request to create a user 4 | - Put request to update a user 5 | 6 | Todos/Songs/Articles 7 | - CRUD on Todos 8 | -------------------------------------------------------------------------------- /L35-ReactJS/2_todoApp/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L36-ReactJS/1_components/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L37-ReactJs/2_useEffect/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/3_redux/src/store/store.js: -------------------------------------------------------------------------------- 1 | import { createStore } from "redux"; 2 | import rootReducers from "../reducer/reducers.js"; 3 | 4 | const store = createStore(rootReducers); 5 | 6 | export default store; -------------------------------------------------------------------------------- /L42-Project-Blog/client/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L44-Websockets/client/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L8-MediumClone/1_MediumClone-Part-2/3_mainBlogsHeaderCSS/blogs-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L8-MediumClone/1_MediumClone-Part-2/3_mainBlogsHeaderCSS/blogs-structure.png -------------------------------------------------------------------------------- /L11-Closure-Scopes-AsyncProgramming/4_letVsVar/2_Scopes/2_var-Scope.js: -------------------------------------------------------------------------------- 1 | function solve() { 2 | var x = "Hello world"; 3 | 4 | console.log(x); 5 | } 6 | 7 | solve(); 8 | 9 | console.log(x); // ReferenceError: x is not defined -------------------------------------------------------------------------------- /L17-DOM-API/random.js: -------------------------------------------------------------------------------- 1 | fetch(url) 2 | .then(res => res.json()) 3 | .then(data => { 4 | console.log(data); 5 | }).catch(errorMessage => { 6 | console.log(errorMessage); 7 | }) 8 | 9 | 10 | -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/2_FileDependency/andaBirth.js: -------------------------------------------------------------------------------- 1 | const murgi = require('./murgiBirth'); 2 | 3 | let andaBirthPlace = 'Africa'; 4 | 5 | module.exports = { 6 | anda: 'I am anda', 7 | andaBirthPlace, 8 | murgi 9 | } -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/3_FileDependency-CircularDependency/StoringReferences.txt: -------------------------------------------------------------------------------- 1 | let obj = {a:1} 2 | undefined 3 | let obj1 = obj 4 | undefined 5 | obj == obj1 6 | true 7 | obj1.a = 100; 8 | 100 9 | obj 10 | {a: 100} -------------------------------------------------------------------------------- /L34-ReactJS/4_reactjsbasics/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L35-ReactJS/1_reactjsbasics/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L36-ReactJS/2_customhooks/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L36-ReactJS/3_MycustomTodos/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L37-ReactJs/1_rerendering/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/5_lazyLoading/src/index.css: -------------------------------------------------------------------------------- 1 | .active { 2 | text-decoration: underline !important; 3 | color: blue !important; 4 | } 5 | 6 | .navlink { 7 | color: black; 8 | text-decoration: none; 9 | } 10 | -------------------------------------------------------------------------------- /L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/13_RemovingConfusionWorking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/13_RemovingConfusionWorking.png -------------------------------------------------------------------------------- /L11-Closure-Scopes-AsyncProgramming/4_letVsVar/2_Scopes/5_Question.js: -------------------------------------------------------------------------------- 1 | var x = "Hello World"; 2 | 3 | function solve() { 4 | 5 | var x = "Mera World"; 6 | console.log(x); 7 | } 8 | 9 | solve(); 10 | 11 | console.log(x); -------------------------------------------------------------------------------- /L39-Routers-Hooks/3_reactrouters/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/4_nestedRoutes/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/5_lazyLoading/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/1_memo/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L41-Redux/fullStackApp/frontend/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/8_HigherOrderFunction-DryRun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/8_HigherOrderFunction-DryRun.png -------------------------------------------------------------------------------- /L19-JS-NODEJS/1_ArrayFunctions/forEach.js: -------------------------------------------------------------------------------- 1 | let arr = [11, 12, 13, 14, 15]; 2 | 3 | arr.forEach((data, index, a) => { 4 | console.log(data, index, a) 5 | }) 6 | 7 | arr.forEach((data) => { 8 | console.log(data) 9 | }) 10 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/1_anchortag-issues/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/2_anchortag-correct/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/3_redux/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/9_HigherOrderFunctions2-DRYRUN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/9_HigherOrderFunctions2-DRYRUN.png -------------------------------------------------------------------------------- /L39-Routers-Hooks/1_anchortag-issues/src/components/Home.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Home = () => { 4 | return ( 5 |
6 |

Home page

7 |
8 | ) 9 | } 10 | 11 | export default Home 12 | -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/2_contextAPI/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/3_FileDependency-CircularDependency/ValuesAreSame.txt: -------------------------------------------------------------------------------- 1 | let obj = {a:1} 2 | undefined 3 | let obj1 = {a:1} 4 | undefined 5 | obj === obj1 6 | false 7 | obj.a = 100; 8 | 100 9 | obj 10 | {a: 100} 11 | obj1 12 | {a: 1} -------------------------------------------------------------------------------- /L39-Routers-Hooks/1_anchortag-issues/src/components/About.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const About = () => { 4 | return ( 5 |
6 |

About Us

7 |
8 | ) 9 | } 10 | 11 | export default About 12 | -------------------------------------------------------------------------------- /L4-CSS/2_CSS/style.css: -------------------------------------------------------------------------------- 1 | .myDiv { 2 | /* For class we use dot operator */ 3 | color: orange; 4 | background-color: black; 5 | } 6 | 7 | /* For ids we use # */ 8 | #boy { 9 | color: blue; 10 | background-color: bisque; 11 | } -------------------------------------------------------------------------------- /L10-JS-Arrays-Objects-Loops-Functions/2_HomeWork-Closure/13_ClosureAssignment-Homework.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L10-JS-Arrays-Objects-Loops-Functions/2_HomeWork-Closure/13_ClosureAssignment-Homework.pdf -------------------------------------------------------------------------------- /L13-Promises-Prototypes/3_Prototypes/6_CreatingObjectFromObjects.js: -------------------------------------------------------------------------------- 1 | let Obj = { 2 | a: 1, 3 | description: "I am parent Object" 4 | } 5 | 6 | let newObj = Object.create(Obj); // newObj ka parent will be Obj 7 | console.log(newObj.__proto__ == Obj); -------------------------------------------------------------------------------- /L39-Routers-Hooks/1_anchortag-issues/src/components/Contact.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Contact = () => { 4 | return ( 5 |
6 |

Contact Us

7 |
8 | ) 9 | } 10 | 11 | export default Contact 12 | -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/2_FileDependency/murgiBirth.js: -------------------------------------------------------------------------------- 1 | const anda = require('./andaBirth'); 2 | 3 | let murgiBirthPlace = 'Punjab'; 4 | 5 | module.exports = { 6 | murgiName: 'Lalitha', 7 | murgiBirthPlace, 8 | anda 9 | } 10 | 11 | 12 | -------------------------------------------------------------------------------- /L3-HTMLCSS/1_HTMLTags/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | First Page 7 | 8 | 9 | 10 |

11 | Hello World! 12 |

13 | 14 | 15 | -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/3_redux/src/reducer/reducers.js: -------------------------------------------------------------------------------- 1 | import { counterReducer } from "./Counter"; 2 | import { combineReducers } from 'redux'; 3 | 4 | const rootReducers = combineReducers({ 5 | counterReducer 6 | }) 7 | 8 | export default rootReducers; -------------------------------------------------------------------------------- /L15-Bindings-Classes/1_Bindings/2_defaultBinding.js: -------------------------------------------------------------------------------- 1 | // console.log(this); // global(nodejs) == window(Browser) 2 | // console.log(global); // by default this is global 3 | function hello() { 4 | console.log("Inside function", this); 5 | } 6 | 7 | hello(); 8 | -------------------------------------------------------------------------------- /L19-JS-NODEJS/1_ArrayFunctions/map.js: -------------------------------------------------------------------------------- 1 | let arr = [11, 12, 13, 14, 15]; 2 | 3 | // map se original size change nhi hota 4 | let newArr = arr.map((data, index, a) => { 5 | // console.log(data, index, a); 6 | return data * data 7 | }) 8 | 9 | console.log(newArr) -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/4_todoApp/public/script.js: -------------------------------------------------------------------------------- 1 | fetch('/todos') 2 | .then(res => res.json()) 3 | .then(data => { 4 | console.log(data); 5 | let taskList = document.querySelector('.taskList'); 6 | console.log(taskList) 7 | }) -------------------------------------------------------------------------------- /L36-ReactJS/1_components/src/components/TodoDisplay.jsx: -------------------------------------------------------------------------------- 1 | export default function TodoDisplay({todos}){ 2 | return ( 3 | 8 | ); 9 | } -------------------------------------------------------------------------------- /L8-MediumClone/1_MediumClone-Part-2/3_mainBlogsHeaderCSS/active-psuedoelement-css-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L8-MediumClone/1_MediumClone-Part-2/3_mainBlogsHeaderCSS/active-psuedoelement-css-structure.png -------------------------------------------------------------------------------- /L13-Promises/4_FunctionReturn.js: -------------------------------------------------------------------------------- 1 | function hello() { 2 | 3 | console.log("Hello"); 4 | 5 | return 6 | } 7 | 8 | hello()(); // hello() function return karega, and we can call it again 9 | 10 | // Another way of doing this 11 | let f = hello(); 12 | f(); -------------------------------------------------------------------------------- /L19-JS-NODEJS/2_NodeJS/3_Create-Sync.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | 3 | const path = require('path'); 4 | let fileName = path.join(__dirname, 'song.txt'); 5 | 6 | fs.writeFileSync(fileName, 'Mera Sync data'); 7 | 8 | console.log("I am another simple print statement"); -------------------------------------------------------------------------------- /L30-TypeScript/dist/types_ts/1_types.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function generateUser(name, age) { 3 | return { 4 | name, 5 | age, 6 | address: "Delhi", 7 | }; 8 | } 9 | let user1 = generateUser("Aman", 24); 10 | console.log(user1); 11 | -------------------------------------------------------------------------------- /L41-Redux/fullStackApp/frontend/src/App.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Todos from "./components/Todos"; 3 | 4 | const App = () => { 5 | return ( 6 |
7 | 8 |
9 | ); 10 | }; 11 | 12 | export default App; 13 | -------------------------------------------------------------------------------- /L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/10_Closure.js: -------------------------------------------------------------------------------- 1 | function genFun() { 2 | let a = 10, b = 20; 3 | 4 | function add() { 5 | return a + b; 6 | } 7 | 8 | return add; 9 | } 10 | 11 | let fun = genFun(); 12 | fun(); 13 | 14 | -------------------------------------------------------------------------------- /L11-Closure-Scopes-AsyncProgramming/4_letVsVar/1_Hoisting/afterHoisting.js: -------------------------------------------------------------------------------- 1 | var x; 2 | 3 | function helloWorld() { 4 | console.log("hello world!"); 5 | } 6 | 7 | console.log(x); 8 | 9 | x = 10; 10 | 11 | console.log(x); 12 | 13 | helloWorld(); 14 | helloWorld(); -------------------------------------------------------------------------------- /L11-Closure-Scopes-AsyncProgramming/4_letVsVar/1_Hoisting/script.js: -------------------------------------------------------------------------------- 1 | console.log(x); 2 | 3 | var x = 10; 4 | 5 | console.log(x); 6 | 7 | helloWorld(); 8 | 9 | function helloWorld(){ 10 | console.log("hello world!"); 11 | } 12 | 13 | helloWorld(); 14 | 15 | -------------------------------------------------------------------------------- /L19-JS-NODEJS/2_NodeJS/7_Delete-Callback.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const path = require('path'); 3 | 4 | let fileName = path.join(__dirname, 'song.txt'); 5 | 6 | fs.unlink(fileName, (err) => { 7 | if (err) throw err; 8 | console.log('Deleted the file'); 9 | }); -------------------------------------------------------------------------------- /L43-Multer/backend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "cloudinary": "^2.7.0", 4 | "cors": "^2.8.5", 5 | "dotenv": "^17.2.1", 6 | "express": "^5.1.0", 7 | "multer": "^2.0.2", 8 | "multer-storage-cloudinary": "^4.0.0" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/3_FileDependency-CircularDependency/Screenshot 2025-04-09 at 8.13.45 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L23-FileDependency-TodoApp/3_FileDependency-CircularDependency/Screenshot 2025-04-09 at 8.13.45 PM.png -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/3_FileDependency-CircularDependency/Screenshot 2025-04-09 at 8.14.57 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L23-FileDependency-TodoApp/3_FileDependency-CircularDependency/Screenshot 2025-04-09 at 8.14.57 PM.png -------------------------------------------------------------------------------- /L30-TypeScript/dist/interfaces/2_interfaces.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | ; 3 | function createUser(name, age) { 4 | return { 5 | name, 6 | age, 7 | address: "Delhi", 8 | }; 9 | } 10 | let user = createUser("Aman", 24); 11 | console.log(user); 12 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/4_nestedRoutes/src/components/Centers.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const Centers = () => { 4 | return ( 5 |
6 |
  • Pitampura
  • 7 |
  • Noida
  • 8 |
    9 | ); 10 | }; 11 | 12 | export default Centers; 13 | -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/3_FileDependency-CircularDependency/murgiBirth.js: -------------------------------------------------------------------------------- 1 | const anda = require('./andaBirth'); 2 | 3 | let murgiBirthPlace = 'Punjab'; 4 | 5 | module.exports.murgiBirthPlace = murgiBirthPlace 6 | module.exports.murgiName = 'Lalitha' 7 | module.exports.anda = anda; -------------------------------------------------------------------------------- /L35-ReactJS/2_todoApp/src/InfiniteLoop.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | 3 | const InfiniteLoop = () => { 4 | const [cnt, setCnt] = useState(0); 5 | 6 | setCnt(cnt + 1); 7 | 8 | return
    {cnt}
    ; 9 | }; 10 | 11 | export default InfiniteLoop; 12 | -------------------------------------------------------------------------------- /L12-AsyncProgramming/2_AsyncTask/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 |

    Hello Learning ASync Tasks

    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L13-Promises-Prototypes/1_Promises/2_sort.js: -------------------------------------------------------------------------------- 1 | let arr = [1, 10, 0, 2, 4, 23]; 2 | 3 | // Strings sort krega 4 | arr.sort(); 5 | console.log(arr); 6 | 7 | // Numberical values maani jaengi arrays ki 8 | arr.sort((a, b) => { 9 | return b - a 10 | }) 11 | 12 | console.log(arr); -------------------------------------------------------------------------------- /L19-JS-NODEJS/1_ArrayFunctions/filter.js: -------------------------------------------------------------------------------- 1 | let arr = [11, 12, 13, 14, 15]; 2 | 3 | // filter se original size change ho sakta hai 4 | let newArr = arr.filter((data, index, a) => { 5 | if (data % 2 == 0) return false; 6 | 7 | return true; 8 | }) 9 | 10 | console.log(newArr) -------------------------------------------------------------------------------- /L8-MediumClone/1_MediumClone-Part-2/4_MainBlogs-RecommendedBlogs-Structure/ReactionsExcalidraw-Structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kartik-Mathur/WebDev_LiveBatch-15Jan2025/HEAD/L8-MediumClone/1_MediumClone-Part-2/4_MainBlogs-RecommendedBlogs-Structure/ReactionsExcalidraw-Structure.png -------------------------------------------------------------------------------- /L16-Class-DOM/4_DOM-Task/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/1_anchortag-issues/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react' 2 | import { createRoot } from 'react-dom/client' 3 | import App from './App.jsx' 4 | 5 | createRoot(document.getElementById('root')).render( 6 | 7 | 8 | , 9 | ) 10 | -------------------------------------------------------------------------------- /L4-CSS/2_CSS/2_inline.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Inline CSS 5 | 6 | 7 | 8 | 9 |
    Dog Says Bhau Bhau...
    10 | 11 | 12 | -------------------------------------------------------------------------------- /L44-Websockets/client/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | // import './index.css' 4 | import App from "./App.jsx"; 5 | 6 | createRoot(document.getElementById("root")).render( 7 | <> 8 | 9 | 10 | ); 11 | -------------------------------------------------------------------------------- /L12-AsyncProgramming/ResourcesToRead.txt: -------------------------------------------------------------------------------- 1 | Callbacks: https://kbpsystem777.github.io/You-Dont-Know-JS/async&performance/ch2.html 2 | EloquentJS: https://eloquentjavascript.net/11_async.html 3 | 4 | Link: https://kbpsystem777.github.io/You-Dont-Know-JS/ 5 | Eloquent JS: https://eloquentjavascript.net/ 6 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/2_anchortag-correct/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react' 2 | import { createRoot } from 'react-dom/client' 3 | import App from './App.jsx' 4 | 5 | createRoot(document.getElementById('root')).render( 6 | 7 | 8 | , 9 | ) 10 | -------------------------------------------------------------------------------- /L9-MediaQueries-JS_Basics/2_JS-Basics/1_Variables.js: -------------------------------------------------------------------------------- 1 | var a = 10 2 | console.log(a); 3 | 4 | a = "hello world!" 5 | console.log(a) 6 | 7 | for (var i = 1; i <= 4; i++) { 8 | console.log(i) 9 | } 10 | 11 | i = 1; 12 | while (i <= 3) { 13 | 14 | console.log(i); 15 | 16 | i++; 17 | } -------------------------------------------------------------------------------- /L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/13_RemovingConfusionOf10_ClosureAdd.js: -------------------------------------------------------------------------------- 1 | function genFun() { 2 | let a = 10, b = 20; 3 | 4 | function randomFun() { 5 | return a + b; 6 | } 7 | 8 | return randomFun; 9 | } 10 | 11 | let fun = genFun(); 12 | fun(); 13 | 14 | -------------------------------------------------------------------------------- /L19-JS-NODEJS/2_NodeJS/6_Read-Sync.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const path = require('path'); 3 | 4 | let fileName = path.join(__dirname, 'song.txt'); 5 | 6 | const data = fs.readFileSync(fileName, { 7 | encoding: 'utf-8' 8 | }); 9 | console.log(data); 10 | console.log("I am print statement"); -------------------------------------------------------------------------------- /L43-Multer/client/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react' 2 | import { createRoot } from 'react-dom/client' 3 | import './index.css' 4 | import App from './App.jsx' 5 | 6 | createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /L11-Closure-Scopes-AsyncProgramming/4_letVsVar/2_Scopes/3_Questions.js: -------------------------------------------------------------------------------- 1 | var x = -10; 2 | 3 | function hello() { 4 | var x; 5 | 6 | console.log(x); // undefined 7 | 8 | x = "Hello World"; 9 | 10 | console.log(x); // Hello World 11 | } 12 | 13 | hello(); 14 | 15 | console.log(x); // -10 -------------------------------------------------------------------------------- /L17-DOM-API/3_Api/0_WhatisJSON.js: -------------------------------------------------------------------------------- 1 | let person = { 2 | name: 'Coding blocks', 3 | age: 10, 4 | description: 'Best place to learn coding', 5 | courses: ['CPP','Java'] 6 | } 7 | 8 | console.log(JSON.stringify(person)); 9 | let data = JSON.stringify(person); 10 | console.log(JSON.parse(data)); -------------------------------------------------------------------------------- /L3-HTMLCSS/sample/src/App.jsx: -------------------------------------------------------------------------------- 1 | import { configureStore } from "@reduxjs/toolkit"; 2 | import React from "react"; 3 | import Counter from "./components/Counter.jsx"; 4 | 5 | const App = () => { 6 | return ( 7 |
    8 | 9 |
    10 | ); 11 | }; 12 | 13 | export default App; 14 | -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/2_contextAPI/src/Child.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import GrandChild from './GrandChild' 3 | 4 | const Child = () => { 5 | console.log("Running Child"); 6 | return ( 7 |
    8 | 9 |
    10 | ) 11 | } 12 | 13 | export default Child 14 | -------------------------------------------------------------------------------- /L6-CSS-Flexboxes-Grids-Positions/1_Revision/style.css: -------------------------------------------------------------------------------- 1 | div{ 2 | /* background-color: orange; */ 3 | height: 40px; 4 | margin: 10px; 5 | position: sticky; 6 | top: 0; 7 | } 8 | 9 | .odd { 10 | background-color: orange; 11 | } 12 | 13 | .even { 14 | background-color: lightcoral; 15 | } -------------------------------------------------------------------------------- /L15-Bindings-Classes/1_Bindings/6_BindingQuestion.js: -------------------------------------------------------------------------------- 1 | function hello() { 2 | console.log(this); 3 | 4 | function innerFun() { 5 | console.log("Inner fun", this); 6 | } 7 | 8 | innerFun(); 9 | } 10 | 11 | let obj = { a: 1 }; 12 | hello.call(obj); 13 | 14 | // {a: 1} 15 | // Inner fun global -------------------------------------------------------------------------------- /L15-Bindings-Classes/1_Bindings/7_BindingQuestion2.js: -------------------------------------------------------------------------------- 1 | function hello() { 2 | console.log(this); 3 | 4 | function innerFun() { 5 | console.log("Inner fun", this); 6 | } 7 | 8 | innerFun(); 9 | } 10 | 11 | let obj = { a: 1 }; 12 | hello.call(obj); 13 | 14 | // {a: 1} 15 | // Inner fun global -------------------------------------------------------------------------------- /L17-DOM-API/1_DOM_Events/2_keyboardEvents.js: -------------------------------------------------------------------------------- 1 | let input = document.querySelector('#input'); 2 | let showKeys = document.querySelector('.showKeys'); 3 | 4 | input.addEventListener('keypress', (event) => { 5 | // console.log('Key pressed'); 6 | console.log(event.key) 7 | showKeys.innerText += event.key; 8 | }) 9 | -------------------------------------------------------------------------------- /L37-ReactJs/1_rerendering/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode, useState } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | import RenderFix2 from "./RenderFix2"; 4 | 5 | 6 | createRoot(document.getElementById("root")).render( 7 | 8 | 9 | 10 | ); 11 | -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/3_redux/src/actions/Counter.js: -------------------------------------------------------------------------------- 1 | export function increment() { 2 | return { type: 'counter/increment' } 3 | } 4 | 5 | export function decrement() { 6 | return { type: 'counter/decrement' } 7 | } 8 | 9 | 10 | export function reset() { 11 | return { type: 'counter/reset' }; 12 | } -------------------------------------------------------------------------------- /L41-Redux/fullStackApp/frontend/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react' 2 | import { createRoot } from 'react-dom/client' 3 | import './index.css' 4 | import App from './App.jsx' 5 | 6 | createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /L20-InterviewQuestions/1_Polyfill_MFR/FunctionInfiniteArguments.js: -------------------------------------------------------------------------------- 1 | function sum(...args) { 2 | return args.reduce((acc, v) => acc + v); 3 | } 4 | 5 | console.log(sum(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) 6 | 7 | 8 | let arr = [1,2]; 9 | let arr1= [3,4]; 10 | 11 | let newArr = [...arr, ...arr1]; 12 | console.log(newArr); -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/3_FileDependency-CircularDependency/script.js: -------------------------------------------------------------------------------- 1 | const murgiBirth = require('./murgiBirth'); 2 | const andaBirth = require('./andaBirth'); 3 | 4 | console.log(murgiBirth); 5 | // console.log(murgiBirth.anda.murgi); 6 | // console.log(murgiBirth.anda.murgi.anda.murgi); 7 | console.log(andaBirth); 8 | 9 | -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/1_memo/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react' 2 | import { createRoot } from 'react-dom/client' 3 | // import './index.css' 4 | import App from './App.jsx' 5 | 6 | createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /L41-Redux/1_rtk/src/App.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Counter from "./components/Counter"; 3 | import Todos from "./components/Todos"; 4 | 5 | const App = () => { 6 | return ( 7 |
    8 | {/* */} 9 | 10 |
    11 | ); 12 | }; 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/6_TodoApp/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | // import tailwindcss from '@tailwindcss/vite' 4 | 5 | // https://vite.dev/config/ 6 | export default defineConfig({ 7 | plugins: [ 8 | react(), 9 | // tailwindcss(), 10 | ], 11 | }) 12 | -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/2_contextAPI/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react' 2 | import { createRoot } from 'react-dom/client' 3 | // import './index.css' 4 | import App from './App.jsx' 5 | 6 | createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /L42-Project-Blog/backend/routes/tags.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const router = express.Router(); 3 | const { getTags, postTags, deleteTags } = require("../controllers/tagController"); 4 | 5 | router.get("/", getTags); 6 | router.post("/", postTags); 7 | router.delete("/:id", deleteTags); 8 | 9 | module.exports = router; -------------------------------------------------------------------------------- /L44-Websockets/server/models/messages.model.js: -------------------------------------------------------------------------------- 1 | import mongoose from 'mongoose'; 2 | const { Schema } = mongoose; 3 | 4 | const messageSchema = new Schema({ 5 | message: String, 6 | room: String, 7 | date: { type: Date, default: Date.now }, 8 | }); 9 | 10 | export default mongoose.model('Messages', messageSchema); -------------------------------------------------------------------------------- /L12-AsyncProgramming/3_setInterval/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/5_Functions.js: -------------------------------------------------------------------------------- 1 | function helloWorld() { 2 | console.log("hello world"); 3 | } 4 | 5 | helloWorld(); 6 | 7 | function sum(a, b) { 8 | return a + b; 9 | } 10 | 11 | console.log(sum(10, 20)); 12 | let x = sum(10.1, 20.1); 13 | console.log(x.toFixed(2)); 14 | console.log(x.toPrecision(4)); -------------------------------------------------------------------------------- /L19-JS-NODEJS/2_NodeJS/5_Read-Promises.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs/promises'); 2 | 3 | const path = require('path'); 4 | let fileName = path.join(__dirname, 'song.txt'); 5 | 6 | fs.readFile(fileName, 'utf-8') 7 | .then(data => { 8 | console.log(data); 9 | }) 10 | .catch(err => { 11 | console.log(err.message); 12 | }) -------------------------------------------------------------------------------- /L30-TypeScript/src/types_ts/2_typeUnion.ts: -------------------------------------------------------------------------------- 1 | type Mentor = "Kartik" | "Monu" | "Abhishek"; 2 | let teacher : Mentor; 3 | 4 | teacher = "Monu"; 5 | console.log(teacher); 6 | 7 | type Admins = "Arnab" | "Aman"; 8 | 9 | type MentorOrAdmins = Mentor | Admins; 10 | 11 | let myUser: MentorOrAdmins; 12 | 13 | myUser = "Arnab"; 14 | console.log(myUser); -------------------------------------------------------------------------------- /L44-Websockets/server/1_basicsOfWs.js: -------------------------------------------------------------------------------- 1 | import { WebSocketServer } from 'ws'; 2 | 3 | const wss = new WebSocketServer({ port: 8080 }); 4 | 5 | // event -> connection 6 | wss.on('connection', function connection(ws) { 7 | // setInterval(() => { 8 | // ws.send('HelloWorld'); 9 | // }, 1000); 10 | 11 | }); 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/1_basics/script.js: -------------------------------------------------------------------------------- 1 | const { mergeSort } = require('./mergeSort'); 2 | const bubbleSort = require('./bubbleSort'); 3 | 4 | // Example usage: 5 | const arr = [38, 27, 43, 3, 9, 82, 10]; 6 | console.log(mergeSort(arr)); // Output: [3, 9, 10, 27, 38, 43, 82] 7 | console.log(bubbleSort(arr)); // Output: [3, 9, 10, 27, 38, 43, 82] 8 | 9 | -------------------------------------------------------------------------------- /L30-TypeScript/dist/functions.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function greet(name) { 3 | console.log(`Hello ${name}`); 4 | } 5 | greet("Kartik"); 6 | function sum(a, b) { 7 | return a + b; 8 | } 9 | let sum1 = (a, b) => { 10 | return a + b; 11 | }; 12 | let ans = sum(110, 20); 13 | console.log(ans); 14 | ans = sum1(20, 20); 15 | console.log(ans); 16 | -------------------------------------------------------------------------------- /L30-TypeScript/dist/types_ts/5_Task.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | const kartik = { 3 | name: "Kartik", 4 | teaches: "Web Dev", 5 | }; 6 | const Abhishek = { 7 | name: "Abhishek", 8 | manages: "Discord", 9 | }; 10 | function describe(member) { 11 | console.log("Name:", member.name); 12 | } 13 | describe(kartik); 14 | describe(Abhishek); 15 | -------------------------------------------------------------------------------- /L30-TypeScript/src/types_ts/3_typeUnionExample.ts: -------------------------------------------------------------------------------- 1 | type People = { 2 | name: string; 3 | age: number; 4 | }; 5 | 6 | type College = { 7 | marks: number; 8 | class: string; 9 | }; 10 | 11 | type CollegeKid = Person | Student; 12 | 13 | let kid: CollegeKid = { 14 | name: "Shahnawaz", 15 | age: 20, 16 | }; 17 | 18 | console.log(kid); 19 | -------------------------------------------------------------------------------- /L36-ReactJS/1_components/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode, useState } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | import TodoApp from "./components/TodoApp.jsx"; 4 | 5 | 6 | createRoot(document.getElementById("root")).render( 7 | 8 | 9 | 10 | ); 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L16-Class-DOM/3_DOM-2/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 |

    I am heading

    11 | 12 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /L30-TypeScript/dist/passingFunctionToFunction.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function helloWorld() { 3 | console.log("Hello World"); 4 | } 5 | function callMyFun(fn) { 6 | fn(); 7 | } 8 | function callMyFun1(fn) { 9 | fn(10, 20); 10 | } 11 | function sum(x, y) { 12 | console.log(x + y); 13 | } 14 | callMyFun(helloWorld); 15 | callMyFun1(sum); 16 | -------------------------------------------------------------------------------- /L37-ReactJs/2_useEffect/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react' 2 | import { createRoot } from 'react-dom/client' 3 | import App from './App.jsx' 4 | import FetchTodos from './1_FetchTodos.jsx' 5 | import CleanUp from './CleanUp.jsx' 6 | 7 | createRoot(document.getElementById('root')).render( 8 | <> 9 | 10 | , 11 | ) 12 | -------------------------------------------------------------------------------- /L42-Project-Blog/backend/routes/auth.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const { postSignup, postLogin } = require('../controllers/authController'); 3 | const router = express.Router(); 4 | 5 | router.post('/signup', postSignup); 6 | router.post('/login', postLogin); 7 | // router.post('/logout', postSignup); 8 | 9 | 10 | module.exports = router; -------------------------------------------------------------------------------- /L28-MongooseAndProject/1_ProjectStructure/database/db.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | 3 | async function connectMongo() { 4 | let url = `mongodb+srv://kartik:kartik@cluster0.97kax2o.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0` 5 | await mongoose.connect('mongodb://localhost:27017/todos'); 6 | } 7 | 8 | module.exports = connectMongo; -------------------------------------------------------------------------------- /L32-Postgresql/src/db/index.ts: -------------------------------------------------------------------------------- 1 | import { Pool } from 'pg'; 2 | import dotenv from 'dotenv'; 3 | dotenv.config(); 4 | 5 | export const pool = new Pool({ 6 | user: process.env.DB_USER, 7 | host: process.env.DB_HOST, 8 | database: process.env.DB_NAME, 9 | password: process.env.DB_PASSWORD, 10 | port: Number(process.env.DB_PORT), 11 | }); 12 | 13 | -------------------------------------------------------------------------------- /L42-Project-Blog/client/src/components/ProtectedRoute.jsx: -------------------------------------------------------------------------------- 1 | import { useFetchUserQuery } from "../services/api"; 2 | import { Navigate, Outlet } from "react-router-dom"; 3 | 4 | export default function ProtectedRoute({ redirectTo = "/login" }) { 5 | const { data: user } = useFetchUserQuery(); 6 | return user ? : ; 7 | } 8 | -------------------------------------------------------------------------------- /L42-Project-Blog/client/src/components/PublicRoute.jsx: -------------------------------------------------------------------------------- 1 | import { useFetchUserQuery } from "../services/api"; 2 | import { Navigate, Outlet } from "react-router-dom"; 3 | 4 | export default function PublicRoute({ redirectTo = "/dashboard" }) { 5 | const { data: user } = useFetchUserQuery(); 6 | return !user ? : ; 7 | } 8 | -------------------------------------------------------------------------------- /L30-TypeScript/src/types_ts/1_types.ts: -------------------------------------------------------------------------------- 1 | type UserType = { 2 | name: string; 3 | age: number; 4 | address: string; 5 | }; 6 | 7 | function generateUser(name: string, age: number): UserType { 8 | return { 9 | name, 10 | age, 11 | address: "Delhi", 12 | }; 13 | } 14 | 15 | let user1: UserType = generateUser("Aman", 24); 16 | console.log(user1); 17 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/6_TodoApp/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | import App from "./App.jsx"; 4 | import { BrowserRouter } from "react-router"; 5 | import "./index.css"; 6 | 7 | createRoot(document.getElementById("root")).render( 8 | 9 | 10 | 11 | ); 12 | -------------------------------------------------------------------------------- /L42-Project-Blog/client/src/api/posts.js: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | 3 | const api = axios.create({ 4 | baseURL: 'http://localhost:4444/api/posts', 5 | withCredentials: true, 6 | }); 7 | 8 | 9 | export const fetchPosts = () => api.get('/'); 10 | export const createPost = (post) => api.post('/', post); 11 | export const fetchPost = id => api.get(`/${id}`); -------------------------------------------------------------------------------- /L42-Project-Blog/client/src/store/store.js: -------------------------------------------------------------------------------- 1 | import { configureStore } from '@reduxjs/toolkit'; 2 | import { api } from '../services/api'; 3 | 4 | export const store = configureStore({ 5 | reducer: { 6 | [api.reducerPath]: api.reducer, 7 | }, 8 | middleware: (getDefaultMiddleware) => 9 | getDefaultMiddleware().concat(api.middleware), 10 | }); -------------------------------------------------------------------------------- /L13-Promises-Prototypes/1_Promises/4_promise-race.js: -------------------------------------------------------------------------------- 1 | let p1 = new Promise((res, rej) => { 2 | setTimeout(() => { 3 | res("Hello") 4 | }, 2000); 5 | }) 6 | 7 | let p2 = new Promise((res, rej) => { 8 | setTimeout(() => { 9 | res("World") 10 | }, 1000); 11 | }) 12 | 13 | Promise.race([p1, p2]).then((data) => { 14 | console.log(data); 15 | }) -------------------------------------------------------------------------------- /L30-TypeScript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "l30-typescript", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "devDependencies": { 13 | "typescript": "^5.8.3" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /L31-Typescript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "l31-typescript", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "devDependencies": { 13 | "typescript": "^5.8.3" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/3_reactrouters/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | import App from "./App.jsx"; 4 | import { BrowserRouter } from "react-router"; 5 | import "./index.css"; 6 | 7 | createRoot(document.getElementById("root")).render( 8 | 9 | 10 | 11 | ); 12 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/4_nestedRoutes/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | import App from "./App.jsx"; 4 | import { BrowserRouter } from "react-router"; 5 | import "./index.css"; 6 | 7 | createRoot(document.getElementById("root")).render( 8 | 9 | 10 | 11 | ); 12 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/5_lazyLoading/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | import App from "./App.jsx"; 4 | import { BrowserRouter } from "react-router"; 5 | import "./index.css"; 6 | 7 | createRoot(document.getElementById("root")).render( 8 | 9 | 10 | 11 | ); 12 | -------------------------------------------------------------------------------- /L21-ExpressJS/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "myfirstproject", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "Kartik Mathur", 10 | "license": "ISC", 11 | "description": "", 12 | "dependencies": { 13 | "express": "^5.1.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /L22-ExpressJS/4_middlewares/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "4_middlewares", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "dependencies": { 13 | "express": "^5.1.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /L31-Typescript/1_interface-as-object.txt: -------------------------------------------------------------------------------- 1 | // interface Person { 2 | // name: string; 3 | // age: number; 4 | // greet: () => void; 5 | // } 6 | 7 | // let ashish: Person = { 8 | // name: "Ashish", 9 | // age: 20, 10 | // greet() { 11 | // console.log("Good evening", this.name); 12 | // }, 13 | // }; 14 | 15 | // console.log(ashish); 16 | // ashish.greet(); 17 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/1_anchortag-issues/src/App.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const App = () => { 4 | return ( 5 |
    6 | {/* PAGE HAR BAARI REFRESH KAR DEGA: SPA nhi raha */} 7 | About Us 8 | Contact Us 9 | Home 10 |
    11 | ) 12 | } 13 | 14 | export default App 15 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/4_nestedRoutes/src/components/NotFound.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import "./NotFound.css"; // Import the CSS for animation 3 | 4 | const NotFound = () => { 5 | return ( 6 |
    7 |

    404: Page Not Found

    8 |
    9 | ); 10 | }; 11 | 12 | export default NotFound; 13 | -------------------------------------------------------------------------------- /L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/8_HigherOrderFunctions.js: -------------------------------------------------------------------------------- 1 | function callFun(fun) { // fun: [Function: helloWorld] 2 | fun(); // Calling the function fun that user has passed into argument. 3 | } 4 | 5 | 6 | function helloWorld() { 7 | console.log("hello world"); 8 | } 9 | 10 | 11 | callFun(helloWorld); // helloWorld ko pass kia hai, call nhi kia helloWorld ko -------------------------------------------------------------------------------- /L22-ExpressJS/1_queryandparams/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "l22-expressjs", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "dependencies": { 13 | "express": "^5.1.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/1_basics/destructureObject.txt: -------------------------------------------------------------------------------- 1 | > let person = { name: 'Kartik', address: 'Delhi', country: 'India'} 2 | undefined 3 | > person 4 | { name: 'Kartik', address: 'Delhi', country: 'India' } 5 | > person.name 6 | 'Kartik' 7 | > person.address 8 | 'Delhi' 9 | > let {name, address} = person; 10 | undefined 11 | > name 12 | 'Kartik' 13 | > address 14 | 'Delhi' -------------------------------------------------------------------------------- /L24-TodoApp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "l24-todoapp", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "dependencies": { 13 | "express": "^5.1.0", 14 | "uuid": "^11.1.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /L3-HTMLCSS/3_Lists/1_unorderedList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 |
      10 | Movies 11 |
    • aparichit
    • 12 |
    • pushpa
    • 13 |
    • smile
    • 14 |
    • 3 idiots
    • 15 |
    • KGF
    • 16 |
    17 | 18 | 19 | -------------------------------------------------------------------------------- /L3-HTMLCSS/3_Lists/2_orderedlist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 |
      10 | Movies 11 |
    1. aparichit
    2. 12 |
    3. pushpa
    4. 13 |
    5. smile
    6. 14 |
    7. 3 idiots
    8. 15 |
    9. KGF
    10. 16 |
    17 | 18 | 19 | -------------------------------------------------------------------------------- /L3-HTMLCSS/sample/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L30-TypeScript/src/interfaces/1_interfaces-learn.ts: -------------------------------------------------------------------------------- 1 | // function createUser( 2 | // name: string, 3 | // age: number 4 | // ): { 5 | // name: string; 6 | // age: number; 7 | // address: string; 8 | // } { 9 | // return { 10 | // name, 11 | // age, 12 | // address: "Delhi", 13 | // }; 14 | // } 15 | 16 | // let user = createUser("Aman", 24); 17 | // console.log(user); -------------------------------------------------------------------------------- /L30-TypeScript/tsconfig.tsbuildinfo: -------------------------------------------------------------------------------- 1 | {"root":["./src/functions.ts","./src/passingfunctiontofunction.ts","./src/script.ts","./src/interfaces/1_interfaces-learn.ts","./src/interfaces/2_interfaces.ts","./src/types_ts/1_types.ts","./src/types_ts/2_typeunion.ts","./src/types_ts/3_typeunionexample.ts","./src/types_ts/4_typeintersectionexample.ts","./src/types_ts/5_task.ts"],"errors":true,"version":"5.8.3"} -------------------------------------------------------------------------------- /L36-ReactJS/4_task/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L41-Redux/1_rtk/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L43-Multer/client/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L5-CSS/1_revision/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 |
    11 |
    12 | 13 |
    14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /L16-Class-DOM/3_DOM-2/1_CreateAndAppendElement.js: -------------------------------------------------------------------------------- 1 | // Yeh way hai to create HTML element using JS 2 | let li = document.createElement('li'); 3 | 4 | li.innerText = 'Avatar'; 5 | li.classList.add('movie'); 6 | console.log(li); 7 | 8 | let movieList = document.querySelector('.movieList'); 9 | console.log(movieList) 10 | 11 | // To add an item on HTML page's element 12 | movieList.appendChild(li); -------------------------------------------------------------------------------- /L16-Class-DOM/3_DOM-2/2_AppendEntireMovieList.js: -------------------------------------------------------------------------------- 1 | let movieList = document.querySelector('.movieList'); 2 | console.log(movieList) 3 | 4 | let arr = ['Avatar', 'Mr Bean', 'GAME', 'RUN', 'Harry Potter', 'Talash'] 5 | 6 | for (let e of arr) { 7 | let li = document.createElement('li'); 8 | li.innerText = e; 9 | li.classList.add('movie'); 10 | 11 | movieList.appendChild(li); 12 | } -------------------------------------------------------------------------------- /L30-TypeScript/src/interfaces/2_interfaces.ts: -------------------------------------------------------------------------------- 1 | interface User { 2 | name: string; 3 | age: number; 4 | }; 5 | 6 | interface User{ 7 | address: string; 8 | } 9 | 10 | function createUser(name: string, age: number): User { 11 | return { 12 | name, 13 | age, 14 | address: "Delhi", 15 | }; 16 | } 17 | 18 | let user: User = createUser("Aman", 24); 19 | console.log(user); 20 | -------------------------------------------------------------------------------- /L34-ReactJS/3_ClientSideRendering/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "3_clientsiderendering", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "dependencies": { 13 | "express": "^5.1.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /L35-ReactJS/2_todoApp/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L37-ReactJs/2_useEffect/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L42-Project-Blog/client/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L44-Websockets/client/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/3_FileDependency-CircularDependency/andaBirth.js: -------------------------------------------------------------------------------- 1 | const murgi = require('./murgiBirth'); 2 | 3 | let andaBirthPlace = 'Africa'; 4 | 5 | // module.exports = { 6 | // anda: 'I am anda', 7 | // andaBirthPlace, 8 | // murgi 9 | // } 10 | 11 | module.exports.anda = 'I am anda'; 12 | module.exports.andaBirthPlace = andaBirthPlace; 13 | module.exports.murgi = murgi; -------------------------------------------------------------------------------- /L33-Prisma/tsconfig.tsbuildinfo: -------------------------------------------------------------------------------- 1 | {"root":["./generated/prisma/client.d.ts","./generated/prisma/default.d.ts","./generated/prisma/edge.d.ts","./generated/prisma/index.d.ts","./generated/prisma/wasm.d.ts","./generated/prisma/runtime/index-browser.d.ts","./generated/prisma/runtime/library.d.ts","./src/create-post.ts","./src/create.ts","./src/delete.ts","./src/read-user-post.ts","./src/read.ts"],"version":"5.8.3"} -------------------------------------------------------------------------------- /L34-ReactJS/4_reactjsbasics/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L35-ReactJS/1_reactjsbasics/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L36-ReactJS/1_components/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L36-ReactJS/2_customhooks/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L36-ReactJS/3_MycustomTodos/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L37-ReactJs/1_rerendering/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/6_TodoApp/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L41-Redux/1_rtk/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | import "./index.css"; 4 | import App from "./App.jsx"; 5 | import { store } from "./store/store"; 6 | import { Provider } from "react-redux"; 7 | 8 | createRoot(document.getElementById("root")).render( 9 | 10 | 11 | 12 | ); 13 | -------------------------------------------------------------------------------- /L15-Bindings-Classes/1_Bindings/3_explicitBindings-call.js: -------------------------------------------------------------------------------- 1 | function hello(name, age) { 2 | console.log(this, `Name: ${name} and age: ${age}`); 3 | } 4 | 5 | let obj1 = { a: 1 } 6 | let obj2 = { b: 2 } 7 | 8 | // 1. call 9 | // function_name.call(context, argument1, arg2, arg3); 10 | hello.call(obj1, "Kartik", 20); 11 | hello.call(obj2, "Yash", 12); 12 | 13 | hello("abc", 10000); // default binding -------------------------------------------------------------------------------- /L30-TypeScript/src/types_ts/4_typeIntersectionExample.ts: -------------------------------------------------------------------------------- 1 | type Person = { 2 | name: string; 3 | age: number; 4 | }; 5 | 6 | type Student = { 7 | marks: number; 8 | class: string; 9 | }; 10 | 11 | type SchoolKid = Person & Student; 12 | 13 | let kid1: SchoolKid = { 14 | name: "Shahnawaz", 15 | age: 20, 16 | marks: 90, 17 | class: "10th Class", 18 | }; 19 | 20 | console.log(kid1); 21 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/3_reactrouters/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/4_nestedRoutes/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/5_lazyLoading/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L41-Redux/fullStackApp/backend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "backend", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "dependencies": { 13 | "cors": "^2.8.5", 14 | "express": "^5.1.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /L41-Redux/fullStackApp/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L17-DOM-API/1_DOM_Events/3_formEvents.js: -------------------------------------------------------------------------------- 1 | let yahooForm = document.querySelector('#yahooForm'); 2 | 3 | yahooForm.addEventListener('submit', (ev) => { 4 | ev.preventDefault(); // Form ko by default submit hone se rokk dega 5 | console.log("Form submitted"); 6 | console.log(ev.target.children[0].value) 7 | 8 | window.location = `https://search.yahoo.com/search?p=${ev.target.children[0].value}` 9 | }) -------------------------------------------------------------------------------- /L30-TypeScript/dist/interfaces/1_interfaces-learn.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | // function createUser( 3 | // name: string, 4 | // age: number 5 | // ): { 6 | // name: string; 7 | // age: number; 8 | // address: string; 9 | // } { 10 | // return { 11 | // name, 12 | // age, 13 | // address: "Delhi", 14 | // }; 15 | // } 16 | // let user = createUser("Aman", 24); 17 | // console.log(user); 18 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/1_anchortag-issues/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/2_anchortag-correct/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/1_memo/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/3_redux/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/3_redux/src/reducer/Counter.js: -------------------------------------------------------------------------------- 1 | export function counterReducer(state = 0, action) { 2 | switch (action.type) { 3 | case 'counter/increment': 4 | return state + 1 5 | case 'counter/decrement': 6 | return state - 1 7 | case 'counter/reset': 8 | return 0; 9 | default: 10 | return state 11 | } 12 | } -------------------------------------------------------------------------------- /L15-Bindings-Classes/1_Bindings/4_explicitBindings-apply.js: -------------------------------------------------------------------------------- 1 | function hello(name, age) { 2 | console.log(this, `Name: ${name} and age: ${age}`); 3 | } 4 | 5 | let obj1 = { a: 1 } 6 | let obj2 = { b: 2 } 7 | 8 | // 1. apply 9 | // function_name.apply(context, [argument1, arg2, arg3]); 10 | hello.apply(obj1, ["Kartik", 20]); 11 | hello.apply(obj2, ["Yash", 12]); 12 | 13 | hello("andas", 99999); // default binding -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/4_todoApp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "4_todoapp", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "dependencies": { 13 | "express": "^5.1.0", 14 | "uuid": "^11.1.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /L25-Databases-MongoDB/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "l25-databases-mongodb", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "dependencies": { 13 | "express": "^5.1.0", 14 | "mongodb": "^6.15.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /L29-JWT-Sessions/1_jwt/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "l29-jwt-sessions", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "dependencies": { 13 | "express": "^5.1.0", 14 | "jsonwebtoken": "^9.0.2" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/2_contextAPI/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /L18- TodoApp-NodeJs/1_TodoApp/1_GetTaskFromInput.js: -------------------------------------------------------------------------------- 1 | let input = document.querySelector('input'); 2 | let button = document.querySelector('button'); 3 | 4 | button.addEventListener('click', (ev) => { 5 | // Aage peeche ke extra space remove krega trim() 6 | let inputData = input.value.trim(); 7 | 8 | input.value = ""; 9 | 10 | if (inputData) { 11 | console.log(inputData) 12 | } 13 | }) -------------------------------------------------------------------------------- /L30-TypeScript/src/functions.ts: -------------------------------------------------------------------------------- 1 | function greet(name: string) { 2 | console.log(`Hello ${name}`); 3 | } 4 | 5 | greet("Kartik"); 6 | 7 | function sum(a: number, b: number): number { 8 | return a + b; 9 | } 10 | 11 | let sum1 = (a: number, b: number): number => { 12 | return a + b; 13 | }; 14 | 15 | let ans: number = sum(110, 20); 16 | console.log(ans); 17 | 18 | ans = sum1(20, 20); 19 | console.log(ans); 20 | -------------------------------------------------------------------------------- /L30-TypeScript/src/passingFunctionToFunction.ts: -------------------------------------------------------------------------------- 1 | function helloWorld(): void { 2 | console.log("Hello World"); 3 | } 4 | 5 | function callMyFun(fn: () => void) { 6 | fn(); 7 | } 8 | 9 | function callMyFun1(fn: (a: number, b: number) => void) { 10 | fn(10, 20); 11 | } 12 | 13 | function sum(x: number, y: number): void { 14 | console.log(x + y); 15 | } 16 | 17 | callMyFun(helloWorld); 18 | callMyFun1(sum); 19 | -------------------------------------------------------------------------------- /L28-MongooseAndProject/1_ProjectStructure/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "1_advancedmongoose", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "dependencies": { 13 | "express": "^5.1.0", 14 | "mongoose": "^8.13.2" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /L28-MongooseAndProject/2_AdvancedMongoose/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "2_advancedmongoose", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "dependencies": { 13 | "express": "^5.1.0", 14 | "mongoose": "^8.13.2" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /L36-ReactJS/2_customhooks/src/hooks/useCounter.jsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | 3 | export default function useCounter(initialValue){ 4 | const [cnt, setCnt] = useState(initialValue); 5 | 6 | function updateCnt (){ 7 | if(cnt >= 0 && cnt<10){ 8 | setCnt(cnt+1); 9 | } 10 | else{ 11 | setCnt(0); 12 | } 13 | } 14 | 15 | return [cnt, updateCnt]; 16 | } -------------------------------------------------------------------------------- /L13-Promises-Prototypes/3_Prototypes/5_AddingFunctionForAll.js: -------------------------------------------------------------------------------- 1 | Object.prototype.codingBlocks = function (){ 2 | console.log("Hey I am Coding Blocks") 3 | } 4 | 5 | let a = 10; 6 | a.codingBlocks(); 7 | 8 | let arr = [1,2,3]; 9 | arr.codingBlocks(); 10 | 11 | let str = "Helllo World"; 12 | str.codingBlocks(); 13 | 14 | // __proto__ understanding ke liye theek hai lekin, we never use it because 15 | // it has performance issues. -------------------------------------------------------------------------------- /L26-TodoComplete-Mongoose/1_todoComplete/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "l25-databases-mongodb", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "dependencies": { 13 | "express": "^5.1.0", 14 | "mongodb": "^6.15.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/6_TodoApp/src/components/TodoDisplay.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const TodoDisplay = ({ todos }) => { 4 | return ( 5 |
    6 | {todos.map((t, i) => ( 7 |
  • 8 | {t.name} :{" "} 9 | {t.completed ? Completed : Pending} 10 |
  • 11 | ))} 12 |
    13 | ); 14 | }; 15 | 16 | export default TodoDisplay; 17 | -------------------------------------------------------------------------------- /L29-JWT-Sessions/2_cookies/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "2_cookies", 3 | "version": "1.0.0", 4 | "main": "app.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "dependencies": { 13 | "cookie-parser": "^1.4.7", 14 | "express": "^5.1.0", 15 | "mongoose": "^8.14.1" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /L41-Redux/1_rtk/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L11-Closure-Scopes-AsyncProgramming/4_letVsVar/1_Hoisting/3_FunctionAssignedValues.js: -------------------------------------------------------------------------------- 1 | console.log(helloWorld); 2 | 3 | var helloWorld = function () { 4 | console.log("Hello world"); 5 | } 6 | 7 | console.log(helloWorld); 8 | 9 | 10 | console.log("Say Hello before function calling", sayHello); 11 | 12 | function sayHello() { 13 | console.log("Hello"); 14 | } 15 | 16 | console.log("Say Hello Funcn after function calling", sayHello); -------------------------------------------------------------------------------- /L2-TerminalCommands/5_FutureTasks.txt: -------------------------------------------------------------------------------- 1 | ## Advanced Commands 2 | ### Tasks Running: 3 | - ps (View current processes) 4 | - top (View running processes interactively) 5 | 6 | ### Kill Tasks: 7 | - kill (Terminate a process by its PID) 8 | 9 | ### Change Permissions: 10 | - chmod (Change file/directory permissions) 11 | - chown (Change ownership of files or directories) 12 | 13 | ### Other: 14 | - ping (Check network connectivity and latency) -------------------------------------------------------------------------------- /L26-TodoComplete-Mongoose/3_mongooseTodo-Users/models/Users.model.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | 3 | // 1. Create Schema 4 | const userSchema = new mongoose.Schema({ 5 | name: String, 6 | date: { type: Date, default: Date.now }, 7 | }) 8 | 9 | 10 | // 2. Create a model (Collection, in which we insert documents), Consider it as JS class 11 | const Users = mongoose.model('Users', userSchema); 12 | module.exports = Users; -------------------------------------------------------------------------------- /L3-HTMLCSS/sample/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L34-ReactJS/1_TraditionalWay/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | TodoList 8 | 9 | 10 | 11 | 12 |

    Todo List

    13 | 14 |
    15 | 16 |
    17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /L34-ReactJS/2_ServerSideRendering/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "2_serversiderendering", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "type": "module", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "description": "", 13 | "dependencies": { 14 | "express": "^5.1.0", 15 | "hbs": "^4.2.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /L36-ReactJS/4_task/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L43-Multer/client/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/9_HigherOrderFunctions2.js: -------------------------------------------------------------------------------- 1 | function genFun(){ 2 | 3 | function helloWorld(){ 4 | console.log("Hello world!!"); 5 | } 6 | 7 | // helloWorld ko return kia hai, call nhi kia helloWorld ko 8 | return helloWorld; 9 | } 10 | 11 | let fun = genFun(); // genFun ek function return kar raha hai 12 | 13 | fun(); // genFun ne jo function return kia usse hum call kar skte h 14 | 15 | -------------------------------------------------------------------------------- /L16-Class-DOM/5_DOM-Parent-Child-Sibling/script.js: -------------------------------------------------------------------------------- 1 | let movieList = document.querySelector('.movieList'); 2 | // Iske children chahiye? 3 | console.log(movieList.children) 4 | let movie = document.querySelector('.movie'); 5 | // Parent 6 | console.log(movie) 7 | console.log(movie.parentElement) 8 | // Siblings: Ek pehle wala 9 | console.log(movie.previousElementSibling) 10 | // Siblings: Ek next wala 11 | console.log(movie.nextElementSibling) 12 | -------------------------------------------------------------------------------- /L28-MongooseAndProject/3_Bcrypt-Salt/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "3_bcrypt-salt", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "dependencies": { 13 | "bcrypt": "^5.1.1", 14 | "express": "^5.1.0", 15 | "mongoose": "^8.13.2" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /L31-Typescript/script.ts: -------------------------------------------------------------------------------- 1 | interface PersonInfo { 2 | name: string; 3 | age?: number; // This makes the age optional 4 | } 5 | 6 | interface StudentInfo { 7 | readonly marks: number; 8 | subject: string; 9 | } 10 | 11 | interface Student extends PersonInfo, StudentInfo {} 12 | 13 | let arnab: Student = { 14 | name: "Arnab", 15 | marks: 10, 16 | subject: "TypeScript", 17 | }; 18 | 19 | console.log(arnab); 20 | console.log(arnab.marks); -------------------------------------------------------------------------------- /L35-ReactJS/2_todoApp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L36-ReactJS/1_components/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L36-ReactJS/2_customhooks/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L37-ReactJs/1_rerendering/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L37-ReactJs/2_useEffect/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L42-Project-Blog/client/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L44-Websockets/client/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L15-Bindings-Classes/1_Bindings/11_newKeyword.js: -------------------------------------------------------------------------------- 1 | function Person(name, age) { 2 | // this-> {} // empty object as context 3 | this.name = name; 4 | this.age = age; 5 | // this-> {name: name, age: age} 6 | // constructor ki tarah use krna hai toh we never return anything from 7 | // constructor 8 | } 9 | 10 | let p = new Person("Kartik", 25); // We are using the Person function as 11 | // constructor function 12 | console.log(p) -------------------------------------------------------------------------------- /L34-ReactJS/4_ClientAndServerSideCombined/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "2_serversiderendering", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "type": "module", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "description": "", 13 | "dependencies": { 14 | "express": "^5.1.0", 15 | "hbs": "^4.2.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /L34-ReactJS/4_reactjsbasics/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L35-ReactJS/1_reactjsbasics/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L36-ReactJS/3_MycustomTodos/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L16-Class-DOM/5_DOM-Parent-Child-Sibling/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 |

    I am heading

    11 | 12 |
      13 |
    • Potter
    • 14 |
    • Avatar
    • 15 |
    • Harry
    • 16 |
    17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /L26-TodoComplete-Mongoose/2_mongoose/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "l25-databases-mongodb", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "dependencies": { 13 | "express": "^5.1.0", 14 | "mongodb": "^6.15.0", 15 | "mongoose": "^8.13.2" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/3_reactrouters/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/4_nestedRoutes/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/5_lazyLoading/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/1_memo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/3_redux/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L41-Redux/fullStackApp/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L15-Bindings-Classes/1_Bindings/9_BindingQuestion4.js: -------------------------------------------------------------------------------- 1 | function hello() { 2 | console.log(this); // it is obj 3 | 4 | let innerFun = () => { // innerfunction bana inside hello, toh yeh apne 5 | // parent ke hi context ko use krega 6 | console.log("Inner fun", this); 7 | // Arrow functions ke saath kabhi this ko use nhi krte hai hum log 8 | } 9 | 10 | innerFun(); 11 | } 12 | 13 | let obj = { a: 1 }; 14 | hello.call(obj); -------------------------------------------------------------------------------- /L15-Bindings-Classes/2_classSyntax/1_Basics.js: -------------------------------------------------------------------------------- 1 | // Syntactic Sugar 2 | class Person { 3 | constructor(name, age) { 4 | this.name = name; 5 | this.age = age; 6 | } 7 | 8 | print() { 9 | console.log(this.name, this.age) 10 | } 11 | } 12 | 13 | let p = new Person("Kartik", 25); 14 | console.log(p) 15 | 16 | console.log(typeof Person); // function 17 | console.log(p.__proto__ == Person.prototype); // true 18 | 19 | p.print(); -------------------------------------------------------------------------------- /L39-Routers-Hooks/1_anchortag-issues/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/2_anchortag-correct/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/2_contextAPI/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
    11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L11-Closure-Scopes-AsyncProgramming/1_Revision-Closures/script.js: -------------------------------------------------------------------------------- 1 | function createCounter() { 2 | let count = 0; 3 | 4 | return function () { 5 | count++; 6 | return count; 7 | } 8 | } 9 | 10 | let counter = createCounter(); 11 | console.log(counter()); 12 | console.log(counter()); 13 | console.log(counter()); 14 | 15 | let counter1 = createCounter(); 16 | console.log(counter1()); 17 | console.log(counter1()); 18 | console.log(counter1()); -------------------------------------------------------------------------------- /L26-TodoComplete-Mongoose/3_mongooseTodo-Users/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "l25-databases-mongodb", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "dependencies": { 13 | "express": "^5.1.0", 14 | "mongodb": "^6.15.0", 15 | "mongoose": "^8.13.2" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /L19-JS-NODEJS/2_NodeJS/2_Create-Promises.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs/promises'); 2 | 3 | const path = require('path'); 4 | let fileName = path.join(__dirname, 'song.txt'); 5 | 6 | fs 7 | .writeFile(fileName, "HEY!! HEY!!", { 8 | flag: 'w' 9 | }) 10 | .then(() => { 11 | console.log("Data Successfully written"); 12 | }) 13 | .catch(err => { 14 | console.log(err) 15 | }) 16 | 17 | console.log("Hello I am simple print statement"); -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/3_redux/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | // import './index.css' 4 | import App from "./App.jsx"; 5 | import store from "./store/store.js"; 6 | import { Provider } from "react-redux"; 7 | 8 | store.subscribe(() => store.getState()); 9 | 10 | createRoot(document.getElementById("root")).render( 11 | 12 | 13 | 14 | ); 15 | -------------------------------------------------------------------------------- /L15-Bindings-Classes/1_Bindings/1_implicitBinding.js: -------------------------------------------------------------------------------- 1 | let obj = { 2 | a: 1, 3 | b: 'hello', 4 | print() { 5 | console.log(this); // this is actually 'Execution content' ka reference 6 | this.c = 'new c added inside print'; 7 | } 8 | } 9 | 10 | // Implicit binding: obj.print() toh print ke andar this will point to obj 11 | // Implicit this will on itself point to obj, humne nhi bataya khud figure kia JS ne 12 | obj.print(); 13 | console.log(obj); -------------------------------------------------------------------------------- /L17-DOM-API/1_DOM_Events/1_mouseEvents.js: -------------------------------------------------------------------------------- 1 | let h1 = document.querySelector('h1'); 2 | h1.addEventListener('mouseenter', () => { 3 | console.log("Mouse entered"); 4 | }) 5 | 6 | h1.addEventListener('mouseleave', () => { 7 | console.log("Mouse left"); 8 | }) 9 | 10 | h1.addEventListener('mousedown', () => { 11 | console.log("Mouse is pressed"); 12 | }) 13 | 14 | h1.addEventListener('mouseup', () => { 15 | console.log("Mouse is pressed and released"); 16 | }) 17 | -------------------------------------------------------------------------------- /L13-Promises/3.1_PromiseChaining.js: -------------------------------------------------------------------------------- 1 | let p = new Promise((res, rej) => { 2 | res(); 3 | }) 4 | 5 | /* 6 | let p1 = p.then(() => { 7 | console.log("Promise poora hua") 8 | 9 | return new Promise((res, rej) => { 10 | res(2) 11 | }) 12 | }) 13 | */ 14 | 15 | /* 16 | let p1 = new Promise((res, rej) => { 17 | res(2) 18 | }) 19 | 20 | p1.then((data)=>{ 21 | console.log("First promise returned",data); 22 | }) 23 | .catch() 24 | 25 | */ -------------------------------------------------------------------------------- /L20-InterviewQuestions/1_Polyfill_MFR/Functions.js: -------------------------------------------------------------------------------- 1 | // let cb = (i)=>{ 2 | // return i*i; 3 | // } 4 | 5 | // console.log(cb(3)); 6 | 7 | let cb = (a, b) => { 8 | return a + b; 9 | } 10 | 11 | let arr = [10, 20, 30, 40, 50]; 12 | let ans = 0; 13 | for (let i = 0; i < arr.length; i++) { 14 | ans = cb(ans, arr[i]); 15 | } 16 | console.log(ans); 17 | 18 | /* 19 | let ans = cb(10, 20); 20 | ans = cb(ans, 30); 21 | ans = cb(ans, 40); 22 | 23 | console.log(cb(ans, 50)); 24 | */ -------------------------------------------------------------------------------- /L28-MongooseAndProject/1_ProjectStructure/models/Todos.model.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | 3 | // 1. Create Schema 4 | const TodoSchema = new mongoose.Schema({ 5 | task: String, 6 | status: { type: Boolean, default: false }, 7 | date: { type: Date, default: Date.now } 8 | }) 9 | 10 | 11 | // 2. Create a model (Collection, in which we insert documents), Consider it as JS class 12 | const Todos = mongoose.model('Todos', TodoSchema); 13 | module.exports = Todos; -------------------------------------------------------------------------------- /L44-Websockets/server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "l44-websockets", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "type": "module", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "description": "", 13 | "dependencies": { 14 | "dotenv": "^17.2.1", 15 | "mongodb": "^6.18.0", 16 | "mongoose": "^8.17.1", 17 | "ws": "^8.18.3" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /L12-AsyncProgramming/1_SyncTasks/script.js: -------------------------------------------------------------------------------- 1 | // 1. Print "Hello" 2 | // 2. Wait for 5 seconds 3 | // 3. Print "World" 4 | function waitASec() { 5 | let t1 = new Date().getTime(); // initialTime 6 | while (new Date().getTime() < t1 + 1000) { } 7 | } 8 | 9 | function waitNSec(n) { 10 | for (let i = 0; i < n; i++) { 11 | waitASec(); 12 | } 13 | 14 | console.log(n+" seconds completed"); 15 | } 16 | 17 | console.log("Hello"); 18 | waitNSec(5); 19 | console.log("World"); -------------------------------------------------------------------------------- /L34-ReactJS/4_reactjsbasics/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { createRoot } from "react-dom/client"; 2 | 3 | function App(Task, Description) { 4 | return ( 5 |
    6 |
      7 |
    • 8 | {Task}: {Description} 9 |
    • 10 |
    11 |
    12 | ); 13 | } 14 | 15 | createRoot(document.getElementById("root")).render( 16 |
    17 | {App("Coding", "Love to Code")} 18 | { 19 | App("Swim", "Love to Swim") 20 | } 21 |
    22 | ); 23 | -------------------------------------------------------------------------------- /L19-JS-NODEJS/2_NodeJS/4_Read-Callback.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const path = require('path'); 3 | 4 | let fileName = path.join(__dirname, 'song.txt'); 5 | 6 | fs.readFile(fileName, { 7 | encoding: 'utf-8' 8 | }, (err, data) => { 9 | if (err) throw err; 10 | console.log(data); 11 | }) 12 | 13 | // fs.readFile(fileName, (err, data) => { 14 | // if (err) throw err; 15 | // console.log(data);// Binary Data 16 | // console.log(data.toString()); // String Data 17 | // }) -------------------------------------------------------------------------------- /L3-HTMLCSS/sample/README.md: -------------------------------------------------------------------------------- 1 | # React + Vite 2 | 3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. 4 | 5 | Currently, two official plugins are available: 6 | 7 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh 8 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh 9 | -------------------------------------------------------------------------------- /L41-Redux/1_rtk/src/store/store.js: -------------------------------------------------------------------------------- 1 | import { configureStore } from '@reduxjs/toolkit' 2 | import counterReducer from '../redux/slices/counterSlice' 3 | import { todosApi } from '../redux/slices/todoSlice' 4 | 5 | export const store = configureStore({ 6 | reducer: { 7 | counter: counterReducer, 8 | [todosApi.reducerPath]: todosApi.reducer, 9 | }, 10 | middleware: (getDefaultMiddleware) => 11 | getDefaultMiddleware().concat(todosApi.middleware) 12 | }) 13 | 14 | -------------------------------------------------------------------------------- /L23-FileDependency-TodoApp/4_todoApp/updatingStatusInArray.js: -------------------------------------------------------------------------------- 1 | let todos = [ 2 | { name: 'Cricket', id: 1, status: false }, 3 | { name: 'Dance', id: 2, status: true }, 4 | { name: 'Sing', id: 3, status: false }, 5 | ] 6 | 7 | let id = 3; // Change the status 8 | todos = todos.map((item) => { 9 | if (id == item.id) { 10 | return { 11 | ...item, 12 | status: !item.status 13 | } 14 | } 15 | else return item; 16 | }) 17 | 18 | console.log(todos) -------------------------------------------------------------------------------- /L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/7_ArrowFunction.js: -------------------------------------------------------------------------------- 1 | // Arrow and normal functions ka difference 2 | // baad mei aaega 3 | let a = () => { 4 | console.log("Hello World"); 5 | } 6 | 7 | a(); // Call the function a 8 | 9 | // Single statement inside arrow function 10 | // is by default return statement 11 | let sum = (a, b) => a + b; 12 | 13 | console.log(sum(10, 20)); 14 | console.log(sum(20, 20)); 15 | 16 | let sub = (a, b) => { 17 | return a - b 18 | } 19 | console.log(sub(20, 10)); -------------------------------------------------------------------------------- /L12-AsyncProgramming/3_setInterval/script.js: -------------------------------------------------------------------------------- 1 | // setInterval provides an id that we can use to stop this 2 | let id = setInterval(function () { 3 | console.log("Hi") 4 | }, 1000); // After every 1000 milliseconds yeh function dobara run krega 5 | 6 | let id1 = setInterval(function () { 7 | console.log("Hello") 8 | }, 1000); // After every 1000 milliseconds yeh function dobara run krega 9 | 10 | console.log("id:", id, "id1:", id1); 11 | 12 | setTimeout(() => { 13 | clearInterval(id); 14 | }, 5000); -------------------------------------------------------------------------------- /L22-ExpressJS/2_sendingfiles/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

    Hello world

    14 | 15 |

    Welcome to my app, I am a para

    16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /L13-Promises/3.2_PromiseChaining.js: -------------------------------------------------------------------------------- 1 | let p = new Promise((res, rej) => { 2 | res(); // Promise humesha resolve hoga 3 | }) 4 | 5 | 6 | let p1 = p.then(() => { 7 | return new Promise((res, rej) => { 8 | res(2); 9 | }) 10 | }) 11 | 12 | let p2 = p1.then((data) => { 13 | console.log("First promise returned", data); 14 | return new Promise((res, rej) => { 15 | res(data * 2) 16 | }) 17 | }) 18 | 19 | p2.then(data => { 20 | console.log("Second promise returned", data) 21 | }) -------------------------------------------------------------------------------- /L19-JS-NODEJS/1_ArrayFunctions/reduce.js: -------------------------------------------------------------------------------- 1 | let arr = [1, 2, 3, 4, 5]; 2 | 3 | // acc: 1, val: 2 4 | // acc: 3, val: 3 5 | // acc: 6, val: 4 6 | // acc: 10, val: 5 7 | let ans = arr.reduce((acc, val, indx, a) => { 8 | return acc + val; 9 | }) 10 | 11 | console.log(ans); 12 | 13 | // acc: 1, val: 1 14 | // acc: 1, val: 2 15 | // acc: 2, val: 3 16 | // acc: 6, val: 4 17 | // acc: 24, val: 5 18 | let fact_ans = arr.reduce((acc, val, indx, a) => { 19 | return acc * val; 20 | }, 1) 21 | 22 | console.log(fact_ans) -------------------------------------------------------------------------------- /L39-Routers-Hooks/4_nestedRoutes/src/components/Team.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { useNavigate } from "react-router"; 3 | 4 | const Team = () => { 5 | const navigate = useNavigate(); 6 | 7 | return ( 8 |
    9 |
      10 | Our Team 11 | 12 | 13 |
    14 |
    15 | ); 16 | }; 17 | 18 | export default Team; 19 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/6_TodoApp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 | 11 | 12 |
    13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /L42-Project-Blog/client/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | import "./index.css"; 4 | import { BrowserRouter } from "react-router-dom"; 5 | import App from "./App.jsx"; 6 | import { Provider } from "react-redux"; 7 | import { store } from "./store/store.js"; 8 | 9 | createRoot(document.getElementById("root")).render( 10 | 11 | 12 | 13 | 14 | 15 | ); 16 | -------------------------------------------------------------------------------- /L9-MediaQueries-JS_Basics/2_JS-Basics/installation-instructions.txt: -------------------------------------------------------------------------------- 1 | 1. Install "Code Runner" on vs code 2 | 3 | To download nodejs Visit: https://nodejs.org/en/download 4 | 2. Install nodejs to run JS on local machine/System 5 | - MacOs: "homebrew" install karlo first - google it 6 | - brew install node@23 - this will install nodejs 7 | - To use some other version: (nvm use _node_version_number) 8 | - To see all available versions: nvm list 9 | 10 | 3. Windows wale direct setup ko download karlo 11 | -------------------------------------------------------------------------------- /L22-ExpressJS/3_sendingStaticContent/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

    Hello world

    14 | 15 |

    Welcome to my app, I am a para

    16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /L4-CSS/4_CSSBOXModel/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 16 | 17 | 18 | 19 | 20 |
    21 | I am a div 22 |
    23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /L29-JWT-Sessions/2_cookies/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Landing Page 8 | 9 | 10 | 11 | 12 |
    13 | Login page 14 | Signup page 15 |
    16 | 17 |

    home page

    18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /L32-Postgresql/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "l32-postgresql", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "dependencies": { 13 | "dotenv": "^16.5.0", 14 | "pg": "^8.16.0" 15 | }, 16 | "devDependencies": { 17 | "@types/node": "^22.15.24", 18 | "@types/pg": "^8.15.2", 19 | "typescript": "^5.8.3" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/2_Arrays_InbuiltFunctions.js: -------------------------------------------------------------------------------- 1 | let a = [1, 2, 3, 4]; 2 | 3 | // Array is like doubly linked list 4 | // push, pop for operations at the end 5 | a.push(5); 6 | console.log(a); 7 | let f = a.pop(); 8 | console.log("f", f); 9 | console.log(a); 10 | 11 | 12 | // unshift, shift for operations at the front 13 | a.unshift(10); // To insert 10 at front 14 | console.log(a); 15 | let x = a.shift(); // shift will return the value that is being removed 16 | console.log("x", x); 17 | console.log(a); -------------------------------------------------------------------------------- /L13-Promises-Prototypes/2_EverythingInjs-IsAnObject/script.js: -------------------------------------------------------------------------------- 1 | let obj = { 2 | a: 1, 3 | b: "Hello I am b" 4 | } 5 | obj.c = "I am getting added to OBJ" 6 | console.log(obj.b); 7 | console.log(obj); 8 | 9 | // Function hai yeh 10 | function fun() { 11 | console.log("Fun"); 12 | } 13 | 14 | fun(); 15 | 16 | console.log(fun.meraObject);// undefined 17 | 18 | // Lekin it can still work like an object 19 | fun.meraObject = "I am an object inside function"; 20 | console.log(fun.meraObject); 21 | // in JS everything is an Object -------------------------------------------------------------------------------- /L13-Promises-Prototypes/3_Prototypes/2_cppClasses.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | class Person 5 | { 6 | public: 7 | string name; 8 | int age; 9 | 10 | Person (string n,int a){ 11 | name = n; 12 | age = a; 13 | } 14 | 15 | void details(){ 16 | cout<<"Name: "< 2 | using namespace std; 3 | 4 | class Person 5 | { 6 | public: 7 | string name; 8 | int age; 9 | 10 | Person(string n, int a) 11 | { 12 | name = n; 13 | age = a; 14 | } 15 | 16 | void print() 17 | { 18 | cout << this->name << ", " << this->age << endl; 19 | } 20 | }; 21 | 22 | int main() 23 | { 24 | 25 | Person p("Kartik", 15); 26 | Person p1("Yash", 25); 27 | 28 | p.print(); 29 | p1.print(); 30 | } -------------------------------------------------------------------------------- /L26-TodoComplete-Mongoose/3_mongooseTodo-Users/models/Todos.model.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | 3 | // 1. Create Schema 4 | const TodoSchema = new mongoose.Schema({ 5 | task: String, 6 | status: { type: Boolean, default: false }, 7 | date: { type: Date, default: Date.now }, 8 | user_id: mongoose.Types.ObjectId 9 | }) 10 | 11 | 12 | // 2. Create a model (Collection, in which we insert documents), Consider it as JS class 13 | const Todos = mongoose.model('Todos', TodoSchema); 14 | module.exports = Todos; -------------------------------------------------------------------------------- /L31-Typescript/5_creatingAbstract-class.txt: -------------------------------------------------------------------------------- 1 | abstract class User { 2 | name: string; 3 | 4 | constructor(name: string) { 5 | this.name = name; 6 | } 7 | 8 | abstract getRole(): string; 9 | 10 | // Defined methods 11 | greet() { 12 | console.log(`Welcome, ${this.name}`); 13 | } 14 | } 15 | 16 | abstract class User1 { 17 | constructor(public name: string) {} 18 | 19 | abstract getRole(): string; 20 | 21 | // Defined methods 22 | greet() { 23 | console.log(`Welcome, ${this.name}`); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/1_Arrays.js: -------------------------------------------------------------------------------- 1 | var a = [1, 2, 3, 4]; 2 | 3 | console.log(a); 4 | 5 | for (var i = 0; i < a.length; i++) { 6 | console.log(a[i]); 7 | } 8 | 9 | // Arrays are heterogenous in js 10 | var b = [1, 2, 3, true, 'Hello World'] 11 | 12 | console.log(b); // This is to print 13 | 14 | b[10] = 10; 15 | console.log(b); 16 | 17 | // To print array we have a special loop called 18 | // for-of loop 19 | 20 | // e ke andar ek ek karke b ki values aaengi 21 | for (var e of b) { 22 | console.log(e); 23 | } -------------------------------------------------------------------------------- /L33-Prisma/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "l33-prisma", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "keywords": [], 9 | "author": "", 10 | "license": "ISC", 11 | "description": "", 12 | "devDependencies": { 13 | "@types/node": "^22.15.29", 14 | "prisma": "^6.8.2", 15 | "typescript": "^5.8.3" 16 | }, 17 | "dependencies": { 18 | "@prisma/client": "^6.8.2", 19 | "@prisma/extension-accelerate": "^2.0.1" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /L5-CSS/3_Positions/1_Relative.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Relative Position 6 | 17 | 18 | 19 | 20 | 21 |
    I am a div-1
    22 |
    I am a div-2
    23 |
    I am a div-3
    24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /L19-JS-NODEJS/2_NodeJS/1_Create-Callback.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); // Yeh nodejs ke saath aata hai by-default 2 | const path = require('path'); // To join two paths correctly 3 | // let fileName = __dirname+'/'+ 'song.txt'; 4 | let fileName = path.join(__dirname, 'song.txt'); 5 | // Current file ke parent tak ka path in my system 6 | console.log(__dirname+'/'+fileName); 7 | fs.writeFile(fileName, "Hello World", (err) => { 8 | if (err) throw err; 9 | console.log("File written successfully"); 10 | }); 11 | 12 | console.log("I am another piece of code!"); -------------------------------------------------------------------------------- /L21-ExpressJS/app.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const app = express(); 3 | const PORT = 4444; 4 | 5 | // GET request ke badle response bhejne ka code 6 | app.get('/', function (req, res) { 7 | // console.log(res) 8 | res.send('Hello world'); 9 | }) 10 | 11 | app.get('/hello', function (request, response) { 12 | // console.log(res) 13 | response.send('

    Hello! I am a computer

    '); 14 | }) 15 | 16 | app.listen(PORT, () => { 17 | console.log("http://localhost:" + PORT); 18 | }); -------------------------------------------------------------------------------- /L4-CSS/3_Specificity/1_index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Specificity 5 | 22 | 23 | 24 | 25 |
    26 | I am a div 27 |
    28 | 29 | -------------------------------------------------------------------------------- /L12-AsyncProgramming/1_SyncTasks/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 |

    Hello Learning Sync Tasks

    11 | 12 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /L17-DOM-API/4_weatherApi/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /L2-TerminalCommands/classwork/1_pwd.md: -------------------------------------------------------------------------------- 1 | ### `pwd` Command - Print the Current Working Directory 2 | 3 | The `pwd` (print working directory) command is used to display the **absolute path** of the current directory you are in. This command is useful when you're unsure of your current location in the file system. 4 | 5 | ### Syntax: 6 | 7 | ``` 8 | pwd 9 | ``` 10 | 11 | ### Example: 12 | 13 | ```bash 14 | pwd 15 | ``` 16 | 17 | This command will output the absolute path of the current directory. For example: 18 | 19 | ``` 20 | /home/user/Documents 21 | ``` 22 | -------------------------------------------------------------------------------- /L37-ReactJs/2_useEffect/src/App.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { useState } from "react"; 3 | import { useEffect } from "react"; 4 | 5 | const App = () => { 6 | const [cnt, setCnt] = useState(0); 7 | useEffect(() => { 8 | // setCnt(cnt + 1); // This will create an infinite loop 9 | console.log("Inside use effect"); 10 | }, []); 11 | 12 | return ( 13 |
    14 | I am app component: {cnt} 15 | 16 |
    17 | ); 18 | }; 19 | 20 | export default App; 21 | -------------------------------------------------------------------------------- /L9-MediaQueries-JS_Basics/1_MediaQueries/styles/navbar.css: -------------------------------------------------------------------------------- 1 | header{ 2 | height: 50px; 3 | width: 100%; 4 | background-color: red; 5 | color: white; 6 | position: sticky; 7 | top: 0; 8 | right: 0; 9 | z-index: 100; 10 | } 11 | 12 | header nav{ 13 | /* background-color: orange; */ 14 | height: 100%; 15 | display: flex; 16 | justify-content: flex-end; 17 | gap: 30px; 18 | margin-right: 40px; 19 | align-items: center; 20 | } 21 | 22 | header nav a{ 23 | color: white; 24 | text-decoration: none; 25 | } -------------------------------------------------------------------------------- /L15-Bindings-Classes/1_Bindings/10_WhyThisAndNotArgument.js: -------------------------------------------------------------------------------- 1 | function print() { 2 | console.log("Name", this.name) 3 | console.log("age", this.age) 4 | console.log("address", this.address) 5 | console.log("company", this.company) 6 | } 7 | 8 | 9 | let person = { 10 | name: 'kartik', 11 | age: 10, 12 | address: 'ajdasbdasbfbas basdbas', 13 | company: 'CB' 14 | } 15 | 16 | 17 | let person1 = { 18 | name: 'asdfasdasda', 19 | age: 10, 20 | address: 'ajdasbdasbfbas basdbas', 21 | company: 'CB' 22 | } 23 | 24 | print.call(person1); -------------------------------------------------------------------------------- /L44-Websockets/server/3_BroadCasting.js: -------------------------------------------------------------------------------- 1 | import { WebSocketServer } from 'ws'; 2 | 3 | const wss = new WebSocketServer({ port: 8080 }); 4 | 5 | let usersCount = 0; 6 | let allSockets = []; 7 | // allSockets = [socket1, socket2, socket3] 8 | // event -> connection 9 | wss.on('connection', function connection(socket) { 10 | usersCount++; 11 | 12 | // For BROADCASTING we need all the sockets 13 | allSockets.push(socket); 14 | 15 | allSockets.forEach((socket) => { 16 | socket.send(`Total Users: ${usersCount}`); 17 | }) 18 | }); 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/4_ObjectLoops.js: -------------------------------------------------------------------------------- 1 | let person = { 2 | // key : value, 3 | name: 'Ashish', 4 | age: 20, 5 | "college": 'BITS', 6 | '': "Empty string inside person", 7 | ' ': "Space key ki value hoon mei", 8 | 'last name': "Gupta" 9 | } 10 | 11 | // For-In loop 12 | // For every 'key->k' that is present inside person object 13 | for (let k in person) { 14 | console.log(k, ' : ', person[k]); 15 | } 16 | 17 | person['country'] = "India"; 18 | console.log(person); 19 | 20 | delete person.country; 21 | console.log(person); -------------------------------------------------------------------------------- /L2-TerminalCommands/classwork/4_mkdir.md: -------------------------------------------------------------------------------- 1 | ## 1. `mkdir` Command 2 | The `mkdir` command is used to **create directories**. 3 | 4 | ### Syntax: 5 | ``` 6 | mkdir [options] directory_name 7 | ``` 8 | 9 | ### Common Options: 10 | - **`-p`**: Create parent directories if they don't exist. 11 | 12 | ### Example: 13 | ```bash 14 | mkdir my_directory 15 | mkdir -p parent_directory/child_directory 16 | ``` 17 | In the first example, `my_directory` is created in the current directory. In the second, both `parent_directory` and `child_directory` are created if they don’t already exist. 18 | -------------------------------------------------------------------------------- /L36-ReactJS/2_customhooks/src/hooks/useCounterAdvanced.jsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | 3 | export default function useCounterAdvanced(initialValue) { 4 | const [cnt, setCnt] = useState(initialValue); 5 | 6 | function increment() { 7 | if(cnt < 10) setCnt(cnt + 1); 8 | else setCnt(0); 9 | } 10 | 11 | function decrement() { 12 | setCnt(cnt - 1); 13 | } 14 | 15 | function resetCounter() { 16 | setCnt(initialValue); 17 | } 18 | 19 | return { 20 | cnt, 21 | increment, 22 | decrement, 23 | resetCounter, 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/3_reactrouters/src/components/About.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const About = () => { 4 | return ( 5 |
    6 |

    About Us

    7 | 8 |

    9 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Eius quis quod, at voluptates necessitatibus aperiam corporis excepturi quo vel non laboriosam voluptatibus, illo eveniet impedit accusamus, iusto nostrum sed alias eaque quam nulla voluptas? Aliquid optio ducimus necessitatibus veniam iure? 10 |

    11 |
    12 | ) 13 | } 14 | 15 | export default About 16 | -------------------------------------------------------------------------------- /L42-Project-Blog/backend/routes/posts.js: -------------------------------------------------------------------------------- 1 | const auth = require('../middleware/auth'); 2 | const router = require('express').Router(); 3 | const postCtrl = require('../controllers/postsController'); 4 | const { upload } = require('../middleware/imageUpload'); 5 | 6 | router.get('/', postCtrl.getAllPosts); 7 | router.get('/:id', postCtrl.getPostById); 8 | router.post('/', auth, upload.single('file'), postCtrl.createPost); 9 | router.put('/:id', auth, upload.single('file'), postCtrl.updatePost); 10 | router.delete('/:id', auth, postCtrl.deletePost); 11 | 12 | module.exports = router; -------------------------------------------------------------------------------- /L16-Class-DOM/2_DOM/1_AccessElements.js: -------------------------------------------------------------------------------- 1 | // let h = document.getElementById('heading');// Single element 2 | // console.log(h); 3 | let movies = document.getElementsByClassName('movie'); // Collection 4 | console.log(movies) 5 | 6 | let h = document.querySelector('#heading'); // Single Element 7 | console.log(h) 8 | 9 | // Upr se jo bhi pehla element movie class ke saath milega usse select kr lega 10 | h = document.querySelector('.movie'); // Single Element 11 | console.log(h) 12 | 13 | h = document.querySelectorAll('.movie'); // All Elements on page with class movie 14 | console.log(h) -------------------------------------------------------------------------------- /L28-MongooseAndProject/1_ProjectStructure/app.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const app = express(); 3 | const PORT = 4444; 4 | 5 | app.use(express.json()); 6 | app.use(express.urlencoded({ extended: true })); 7 | 8 | const connectMongo = require('./database/db'); 9 | 10 | connectMongo().then(() => { 11 | app.listen(PORT, () => { 12 | console.log(`http://localhost:` + PORT); 13 | }); 14 | }) 15 | .catch(err => { 16 | throw Error(err); 17 | }) 18 | 19 | const todosRouter = require('./routes/todos'); 20 | app.use('/todos', todosRouter); 21 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/2_anchortag-correct/src/components/About.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const About = () => { 4 | return ( 5 |
    6 |

    About Us

    7 | 8 |

    9 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Eius quis quod, at voluptates necessitatibus aperiam corporis excepturi quo vel non laboriosam voluptatibus, illo eveniet impedit accusamus, iusto nostrum sed alias eaque quam nulla voluptas? Aliquid optio ducimus necessitatibus veniam iure? 10 |

    11 |
    12 | ) 13 | } 14 | 15 | export default About 16 | -------------------------------------------------------------------------------- /L16-Class-DOM/1_Classes/2_ClassesInheritance.js: -------------------------------------------------------------------------------- 1 | class Person { 2 | constructor(name, age) { 3 | this.name = name; 4 | this.age = age; 5 | } 6 | } 7 | 8 | 9 | class Student extends Person { 10 | constructor(name, age, marks) { 11 | super(name, age); 12 | this.marks = marks; 13 | } 14 | } 15 | 16 | let s = new Student('Vaibhav', 10, 100); 17 | console.log(s); 18 | 19 | console.log(Student.prototype.__proto__ == Person.prototype) 20 | console.log(Person.prototype.__proto__ == Object.prototype) 21 | console.log(s.__proto__ == Student.prototype) -------------------------------------------------------------------------------- /L37-ReactJs/1_rerendering/src/RenderFix2.jsx: -------------------------------------------------------------------------------- 1 | import React, { memo, useState } from "react"; 2 | 3 | const Child1 = memo(function Child1({ data }) { 4 | console.log("Running Child", data); 5 | 6 | return
    I am a Child : {data}
    ; 7 | }); 8 | 9 | function Parent() { 10 | const [cnt, setCnt] = useState(0); 11 | return ( 12 |
    13 | 14 | 15 | 16 | 17 |
    18 | ); 19 | } 20 | 21 | export default Parent; 22 | -------------------------------------------------------------------------------- /L44-Websockets/server/2_ClientToServerData.js: -------------------------------------------------------------------------------- 1 | import { WebSocketServer } from 'ws'; 2 | 3 | const wss = new WebSocketServer({ port: 8080 }); 4 | 5 | // event -> connection 6 | wss.on('connection', function connection(ws) { 7 | ws.send("Welcome to the server"); 8 | 9 | // event-> message, this will get triggered 10 | // when client will send a message 11 | ws.on('message', (data) => { 12 | console.log(data.toString()); 13 | // We sent the data back to the client 14 | ws.send(`You sent ${data.toString()}`) 15 | }) 16 | }); 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /L15-Bindings-Classes/2_classSyntax/4_getterAndSetter.js: -------------------------------------------------------------------------------- 1 | class Person { 2 | constructor(name, age) { 3 | this.name = name; 4 | this.age = age; 5 | } 6 | 7 | print() { 8 | console.log(this.name, this.age) 9 | } 10 | 11 | // getter and setter acts like property not a function 12 | get getName() { 13 | return this.name 14 | } 15 | set setName(newName) { 16 | this.name = newName 17 | } 18 | } 19 | 20 | let p = new Person("Kartik", 25); 21 | console.log(p) 22 | 23 | p.setName = "Kartik Mathur" 24 | console.log(p.getName); 25 | -------------------------------------------------------------------------------- /L30-TypeScript/src/types_ts/5_Task.ts: -------------------------------------------------------------------------------- 1 | type Mentor = { 2 | name: string; 3 | teaches: string; 4 | }; 5 | 6 | type CommunityManager = { 7 | name: string; 8 | manages: string; 9 | }; 10 | 11 | type TeamMember = Mentor | CommunityManager; 12 | 13 | const kartik: TeamMember = { 14 | name: "Kartik", 15 | teaches: "Web Dev", 16 | }; 17 | 18 | const Abhishek: TeamMember = { 19 | name: "Abhishek", 20 | manages: "Discord", 21 | }; 22 | 23 | function describe(member: TeamMember): void { 24 | console.log("Name:", member.name); 25 | } 26 | 27 | describe(kartik); 28 | describe(Abhishek); 29 | -------------------------------------------------------------------------------- /L41-Redux/fullStackApp/backend/app.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const express = require('express'); 3 | const app = express(); 4 | const PORT = 4444; 5 | const cors = require('cors'); 6 | 7 | app.use(cors()); 8 | app.use(express.json()); 9 | app.use(express.urlencoded({ extended: true })); 10 | 11 | const todos = ['Cricket', 'Dance', 'Sing']; 12 | 13 | // http://localhost:4444/get-todos 14 | app.get('/get-todos', (req, res) => { 15 | res.status(200).json({ 16 | todos 17 | }) 18 | }) 19 | 20 | app.listen(PORT, () => { 21 | console.log(`http://localhost:` + PORT); 22 | }); -------------------------------------------------------------------------------- /L42-Project-Blog/backend/prisma/migrations/20250718151839_init/migration.sql: -------------------------------------------------------------------------------- 1 | -- CreateTable 2 | CREATE TABLE "User" ( 3 | "id" SERIAL NOT NULL, 4 | "username" TEXT NOT NULL, 5 | "email" TEXT NOT NULL, 6 | "password" TEXT NOT NULL, 7 | "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, 8 | "updatedAt" TIMESTAMP(3) NOT NULL, 9 | 10 | CONSTRAINT "User_pkey" PRIMARY KEY ("id") 11 | ); 12 | 13 | -- CreateIndex 14 | CREATE UNIQUE INDEX "User_username_key" ON "User"("username"); 15 | 16 | -- CreateIndex 17 | CREATE UNIQUE INDEX "User_email_key" ON "User"("email"); 18 | -------------------------------------------------------------------------------- /L13-Promises/2_PromiseBasics2.js: -------------------------------------------------------------------------------- 1 | let p = new Promise((res, rej) => { 2 | let kyaPromisePooraHua = true; 3 | 4 | setTimeout(() => { 5 | console.log("Resolve ya reject call ho raha hai") 6 | if (kyaPromisePooraHua) res(); 7 | else rej(); 8 | }, 5000); 9 | }) 10 | 11 | console.log(".then and .catch define ho rahe hai"); 12 | 13 | p 14 | .then(function () { 15 | console.log("Promise Poora ho gaya"); 16 | }) 17 | .catch(function () { 18 | console.log("Promise Toot gaya"); 19 | }) 20 | 21 | console.log("p.then and p.catch ke baad ki line"); -------------------------------------------------------------------------------- /L16-Class-DOM/2_DOM/2_InnerContent.js: -------------------------------------------------------------------------------- 1 | // Accessing the inner content 2 | // 1. innerText 3 | // 2. innerHTML 4 | 5 | h = document.querySelector('.movieList'); 6 | console.log(h.innerText) 7 | console.log(h.innerHTML) 8 | 9 | h.innerHTML += `
  • Meri movie
  • ` 10 | // h.innerText += `
  • Meri nai movie
  • ` 11 | 12 | let movie = document.querySelector('.movie'); 13 | console.log(movie.innerText) 14 | 15 | // Yeh nhi chlega 16 | // let movies = document.querySelectorAll('.movie'); 17 | // console.log(movies) 18 | // movies.push('
  • Meri nai movie
  • ') // Allowed nhi hai 19 | // console.log(movies) -------------------------------------------------------------------------------- /L11-Closure-Scopes-AsyncProgramming/2_Currying/script.js: -------------------------------------------------------------------------------- 1 | /*function add(num) { 2 | if (!num) return 0; 3 | 4 | return function helper(v) { 5 | if (!v) return num; 6 | 7 | num += v; 8 | return helper; 9 | } 10 | }*/ 11 | let add = function (num) { 12 | if (!num) return 0; 13 | 14 | return function helper(v) { 15 | if (!v) return num; 16 | 17 | num += v; 18 | return helper; 19 | } 20 | } 21 | 22 | console.log(add()) 23 | console.log(add(1)()) 24 | console.log(add(1)(2)()) 25 | console.log(add(1)(2)(3)()) 26 | console.log(add(1)(2)(3)(4)()) -------------------------------------------------------------------------------- /L13-Promises-Prototypes/1_Promises/3_Promises-allExample.js: -------------------------------------------------------------------------------- 1 | let p1 = new Promise((res, rej) => { 2 | setTimeout(() => { 3 | res("Hello") 4 | }, 1000); 5 | }) 6 | 7 | let p2 = new Promise((res, rej) => { 8 | setTimeout(() => { 9 | res("World") 10 | }, 1000); 11 | }) 12 | 13 | let p3 = new Promise((res, rej) => { 14 | let resolveKarein = false; 15 | if(!resolveKarein) return rej("Nahi ho paaya kaam"); 16 | res("How are you?") 17 | }) 18 | 19 | 20 | Promise.all([p1, p2, p3]).then((d) => { 21 | console.log(d); 22 | }).catch(msg=>{ 23 | console.log(msg) 24 | }) -------------------------------------------------------------------------------- /L2-TerminalCommands/classwork/0_Setup.txt: -------------------------------------------------------------------------------- 1 | 2 | Start the following things 3 | 4 | Mac/Linux: 5 | - Terminal 6 | 7 | Windows: 8 | - Powershell 9 | 10 | 11 | Commands Structure: 12 | 1. pwd 13 | 2. ls 14 | 3. cd - To change director(Folder) 15 | 4. mkdir - Create directory(Folder) 16 | 5. touch - To create files 17 | 6. echo > file_name - To create file in windows 18 | 7. vim - To write inside files 19 | 20 | # How to use vim 21 | 1. File open karo vim se 22 | - vim file_name 23 | 2. Press i 24 | 3. Add the content inside the file 25 | 4. Press esc on keyboard 26 | 5. Type :wq 27 | 6. hit enter -------------------------------------------------------------------------------- /L3-HTMLCSS/sample/src/features/actions/counter.jsx: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit'; 2 | 3 | const counterSlice = createSlice({ 4 | name: 'counter', 5 | initialState: { value: 0 }, 6 | reducers: { 7 | increment: (state) => { 8 | state.value += 1; 9 | }, 10 | decrement: (state) => { 11 | state.value -= 1; 12 | }, 13 | reset: (state) => { 14 | state.value = 0; 15 | }, 16 | }, 17 | }); 18 | 19 | export const { increment, decrement, reset } = counterSlice.actions; 20 | export default counterSlice; 21 | -------------------------------------------------------------------------------- /L31-Typescript/2_interface-as-class.txt: -------------------------------------------------------------------------------- 1 | // Iska khud ka koi astitiv nhi hai, isse aapko create krna padega 2 | interface Person { 3 | name: string; 4 | age: number; 5 | greet: () => void; 6 | } 7 | 8 | class Mentors implements Person { 9 | name: string; 10 | age: number; 11 | constructor(name: string, age: number) { 12 | this.name = name; 13 | this.age = age; 14 | } 15 | 16 | greet() { 17 | console.log("Good evening", this.name); 18 | } 19 | } 20 | 21 | let kartik = new Mentors("Kartik",20); 22 | console.log(kartik.name); 23 | console.log(kartik.age); 24 | kartik.greet(); 25 | -------------------------------------------------------------------------------- /L37-ReactJs/2_useEffect/src/CleanUp.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { useState } from "react"; 3 | import { useEffect } from "react"; 4 | 5 | const CleanUp = () => { 6 | const [cnt, setCnt] = useState(0); 7 | 8 | useEffect(() => { 9 | let id = setInterval(() => { 10 | setCnt((prevCnt) => { 11 | console.log(prevCnt); 12 | return prevCnt + 1; 13 | }); 14 | }, 1000); 15 | 16 | // Cleanup function 17 | return () => { 18 | clearInterval(id); 19 | }; 20 | }); 21 | 22 | return
    {cnt}
    ; 23 | }; 24 | 25 | export default CleanUp; 26 | -------------------------------------------------------------------------------- /L4-CSS/2_CSS/3_Internal.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Internal CSS 7 | 8 | 9 | 17 | 18 | 19 | 20 |
    Dog Says Bhau Bhau...
    21 | 22 | -------------------------------------------------------------------------------- /L41-Redux/1_rtk/src/redux/slices/todoSlice.js: -------------------------------------------------------------------------------- 1 | import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' 2 | 3 | export const todosApi = createApi({ 4 | reducerPath: 'todosApi', 5 | baseQuery: fetchBaseQuery({ baseUrl: 'https://dummyjson.com/' }), 6 | endpoints: (builder) => ({ 7 | getTodos: builder.query({ 8 | query: () => `todos`, 9 | }), 10 | getTodosNumber: builder.query({ 11 | query: (limit) => `todos/?limit=${limit}` 12 | }) 13 | }), 14 | }) 15 | 16 | export const { useGetTodosQuery, useGetTodosNumberQuery } = todosApi -------------------------------------------------------------------------------- /L6-CSS-Flexboxes-Grids-Positions/4_img/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 14 | 15 | 16 | 17 | 18 | A beautiful girl checking pink color flowers 20 | 21 | 22 | -------------------------------------------------------------------------------- /L42-Project-Blog/backend/prisma/migrations/20250722140737_adding_posts_collection/migration.sql: -------------------------------------------------------------------------------- 1 | -- CreateTable 2 | CREATE TABLE "Post" ( 3 | "id" SERIAL NOT NULL, 4 | "title" TEXT NOT NULL, 5 | "content" TEXT NOT NULL, 6 | "authorId" INTEGER NOT NULL, 7 | "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, 8 | "updatedAt" TIMESTAMP(3) NOT NULL, 9 | 10 | CONSTRAINT "Post_pkey" PRIMARY KEY ("id") 11 | ); 12 | 13 | -- AddForeignKey 14 | ALTER TABLE "Post" ADD CONSTRAINT "Post_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; 15 | -------------------------------------------------------------------------------- /L22-ExpressJS/3_sendingStaticContent/app.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const app = express(); 3 | const path = require('path'); // provided by nodejs bydefault 4 | 5 | // Middleware: Built-in middleware 6 | // By default this will work for '/' request and it will load the index.html 7 | // on to the browser 8 | app.use(express.static(path.join(__dirname, 'public'))); 9 | 10 | // This will not work if there is index.html inside the public folder 11 | app.get('/', (req, res) => { 12 | res.send("Hiii!!"); 13 | }) 14 | 15 | 16 | app.listen(5555, () => { 17 | console.log("http://localhost:5555"); 18 | }) -------------------------------------------------------------------------------- /L16-Class-DOM/1_Classes/1_StaticMethods.js: -------------------------------------------------------------------------------- 1 | // static members they belong to classes(addArray) 2 | // non static belongs to object (name, age) 3 | class Person { 4 | constructor(name, age) { 5 | this.name = name; 6 | this.age = age; 7 | } 8 | 9 | static addArray() { 10 | let arr = [1, 2, 3, 4, 5]; 11 | let sum = 0; 12 | for (let i = 0; i < arr.length; i++) sum += arr[i]; 13 | 14 | return sum; 15 | } 16 | } 17 | 18 | let p = new Person('kartik', 123); 19 | // console.log(p.addArray()); // Error dega kyunki Object ke pass yeh nhi hota 20 | console.log(Person.addArray()) -------------------------------------------------------------------------------- /L3-HTMLCSS/sample/src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | // import "./index.css"; 4 | import App from "./App.jsx"; 5 | import { Provider } from "react-redux"; 6 | import { configureStore } from "@reduxjs/toolkit"; 7 | import counterSlice from "./features/actions/counter.jsx"; 8 | 9 | const store = configureStore({ 10 | reducer: counterSlice.reducer, 11 | }); 12 | 13 | store.subscribe(() => console.log(store.getState())); 14 | 15 | createRoot(document.getElementById("root")).render( 16 | 17 | 18 | 19 | ); 20 | -------------------------------------------------------------------------------- /L26-TodoComplete-Mongoose/2_mongoose/JsClasses.js: -------------------------------------------------------------------------------- 1 | class Car { 2 | constructor(name, price) { 3 | this.name = name; 4 | this.price = price; 5 | } 6 | 7 | print(){ 8 | console.log(this.name) 9 | } 10 | 11 | save(){ 12 | return new Promise((res,rej)=>{ 13 | // Store in db and call res() 14 | }) 15 | } 16 | } 17 | 18 | let A = new Car("BMW", 1000000); 19 | console.log(A); 20 | 21 | A.print(); 22 | 23 | 24 | 25 | let person = { 26 | name: 'Vaibhav', 27 | isAdult: true 28 | } 29 | 30 | person.isAdult = !person.isAdult; 31 | 32 | console.log(person); -------------------------------------------------------------------------------- /L39-Routers-Hooks/6_TodoApp/src/App.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import TodoInput from "./components/TodoInput"; 3 | import { useState } from "react"; 4 | import TodoDisplay from "./components/TodoDisplay"; 5 | 6 | const App = () => { 7 | const [todos, setTodos] = useState([]); 8 | 9 | function addTodo(task) { 10 | // we will add task to todos state[] 11 | setTodos([...todos, { name: task, completed: false }]); 12 | } 13 | 14 | return ( 15 |
    16 | 17 | 18 | 19 |
    20 | ); 21 | }; 22 | 23 | export default App; 24 | -------------------------------------------------------------------------------- /L41-Redux/1_rtk/src/components/Error.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const ErrorMessage = ({ message }) => { 4 | const styles = { 5 | container: { 6 | padding: "12px 16px", 7 | backgroundColor: "#ffe5e5", 8 | color: "#d8000c", 9 | border: "1px solid #d8000c", 10 | borderRadius: "4px", 11 | margin: "10px 0", 12 | fontFamily: "Arial, sans-serif", 13 | fontSize: "14px", 14 | }, 15 | }; 16 | 17 | return ( 18 |
    19 | Error: 20 | {message} 21 |
    22 | ); 23 | }; 24 | 25 | export default ErrorMessage; 26 | -------------------------------------------------------------------------------- /L42-Project-Blog/backend/prisma/migrations/20250731142906_adding_tags_model/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Post" ADD COLUMN "tagId" INTEGER; 3 | 4 | -- CreateTable 5 | CREATE TABLE "Tag" ( 6 | "id" SERIAL NOT NULL, 7 | "name" TEXT NOT NULL, 8 | "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, 9 | 10 | CONSTRAINT "Tag_pkey" PRIMARY KEY ("id") 11 | ); 12 | 13 | -- CreateIndex 14 | CREATE UNIQUE INDEX "Tag_name_key" ON "Tag"("name"); 15 | 16 | -- AddForeignKey 17 | ALTER TABLE "Post" ADD CONSTRAINT "Post_tagId_fkey" FOREIGN KEY ("tagId") REFERENCES "Tag"("id") ON DELETE SET NULL ON UPDATE CASCADE; 18 | -------------------------------------------------------------------------------- /L10-JS-Arrays-Objects-Loops-Functions/1_Classwork/6_FunctionAsDataTypes.js: -------------------------------------------------------------------------------- 1 | let a = 10; // Number is a datatype we can store it inside a variable 2 | 3 | console.log(a); 4 | 5 | a = function helloWorld() { // Function is also a datatype, we can store it inside a variable 6 | console.log("Hello World"); 7 | } 8 | 9 | a(); 10 | // helloWorld(); // This this cannot be done, because yeh ab a mei stored h 11 | 12 | a = function () { 13 | console.log("Hello World!!!!!"); 14 | } 15 | 16 | a(); // To we can ignore helloWorld name in general 17 | console.log(a); // [Function: a] 18 | console.log(a.toString()); // Will print the entire function as string -------------------------------------------------------------------------------- /L11-Closure-Scopes-AsyncProgramming/4_letVsVar/1_Hoisting/4_AfterHoisting.js: -------------------------------------------------------------------------------- 1 | // Only the LHS part will get hoisted in case of var creation. Value will be assigned 2 | // When the program will RUN 3 | var helloWorld; 4 | // The entire function gets hosited.. 5 | function sayHello() { 6 | console.log("Hello"); 7 | } 8 | /* ---------------------------------------- */ 9 | 10 | console.log(helloWorld); 11 | 12 | helloWorld = function () { 13 | console.log("Hello world"); 14 | } 15 | 16 | console.log(helloWorld); 17 | 18 | console.log("Say Hello before function calling", sayHello); 19 | console.log("Say Hello Funcn after function calling", sayHello); -------------------------------------------------------------------------------- /L42-Project-Blog/client/src/api/auth.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | const API_URL = 'http://localhost:4444/api/auth'; 4 | 5 | // const api = axios.create({ 6 | // baseURL: API_URL 7 | // }) 8 | 9 | export const signup = (username, email, password) => { 10 | return axios.post( 11 | `${API_URL}/signup`, 12 | { username, email, password }, 13 | { withCredentials: true } // cookies bhi saath jaengi 14 | ) 15 | }; 16 | 17 | export const login = (email, password) => { 18 | return axios.post( 19 | `${API_URL}/login`, 20 | { email, password }, 21 | { withCredentials: true } 22 | ); 23 | }; -------------------------------------------------------------------------------- /L20-InterviewQuestions/1_Polyfill_MFR/Bind.js: -------------------------------------------------------------------------------- 1 | function hello(college, year) { 2 | console.log(this, college, year); 3 | } 4 | 5 | let obj = { 6 | name: 'abc' 7 | } 8 | 9 | Function.prototype.mybind = function (myObj, ...args) { 10 | let fun = this; 11 | /* 12 | fun = [Function: hello] 13 | */ 14 | // console.log(args); ["NSIT"] 15 | return function (...args1) { 16 | // console.log(args1); [2025] 17 | fun.apply(myObj, [...args, ...args1]); // hello function ko call kr diya 18 | // by setting the `this` inside of `fun` to `hello` 19 | } 20 | } 21 | 22 | let f = hello.mybind(obj, "NSUT", 2025); 23 | f(); -------------------------------------------------------------------------------- /L39-Routers-Hooks/6_TodoApp/src/components/TodoInput.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { useRef } from "react"; 3 | 4 | const TodoInput = ({ addTodo }) => { 5 | const inpRef = useRef(); 6 | 7 | function addTodoHandler() { 8 | addTodo(inpRef.current.value); 9 | inpRef.current.value = ""; 10 | } 11 | 12 | return ( 13 |
    14 | 20 | 21 |
    22 | ); 23 | }; 24 | 25 | export default TodoInput; 26 | -------------------------------------------------------------------------------- /L36-ReactJS/1_components/src/components/TodoApp.jsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import TodoDisplay from "./TodoDisplay.jsx"; 3 | import TodoInput from "./TodoInput.jsx"; 4 | 5 | export default function TodoApp() { 6 | const [todos, setTodos]=useState([]); 7 | const [taskValue, setTaskValue] = useState(""); 8 | 9 | return ( 10 |
    11 |

    Todo Application - Component Wise

    12 | 13 | 19 | 20 | 21 |
    22 | ); 23 | } -------------------------------------------------------------------------------- /L13-Promises/3_PromiseChaining.js: -------------------------------------------------------------------------------- 1 | let p = new Promise((res, rej) => { 2 | rej(); // Promise humesha resolve hoga 3 | }) 4 | 5 | p 6 | .then(() => { 7 | console.log("Promise poora hua") 8 | return 2; // Promise always returns a promise 9 | }) 10 | .then((data) => { 11 | console.log("First promise returned", data); 12 | return data * 2; 13 | }) 14 | .then((data) => { 15 | console.log("Second promise returned", data); 16 | return data * 2; 17 | }) 18 | .then((data) => { 19 | console.log(data) 20 | }) 21 | .catch(() => { 22 | console.log("Promise fail ho gaya"); 23 | }) -------------------------------------------------------------------------------- /L16-Class-DOM/3_DOM-2/3_innerHTMLvsAppenChild.js: -------------------------------------------------------------------------------- 1 | let movieList = document.querySelector('.movieList'); 2 | console.log(movieList) 3 | 4 | let arr = ['Avatar', 'Mr Bean-1', 'GAME', 'RUN', 'Harry Potter', 'Talash'] 5 | 6 | for (let e of arr) { 7 | movieList.innerHTML += `
  • ${e}
  • ` 8 | } 9 | 10 | console.log(movieList.inner) 11 | setTimeout(() => { 12 | // Way - 1: O(N) 13 | // movieList.innerHTML += `
  • Coding
  • ` 14 | 15 | // Way - 2: O(1) 16 | let li = document.createElement('li'); 17 | li.innerText = 'Coding Bilaaks'; 18 | li.classList.add('movie'); 19 | 20 | movieList.appendChild(li); 21 | }, 3000); -------------------------------------------------------------------------------- /L17-DOM-API/2_Form/script.js: -------------------------------------------------------------------------------- 1 | let form = document.querySelector('#form'); 2 | let platform = document.querySelector('#platform'); 3 | let inp = document.querySelector('input'); 4 | 5 | form.addEventListener('submit', (ev) => { 6 | ev.preventDefault(); // Form ko by default submit hone se rokk dega 7 | // console.log("Form submitted"); 8 | // console.log(inp.value) 9 | // console.log(platform.value) 10 | 11 | if (platform.value == 'Google') { 12 | window.location = `https://www.google.com/search?q=${inp.value}` 13 | } 14 | else { 15 | window.location = `https://search.yahoo.com/search?p=${inp.value}` 16 | } 17 | }) 18 | 19 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/3_reactrouters/src/components/Contact.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Contact = () => { 4 | return ( 5 |
    6 |

    Contact Us

    7 | 8 |

    +91-9999999999

    9 |

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Fugiat voluptate omnis, consequatur doloremque provident, sunt quas nemo tempore iusto explicabo nesciunt quasi sint nihil aspernatur excepturi sit repellat deleniti minima? Vel assumenda autem, tenetur accusamus, totam, iste est atque magnam porro accusantium enim dolores earum excepturi incidunt quos repellat temporibus.

    10 |
    11 | ) 12 | } 13 | 14 | export default Contact 15 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/4_nestedRoutes/src/components/Contact.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Contact = () => { 4 | return ( 5 |
    6 |

    Contact Us

    7 | 8 |

    +91-9999999999

    9 |

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Fugiat voluptate omnis, consequatur doloremque provident, sunt quas nemo tempore iusto explicabo nesciunt quasi sint nihil aspernatur excepturi sit repellat deleniti minima? Vel assumenda autem, tenetur accusamus, totam, iste est atque magnam porro accusantium enim dolores earum excepturi incidunt quos repellat temporibus.

    10 |
    11 | ) 12 | } 13 | 14 | export default Contact 15 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/5_lazyLoading/src/components/Contact.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Contact = () => { 4 | return ( 5 |
    6 |

    Contact Us

    7 | 8 |

    +91-9999999999

    9 |

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Fugiat voluptate omnis, consequatur doloremque provident, sunt quas nemo tempore iusto explicabo nesciunt quasi sint nihil aspernatur excepturi sit repellat deleniti minima? Vel assumenda autem, tenetur accusamus, totam, iste est atque magnam porro accusantium enim dolores earum excepturi incidunt quos repellat temporibus.

    10 |
    11 | ) 12 | } 13 | 14 | export default Contact 15 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/2_anchortag-correct/src/components/Contact.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Contact = () => { 4 | return ( 5 |
    6 |

    Contact Us

    7 | 8 |

    +91-9999999999

    9 |

    Lorem ipsum dolor sit amet consectetur adipisicing elit. Fugiat voluptate omnis, consequatur doloremque provident, sunt quas nemo tempore iusto explicabo nesciunt quasi sint nihil aspernatur excepturi sit repellat deleniti minima? Vel assumenda autem, tenetur accusamus, totam, iste est atque magnam porro accusantium enim dolores earum excepturi incidunt quos repellat temporibus.

    10 |
    11 | ) 12 | } 13 | 14 | export default Contact 15 | -------------------------------------------------------------------------------- /L42-Project-Blog/backend/middleware/auth.js: -------------------------------------------------------------------------------- 1 | const jwt = require('jsonwebtoken'); 2 | module.exports = function (req, res, next) { 3 | const { token } = req.cookies; 4 | // if token is missing I cannot fetch userId, thus I cannot allow to add a 5 | // post 6 | if (!token) return res.status(404).json({ 7 | message: 'Authentication Failed' 8 | }) 9 | 10 | const tokenData = jwt.verify(token, process.env.JWT_SECRET); 11 | console.log("Token Data", tokenData); 12 | 13 | req.userId = tokenData.id; 14 | 15 | next(); // if user is found so store its ID inside the token 16 | // and then we can actually fetch if anywhere by req.userId 17 | } -------------------------------------------------------------------------------- /L13-Promises/5_PromisesNames.js: -------------------------------------------------------------------------------- 1 | function downloadMovie(url) { 2 | return new Promise((res, rej) => { 3 | if (!url) rej("URL not provided"); 4 | else { 5 | console.log("Download started"); 6 | setTimeout(() => { 7 | let movieName = url.split('/').pop(); 8 | res(movieName) 9 | }, 2000); 10 | } 11 | }); 12 | } 13 | 14 | let p = downloadMovie('http://fakeurl.com/movie/jaanidushman.mp4'); 15 | // let p = downloadMovie(); // catch call kr dega 16 | 17 | p.then((movieName) => { 18 | console.log("Download completed", movieName) 19 | }).catch(msg => { 20 | console.log(msg); 21 | }) 22 | -------------------------------------------------------------------------------- /L28-MongooseAndProject/3_Bcrypt-Salt/models/User.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const bcrypt = require('bcrypt'); 3 | 4 | const userSchema = new mongoose.Schema({ 5 | email: { 6 | type: String, 7 | required: true, 8 | unique: true 9 | }, 10 | password: { 11 | type: String, 12 | required: true 13 | } 14 | }) 15 | 16 | userSchema.pre('save', async function (next) { 17 | console.log("Inside pre-save", this); 18 | const hash = await bcrypt.hash(this.password, 10); 19 | console.log(hash) 20 | this.password = hash; 21 | next(); 22 | }) 23 | 24 | module.exports = mongoose.model('users', userSchema); -------------------------------------------------------------------------------- /L33-Prisma/src/read.ts: -------------------------------------------------------------------------------- 1 | // 1 2 | import { PrismaClient } from "../generated/prisma"; 3 | import { withAccelerate } from "@prisma/extension-accelerate"; 4 | 5 | // 2 6 | const prisma = new PrismaClient().$extends(withAccelerate()); 7 | 8 | // 3 9 | async function main() { 10 | const allUsers = await prisma.user.findUnique({ 11 | where: { 12 | id: 1 13 | }, 14 | }); 15 | 16 | console.log("All Users", allUsers); 17 | } 18 | 19 | // 4 20 | main() 21 | .then(async () => { 22 | await prisma.$disconnect(); 23 | }) 24 | .catch(async (e) => { 25 | console.error(e); 26 | // 5 27 | await prisma.$disconnect(); 28 | process.exit(1); 29 | }); 30 | -------------------------------------------------------------------------------- /L17-DOM-API/3_Api/1_fetch.js: -------------------------------------------------------------------------------- 1 | let url = 'https://jsonplaceholder.typicode.com/todos'; 2 | let tasklist = document.querySelector('#tasklist'); 3 | 4 | function addToTaskList(data) { 5 | for (let i = 0; i < data.length; i++) { 6 | const element = data[i]; 7 | // console.log(element.title) 8 | let li = document.createElement('li'); 9 | li.innerText = element.title; 10 | tasklist.appendChild(li); 11 | } 12 | } 13 | 14 | // Fetch ek promise hai 15 | fetch(url) 16 | .then(data => { 17 | return data.json(); 18 | }).then(data => { 19 | addToTaskList(data); 20 | }).catch(err => { 21 | console.log(err) 22 | }) -------------------------------------------------------------------------------- /L33-Prisma/src/delete.ts: -------------------------------------------------------------------------------- 1 | // 1 2 | import { PrismaClient } from "../generated/prisma"; 3 | import { withAccelerate } from "@prisma/extension-accelerate"; 4 | 5 | // 2 6 | const prisma = new PrismaClient().$extends(withAccelerate()); 7 | 8 | // 3 9 | async function main() { 10 | const deletedUser = await prisma.user.delete({ 11 | where: { 12 | id: 1, 13 | }, 14 | }); 15 | 16 | console.log("All Users", deletedUser); 17 | } 18 | 19 | // 4 20 | main() 21 | .then(async () => { 22 | await prisma.$disconnect(); 23 | }) 24 | .catch(async (e) => { 25 | console.error(e); 26 | // 5 27 | await prisma.$disconnect(); 28 | process.exit(1); 29 | }); 30 | -------------------------------------------------------------------------------- /L15-Bindings-Classes/1_Bindings/8_BindingQuestion3.js: -------------------------------------------------------------------------------- 1 | /* 2 | function hello() { 3 | console.log(this.a); 4 | } 5 | 6 | let obj1 = { a: 1 } 7 | let obj2 = { a: 11 } 8 | 9 | hello.call(obj1); // 1 10 | hello.call(obj2); // 11 11 | */ 12 | 13 | this.a = 'Mei hoon a of this'; 14 | 15 | let myHello = () => { 16 | console.log(this.a); // Here this will point to global/window, irrespective of 17 | // how we call it in the current example. 18 | } 19 | 20 | let obj1 = { a: 1 } 21 | let obj2 = { a: 11 } 22 | 23 | myHello.call(obj1); 24 | myHello.call(obj2); 25 | 26 | 27 | // console.log(this); yaha this point krega to "module.exports"(JUST REMEMBER IT, DON'T THINK ABOUT IT FOR NOW) -------------------------------------------------------------------------------- /L16-Class-DOM/4_DOM-Task/script.js: -------------------------------------------------------------------------------- 1 | // for(let i = 1 ; i <= 1000 ; i++){ 2 | // console.log(i) 3 | // } 4 | // For numbers from 1-1000 5 | // i%3 == 0, print "Fizz" 6 | // i%5 == 0, print "Buzz" 7 | // i%15 == 0, print 'FizzBuzz' 8 | // else print number only 9 | let numberList = document.querySelector('.numberList'); 10 | for (let i = 1; i <= 1000; i++) { 11 | let str = ''; 12 | 13 | if (i % 3 == 0) str = 'Fizz'; 14 | if (i % 5 == 0) str += 'Buzz'; 15 | 16 | let x = ((str == '') ? i : str); 17 | // numberList.innerHTML += `
  • ${x}
  • ` 18 | 19 | // let li = document.createElement('li'); 20 | // li.innerText = x; 21 | // numberList.appendChild(li); 22 | } -------------------------------------------------------------------------------- /L4-CSS/2_CSS/5_external.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | 11 | 12 | 13 | 14 |
    I am a div-1
    15 |
    I am a div-2
    16 | 17 | 18 |
    I am a boy
    19 |
    I am a girl
    20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/4_nestedRoutes/src/components/NotFound.css: -------------------------------------------------------------------------------- 1 | .not-found-container { 2 | display: flex; 3 | justify-content: center; 4 | align-items: center; 5 | height: 100vh; 6 | background-color: #1a1a1a; 7 | color: #fff; 8 | font-family: "Arial", sans-serif; 9 | } 10 | 11 | .not-found-text { 12 | font-size: 3rem; 13 | animation: bounceFade 2s ease-in-out; 14 | } 15 | 16 | @keyframes bounceFade { 17 | 0% { 18 | transform: translateY(-30px); 19 | opacity: 0; 20 | } 21 | 22 | 50% { 23 | transform: translateY(10px); 24 | opacity: 1; 25 | } 26 | 27 | 100% { 28 | transform: translateY(0); 29 | } 30 | } -------------------------------------------------------------------------------- /L35-ReactJS/1_reactjsbasics/src/1_basics.jsx: -------------------------------------------------------------------------------- 1 | import { createRoot } from "react-dom/client"; 2 | 3 | function App(Task, Description) { 4 | return ( 5 |
      6 |
    • 7 | {Task}: {Description} 8 |
    • 9 |
    10 | ); 11 | } 12 | 13 | function App1(props) { 14 | const Task = props.name; 15 | const Description = props.description; 16 | return ( 17 |
      18 |
    • 19 | {Task}: {Description} 20 |
    • 21 |
    22 | ); 23 | } 24 | 25 | createRoot(document.getElementById("root")).render( 26 |
    27 | 28 | {App("Swim", "Love to Swim")} 29 |
    30 | ); 31 | -------------------------------------------------------------------------------- /L5-CSS/4_units/3_percentage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 20 | 21 | 22 | 23 | 24 |
    25 | I am div-1 - 10px 26 |
    27 | I am div-2 - 20px 28 |
    29 | I am div-3 - 10px 30 |
    31 |
    32 |
    33 | 34 | 35 | -------------------------------------------------------------------------------- /L11-Closure-Scopes-AsyncProgramming/5_ClosureMemoization/fibonacci.js: -------------------------------------------------------------------------------- 1 | function fibonacci(n) { 2 | if (n == 0) return n; 3 | if (n == 1 || n == 2) return 1; 4 | 5 | let a = 0, b = 1, c = 1; 6 | 7 | for (let i = 0; i < n - 2; i++) { 8 | a = b; 9 | b = c; 10 | c = a + b; 11 | } 12 | return c; 13 | } 14 | 15 | 16 | function memoize(fn) { 17 | let cache = {}; 18 | 19 | return function (n) { 20 | if (cache[n]) { 21 | return cache[n]; 22 | } 23 | let ans = fn(n); 24 | return cache[n] = ans; 25 | } 26 | } 27 | 28 | let fibo = memoize(fibonacci); 29 | 30 | console.log(fibo(5)); 31 | console.log(fibo(5)); 32 | -------------------------------------------------------------------------------- /L15-Bindings-Classes/1_Bindings/5_explicitBinding-bind.js: -------------------------------------------------------------------------------- 1 | function hello(name, age) { 2 | console.log(this, `Name: ${name} and age: ${age}`); 3 | } 4 | 5 | let obj1 = { a: 1 } 6 | let obj2 = { b: 2 } 7 | 8 | // 1. bind 9 | // function_name.bind(context, argument1, arg2, arg3); 10 | let fun = hello.bind(obj1, "Kartik", 20); 11 | let fun1 = hello.bind(obj2, "Yash", 12); 12 | 13 | // bind ekdum call nhi krega, instead ek function return kr dega that can be called 14 | // later on with this pointing to the context that user provided 15 | fun(); 16 | fun(); 17 | fun1(); 18 | 19 | let fun2 = hello.bind(obj1, "Devansh"); 20 | fun2(20); 21 | 22 | let fun3 = hello.bind(obj1); 23 | fun3("Vaibhav", 2222222); -------------------------------------------------------------------------------- /L16-Class-DOM/2_DOM/3_CSSHandling.js: -------------------------------------------------------------------------------- 1 | // let movies = document.querySelectorAll('.movie'); 2 | 3 | // for (let i = 0; i < movies.length; i++) { 4 | // let movie = movies[i]; 5 | 6 | // movie.style.color = 'orange'; 7 | // movie.style.backgroundColor = 'black'; 8 | // } 9 | 10 | // document.querySelector('body').style.backgroundColor = 'black' 11 | // document.querySelector('body').style.color = 'white' 12 | 13 | let movie = document.querySelector('.movie') 14 | // movie.classList.add('myMovie') 15 | 16 | // setTimeout(()=>{ 17 | // movie.classList.remove('myMovie') 18 | // },3000); 19 | 20 | setInterval(() => { 21 | document.querySelector('body').classList.toggle('myMovie'); 22 | }, 2000); -------------------------------------------------------------------------------- /L16-Class-DOM/2_DOM/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 12 | 13 | 14 | 15 | 16 |

    I am heading

    17 | 18 |
      19 |
    • Avatar
    • 20 |
    • Coding Blocks
    • 21 |
    • Gujju
    • 22 |
    • bujju
    • 23 |
    24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /L11-Closure-Scopes-AsyncProgramming/5_ClosureMemoization/factorial.js: -------------------------------------------------------------------------------- 1 | function fact(n) { 2 | let ans = 1; 3 | for (let i = 1; i <= n; i++) ans *= i; 4 | 5 | return ans; 6 | } 7 | 8 | 9 | function memoize(fn) { 10 | let cache = {}; 11 | 12 | return function (n) { 13 | if (cache[n]) { 14 | console.log("Returning the answer of", n, "from cache"); 15 | return cache[n]; 16 | } 17 | console.log("Calculating the answer for", n); 18 | let ans = fn(n); 19 | return cache[n] = ans; 20 | } 21 | } 22 | 23 | 24 | let myFact = memoize(fact); 25 | console.log(myFact(5)); // Calculate kia 26 | console.log(myFact(5)); // Cache se nikal kar diya -------------------------------------------------------------------------------- /L34-ReactJS/3_ClientSideRendering/app.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const path = require('path'); 3 | const app = express(); 4 | 5 | app.use(express.json()); // Axios ke liye middleware 6 | app.use(express.urlencoded({extended: true})); 7 | app.use(express.static(path.join(__dirname, 'public'))); 8 | 9 | 10 | let todos = []; 11 | 12 | app.get('/addtodo', (req, res) => { 13 | const { task, description } = req.query; 14 | // console.log(task, description); 15 | todos.push({ 16 | name: task, 17 | description 18 | }) 19 | // console.log(todos) 20 | 21 | res.send(todos); 22 | }) 23 | 24 | 25 | app.listen(4444, () => { 26 | console.log('http://localhost:4444') 27 | }) -------------------------------------------------------------------------------- /L20-InterviewQuestions/1_Polyfill_MFR/Filter.js: -------------------------------------------------------------------------------- 1 | let arr = [1, 2, 3, 4, 5, 6, 7, 8]; 2 | 3 | Array.prototype.myFilter = function (cb) { 4 | /* 5 | cb = (e, i, a) => { 6 | if (e % 2 == 0) return false; 7 | return true; 8 | } 9 | */ 10 | 11 | let originalArray = this; 12 | let x = []; 13 | for (let i = 0; i < originalArray.length; i++) { 14 | let ans = cb(originalArray[i], i, originalArray); 15 | 16 | if (ans) x.push(originalArray[i]); 17 | } 18 | return x; 19 | } 20 | 21 | let newArr = arr.myFilter((e, i, a) => { 22 | console.log(e, i, a) 23 | if (e % 2 == 0) return true; 24 | return false; 25 | }) 26 | 27 | console.log(newArr); 28 | console.log(arr); -------------------------------------------------------------------------------- /L31-Typescript/4_question.txt: -------------------------------------------------------------------------------- 1 | interface Instructor { 2 | name: string; 3 | experience: number; 4 | introduce(): void; 5 | } 6 | 7 | class CBInstructor implements Instructor { 8 | name: string; 9 | experience: number; 10 | 11 | constructor(name: string, experience: number) { 12 | this.name = name; 13 | this.experience = experience; 14 | } 15 | 16 | introduce(): void { 17 | console.log( 18 | `Hi, I'm ${this.name}, with ${this.experience} years of teaching experience at Coding Blocks.` 19 | ); 20 | } 21 | } 22 | 23 | const instructor1 = new CBInstructor("Varun", 8); 24 | const instructor2 = new CBInstructor("Kartik", 18); 25 | 26 | instructor1.introduce(); 27 | instructor2.introduce(); 28 | -------------------------------------------------------------------------------- /L40-ReactJS-Statemanagement/1_memo/src/App.jsx: -------------------------------------------------------------------------------- 1 | import React, { memo, useState } from "react"; 2 | 3 | const App = () => { 4 | const [cnt, setCnt] = useState(0); 5 | console.log("Running App"); 6 | return ( 7 |
    8 | 9 | 10 | 11 | 12 | 13 |
    14 | ); 15 | }; 16 | 17 | const Child1Memo = memo(function Child1({ value }) { 18 | console.log("Running Child1"); 19 | return
    {value}
    ; 20 | }); 21 | 22 | const Child2Memo = memo(function Child2({ value }) { 23 | console.log("Running Child2"); 24 | return
    {value}
    ; 25 | }); 26 | 27 | export default App; 28 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/5_lazyLoading/src/components/About.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Outlet, Link, useNavigate } from "react-router"; 3 | 4 | const About = () => { 5 | 6 | return ( 7 |
    8 |

    About Us

    9 | 10 |

    11 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Eius quis quod, 12 | at voluptates necessitatibus aperiam corporis excepturi quo vel non 13 | laboriosam voluptatibus, illo eveniet impedit accusamus, iusto nostrum 14 | sed alias eaque quam nulla voluptas? Aliquid optio ducimus 15 | necessitatibus veniam iure? 16 |

    17 | 18 | 19 | 20 | 21 |
    22 | ); 23 | }; 24 | 25 | export default About; 26 | -------------------------------------------------------------------------------- /L39-Routers-Hooks/5_lazyLoading/src/components/Navbar.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Link, NavLink } from "react-router"; 3 | 4 | const Navbar = () => { 5 | const btnGroupCSS = { 6 | // backgroundColor: "blue", 7 | // border: '1px solid black', 8 | display: "flex", 9 | justifyContent: "space-evenly", 10 | }; 11 | 12 | // const LinkCSS = { color: "black", textDecoration: "none" }; 13 | 14 | return ( 15 |
    16 | Home 17 | About Us 18 | Contact Us 19 |
    20 | ); 21 | }; 22 | 23 | export default Navbar; 24 | -------------------------------------------------------------------------------- /L33-Prisma/src/read-user-post.ts: -------------------------------------------------------------------------------- 1 | // 1 2 | import { PrismaClient } from "../generated/prisma"; 3 | import { withAccelerate } from "@prisma/extension-accelerate"; 4 | 5 | // 2 6 | const prisma = new PrismaClient().$extends(withAccelerate()); 7 | 8 | // 3 9 | async function main() { 10 | const users = await prisma.user.findUnique({ 11 | where: { 12 | id: 3, 13 | }, 14 | include: { 15 | posts: true, 16 | }, 17 | }); 18 | 19 | console.log("Created user:", users?.posts); 20 | } 21 | 22 | // 4 23 | main() 24 | .then(async () => { 25 | await prisma.$disconnect(); 26 | }) 27 | .catch(async (e) => { 28 | console.error(e); 29 | // 5 30 | await prisma.$disconnect(); 31 | process.exit(1); 32 | }); 33 | --------------------------------------------------------------------------------