son pham logo

Son's NoteBook

  • About
  • Categories
  • CountDown

R Notebook - dplyr

October 25, 2021

Dplyr

Read more

Explaining TCP flows

August 27, 2021

A few days ago, I wrote a note detailing how to set up a simple TCP client and server using netcat. Today, I have taken things a step further by capturing packets in Wireshark and providing a step-by-step explanation of how the TCP flow works. In the table below, you can find a general overview of this process.

Read more

Quick Note - Decibel dB vs dBm

August 24, 2021

Many of us have heard about decibel unit in our daily lives, as it can be used to describe the loudness of our speakers, the strength of our antennas, or the signal strength from a transceiver. But what exactly are decibels (dB) and dBm? In this discussion, let’s explore these concepts and expand our understanding.

Explanation

Deci-bel is ten time of a Bel (10 x Bel)
Bel is named after an inventor Alexander Graham Bell, in Bell Lab.
It is an unit of a ratio on base 10 logarithm scale
Bel is defined as \(X = \log\frac{P2}{P1}\)

  • P1: Reference Power
  • P2: Measured Power

Now we have \(Decibel = 10 Bel = 10\log\frac{P2}{P1}\)

So what is the difference between dB and dBm?

dBm stands for decibel in miliwat. That means, our Reference Power will be 1 mW

\[Y = 10 \log\frac{P2}{P1} = 10 \log\frac{P2}{1 mW}\]

We can find Y by raise them to the power of 10

\[10^{\frac{Y}{10}} = 10^{\log\frac{P2}{1 mW}} => P2 = 10^{\frac{Y}{10}} 1 mW\]

So in communication, we usually use dBm because we know the reference power which is 1 mW.

Read more

TCP/UDP Flow Analysis with Wireshark and Windows Subsystem for Linux

August 20, 2021

During many of my interviews, I have been asked whether I understood TCP and UDP, and how they differed from each other. While I knew that TCP had an error-checking procedure that made the protocol more reliable but slower than UDP, my understanding was limited. Although I had learned about the detailed structure of these protocols in school, I didn’t have a chance to get hands-on experience with them. However, I later discovered an easy way to explore TCP and UDP packets using Windows Subsystem for Linux (WSL) and WireShark. As a result, I would like to share what I have learned today.

Read more

Basic JavaScript Part 1

August 3, 2021

In this tutorial, I will introduce a few steps to access and edit elements in JavaScript. Mastering and understanding these steps can help you make a simple form, handling submission, and change the outlook of your website.

Read more

Using Ajax, Xhttp, Fetch, and Axios to get page content

October 15, 2020

Axios

Read more

Useful batch commands

September 25, 2020

Find task name

TASKLIST /v /fo list /fi "imagename eq QXDM.exe" | find "Window Title:"
Read more

Basic Git commands

September 25, 2020

Creating and Managing Git Repositories

Read more
Prev

Go back to homepage Son's Notebook