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

Sort by
Subject
Level

Java Programming Concepts and Functions

Classified in Computers

Written on in English with a size of 2.41 KB

public static void main(String[] args) {
Scanner entrada = new Scanner(System.in);
String frase= entrada.nextLine();
Stack invertidas = new Stack();
Queue ordenadas = new LinkedList();
for(int i=0;i char letra= frase.charAt(i);
if(Character.isLetter(letra)){
invertidas.push(Character.toLowerCase(letra));
ordenadas.add(Character.toLowerCase(letra));
}
}
while(!invertidas.isEmpty() && invertidas.peek()==ordenadas.peek()) {
invertidas.pop();
ordenadas.poll();
}
if(invertidas.isEmpty() && ordenadas.isEmpty()){
System.out.println( 'A frase é palíndrome');
}
else{
... Continue reading "Java Programming Concepts and Functions" »

ABAP Dictionary Fundamentals: Key Concepts and Practical Applications

Classified in Computers

Written on in English with a size of 4.28 KB

ABAP Dictionary Fundamentals

Key Concepts and Practical Scenarios

Question 2: Creating ABAP Dictionary Objects

What can you create using the ABAP Dictionary? (Choose three)

  • A. Domains
  • B. Type pools
  • C. Transparent tables

Correct Answers: A, B, C

Question 14: Resolving Enhancement Category Warnings

You created a transparent table and during activation received a warning message: 'Enhancement category for table missing'. What must you do to eliminate this warning message?

  • A. Select any option other than 'Not Classified' from the enhancement category.

Correct Answer: A

Question 20: Assigning Fixed Values in ABAP Dictionary

To which ABAP Dictionary definition can you assign fixed values?

  • D. Domain

Correct Answer: D

Question 25: Understanding Transparent Table Relationships

In... Continue reading "ABAP Dictionary Fundamentals: Key Concepts and Practical Applications" »

C Synchronization: Semaphores for Process Control

Classified in Computers

Written on in English with a size of 5.09 KB

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/sem.h>
#include <sys/wait.h>
#include <sys/time.h>

define DELAY_MICROSECONDS 1000 // Renamed ESPERA for clarity

int initialize_semaphore(int value); int operate_semaphore(int semaphore, int operation); int remove_semaphore(int semaphore); int semaphore_wait(int semaphore); // Corresponds to P operation int semaphore_signal(int semaphore); // Corresponds to V operation void execute_command(int semaphore, char* command); void custom_delay();

int main() { int sem = initialize_semaphore(1); if (sem == -1) { fprintf(stderr, "Failed to initialize semaphore.\n"); return 1; }

execute_command(sem, "clear");
execute_command(sem, "date");
execute_
... Continue reading "C Synchronization: Semaphores for Process Control" »

Excel Pivot Tables, Search and Logic Functions, Macros

Classified in Computers

Written on in English with a size of 16.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" »

Telecom Standards: Business Values, Bodies, and Acronyms

Classified in Computers

Written on in English with a size of 2.5 KB

Business Values of Telecom Standardization for Operators

  1. Multiple sources of supply (decrease risk of sole supplier dependencies/lock-in, improve choice at competitive prices).
  2. Interoperability, e.g., multi-vendor networks, service interop.
  3. Assurance that investment in technology should not abruptly change or fail.

Business Values of Telecom Standardization for Vendors

  1. Network vendors can sell to all service operators, freed from vendor-specific R&D.
  2. Reduce customization.
  3. Build reputation / customer confidence - strong standards brand.
  4. Larger markets from wide adoption, greater economies of scale.

Types of Standards Bodies

  1. Accredited
  2. Treaty-based
  3. Partnerships

Telecom Acronyms Explained

  1. ITU: International Telecommunication Union
  2. IETF: Internet Engineering
... Continue reading "Telecom Standards: Business Values, Bodies, and Acronyms" »

SQL*Plus and Oracle Database: Test Questions and Answers

Classified in Computers

Written on in English with a size of 7.44 KB

SQL*Plus is the version of SQL used to access Oracle databases

1.True

2.False

SQL*Plus del command can delete all lines from the buffer at once

1.True

2.False

There is no difference between the CHAR and VARCHAR2 data types. They are just spelled differently

1.True

2.False

Which command(s) set the title of SQL*Plus report

  1. Set Headsep
  2. Column
  3. Set PageSize
  4. Set Line Size
  5. Edit
  6. Define_Editor
  7. Start
  8. Remark
  9. /* */
  10. Host
  11. Ttitle
  12. Btitile
  13. @
  14. Break On
  15. Compute Sum
  16. Set NewPage
  17. Set Pause
  18. Save
  19. Host
  20. Command is not in the list
  21. Command does not exist

Table in Oracle cannot be created if the primary key is not specified

1.True

2.False

Alternate key may contain NULL values

1.True

2.False

Table can have several alternate keys, but only one primary key and one foreign key

1.True

2.False

Which command(s) is/... Continue reading "SQL*Plus and Oracle Database: Test Questions and Answers" »

SQL Aggregate Functions: COUNT, SUM, MIN, MAX, AVG

Classified in Computers

Written on in English with a size of 12.36 KB

Aggregations

Consider the case of sports tournaments like cricket. Players' performances are analyzed based on their batting average, the maximum number of sixes hit, the lowest score in a tournament, etc.

In such scenarios, we perform aggregations to combine multiple values into a single value, i.e., individual scores into an average score.

Let's learn more about aggregations to perform insightful analysis using the following database.

Database: The database consists of a player_match_details table that stores information about players' details in a match, such as name, match, score, year, and the number of fours and sixes scored.

Schema

12345678
player_match_details (name VARCHAR(250),match VARCHAR(10),score INTEGER,fours INTEGER,sixes INTEGER,year
... Continue reading "SQL Aggregate Functions: COUNT, SUM, MIN, MAX, AVG" »

Understanding Merkle Trees, Blockchain, and Digital Signatures

Classified in Computers

Written on in English with a size of 2.43 KB

Merkle Trees and Data Verification

A Merkle Tree is a method of structuring data that allows a large body of information to be verified for accuracy extremely quickly and efficiently. Every Merkle tree results in a single string of data, known as the Merkle root. With the Merkle root, plus a few other pieces of data, any computer can efficiently validate all of the other entries in the Merkle tree. Merkle trees are used in distributed systems for efficient data verification. They are efficient because they use hashes instead of full files. Hashes are ways of encoding files that are much smaller than the actual file itself.

Key Blockchain Components

  • Block: A block, sometimes called a physical record, is a sequence of bytes or bits, usually containing
... Continue reading "Understanding Merkle Trees, Blockchain, and Digital Signatures" »

Python Class: Store Management System

Classified in Computers

Written on in English with a size of 4.38 KB

Python Store Management System

This code defines a Store class in Python, designed to manage customers, sellers, and orders. It uses basic object-oriented principles and data structures.

Class Definition

from Problema2.Cliente import Cliente
from Problema2.Vendedor import Vendedor

class Tienda():
    def __init__(self):
        self.__personas = []
        self.__pedidos = []

    def altaCliente(self, Cliente):
        alta = False
        if Cliente in self.__personas:
            alta = False
        else:
            self.__personas.append(Cliente)
            alta = True
        return alta

    def altaVendedor(self, Vendedor):
        alta = False
        if Vendedor in self.__personas:
            alta = False
        else:
... Continue reading "Python Class: Store Management System" »

Java JDBC Oracle Database Connection Class Implementation

Classified in Computers

Written on in English with a size of 2.62 KB

Implementación de la Clase Conecta

A continuación, se presenta la estructura de la clase Conecta, diseñada para gestionar la conexión a una base de datos Oracle mediante JDBC.

Código Fuente

package cl.duoc.tap.solemne3.datos;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Conecta {
    private String ip;
    private String puerto;
    private String usuario;
    private String password;
    private String baseDatos;
    private String driver;
    private Connection conn;

    public Conecta(String ip, String puerto, String usuario, String password, String baseDatos, String driver) {
        this.ip = ip;
        this.puerto = puerto;
        this.usuario = usuario;
        this.password
... Continue reading "Java JDBC Oracle Database Connection Class Implementation" »