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

Sort by
Subject
Level

MATLAB Data Analysis and Trigonometric Plotting

Classified in Computers

Written on in English with a size of 2.6 KB

MATLAB Statistical Analysis of Student Weights

Analyze the weight of 30 students to find the minimum, maximum, average, standard deviation, and plot a histogram.

>> a=[ 71 82 65 75 77 91 59 84 89 81 73 91 82 75 96 85 69 76 81 92 84 79 77 95 81 79 84 85 76 82]

a = Columns 1 through 12
    71 82 65 75 77 91 59 84 89 81 73 91

Columns 13 through 24
    82 75 96 85 69 76 81 92 84 79 77 95

Columns 25 through 30
    81 79 84 85 76 82

>> max(a)
ans = 96

>> min(a)
ans = 59

>> mean(a)
ans = 80.5333

>> std(a)
ans = 8.4516

>> hist(a)

Plotting Trigonometric Functions in MATLAB

Follow these steps to plot trigonometric functions:

  • Plot the value of the cosine within [0, 2π] with a step of π/20.
  • Label the axes and add
... Continue reading "MATLAB Data Analysis and Trigonometric Plotting" »

MPEG Multimedia Standards and Descriptors Quiz

Classified in Computers

Written on in English with a size of 2.4 KB

1. Which of the following statements about MPEG is not correct?

  • a. MPEG-1/2/4 are multimedia standards related to video and audio compression.
  • b. MPEG-7 is a multimedia content description standard that standardizes the extraction process and usage of audiovisual descriptors.
  • c. MPEG-7 is a multimedia content description standard that standardizes the syntax and semantics of audiovisual descriptors.

2. The Dominant Color Descriptor (DCD) captures…

  • a. The spatial distribution of the colors in an image using by default the YUV color space.
  • b. A maximum of eight representative colors using by default the RGB color space.
  • c. All the colors in the RGB color space with a larger percentage than 10.

3. The Color Structure Descriptor (CSD)…

  • a. Does not capture
... Continue reading "MPEG Multimedia Standards and Descriptors Quiz" »

Java Sudoku Solver: Backtracking Algorithm Implementation

Classified in Computers

Written on in English with a size of 5.57 KB

Building a Sudoku Solver in Java with Backtracking

This document presents a Java implementation of a Sudoku solver, utilizing a classic backtracking algorithm. The code demonstrates how to represent a Sudoku board, check for valid moves, and recursively find a solution to the puzzle.

Initial Sudoku Puzzle Setup

The Sudoku board is represented as a 2D integer array. A value of 0 indicates an empty cell that needs to be filled.

int[][] board = {
  { 8, 0, 0, 0, 0, 0, 0, 0, 0 },
  { 0, 0, 3, 6, 0, 0, 0, 0, 0 },
  { 0, 7, 0, 0, 9, 0, 2, 0, 0 },
  { 0, 5, 0, 0, 0, 7, 0, 0, 0 },
  { 0, 0, 0, 0, 4, 5, 7, 0, 0 },
  { 0, 0, 0, 1, 0, 0, 0, 3, 0 },
  { 0, 0, 1, 0, 0, 0, 0, 6, 8 },
  { 0, 0, 8, 5, 0, 0, 0, 1, 0 },
  { 0, 9, 0, 0, 0, 0, 4, 0, 0 }
};

Implementing

... Continue reading "Java Sudoku Solver: Backtracking Algorithm Implementation" »

Essential Computer Terms and Definitions

Classified in Computers

Written on in English with a size of 3.75 KB

Essential Computer Hardware and Components

  • ROM: Primary memory that is used to read data.
  • USB: A slot in the motherboard where you can plug in input devices.
  • Headset: An output device used to listen and to speak.
  • Printer: A peripheral device used to convert digital documents into paper.
  • Tablet: A portable computer.
  • Keyboard: An input device used to type data into the PC.
  • Key: Every unit of a keyboard used for typing.
  • Mainframe: A professional, powerful computer used to offer a service.
  • CPU: A component of the motherboard that manages all the processes of the computer.
  • Scanner: An input peripheral device used to convert documents into digital format.
  • Magnetic Disk: Analogous secondary storage.
  • Megabyte: A measurement unit used in IT representing memory
... Continue reading "Essential Computer Terms and Definitions" »

Layer 3 Versus Layer 2 Packet Fragmentation Analysis

Classified in Computers

Written on in English with a size of 3.45 KB

Packet Fragmentation: Layer 3 vs. Layer 2

As mentioned in the “Link-Layer Fragmentation and Interleaving” section, PPP, Frame Relay, ATM, and other WAN technologies support fragmenting packets (frames) at Layer 2. As you may have learned in basic networking classes, IP can also fragment packets at Layer 3. What are some advantages and disadvantages of fragmenting at Layer 3 versus fragmenting at Layer 2?

Advantages and Disadvantages

  • Advantages (Layer 3 Fragmentation): Large packets can be transmitted at Layer 2 as fragmentation is done at Layer 3. This reduces the number of acknowledgment exchanges. Also, maintaining the order of fragments to ensure the order of transmission and reassembly is not required.
  • Disadvantages (Layer 3 Fragmentation)
... Continue reading "Layer 3 Versus Layer 2 Packet Fragmentation Analysis" »

"entirely belongs to" shareholding

Classified in Computers

Written on in English with a size of 359.9 KB

Chapter 1 Introduction to Services

3.1. Service Terminology Service

a service is a software program that makes its functionality available via a technical interface, called a service contract.

Image

Figure 3.1. The symbol used to represent an abstract service.

Service Contract

The symbol used to represent a service contract is displayed in Figure 3.2.

Image

Service Capability

A service contract can be broken down into a set of service capabilities, each of which expresses a function offered by the service to other software programs.

Image

Figure 3.4. A Purchase Order service contract with four service capabilities.

Service Consumer

A service consumer is software program when it accesses and invokes a service—or, when it sends a message to a service capability


Service

... Continue reading ""entirely belongs to" shareholding" »

Implementing Akka Clusters and Sharding in Lagom

Classified in Computers

Written on in English with a size of 2.4 KB

Akka Clusters and Sharding with Lagom

This configuration demonstrates how to set up Akka Clusters and Sharding within a Lagom microservices project using Scala.

SBT Configuration

organization in ThisBuild := "com.example"
version in ThisBuild := "1.0-SNAPSHOT"
scalaVersion in ThisBuild := "2.11.8"

val macwire = "com.softwaremill.macwire" %% "macros" % "2.2.5" % "provided"
val scalaTest = "org.scalatest" %% "scalatest" % "3.0.1" % Test

lazy val `lagom-persistent-entity-demo` = (project in file("."))
  .aggregate(`user-api`, `user-impl`)

lazy val `user-api` = (project in file("user-api"))
  .settings(
    libraryDependencies ++= Seq(
      lagomScaladslApi
    )
  )

lazy val `user-impl` = (project in file("user-impl"))
  .enablePlugins(LagomScala)
... Continue reading "Implementing Akka Clusters and Sharding in Lagom" »

10 Usability Heuristics for User Interface Design

Classified in Computers

Written on in English with a size of 2.46 KB

1. Visibility of System Status

The system should always keep users informed about what is going on, through appropriate feedback within a reasonable time.

2. Match Between System and the Real World

The system should speak the user's language, with words, phrases, and concepts familiar to the user, rather than system-oriented terms. Follow real-world conventions, making information appear in a natural and logical order.

3. User Control and Freedom

Users often choose system functions by mistake and will need a clearly marked "emergency exit" to leave the unwanted state without having to go through an extended dialogue. Support undo and redo.

4. Consistency and Standards

Users should not have to wonder whether different words, situations, or actions... Continue reading "10 Usability Heuristics for User Interface Design" »

Computer Hardware and Operating System Fundamentals

Classified in Computers

Written on in English with a size of 1.98 KB

Microprocessor

A microprocessor is an integrated circuit with millions of tiny transistors that process instructions and data from memory.

  • Clock rate: The microprocessor's speed.
  • Number of bits: The amount of data a computer can process at once.

Memory

  • RAM: Main memory for temporary data storage.
  • ROM: Memory for startup programs and diagnostics.
  • Cache: Stores frequently used data for the microprocessor.

Storage

  • Hard disk: Device for permanent information storage.

Operating System

The operating system is a set of commands and programs that control basic computer processes and enable other programs to run.

  • Manages the microprocessor, coordinating computer work.
  • Manages memory and storage systems.
  • Provides a user interface.
  • Enables communication between applications
... Continue reading "Computer Hardware and Operating System Fundamentals" »

Exploring Basic Linux System Calls

Classified in Computers

Written on in English with a size of 521.58 KB

Problem Statement

Explore the usage of basic Linux system calls.

Process Management System Calls

The system calls to manage processes are:

  • fork(): Used to create a new process.
  • exec(): Executes a new program.
  • wait(): Waits until the process finishes execution.
  • exit(): Exits from the process.

System calls used to get process IDs are:

  • getpid(): Gets the unique process ID of the process.
  • getppid(): Gets the parent process's unique ID.

Stat System Call

The stat system call retrieves information about files, specifically from their inodes. For instance, to get a file's size and name, you would typically use stat. Let's illustrate with a C code snippet (src/ls1.c):

#include<stdio.h>
#include<dirent.h>
#include<cstdlib>

struct dirent *dptr;
... Continue reading "Exploring Basic Linux System Calls" »