Category: NodeJs
Computer Networks
Computer Networks. Part One: LANs and WANs Computer Networks. Part Two: Network Hardware Computer Networks. Part Three: Ethernet Fundamentals Computer Networks. Part Four: LAN Topology Computer Networks. Part Five: Switched Ethernet LANs Computer Networks. Part Six: The TCP/IP Protocol Stack and Routers Domain Name System DNS
Twos complement: Negative numbers in binary
Two’s Complement Representation of Negative Numbers
Permutation and Combination
Permutation – position (order) matters. = N! / (N – r)!. Building words with {a,b,c} are also permutation problem with r = {1,2,3..N} Combination – position (order) doesn’t matter = N! / (N – r)! * r! . Combination is a part of Permutation set. All possible combination means, generating combination for r = {0,1.. […]
Binary Left Shift << and Right Shift >>
Binary Left Shift << When shifting left, the most-significant bit is lost, and a 0 bit is inserted on the right end. Left shift is equivalent to multiplying the bit pattern by 2k (if we are shifting k bits). 10 << 2 = 10 * 22 = 10 * 4 = 40 10 << 3 = 10 […]
JWT prevents hot linking to your media
Imagine you have some media files published (static http(s) links) on your website for targeted customers, which have been very popular recently. Other sites (search engine) started finding links of your media and putting it on their websites or people started sharing your media links with others. Suddenly you see surge of download on your […]
Configure Nginx as a web server and reverse proxy for Nodejs application on Azure Windows
Introduction: NodeJs applications are “Single threaded Event Loop” i.e there is a single thread listening to all incoming requests. On receiving a request, it immediately publish it to its internal “event queue” and is ready to receive the next request. It also polls event queue for any pending tasks and processes Non-blocking I/O tasks. For […]