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" »

Implementing a Custom HashTable in Java

Classified in Computers

Written on in English with a size of 2.67 KB

Custom HashTable Implementation in Java

This document provides a robust implementation of a HashTable in Java, demonstrating core concepts like load factors, capacity management, and collision handling.

Class Definition

public class HashTable1 implements IHashTable {
    private Entry1 table[];
    private int size;
    private final float loadFactor;
    private int threshold;
    private final int DEFAULT_INITIAL_CAPACITY = 12;
    private final float DEFAULT_LOAD_FACTOR = 0.75f;

    public HashTable1() {
        loadFactor = DEFAULT_LOAD_FACTOR;
        threshold = DEFAULT_INITIAL_CAPACITY;
        table = new Entry1[DEFAULT_INITIAL_CAPACITY];
    }

    public HashTable1(int initialCapacity, float loadFactor) {
        if (initialCapacity
... Continue reading "Implementing a Custom HashTable in Java" »

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" »

Effective Interface and Report Design Strategies

Classified in Computers

Written on in English with a size of 2.96 KB

Designing Forms and Reports

  • Process of designing forms and reports
  • General guidelines for formatting forms and reports

Designing Interfaces and Dialogues

  • Process of designing interfaces and dialogues
  • General guidelines for interface design
  • Guidelines for the design of human-computer dialogues

Designing Web and Mobile Interfaces

  • General guidelines
  • Principles of mobile interface design

Understanding Forms and Reports

What is a Form?

A form is a business document that contains predefined data and may include areas where additional data is to be filled in. Traditionally, forms are paper-based. Today, the layout of almost any paper-based form can be displayed on a video display. Form interaction is a standard method for gathering and displaying information... Continue reading "Effective Interface and Report Design Strategies" »

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" »

Java Theater Simulation Source Code Using Collections

Classified in Computers

Written on in English with a size of 5.06 KB

Java Theater Management Source Code

Below is the complete, fixed Java source code for managing theater attendees using various data structures like lists, queues, and stacks.

public class Teatro {
    private static File archivo;
    private static FileReader fr;
    private static BufferedReader br;
    private static List<Espectador> listaEspectadores = new ArrayList<>();
    private static Queue<Espectador> colaEspectadores = new ArrayDeque<>();
    private static Stack<Espectador> teatro = new Stack<>();

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        try {
            archivo = new File("C:\\Users\\Criscriscris\\Documents\\NetBeansProjects\
... Continue reading "Java Theater Simulation Source Code Using Collections" »