Notes, summaries, assignments, exams, and problems for Computer science

Essential Number Properties and Divisibility Rules

Computer science4.22 KB

Fundamental Number Concepts

Prime Numbers Up to 97

Here is a list of prime numbers up to 97:

  • 2
  • 3
  • 5
  • 7
  • 11
  • 13
  • 17
  • 19
  • 23
  • 29
  • 31
  • 37
  • 41
  • 43
  • 47
  • 53
  • 59
  • 61
  • 67
  • 71
  • 73
  • 79
  • 83
  • 89
  • 97

Rules for Exponents

Understanding how exponents work is crucial for various mathematical operations:

  • Positive Base: If the base (m) is positive, the result (b) of mn = b is always positive.
  • Negative Base, Even Exponent: If the base (-M) is negative and the exponent (n) is an even number, the result (+b) of (-M)n = +b is positive.
  • Negative Base, Odd Exponent: If the base (-M) is negative and the exponent (n) is an odd number, the result (-b) of (-M)n = -b is negative.

Powers of Decimal Numbers

Here are examples of squaring and cubing decimal numbers:

  • 1.12 = 1.21
  • 0.42 = 0.16
  • 0.032 = 0.0009
  • 0.23 = 0.008

Divisibility Criteria

Divisibility...

Continue reading "Essential Number Properties and Divisibility Rules" »

Mastering Page Layout: Essential Elements and Formats

Computer science4.81 KB

Elements of Page Layout

Clean layout: Visual elements in good order.

Layout elements are three essential elements:

Format: The size or area of the paper on which our design will be printed.

Many formats are according to user needs, such as books, magazines, etc.

Margins: The surrounding areas that respect each box and the edge of the paper.

May be varied according to design. (Head, Spine, Foot, and Fore-edge).

The Box: This is the real space and limiting area where we diagram and fit the elements of the page.

In Microsoft Publisher, the document box appears delineated by a blue box on the page.

Chaotic layout: Items at random, without aesthetic consideration.

What is Page Layout?

It is the attempt to balance the elements across pages, organizing the masses...

Continue reading "Mastering Page Layout: Essential Elements and Formats" »

Multimedia and HTML Basics: A Comprehensive Guide

Computer science5.01 KB

Video Capture and Storage

Factors Affecting Video Capture Speed

Which of the following is not a factor in the loss of speed in video capture to your computer?

  • CD/DVD speed

Recommended Hard Disk Data Transfer Rate

For video capture, the recommended minimum hard disk data transfer rate is:

  • 2.5 Mb/sec
  • 5.0 Mb/sec
  • 4.5 Mb/sec
  • 3.5 Mb/sec

Peak Writing Definition

The amount of information a hard drive can write consistently in one second is called Peak Writing.

Data Compression

Compression Process

Compression is the process of removing or restoring data to reduce the size of a file.

Synchronous vs. Asynchronous Compression

When the algorithmic compression process takes the same amount of time as the decompression process, it is called Synchronous.

Audio Formats and

...
Continue reading "Multimedia and HTML Basics: A Comprehensive Guide" »

C++ Programming: Streams, Functions, and Memory

Computer science11.17 KB

In C++, Input/Output (I/O) operations are managed through a hierarchy of classes collectively known as streams. A stream is an abstraction that represents a flow of data between a source (like a keyboard) and a destination (like a screen).

Here is a comprehensive breakdown of how C++ handles both unformatted and formatted I/O operations, along with the core stream mechanisms.

Streams, Insertion, and Extraction

At the heart of C++ I/O are the standard stream objects:

  • cin: Standard input stream (usually the keyboard), an instance of istream.
  • cout: Standard output stream (usually the screen), an instance of ostream.

The Insertion Operator (<<)

Used with cout to output data. It "inserts" data into the output stream.

cout << "Hello, World!";
...
Continue reading "C++ Programming: Streams, Functions, and Memory" »

Part

Computer science7.52 KB

Why protection is needed
In multitasking or multi‑user systems, two programs might try to use the same memory at the same time, which can corrupt data or crash the system.
Protection mechanisms isolate user programs from each other and from the OS, and also help detect bugs by checking whether each memory access and instruction obeys certain safety rules.
Overview of 80386 protection
80386 has four protection levels (0–3), where 0 is most trusted (OS kernel) and 3 is least trusted (user apps).
It uses two main mechanisms: segment‑level protection and page‑level protection, and every memory access is checked against these rules before the actual memory cycle startsSegment‑level protection (idea)
Segment‑level protection has five parts:

...
Continue reading "Part" »

Operating System Concepts: Memory, Deadlocks, and I/O

Computer science16.84 KB

Memory Models in Operating Systems

  • Model A (MS-DOS):
    • Structure: Large user space at the top, small RAM at the bottom.
    • Performance: Fast execution, long boot time.
    • Protection: No protection.
  • Model B:
    • Structure: Small ROM at the top, small user space at the bottom.
    • Performance: Protected OS but slow (the entire OS must be read).
    • Flexibility: Not flexible.
  • Model C (Windows 11):
    • Structure: Select drivers at the top, large user space in the middle, RAM at the bottom.
    • Performance: Fast and secure (key drivers stored in ROM).

Memory Protection and Management

Core Memory Management Issues

  • Relocation Problem: Without memory abstraction, loading multiple programs causes incorrect memory addresses.
  • Base and Limit Registers:
    • Base: Value added to addresses to find
...
Continue reading "Operating System Concepts: Memory, Deadlocks, and I/O" »

Network Security & Configuration: Routing, VLANs, DHCP, and Attack Mitigation

Computer science2.38 KB

Router-on-a-Stick Inter-VLAN Routing

The router's port connecting to the LAN has multiple sub-interfaces, each the default gateway for a specific VLAN. For example, VLAN 10 traffic destined for VLAN 20 is first forwarded to VLAN 10's default gateway (the router sub-interface). The router then routes this traffic to VLAN 20's gateway (its corresponding sub-interface) and finally to the user in VLAN 20.

Why STP Is Needed for Redundant Ethernet LANs

  • Preventing Broadcast Storms: In redundant networks, frames can loop endlessly, exponentially increasing traffic. STP prevents this by disabling redundant paths, ensuring one active path between devices.
  • Ensuring MAC Address Table Consistency: Loops cause switches to receive the same frame on different
...
Continue reading "Network Security & Configuration: Routing, VLANs, DHCP, and Attack Mitigation" »

SkinnerDB: Reinforcement Learning for Query Optimization

Computer science3.78 KB

SkinnerDB: Regret-Bounded Query Evaluation via Reinforcement Learning

INTRODUCTION AND PROBLEM DEFINITION:

The work is on query optimization, more specifically: SkinnerDB focuses on finding the optimal Join Order. Because it has the most impact in practice.

SkinnerDB aims to get expected near optimal results without needing any a-priori information. It does not make strong assumptions either.

CONTRIBUTIONS:

  • Introduced a new quality criterion for query evaluation strategies that compares expected and optimal execution cost.
  • Proposed several adaptive execution strategies based on reinforcement learning.
  • Formally proved correctness and regret bounds for those execution strategies.
  • Experimental comparisations of those strategies, implemented in SkinnerDB,
...
Continue reading "SkinnerDB: Reinforcement Learning for Query Optimization" »

Telephone Means and Equipment: Features and Services

Computer science9.05 KB

Telephone Means and Equipment

Fixed individual devices (copper networks have been replaced by optical fiber networks)

Private branch exchanges (PBX): it connects calls between two destinations or ends

Function: call transfers among extensions, caller ID…

Types: IP PBXs call centers, they manage just phone calls contact centres, they not only manage phone calls but emails, SMS, online messages, faxes, etc.

Mobile devices: PDA, Smartphone

Services: Internet, e-mail, videoconference, digital camera, audio an Video quality player, an agenda, GPS, own, Operating system

Additional services offered by the telephone equipment

Common features

A.Fixed telephony: -Notice of charge(aviso de cargo) you receive info on the cost of a call Call forwarding(desvio

...
Continue reading "Telephone Means and Equipment: Features and Services" »

Refer to the exhibit. When a static IP address is being configured on the host, what address should be used for the default gateway

Computer science4.69 KB

HOSTàROUTER: 1

ENABLE

CONFIGURE TERMINAL

INTERFACE GIGABITETHERNET 0/0

IP ADDRESS 192.168.1.126 255.255.255.224

NO SHUTDOWN

EXIT

INTERFACE GIGABITEETHERNET 0/1

IP ADDRESS 192.168.1.158 255.255.255.240

NO SHUTDOWN

HOSTàSWITCH 2

ENABLE

CONFIFURE TERMINAL

INTERFACE VLAN 1

IP ADDRESS 192.168.1.157 255.255.255.240

NO SHUTDOWN

HOST/ROUTER 3

EXIT (LLEGAR AL CONFIGURE TERMINAL)

HOSTNAME MIDDLE

ENABLE SECRET CISCO

LINE CONSOLE 0

PASSWORD CLASS

LOGIN

EXIT

SECURITY PASSWORD MIN-LENGTH 10

SERVICE PASSWORD ENCRYPTION

IP DOMAIN-NAME CISCO

CRYPTON KEY GENERATE RSA

1024

EXIT

USERNAME CICLOS

LINE VTY 0 4

LOGIN LOCAL

TRANSPORT INPUT SSH

EXIT

INTERFACE GIBABITEETHERNET 0/0

IPV6 ADDRESS 2001:DB8:ACAD:A::1/64

IPV6 ADDRESS FE80::1 LIN

EXIT

GIBABITETHERNET 0/1

IPV6 ADDRESS 2001:DB8:ACAD:B::1/64

IPV6

...
Continue reading "Refer to the exhibit. When a static IP address is being configured on the host, what address should be used for the default gateway" »