Understanding Computer Networks: Communication Structures, Protocols, and Design

Communication Structures

Key Elements:

  • Naming and Name Resolution: Identifies processes with host and process IDs, utilizing DNS.
  • Routing Strategies:
    • Fixed Routing: Predefined path from source to destination.
    • Virtual Circuit: Fixed path for a single session.
    • Dynamic Routing: Path determined at the time of message sending.
  • Connection Strategies:
    • Circuit Switching: Dedicated physical link for the duration of communication (e.g., mobile phones).
    • Message Switching: Temporary link for a single message transfer
Read More

Data Structures and Algorithms

Time Complexity

Determining the time complexity of an algorithm involves analyzing the number of loop executions. The growth function represents the exact relationship between the problem size (n) and the time complexity of the solution. The order of an algorithm refers to its asymptotic time complexity as the problem size and algorithm complexity approach their asymptotic limits.

Common time complexities include:

  • O(1) – Constant time
  • O(log n) – Logarithmic time
  • O(n) – Linear time
  • O(n log n) – Log-linear
Read More

Data Structures and Algorithms in C: A Comprehensive Guide

Data Structures and Algorithms in C

Searching Algorithms

Linear Search

The linear search algorithm sequentially checks each element in a list until it finds the target value. It’s simple but inefficient for large lists.

C Code for Linear Search

#include #include void main(){ int a[50],i,n,elt,count; clrscr(); printf("\n\tLINEAR SEARCH"); printf("\n\t \n\n"); printf("\n\tEnter the limit:"); scanf("%d",&n); printf("\n\tEnter the elements:"); for(i=0;i

Binary Search

Binary search is a more efficient algorithm

Read More

HBase Code Examples and Concepts

HBase Code Examples

Creating a Table

This code demonstrates how to create a table in HBase with two column families:

private void createTable() throws IOException {  byte[] table = Bytes.toBytes("User");  byte[] cf1 = Bytes.toBytes("PersonalData");  byte[] cf2 = Bytes.toBytes("LoginData");  HTableDescriptor hTable = new HTableDescriptor(table);  HColumnDescriptor family1 = new HColumnDescriptor(cf1);  family1.setMaxVersions(10);  hTable.addFamily(family1);  HColumnDescriptor family2 = new HColumnDescriptor(
Read More

Switch Configuration for 04-009133HEML-G-A-C3850XS-12

no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
service unsupported-transceiver
!
(region number) (building Addres) (location of the switch)( A switch first switch) (model of the switch)

hostname 04-009133HEMLGAC3850XS12
!
boot-start-marker
boot-end-marker
!
!
vrf definition Mgmt-vrf
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
!
enable secret 5 $1$YzBN$LO8xmIvCUoLW5yIpVXWS80

Read More

Linux System Administration Guide

CHAPTER 1

SSH


ssh-keygen
ssh-copy-id server0
connect:
ssh server0
know the hostname:
ssh server0 hostname
HELP FROM RED HAT
redhat-support-tool
opencase –product=”Red Hat Enterprise Linux” –version=”7.0″
listcases
modifycase
to attacht sosreport do sosreport
sosreport
send attachment
JFI: find / -type f -name “asdfasdf.Txt”
CHAPTER 2
MANAGING FILES USING COMMAND-LNE TOOLS
Basic operations
cp
mv
rm
mkdir
Making Links Between Files
Differences between symbolic link and hard link
Let’s summarize

Read More