Notes, summaries, assignments, exams, and problems for Computers

Sort by
Subject
Level

Doubly Linked List Implementation in C

Classified in Computers

Written on in 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" »

Understanding HDLC Protocol and ARQ Error Control Mechanisms

Classified in Computers

Written on in 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 on in 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 on in 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" »

Cybersecurity Fundamentals: Threats, CIA Triangle, and System Components

Classified in Computers

Written on in English with a size of 3.63 KB

Essential Concepts in Information Security

Threat vs. Threat Agent: Key Distinctions

The word “threat” usually stands for a category of things that pose a potential danger. Viruses, worms, and other types of malware, for example, are threats. A “threat agent,” by contrast, is a specific threat, or a specific type of virus, worm, or other malware. For example, the Blaster Worm is a threat agent.

Vulnerability vs. Exposure in Security Systems

Vulnerability is a fault within the system, such as software package flaws, unlocked doors, or an unprotected system port. It leaves things open to an attack or damage.

Exposure is a single instance when a system is open to damage. Vulnerabilities can in turn be the cause of exposure.

Infrastructure Protection

... Continue reading "Cybersecurity Fundamentals: Threats, CIA Triangle, and System Components" »

Evolution of the Web and Information Management

Posted by silviagc__ and classified in Computers

Written on in 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 on in 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 on in 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" »

Java Programming Examples

Classified in Computers

Written on in English with a size of 1.18 KB

Transpose of a Matrix

This code demonstrates how to find the transpose of a matrix in Java.

Sorting Algorithm

This code implements a simple sorting algorithm to arrange elements in ascending order.

Complex Number Operations

This code shows how to perform operations on complex numbers in Java, such as addition.

Static Members

This code explains the concept of static members in Java and how to use them.

Function Overloading

This code demonstrates function overloading in Java, where multiple functions can have the same name but different parameters.

Derived Class and Inheritance

This code illustrates the concept of inheritance in Java, where a derived class inherits properties and methods from a base class.

Multilevel Inheritance

This code demonstrates multilevel... Continue reading "Java Programming Examples" »

Write a program in c to implement a class to represent complex members . Include member function add and multiply two complex no .Overloaded assignment operator=

Classified in Computers

Written on in English with a size of 87.8 KB

C++

LET

LET'S LEARN ABOUT BASIC C++

C++ Data Types - GeeksforGeeks

SOURCE : GEEKS FOR GEEKS

LET'S LEARN ABOUT LOOPS

FOR LOOP

#include <iostream>

usingnamespace std;

intmain(){for(int i =1; i <=5; i++)

{ cout <<" Good morning \n";}

return0;}

Loops in C++ 1

WHILE LOOP

#include <iostream>

usingnamespace std;

intmain()

{int i =0;// initialization expressionwhile(i <5)

// test expression

{ cout <<"Good morning\n"; i++;// update expression}

return0;}

Loops in C++ 1

 DO WHILE

#include <iostream>

usingnamespace std;

intmain(){int i =2;// initialization expressiondo{ cout <<" Good morning\n"; i++;// update expression}

while(i <1);//

test expression

return0;}

Output 2

SOME IMPORTANT C++ INTERVIEW QUESTIONS 

1. What are the different data types present in C++?

The 4 data types in C++ are given below:... Continue reading "Write a program in c to implement a class to represent complex members . Include member function add and multiply two complex no .Overloaded assignment operator=" »