This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <stdio.h> | |
# include <stdlib.h> | |
# include <string.h> | |
int main () { | |
char word[100]; | |
int OFFSET = 1; | |
printf("Enter a string: "); | |
scanf("%s", word); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
graph = { | |
"A": ["B", "C"], | |
"B": ["C", "D"], | |
"C": ["D"], | |
"D": ["C"], | |
"E": ["F"], | |
"F": ["C"], | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set ns [new Simulator] | |
#puts "Starting program..." | |
# Creating Output files | |
set namf [open stop_wait_protocol.nam w] | |
$ns namtrace-all $namf | |
set trf [open stop_wait_protocol.tr w] | |
$ns trace-all $trf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdio.h> | |
char data[5]; | |
int encoded[8], edata[7], syndrome[3]; | |
int hmatrix[3][7] = {1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1}; | |
char gmatrix[4][8] = {"0111000", "1010100", "1100010", "1110001"}; | |
int main() { | |
int i = 0, j = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Library needed for socket programming | |
import socket | |
# Defining the header size | |
HEADER = 64 | |
# Defining a port for the client to connect to | |
PORT = 5050 | |
# Format specification of the message | |
FORMAT = "utf-8" |