Quick Tip: Android Change Action Bar SearchView Hint (Placeholder) and Text Color

There are times when you’ll want to change the hint (placeholder) color and the text color of a SearchView widget. Here’s a small snippet that’ll allow us to do it:

Continue reading “Quick Tip: Android Change Action Bar SearchView Hint (Placeholder) and Text Color”

PHPExcel Set URL Font Styles (Color and Underline)

When creating excel files using PHPExcel, on setting a hyperlink the cell value’s styling is generally not affected. This happens on purpose to give us more control on how we want to format our content. Usually this is how we’d set a hyperlink:

Continue reading “PHPExcel Set URL Font Styles (Color and Underline)”

Fixing Laravel Basic Auth Failure

Today, as I deployed my Laravel application, I received an email from my client mentioning that the basic authentication wasn’t working on the production server. I tested promptly and indeed it wasn’t. This was really strange for me as locally all was well. I got stuck at the problem for quite sometime. Searching on Google made me realize that a lot of people have been facing the same conundrum. But finally as usual, I found out the solution not too late.

Continue reading “Fixing Laravel Basic Auth Failure”

Mac OS X Setting Up Initial Tools for a Web Developer

About an year ago I bought a Macbook Pro Retina and completely switched from Ubuntu (older PC) to Mac. In this guide (for starters) I’ll quickly show how to install and setup various important softwares and tools that are essential for web development like apache, php, mysql, ruby, python, node, redis, mongo, git, wget via Homebrew which is a package manager for OS X. It is similar to the Advanced Packaging Tool (APT) on Debian or Ubuntu.

Continue reading “Mac OS X Setting Up Initial Tools for a Web Developer”

Change Active State of Links in Sticky Navigation on Scroll

Based on the design decisions made by you on your website (or webapp), you might probably end up having a sticky navigation, one that keeps on showing up in the view port as you scroll up or down. In such a situation, it’s a common desire to have the links in the navigation bar be scrollbar-aware and change their active state as the user scrolls through the page. Let’s see how to do this.

Continue reading “Change Active State of Links in Sticky Navigation on Scroll”

Why clearRect Might Not be Clearing the Canvas Pixels

Sometimes the clearRect(x, y, width, height) method on the canvas context might not erase the previous graphics drawn. This usually happens when we’re drawing paths using methods like lineTo(), arc(), rect(), etc. and then stroking them with stroke() or filling their content area using fill(). Here’s an example of what I’m trying to convey.

Continue reading “Why clearRect Might Not be Clearing the Canvas Pixels”