
Tech Revolvers

<bits/stdc++.h> header file in C++ It is basically a header file that includes every standard library. In programming, people focus more on finding algorithm to solve a problem than on software engineering. From, software engineering perspective, it is a good idea to minimize the include. It actually includes a lot of files, which your program may Read more

MAKING FOLLOW-MAPPING ON RAILS STEP-1: On terminal $rails g model FollowMapping follower_id:integer followee_id:integer $rake db:migrate STEP-2: home_controller def users @users = User.all end Read more

Fixing a header after scrolling to a certain point For this we have to use javascript for fixing header at a certain point. $(document).scroll(function() { var y = $(document).scrollTop(); header = $(“#menu”); if (y >= 200) { header.css({ position: “fixed”, “top”: “0”, “left”: “0” }); } else { header.css(“position”, “relative”); } }); So here #menu Read more

Parallax Scrolling Effect This is purely based on html and css. Parallax is an effect where the position of an object seems to be different when viewed from different positions. Parallax motion, or in our case, parallax scrolling, then gives us the illusion that two objects in the same line of sight, but with Read more

The following 3 asymptotic notations are mostly used to represent time complexity of algorithms. 1) Θ Notation: The theta notation bounds a functions from above and below, so it defines exact asymptotic behavior. A simple way to get Theta notation of an expression is to drop low order terms and ignore leading constants. For a Read more