Category: Misc

Disabling Text Selection, Cut, Copy and Right Click on a Page

In this post, we will cover how to stop content theft from your website simply by disabling text selection, cut, copy and right click function via mouse and keyboard. We will also cover how we can encrypt HTML so that source code can only be readable to the browsers.     1. Disable Text Selection …

Treap Data Structure

A Treap Data Structure is basically a combination of a binary search tree and a heap.   Binary Search Trees – Deletions and additions of nodes can make the tree unbalanced (heavier on sides, therefore, the property we value about BSTs, the ability to distribute data by equal divisions, goes out of whack). Therefore you’d …

50 Best Comments in Source Code Ever

This articles lists out some of the best comments ever encountered in source code which are taken from a very famous thread at StackOverflow.

C program to print map of India

Write a C program to print map of India.     Below is obfuscated version in C that generates the map of India. Obfuscated code is any code that is difficult for humans to understand.

C++ program to print heart star pattern

Write a C++ program to print heart star pattern.     Wan’t to impress another geek friend on some special occasion. Here’s code to print heart shape