C Code for a Calculator Using Pipes and ‘bc’

This code implements a calculator that reads arithmetic operations from an input file, uses the ‘bc’ command-line utility to perform the calculations, and writes the results to an output file. It demonstrates the use of pipes for inter-process communication in a Linux environment.

Code Description

The program takes two command-line arguments:

  • Input file: Contains arithmetic operations.
  • Output file: Stores the results of the calculations.

The leer_op function reads the input file, identifies arithmetic

Read More

VLANs, VTP, and STP Configuration in Network Switches

Image

See the image. What forms the router handles traffic when a VLAN is received on the trunk link? (Choose two.)

  • The router cannot route between VLANs because the interface Fa0/0 IP address is required.
  • The packets that are received from the network 192.168.20.0/24 are handled by the Fa0/0.20 subinterface.

Image

See the image. A network administrator divided the network into two VLANs. Hosts connected can only access the resources of their own VLAN. What is the most scalable and economic solution to enable

Read More

MySQL User Permissions and Database Queries

Specific Queries and User Management

A specific query that shows global users who have permission to grant on all tables of the ‘jmmusuarios’ database:

CREATE USER 'globalnoconcede'@'localhost' IDENTIFIED BY 'soyglobal';
GRANT ALL PRIVILEGES ON JMMUSUARIOS.* TO 'globalnoconcede'@'localhost';

SELECT DB.User, DB.Db, DB.Grant_priv
FROM MYSQL.DB
WHERE DB.Db LIKE 'jmmusuarios'
AND DB.Grant_Priv LIKE 'Y';

Query that shows the functions and procedures in the system:

DESCRIBE MYSQL.PROC;

SELECT PROC.name, PROC.

Read More

SQL Queries and PL/SQL Functions Examples

SQL Queries

Find series name by episode:

SELECT s.nombre "NOMBRE SERIE"
FROM SERIE s
WHERE s.ID_CODSERIE = (
  SELECT e.SERIE_ID_CODSERIE
  FROM EPISODIO e
  WHERE e.NOMBRE = 'la manzana madura'
);

Find actor name by character:

SELECT a.nombre "NOMBRE ACTOR"
FROM actor a
WHERE a.ID_ACTOR = (
  SELECT p.ACTOR_ID_ACTOR
  FROM personaje p
  WHERE p.NOMBRE = 'Sheldon'
);

Find actors who won a Grammy:

SELECT a.NOMBRE "NOMBRE ACTOR", a.F_NAC "FECHA DE NACIMIENTO"
FROM ACTOR a
INNER JOIN GANA g ON a.ID_ACTOR 
Read More

Oracle Database Architecture: Components and Structure

Key Components of an Oracle Database

  • Control File: Contains information about physical files, the name of the database, block sizes, and information for recovery. Control files are required to open the database.
  • Data File: Contains information that records end-user applications.
  • Redo Log: Records all changes made to the database and the recovery status.
  • Pfile and Spfile: These are settings of the System Global Area (SGA) and optional features of Oracle background processes.

Oracle Instance and Server

  • An
Read More

Understanding Isometries in R2 and R3: A Comprehensive Breakdown

Understanding Isometries in R2

Theory

It retains the standard distance i = A · AT = Id. Det = +1 or -1.

Vector fix: v ∈ P associates at v ∈ P 1SI F ∈ G = Tv, then F o G also. Det H = Det G · Det F.

Equations: Tv(x, y) = (x, y). Base service: Tv = Cne · Tn · Cne-1

Note: A * I must be symmetrical.

CNE

  1. Find a point on the axis or plane (one that satisfies the equation).
  2. From the equation equal to 0, if you are caught, separate subjects. If not equal to 0, they are roofed and left all depending on
Read More