CSS ___________ are used to group together CSS declarations to be applied to multiple elements.
- classes
- declarations
- properties
- selectors
The correct answer is 'classes.' CSS classes allow you to apply the same styling to multiple HTML elements by assigning the class name to those elements.
To eliminate transitive dependency, a relation must be in at least ___________ Normal Form (NF).
- 1st Normal Form (1NF)
- 2nd Normal Form (2NF)
- 3rd Normal Form (3NF)
- 4th Normal Form (4NF)
Achieving Transitive Dependency Elimination
To improve security in Node.js applications, developers should use ___________ to prevent vulnerabilities.
- Bcrypt
- Express Validator
- Helmet
- Passport
To improve security in Node.js applications, developers should use Helmet, a middleware package that helps in securing Express apps by setting various HTTP headers to prevent common vulnerabilities like XSS attacks.
Imagine you're designing a system where multiple tasks need to be executed concurrently with varying levels of urgency. How would you design a data structure to manage these tasks efficiently?
- Binary Search Tree
- Doubly Linked List
- Hash Table
- Priority Queue
A Priority Queue is the most efficient data structure for managing tasks with varying levels of urgency in a concurrent execution system. It ensures that tasks are executed based on their priority levels, allowing higher priority tasks to be processed before lower priority ones. This is crucial for maintaining system responsiveness and meeting urgent task requirements promptly. Binary Search Trees, Hash Tables, and Doubly Linked Lists are not specifically designed for priority-based task management and may not offer the same level of efficiency and responsiveness as a Priority Queue.
What is indexing used for in databases?
- Data encryption
- Data sorting and filtering
- Database backup management
- Efficient data retrieval
Indexing in databases is primarily used for efficient data retrieval. Indexes are data structures that improve the speed of data retrieval operations on a database table at the cost of additional space and decreased performance in data modification operations.
What is the primary goal of database normalization?
- To improve data security
- To increase data storage
- To reduce data redundancy
- To speed up data retrieval
Database normalization aims to minimize data redundancy by organizing data into tables and ensuring each table stores data about a specific subject, reducing the chances of data inconsistencies.
The ___________ model allows for flexible schemas, making it suitable for evolving data requirements.
- Document
- Graph
- Key-value
- Relational
The document model, as seen in MongoDB or Couchbase, allows for flexible schemas where data can be stored as documents in a JSON-like format, making it ideal for evolving data structures and dynamic data needs.
In a binary tree, the maximum number of nodes at level _________ is 2^(h) where 'h' is the height of the tree.
- Level 0
- Level 1
- Level 2
- Level 3
In a binary tree, the number of nodes at a particular level follows the formula 2^(h), where 'h' is the height of the tree. The root node is considered to be at level 0, so the maximum number of nodes at level 3 would be 2^(3) = 8 nodes. This concept is important in understanding the structure and size of binary trees based on their height.
What is the primary function of the Network layer in the OSI Model?
- Ensuring data packets reach their intended destination
- Establishing a secure connection
- Providing encryption for data packets
- Transforming data into frames for transmission
The primary function of the Network layer is to ensure that data packets reach their intended destination across multiple networks. It accomplishes this by managing logical addressing, routing, and packet forwarding to navigate complex network structures.
What is the significance of the time quantum in Round Robin scheduling?
- The time quantum affects the round-robin scheduling overhead by determining how frequently the CPU switches between processes.
- The time quantum determines the maximum time a process can run in a single CPU burst before being interrupted and placed back in the ready queue.
- The time quantum directly impacts the context switch frequency in round-robin scheduling, affecting system responsiveness and throughput.
- The time quantum influences the fairness of CPU allocation among processes by limiting the duration of each process's execution.
In Round Robin scheduling, the time quantum is crucial in balancing between fairness and responsiveness. A shorter time quantum increases fairness among processes but may lead to higher overhead due to frequent context switches. On the other hand, a longer time quantum reduces overhead but can cause longer response times for interactive tasks. Finding an optimal time quantum involves considering the system's workload, process characteristics, and desired trade-offs between fairness and responsiveness.