Posts

Showing posts from June, 2024

MongoDB

What is MongoDB? MongoDB is a NoSQL database that stores data in flexible, JSON-like documents. MongoDB was launched in 2009 by 10gen (now MongoDB Inc.) MongoDB is an open-source, document-oriented NoSQL database designed to handle large amounts of data and provide fast performance. CRUD operations in MongoDB : Insert it into MongoDB using insertOne():   db.users.insertOne({ "name": "John Smith", "email": "john.smith@example.com", "age": 32 }); Reading Documents: Retrieve documents with find(). To get all users:   db.users.find(); To filter by age greater than 30:   db.users.find({ "age": { $gt: 30 } }); Updating Documents: Modify a document with updateOne().   db.users.updateOne( { "name": "John Smith" }, { $set: { "email": "new.email@example.com" } } ); Deleting Documents: Remove a document using deleteOne().   db.users.deleteOne({ "name": "John Smith" }); What Is ...

AWS - Amazon Web Services

What is cloud computing? Cloud computing provides on-demand access to IT resources like compute, storage, and databases over the internet. Users pay only for what they use instead of owning physical infrastructure. Cloud enables accessing technology services flexibly as needed without big upfront investments. How many types of deployment models exist in the cloud? There are three different types of deployment models in the cloud. 1) Private cloud :      - this type of service is used by a single organization and is not exposed to the public.     - It is adapted to organizations using sensitive applications. 2) Public cloud :     - these cloud resources are owned and operated by third-party cloud services like Amazon Web Services, Microsoft Azure, and all those mentioned in the AWS market share section. 3) Hybrid cloud :     - this is the combination of both private and public clouds.     - It is designed to keep some servers on-prem...

SASS - Syntactically Awesome Stylesheet

Sass is an extension to CSS Sass is a CSS pre-processor Sass is completely compatible with all versions of CSS Sass reduces repetition of CSS and therefore saves time Sass was designed by Hampton Catlin and developed by Natalie Weizenbaum in 2006 Sass is free to download and use. Sass is based on Ruby npm install -g sass /* Define standard variables and values for website */ $bgcolor: lightblue; $textcolor: darkblue; $fontsize: 18px; /* Use the variables */ body {   background-color: $bgcolor;   color: $textcolor;   font-size: $fontsize; } Sass File Type Sass files has the ".scss" file extension. How Does Sass Work? A browser does not understand Sass code. need a Sass pre-processor to convert Sass code into standard CSS. This process is called transpiling. Transpiling is a term for taking a source code written in one language and transform/translate it into another language.

CSS - Cascading Style Sheets

CSS is the language used to style an HTML document. CSS describes how HTML elements should be displayed. Why Use CSS? CSS is used to define styles for your web pages, including the design, layout and variations in display for different devices and screen sizes. CSS Syntax A CSS rule consists of a selector and a declaration block. The selector points to the HTML element. The declaration block contains one or more declarations separated by semicolons. Each declaration includes a CSS property name and a value, separated by a colon. Multiple CSS declarations are separated with semicolons. Declaration blocks are surrounded by curly braces. p {   color: red;   text-align: center; } CSS Selectors 1) CSS element Selector p {   text-align: center;   color: red; } 2) CSS id Selector #para1 {   text-align: center;   color: red; } 3) CSS class Selector .center {   text-align: center;   color: red; } 4) CSS Universal Selector * {   text-align: center; ...

SQL & NOSQL QUERIES

SQL QUERIES query to fetch unique values SELECT DISTINCT MAJOR from STUDENT;  or SELECT MAJOR FROM STUDENT GROUP BY(MAJOR); SELECT Major, COUNT(*) as TOTAL_COUNT FROM Student WHERE MAJOR = 'Computer Science'; SELECT MAJOR, COUNT(MAJOR) from Student group by MAJOR order by COUNT(MAJOR) DESC; SELECT * from Student ORDER BY GPA DESC LIMIT 5; Print the first 3 characters of FIRST_NAME from Student table: SELECT SUBSTRING(FIRST_NAME, 1, 3)  FROM Student; SQL query to find the position of alphabet (‘a’) int the first name column ‘Shivansh’ from Student table: SELECT INSTR(FIRST_NAME, 'a') FROM Student WHERE FIRST_NAME = 'Shivansh'; SQL query that fetches the unique values of MAJOR Subjects from Student table and print its length: SELECT MAJOR,LENGTH(MAJOR) FROM Student GROUP BY(MAJOR;          or                                              ...

Angular

Angular Features 1) Component-Based Architecture Angular uses a component-based architecture, which allows to build encapsulated, reusable user interface elements.  Each component encapsulates its own HTML, CSS, and TypeScript, making it easier to manage and test individual pieces of an application. 2) Data Binding Angular supports two-way data binding, which synchronizes data between the model and the view.  This ensures that any changes in the view are automatically reflected in the model and vice versa. 3) Dependency Injection Angular has a built-in dependency injection system that makes it easier to manage and inject dependencies into components and services.  This promotes modularity and easier testing. 4) Directives Angular extends HTML with additional attributes called directives.  Directives offer functionality to change the behavior or appearance of DOM elements. 5) Routing Angular includes a router that allows developers to define and manage application sta...

VueJS

VueJS is a progressive JavaScript framework used to develop interactive web interfaces. Focus is more on the view part, which is the front end. Vue is basically built for frontend development, Features Following are the features available with VueJS. 1) Virtual DOM   The changes are not made to the DOM, instead a replica of the DOM is created which is present in the form of JavaScript data structures. Whenever any changes are to be made, they are made to the JavaScript data structures and the latter is compared with the original data structure. The final changes are then updated to the real DOM, which the user will see changing. This is good in terms of optimization, it is less expensive and the changes can be made at a faster rate. 2) Data Binding   - v-bind 3) Components 4) Event Handling - v-on 5) Animation/Transition 6) Computed Properties   Helps to listen to the changes made to the UI elements and performs the necessary calculations.   computed :{   }, 7)...

GIT

 git config –global user.name “abc”   git config –global user.email “abc@a.com” git checkout -b <branchname> git add <files> git commit -m  "[StoryNo] message" git push