Notes, summaries, assignments, exams, and exercises for Computer science for Baccalaureate

Content

Computer science9.51 KB

Javascript Continued

  1. The document.GetElementById() method returns the DOM node whose id attribute is the same as the method's parameter.
    Ex: document.GetElementById("early_languages") returns the p node in the HTML below.

  2. The document.GetElementsByTagName() method returns an array containing all the DOM nodes whose type is the same as the method's parameter.
    Ex: document.GetElementsByTagName("li") returns a list of the four li nodes from in the HTML below.

  3. The document.GetElementsByClassName() method returns an array containing all the DOM nodes whose class attribute matches the method's parameter.
    Ex: document.GetElementsByClassName("traditional") returns an array containing the ol node with the class attribute matching the word traditional.

...
Continue reading "Content" »

SDN

Computer science4.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" »

Understanding Networks: Advantages, Disadvantages, and Types

Computer science4.55 KB

Introducing Networks

A network is created when more than one device is connected together. A network can be a small collection of computers connected within a building (e.g. a school, business, or home) or it can be a wide collection of computers connected around the world.

Advantages

  • Communication – it is easy (and often free) to communicate using email, text messages, voice calls, and video calls.
  • Roaming – if information is stored on a network, it means users are not fixed to one place. They can use computers anywhere in the world to access their information.
  • Sharing information – it is easy to share files and information over a network. Music and video files, for instance, can be stored on one device and shared across many computers, so
...
Continue reading "Understanding Networks: Advantages, Disadvantages, and Types" »

Understanding Constructors and Class Variables in OOP

Computer science3.89 KB

Constructor

A constructor is a special method in object-oriented programming that is automatically called when an instance (object) of a class is created. The main purpose of a constructor is to initialize the object's attributes (properties) and allocate resources if needed. Constructors have the same name as the class and do not have a return type.

Example of a Constructor

Here is an example in Python:

class Person:
    def __init__(self):
        self.name = "John Doe"
        self.age = 30

# Creating an instance of the Person class
person = Person()

print(person.name)  # Output: John Doe
print(person.age)   # Output: 30

In this example, __init__ is the constructor method in the Person class. It initializes the name and age attributes of the...

Continue reading "Understanding Constructors and Class Variables in OOP" »

Computer Interface Elements: Windows, Desktop & Controls

Computer science58.82 KB

Snap5

Understanding Window Elements

Standard Window Components

  1. Control Menu: Displays a menu with options to restore, move, size, minimize, maximize, and close the window.
  2. Toolbar: Provides direct access to frequently used display options for greater efficiency.
  3. Title Bar: Displays the name of the window or application.
  4. Menu Bar: Displays and provides access to the menus available within the application.
  5. Work Area: The primary area provided by the application for the user to perform their work.
  6. Window Border: Allows you to resize the window when it is not maximized. Place the mouse pointer on the border, then press and drag it to the new position.
  7. Status Bar: Displays help or information about the current task or ongoing processes.

Window Control Buttons

  • A.
...
Continue reading "Computer Interface Elements: Windows, Desktop & Controls" »

Java Programming Concepts: A Comprehensive Guide

Computer science4.47 KB

  • A class is a template used to create objects and declare data types and methods in a program.
  • Public - Modifier used to declare classes and interfaces. Void - Method that returns no value. Main - Marks the start and end of program execution.
  • Scanner class - Used to get user input for types like String and Int.
  • Exceptions: Try-catch block, throw statement.
  • Inheritance provides a powerful and natural mechanism for organizing and structuring software programs. It improves clarity in the design of classes.
  • A subclass provides specialized behavior based on elements provided by the superclass. Using inheritance, programmers can reuse the code in the superclass many times.
  • Reading and Writing to Files:
    1. Import java.io file.
    2. File inputFile = new File("input.
...
Continue reading "Java Programming Concepts: A Comprehensive Guide" »

Digital Graphics and Media: Terms and Definitions

Computer science3.97 KB

Digital Graphics and Media: Key Terms

Image Fundamentals

  • Pixel: Individual dots that make up bitmap graphics.
  • Dots Per Inch (DPI): Also known as printer resolution. The number of dots of color a printer can produce in a certain amount of space.
  • Pixels Per Inch (PPI): The measurement of pixelation on an output device, such as a computer screen.
  • 300 PPI: The typical PPI needed for professional and commercial prints, such as advertising hoardings, for acceptable quality.
  • Megapixel: A unit used to measure the resolution of digital cameras, referring to one million pixels.
  • Bit Depth: Refers to the number of colors in an image.

Vector vs. Bitmap Graphics

  • Vector Graphics: Graphics stored as a series of mathematical shapes and properties that can be independently
...
Continue reading "Digital Graphics and Media: Terms and Definitions" »

Graph Theory and Algorithms Overview

Computer science27.7 KB

Loop Invariant:

Initialization:
1. The loop invariant states that after the 0th iteration...
2. Loop Invariant at alpha = 0
3. Before the first iteration ...
4. explanation of all the code before the loop
5. Thus the invariant is true after the 0th iteration (before first)
Maintenance:
1. Assume that the loop invariant is true after the (alpha - 1)th iteration. I will prove that after the (alpha)th iteration...
2. State loop invariant at alpha = alpha
3. On the (alpha)th iteration...
4. explanation of all the code within the body of the loop (might need to show mathematical logic)
5. As we can see, the invariant holds true after the (alpha)th iteration, thus proving maintenance.

Big-Theta, Big-Oh, Big-Omega

For the following definitions, recall that N+ is
...
Continue reading "Graph Theory and Algorithms Overview" »

Excel Pivot Tables, Search and Logic Functions, Macros

Computer science16.44 KB

Explanation

10.1 Pivot tables

What is a pivot table? It is one of the most powerful tools in Excel. They are also called “dynamic” because the data on them can be changed by rearranging or changing the position of the column and row headers in an easy and quick way.

The use of a dynamic table is to obtain information summaries from our data grid in order to be able to quickly analyze big volumes of information. These type of tables can be used in situations such as:

  • When you have a table with rows that have different date and you need to organize the information by time periods (month, semester, etc.)
  • When you need to change the arrangement in the rows or column cells to show different perspectives from the same data set.


Follow these steps to...

Continue reading "Excel Pivot Tables, Search and Logic Functions, Macros" »

Importing Bitmap Images into Fireworks: Supported Formats

Computer science2.59 KB

Importing Bitmap Images into Fireworks

Defining the Canvas

The first step is defining the work area or canvas (remember to have the negative area visible). Then, select the import option from the File menu.

A window like the one below will open.

Locating and Selecting the Image

In the Look in option, you'll search the folder where your image is saved. In the Files of type menu, the formats that Fireworks recognizes are shown. Once you select the file, click Open.

Placing the Image

The following mark will be displayed on the canvas, which means Fireworks is ready to bring in the selected image.

Simply click with your mouse or try to trace the desired size of the image.

That way, the image will appear on the canvas.

Image Properties

This image's properties...

Continue reading "Importing Bitmap Images into Fireworks: Supported Formats" »