Notes, abstracts, papers, exams and problems of Computers

Sort by
Subject
Level

Setting Up a Backend Project with Node.js

Classified in Computers

Written at on English with a size of 5.14 KB.

To start a backend project.

- npm init

Then make a file with whatever entry point you named it as, for example, server.js

Once package.json is created:

  • npm i <package>
  • connect-mongo (store sessions in DB)
  • dotenv (for config files, environment variables)
  • express
  • mongoose
  • express-sessions (sessions and cookies)
  • method-override (to use PUT, UPDATE, DELETE requests)
  • moments (date formatting)
  • morgan (logging)
  • passport (authentication)

npm i -D <package>

  • nodemon (Update every file change instantly without having to restart the server)
  • cross-env (To update environment variables in script definition itself)

After installing the dependencies, edit the scripts in package.json

"start": "cross-env NODE_ENV=production node server.js",
"dev": "cross-env NODE_ENV=
... Continue reading "Setting Up a Backend Project with Node.js" »

JavaScript Calculator

Classified in Computers

Written at on English with a size of 292 bytes.

Instructions:

  1. Refer to the files using a relative path.
  2. Save all files, including the HTML file, before using this feature.

Value 1


Value 2


Add Minus Divide Multiply


Submit


Doubly Linked List Implementation in C

Classified in Computers

Written at on English with a size of 4.75 KB.

Types definition


#include <stdbool.h>


#include <stdlib.h>


Struct Definition


typedef int tItemL;
typedef struct tNode* tPosL; //Ptr to tNode
struct tNode {
tItemL data;
tPosL next;
tPosL prev;
};
typedef tPosL tList;


Prototypes


void createEmptyList(tList *L);
bool createNode(tPosL* p);
bool insertItem(tItemL d, tPosL p, tList *L);
void updateItem(tItemL d, tPosL p, tList* L);
tPosL findItem(tItemL d,tList L);
bool isEmptyList(tList L);
tItemL getItem(tPosL p, tList L);
tPosL first(tList L);
tPosL last(tList L);
tPosL previous(tPosL p, tList L);
tPosL next(tPosL p,tList L);
void deleteAtPosition(tPosL p , tList *L);
void deleteList(tList *L);


Function Definitions


#include "doubly_linked_list.h"
bool isEmptyList(tList L) { return (L == NULL); }
void... Continue reading "Doubly Linked List Implementation in C" »

Personal-Business Letter Format and Definitions

Classified in Computers

Written at on English with a size of 2.11 KB.

A letter from an individual to a business is called a:

Personal-Business Letter: a letter from an individual to a business.

A personal letter contains the following parts (in order):

  • Date line
  • Inside Address
  • Salutation
  • Body
  • Complimentary closing
  • Signature
  • Writer's identification

Definitions:

  • Date line: the month, day, and year the letter is typed (keyed)
  • Inside Address: the name and address of the person to whom the letter is being sent
  • Salutation: an opening greeting such as Dear Ms. Jones
  • Body: the text of the letter
  • Complimentary closing: a closing to the letter such as sincerely or Yours truly
  • Signature: the writer's signature
  • Writer's identification: the writer's keyed name and address

To format a personal-business letter in block style:

  1. Use the default
... Continue reading "Personal-Business Letter Format and Definitions" »

Understanding HDLC Protocol and ARQ Error Control Mechanisms

Classified in Computers

Written at on English with a size of 4.07 KB.

Data Link Control and Error Control Mechanisms

Error Control Techniques

Efficient data transmission involves acknowledging successful data receipt and handling errors. When a station has both data and an acknowledgment to send, they are combined into one frame to optimize communication. If only an acknowledgment is available, a separate frame (RR or RNR) is sent. In cases where data is ready but no new acknowledgment is needed, the last sent acknowledgment sequence number is repeated within the data frame.

Error control relies on several key mechanisms:

  • Error Detection: Techniques like checksums or CRCs identify erroneous frames, which are then discarded.
  • Positive Acknowledgment: The receiver sends a positive acknowledgment (ACK) to confirm successful
... Continue reading "Understanding HDLC Protocol and ARQ Error Control Mechanisms" »

Factors Affecting Second Language Acquisition: Readiness to Notice and Task Demands

Classified in Computers

Written at on English with a size of 5.8 KB.

5. Readiness to Notice (means be ready prepared)

The current state of the interlanguage system (when you're studying your first SLA). What the L is ready to notice (or attend to) due to his/her internal structures or mechanisms (some Ls are going to be more able than others to noticing structures). Pieneman’s Multidimensional Model (word order acquisition in L2 German or emergence of questions in L2 English). Acquisition of word in German. EX: Capacity to place adverbs at the beginning of sentences before. Capacity to place the verb at the end of the sentence in some structures. EX. Prediction about what the L can notice: what is to be noticed refers to the next thing to be acquired: adverbs at the beginning of sentences -> verbs at the... Continue reading "Factors Affecting Second Language Acquisition: Readiness to Notice and Task Demands" »

Presidency University Website

Classified in Computers

Written at on English with a size of 2.83 KB.

{ "titl":"Presidency University Websit", "tag": [ "HTM", "CS", "JavaScrip", "Bootstra", "AngularJ", "jQuer" ], "conten":"

Problem Statement:

Mr. Kiran Student of Presidency University wants to create an attractive web page for Presidency University using HTML and CSS with following specifications.

  •   Split the web page into two parts using frames, top section 20% and bottom section 80%.

  •   Place your college logo at the top of the page withmenu’s (About, Academic, Admission,

    Facilities, etc). Createhyperlink for all menus.

  •   Create a web page about the college linked at the bottom of the frame.

  •   Create a web page about the Academic linked at the bottom of the frame.

  •   Create a web page about the admission, list out the departments,

... Continue reading "Presidency University Website" »

Evolution of the Web and Information Management

Posted by silviagc__ and classified in Computers

Written at on English with a size of 9.83 KB.

THE WEB:

1. WEB1.0, WEB 2.0, WEB 3.0:

-WEB 1.0 or the read-only web: In the 1990s, information on the Internet was only for reading. It was a network of documents and people could not interact with the content. For example, they couldn’t give their opinions, ask for information or register as users. In addition, the information online was not updated very frequently. Almost everything that people used online was also part of the World Wide Web (www).

WEB 2.0 or the social network:

This was developed during the first decade of the 21st century. In this new web, information became bidirectional. Users could not only receive information, but also create and share it. New services appeared and became popular, such as email, chats, videoconferences,... Continue reading "Evolution of the Web and Information Management" »

Predicting Boston House Prices and Ionosphere Data Analysis with Machine Learning

Classified in Computers

Written at on English with a size of 5.24 KB.

Boston Housing Data Analysis

library(mlbench)
install.packages("dplyr")
library(dplyr)
library(ggplot2)
library(reshape2)
data("BostonHousing")
housing <- BostonHousing
str(housing)

housing %>%   ggplot(aes(x = medv)) +
  stat_density() +
  labs(x = "Median Value ($1000s)", y = "Density", title = "Density Plot of Median Value House Price in Boston") +
  theme_minimal()

summary(housing$medv)

housing %>%   select(c(crim, rm, age, rad, tax, lstat, medv)) %>%   melt( id.vars = "medv") %>%   ggplot(aes(x = value, y = medv, colour = variable)) +
  geom_point(alpha = 0.7) +
  stat_smooth(aes(colour = "black")) +
  facet_wrap(~variable, scales = "free", ncol = 2) +
  labs(x = "Variable Value", y = "Median House Price ($1000s)") +
  theme_minimal(

... Continue reading "Predicting Boston House Prices and Ionosphere Data Analysis with Machine Learning" »

Vulnerabilities in Von Neumann Architecture and Security Threats Explained

Classified in Computers

Written at on English with a size of 3.57 KB.

Vulnerabilities in Von Neumann Architecture

The system architect of the von Neumann is the way that it can allow direct memory access to the low level languages like C and C++.

If the program goes and tries to access the memory out of bound by allocating code injection to the system, it allows the system to access the memory out of the stack which causes buffer overflow and the attacker can access the other memory from the allocated stack. This way an attacker can get access to the system. Therefore von Neumann architecture is vulnerable to code injection, the effect of the buffer overflow.

Understanding Threats and Attacks

Threats

  • It is a potential security violation that might exploit vulnerability of the system or assets.
  • Threats can be accidental,
... Continue reading "Vulnerabilities in Von Neumann Architecture and Security Threats Explained" »