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

Sort by
Subject
Level

CPU Architecture and Computer Memory Systems

Classified in Computers

Written on in English with a size of 3.16 KB

Intel Pentium Processors and CPU Sockets

Intel Pentium processor: The processor is placed and secured into a compatible CPU socket found on the motherboard. Processors produce heat, so they are covered with a heat sink to keep them cool and running smoothly.

The CPU chip is usually in the shape of a square or rectangle and has one notched corner to help place the chip properly into the CPU socket. On the bottom of the chip are hundreds of connector pins that plug into each of the corresponding holes in the socket. Intel and AMD have also experimented with slot processors that were much larger and slid into a slot on the motherboard. Also, over the years, there have been dozens of different types of sockets on motherboards. Each socket only supports... Continue reading "CPU Architecture and Computer Memory Systems" »

Understanding Bleed, Slug, Trim, and Gutter in Print Design

Classified in Computers

Written on in English with a size of 3.33 KB

What is bleed? When any image or element on a page touches the edge of the page, extending beyond the trim edge leaving no margin it is said to bleed. It may bleed or extend off one or more sides.

What is slug? Non-printing information (such as a title and date) used to identify a document outside bleed area.

What is Trim - The final size of a printed page after excess edges of paper have been cut off What is Gutter - The area between columns on a page or the blank space between two facing pages in print

Match each file format with the kind of information it would likely be used to save?
o TIFF = A loss-less bit-mapped file format for high-resolution photographic images, typically in print
a EPS = A vector-based file format for high-resolution... Continue reading "Understanding Bleed, Slug, Trim, and Gutter in Print Design" »

Understanding JavaScript Events and Methods

Classified in Computers

Written on in English with a size of 5.51 KB

Javascript

The async attribute allows the browser to process the web page concurrently with loading and processing the JavaScript.

The defer attribute allows the browser to load the web page concurrently with loading the JavaScript, but the JavaScript is not processed until the web page is completely loaded.script src="bootstrap.js" async>script>

A change event is caused by an element value being modified. Ex: Selecting an item in a radio button group causes a change event.

An input event is caused when the value of an input or textarea element is changed.

A load event is caused when the browser completes loading a resource and dependent resources. Usually load is used with the body element to execute code once all the web page's CSS, JavaScript,

... Continue reading "Understanding JavaScript Events and Methods" »

Java Control Statements and Operators

Classified in Computers

Written on in English with a size of 5.46 KB


◦ Performs an action if a condition is true and performs a different action if the condition is false.

◦ Double-selection statement—selects between two different actions (or groups of actions).

}switch statement

◦ Performs one of several actions, based on the value of an expression.

◦ Multiple-selection statement—selects among many different actions (or groups of actions).

Iteration Statements in Java

}Four iteration statements (also called iteration statements or looping statements)

◦ Perform statements repeatedly while a loop-continuation condition remains true.

}


while and for statements perform the action(s) in their bodies zero or more times

◦ if the loop-continuation condition is initially false, the body will not execute.

}The do…while... Continue reading "Java Control Statements and Operators" »

C++ Queue Data Structure Implementation

Classified in Computers

Written on in English with a size of 6.1 KB

This document presents a C++ implementation of a Queue data structure, demonstrating its core functionalities and operations. The Queue is implemented using a linked list, adhering to the First-In, First-Out (FIFO) principle.

Queue Class Definition

The Queue class encapsulates the data members and member functions necessary to manage a queue. Note that the Node struct/class is assumed to be defined elsewhere, typically as struct Node { double info; Node* link; };.

class Queue
{
private:
    Node* front;
    Node* rear;
    int count;
    double info; // This member 'info' within the Queue class itself seems unused in the provided code.
public:
    // Constructor: Should be 'Queue();' without 'void'. Implementation is missing.
    Queue();
... Continue reading "C++ Queue Data Structure Implementation" »

Predictive Modeling Techniques in Data Mining

Classified in Computers

Written on in English with a size of 4.25 KB

CH6

Predictive Modeling Techniques

61) Predictive modeling is perhaps the most commonly practiced branch in data mining. What are three of the most popular predictive modeling techniques?

Answer:

  • Artificial neural networks
  • Support vector machines
  • k-nearest neighbor

62) Why have neural networks shown much promise in many forecasting and business classification applications?

Answer: Because of their ability to "learn" from the data, their nonparametric nature (i.e., no rigid assumptions), and their ability to generalize.

Understanding Neural Networks

63) Each ANN is composed of a collection of neurons that are grouped into layers. One of these layers is the hidden layer. Define the hidden layer.

Answer: A hidden layer is a layer of neurons that takes input... Continue reading "Predictive Modeling Techniques in Data Mining" »

Java Code Examples: Word Count, Fibonacci, Stack & Queue

Classified in Computers

Written on in English with a size of 6.62 KB

Class: CountOccurrenceOfWords

This class demonstrates how to count the occurrences of words in a given text string using a TreeMap to maintain sorted word counts.

public class CountOccurrenceOfWords {
    public static void main(String[] args) {
        // Set text in a string
        String text = "Good morning. Have a good class. " +
                      "Have a good visit. Have fun!";

        // Create a TreeMap to hold words as keys and counts as values
        Map<String, Integer> map = new TreeMap<>();

        String[] words = text.split("[ \n\t\r.,;:!?()]+");
        for (int i = 0; i < words.length; i++) {
            String key = words[i].toLowerCase();
            if (key.length() > 0) {
                if (!map.
... Continue reading "Java Code Examples: Word Count, Fibonacci, Stack & Queue" »

Object-Oriented Data Encapsulation & Types

Classified in Computers

Written on in English with a size of 2.63 KB

Chapter 1: Foundations of Object-Oriented Programming

Data Encapsulation with Classes

The starting point of object-oriented programming is to provide a more faithful implementation of the notion of “type” in programming. The programming languages we are familiar with come with standard built-in types that we can assign to variables and values:

Built-in Programming Types

  • In C, we can use int, float, double, char, etc.
  • In Haskell, similarly, we can use Int, Float, Char, Bool, etc.

In addition, programming languages provide a way to assign a single name to a collection of values of the same type. The nature of this collection is determined by the underlying architecture assumed by the programming language.

Collections and Data Structures

Arrays in
... Continue reading "Object-Oriented Data Encapsulation & Types" »

Core Operating System Concepts: Processes, Shells, and Security

Classified in Computers

Written on in English with a size of 95.39 KB

Operations on a Process

  1. Process Creation: A user request or an already running process can create new processes. A parent process creates child processes using a system call, which, in turn, can create other processes, forming a tree of processes.
  2. Process Pre-emption: A process is pre-empted if an I/O event or timeout occurs. The process then moves from the running state to the ready state, and the CPU loads another process from the ready state to the running state, if available.
  3. Process Blocking: When a process requires an I/O event during its execution, it moves from the running state to the waiting state, and the CPU dispatches another process.
  4. Process Termination: A process is terminated when it completes its execution. Additionally, events
... Continue reading "Core Operating System Concepts: Processes, Shells, and Security" »

Software, Hardware, Networking, Cloud & IoT Fundamentals

Classified in Computers

Written on in English with a size of 2.96 KB

Software

Software: It's a set of instructions, data, or programs used to operate computers and execute specific tasks. It is a generic term used to refer to applications, software, and programs that run on a device. E.g. Excel, Linux, macOS.

Hardware

Hardware: It's the physical parts of a computer and related devices. They can be internal, such as: motherboard, RAM, CPU; or external, such as monitors, printers, and keyboards.

Client/Server Computing

Client/Server Computing: This is a distributed computing model where some processing power is located within small, cost-effective client PCs.

Packet Switching

Packet Switching: Packet switching is a method of breaking down digital messages into smaller packets. These packets are sent across various communication... Continue reading "Software, Hardware, Networking, Cloud & IoT Fundamentals" »