Notes, summaries, assignments, exams, and exercises for Computer science for Vocational training

Web Design and Accessibility Services

Computer science1.25 KB

Web Design and Accessibility Services

Header

Nav

Content

Aside

This is the aside container or wrapper with a width of 30%. Inside, we place a div.

Inside aside, we place a <div>.

This div has margins of 20px and padding of 10px.

Main

This is the MAIN container or wrapper with a width of 70%:

Article Title 1

All articles are within main with a margin and padding. Place the content for class "article 1" here.

Article Title 2

Place the content for class "article 2" here.

Article Title 3

Place the content for class "article 3" here.

Click on the image

Tailored to Your Needs

You will find:

  • Custom Graphic Design
  • Web Design
  • Accessibility
  • Usability
  • Text Processing

Footer

Get in touch at the address:

[email protected]

Java File Infection Simulation and Implementation

Computer science2.8 KB

This document details the implementation of a Virus class in Java, focusing on binary file manipulation and stream handling.

Java Source Code for Virus Simulation

import java.io.*;
import java.util.*;

/**
 * Write a description of class Virus here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Virus
{
    // Campos  
    private File virusFile;  // Fichero con el código binario del virus
    public static final int SIZE = 100;

    /**
     * Constructor for objects of class Virus
     */
    public Virus( String nombre )
    {
        this.virusFile = new File(nombre);
    }

    /**
     * Método get para el campo this.virusFile
     * 
     * @return     this.virusFile
     */
    public File getFile(
...
Continue reading "Java File Infection Simulation and Implementation" »

Customer Feedback and Catalog Request Form

Computer science1.22 KB

Customer Feedback and Catalog Request

Please fill out this form to provide feedback on the event and indicate your preferences for receiving our catalog.

Personal Information

Name:

[Name Field]

Surname:

[Surname Field]

Password:

[Password Field]

Event Feedback

Did you enjoy the event?

Please write your comments here.

Yes, I would like to receive the catalog.

Payment Method

Preferred Payment Method:

  • Credit Card
  • Postal Order
  • Cash on Delivery (Unavailable)

Catalog Language

In which language would you like to receive the catalog?

  • Spanish
  • English
  • German (Unavailable)

Address Details

Type of street:

Street Avenue Square Other

Preferred Means of Transport

Preferred Means of Transport:

Plane Train Ship Bus Van

Destination

Destination:

Athens Dublin Istanbul Lisbon London Oslo Paris...

Continue reading "Customer Feedback and Catalog Request Form" »

Prova de Conexão Java com SQL Server: Busca de Nome e Idade

Computer science3.15 KB

Conexão

public DataBase() {

this.setDatabase("PROVA");

this.setUrl("jdbc:sqlserver://localhost:1433;databaseName=" + this.getDatabase());

this.setUsername("sa");

this.setPassword("sa@12345");

this.setDriver("com.microsoft.sqlserver.jdbc.SQLServerDriver");

Usuário DAO

public class UsuarioDAO {

Usuario user;

public UsuarioDAO(Usuario user) {

this.user = user;

}

public static String BuscarNome(int codusuario) {

DataBase db = new DataBase();

db.openConnectionDB();

String query = "SELECT nome as result FROM USUARIO WHERE codusuario = " + codusuario;

String resp = db.exeSQL(query);

db.closeConnectionDB();

return resp;

}

public static String BuscarIdade(int codusuario)

...

Continue reading "Prova de Conexão Java com SQL Server: Busca de Nome e Idade" »

Microprocessor and Microcontroller Architecture Fundamentals

Computer science2.78 KB

Microprogrammable Systems

A microprogrammable system reads, interprets, and executes sequential instructions contained within a program. These systems are essential for computer applications, mathematical calculations, industrial processes, and electrical apparatus.

Core Components

  • Clock: Generates periodic square waves for synchronization.
  • Microprocessors: Include the CPU and are used in applications requiring large memory and high-speed processing.
  • Microcontrollers: Feature a CPU embedded on a single chip, designed for specific tasks and smaller footprints.
  • PLDs (Programmable Logic Devices): Chips that integrate a matrix of logic gates whose functionality can be configured via programming.

Processing Units

The Processing Unit handles arithmetic and...

Continue reading "Microprocessor and Microcontroller Architecture Fundamentals" »

Firebase Google Login and Notes App in JavaScript

Computer science4.45 KB

Firebase Google Login and Realtime Notes Implementation

import { initializeApp } from "https://www.gstatic.com/firebasejs/10.7.2/firebase-app.js";
import { getAuth, signInWithRedirect, getRedirectResult, GoogleAuthProvider } from "https://www.gstatic.com/firebasejs/10.7.2/firebase-auth.js";
import { getDatabase, ref, set, onChildAdded, onChildChanged } from 'https://www.gstatic.com/firebasejs/10.7.2/firebase-database.js';

Firebase Configuration and Initialization

const firebaseConfig = {
    apiKey, authDomain, databaseURL, projectId, storageBucket, messagingSenderId, appId
};
const app = initializeApp(firebaseConfig);
const auth = getAuth(app);
const db = getDatabase(app);
let user = null;
let note_ref = null;
document.addEventListener('deviceready'...

Continue reading "Firebase Google Login and Notes App in JavaScript" »

Implementing and Publishing a JAX-WS SOAP Web Service

Computer science2.4 KB

CEP Request Wrapper (Cep.java)

package control.jaxws;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlRootElement(name = "cep", namespace = "http://control/")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "cep", namespace = "http://control/")
public class Cep {

    @XmlElement(name = "leituraCep", namespace = "")
    private int leituraCep;

    public int getLeituraCep() {
        return this.leituraCep;
    }

    public void setLeituraCep(int leituraCep) {
        this.leituraCep = leituraCep;
    }
}

CEP Response Wrapper (CepResponse.java)

package
...
Continue reading "Implementing and Publishing a JAX-WS SOAP Web Service" »

Implementing System V Message Queues and Semaphores in C

Computer science1.76 KB

PROGRAMA_ESCRITOR_COLA: IPC Implementation

The PROGRAMA_ESCRITOR_COLA reads an 80-character maximum name, an address, and a salary (long integer) until the word "FIN" is entered in the name field. This information is placed into a message queue along with a user-defined message type. While this program runs, it prevents other processes from accessing the message queue. Upon completion, the system allows up to two processes to simultaneously access the queue to extract messages.

Data Structure Definition

struct employee {
    long type;
    char name[80];
    char dir[80];
    long salary;
};

Implementation Logic

The program initializes the IPC mechanisms using ftok, semget, and msgget. It uses semaphores to ensure exclusive access during the writing...

Continue reading "Implementing System V Message Queues and Semaphores in C" »

Review c + +

Computer science2.96 KB

/ * Multiplication table * / # include void main () (int n, cont, prod; do (printf ( "Enter a positive integer:") scanf ( "% i", & n);) while (n < 0); cont = 1 while (cont <= 10) (prod = n * cont; printf ( "\ n% i *% i =% i", n, cont, prod); cont + + / * cont = cont +1 * /))

/ * Multiple of 3 * / # include void main () (int A, B; printf ( "enter any number:") scanf ( "% d", & A), B = A, while (A> = 3) (A = A-3;) if (A == 0) (printf ( "% d is a multiple of 3", B);) else (printf ( "% d is not a multiple of 3", B);))

/ * Sum the first hundred numbers from N * / # include void main () (int N, cont, sum; do (printf ( "Enter a positive number") scanf ( "% i", & N);) while (N <0); cont = N; sum = N while (cont <100) (sum...

Continue reading "Review c + +" »