/blog/images/avatar-icon.png

TCP/IP | Backend 101

What’s TCP/IP Internet protocol suite1 The Internet protocol suite, commonly known as TCP/IP, is a framework for organizing the set of communication protocols used in the Internet and similar computer networks according to functional criteria. foundational-protocols The foundational protocols in the suite are Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Internet Protocol (IP) In the development of this networking model, early versions of it were known as the Department of Defense (DoD) model because the research and development were funded by the United States Department of Defense through DARPA.

SQL Delete Duplicate with no SELECT by Cartesian product

Sample Situation Delete Duplicate Emails - LeetCode Table: Person 1 2 3 4 5 6 7 8 +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | email | varchar | +-------------+---------+ id is the primary key column for this table. Each row of this table contains an email. The emails will not contain uppercase letters. Write an SQL query to delete all the duplicate emails, keeping only one unique email with the smallest id.

API call - implement retry mechanism into python requests library / try-except using Python requests module

This is a follow-up to What Happens When You Click a Link? URL/ HTTP/ Domain Name/ DNS/ IP Address - Hung, Chien-Hsiang | Blog (chienhsiang-hung.github.io). Requests Exceptions 1 2 3 4 try: r = requests.get(url, params={'s': thing}) except: requests.ConnectionError, e: print(e) This will not cover all of bases. It’ll only catch connection-related errors, not ones that time out for instance. Have a look at the Requests exception docs. In short:

What Happens When You Click a Link? URL/ HTTP/ Domain Name/ DNS/ IP Address

URL What happens when we hit any URL? Before discussing what happens after hitting the URL, we must go through what a URL actually is, and what different parts of the URL mean - right? Without wasting any time, let’s understand more about URLs. URL – Uniform Resource Locator If you look into its full form, then it is self explanatory: it has the location of

Processes and Threads | Operating System

What’s OS (Operating System) Assume that we have a program written in Java, Python, C, etc. sort of high-level language, that a PC wouldn’t be able to execute. We need a compiler to translate those languages to 0, 1 binary codes for a PC to run. When those programmes are being executed, they will consume some resources from the computer. How do we allocate the resources? Who will do this

Python Generator Performance, Yield, One Line Generator

Stepping Cycle Generator Generator Performance Generators are a great way to optimize memory. An infinite sequence generator is an extreme example of this optimization. Yield The yield statement suspends a function’s execution and sends a value back to the caller, but retains enough state to enable the function to resume where it left off. When the function resumes, it continues execution immediately after the last yield run. This allows its code to produce a series of values over time, rather than computing them at once and sending them back like a list in which we optimized memory usage.