Notes, abstracts, papers, exams and problems of Computers

Sort by
Subject
Level

yty

Classified in Computers

Written at on English with a size of 1.61 KB.

Disadvantages/cons of Grid Computing

1) Grid software and standards are still evolving.

2) Learning curve to get started.

3) Non-interactive job submission.

4) A fast network connection between the computer and network is necessary.

5) The computer that are used may not to be fast enough or might be slow down.

6) Require specific software to make it work.

7) Computer can drop off connection to the computer on the grid can get disconnected anytime so its hard to control all of them.

8) Not all hardware run at the same speed – local processors may not have some capabilities to process tasks.

9) Limited control over the hardware since dispersedly located across the network.

10) Resource allocation can be hard – logically having more nodes... Continue reading "yty" »

Swift Loops, Strings, and Characters: Tips and Tricks

Classified in Computers

Written at on English with a size of 6.55 KB.

Loops

  • // Loop forward
  • for i in 0..
  • // do something
  • }
  • // Loop in reverse
  • for index in stride(from: 5, through: 1, by: -1) {
  • print(index) // 5,4,3,2,1
  • }
  • // OR
  • for i in (0..<10).reversed() {
  • print(i)
  • }

Strings

  • // Convert String to Array of Strings containing 1 Character
  • var strArr = str.characters.map { String($0) }
  • // Join Array of Strings into 1 String
  • var str = strArr.joined(separator: "")
  • // Split String into array
  • import Foundation
  • let fullNameArr = fullName.components(separatedBy: " ")
  • // Split String into Characters
  • let subsequences = str.characters.split(separator: " ") // Returns array of Subsequence, not array of strings
  • String(subsequences[0]) // to use as string
  • // Convert String to Array of Characters
  • sChars = Array(string.characters)

String/Character to

... Continue reading "Swift Loops, Strings, and Characters: Tips and Tricks" »

Internal Transport and Storage Systems in Warehouses

Classified in Computers

Written at on English with a size of 3.96 KB.

Internal transport

Refers to the physical movement of products inside loading/unloading areas, docks, order preparation zones, truck load and any other eventual activity that implies products movements inside the warehouse.

Horizontal transport:

On this type of transport merchandise do not need to be raised to locate in a determined place. (Pallet truck, roller conveyor, conveyor belt system, auto guide transport system).

Vertical transport:

This transport not just allows the product to be transported from one place to another, but also to be raised to locate in a specific place. (Conventional forklift, retractable forklift, trilateral forklift).

Conventional forklift/truck lift (“Toros”)

Could be fixed mast or counterbalance, they need from 3... Continue reading "Internal Transport and Storage Systems in Warehouses" »

Fruteria: Añadir, Comprar y Pagar Frutas

Classified in Computers

Written at on English with a size of 3.49 KB.

int opcion=0;

double cantidad, vuelto;

double pago, total = 0;

string[,] fruta = { { 'Manzana', '4.9' }, { 'Pera', '5.5' }, { 'Naranja', '8.6' }, { 'Platano', '2.7' } ,{ 'Fresa', '1.9' } ,{ 'Piña', '2.4' }, { 'Papaya', '4.2' }, { 'Sandia', '3.4' } ,{ 'Durazno', '3.5' } };

String[,] añaFruta = newString[50, 5];

int i=0, j=0;

int añadir = 0,tFruta=0;

do{

do{

i = 0;

Console.Write('_________________________ ' +

'FRUTERIA .... '+

'1) AÑADIR FRUTA. ');

while (i < 9)

{ Console.Write(i+2+') '+fruta[i,0]+' ');

i++;

}

if(añadir>0)

{j = 11;

i = 0;

tFruta = añadir+9;

while (i < añadir)

{Console.Write(j + ') ' + añaFruta[i, 0] + ' ');

j++;i++;

}

}

else { tFruta = 9; }

Console.Write(tFruta + 2+') Pagar. ');

opcion = int.Parse(Console.ReadLine(

... Continue reading "Fruteria: Añadir, Comprar y Pagar Frutas" »

SQL Queries and Data Modeling

Classified in Computers

Written at on English with a size of 9.73 KB.

Aggregate Functions

How many hotels are there?

SELECT COUNT(*) FROM Hotel;

What is the average price of a room?

SELECT AVG(price) FROM Room;

What is the total revenue per night from all double rooms?

SELECT SUM(price) FROM Room WHERE type = 'D';

How many different guests have made bookings for August?

SELECT COUNT(DISTINCT guestNo) FROM Booking WHERE (dateFrom <= DATE'2004-08-01' AND dateTo >= DATE'2004-08-01') OR (dateFrom >= DATE'2004-08-01' AND dateFrom <= DATE'2004-08-31');

Subqueries and Joins

List the price and type of all rooms at the Grosvenor Hotel.

SELECT price, type FROM Room WHERE hotelNo = (SELECT hotelNo FROM Hotel WHERE hotelName = 'Grosvenor Hotel');

List all guests currently staying at the Grosvenor Hotel.

SELECT * FROM Guest... Continue reading "SQL Queries and Data Modeling" »

Public synchronized int incContador (int val)

Classified in Computers

Written at on English with a size of 2.34 KB.

MEMENTO
public class MementoDemo {
    public static void main(String[] args) {
        Caretaker caretaker = new Caretaker();
Originator originator = new Originator(); Originator.SetState("State1"); Caretaker.AddMemento( originator.Save() ); Originator.Restore( caretaker.GetMemento() ); } }


COMPOSITE
public class CompositeDemo {
    public static void main(String[] args) {
        Box root = initialize();
        int[] levels = new int[args.Length];
        For (int i=0; i < args.Length; i++) {
            Levels[i] = Integer.ParseInt(args[i]);
        }
        Root.Traverse( levels );   
}
private static Box initialize() { Box[] nodes = new Box[7]; Nodes[1] = new Box( 1 ); Int[] waves = {1, 4, 7}; For (int i=0; i < 3; i++) {
... Continue reading "Public synchronized int incContador (int val)" »

Midterm Answers: Memory Protection, Power-On Self Test, Command Information, and More

Classified in Computers

Written at on English with a size of 1.96 KB.

Midterm Answers

1. What is the main element of the Address Unit that allows memory protection of one application program from others? ATT/DATT


2. Which program runs first when the computer’s power is turned on? POST


3. a) Write COMD.EXE command that would provide information about DIR command:

help dir

b) Write UNIX/Linux shell (sh, ksh or bash) command that would provide information/help about ls command:

man ls


4. What is the space reserved on the RTS when a function is called? stack frame


5. What is the name of UNIX/Linux keyboard file? stdin


6. How many passwords may be used to control access to the systems firmware? 2


7. a) Upon process creation, does complete process image exist in memory? yes

b) Upon process terminations, does complete process

... Continue reading "Midterm Answers: Memory Protection, Power-On Self Test, Command Information, and More" »

Python Functions and Errors: Time, Triangle, Bonus, and Digits

Classified in Computers

Written at on English with a size of 4.09 KB.

TIME DIFFERENCE

def time_difference(time1, time2):
time1=time_to_seconds(time1)
time2=time_to_seconds(time2)
diffinsecond=time2-time1
hours=diffinsecond//3600
minutes=(diffinsecond-(hours*3600))//60
seconds=diffinsecond-(hours*3600)-(minutes*60)
return(make_time_string(hours,minutes,seconds))

# Predefined helper functions. Do not edit them.
def time_to_seconds(time):

x = list(map(int, time.split(":"))
return x[0] * 3600 + x[1]*60 + x[2]

def make_time_string(hours, mins, seconds):
return "{:02d}:{:02d}:{:02d}".format(hours, mins, seconds)

TYPE OF TRIANGLE

def triangle(side1, side2, side3):
if side1+side2<>
return "Not a triangle"
elif side1==side2 and side2==side3:
return "Equilateral"
elif... Continue reading "Python Functions and Errors: Time, Triangle, Bonus, and Digits" »

Web Security: Confidentiality, Authentication, and Protection Measures

Classified in Computers

Written at on English with a size of 3.48 KB.

Web Security

Confidentiality: only authorized users should have access to the data

Authentication: each user must be confirmed to be who they say they are through their digital identity

Authorization: access to the different services must be conditioned by the identity and permissions attributed to each user

Integrity: the data sent must be the same as those received, avoiding manipulation or corruption

Availability: quality or condition of the information to be available to those who must access it.


Security Threats: the security of a network is exposed

Logical Causes:

This is the software that can attack the computer: malware, spam, viruses, programming errors…

Human Causes:

These are users who can damage the system: inexperienced users, hackers,... Continue reading "Web Security: Confidentiality, Authentication, and Protection Measures" »

Aircraft systems

Posted by and classified in Computers

Written at on English with a size of 10.6 KB.

New jobs are admitted into the system
-- long-term or high-level scheduling

Once in the system, processes go through a number of state changes
-- short-term or low-level or CPU scheduling

A process is a "running program" or "program in execution"

Processes have a variety of states:


   RUNNING           READY                 WAITING (on I/O)
    STATE            STATE                  STATE

   +-----+                               +-----------------------+
   |     |     +--------------------+    |                 P2 P8 |
   | CPU | <== |="" p3="" |="" p6="" |="" p5="" |="" ...="">==><== i/o="" subsystem="" p13="" |="" |="" p11="" |="" +--------------------+="" |="" |="" +-----+="" +-----------------------+="" (a="" cpu=""
... Continue reading "Aircraft systems" »