Dispute on a One-Way Street

So, there I was, parked up by a fire hydrant, minding my own business, scrolling through my phone. The street was buzzing, cars inching along the one- ... ...

Why Can’t We Take Naps in the Library?

As usual, I studied in the public library this afternoon. The library was quite empty, with few people present today. Due to the warm and cozy atmosph ... ...

Zustand Performance Study

Avoiding Destructuring in the Selector const name = useUserState(state => state.name) vs const { name } = useUserState(state => state); or const ... ...

Socket IO Study

server.js var app = require("express")(); var http = require("http").Server(app); var io = require("socket.io")(http); app.get("/", (req, res) => { ... ...

Local HTTPS server

const express = require('express'); const path = require('path'); const https = require('https'); const http = require('http'); const fs = require('fs ... ...

ES6 Promise & Async + Await

Create new Promise objects: const p = new Promise((resolve, reject) => { resolve("good"); }); const p2 = new Promise((resolv, reject) => { reject("bad ... ...

Useful Examples of ES6 Destructuring

Define a function to take configuration object as input: const func = ({a=1, b=2}) => { return a+b; } console.log(func({b:4})) //output: 5 Swap 2 v ... ...

How to clear Cookie data in chrome

Go to chrome://settings/content/cookies. type the domain name in the search box. Click delete. … Press control shift i (or command shift i on OS ... ...