Notes, abstracts, papers, exams and problems of Computers

Sort by
Subject
Level

Understanding Network Characteristics and Protocols

Classified in Computers

Written at on English with a size of 5.89 KB.

1. The performance of a client-server system is strongly influenced by two major network characteristics: the bandwidth of the network (that is, how many bits/sec it can transport) and the latency (that is, how many seconds it takes for the first bit to get from the client to the server). Give an example of a network that exhibits i) high bandwidth but also high latency, and ii) then give an example of one that has both low bandwidth and low latency. i) High bandwidth but also high latency: A transcontinental fiber link might have many gigabits/sec of bandwidth, but the latency will also be high due to the speed of light propagation over thousands of kilometers. Similarly, a satellite link may run at megabits/sec but have a high latency to... Continue reading "Understanding Network Characteristics and Protocols" »

Shell Scripting Basics

Classified in Computers

Written at on English with a size of 2.58 KB.

#!/bin/bash (Header .Sh)
echo
"text" ("print()")
chmod u+x file.Sh
g++ add.Cpp -o name (compile)
./add < input.Txt > output.Txt
pet="dog" (variable)
echo "Hello $var" (access var)
read var (input())
echo "$x" ("" echo var echo '$x')
echo "\$x" (echo special char)
a="`cat fl.Txt`" (stores shell cmd output)
echo ${#var} (No. Char in var)
echo ${a:6:3} (return substring ${a:pos:len})
echo ${a/$from/$to} (replace 'from' to 'to)
let "b = $a + 9" (does math and ans strd in var)
var="$0" ("$0" cmd line arg, "$@", @:all)


if [ condition ] | [ "$string" ] True; length of $string is non-0 | [ -e $file ] True iff file exists
then | [ "$string1" == "$string2" ] True; strings are equal | [ -f $file ] True iff file is a file
some action | [ "$string1" != "$string2"

... Continue reading "Shell Scripting Basics" »

Advantages and Disadvantages of Primary and Secondary Data Collection

Classified in Computers

Written at on English with a size of 2.99 KB.

Primary data:

  • Any data that is personally collected by you. Primary data may include traffic counts, pedestrian counts, environmental indexes, questionnaires or land use surveys.

Secondary data:

  • Any data that has been collected by someone else. Secondary data collection may be found in books, on the internet, in academic journals, etc.

Census:

  • A survey carried out by nearly all countries every 10 years. It is a very detailed survey that is compulsory for everyone to fill in.



Advantages of Primary Data:

  • It is up to date (current).
  • You know how the data has been collected.
  • Includes data relevant to coursework.
  • Only covers your study area.
  • Collected in the format that you want.

Advantages of Secondary Data:

  • Can study temporal changes.
  • It can be quicker, especially
... Continue reading "Advantages and Disadvantages of Primary and Secondary Data Collection" »

Part

Classified in Computers

Written at on English with a size of 2.99 KB.

-Composite structural, Composite pattern is used where we need to treat a group of objects in similar way as a single object. Composite pattern composes objects in term of a tree structure to represent part as well as whole hierarchy. This type of design pattern comes under structural pattern as this pattern creates a tree structure of group of objects. This pattern creates a class that contains group of its own objects. This class provides ways to modify its group of same objects.

-Decorator structural, Decorator pattern allows a user to add new functionality to an existing object without altering its structure. This type of design pattern comes under structural pattern as this pattern acts as a wrapper to existing class. This pattern creates
... Continue reading "Part" »

Software Design Patterns: Enhancing Flexibility and Structure

Classified in Computers

Written at on English with a size of 3.73 KB.

Design patterns offer proven solutions to recurring software design challenges, promoting code reusability, maintainability, and efficiency. They can be categorized into three main types:

Behavioral Design Patterns

These patterns focus on communication and interaction between objects, enhancing flexibility. Examples include:

  • Observer Pattern: Enables one-to-many dependencies, where changes in one object automatically notify dependent objects.
  • Iterator Pattern: Provides sequential access to elements within a collection without exposing its underlying structure.

Creational Design Patterns

These patterns address object creation mechanisms, ensuring suitable instantiation processes. Examples include:

  • Singleton Pattern: Restricts object creation to a single
... Continue reading "Software Design Patterns: Enhancing Flexibility and Structure" »

Content

Classified in Computers

Written at on English with a size of 5.21 KB.

Primary Key : A Primary Key is the minimal set of attributes of a table that has the task to uniquely identify the rows, or we can say the tuples of the given particular table.It is the first key which is used to identify one and only one instance of an entity uniquely. An entity can contain multiple keys as we saw in PERSON table. The key which is most suitable from those lists become a primary key. In the EMPLOYEE table, ID can be primary key since it is unique for each employee. In the EMPLOYEE table, we can even select License_Number and Passport_Number as primary key since they are also unique.For each entity, selection of the primary key is based on requirement and developers.

Foreign key :A foreign key is different from a super key,

... Continue reading "Content" »

Structural and Behavioral Design Patterns in Software Development

Classified in Computers

Written at on English with a size of 2.12 KB.

Structural Design Patterns

Decorator - Adds additional functionality to a class

Adapter - 'adapts' one interface for a class into one that the client expects

Façade - creates a simplified interface from an existing one

Flyweight - A high quantity of objects share common properties to save space.

Bridge - decouples an abstraction from its implementation so that the two can vary independently.

Behavioral Design Patterns

Chain of Responsibility - Linked list of handlers

Command - Enables all the info for a request to be contained within a single object.

Interpreter - Developing domain specific languages

Iterator - Sequentially access elements of an aggregate object.

Mediator - Removes the need for classes to communicate with each other directly.

Observer... Continue reading "Structural and Behavioral Design Patterns in Software Development" »

Data Project Management: A Comprehensive Guide to DR, MVP, and Data Pipelines

Classified in Computers

Written at on English with a size of 3.25 KB.

Data Project Management: A Comprehensive Guide

Goal Setting: The Foundation of Project Planning

Every project requires a clear destination to determine its success. Goal setting is the first step in project planning, providing a roadmap for the project's journey.

Tools & Skills: Assessing Project Resources

The upper blocks of DR (Data Requirements) focus on evaluating the resources necessary for data project implementation. These resources include:

  • Hard Resources: Data, software tools, processing
  • Soft Resources: Skills, domain expertise, human resources for execution

Process & Value: Implementation and Delivery

The lower blocks of DR concentrate on project implementation and delivery. DR serves as a planning tool, helping project managers:

  • Identify
... Continue reading "Data Project Management: A Comprehensive Guide to DR, MVP, and Data Pipelines" »

Java Programming Concepts and Functions

Classified in Computers

Written at on English with a size of 2.41 KB.

public static void main(String[] args) {
Scanner entrada = new Scanner(System.in);
String frase= entrada.nextLine();
Stack invertidas = new Stack();
Queue ordenadas = new LinkedList();
for(int i=0;i char letra= frase.charAt(i);
if(Character.isLetter(letra)){
invertidas.push(Character.toLowerCase(letra));
ordenadas.add(Character.toLowerCase(letra));
}
}
while(!invertidas.isEmpty() && invertidas.peek()==ordenadas.peek()) {
invertidas.pop();
ordenadas.poll();
}
if(invertidas.isEmpty() && ordenadas.isEmpty()){
System.out.println( 'A frase é palíndrome');
}
else{
... Continue reading "Java Programming Concepts and Functions" »

Understanding Time Complexity in Sorting Algorithms

Classified in Computers

Written at on English with a size of 12.09 KB.

1. What is recurrence for worst case of QuickSort and what is the time complexity in Worst case? Recurrence is T(n) = T(n-1) + O(n) and time complexity is O(n^2) 2. Suppose we have a O(n) time algorithm that finds median of an unsorted array. Now consider a QuickSort implementation where we first find median using the above algorithm, then use median as pivot. What will be the worst case time complexity of this modified QuickSort. O(nLogn)  3. Given an unsorted array. The array has this property that every element in array is at most k distance from its position in sorted array where k is a positive integer smaller than size of array. Which sorting algorithm can be easily modified for sorting this array and what is the obtainable time complexity?

... Continue reading "Understanding Time Complexity in Sorting Algorithms" »