Notes, summaries, assignments, exams, and exercises for Computer science for University

Understanding IEEE 802 Standards for Networking

Computer science2.88 KB

Model 802
IEEE defined in the 80s
Responsible for defining communication,
transmission, and use of LANs.

802.1: Definition Network International
We define that the network devices should be identified by 48 bits where the first 3 bytes are defined by the IEEE. This identifier must be unique for each product.

802.2: Logical Link Control (LLC)
It defines the controls for the transmission, i.e., defines handshaking.

802.3: Method of Access to the Medium
It defines the access method or wireless LAN, and collisions are resolved by the present CSMA/CA and CSMA/CD.

802.5: Token Ring
It defines the logical and physical topologies of Token Ring.

802.11: Wireless Networks (WiFi)
Establishes standards for speed, frequency, and scope in local wireless transmissions....

Continue reading "Understanding IEEE 802 Standards for Networking" »

Printer Technology Comparison: Daisy Wheel to Laser

Computer science2.27 KB

Printer Technology Comparison

Translation 2

Printers

Daisy Wheel Printer

The highest quality of printer available is the daisy wheel with flexible stems radiating from the center. The letters are well-defined and can be read clearly. The printer moves bi-directionally, printing both ways from left to right and then right to left. Remember that what is to be printed already exists in the computer's memory, and the daisy wheel does not have to type in sequence as would be expected from a human brain. The carriage therefore does not need to waste time returning at the end of each line.

Dot Matrix Printer

The dot matrix is usually faster than the daisy wheel. The printer has a print head consisting of a row of needles. This moves speedily over the place...

Continue reading "Printer Technology Comparison: Daisy Wheel to Laser" »

Essential CSS and HTML Techniques for Web Development

Computer science2.77 KB

Understanding CSS text-overflow

The text-overflow property in CSS specifies how overflowed content that is not displayed should be signaled to the user. It works only when text exceeds the container size.

Required Conditions

To use text-overflow, the following properties must be applied:

  • overflow: hidden;
  • white-space: nowrap;
  • Fixed width

Values of text-overflow

  • clip: Default behavior; cuts off text without showing any symbol.
  • ellipsis: Shows “...” at the end of truncated text.
<style>
.clipText { width: 200px; white-space: nowrap; overflow: hidden; text-overflow: clip; border: 1px solid #000; }
.ellipsisText { width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid red; }
</style>
<div class=
...
Continue reading "Essential CSS and HTML Techniques for Web Development" »

Essential PHP Programming: Forms, Databases, and Sessions

Computer science2.37 KB

PHP Form Validation

To create a PHP form and perform server-side validation for user input such as name, email, and password:

<?php
$name = $email = $password = "";
$nameErr = $emailErr = $passwordErr = "";

if ($_SERVER["REQUEST_METHOD"] == "POST") {
    // Name Validation
    if (empty($_POST["name"])) { $nameErr = "Name is required"; } else { $name = $_POST["name"]; }
    // Email Validation
    if (empty($_POST["email"])) { $emailErr = "Email is required"; } else { $email = $_POST["email"];
        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $emailErr = "Invalid email format"; } 
    }
    // Password Validation
    if (empty($_POST["password"])) { $passwordErr = "Password is required"; } else { $password = $_POST["password"];
...
Continue reading "Essential PHP Programming: Forms, Databases, and Sessions" »

XML Parsers, Web Services, PHP Introspection, and Joomla

Computer science2.66 KB

Understanding XML Parsers and Their Types

An XML parser is a software library used to read and process XML documents. It validates XML syntax and converts data into a usable format.

Types of XML Parsers

  • DOM Parser (Document Object Model)
    • Loads the complete XML document into memory.
    • Represents XML as a tree structure.
    • Allows reading and modifying XML.
    • Features: Easy navigation, supports editing, but is memory-intensive.
  • SAX Parser (Simple API for XML)
    • Reads XML line by line.
    • Event-driven parser.
    • Faster and memory-efficient.
    • Features: Suitable for large XML files, but cannot modify XML easily.

Benefits of Web Services

  • Platform Independent: Works across Windows, Linux, Java, PHP, and more.
  • Language Independent: Applications developed in different languages can
...
Continue reading "XML Parsers, Web Services, PHP Introspection, and Joomla" »

Essential Concepts in Computer Networking and TCP/IP

Computer science3.97 MB

Network Delay and Performance Metrics

Understanding the components of network delay is essential for optimizing data transmission:

  • d-proc (Processing Delay): Checks for bit errors and determines the output link; typically less than a microsecond.
  • d-queue (Queuing Delay): Time spent waiting at the output link for transmission, heavily dependent on network congestion.
  • d-prop (Propagation Delay): Calculated as Link Length / (2 x 108).

Key Variables: a = average packet arrival rate, L = packet length, R = link bandwidth.

DNS Record Types

The Domain Name System (DNS) uses Resource Records (RR) in the format: (name, value, type, ttl).

  • Type A: Name is the hostname; value is the IP address.
  • Type CNAME: Name is an alias for a canonical name; value is the actual
...
Continue reading "Essential Concepts in Computer Networking and TCP/IP" »

Fundamental Data Structures and C Programming Concepts

Computer science302.19 KB

1. Understanding Arrays and Their Types

An array is a collection of elements of the same data type stored in contiguous memory locations. It is used to store multiple values in a single variable and can be accessed using index numbers. The indexing in an array starts from 0. Arrays help manage and process data efficiently, especially when dealing with large volumes of similar data.

Types of Arrays Based on Dimensions

  1. One-Dimensional Array: It stores data in a linear list format.
  2. Multi-Dimensional Array: It stores data in matrix form (like 2D, 3D arrays), which is useful in applications like image processing and tables.

Types of Arrays Based on Memory Allocation

  1. Static Array: The size of the array is fixed at compile-time. Memory is allocated when
...
Continue reading "Fundamental Data Structures and C Programming Concepts" »

OSI Model Security and Encryption Protocols

Computer science4.72 KB

Common Block Cipher Modes and Encryption

Double DES: This method uses two keys for encryption. It is susceptible to the meet-in-the-middle attack, where an attacker attempts to find a match such that E(k1, M) = D(k2, C).

ECB (Electronic Codebook): Each block is encoded with the same key. Information leakage can occur with repeated messages. While it is parallelizable, it is vulnerable to block replay attacks, where an attacker monitors and replays repeated messages.

CBC (Cipher Block Chaining): This mode uses a key and an Initialization Vector (IV). The IV ensures that the same plaintext produces different ciphers, which limits information leaks. However, patterns can still emerge in long messages, and the primary drawback is a lack of integrity....

Continue reading "OSI Model Security and Encryption Protocols" »

Kernel System Calls, Synchronization, and OS Concepts

Computer science6.51 KB

Implementing a New System Call in the Kernel

Required Files to Add

  • /usr/src/test_kernel/SystemCalls/test_call.c:
    • Creates system call pointer.
    • Exports the pointer so that the system call module can access it.
    • Defines the system call wrapper.
  • /usr/src/test_kernel/SystemCalls/Makefile: obj-y := test_call.o (Compiles files directly into the kernel).

System Module Implementation

  • /usr/src/test_kernel/SystemModule/syscallModule.c:
    • Holds module code.
    • Implements system call behavior.
    • Registers system call pointer to the proper system call handler.
  • /usr/src/test_kernel/SystemModule/Makefile: obj-m := syscallmodule.o (Compiles file as a module).

Required Files to Modify

  • /usr/src/test_kernel/arch/x86/entry/syscalls/syscall_64.tbl: Add the system call to the table.
  • /usr/
...
Continue reading "Kernel System Calls, Synchronization, and OS Concepts" »

Microsoft Access Forms and Reports Mastery: Key Concepts

Computer science3.01 KB

In Form view, you can go to the last record in the table by pressing the ____ keys. CTRL+END
____ levels are useful for reports with multiple levels. GROUPING
A form can be used to display fields from multiple records at one time by specifying the ____ layout. TABULAR
The second Form Wizard dialog box asks you to select a ___ for the form. LAYOUT
To change a form's style you must switch to ____. LAYOUT VIEW
To move from record to record in a form you can use the ___. NAVIGATION BUTTONS
You can move from field to field within a form by using the ___. TAB KEY
You can activate the Find command from the button on the ___ tab. HOME
When printing a form, you can choose to print ____. ALL PAGES
When a pencil symbol appears in the top-left portion of the form,
...
Continue reading "Microsoft Access Forms and Reports Mastery: Key Concepts" »