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

Computer Interface Elements: Windows, Desktop & Controls

Computer science58.82 KB

Snap5

Understanding Window Elements

Standard Window Components

  1. Control Menu: Displays a menu with options to restore, move, size, minimize, maximize, and close the window.
  2. Toolbar: Provides direct access to frequently used display options for greater efficiency.
  3. Title Bar: Displays the name of the window or application.
  4. Menu Bar: Displays and provides access to the menus available within the application.
  5. Work Area: The primary area provided by the application for the user to perform their work.
  6. Window Border: Allows you to resize the window when it is not maximized. Place the mouse pointer on the border, then press and drag it to the new position.
  7. Status Bar: Displays help or information about the current task or ongoing processes.

Window Control Buttons

  • A.
...
Continue reading "Computer Interface Elements: Windows, Desktop & Controls" »

Implementing Inter-VLAN Routing and WLAN Security Standards

Computer science4.32 KB

Inter-VLAN Routing: Router-on-a-Stick Configuration

Router-on-a-Stick is a router configuration type used for forwarding network traffic between multiple Virtual Local Area Networks (VLANs) using a single physical interface.

The router performs inter-VLAN routing by accepting traffic labeled with VLAN tags (using a trunk interface from the adjacent switch) and routing internally between virtual interfaces (subinterfaces).

Configuring Subinterfaces and Multilayer Switches

Subinterfaces are multiple logical interfaces associated with a single physical interface. To enable a multilayer switch to perform routing functions, you must configure the VLANs on the switch interfaces with corresponding IP addresses that match the subnet associated with that...

Continue reading "Implementing Inter-VLAN Routing and WLAN Security Standards" »

Data Link Layer Fundamentals: MAC, LLC, and Ethernet

Computer science8.44 KB

Data Link Layer Fundamentals

1. MAC vs. LLC Sublayers: Motivation

The Data Link Layer (Layer 2) is crucial for connecting to upper layers and managing device communication within a local network. It employs specific addressing schemes to identify devices and uses frames to group bits for transmission. This layer is divided into two sublayers:

  • Logical Link Control (LLC):
    • Establishes the connection with upper layers, integrating with network layer protocols.
    • Identifies the network layer protocol (e.g., IPv4, IPv6) for the encapsulated packet.
    • Remains independent of the physical equipment, providing a consistent interface to the network layer.
  • Media Access Control (MAC):
    • Responsible for bringing data onto and off the physical media.
    • Handles data encapsulation,
...
Continue reading "Data Link Layer Fundamentals: MAC, LLC, and Ethernet" »

MySQL Essentials: Database & Table Management Commands

Computer science5.6 KB

MySQL Essentials: Database & Table Management

Connecting to MySQL

To connect to a MySQL server, use the following command:

mysql -u [username] -p [password]

Database Operations

Viewing Databases

To see all available databases:

SHOW DATABASES;

Creating a Database

To create a new database:

CREATE DATABASE [database_name];

Selecting a Database

To select a database to work with:

USE [database_name];

Table Operations

Viewing Tables

To list all tables within the currently selected database:

SHOW TABLES;

Viewing Table Structure

To display the structure (columns, data types, etc.) of a specific table:

DESCRIBE [table_name];

Creating a Table

To create a new table within the selected database:

CREATE TABLE [table_name] (
    [field_name_1] [data_type_1] [field_definitions_
...
Continue reading "MySQL Essentials: Database & Table Management Commands" »

Cache Write Policies & Virtual Memory: A Deep Dive

Computer science3.47 KB

Cache Write Policies

Write-Through

  • Definition: Writes data to both the cache and main memory simultaneously.
  • Synchronization: Cache and main memory are always synchronized.
  • Write Speed: Slower, because every write goes to both cache and memory.
  • Data Integrity: Ensures data in both cache and main memory is identical.
  • CPU Performance Impact: Slower, due to the additional write to main memory.
  • Use Cases: Ideal for systems where data consistency is critical (e.g., databases).
  • Cache Miss Handling: Writes to both cache and memory on a miss.
  • Complexity: Simple to implement; doesn't require tracking of data in the cache.

Write-Back

  • Definition: Writes data to the cache first and only writes to memory when the cache line is evicted.
  • Synchronization: Cache and main
...
Continue reading "Cache Write Policies & Virtual Memory: A Deep Dive" »

Java Programming Concepts: A Comprehensive Guide

Computer science4.47 KB

  • A class is a template used to create objects and declare data types and methods in a program.
  • Public - Modifier used to declare classes and interfaces. Void - Method that returns no value. Main - Marks the start and end of program execution.
  • Scanner class - Used to get user input for types like String and Int.
  • Exceptions: Try-catch block, throw statement.
  • Inheritance provides a powerful and natural mechanism for organizing and structuring software programs. It improves clarity in the design of classes.
  • A subclass provides specialized behavior based on elements provided by the superclass. Using inheritance, programmers can reuse the code in the superclass many times.
  • Reading and Writing to Files:
    1. Import java.io file.
    2. File inputFile = new File("input.
...
Continue reading "Java Programming Concepts: A Comprehensive Guide" »

Digital Graphics and Media: Terms and Definitions

Computer science3.97 KB

Digital Graphics and Media: Key Terms

Image Fundamentals

  • Pixel: Individual dots that make up bitmap graphics.
  • Dots Per Inch (DPI): Also known as printer resolution. The number of dots of color a printer can produce in a certain amount of space.
  • Pixels Per Inch (PPI): The measurement of pixelation on an output device, such as a computer screen.
  • 300 PPI: The typical PPI needed for professional and commercial prints, such as advertising hoardings, for acceptable quality.
  • Megapixel: A unit used to measure the resolution of digital cameras, referring to one million pixels.
  • Bit Depth: Refers to the number of colors in an image.

Vector vs. Bitmap Graphics

  • Vector Graphics: Graphics stored as a series of mathematical shapes and properties that can be independently
...
Continue reading "Digital Graphics and Media: Terms and Definitions" »

Graph Theory and Algorithms Overview

Computer science27.7 KB

Loop Invariant:

Initialization:
1. The loop invariant states that after the 0th iteration...
2. Loop Invariant at alpha = 0
3. Before the first iteration ...
4. explanation of all the code before the loop
5. Thus the invariant is true after the 0th iteration (before first)
Maintenance:
1. Assume that the loop invariant is true after the (alpha - 1)th iteration. I will prove that after the (alpha)th iteration...
2. State loop invariant at alpha = alpha
3. On the (alpha)th iteration...
4. explanation of all the code within the body of the loop (might need to show mathematical logic)
5. As we can see, the invariant holds true after the (alpha)th iteration, thus proving maintenance.

Big-Theta, Big-Oh, Big-Omega

For the following definitions, recall that N+ is
...
Continue reading "Graph Theory and Algorithms Overview" »

Excel Pivot Tables, Search and Logic Functions, Macros

Computer science16.44 KB

Explanation

10.1 Pivot tables

What is a pivot table? It is one of the most powerful tools in Excel. They are also called “dynamic” because the data on them can be changed by rearranging or changing the position of the column and row headers in an easy and quick way.

The use of a dynamic table is to obtain information summaries from our data grid in order to be able to quickly analyze big volumes of information. These type of tables can be used in situations such as:

  • When you have a table with rows that have different date and you need to organize the information by time periods (month, semester, etc.)
  • When you need to change the arrangement in the rows or column cells to show different perspectives from the same data set.


Follow these steps to...

Continue reading "Excel Pivot Tables, Search and Logic Functions, Macros" »

Importing Bitmap Images into Fireworks: Supported Formats

Computer science2.59 KB

Importing Bitmap Images into Fireworks

Defining the Canvas

The first step is defining the work area or canvas (remember to have the negative area visible). Then, select the import option from the File menu.

A window like the one below will open.

Locating and Selecting the Image

In the Look in option, you'll search the folder where your image is saved. In the Files of type menu, the formats that Fireworks recognizes are shown. Once you select the file, click Open.

Placing the Image

The following mark will be displayed on the canvas, which means Fireworks is ready to bring in the selected image.

Simply click with your mouse or try to trace the desired size of the image.

That way, the image will appear on the canvas.

Image Properties

This image's properties...

Continue reading "Importing Bitmap Images into Fireworks: Supported Formats" »