If you ever had to work with controllers or microprocessors, you’ve probably come across the need to convert 2 cells of 16 bits numbers into a single 32bit integers. On some controllers, the registers are assigned in 16-bit cells, and if you want to store anything larger than 65,535 you’ll need to convert it.
As I wrote here before, I do a lot of professional interviews, and I discovered that the best questions have more than one solution to them. While having an ideal solution to a problem, you can still ask the interviewees for other ways for the solution and putting extra constraints that can help guide them in either direction (maybe to check their creativity, or if they knew the question beforehand). One of the questions that fit this requirement is the “count the 1’s in the binary representation of an integer”.
I’ve been working with Oracle’s SQL Developer for years through its various versions. This tool has become better over the years and improvements can be noticed from version to version. None the less there is one bug that returns every now and then, and it doesn’t seem to be version specific. This is the super slow editing or typing in the IDE SQL code windows, this in fact, in some cases prevent and interfering with our work. How to solve this irritating issue?
Sharing links with WhatsApp has become a great way to drive visitors into your sites. A nice feature when a link is shared is a little preview of the link’s content, with a title, short description and an image of the designated page. This data comes from scraping the link for Open Graph (OG) data. One of the tags allows you to put one or more images to be shown as the link image.
Recently I build a PHP script for dynamically downloading files, and I came across the need to provide the right Mime-Type for each file I set to download. I wrote a function in PHP that gets file extension (with or without the dot prefix) and returns the correct Mime-Type.