13 / 9 / 2023
'# Task 1 - Javascript
The task had following objectives:
Percentage of each student
Class average
Rankings of the students
Skills Learned: Basic working of HTML, CSS and Javascript, defining and calling JS functions, use of objects in JS
Javascript acts as a brain for the web applications. It is an OOP and here the objects are used. The object has two properties: name and marks. So every-time a new entry gets added, a new object is created and stored in an array.
Code Link: Mark Registry Codesandbox
Website Link: Mark Registry
Skills learnt: Async function usage, Callback functions
Async functions in JS help in making the websites responsive even when there is user-requested process going on in the background. Here, a callback function is defined and used to display the steps of a recipe.
Code Link:Cook Book Sandbox
Website Link: Cook Book
Skills learnt: Usage of Promises
Promises are the objects returned by an async function which represents the current state of the process. It helps us to know whether the processing has completed or not, and returns a value based on the outcome of the function.
Here Promise is inbuilt in fetch()
function.
They are composable, unlike callbacks, therefore we can avoid callback hell.
You can easily execute code with Promise.all
when multiple responses are returned.
You can wait for only one result from concurrent pending promises with the help of Promise.race
.
Code Link:Cook Book Sandbox
Link:Cook Book
as it is one of the simple and efficient ways to work with cloud service providers and servers.
Skills learnt: Bash basics, Some basic functionalities of CLI.
A folder named test was created and changed the current directory to that folder using ‘cd’ command.Created a blank text file using ‘touch’ command. Then the files and folders were listed using ‘ls’ command. Then 2600 folders were created using bash script and ‘mkdir’ command. Finally two files are concatenated using ‘cat’ and ‘>>’ and displayed in the terminal.
Skills learnt: Vi Usage
Vi is an inbuilt text file editor in most linux machines. It, s one of the basic but also one of the most powerful editors.
The specialty of this editor is that it has command and insert mode. The file opens in command mode where we use functions like copy, paste and delete lines and characters.
In the insert mode, we can add characters to the file. After writing, the file has to be saved by going back to the command window. Some useful commands are:
dd
- to delete the entire line of text
v
- to select a portion of text
x
- to cut the selection portion of text
y
- to copy the selected portion of text
p
- to paste the copied/cut text
w
- to write the file to the disk
q
- to close the editor
learn how grep works, Use grep to extract login times within a date/time range from the login logs using the , last, command, Pipe this information into a text file and put it into a folder named logs, zipping this folder using gzip and tar
Skills learnt: Basics of Regex, piping, gzip and tar
Regex is one of the useful tool which helps in finding a certain set of characters in dump of text. They help in sorting out the that large heap of info. When used with piping and grep,
they are much more powerful. Grep and regex can be used together in the command egrep
. Piping is another tool where the output of one command can be passed onto another command. It reduces the complexity of using two more commands.
Here,
A .sh
file was created with a snippet of bash code.
The login info is displayed on the command window using last
command. The output of this is then piped into egrep
to get the logins which happened only during the months of april,
may and september. Which then were stored in a file named logs.txt
. Then this text file is converted into a compressed and an archived file using gzip
and tar -czvf
commands.
Skills Learnt: Basics of Cloud Computing, Local File Sharing on LAN.
The resource article was written on the basics of Cloud Computing. Click here to access the article.
Another task was to share files and folders across devices and accessing them. The steps are as below:
Go to network and sharing center and enable network discovery
and file and printer sharing
in advanced sharing settings for both private and public modes.
Disable password protected sharing
under all network settings.
Go to SSDP discovery
service and under properties,
set startup type
to automatic
.
Do the same for UPnP Device Host
,
Function Discovery Provider Host
and Function Discovery Resource Publication
.
Select the folder that you want to share and under its properties,
go to Sharing
tab,
select Advanced Sharing
. Edit the settings as per your needs and apply. Then click the Share
button to share the folder.
"