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

Sort by
Subject
Level

Gestión de Libros: Formularios PHP para Insertar, Borrar y Consultar

Classified in Computers

Written on in English with a size of 464 bytes

Gestión de Libros: Formularios de Control

1. Insertar un nuevo libro

Título:

Autor:

Editorial:

Categoría: Texto Lectura

2. Borrar un libro

ID del libro:

3. Consulta de libros por categoría

Mostrar libros de la categoría: Todos Texto Lectura

OpenMP Parallel Programming: Optimization Techniques

Classified in Computers

Written on in English with a size of 3.13 KB

Conceptos Básicos de OpenMP

  • Flush: Ocurre cuando hay algo modificado y se escribe en la misma línea.
  • Bus Upgrade: Sucede cuando tienes un dato exclusivo y lo modificas.

Versión Secuencial con Pragma Parallel For y Reduction

int minimo(int *V, int n) {
    int i, k, i_end, i_start;
    int min = V[0];
    #pragma omp parallel for private(i_end, i_start) reduction(min:min)
    for(k = 0; k < 4; k++) {
        i_end = (k + 1) * (n / 4);
        if(k == 0) i_start = 1;
        else i_start = k * (n / 4);
        for(i = i_start; i < i_end; i++) {
            if(V[i] < min) min = V[i];
        }
    }
    return min;
}

Versión Usando Pragma OMP Task

int minimo(int *V, int N) {
    int i, k, i_end, i_start;
    int min;
    int min4[4][16]
... Continue reading "OpenMP Parallel Programming: Optimization Techniques" »

Functional vs Object-Oriented Programming: Python Concepts

Classified in Computers

Written on in English with a size of 2.29 KB

Functional vs. Object-Oriented Programming

Object-Oriented Programming (OOP) models problems as objects containing data and methods that perform actions on that data. Functional Programming treats problems as a chain of functions evaluated to produce a result.

Code Output Analysis

  • SQUARE [1, 4, 9]: []
  • FIB FUNC: 0: 1, 1: 8, 2: 19, 3: 46
  • HELLO F: The first prints “Hello world”. The second raises an error because say_hello() is bound to an object but is called without an instance.

Python Methods Explained

A class method takes the class as the first argument. A static method takes no class or instance reference. An instance method takes an instance as an argument.

Intersection of N Lists

To find the intersection of multiple lists, use reduce with set.

... Continue reading "Functional vs Object-Oriented Programming: Python Concepts" »

Responsibilities of the Transport Layer

Classified in Computers

Written on in English with a size of 1.9 KB

Transport Layer Responsibilities

Tracking Individual Conversations

At the transport layer, each set of data flowing between a source application and a destination application is known as a conversation (Figure 1). A host may have multiple applications that are communicating across the network simultaneously. Each of these applications communicates with one or more applications on one or more remote hosts. It is the responsibility of the transport layer to maintain and track these multiple conversations.

Segmenting Data and Reassembling Segments

Data must be prepared to be sent across the media in manageable pieces. Most networks have a limitation on the amount of data that can be included in a single packet. Transport layer protocols have services... Continue reading "Responsibilities of the Transport Layer" »

Computer Terminology Glossary

Classified in Computers

Written on in English with a size of 5.84 KB

A

  • ATTACHMENT: A file that is sent with an email.
  • BANDWIDTH: A measurement of the amount of information that a computer network can send or receive. High bandwidth allows images and websites to load quickly on the Internet.
  • BANNER: A rectangular graphic on a website that advertises a business.
  • CASE: An enclosure that holds the computer's components.
  • CODE: A set of words and symbols that give instructions to a computer.
  • CONTENT: The material on a web page, including text and graphics.
  • CROP: To cut off unwanted parts of an image.
  • DATABASE: A large group of data organized in a computer system. It allows you to search and find information easily.
  • DESKTOP: Everything that a user sees on a computer screen.
  • DESKTOP COMPUTER: A computer that is small enough to
... Continue reading "Computer Terminology Glossary" »

Understanding Open Standards, Smart Grids, and VoIP

Classified in Computers

Written on in English with a size of 3.04 KB

Key Features of an Open Standard

An "open standard" is characterized by two primary features:

  • Consensus-based: Developed through a consensus-driven process, ensuring no interested parties are excluded.
  • Publicly Available: Specifications are accessible to the public.

Smart Grid: Definition and Advantages

The smart grid represents the integration of telecommunications and informatics with the power/electricity grid.

Benefits of the Smart Grid:

  • Energy savings and improved consumption management.
  • Cost reduction.
  • Enhanced system reliability.
  • Improved electricity routing via intelligent switches.

OSI Model: Layer Identification

The 7-layer OSI model includes:

  • Layer 1: Physical
  • Layer 2: Data Link
  • Layer 3: Network

Advantages of IP over TDM for Businesses

Businesses

... Continue reading "Understanding Open Standards, Smart Grids, and VoIP" »

Data Mining and Machine Learning Techniques: A Comprehensive Overview

Classified in Computers

Written on in English with a size of 4.37 KB

KDD-- CRISP-DM = business understanding, data understanding, data prep, modeling, evaluation, deployment-- KDD- selection, preprocessing, transformation, mining, interp/eval-- classification = most frequently used, machine learning (supervised), output is nominal or ordinal categorical in nature -- assessment methods = predictive accuracy, speed, robustnest, scalability, interpretability-- confusion matrix formulae = accuracy = (TP + TN)/(TP+TN+FP+FN); true positive rate = (TP)/(TP+FN); true negative = TN/(TN+FP); precision = (TP)/(TP+FP); recall = (TP)/(TP+FN) -- overfitting = excessively complex model, can give bad predictions, underfitting- too flexible, also gives bad predictions-- k-fold cross validation- split data into k mutually exclusive... Continue reading "Data Mining and Machine Learning Techniques: A Comprehensive Overview" »

Web Requests, Concurrency Control & Distributed Systems

Classified in Computers

Written on in English with a size of 2.53 KB

Web Requests: GET vs. POST

GET: The request displays the password in the browser URL.

POST: Does not remain in history and does not display the password or on the web server log, not displayed in URL.

Controlling Access to Resources

Lock: Use the database.

  • Implement file lock.

Optimistic Concurrency Control

When using locks, there is a possibility of deadlocks.

Solution:

Use timeout: When starting the processing of a request, set a maximum execution timeout. When the timeout expires, the system suspects that a possible problem (such as a deadlock) has occurred.

When the timeout expires, which request should be aborted?

We may end up canceling a request that is almost complete.

Deadlock Prevention

To prevent deadlock, the system can set all the locks the... Continue reading "Web Requests, Concurrency Control & Distributed Systems" »

Dynamic HTML Tables and CSS Grid Layout Techniques

Classified in Computers

Written on in English with a size of 791 bytes

Dynamic Fruit and Vegetable Table Selector

This interactive tool allows users to filter data by entering specific categories.

Enter 'fruit' or 'vegetable':

Fruit List

BananaMango
KiwiApple
OrangeGuava

Vegetable List

TomatoOnion
PotatoBeans
BeetrootMushroom

CSS DIV-Based Table Layout

A demonstration of creating a grid structure using DIV elements and CSS.

1
2
3
4
5
6
7
8
9

Common C++ Programming Errors and Memory Pitfalls

Classified in Computers

Written on in English with a size of 6.93 KB

L-Values, R-Values, and Stack Variables

An l-value can be modified, while an r-value cannot be accessed again. Additionally, a stack variable is destroyed when it is popped from the stack.

Container Errors and Undefined Behavior

std::list Indexing Error

Code:

list<int> li;
li.push_front(5);
cout << li[1] << endl;

Error: The subscript operator or function is not defined for this type. std::list does not have a [] operator because it does not support random access.

std::vector Out-of-Bounds Access

Code:

vector<string> v;
string h = "hello";
v[0] = h;
cout << v[0] << endl;

Error: Indexing out of the bounds of the container. Since the vector is empty, this behavior is undefined.

Pointer and Reference Pitfalls

Uninitialized

... Continue reading "Common C++ Programming Errors and Memory Pitfalls" »