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

Sort by
Subject
Level

Implementing Akka Clusters and Sharding in Lagom

Classified in Computers

Written on in with a size of 2.4 KB

Akka Clusters and Sharding with Lagom

This configuration demonstrates how to set up Akka Clusters and Sharding within a Lagom microservices project using Scala.

SBT Configuration

organization in ThisBuild := "com.example"
version in ThisBuild := "1.0-SNAPSHOT"
scalaVersion in ThisBuild := "2.11.8"

val macwire = "com.softwaremill.macwire" %% "macros" % "2.2.5" % "provided"
val scalaTest = "org.scalatest" %% "scalatest" % "3.0.1" % Test

lazy val `lagom-persistent-entity-demo` = (project in file("."))
  .aggregate(`user-api`, `user-impl`)

lazy val `user-api` = (project in file("user-api"))
  .settings(
    libraryDependencies ++= Seq(
      lagomScaladslApi
    )
  )

lazy val `user-impl` = (project in file("user-impl"))
  .enablePlugins(LagomScala)
... Continue reading "Implementing Akka Clusters and Sharding in Lagom" »

10 Usability Heuristics for User Interface Design

Classified in Computers

Written on in with a size of 2.46 KB

1. Visibility of System Status

The system should always keep users informed about what is going on, through appropriate feedback within a reasonable time.

2. Match Between System and the Real World

The system should speak the user's language, with words, phrases, and concepts familiar to the user, rather than system-oriented terms. Follow real-world conventions, making information appear in a natural and logical order.

3. User Control and Freedom

Users often choose system functions by mistake and will need a clearly marked "emergency exit" to leave the unwanted state without having to go through an extended dialogue. Support undo and redo.

4. Consistency and Standards

Users should not have to wonder whether different words, situations, or actions... Continue reading "10 Usability Heuristics for User Interface Design" »

Computer Hardware and Operating System Fundamentals

Classified in Computers

Written on in with a size of 1.98 KB

Microprocessor

A microprocessor is an integrated circuit with millions of tiny transistors that process instructions and data from memory.

  • Clock rate: The microprocessor's speed.
  • Number of bits: The amount of data a computer can process at once.

Memory

  • RAM: Main memory for temporary data storage.
  • ROM: Memory for startup programs and diagnostics.
  • Cache: Stores frequently used data for the microprocessor.

Storage

  • Hard disk: Device for permanent information storage.

Operating System

The operating system is a set of commands and programs that control basic computer processes and enable other programs to run.

  • Manages the microprocessor, coordinating computer work.
  • Manages memory and storage systems.
  • Provides a user interface.
  • Enables communication between applications
... Continue reading "Computer Hardware and Operating System Fundamentals" »

Exploring Basic Linux System Calls

Classified in Computers

Written on in with a size of 521.58 KB

Problem Statement

Explore the usage of basic Linux system calls.

Process Management System Calls

The system calls to manage processes are:

  • fork(): Used to create a new process.
  • exec(): Executes a new program.
  • wait(): Waits until the process finishes execution.
  • exit(): Exits from the process.

System calls used to get process IDs are:

  • getpid(): Gets the unique process ID of the process.
  • getppid(): Gets the parent process's unique ID.

Stat System Call

The stat system call retrieves information about files, specifically from their inodes. For instance, to get a file's size and name, you would typically use stat. Let's illustrate with a C code snippet (src/ls1.c):

#include<stdio.h>
#include<dirent.h>
#include<cstdlib>

struct dirent *dptr;
... Continue reading "Exploring Basic Linux System Calls" »

Java Conditional Logic, Loops & Dues Calculator

Classified in Computers

Written on in with a size of 3.27 KB

Java Membership Dues Calculator Example

Below is a corrected and formatted Java example that demonstrates conditionals, a switch, and loops. All original content has been preserved and corrected for spelling, grammar, and capitalization.

import java.util.Scanner;

public class DuesCalculator {
    public static void main(String[] args) {
        // TODO: application logic here
        // 1
        char standing;
        double gpa = 0, dues = 0;
        // 2
        Scanner keyboard = new Scanner(System.in); // import java.util.Scanner

        System.out.print("Enter your class standing: ");
        standing = keyboard.nextLine().charAt(0);

        System.out.println("Enter your GPA:");
        gpa = keyboard.nextDouble();

        // System.
... Continue reading "Java Conditional Logic, Loops & Dues Calculator" »

Sistema de Gestión de Inventario para Concesionarios

Classified in Computers

Written on in with a size of 993 bytes

Gestión de Concesionario

Bienvenido al sistema de administración de vehículos. Utilice las siguientes opciones para gestionar su inventario:

Configuración de Base de Datos

El script de inicialización crea la base de datos coches y la tabla ocasion con los campos necesarios: marca, modelo, combustible, color, año y precio.

Formulario de Alta de Vehículos

Datos del Vehículo

Marca: VolvoSaabFiatAudi
Modelo:
Color:

Combustible:

Diesel Gasolina
Año de matriculación:
Precio:

Procesamiento de Datos (PHP)

El archivo Alta.php recibe los parámetros mediante el método GET y realiza la inserción en la base de datos MySQL utilizando la conexión establecida.

Java Programming Concepts and Examples

Classified in Computers

Written on in with a size of 10.2 KB

Palindrome

  1. Start
  2. Read the string
  3. Calculate the length of the string
  4. Initialize rev
  5. Initialize i=length=1
  6. Repeat until i>=0
    1. rev=rev+char at position I of the string
    2. i=i-1
  7. If string=rev:print “palindrome”
  8. Else print “not palindrome”
  9. Stop

import java.util.Scanner; import java.util.Scanner; class Test { public static void main(String args[]){ Scanner sc = new Scanner(System.in); System.out.print("Enter the String:"); String str = sc.nextLine(); int flag = 0; int len = str.length(); for(int i=0;i


Inheritance

  1. Create a class employee with given variables and method print the salary
  2. Create two sub classes of class employee named officer and manager include the variable specilaization in officer class and department in manager class
  3. Create a class with main
... Continue reading "Java Programming Concepts and Examples" »

Understanding Operating Systems: Functions, Performance, and Multithreading

Classified in Computers

Written on in with a size of 217.89 KB

WEEK 1: Software that Manages Computer Hardware

Operating System as an Abstract Machine, Service Provider, and Resource Manager. OS Objectives: Convenience, Efficiency, and Ability to Evolve.

2m7mler6btRqsRIJBJQIjMtJtqIUCAAAECBAgQIECAQLCAEBkMbHkCBAgQIECAAAECBAhkEhAiM+2mWggQIECAAAECBAgQIBAsIEQGA1ueAAECBAgQIECAAAECmQSEyEy7qRYCBAgQIECAAAECBAgECwiRwcCWJ0CAAAECBAgQIECAQCYBITLTbqqFAAECBAgQIECAAAECwQJCZDCw5QkQIECAAAECBAgQIJBJQIjMtJtqIUCAAAECBAgQIECAQLCAEBkMbHkCBAgQIECAAAECBAhkEhAiM+2mWggQIECAAAECBAgQIBAsIEQGA1ueAAECBAgQIECAAAECmQSEyEy7qRYCBAgQIECAAAECBAgECwiRwcCWJ0CAAAECBAgQIECAQCYBITLTbqqFAAECBAgQIECAAAECwQJCZDCw5QkQIECAAAECBAgQIJBJQIjMtJtqIUCAAAECBAgQIECAQLCAEBkMbHkCBAgQIECAAAECBAhkEhAiM+2mWggQIECAAAECBAgQIBAsIEQGA1ueAAECBAgQIECAAAECmQSEyEy7qRYCBAgQIECAAAECBAgECwiRwcCWJ0CAAAECBAgQIECAQCYBITLTbqqFAAECBAgQIECAAAECwQJCZDCw5QkQIECAAAECBAgQIJBJQIjMtJtqIUCAAAECBAgQIECAQLCAEBkMbHkCBAgQIECAAAECBAhkEhAiM+2mWggQIECAAAECBAgQIBAsIEQGA1ueAAECBAgQIECAAAECmQSEyEy7qRYCBAgQIECAAAECBAgECwiRwcCWJ0CAAAECBAgQIECAQCYBITLTbqqFAAECBAgQIECAAAECwQJCZDCw5QkQIECAAAECBAgQIJBJQIjMtJtqIUCAAAECBAgQIECAQLCAEBkMbHkCBAgQIECAAAECBAhkEhAiM+2mWggQIECAAAECBAgQIBAsIEQGA1ueAAECBAgQIECAAAECmQSEyEy7qRYCBAgQIECAAAECBAgECwiRwcCWJ0CAAAECBAgQIECAQCYBITLTbqqFAAECBAgQIECAAAECwQJCZDCw5QkQIECAAAECBAgQIJBJ4H+SAtKHDjxkMAAAAABJRU5ErkJggg== 2+ubasMN7QAAAABJRU5ErkJggg==

Performance Indices

Arrival Time, Service Time, Turnaround Time, Normalized Turnaround Time. First-Come-First-Served (FCFS) Scheduling Policy.

Microprocessor and DMA Activity

Impact of Microprocessor Bus Configuration and DMA Activity on System Speed.

Memory System and Cache

Cache and Main Memory Access Time, Average Access Time Calculation.

A colorful bar chart with numbers  Description automatically generated with medium confidence

iOS and Android

Similarities and Differences between iOS and Android.

Job Execution and CPU Utilization

CPU Utilization for Uniprogramming and Multiprogramming.

Direct Memory Access (DMA)

Coordination, Memory Operations Completion,... Continue reading "Understanding Operating Systems: Functions, Performance, and Multithreading" »

Low-Level Programming: Machine Language, Pep/8 Assembly, and Algorithms

Classified in Computers

Written on in with a size of 3.92 KB

Computer Fundamentals and Data

A Computer is a programmable electronic device that can store, retrieve, and process data.

Data and Instructions: Instructions that manipulate data are logically the same as the data itself and can be stored in the same memory location.

Understanding Machine Language

Machine Language is a language made up of binary-coded instructions built directly into the computer's hardware and used by the processor.

Why Machine Language?

It is the fundamental language the hardware understands (no choice).

Characteristics of Machine Language

  • Every processor has its own unique set of machine instructions.
  • The relationship between the processor and the instructions it can carry out is completely integrated.
  • Each machine-language instruction
... Continue reading "Low-Level Programming: Machine Language, Pep/8 Assembly, and Algorithms" »

Web Design & Development Glossary: Terms and Definitions

Classified in Computers

Written on in with a size of 3 KB

Web Design & Development

Common Terms

Web Design

Is the act or practice of determining how a website looks.

Web Development

Is the act or practice of determining how a website works.

Navigation

Is the act of using and finding things on a website.

CSS

(Cascading Style Sheets) is a simple language that decides how a web page looks.

Coding

Is the programming language that makes up a website.

Visibility

Is how easily people find a website using search engines, based on how many other websites link to it.

Usability

Is how easy it is for a person to use a website.

Content

Is the material on a web page, including text and graphics.

Appearance

Is how a web page looks.

Functionality

Is the ability of different elements of a website to work together.

Programming Languages

C

Is... Continue reading "Web Design & Development Glossary: Terms and Definitions" »