List Out The Basic Features of MongoDB
List Out The Basic Features of MongoDB
List Out The Basic Features of MongoDB
7. GridFS: MongoDB includes GridFS for storing and retrieving large files such as
images, videos, and other binary data.
8. Ad Hoc Queries: MongoDB allows for dynamic querying, enabling you to search by
field, range, and even regular expressions.
11. High Performance: MongoDB is designed for high performance with its support for
indexing, in-memory storage engine, and efficient data retrieval.
12. Community and Enterprise Editions: MongoDB is available in both a free, open-
source community edition and a commercial enterprise edition with additional
features and support.
K
Advantages of JavaScript
• Saves time and bandwidth: Regardless of where you host
JavaScript, it always gets executed on the client environment to
save lots of bandwidth and make the execution process fast.
• Easily send HTTP requests: In JavaScript, XMLHttpRequest is
an important object that was designed by Microsoft. The object
calls made by XMLHttpRequest as an asynchronous HTTP
request to the server to transfer the data to both sides without
reloading the page
• Compatible for all browsers: The biggest advantage of
JavaScript having the ability to support all modern browsers and
produce an equivalent result.
• Community Support: Global companies support community
development by creating important projects. An example is
Google (created the Angular framework) or Facebook (created
the React.js framework).
• Vastly used: JavaScript is employed everywhere on the web.
• Environment Support: JavaScript plays nicely with other
languages and may be utilized in an enormous sort of
application.
• Open source: Many open-source projects provide useful help for
developers to add JavaScript.
• Programming language: There are many available courses
within the field of JavaScript, because of which you’ll quickly
and simply expand your knowledge of this programming
language.
• Easy to use: It is not difficult to start working in JavaScript. For
this reason, many of us prefer to start our adventure in the IT
sector by learning this language. It gives the power to make rich
interfaces.
• Backend usage: There are some ways to use JavaScript through
Node.js servers. It is possible to develop a whole JavaScript app
from front to back using only JavaScript.
K
Kk
Define Directive in Angular JS.
In AngularJS, a directive is a powerful feature that allows you to extend the
functionality of HTML. Directives are special markers on DOM elements (such as
attributes, elements, comments, or CSS classes) that tell AngularJS to attach a
specified behavior to that DOM element or even transform the DOM element and its
children.
Types of Directives:
2. Element Directives: Define new DOM elements and the behavior associated
with them. Example: ngMessages, custom directives.
4. Comment Directives: Rarely used, but you can define behavior based on
comments within the HTML. Example: ngRepeat.
K
K
Type of css
• CSS stands for Cascading Style Sheets
• CSS saves a lot of work. It can control the layout of multiple web pages all
at once
1. External CSS
• With an external style sheet, you can change the look of an entire
website by changing just one file!
• Each HTML page must include a reference to the external style sheet file
inside the <link> element, inside the head section.
h1 {
color: navy;
margin-left: 20px; }
<html>
<head>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
2. Internal CSS
An internal style sheet may be used if one single HTML page has a unique
style. The internal style is defined inside the <style> element, inside the
head section.
<html>
<head>
<style>
h1 {
color: maroon;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body> </html>
Inline CSS
Example
<h1 style="color:blue;text-align:center;">This is a
heading</h1>
<p style="color:red;">This is a paragraph.</p>
</body>
</html>
Write a Node JS code to print a list of files present in the current directory
You can use the Node.js fs (File System) module to achieve this. Here's a simple
example:
const fs = require('fs');
// Function to list files in current directory fs.readdir(__dirname, (err, files) => { if (err) {
console.error('Error reading directory:', err); return; } console.log('Files in current directory:');
files.forEach(file => { console.log(file); }); });
Save this code in a file (e.g., listFiles.js) and run it using Node.js. It will list all the
files in the current directory