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

Sort by
Subject
Level

Customer Feedback and Catalog Request Form

Classified in Computers

Written on in English with a size of 1.22 KB

Customer Feedback and Catalog Request

Please fill out this form to provide feedback on the event and indicate your preferences for receiving our catalog.

Personal Information

Name:

[Name Field]

Surname:

[Surname Field]

Password:

[Password Field]

Event Feedback

Did you enjoy the event?

Please write your comments here.

Yes, I would like to receive the catalog.

Payment Method

Preferred Payment Method:

  • Credit Card
  • Postal Order
  • Cash on Delivery (Unavailable)

Catalog Language

In which language would you like to receive the catalog?

  • Spanish
  • English
  • German (Unavailable)

Address Details

Type of street:

Street Avenue Square Other

Preferred Means of Transport

Preferred Means of Transport:

Plane Train Ship Bus Van

Destination

Destination:

Athens Dublin Istanbul Lisbon London Oslo Paris... Continue reading "Customer Feedback and Catalog Request Form" »

Data Structures: Sorting, Hashing, and Tree Traversals

Classified in Computers

Written on in English with a size of 3.86 KB

Tree Traversal Methods

Preorder traversal: Visit the root, visit the left subtree, and then visit the right subtree.

Inorder traversal: Visit the left subtree, visit the root, and then visit the right subtree.

Postorder traversal: Visit the left subtree, visit the right subtree, and then visit the root.

Breadth-First Traversal: Visit the root, visit the children of the root (left to right), and then the children of the children (left to right), going down level by level.

Depth-First Traversal: Rather than visiting the tree level-by-level like in breadth-first traversal, visit the root, go all the way down the left on one path, and then move across the tree to the right, going down all the paths until the end.

Hashing and Collision Resolution

Hashing:

... Continue reading "Data Structures: Sorting, Hashing, and Tree Traversals" »

Functions, Arguments, and Recursion in Programming

Classified in Computers

Written on in English with a size of 4.58 KB

Functions and Arguments

A function is a module of program code that takes input (arguments) and produces output (a return value).

  • Arguments allow us to customize the operation performed by the function.
  • The return value is often the result of executing the code.
  • Calling a function causes the code in a function to execute. If called again, it will execute again.

To document a function, use a multi-line comment immediately after the def line.

Local Variables

Local variables are variables used inside functions.

  • They are accessible/usable within that function only.
  • This refers to the variable's scope.

Global Variables

Global variables are variables used outside of a function.

  • Global variables' scope includes both inside and outside of functions.
  • However, since
... Continue reading "Functions, Arguments, and Recursion in Programming" »

MQTT vs CoAP: IoT Communication Protocols Explained

Classified in Computers

Written on in English with a size of 2.58 KB

Wide Area Networks

Applications utilize application-level protocols (such as MQTT, CoAP, HTTP, and WS) to communicate effectively across networks.

MQTT: Publish/Subscribe Messaging

MQTT is a lightweight messaging protocol based on TCP/IP. It utilizes Quality of Service (QoS) levels to manage delivery:

  • QoS 0 (At Most Once): Messages are sent with no guarantee of arrival.
  • QoS 1 (At Least Once): Subscribers acknowledge message reception. The broker stores the message and retries until an acknowledgment is received.
  • QoS 2 (Exactly Once): The most reliable delivery method. The broker ensures messages are delivered to subscribers without duplicates.

MQTT Security

MQTT does not provide native security. It can utilize TLS/SSL encryption for data in transit,... Continue reading "MQTT vs CoAP: IoT Communication Protocols Explained" »

Understanding Computer Security: From Worms to Encryption

Classified in Computers

Written on in English with a size of 1.91 KB

Understanding Computer Security

Common Threats

  • Worm: Designed to replicate itself, a worm operates as a standalone application, unlike a virus.
  • Trojan: Disguised as a legitimate program (e.g., a screensaver), a Trojan operates covertly to inflict damage.
  • Phishing: Attackers impersonate trustworthy entities to steal sensitive information, exploiting social engineering tactics.

Network and Security Concepts

  • Simple Mail Transfer Protocol (SMTP): A standard for email communication, SMTP is known for its lack of robust security.
  • Sandboxes: Software environments that isolate programs to prevent them from harming the host system, commonly used in web browsers.

Wireless Security

  • Wireless Internet (Wi-Fi): Enables wireless communication between devices, forming
... Continue reading "Understanding Computer Security: From Worms to Encryption" »

Network Types, MAC Addresses, and OSI Model Explained

Classified in Computers

Written on in English with a size of 2.86 KB

Network Classification by Device Roles

Networks can be classified based on the roles of the devices within them:

  • Client-Server: This is the most common type. A powerful server provides services to multiple clients and is always available. Example: A web server.
  • Peer-to-Peer: In this model, all computers have equal roles and share resources directly. Example: BitTorrent.

Router Functions in Home Networks

Routers provided by Internet Service Providers (ISPs) often integrate the functions of multiple devices, including:

  • Hub
  • Modem
  • Access Point

MAC Address Translation

The MAC address 08-2E-5F-14-93-A0 in decimal is 8-46-95-20-147-160.

Switches and the OSI Model

Switches operate at Level 2 (Data Link Layer) of the OSI model. Other devices that work at this level... Continue reading "Network Types, MAC Addresses, and OSI Model Explained" »

Mastering C# List: A Comprehensive Reference

Classified in Computers

Written on in English with a size of 54.79 KB

Understanding the C# List<T>

  • The List<T> is a collection of strongly typed objects that can be accessed by index and includes methods for sorting, searching, and modifying the list.
  • It is the generic version of the ArrayList, found within the System.Collections.Generic namespace.
  • The List<T> performs faster and is less error-prone than the ArrayList.
  • Because it is a generic collection, you must specify a type parameter for the data it stores.

Creating a List and Adding Elements

List<int> primeNumbers = new List<int>();
primeNumbers.Add(1); // Adding elements using Add() method
primeNumbers.Add(3);
primeNumbers.Add(5);
primeNumbers.Add(7);

Using Collection Initializer Syntax

var bigCities = new List<string>()
{
... Continue reading "Mastering C# List: A Comprehensive Reference" »

VB.NET Code Examples for Arrays and Timer Controls

Classified in Computers

Written on in English with a size of 2.92 KB

Weight Calculation and Session Management in VB.NET

This example demonstrates how to handle weight data using arrays and manage application sessions with timers.

Public Class Form1
    Dim PESOPERSONA(1) As Integer
    Dim PESOTOTAL As Integer

    Private Sub Form1_Load(...)
        Me.Text = "CÁLCULO DE PESO"
        Label1.Text = "RESULTADO"
        Label2.Text = "" & vbCrLf
        PESOPERSONA(0) = 105
        PESOPERSONA(1) = 55

        For i = 0 To 7
            If PESOPERSONA(i) < 10 Or PESOPERSONA(i) > 100 Then
                Label2.Text = Label2.Text & "EL DATO DE PESO " & i & " no es válido por no estar entre 10 y 100 " & vbCrLf
            Else
                PESOTOTAL = PESOTOTAL + PESOPERSONA(i)
... Continue reading "VB.NET Code Examples for Arrays and Timer Controls" »

Processes, Threads, and RAID Levels in Operating Systems

Classified in Computers

Written on in English with a size of 234.98 KB

What is a Process?

A process is a program in execution, encompassing the current values of the program counter, registers, and variables. It's an active entity with a limited lifespan, created at execution start and terminated upon completion. Processes utilize various resources like memory, disk, and printers as needed.

Process vs. Program

Process

Program

A program in execution.

A set of instructions.

Active/dynamic entity.

Passive/static entity.

Limited lifespan.

Longer lifespan (stored on disk).

Uses various resources (memory, disk, etc.).

Stored on disk, doesn't use other resources.

Has a memory address space.

Requires disk space for instructions.

Multiprogramming and the Process Model

Multiprogramming involves rapidly switching the CPU between multiple... Continue reading "Processes, Threads, and RAID Levels in Operating Systems" »

C++ Standard Library Data Structures and Algorithms

Classified in Computers

Written on in English with a size of 146.78 KB

C-Style Arrays

In stack: int a[3] = {0, 1, 2};

In heap: int* b = new int[3];

Sorting

std::sort(myvector.begin(), myvector.end());

Example 2: std::sort(myvector.begin(), myvector.end(), myCompFunction);

mylist.sort() or mylist.sort(compare_nocase);

bool compare_nocase(const std::string& first, const std::string& second) { return first < second; }

Templated Classes

Include template <typename T> above the header.

Each function has a template declaration:

template <typename T>
class_name<T>::getmax () {
  // ...
}

typedef list_iterator iterator;

Strings

str.substr(3, 5) (starts at position 3, length 5)

str1.compare(str2) != 0

str.length()

Lists

iterator insert(iterator position, const value_type& val); (returns pair)

Maps

std::map&

... Continue reading "C++ Standard Library Data Structures and Algorithms" »