Leetcode – 968 – Binary Tree Cameras

Given a binary tree, we install cameras on the nodes of the tree. Each camera at a node can monitor its parent, itself, and its immediate children. Calculate the minimum number of cameras needed to monitor all nodes of the tree. Example 1: Input: [0,0,null,0,0]Output: 1 Explanation: One camera is enough to monitor all nodes if placed as … Continue reading Leetcode – 968 – Binary Tree Cameras

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 … Continue reading JWT prevents hot linking to your media

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 … Continue reading Configure Nginx as a web server and reverse proxy for Nodejs application on Azure Windows

Message compression on WCF

Windows Communication Foundation (WCF) is a message-based communications infrastructure. So developers are concerned about the wire footprint (size) of message sent across the network, the text-based encoding of XML poses challenges for efficient transfer of binary data because to fit binary data into XML text, the common approach is to encode them using the Base64 … Continue reading Message compression on WCF