Notes, abstracts, papers, exams and problems of Computers

Sort by
Subject
Level

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" »

Sorting Algorithms and Hash Tables: Explained and Compared

Classified in Computers

Written at on English with a size of 3.31 KB.

Sorting Algorithms and Their Bounds

Results like the Ω(nlgn) lower bound on all sorting via binary comparisons are difficult to establish. On the other hand, results like the O(n2) upper bound on INSERTION-SORT are easier to achieve. Explain adequately the difference in the “ease” of arriving at these results.

One result applies to all sorting algorithms that are based on binary comparisons (and so is harder to establish) while the other result is simply for one specific sorting algorithm in the same category. A more complete answer would involve an argument that rightly recognizes that the lower bound result is one that also applies to algorithms that exist and also those yet to be devised (yes, even those that may be written a hundred... Continue reading "Sorting Algorithms and Hash Tables: Explained and Compared" »

HTML Basics: Elements, Attributes, Structure, Images, Headings, Paragraphs, and Links

Classified in Computers

Written at on English with a size of 1.58 KB.

HTML Basics

All HTML documents must start with a document type declaration: <!DOCTYPE html>.

The HTML document itself begins with <html> and ends with </html>.

The visible part of the HTML document is between <body> and </body>.

HTML Elements

Elements consist of a start tag and end tag, with the content inserted in between:

<tagname>Content goes here...</tagname>

HTML Attributes

All HTML elements can have attributes.

Attributes provide additional information about an element.

Attributes are always specified in the start tag.

Attributes usually come in name/value pairs like: name="value"

HTML Structure

<!DOCTYPE html>

<html>

<body>

My First Heading</h1>

My first paragraph.</p>

</body>... Continue reading "HTML Basics: Elements, Attributes, Structure, Images, Headings, Paragraphs, and Links" »

3D Cube Transformations in OpenGL: Scaling, Translation, and Rotation

Posted by aditya dani and classified in Computers

Written at on English with a size of 2.4 KB.

Introduction

This program demonstrates how to draw a 3D cube in OpenGL and perform various transformations on it, including scaling, translation, and rotation about one axis.

Code

#include <GL/glut.h>

bool movingRight = false;
float xLocation = 0.0f;

void display() {
  glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
  glClear(GL_COLOR_BUFFER_BIT);
  glLoadIdentity();
  glTranslatef(0.0f, 0.0f, -5.0f);
  glTranslatef(xLocation, 0.0f, 0.0f);
  glutWireCube(2.0f);
  glutSwapBuffers();

  if (movingRight)
    xLocation -= 0.05f;
  else
    xLocation += 0.05f;

  if (xLocation < -3.0f)
    movingRight = false;
  else if (xLocation > 3.0f)
    movingRight = true;
}

void reshape(int width, int height) {
  glViewport(0, 0, (GLsizei)width, (GLsizei)
... Continue reading "3D Cube Transformations in OpenGL: Scaling, Translation, and Rotation" »

SDN

Classified in Computers

Written at on English with a size of 4.17 KB.

OPENFLOW:

defines OpenFlow as the first standard communications interface defined between the control and forwarding layers of an SDN architecture. OpenFlow allows direct access to and manipulation of the forwarding plane of network devices such as switches and routers, both physical and virtual 


OPENFLOW CONFIG CONCEPTS


OF Capable Switch: Physical OF switch.  Can contain one or more OF logicalswitches.

OpenFlow Configuration Point: configurationservice

OF Controller: Controls logical switch via OFprotocol

Operational Context: OF logicalswitch

OF Queue: Queues of packets waiting forforwarding

OF Port: forwarding interface. May be physical orlogical.

OF Resource: ports, queues, certificates, flow tables and other  resources of OF capableswitches 

... Continue reading "SDN" »

Advantages of Address Aggregation and Key Characteristics of Routing Protocols

Classified in Computers

Written at on English with a size of 2.95 KB.

Discuss the advantages of address aggregation (summarization) with respect to routing table size, routing update exchange, and routing optimization?

Route aggregation and subnetting shrink the size of routing tables used by routers. Without CIDR, a router must maintain many individual entries for routes within the same network. CIDR guarantees more efficient routing and reduces the number of CPU cycles when updating a routing table. It also reduces router memory requirements.

What are the key characteristics or requirements that should be fulfilled by any routing protocol?

A routing protocol should guarantee loop-free paths, calculate multi-hop optimal paths, use simple or composite network metrics, be scalable, converge rapidly, use network resources... Continue reading "Advantages of Address Aggregation and Key Characteristics of Routing Protocols" »

Managing Operating Systems on Workstations: The Big Three

Classified in Computers

Written at on English with a size of 4.58 KB.

Managing operating systems on workstations boils down to three basic tasks: loading the system
software and applications initially, updating the system software and applications, and
configuring network parameters.
We call these tasks the Big Three.

The Five States

The diagram depicts five states: new, clean, configured,
unknown, and off.

  • New refers to a completely new machine.
  • Clean refers to a machine on which the OS has been installed
    but no localizations performed.
  • Configured means a correctly configured and operational
    environment.
  • Unknown is a computer that has been misconfigured or has
    become out of date.
  • Off refers to a machine that has been retired and powered off.

Transitioning Between States

There are many ways to get from one lifestyle... Continue reading "Managing Operating Systems on Workstations: The Big Three" »

Invention by experience

Classified in Computers

Written at on English with a size of 3.79 KB.

THE COMPUTER

In the world there are many inventions,
 some very good and some not so. 
In my opinion, the computer is the most
 important and useful invention of all. 

With the computer you can play if you
 are bored. You can read a book or 
say what review in this invention, too.
 Thanks to the computer you can save
 files and important or heavy documents. 
If you have a difficult school project you 
can browse information with the computer 
because it is very fast and has many 
programmes with a lot of information. 
I think that the best made in the world 
of computers is apple, because its 
computers have large memory of data.
 However this invent is very expensive. 

This invention is very great for people
 and for their jobs. If someone
... Continue reading "Invention by experience" »